@univerjs-pro/collaboration-client 0.25.1 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +11 -11
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 _0x1abb79=_0x37da;(function(_0x5875ac,_0x599a13){const _0x2d43b0=_0x37da,_0x278cef=_0x5875ac();while(!![]){try{const _0x48c544=-parseInt(_0x2d43b0(0x410))/0x1*(parseInt(_0x2d43b0(0x1ad))/0x2)+parseInt(_0x2d43b0(0x1fe))/0x3*(parseInt(_0x2d43b0(0x351))/0x4)+-parseInt(_0x2d43b0(0x23e))/0x5*(parseInt(_0x2d43b0(0x353))/0x6)+parseInt(_0x2d43b0(0x2f4))/0x7+-parseInt(_0x2d43b0(0x24f))/0x8+parseInt(_0x2d43b0(0x425))/0x9+parseInt(_0x2d43b0(0x3ee))/0xa;if(_0x48c544===_0x599a13)break;else _0x278cef['push'](_0x278cef['shift']());}catch(_0x567554){_0x278cef['push'](_0x278cef['shift']());}}}(_0x4130,0xb2e67),Object['defineProperty'](exports,Symbol[_0x1abb79(0x28e)],{'value':_0x1abb79(0x1ef)}));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=_0x1abb79(0x21a),m=0x4e20;function ee(_0x23d3db){const _0x42a9ac=_0x1abb79;return JSON[_0x42a9ac(0x20e)](_0x23d3db)[_0x42a9ac(0x2b3)];}function h(_0x31c8dc){'@babel/helpers - typeof';const _0x1520fa=_0x1abb79;return h=typeof Symbol==_0x1520fa(0x1bd)&&typeof Symbol[_0x1520fa(0x30b)]=='symbol'?function(_0x39b996){return typeof _0x39b996;}:function(_0xd96c5a){const _0xa8e41=_0x1520fa;return _0xd96c5a&&typeof Symbol==_0xa8e41(0x1bd)&&_0xd96c5a[_0xa8e41(0x264)]===Symbol&&_0xd96c5a!==Symbol[_0xa8e41(0x227)]?'symbol':typeof _0xd96c5a;},h(_0x31c8dc);}function te(_0xd1c1d2,_0x15287b){const _0x1d1aa0=_0x1abb79;if(h(_0xd1c1d2)!=_0x1d1aa0(0x223)||!_0xd1c1d2)return _0xd1c1d2;var _0x201e90=_0xd1c1d2[Symbol['toPrimitive']];if(_0x201e90!==void 0x0){var _0x331ec0=_0x201e90[_0x1d1aa0(0x25c)](_0xd1c1d2,_0x15287b||_0x1d1aa0(0x203));if(h(_0x331ec0)!=_0x1d1aa0(0x223))return _0x331ec0;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x15287b===_0x1d1aa0(0x298)?String:Number)(_0xd1c1d2);}function ne(_0x3b1d8f){const _0x39f599=_0x1abb79;var _0x15c867=te(_0x3b1d8f,'string');return h(_0x15c867)==_0x39f599(0x2fe)?_0x15c867:_0x15c867+'';}function g(_0xb4deb9,_0x27d0fb,_0x50a76d){const _0x35c027=_0x1abb79;return(_0x27d0fb=ne(_0x27d0fb))in _0xb4deb9?Object[_0x35c027(0x3b7)](_0xb4deb9,_0x27d0fb,{'value':_0x50a76d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0xb4deb9[_0x27d0fb]=_0x50a76d,_0xb4deb9;}let re=function(_0x5a02c9){const _0x53225e=_0x1abb79;return _0x5a02c9[_0x53225e(0x1b9)]=_0x53225e(0x1b9),_0x5a02c9[_0x53225e(0x3c8)]=_0x53225e(0x3c8),_0x5a02c9['CONFLICT']=_0x53225e(0x369),_0x5a02c9['CLOSE_ROOM']=_0x53225e(0x465),_0x5a02c9[_0x53225e(0x200)]=_0x53225e(0x200),_0x5a02c9[_0x53225e(0x35a)]='SOCKET_FAILED_RETRY',_0x5a02c9[_0x53225e(0x31e)]=_0x53225e(0x31e),_0x5a02c9[_0x53225e(0x217)]=_0x53225e(0x217),_0x5a02c9;}({});var _=class{constructor(){const _0x1ed778=_0x1abb79;g(this,_0x1ed778(0x45c),new i[(_0x1ed778(0x3b3))]()),g(this,'event$',this[_0x1ed778(0x45c)][_0x1ed778(0x234)]());}[_0x1abb79(0x1f5)](_0x3976a2){const _0x3793d9=_0x1abb79;this['_event$'][_0x3793d9(0x343)](_0x3976a2);}},ie=class{constructor(){const _0xc1ce46=_0x1abb79;g(this,'_commentUpdate$',new i[(_0xc1ce46(0x3b3))]()),g(this,_0xc1ce46(0x235),this['_commentUpdate$']['asObservable']());}[_0x1abb79(0x48b)](_0x2fd88d){const _0x3292c2=_0x1abb79;this['_commentUpdate$'][_0x3292c2(0x343)](_0x2fd88d);}};function v(_0x107fba,_0x38628b){return function(_0x5eebaf,_0x4c78a8){_0x38628b(_0x5eebaf,_0x4c78a8,_0x107fba);};}function y(_0x4c1dc5,_0x5a7d60,_0x2d9d6e,_0x586cd7){const _0x3a0f47=_0x1abb79;var _0x18dc8f=arguments[_0x3a0f47(0x2b3)],_0x305b81=_0x18dc8f<0x3?_0x5a7d60:_0x586cd7===null?_0x586cd7=Object[_0x3a0f47(0x44e)](_0x5a7d60,_0x2d9d6e):_0x586cd7,_0x4e0b7f;if(typeof Reflect=='object'&&typeof Reflect[_0x3a0f47(0x3c6)]==_0x3a0f47(0x1bd))_0x305b81=Reflect['decorate'](_0x4c1dc5,_0x5a7d60,_0x2d9d6e,_0x586cd7);else{for(var _0x3cec4e=_0x4c1dc5[_0x3a0f47(0x2b3)]-0x1;_0x3cec4e>=0x0;_0x3cec4e--)(_0x4e0b7f=_0x4c1dc5[_0x3cec4e])&&(_0x305b81=(_0x18dc8f<0x3?_0x4e0b7f(_0x305b81):_0x18dc8f>0x3?_0x4e0b7f(_0x5a7d60,_0x2d9d6e,_0x305b81):_0x4e0b7f(_0x5a7d60,_0x2d9d6e))||_0x305b81);}return _0x18dc8f>0x3&&_0x305b81&&Object[_0x3a0f47(0x3b7)](_0x5a7d60,_0x2d9d6e,_0x305b81),_0x305b81;}let b=class extends t[_0x1abb79(0x378)]{constructor(_0x267b8f,_0x4fbe92){const _0x28556e=_0x1abb79;super(),this[_0x28556e(0x489)]=_0x267b8f,this['_userManagerService']=_0x4fbe92,g(this,_0x28556e(0x329),new Map()),g(this,_0x28556e(0x468),new i['Subject']()),this[_0x28556e(0x2d3)]((0x0,i[_0x28556e(0x295)])(this[_0x28556e(0x489)][_0x28556e(0x292)](t[_0x28556e(0x3b9)]['UNIVER_SHEET'])[_0x28556e(0x3a1)]((0x0,s['map'])(_0x2dfec4=>_0x2dfec4['getUnitId']())),this[_0x28556e(0x489)][_0x28556e(0x292)](t[_0x28556e(0x3b9)][_0x28556e(0x3d3)])[_0x28556e(0x3a1)]((0x0,s[_0x28556e(0x41d)])(_0x54fce4=>_0x54fce4[_0x28556e(0x261)]())))[_0x28556e(0x2ed)](_0x3d2296=>this[_0x28556e(0x263)](_0x3d2296)));}['waitForRoom$'](_0x2c03a8){const _0x1f1148=_0x1abb79;return this[_0x1f1148(0x329)][_0x1f1148(0x38d)](_0x2c03a8)?(0x0,i['of'])(this[_0x1f1148(0x329)]['get'](_0x2c03a8)):this[_0x1f1148(0x468)][_0x1f1148(0x3a1)]((0x0,s[_0x1f1148(0x41d)])(_0x8b5069=>{const _0x19a982=_0x1f1148;if(_0x8b5069===_0x2c03a8)return this[_0x19a982(0x329)][_0x19a982(0x277)](_0x8b5069);}));}[_0x1abb79(0x30c)](_0x1105fe){const _0x15169f=_0x1abb79;this['_userManagerService'][_0x15169f(0x30c)](_0x1105fe);}[_0x1abb79(0x312)](){const _0xdfffcf=_0x1abb79;return this[_0xdfffcf(0x3b2)][_0xdfffcf(0x312)]();}[_0x1abb79(0x40e)](_0x54a89c,_0x18108c){const _0x1b4c22=_0x1abb79;let _0x523219=this['_roomMembers'][_0x1b4c22(0x277)](_0x54a89c);_0x523219||(_0x523219=new ae(),this[_0x1b4c22(0x329)][_0x1b4c22(0x35b)](_0x54a89c,_0x523219),this[_0x1b4c22(0x468)]['next'](_0x54a89c)),_0x523219[_0x1b4c22(0x40e)](_0x18108c);}[_0x1abb79(0x26c)](_0x4667c2,_0x319787){const _0x5d504e=_0x1abb79;let _0xe8e458=this['_roomMembers'][_0x5d504e(0x277)](_0x4667c2);_0xe8e458&&_0xe8e458[_0x5d504e(0x26c)](_0x319787);}[_0x1abb79(0x3e2)](_0x689a84){const _0xa8598f=_0x1abb79;return this[_0xa8598f(0x329)][_0xa8598f(0x277)](_0x689a84);}['getMember'](_0xc56c0f,_0x5b6e3d){const _0x5cb718=_0x1abb79;let _0x162716=this[_0x5cb718(0x329)]['get'](_0xc56c0f);if(_0x162716)return _0x162716[_0x5cb718(0x385)](_0x5b6e3d);}['_removeRoom'](_0x3daf22){const _0x307e9d=_0x1abb79;let _0x2da9db=this[_0x307e9d(0x329)][_0x307e9d(0x277)](_0x3daf22);_0x2da9db&&(_0x2da9db['dispose'](),this[_0x307e9d(0x329)]['delete'](_0x3daf22));}[_0x1abb79(0x370)](){const _0x3e2ba8=_0x1abb79;this[_0x3e2ba8(0x329)][_0x3e2ba8(0x222)](_0x101aa5=>_0x101aa5['dispose']()),this['_roomMembers']['clear'](),this['_roomCreated$'][_0x3e2ba8(0x23c)]();}};b=y([v(0x0,t['IUniverInstanceService']),v(0x1,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x23f)]))],b);var ae=class extends t[_0x1abb79(0x378)]{constructor(..._0xf6a072){const _0x99969d=_0x1abb79;super(..._0xf6a072),g(this,_0x99969d(0x282),new Map()),g(this,_0x99969d(0x2bd),new i['BehaviorSubject'](this[_0x99969d(0x282)])),g(this,_0x99969d(0x423),this[_0x99969d(0x2bd)]['asObservable']());}[_0x1abb79(0x370)](){const _0x230d98=_0x1abb79;this[_0x230d98(0x282)]['clear'](),this[_0x230d98(0x2bd)][_0x230d98(0x23c)]();}['updateMember'](_0x107817){const _0x85ceab=_0x1abb79;this[_0x85ceab(0x282)][_0x85ceab(0x35b)](_0x107817[_0x85ceab(0x1fd)],_0x107817),this[_0x85ceab(0x1ea)]();}[_0x1abb79(0x26c)](_0x13a8be){const _0x46963a=_0x1abb79;this[_0x46963a(0x282)][_0x46963a(0x3a3)](_0x13a8be),this['_emitMembers']();}[_0x1abb79(0x385)](_0x463d78){const _0x4aba6b=_0x1abb79;return this['_members'][_0x4aba6b(0x277)](_0x463d78);}[_0x1abb79(0x2fc)](){const _0x5cff22=_0x1abb79;return Array['from'](this['_members'][_0x5cff22(0x1c1)]());}[_0x1abb79(0x1ea)](){const _0x4aa835=_0x1abb79;this[_0x4aa835(0x2bd)]['next'](this['_members']);}};let oe=function(_0x1a92af){const _0x33d8ad=_0x1abb79;return _0x1a92af[_0x1a92af[_0x33d8ad(0x202)]=0x0]=_0x33d8ad(0x202),_0x1a92af[_0x1a92af[_0x33d8ad(0x32c)]=0x1]='JOINING',_0x1a92af[_0x1a92af[_0x33d8ad(0x3d4)]=0x2]=_0x33d8ad(0x3d4),_0x1a92af[_0x1a92af['ONLINE']=0x3]='ONLINE',_0x1a92af;}({});const se={[a['CmdRspCode'][_0x1abb79(0x2b7)]]:_0x1abb79(0x3a6),[a[_0x1abb79(0x47a)][_0x1abb79(0x272)]]:_0x1abb79(0x36d),[a['CmdRspCode'][_0x1abb79(0x2bb)]]:'session.room-not-exists',[a[_0x1abb79(0x47a)][_0x1abb79(0x376)]]:'session.room-permission-denied',[a[_0x1abb79(0x47a)]['GLOBAL_ROOMS_CNT_EXCEEDS']]:_0x1abb79(0x34b)};let x=class extends t['RxDisposable']{get[_0x1abb79(0x1e8)](){const _0x4231d2=_0x1abb79;return this[_0x4231d2(0x3f5)][_0x4231d2(0x3b6)]();}constructor(_0x3c6dff,_0x4ce702,_0x48fe1f,_0xbbc2f9,_0x37e221,_0x57914b,_0x54f0d3,_0x28c1a1){const _0x48b81f=_0x1abb79;super(),this[_0x48b81f(0x3ec)]=_0x3c6dff,this[_0x48b81f(0x204)]=_0x48fe1f,this[_0x48b81f(0x1c0)]=_0xbbc2f9,this[_0x48b81f(0x21b)]=_0x37e221,this[_0x48b81f(0x48f)]=_0x57914b,this[_0x48b81f(0x420)]=_0x54f0d3,this[_0x48b81f(0x3a4)]=_0x28c1a1,g(this,_0x48b81f(0x3f5),new i['BehaviorSubject'](0x0)),g(this,_0x48b81f(0x3c0),this[_0x48b81f(0x3f5)]['asObservable']()),g(this,'_event$',new i[(_0x48b81f(0x3b3))]()),g(this,_0x48b81f(0x36b),this['_event$'][_0x48b81f(0x234)]()),g(this,'_socket',void 0x0),g(this,_0x48b81f(0x1e6),void 0x0),g(this,_0x48b81f(0x27e),void 0x0),g(this,_0x48b81f(0x1f0),!0x1),g(this,_0x48b81f(0x27c),null),this[_0x48b81f(0x1f0)]=!!this[_0x48b81f(0x3a4)],_0x4ce702['pipe']((0x0,i[_0x48b81f(0x299)])(this[_0x48b81f(0x3ba)]))[_0x48b81f(0x2ed)](_0x33efc8=>{const _0x491c4d=_0x48b81f;if(_0x33efc8!==void 0x0){if(this[_0x491c4d(0x1c4)]=_0x33efc8,_0x33efc8)this[_0x491c4d(0x2f9)](_0x33efc8),this[_0x491c4d(0x1e6)]=_0x33efc8[_0x491c4d(0x273)][_0x491c4d(0x2ed)](_0x7e1fbb=>{const _0x55b0a=_0x491c4d;_0x7e1fbb[_0x55b0a(0x459)]===this[_0x55b0a(0x3ec)]&&this[_0x55b0a(0x3f4)](_0x7e1fbb);});else{var _0x39c139;this[_0x491c4d(0x30a)](),this[_0x491c4d(0x3f5)][_0x491c4d(0x343)](0x2),(_0x39c139=this[_0x491c4d(0x1e6)])==null||_0x39c139[_0x491c4d(0x1db)](),this['_socketMessageSubscription']=null;}}});}[_0x1abb79(0x358)](){const _0x5162fb=_0x1abb79;var _0x7c579d,_0x414822;return(_0x7c579d=(_0x414822=this[_0x5162fb(0x1c4)])==null?void 0x0:_0x414822[_0x5162fb(0x1fd)])==null?null:_0x7c579d;}['dispose'](){const _0x2f28cd=_0x1abb79;super[_0x2f28cd(0x370)](),this[_0x2f28cd(0x28b)](),this[_0x2f28cd(0x3ba)][_0x2f28cd(0x343)](),this[_0x2f28cd(0x3ba)][_0x2f28cd(0x23c)]();}[_0x1abb79(0x28b)](){const _0x3be631=_0x1abb79;var _0xc58266,_0x61434c;this[_0x3be631(0x30a)](),(_0xc58266=this[_0x3be631(0x1c4)])==null||_0xc58266[_0x3be631(0x357)]({'cmd':a['CombCmd'][_0x3be631(0x390)],'data':{'roomID':this['_unitID']}}),(_0x61434c=this[_0x3be631(0x1c4)])==null||_0x61434c[_0x3be631(0x28b)](),this[_0x3be631(0x45c)]['complete'](),this[_0x3be631(0x3f5)][_0x3be631(0x23c)]();}[_0x1abb79(0x3f4)](_0xf73844){const _0x49b4f8=_0x1abb79;_0xf73844['cmd']===a[_0x49b4f8(0x279)][_0x49b4f8(0x1c2)]?this[_0x49b4f8(0x3ae)](_0xf73844):_0xf73844[_0x49b4f8(0x2d2)]===a['CombCmd'][_0x49b4f8(0x3e7)]&&this[_0x49b4f8(0x29e)](_0xf73844);}[_0x1abb79(0x2f9)](_0x9be95e){const _0x2a53a9=_0x1abb79;this[_0x2a53a9(0x3f5)][_0x2a53a9(0x343)](0x1),_0x9be95e[_0x2a53a9(0x357)]({'cmd':a[_0x2a53a9(0x279)][_0x2a53a9(0x1c2)],'routeKey':this[_0x2a53a9(0x3ec)],'routeType':'','data':{'rooms':[{'roomID':this[_0x2a53a9(0x3ec)]}]}});}[_0x1abb79(0x3ae)](_0x14c0af){const _0xc76666=_0x1abb79;var _0x2f8f9d;if(_0x14c0af[_0xc76666(0x485)]in se){this[_0xc76666(0x420)][_0xc76666(0x1f5)]({'id':_0xc76666(0x200),'data':se[_0x14c0af['code']]}),this[_0xc76666(0x3f5)][_0xc76666(0x343)](0x2);return;}this[_0xc76666(0x3f5)][_0xc76666(0x343)](0x3);let _0x39e4b8=(_0x2f8f9d=_0x14c0af[_0xc76666(0x471)][_0xc76666(0x480)][this['_unitID']])==null?void 0x0:_0x2f8f9d[_0xc76666(0x3e5)];_0x39e4b8&&_0x39e4b8[_0xc76666(0x222)](_0x3d6c56=>this[_0xc76666(0x21b)][_0xc76666(0x40e)](this['_unitID'],_0x3d6c56));}[_0x1abb79(0x29e)](_0x283e5a){const _0x1b29b3=_0x1abb79;try{let _0xb1e98a=_0x283e5a[_0x1b29b3(0x471)];switch(_0xb1e98a[_0x1b29b3(0x20b)]){case e[_0x1b29b3(0x380)][_0x1b29b3(0x3be)]:this[_0x1b29b3(0x1e4)](_0xb1e98a),this[_0x1b29b3(0x45c)][_0x1b29b3(0x343)](_0xb1e98a);break;case e[_0x1b29b3(0x380)]['USERS_LEAVE']:this[_0x1b29b3(0x398)](_0xb1e98a),this[_0x1b29b3(0x45c)][_0x1b29b3(0x343)](_0xb1e98a);break;case e[_0x1b29b3(0x380)]['CHANGESET_ACK']:case e[_0x1b29b3(0x380)][_0x1b29b3(0x2d1)]:this[_0x1b29b3(0x211)](),this[_0x1b29b3(0x3d0)](),this['_event$'][_0x1b29b3(0x343)](_0xb1e98a);break;case e[_0x1b29b3(0x380)]['MSG_FOR_ERROR']:this['_logService'][_0x1b29b3(0x1ec)](_0x1b29b3(0x33b)+JSON[_0x1b29b3(0x20e)](_0xb1e98a)),this[_0x1b29b3(0x45c)][_0x1b29b3(0x343)](_0xb1e98a);break;case e[_0x1b29b3(0x380)][_0x1b29b3(0x46d)]:this[_0x1b29b3(0x48f)][_0x1b29b3(0x48b)](_0xb1e98a[_0x1b29b3(0x471)]),this[_0x1b29b3(0x45c)][_0x1b29b3(0x343)](_0xb1e98a);break;default:this[_0x1b29b3(0x45c)]['next'](_0xb1e98a);}}catch(_0xf4ba59){this[_0x1b29b3(0x204)]['error'](_0xf4ba59,_0x283e5a);}}[_0x1abb79(0x1e4)](_0x315a2c){const _0x4d22ed=_0x1abb79;this[_0x4d22ed(0x21b)][_0x4d22ed(0x40e)](this[_0x4d22ed(0x3ec)],_0x315a2c['data']);}[_0x1abb79(0x398)](_0x215eb6){const _0x2730dd=_0x1abb79;this[_0x2730dd(0x21b)][_0x2730dd(0x26c)](this['_unitID'],_0x215eb6[_0x2730dd(0x471)][_0x2730dd(0x1fd)]);}async[_0x1abb79(0x357)](_0x59f386,_0x147855){const _0x1b8de9=_0x1abb79;if(this[_0x1b8de9(0x1e8)]!==0x3||!this['_socket'])throw Error(_0x1b8de9(0x31b));try{_0x59f386[_0x1b8de9(0x20b)]===e[_0x1b8de9(0x380)][_0x1b8de9(0x3e6)]&&(this[_0x1b8de9(0x45f)](),this[_0x1b8de9(0x455)](_0x59f386)),this[_0x1b8de9(0x1c4)]['send']({'cmd':a['CombCmd'][_0x1b8de9(0x37e)],'routeKey':_0x147855,'routeType':'','data':_0x59f386});}catch(_0x4dfd98){this[_0x1b8de9(0x204)][_0x1b8de9(0x1ec)](_0x4dfd98);}}['_scheduleCollaborationTimeoutTimer'](){const _0x2f8799=_0x1abb79;var _0x497b22;this[_0x2f8799(0x27e)]=setTimeout(()=>{const _0x3ab1a3=_0x2f8799;this['_collaborationTimeoutTimer']=null,this[_0x3ab1a3(0x420)][_0x3ab1a3(0x1f5)]({'id':_0x3ab1a3(0x217)});},(_0x497b22=this[_0x2f8799(0x1c0)][_0x2f8799(0x300)]('HEARTBEAT_TIMEOUT'))==null?m:_0x497b22);}[_0x1abb79(0x3d0)](){const _0x12dec3=_0x1abb79;this['_collaborationTimeoutTimer']&&(clearTimeout(this[_0x12dec3(0x27e)]),this['_collaborationTimeoutTimer']=null);}['_startTelemetryCollaborationNewChangeset'](_0x215eec){const _0x51908e=_0x1abb79;if(!this['_shouldReportTelemetry'])return;let {data:_0x68c2dc}=_0x215eec,{unitID:_0x2405b3,changeset:_0x66d7e4}=_0x68c2dc,{mutations:_0x324e31,type:_0x57dd70}=_0x66d7e4;this['_telemetryInfo']={'unitId':_0x2405b3,'type':_0x57dd70,'startTime':performance[_0x51908e(0x25e)](),'stopTime':0x0,'duration':0x0,'size':ee(_0x324e31)};}['_stopTelemetryCollaborationNewChangeset'](){const _0x5d53c8=_0x1abb79;if(this['_shouldReportTelemetry']){if(!this[_0x5d53c8(0x27c)]){this[_0x5d53c8(0x204)][_0x5d53c8(0x1ec)]('[CollaborationSession]',_0x5d53c8(0x1e2));return;}this[_0x5d53c8(0x27c)][_0x5d53c8(0x3d9)]=performance[_0x5d53c8(0x25e)](),this['_telemetryInfo']['duration']=this[_0x5d53c8(0x27c)][_0x5d53c8(0x3d9)]-this[_0x5d53c8(0x27c)][_0x5d53c8(0x402)],this[_0x5d53c8(0x3a4)][_0x5d53c8(0x1f8)](_0x5d53c8(0x2ae),this[_0x5d53c8(0x27c)]),this['_telemetryInfo']=null;}}['_throwTelemetryCollaborationNewChangeset'](){const _0x44e480=_0x1abb79;this[_0x44e480(0x27c)]=null;}};x=y([v(0x2,t[_0x1abb79(0x22c)]),v(0x3,t[_0x1abb79(0x2b4)]),v(0x4,(0x0,t[_0x1abb79(0x3cc)])(b)),v(0x5,(0x0,t[_0x1abb79(0x3cc)])(ie)),v(0x6,(0x0,t[_0x1abb79(0x3cc)])(_)),v(0x7,(0x0,t[_0x1abb79(0x323)])(o[_0x1abb79(0x339)]))],x);const S=(0x0,t[_0x1abb79(0x205)])(_0x1abb79(0x281));function _0x4130(){const _0x446c03=['put','_unitID','push','9042310PJFQqs','_undoStacks','commentUpdateEvent','_transformStateCache','[CollaborationSessionService]','getTime','_onCombEvent','_sessionStatus$','c1Prime','HEARTBEAT_TIMEOUT','@univerjs-pro/collaboration-client','online$','[CollaborationState]:\x20apply\x20error!','getCurrentRevOfUnit','_resendWithTimeout','reconnect','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','CollaborationSession','uploadFileServerUrl','href','startTime','csAckEvent','_acknowledgedAwaitingRevision','_instanceService','collaboration-client.auth.needGotoLoginAlert','_revisionService','getLocalCacheKey','NO_OTHER_CLIENTS_EDITING','OfflineState','deepClone','SUCCUSS','PSEUDO_FETCH_MISSING_RESULT','updateMember','_queuedRemoteChangesets','120626efsTls','transformMutationsWithChangeset','People','_createSocket','COMPRESS_MUTATION_SEND','FETCH_MISS','open$','getCollabEntity','JSONX','loadOfflineData','IAuthzIoService','/universer-api/stream/file/upload','entityInit$','map','sheets','onTransformSelections','_collaborationUIEventService','_initDependencies','HTTPService','members$','CollaborationController','685971ofsGgk','ICommandService','createInstance','BehaviorSubject','CommandType','_singleActiveUnitService','subUnitId','HEARTBEAT_TIMEOUT_KEY','IUndoRedoService','deserializeToCombResponse','onTransformIME','withCredentials','toDisposable','updateCollaborator','fromCharCode','init','_imageSourceCache','onStateChange','_initCloseConn','localCacheService','firstValueFrom','IImageIoService','_collaborationPaused','_submitChangeset','getInterceptPoints','LIVESHARE_OPERATION','_eventService','onMissedChangesetFetched','_startCollaboration','cfgEnableObjInherit','awaitingChangeset','\x20in\x20_schedule.','revision','_handleRemoteChangesets','_localeService','onRemoteChangeset','BASE64','_isEchoedAwaitingChangeset','change$','HELLO','loadSheet','getOwnPropertyDescriptor','getTypeOfUnitAdded$','addHandlerCallback','_rescheduleHeartbeat','_onConnectionOpen','_createInitialState','putCollaborators','_startTelemetryCollaborationNewChangeset','initWorkbookPermissionChange','&assign=','resourceIDs','routeKey','/universer-api/file/{fileID}/sign-url','UNIVER_SHEET','_event$','UniverCollaborationPlugin','univer-pro.collaboration-client.network-condition.service','_scheduleCollaborationTimeoutTimer','OPTIONAL','getSheetBlock','/object/','_collaborationSessionService','RxDisposable','CLOSE_ROOM','[CollaborationSession]','&source=','_roomCreated$','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','AWAITING','SNAPSHOT_URL_KEY','append','COMMENT_UPDATE','DRAWING_IMAGE_ALLOW_IMAGE_LIST','SheetsSelectionsService','_httpService','data','LIVESHARE_REQUEST_HOST','updateOfflineData','max','_getUploadFileURL','ConflictState','loadUnitOfRevision','[PendingState]:\x20received\x20acknowledgement.','_snapshotServerService','CmdRspCode','CollaborationUIEventService','/new_changes','min','_onRemoteRetry','editing\x20status\x20changed\x20to','roomInfos','_clearLocalCache','method','_onFetchMissResult','compose','code','NEW_CHANGESETS','pluginName','_getDownloadEndpointURL','_univerInstanceService','failed\x20to\x20apply\x20missed\x20changesets!','onCommentUpdate','sid','UnitEmbedded','objectActions','_commentService','debug','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','MentionType','listCollaborators','_tryEnsureSocket','closeSession','ERROR_IMAGE','6yAqVox','type','POST','parseChangesetToProtocol','_changesetReqId','socketService','generateRandomId','CHANGESET_REJ','encode','incrementRevOfUnit','_getAPIPrefix','_sender','OTHER_CLIENT_EDITING','_updateState','getGlobalObject','rev','function','{fileID}','_getSignURL','_configService','values','JOIN','CompressMutationService','_socket','_entities','update','roles','_toggleOffline','_localCacheService','requestParams','/universer-api/snapshot/','UNISCRIPT_RUN','origin','setShowComponents','_transformStack','headers','_onConflict','getUnitOnRev','parse','text-x','Injector','_transformIMECache','_candidateSocket','_snapshotService','/rev/','_transformUndoredo','unsubscribe','create','updateSnapshot','_decreaseWaiting','_clearRedo','onTransformRemoteChangesetByStateCache','_unitInfo$','telemetry\x20info\x20is\x20not\x20initialized','MSG_FOR_ERROR','_onUserJoin','AwaitingWithPendingState','_socketMessageSubscription','ImageUploadStatusType','sessionStatus','LIVESHARE_NEW_HOST','_emitMembers','/block/','error','readyForCollab','Failed\x20to\x20update\x20permission\x20point','Module','_shouldReportTelemetry','UPDATE_CURSOR','_transformAndApplyRemoteChangeset','ThresholdInterceptorFactory','FileId','emitEvent','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','loadUnit','capture','__Key__','DEFAULT_COLLAB_WEB_SOCKET_URL','_timeoutTimer','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','memberID','2648004XRJaOf','LocalUndoRedoService','JOIN_ROOM_FAILED','patch','IDLE','default','_logService','createIdentifier','[DataLoaderService]','_substituteRedoStack','[OfflineState]:\x20received\x20rejection.','WorkbookEditablePermission','onRemoteRetry','eventID','LocaleService','_initRequestHeader','stringify','_transformService','collaboration-client.config','_stopTelemetryCollaborationNewChangeset','appendMutation','MemberService','onload','every','_init','SUBMIT_CHANGESET_TIMEOUT','_getRedoStack','csRejEvent','ws://127.0.0.1:8000/universer-api/comb/connect','_memberService','Error\x20on\x20receiving\x20event','MergeInterceptorFactory','mergeOverrideWithDependencies','/-/object/-/batch_allowed','_unlockTransition','collaborators','forEach','object','PERMISSION_REJ','ICollaborationSocketService','SyncedState','prototype','isArray','result','size','originalMeta','ILogService','_waitForHeartbeatResponse','getImageSourceCache','_onConnectionFailed','body','allowed','_socketReady','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','asObservable','commentUpdate$','status$','ILocalCacheService','LIVESHARE_TERMINATE','IContextService','[FetchMissState]','DataLoaderService','complete','ISnapshotServerService','22035TVgBcK','UserManagerService','getDrawingImageAllowSize','submit\x20changeset\x20error!','_clearRetryConnectingTimer','joinRsp','_permissionService','not_collab','_networkConditionService','equals','/universer-api/uniscript','offline','_incrementRevisionNumber','saveImage','HEARTBEAT_INTERVAL','AwaitingState','collaboratorID','8457624PvbMTM','utf8ToBytes','fetchMissingChangesets','onTransformState','executeCommand','touchDependencies','textEncoder','conflict','status','onSyncEditingCollabCursor','_tryReconnect','_compressMutationService','UniverNetworkPlugin','call','actions','now','_clearHeartbeatTimer','\x20-\x20','getUnitId','shouldCloseConn','_removeRoom','constructor','unknown','_sendHeartbeat','range','ISocketService','_disableEditing','_status$','INetworkConditionService','removeMember','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','_doCreateSocket','updateCursorEvent','workbook','USERS_LEAVE','JOIN_ROOM_FULL','message$','[PendingState]:\x20unhandled\x20univer\x20type:\x20','_resendTimer','resend','get','_transformRemoteChangesetByIMECache','CombCmd','toggleOnline','_onRemoteRejected','_telemetryInfo','enableOfflineEditing','_collaborationTimeoutTimer','onTransformRemoteChangesetByIMECache','connection\x20error','collaboration-client.local-cache-service','_members','onRemoteAck','ERROR_EXCEED_SIZE','_applyRemoteChangeset','ReplaySubject','FetchingMissState','collaMsg','entries','\x20to\x20','close','reqId','_lockTransition','toStringTag','[SyncedState]:\x20received\x20rejection.','reverse','_scheduleCompleteTimestamp','getTypeOfUnitDisposed$','file','delay','merge','socket$','_transformRemoteChangesetByStateCache','string','takeUntil','_handlerCallback','name','title','_schedule','_onRecvEvent','error$','_state','getFocusedUnit','_commandService','AWAITING_WITH_PENDING','\x0aCurrent:\x20','_checkMissing','listRoles','/universer-api/comb','_retryCount','COMPRESS_MUTATION_APPLY','enableCollaboration','_onOffline','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','IPermissionService','collaboration_new_changeset','_change$','collabSubmitChangesetUrl','onMutationExecutedForCollab','RevisionService','length','IConfigService','confirm','_config','FAIL','localeService','_maxTotalRetryTimeout','CollaborationSocketService','JOIN_ROOM_NOT_EXISTS','add','_members$','updatePermissionPoint','then','DisposableCollection','changesets','CommentService','isTransformMutationsWithChangesetFailure','registerHTTPInterceptor','_replaceFileID','userID','_getSendChangesetTimeout','DEFAULT_WS_SESSION_TICKET_URL','CollaborativeUndoRedoService','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','RichTextEditingMutation','/role','getCollabEntity$','getUnitType','_entityInit$','action','CHANGESET_SHOULD_RETRY','cmd','disposeWithMe','LIVESHARE_FETCH_OPERATIONS','onMissingChangesets','PERSON','_transitionLocked','_handler','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','HEARTBEAT_INTERVAL_KEY','_waitCount','params','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','getUnit','getImage','batchAllowed','_toggleOnline','_sendingTimer','isTransformMutationsWithChangesetSuccess','CHANGESET_ACK','&to=','_retryConnectingTimer','_executeRemoteChangeset','CollaborationStatus','encodeURIComponent','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','find','SHOULD_CLOSE_CONN','subscribe','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','createSocket','objectType','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','mutations','MentionIoHttpService','2730693oRDtCS','HEARTBEAT','catch','ITransformService','FETCH_MISSING','_joinRoom','_initUnitPermissionChange','registerDependencies','getAllMembers','src','symbol','EmptyMutationInfo','getConfig','_injector','onLocalMutation','synced','_acknowledgeAwaiting','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','newCsEvent','_pendingMutations','_initMergeInterceptor','_showConflictNotification','_throwTelemetryCollaborationNewChangeset','iterator','setCurrentUser','[UniverCollaborationClientPlugin]','_cfgEnableObjInherit','session','HTTPRequest','_state$','getCurrentUser','focused$','_collabSessionService','_sheetTransformSelectionsService','_isPermissionRej','__splitChunk__','_HTTPService','hostname','IUniverInstanceService','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','_onRemoteACK','sequenceExecute','SOCKET_FAILED','liveShareOperation','UnitStatus','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','x-univer-host','Optional','onSendChangeset','_onRemoteChangeset','DocCollaborationEntity','parseProtocolChangeset','socket\x20close','_roomMembers','/resources','take','JOINING','concatBytes','DependentOn','_getLoginPath','[CollaborationUndoRedoService]','subject','InsertSheetMutation','SheetTransformSelectionsService','toggleOffline','transformUndoRedo','_syncEditingCollabCursor','_redoStacks','unit','ITelemetryService','getLatestCsReqIdBySid','save\x20fail\x20reason\x20is\x20','authzUrl','getWorkbookSelections','fetching\x20missing\x20changesets\x20from\x20','LOCAL_CACHE_INTERVAL','UNIVER_COLLABORATION_CLIENT_PLUGIN','OTHER_CLIENTS_EDITING','/collaborator','next','concatMap','_changesetSessionId','_clearScheduledTask','_getCtorByUniverInstanceType','setConfig','avatar','_exhaustRemoteChangesetQueue','session.room-cnt-exceeds','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','awaiting_with_pending','some','m2Prime','awaiting','4GzGDBl','_socket$','138rMZjKJ','_undoRedoService','unitId','_getAPIPrefixPath','send','getMemberID','getUnitStatus$','SOCKET_FAILED_RETRY','set','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','_registerDependencies','_substituteUndoStack','interceptor','MUTATION','reject','isTransformChangesetsSuccess','_onLocalMutation','setCfgEnableObjInherit','\x0aAfter:\x20','isInternalEditorID','getSheetId','[PendingState]:\x20received\x20rejection.','CONFLICT','_updateStatus','event$','transformSelections','session.room-full','UUID','pauseCollaboration','dispose','/universer-api/authz','ImageSourceType','unit-cache-','0.25.2','number','JOIN_ROOM_PERMISSION_DENIED','RETRY_CONNECTING_MAX_COUNT','Disposable','_sessions','_createInitialStateImpl','onRemoteRej','UniverCollaborationClientPlugin','startsWith','INGEST','filter','CollaborationEvent','_listenToNetworkCondition','enableAuthServer','unitID','charCodeAt','getMember','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','objectID','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','url','onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.','getResourcesRequest','_clearTimeoutTimer','has','indexOf','FileSource','LEAVE','Plugin','selections','packageName','_remoteChangesetQueue','resolve','getCfgEnableObjInherit','IMentionIOService','_onUserLeave','slice','findIndex','transformChangesets','/-/object/list','serializeCombRequest','[CollaborationSessionService]:\x20socket\x20error','textRanges','location','pipe','retryConnectingInterval','delete','_telemetryService','_awaitingChangeset','session.join-failed','missingChangesets','_createHandler','includes','clear','[CollaborationEntity]','/allowed','transformStack\x20failed!','_onJoinRoomEvent','_onMessage','Quantity','LOCAL_CACHE_INTERVAL_KEY','_userManagerService','Subject','copyFileMeta','baseRev','getValue','defineProperty','post','UniverInstanceType','dispose$','isPermissionRej','_transformSelections','ISingleActiveUnitService','USERS_ENTER','_type','sessionStatus$','requireSession','cbc','target','_resendTimeout','_updateLocalCache','decorate','_socketService','PERMISSION_DENIED','univer-pro.collaboration-client-socket-service','_clearUndo','leaveEvent','Inject','_sendHeartbeatTimer','SetSelectionsOperation','unitInfo$','_clearCollaborationTimeoutTimer','_getUndoStack','state','UNIVER_DOC','OFFLINE','PendingState','saveSheetBlock','resolveWithBasePath','/unit/','stopTime','liveShareNewHost','infoRsp','fetchThroughInterceptors','Univer','b64DecodeUnicode','UPDATE_PERMISSION_OBJ','enableSingleActiveInstanceLock','createCollaborator','getRoom','mapDocumentTypeToUniverInstanceType','_getCurrentRevision','members','SUBMIT_CHANGESET','RECV','_acknowledgeAwaitingIfReady','[SyncedState]:\x20received\x20acknowledgement.','permissionRejEvent'];_0x4130=function(){return _0x446c03;};return _0x4130();}function ce(_0x4a38c3){const _0x54d3ba=_0x1abb79;return _0x54d3ba(0x373)+_0x4a38c3;}function le(_0x15bc29){const _0x367c9c=_0x1abb79;let {unitID:_0x23f72c,mutations:_0x33c5be}=_0x15bc29;return{'unitId':_0x23f72c,'subUnitId':_0x33c5be[_0x367c9c(0x2b3)]>0x0?_0x33c5be[0x0][_0x367c9c(0x2dc)][_0x367c9c(0x42b)]:null};}let C=class{constructor(_0x3166d4,_0x1cf584,_0x259cdc){const _0x3b1b81=_0x1abb79;this[_0x3b1b81(0x301)]=_0x3166d4,this['_transformService']=_0x1cf584,this['_instanceService']=_0x259cdc;}[_0x1abb79(0x36c)](_0x5d3452){const _0xc928b2=_0x1abb79;var _0x55e7a3,_0xf45563;let _0x19ff63=this[_0xc928b2(0x301)]['get'](r[_0xc928b2(0x46f)]),{unitId:_0x13e19f,subUnitId:_0x2701ed}=le(_0x5d3452),_0x2b3611=_0x19ff63==null?void 0x0:_0x19ff63[_0xc928b2(0x33d)](_0x13e19f)['getCurrentSelections'](),_0x54f268=(_0x55e7a3=this[_0xc928b2(0x405)][_0xc928b2(0x2de)](_0x13e19f))==null||(_0x55e7a3=_0x55e7a3['getActiveSheet']())==null?void 0x0:_0x55e7a3[_0xc928b2(0x367)]();if(_0x2b3611[_0xc928b2(0x2b3)]===0x0||!_0x13e19f||!_0x2701ed)return;let _0x1d1a95=[{'id':r[_0xc928b2(0x3ce)]['id'],'params':{'unitId':_0x13e19f,'subUnitId':_0x54f268,'selections':t['Tools'][_0xc928b2(0x40b)](_0x2b3611)}}],_0x471b40=this[_0xc928b2(0x20f)]['transformMutationsWithChangeset'](_0x5d3452,_0x1d1a95);if(!(0x0,e[_0xc928b2(0x2e3)])(_0x471b40))throw _0x471b40[_0xc928b2(0x1ec)];let _0x380a5a=(_0xf45563=_0x471b40[_0xc928b2(0x34f)][0x0])==null||(_0xf45563=_0xf45563['params'])==null?void 0x0:_0xf45563['selections'];if(Array[_0xc928b2(0x228)](_0x380a5a)&&_0x380a5a[_0xc928b2(0x2b3)]){if(_0x380a5a[_0xc928b2(0x2b3)]===_0x1d1a95[0x0]['params']['selections']['length']&&_0x380a5a[_0xc928b2(0x215)]((_0x5bca93,_0x5b830f)=>t['Rectangle'][_0xc928b2(0x247)](_0x5bca93[_0xc928b2(0x267)],_0x1d1a95[0x0]['params'][_0xc928b2(0x392)][_0x5b830f][_0xc928b2(0x267)])))return;this['_injector'][_0xc928b2(0x277)](t[_0xc928b2(0x426)])[_0xc928b2(0x253)](r['SetSelectionsOperation']['id'],{'unitId':_0x13e19f,'subUnitId':_0x54f268,'selections':_0x380a5a});}}};C=y([v(0x0,(0x0,t['Inject'])(t[_0x1abb79(0x1d5)])),v(0x1,e[_0x1abb79(0x2f7)]),v(0x2,t['IUniverInstanceService'])],C);const w=(0x0,t[_0x1abb79(0x205)])('univer-pro.collaboration-client.single-active-unit-service');let ue=function(_0x2f9f9f){const _0x22812b=_0x1abb79;return _0x2f9f9f[_0x2f9f9f[_0x22812b(0x409)]=0x0]='NO_OTHER_CLIENTS_EDITING',_0x2f9f9f[_0x2f9f9f['OTHER_CLIENTS_EDITING']=0x1]=_0x22812b(0x341),_0x2f9f9f;}({});const T=_0x1abb79(0x210),de={};function fe(_0x5733dd){const _0x4d221f=_0x1abb79;var _0x179ea2;return!!((_0x179ea2=_0x5733dd[_0x4d221f(0x2dc)])!=null&&_0x179ea2[_0x4d221f(0x317)]);}const pe=new Set([r[_0x1abb79(0x332)]['id']]);function me(_0x48eec8,_0x5928e5,_0x89a0dd,_0x47a33a,_0x3cf21c){const _0x373d45=_0x1abb79;var _0x51ed3f,_0x25d5dd,_0x40df95,_0x291a0a;let _0x4d1c1b=[];for(let _0x192d3d of _0x48eec8){if(pe[_0x373d45(0x38d)](_0x192d3d['id'])){if(_0x4d1c1b[_0x373d45(0x2b3)]>0x0)break;_0x4d1c1b[_0x373d45(0x3ed)](_0x192d3d);break;}if(fe(_0x192d3d)){if(_0x4d1c1b[_0x373d45(0x2b3)]>0x0)break;_0x4d1c1b[_0x373d45(0x3ed)](_0x192d3d);break;}_0x4d1c1b[_0x373d45(0x3ed)](_0x192d3d);}let _0x2abafb=(_0x51ed3f=(_0x25d5dd=_0x3cf21c[_0x373d45(0x312)]())==null?void 0x0:_0x25d5dd[_0x373d45(0x2c6)])==null?_0x373d45(0x265):_0x51ed3f,_0x3bc41e=(_0x40df95=(_0x291a0a=_0x3cf21c[_0x373d45(0x312)]())==null?void 0x0:_0x291a0a['memberID'])==null?_0x373d45(0x265):_0x40df95;return{'changeset':{'unitID':_0x5928e5,'type':(0x0,e[_0x373d45(0x3e3)])(_0x89a0dd[_0x373d45(0x2ce)](_0x5928e5)),'baseRev':_0x47a33a[_0x373d45(0x3fb)](_0x5928e5),'revision':0x0,'userID':_0x2abafb,'memberID':_0x3bc41e,'mutations':_0x4d1c1b},'pendingMutations':_0x48eec8[_0x373d45(0x399)](_0x4d1c1b[_0x373d45(0x2b3)])};}function he(_0x265446,_0x9c9b5b,_0x2e538e,_0x226964,_0x31fc5e){const _0x549d6a=_0x1abb79;var _0x531c9c,_0x396325,_0x46876c,_0x4a2dbf;let _0x194e2e=_0x265446['reduce']((_0x5c6d9d,_0x407864)=>{const _0x12237b=_0x37da;let _0x2d9cfd=_0x5c6d9d[_0x5c6d9d[_0x12237b(0x2b3)]-0x1],{id:_0x541da6}=_0x2d9cfd==null?{}:_0x2d9cfd,{id:_0x2e3804,type:_0x18ade6}=_0x407864,_0x17e7c5=_0x407864['params'];if(_0x541da6&&_0x541da6!==_0x2e3804)throw Error(_0x12237b(0x321)+_0x541da6+_0x12237b(0x260)+_0x2e3804+'.');if(!_0x2d9cfd)return[{'id':_0x2e3804,'type':_0x18ade6,'params':{'unitId':_0x17e7c5['unitId'],'textRanges':_0x17e7c5[_0x12237b(0x39f)],'actions':_0x17e7c5[_0x12237b(0x25d)]}}];let _0x10a55c=_0x2d9cfd['params'];return ge(_0x10a55c[_0x12237b(0x25d)],_0x17e7c5[_0x12237b(0x25d)])?[..._0x5c6d9d['slice'](0x0,-0x1),{..._0x2d9cfd,'id':_0x2e3804,'type':_0x18ade6,'params':{'unitId':_0x17e7c5[_0x12237b(0x355)],'textRanges':_0x17e7c5['textRanges'],'actions':t[_0x12237b(0x418)][_0x12237b(0x484)](_0x10a55c[_0x12237b(0x25d)],_0x17e7c5['actions'])}}]:[..._0x5c6d9d,{'id':_0x2e3804,'type':_0x18ade6,'params':{'unitId':_0x17e7c5['unitId'],'textRanges':_0x17e7c5[_0x12237b(0x39f)],'actions':_0x17e7c5['actions']}}];},[]),_0x10639c=(_0x531c9c=(_0x396325=_0x31fc5e[_0x549d6a(0x312)]())==null?void 0x0:_0x396325[_0x549d6a(0x2c6)])==null?_0x549d6a(0x265):_0x531c9c,_0x566173=(_0x46876c=(_0x4a2dbf=_0x31fc5e[_0x549d6a(0x312)]())==null?void 0x0:_0x4a2dbf[_0x549d6a(0x1fd)])==null?_0x549d6a(0x265):_0x46876c;return{'changeset':{'unitID':_0x9c9b5b,'type':(0x0,e[_0x549d6a(0x3e3)])(_0x2e538e[_0x549d6a(0x2ce)](_0x9c9b5b)),'baseRev':_0x226964[_0x549d6a(0x3fb)](_0x9c9b5b),'revision':0x0,'userID':_0x10639c,'memberID':_0x566173,'mutations':_0x194e2e},'pendingMutations':_0x265446[_0x549d6a(0x399)](_0x265446[_0x549d6a(0x2b3)])};}function ge(_0x4805c5,_0xd36886){return!(_e(_0x4805c5)&&ve(_0xd36886)||ve(_0x4805c5)&&_e(_0xd36886));}function _e(_0x29e0d7){const _0xc0fe8=_0x1abb79;return ye(_0x29e0d7)[_0xc0fe8(0x34e)](_0x3911fd=>be(_0x3911fd)&&_0x3911fd['et']===_0xc0fe8(0x1d4));}function ve(_0x12065c){const _0x35c9f4=_0x1abb79;return ye(_0x12065c)[_0x35c9f4(0x34e)](_0x5a1b59=>Array['isArray'](_0x5a1b59)||typeof _0x5a1b59==_0x35c9f4(0x298)||typeof _0x5a1b59==_0x35c9f4(0x375));}function ye(_0x128f10){const _0x494765=_0x1abb79;if(!Array['isArray'](_0x128f10))return[];let _0x5d9d31=_0x128f10['includes'](_0x494765(0x230))?_0x128f10:_0x128f10['find'](_0x3ce931=>Array[_0x494765(0x228)](_0x3ce931)&&_0x3ce931[_0x494765(0x3a9)](_0x494765(0x230)));if(!Array[_0x494765(0x228)](_0x5d9d31))return[];let _0x339221=_0x5d9d31[_0x494765(0x38e)]('body');return _0x339221===-0x1?[]:_0x5d9d31[_0x494765(0x399)](_0x339221+0x1);}function be(_0x554792){const _0x13dff6=_0x1abb79;return typeof _0x554792==_0x13dff6(0x223)&&!!_0x554792&&!Array[_0x13dff6(0x228)](_0x554792);}function xe(_0x317f77,_0x7b9fc3){const _0x11a939=_0x1abb79;let _0x24539d=new i[(_0x11a939(0x286))](0x1);return setTimeout(()=>_0x24539d[_0x11a939(0x343)](_0x7b9fc3),_0x317f77),_0x24539d['asObservable']()[_0x11a939(0x3a1)]((0x0,i['take'])(0x1));}var E,D,O;let Se=function(_0x469741){const _0x35e575=_0x1abb79;return _0x469741['NOT_COLLAB']=_0x35e575(0x245),_0x469741['SYNCED']=_0x35e575(0x303),_0x469741['PENDING']='pending',_0x469741[_0x35e575(0x46a)]='awaiting',_0x469741[_0x35e575(0x2a3)]=_0x35e575(0x34d),_0x469741[_0x35e575(0x415)]='fetch_missing',_0x469741[_0x35e575(0x369)]=_0x35e575(0x256),_0x469741[_0x35e575(0x3d4)]=_0x35e575(0x249),_0x469741;}({});const Ce=0x4e20,we=0x2bf20;var k=class{constructor(_0x5e4bf1,_0x354596,_0x2e284e,_0x58042d,_0xf04db1,_0x937c34,_0x5f37b9,_0x4211ed,_0x28b1e3){const _0x88345=_0x1abb79;this[_0x88345(0x383)]=_0x5e4bf1,this[_0x88345(0x1ae)]=_0x354596,this['_handler']=_0xf04db1,this['_commandService']=_0x937c34,this[_0x88345(0x354)]=_0x5f37b9,this['_revisionService']=_0x4211ed,this['_localCacheService']=_0x28b1e3,g(this,'_awaitingChangeset',null),g(this,_0x88345(0x307),[]),this[_0x88345(0x3a5)]=_0x2e284e,this[_0x88345(0x307)]=_0x58042d;}['_checkMissing'](_0x137aec){const _0x3979a7=_0x1abb79;let _0x1c7539=this[_0x3979a7(0x407)]['getCurrentRevOfUnit'](this['unitID']);return _0x137aec['revision']>_0x1c7539+0x1?(this['_handler'][_0x3979a7(0x2d5)]({'from':_0x1c7539,'to':_0x137aec[_0x3979a7(0x445)]-0x1}),!0x0):!0x1;}[_0x1abb79(0x1da)](_0x5b0db9){const _0x5d9e0e=_0x1abb79;this[_0x5d9e0e(0x354)][_0x5d9e0e(0x335)](this[_0x5d9e0e(0x383)],_0x5b0db9);}[_0x1abb79(0x3bc)](_0x446ebf){const _0x512004=_0x1abb79;var _0x1ffc9f,_0xd26e5d;(_0x1ffc9f=(_0xd26e5d=this[_0x512004(0x2d8)])[_0x512004(0x41f)])==null||_0x1ffc9f[_0x512004(0x25c)](_0xd26e5d,_0x446ebf);}[_0x1abb79(0x1d6)](_0x28a926){const _0x46e55b=_0x1abb79;var _0x396816,_0xea2bb9;return(_0x396816=(_0xea2bb9=this[_0x46e55b(0x2d8)])[_0x46e55b(0x42f)])==null?void 0x0:_0x396816['call'](_0xea2bb9,_0x28a926);}[_0x1abb79(0x3f1)](_0x1897ce){const _0x262349=_0x1abb79;var _0x1646d0,_0x2f9df7;return(_0x1646d0=(_0x2f9df7=this[_0x262349(0x2d8)])['onTransformState'])==null?void 0x0:_0x1646d0[_0x262349(0x25c)](_0x2f9df7,_0x1897ce);}[_0x1abb79(0x278)](_0x2e8008){const _0x5e1288=_0x1abb79;var _0x26005d,_0x2a68b0,_0x3178e4;return(_0x26005d=(_0x2a68b0=(_0x3178e4=this['_handler'])[_0x5e1288(0x27f)])==null?void 0x0:_0x2a68b0[_0x5e1288(0x25c)](_0x3178e4,_0x2e8008))==null?_0x2e8008:_0x26005d;}['_transformRemoteChangesetByStateCache'](_0x2b8b77){const _0x35d3c1=_0x1abb79;var _0x18ff2e,_0x19b5d2,_0x123f45;return(_0x18ff2e=(_0x19b5d2=(_0x123f45=this[_0x35d3c1(0x2d8)])['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x19b5d2[_0x35d3c1(0x25c)](_0x123f45,_0x2b8b77))==null?_0x2b8b77:_0x18ff2e;}[_0x1abb79(0x336)](_0xe430d0){const _0x520dc0=_0x1abb79;if(this[_0x520dc0(0x1ae)]===t[_0x520dc0(0x3b9)][_0x520dc0(0x3d3)]){let {unitID:_0x5c57c7,mutations:_0x3f1e46,memberID:_0xfa4660}=_0xe430d0,_0x58bc5c=_0x3f1e46[_0x520dc0(0x2b3)]>0x0?_0x3f1e46[0x0]['params'][_0x520dc0(0x39f)]:[];if(Array[_0x520dc0(0x228)](_0x58bc5c)&&_0x58bc5c[_0x520dc0(0x2b3)]>0x0){var _0x44a82f,_0x42d062;(_0x44a82f=(_0x42d062=this[_0x520dc0(0x2d8)])[_0x520dc0(0x258)])==null||_0x44a82f[_0x520dc0(0x25c)](_0x42d062,{'unitID':_0x5c57c7,'memberID':_0xfa4660,'textRanges':_0x58bc5c});}}}[_0x1abb79(0x3c5)](){const _0x2f3256=_0x1abb79;var _0x59126e;(_0x59126e=this[_0x2f3256(0x1c9)])==null||_0x59126e[_0x2f3256(0x473)](this[_0x2f3256(0x383)],this['type'],this[_0x2f3256(0x3a5)],this['_pendingMutations']);}[_0x1abb79(0x3e4)](){const _0x354796=_0x1abb79;return this[_0x354796(0x407)][_0x354796(0x3fb)](this[_0x354796(0x383)]);}[_0x1abb79(0x24a)](){const _0x3114f5=_0x1abb79;this[_0x3114f5(0x407)][_0x3114f5(0x1b6)](this[_0x3114f5(0x383)]);}['_executeRemoteChangeset'](_0x232d3e){const _0xb52857=_0x1abb79;let _0x125520=this[_0xb52857(0x278)](_0x232d3e);_0x125520=this[_0xb52857(0x297)](_0x125520);let _0xf654e3=(0x0,t[_0xb52857(0x31d)])(_0x125520[_0xb52857(0x2f2)],this['_commandService'],{'fromCollab':!0x0});if(!_0xf654e3[_0xb52857(0x229)]){var _0x1f570b;throw _0xf654e3[_0xb52857(0x1ec)]instanceof Error?_0xf654e3['error']:Error((_0x1f570b=_0xf654e3[_0xb52857(0x1ec)])==null?_0xb52857(0x3fa):_0x1f570b);}this[_0xb52857(0x1d6)](_0x125520),this['_transformStateCache'](_0x125520),this[_0xb52857(0x1da)](_0x232d3e),this['_transformSelections'](_0x125520),this[_0xb52857(0x336)](_0x125520),this['_incrementRevisionNumber']();}};let A=class extends k{constructor(_0x1ff248,_0x463e18,_0x227343,_0x43d926,_0x494c11,_0x5f4b79,_0x46b73e,_0x1ed8e0,_0x474daf,_0x3822fb){const _0x3c3529=_0x1abb79;super(_0x1ff248,_0x463e18,null,[],_0x227343,_0x46b73e,_0x5f4b79,_0x43d926,_0x3822fb),this[_0x3c3529(0x301)]=_0x494c11,this[_0x3c3529(0x204)]=_0x1ed8e0,this[_0x3c3529(0x20f)]=_0x474daf,this['localCacheService']=_0x3822fb,g(this,'status',_0x3c3529(0x303));}[_0x1abb79(0x212)](_0x9591fc){const _0x4cac89=_0x1abb79;let _0x2d4aba=this['_injector'][_0x4cac89(0x427)](j,this[_0x4cac89(0x383)],this['type'],[_0x9591fc],this[_0x4cac89(0x2d8)]);return _0x2d4aba['_schedule'](),_0x2d4aba[_0x4cac89(0x3c5)](),_0x2d4aba;}[_0x1abb79(0x448)](_0x35667d){const _0x1cc3c2=_0x1abb79;if(this[_0x1cc3c2(0x2a5)](_0x35667d))return this[_0x1cc3c2(0x301)][_0x1cc3c2(0x427)](I,this[_0x1cc3c2(0x383)],this['type'],null,[],null,[_0x35667d],this['_handler']);try{let _0x29a4e9=this[_0x1cc3c2(0x20f)][_0x1cc3c2(0x411)](_0x35667d,[e[_0x1cc3c2(0x2ff)]]);if((0x0,e[_0x1cc3c2(0x2e3)])(_0x29a4e9)){let {c1Prime:_0x50b013}=_0x29a4e9;return this[_0x1cc3c2(0x2e7)](_0x50b013),this;}throw _0x29a4e9[_0x1cc3c2(0x1ec)];}catch(_0x1cb564){return this[_0x1cc3c2(0x204)][_0x1cc3c2(0x1ec)](_0x1cb564),this[_0x1cc3c2(0x1d1)](!0x1);}}['_onConflict'](_0x393447){const _0x3049c5=_0x1abb79;return this['_injector'][_0x3049c5(0x427)](P,this[_0x3049c5(0x383)],this[_0x3049c5(0x1ae)],null,[],this['_handler'],_0x393447);}[_0x1abb79(0x283)](_0xf33fb5){const _0x2ca889=_0x1abb79;if(_0xf33fb5[_0x2ca889(0x445)]<=this['_getCurrentRevision']())return this;throw Error(_0x2ca889(0x3e9));}[_0x1abb79(0x37b)](){const _0x246e7b=_0x1abb79;throw Error(_0x246e7b(0x28f));}[_0x1abb79(0x20a)](){return this;}[_0x1abb79(0x334)](){const _0x16911e=_0x1abb79;return this['_injector'][_0x16911e(0x427)](F,this[_0x16911e(0x383)],this['type'],null,[],this[_0x16911e(0x2d8)]);}[_0x1abb79(0x27a)](){return this;}[_0x1abb79(0x276)](){const _0x4b90ef=_0x1abb79;throw Error(_0x4b90ef(0x1fc));}['fetchMiss'](){const _0x3e0a06=_0x1abb79;let _0x50bb6d=this[_0x3e0a06(0x407)][_0x3e0a06(0x3fb)](this[_0x3e0a06(0x383)]);return this[_0x3e0a06(0x2d8)][_0x3e0a06(0x2d5)]({'from':_0x50bb6d,'to':0x0}),this[_0x3e0a06(0x301)]['createInstance'](I,this[_0x3e0a06(0x383)],this[_0x3e0a06(0x1ae)],null,[],null,[],this[_0x3e0a06(0x2d8)]);}};A=y([v(0x3,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x2b2)])),v(0x4,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x1d5)])),v(0x5,t[_0x1abb79(0x42d)]),v(0x6,t[_0x1abb79(0x426)]),v(0x7,t[_0x1abb79(0x22c)]),v(0x8,e[_0x1abb79(0x2f7)]),v(0x9,(0x0,t[_0x1abb79(0x323)])(S))],A);let j=E=class extends k{constructor(_0x40dd13,_0x565b92,_0x2a93df,_0x3be5f0,_0x5becc8,_0x32e7b3,_0x42c62d,_0x42e6b7,_0x574042,_0x50bdd7,_0x357429,_0x39ab70,_0x4e8bf2,_0x2da049){const _0x459f2a=_0x1abb79;super(_0x40dd13,_0x565b92,null,_0x2a93df,_0x3be5f0,_0x574042,_0x4e8bf2,_0x32e7b3,_0x2da049),this[_0x459f2a(0x301)]=_0x5becc8,this[_0x459f2a(0x21b)]=_0x42c62d,this['_logService']=_0x42e6b7,this[_0x459f2a(0x1c0)]=_0x50bdd7,this[_0x459f2a(0x20f)]=_0x357429,this['_univerInstanceService']=_0x39ab70,g(this,_0x459f2a(0x257),'pending'),g(this,_0x459f2a(0x291),null),g(this,_0x459f2a(0x2e2),null);}['appendMutation'](_0x5a5ca2){const _0x1144c1=_0x1abb79;return this['_pendingMutations'][_0x1144c1(0x3ed)](_0x5a5ca2),this[_0x1144c1(0x3c5)](),this;}['onRemoteChangeset'](_0x315742){const _0x595952=_0x1abb79;if(this[_0x595952(0x2a5)](_0x315742))return this['_clearScheduledTask'](),this[_0x595952(0x301)][_0x595952(0x427)](I,this['unitID'],this['type'],null,this['_pendingMutations'],null,[_0x315742],this[_0x595952(0x2d8)]);try{let _0x367a32=this['_transformService'][_0x595952(0x411)](_0x315742,this[_0x595952(0x307)]);if((0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x367a32)){let {c1Prime:_0x15528a,m2Prime:_0x136e69}=_0x367a32;this[_0x595952(0x2e7)](_0x15528a);let _0x56a44a=this[_0x595952(0x301)][_0x595952(0x427)](E,this[_0x595952(0x383)],this[_0x595952(0x1ae)],_0x136e69,this[_0x595952(0x2d8)]);this[_0x595952(0x346)]();let _0x316847=new Date()['getTime'](),_0x3fff34=this['_scheduleCompleteTimestamp']?Math[_0x595952(0x474)](this['_scheduleCompleteTimestamp']-_0x316847,0x0):this['_getSendChangesetTimeout']();return _0x56a44a[_0x595952(0x29d)](_0x3fff34),_0x56a44a;}throw _0x367a32[_0x595952(0x1ec)];}catch(_0x202742){return this[_0x595952(0x204)][_0x595952(0x1ec)](_0x202742),this[_0x595952(0x1d1)](!0x1);}}['onRemoteAck'](_0x449387){const _0x51368f=_0x1abb79;if(_0x449387[_0x51368f(0x445)]<=this[_0x51368f(0x3e4)]())return this;throw Error(_0x51368f(0x478));}[_0x1abb79(0x37b)](){const _0x2805c1=_0x1abb79;throw Error(_0x2805c1(0x368));}[_0x1abb79(0x20a)](){return this;}[_0x1abb79(0x334)](){const _0x315c4f=_0x1abb79;return this[_0x315c4f(0x346)](),this[_0x315c4f(0x301)]['createInstance'](F,this['unitID'],this[_0x315c4f(0x1ae)],null,this[_0x315c4f(0x307)],this[_0x315c4f(0x2d8)]);}[_0x1abb79(0x27a)](){return this;}[_0x1abb79(0x29d)](_0x43a0b){const _0x41c881=_0x1abb79;let _0xb0a6c8=_0x43a0b==null?this[_0x41c881(0x2c7)]():_0x43a0b;this[_0x41c881(0x291)]=new Date()[_0x41c881(0x3f3)]()+_0xb0a6c8,this[_0x41c881(0x2e2)]=setTimeout(()=>{const _0x36a3b4=_0x41c881;this[_0x36a3b4(0x346)]();let _0x4b3087=null;switch(this['type']){case t[_0x36a3b4(0x3b9)][_0x36a3b4(0x45b)]:_0x4b3087=me(this['_pendingMutations'],this[_0x36a3b4(0x383)],this['_univerInstanceService'],this[_0x36a3b4(0x407)],this[_0x36a3b4(0x21b)]);break;case t[_0x36a3b4(0x3b9)][_0x36a3b4(0x3d3)]:_0x4b3087=this[_0x36a3b4(0x307)][_0x36a3b4(0x215)](_0x301381=>_0x301381['id']===n[_0x36a3b4(0x2cb)]['id'])?he(this[_0x36a3b4(0x307)],this[_0x36a3b4(0x383)],this['_univerInstanceService'],this[_0x36a3b4(0x407)],this['_memberService']):me(this[_0x36a3b4(0x307)],this[_0x36a3b4(0x383)],this[_0x36a3b4(0x489)],this[_0x36a3b4(0x407)],this['_memberService']);break;default:throw Error(_0x36a3b4(0x274)+this['type']+_0x36a3b4(0x444));}let {changeset:_0x443006,pendingMutations:_0x36338d}=_0x4b3087;this[_0x36a3b4(0x2d8)][_0x36a3b4(0x324)](_0x443006);let _0x252c6e=_0x36338d[_0x36a3b4(0x2b3)]?this['_injector'][_0x36a3b4(0x427)](N,this[_0x36a3b4(0x383)],this[_0x36a3b4(0x1ae)],_0x443006,_0x36338d,this['_handler'],void 0x0):this[_0x36a3b4(0x301)][_0x36a3b4(0x427)](M,this[_0x36a3b4(0x383)],this[_0x36a3b4(0x1ae)],_0x443006,this[_0x36a3b4(0x2d8)]);_0x252c6e['_updateLocalCache'](),this[_0x36a3b4(0x2d8)][_0x36a3b4(0x436)](this,_0x252c6e);},_0xb0a6c8);}[_0x1abb79(0x2c7)](){const _0x4a3dab=_0x1abb79;var _0x219f34;let _0x32644c=this[_0x4a3dab(0x1c0)]['getConfig'](T);return(_0x219f34=_0x32644c==null?void 0x0:_0x32644c['sendChangesetTimeout'])==null?0x7d0:_0x219f34;}[_0x1abb79(0x276)](){throw Error('[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x1abb79(0x346)](){const _0x34cbbe=_0x1abb79;this[_0x34cbbe(0x2e2)]!=null&&(clearTimeout(this['_sendingTimer']),this[_0x34cbbe(0x2e2)]=null);}['_onConflict'](_0x4d2762){const _0x381e83=_0x1abb79;return this['_clearScheduledTask'](),this[_0x381e83(0x301)][_0x381e83(0x427)](P,this['unitID'],this['type'],null,this[_0x381e83(0x307)],this['_handler'],_0x4d2762);}};j=E=y([v(0x4,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x1d5)])),v(0x5,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x2b2)])),v(0x6,(0x0,t[_0x1abb79(0x3cc)])(b)),v(0x7,t['ILogService']),v(0x8,t[_0x1abb79(0x426)]),v(0x9,t[_0x1abb79(0x2b4)]),v(0xa,e[_0x1abb79(0x2f7)]),v(0xb,t['IUniverInstanceService']),v(0xc,t[_0x1abb79(0x42d)]),v(0xd,(0x0,t[_0x1abb79(0x323)])(S))],j);let M=D=class extends k{constructor(_0x214222,_0x35683e,_0x365cef,_0x214662,_0x47a4cc,_0x143efb,_0xe2a714,_0x582658,_0x436cfc,_0x3d117b,_0x1352b2){const _0xa58867=_0x1abb79;super(_0x214222,_0x35683e,_0x365cef,[],_0x214662,_0xe2a714,_0x3d117b,_0x143efb,_0x1352b2),this[_0xa58867(0x301)]=_0x47a4cc,this[_0xa58867(0x204)]=_0x582658,this[_0xa58867(0x20f)]=_0x436cfc,g(this,_0xa58867(0x257),_0xa58867(0x350)),g(this,_0xa58867(0x3c4),0x0),g(this,_0xa58867(0x2b9),0x0),g(this,_0xa58867(0x275),void 0x0),g(this,'_sender',void 0x0);}[_0x1abb79(0x212)](_0x5a2ecf){const _0x31300e=_0x1abb79;this['_clearScheduledTask']();let _0x48ebeb=this[_0x31300e(0x301)][_0x31300e(0x427)](N,this[_0x31300e(0x383)],this[_0x31300e(0x1ae)],this[_0x31300e(0x3a5)],[_0x5a2ecf],this[_0x31300e(0x2d8)],this[_0x31300e(0x275)]);return _0x48ebeb[_0x31300e(0x3c5)](),_0x48ebeb;}[_0x1abb79(0x448)](_0x3790d2){const _0x41f243=_0x1abb79;if(this['_checkMissing'](_0x3790d2))return this[_0x41f243(0x346)](),this['_injector']['createInstance'](I,this[_0x41f243(0x383)],this[_0x41f243(0x1ae)],this[_0x41f243(0x3a5)],[],null,[_0x3790d2],this[_0x41f243(0x2d8)]);try{let _0x1c59be=this[_0x41f243(0x20f)]['transformChangesets']([_0x3790d2],[this['_awaitingChangeset']],!0x1);if((0x0,e[_0x41f243(0x362)])(_0x1c59be)){let {c1Prime:_0x50fcc8,c2Prime:_0x489b49}=_0x1c59be;this[_0x41f243(0x2e7)](_0x50fcc8[0x0]),_0x489b49[0x0][_0x41f243(0x3b5)]=this[_0x41f243(0x3e4)](),this[_0x41f243(0x346)]();let _0x3f4386=this['_injector'][_0x41f243(0x427)](D,this[_0x41f243(0x383)],this[_0x41f243(0x1ae)],_0x489b49[0x0],this[_0x41f243(0x2d8)]);return _0x3f4386[_0x41f243(0x3c5)](),_0x3f4386;}throw _0x1c59be['error'];}catch(_0x13e5cf){return this[_0x41f243(0x204)]['error'](_0x13e5cf),this['_onConflict'](!0x1);}}[_0x1abb79(0x283)](_0x5eb990){const _0xf59478=_0x1abb79;this[_0xf59478(0x346)]();let _0x35e9c4=this[_0xf59478(0x407)][_0xf59478(0x3fb)](this[_0xf59478(0x383)]);if(_0x5eb990[_0xf59478(0x445)]<=_0x35e9c4)return this;if(this['_checkMissing'](_0x5eb990))return this['_injector'][_0xf59478(0x427)](I,this[_0xf59478(0x383)],this['type'],this[_0xf59478(0x3a5)],[],_0x5eb990[_0xf59478(0x445)],[],this['_handler']);this[_0xf59478(0x24a)]();let _0x1c4e0e=this['_injector']['createInstance'](A,this['unitID'],this[_0xf59478(0x1ae)],this[_0xf59478(0x2d8)]);return _0x1c4e0e[_0xf59478(0x3c5)](),_0x1c4e0e;}[_0x1abb79(0x37b)](_0x52bf5d){const _0x1a64e4=_0x1abb79;return this['_onConflict'](!!(_0x52bf5d!=null&&_0x52bf5d[_0x1a64e4(0x3bb)]));}['onRemoteRetry'](_0x1e2958){const _0x734764=_0x1abb79;return this[_0x734764(0x2b9)]>we?this['toggleOffline']():(this[_0x734764(0x275)]=xe(this[_0x734764(0x3c4)],{'timeout':this['_resendTimeout'],'reqId':_0x1e2958[_0x734764(0x28c)]}),this['_sender']=this[_0x734764(0x275)]['subscribe'](({reqId:_0x283abe,timeout:_0x5aee08})=>{this['_resendWithTimeout'](_0x283abe,_0x5aee08);}),this);}[_0x1abb79(0x334)](){const _0x29a13e=_0x1abb79;return this['_clearScheduledTask'](),this[_0x29a13e(0x301)][_0x29a13e(0x427)](F,this[_0x29a13e(0x383)],this[_0x29a13e(0x1ae)],this[_0x29a13e(0x3a5)],[],this[_0x29a13e(0x2d8)]);}[_0x1abb79(0x27a)](){return this;}[_0x1abb79(0x276)](){const _0x1483ac=_0x1abb79;this[_0x1483ac(0x2d8)][_0x1483ac(0x324)](this[_0x1483ac(0x3a5)]);}[_0x1abb79(0x1d1)](_0x41d87d){const _0x3a104c=_0x1abb79;return this[_0x3a104c(0x346)](),this[_0x3a104c(0x301)]['createInstance'](P,this[_0x3a104c(0x383)],this[_0x3a104c(0x1ae)],this['_awaitingChangeset'],[],this[_0x3a104c(0x2d8)],_0x41d87d);}[_0x1abb79(0x3fc)](_0x4e0486,_0x2c480e){const _0x1bcb7a=_0x1abb79;var _0x46c186;_0x4e0486===((_0x46c186=this['_awaitingChangeset'])==null?void 0x0:_0x46c186[_0x1bcb7a(0x28c)])&&(this[_0x1bcb7a(0x276)](),this[_0x1bcb7a(0x3c4)]=_0x2c480e===0x0?0x3e8:Math[_0x1bcb7a(0x47d)](_0x2c480e*0x2,Ce),this[_0x1bcb7a(0x2b9)]+=this['_resendTimeout']);}[_0x1abb79(0x346)](){const _0x4c44c3=_0x1abb79;var _0x5f0534;(_0x5f0534=this[_0x4c44c3(0x1b8)])==null||_0x5f0534['unsubscribe'](),this[_0x4c44c3(0x3c4)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};M=D=y([v(0x4,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x1d5)])),v(0x5,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x2b2)])),v(0x6,t[_0x1abb79(0x426)]),v(0x7,t[_0x1abb79(0x22c)]),v(0x8,e[_0x1abb79(0x2f7)]),v(0x9,t['IUndoRedoService']),v(0xa,(0x0,t[_0x1abb79(0x323)])(S))],M);let N=O=class extends k{constructor(_0x57b33d,_0x4165a1,_0x1cf704,_0x32c6c5,_0x47a780,_0x835e76,_0x21f8c6,_0x4b35b7,_0x36641b,_0x33eafb,_0x282ef7,_0x5d8dc8,_0x3339da){const _0x1f03d9=_0x1abb79;super(_0x57b33d,_0x4165a1,_0x1cf704,_0x32c6c5,_0x47a780,_0x36641b,_0x5d8dc8,_0x4b35b7,_0x3339da),this[_0x1f03d9(0x301)]=_0x21f8c6,this[_0x1f03d9(0x204)]=_0x33eafb,this[_0x1f03d9(0x20f)]=_0x282ef7,this[_0x1f03d9(0x438)]=_0x3339da,g(this,_0x1f03d9(0x257),'awaiting_with_pending'),g(this,'_resendTimeout',0x0),g(this,'_maxTotalRetryTimeout',0x0),g(this,_0x1f03d9(0x275),void 0x0),g(this,_0x1f03d9(0x1b8),void 0x0),_0x835e76&&(this[_0x1f03d9(0x275)]=_0x835e76,this[_0x1f03d9(0x1b8)]=this[_0x1f03d9(0x275)][_0x1f03d9(0x2ed)](({reqId:_0x532016,timeout:_0x97b67})=>{this['_resendWithTimeout'](_0x532016,_0x97b67);}));}[_0x1abb79(0x212)](_0x58ad73){const _0x4e67fc=_0x1abb79;return this[_0x4e67fc(0x307)][_0x4e67fc(0x3ed)](_0x58ad73),this;}[_0x1abb79(0x448)](_0x35ea07){const _0x27135d=_0x1abb79;if(this['_checkMissing'](_0x35ea07))return this[_0x27135d(0x346)](),this[_0x27135d(0x301)]['createInstance'](I,this[_0x27135d(0x383)],this[_0x27135d(0x1ae)],this[_0x27135d(0x3a5)],this[_0x27135d(0x307)],null,[_0x35ea07],this['_handler']);try{let _0x4c1912=this[_0x27135d(0x20f)][_0x27135d(0x39b)]([_0x35ea07],[this['_awaitingChangeset']],!0x1);if((0x0,e[_0x27135d(0x362)])(_0x4c1912)){let {c1Prime:_0x56b8bb,c2Prime:_0x2aa4fa}=_0x4c1912,_0x375d61=this[_0x27135d(0x20f)][_0x27135d(0x411)](_0x56b8bb[0x0],this[_0x27135d(0x307)]);if((0x0,e[_0x27135d(0x2e3)])(_0x375d61)){let {c1Prime:_0x5d7d84,m2Prime:_0x10161e}=_0x375d61;return this['_executeRemoteChangeset'](_0x5d7d84),_0x2aa4fa[0x0][_0x27135d(0x3b5)]=this['_getCurrentRevision'](),this[_0x27135d(0x346)](),this[_0x27135d(0x301)][_0x27135d(0x427)](O,this[_0x27135d(0x383)],this[_0x27135d(0x1ae)],_0x2aa4fa[0x0],_0x10161e,this[_0x27135d(0x2d8)],void 0x0);}throw _0x375d61[_0x27135d(0x1ec)];}throw _0x4c1912[_0x27135d(0x1ec)];}catch(_0x4bb48c){return this[_0x27135d(0x204)][_0x27135d(0x1ec)](_0x4bb48c),this[_0x27135d(0x1d1)](!0x1);}}['onRemoteAck'](_0x3104d2){const _0x4bd3cc=_0x1abb79;this[_0x4bd3cc(0x346)]();let _0x49bf9f=this[_0x4bd3cc(0x3e4)]();if(_0x3104d2[_0x4bd3cc(0x445)]<=_0x49bf9f)return this;if(this[_0x4bd3cc(0x2a5)](_0x3104d2))return this[_0x4bd3cc(0x301)][_0x4bd3cc(0x427)](I,this['unitID'],this[_0x4bd3cc(0x1ae)],this['_awaitingChangeset'],this[_0x4bd3cc(0x307)],_0x3104d2[_0x4bd3cc(0x445)],[],this['_handler']);this['_incrementRevisionNumber']();let _0x267b0a=this[_0x4bd3cc(0x301)][_0x4bd3cc(0x427)](j,this['unitID'],this[_0x4bd3cc(0x1ae)],this[_0x4bd3cc(0x307)],this[_0x4bd3cc(0x2d8)]);return _0x267b0a[_0x4bd3cc(0x29d)](),_0x267b0a[_0x4bd3cc(0x3c5)](),_0x267b0a;}[_0x1abb79(0x37b)](_0x226137){const _0x11e95a=_0x1abb79;return this['_onConflict'](!!(_0x226137!=null&&_0x226137[_0x11e95a(0x3bb)]));}[_0x1abb79(0x20a)](_0x493140){const _0x1ace12=_0x1abb79;return this['_maxTotalRetryTimeout']>we?this[_0x1ace12(0x334)]():(this[_0x1ace12(0x275)]=xe(this[_0x1ace12(0x3c4)],{'timeout':this['_resendTimeout'],'reqId':_0x493140['reqId']}),this[_0x1ace12(0x1b8)]=this['_resendTimer']['subscribe'](({reqId:_0x499b3d,timeout:_0x81c3e7})=>{const _0x90fdd1=_0x1ace12;this[_0x90fdd1(0x3fc)](_0x499b3d,_0x81c3e7);}),this);}[_0x1abb79(0x334)](){const _0x1ffa6a=_0x1abb79;return this[_0x1ffa6a(0x346)](),this[_0x1ffa6a(0x301)][_0x1ffa6a(0x427)](F,this[_0x1ffa6a(0x383)],this[_0x1ffa6a(0x1ae)],this[_0x1ffa6a(0x3a5)],this['_pendingMutations'],this['_handler']);}[_0x1abb79(0x27a)](){return this;}['resend'](){const _0x226d1f=_0x1abb79;this[_0x226d1f(0x2d8)][_0x226d1f(0x324)](this[_0x226d1f(0x3a5)]);}[_0x1abb79(0x1d1)](_0x43a0f1){const _0xab0899=_0x1abb79;return this[_0xab0899(0x346)](),this['_injector']['createInstance'](P,this[_0xab0899(0x383)],this[_0xab0899(0x1ae)],null,this[_0xab0899(0x307)],this[_0xab0899(0x2d8)],_0x43a0f1);}[_0x1abb79(0x3fc)](_0x5ba8c1,_0x582a02){const _0x383746=_0x1abb79;var _0x25d036;_0x5ba8c1===((_0x25d036=this[_0x383746(0x3a5)])==null?void 0x0:_0x25d036[_0x383746(0x28c)])&&(this[_0x383746(0x276)](),this[_0x383746(0x3c4)]=_0x582a02===0x0?0x3e8:Math['min'](_0x582a02*0x2,Ce),this[_0x383746(0x2b9)]+=this[_0x383746(0x3c4)]);}[_0x1abb79(0x346)](){const _0x48e97d=_0x1abb79;var _0x1ada1f;(_0x1ada1f=this[_0x48e97d(0x1b8)])==null||_0x1ada1f[_0x48e97d(0x1db)](),this[_0x48e97d(0x3c4)]=0x0,this[_0x48e97d(0x2b9)]=0x0;}};N=O=y([v(0x6,(0x0,t[_0x1abb79(0x3cc)])(t['Injector'])),v(0x7,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x2b2)])),v(0x8,t[_0x1abb79(0x426)]),v(0x9,t[_0x1abb79(0x22c)]),v(0xa,e[_0x1abb79(0x2f7)]),v(0xb,t['IUndoRedoService']),v(0xc,(0x0,t[_0x1abb79(0x323)])(S))],N);let P=class extends k{constructor(_0x54c776,_0x240fac,_0x3cb3b7,_0x1fe00b,_0x22d0d7,_0x382283=!0x1,_0x3d9034,_0x45bab3,_0x475721,_0x43932d,_0x3402e3,_0x9e8ae0,_0x2ae564){const _0x3da35c=_0x1abb79;super(_0x54c776,_0x240fac,_0x3cb3b7,_0x1fe00b,_0x22d0d7,_0x45bab3,_0x475721,_0x43932d,_0x2ae564),this[_0x3da35c(0x316)]=_0x382283,this['_permissionService']=_0x3d9034,this[_0x3da35c(0x447)]=_0x3402e3,this[_0x3da35c(0x420)]=_0x9e8ae0,this[_0x3da35c(0x438)]=_0x2ae564,g(this,_0x3da35c(0x257),_0x3da35c(0x256)),this[_0x3da35c(0x309)](),this[_0x3da35c(0x481)](),this[_0x3da35c(0x269)]();}['appendMutation'](){return this;}[_0x1abb79(0x448)](){return this;}['onRemoteAck'](){return this;}[_0x1abb79(0x37b)](){return this;}[_0x1abb79(0x20a)](){return this;}[_0x1abb79(0x334)](){return this;}[_0x1abb79(0x27a)](){return this;}[_0x1abb79(0x276)](){throw Error('[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x1abb79(0x481)](){const _0x22bcdb=_0x1abb79;var _0x2d328b;(_0x2d328b=this['_localCacheService'])==null||_0x2d328b[_0x22bcdb(0x473)](this[_0x22bcdb(0x383)],this[_0x22bcdb(0x1ae)],null,[]);}['_showConflictNotification'](){const _0x5f4522=_0x1abb79;this[_0x5f4522(0x316)]?this['_collaborationUIEventService'][_0x5f4522(0x1f5)]({'id':_0x5f4522(0x3c8)}):this['_collaborationUIEventService'][_0x5f4522(0x1f5)]({'id':'CONFLICT'});}['_disableEditing'](){const _0x371280=_0x1abb79;this['_permissionService']['updatePermissionPoint'](new r[(_0x371280(0x209))](this[_0x371280(0x383)])['id'],!0x1);}};P=y([v(0x6,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x2ad)])),v(0x7,t[_0x1abb79(0x426)]),v(0x8,t[_0x1abb79(0x42d)]),v(0x9,(0x0,t[_0x1abb79(0x3cc)])(e['RevisionService'])),v(0xa,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x20c)])),v(0xb,(0x0,t[_0x1abb79(0x3cc)])(_)),v(0xc,(0x0,t[_0x1abb79(0x323)])(S))],P);let F=class extends k{constructor(_0x50a408,_0x8f5d05,_0xc1acec,_0x1e918a,_0x2a7ea4,_0x536ee3,_0x465879,_0x15de49,_0x42d808,_0x2dc718){const _0x27f708=_0x1abb79;super(_0x50a408,_0x8f5d05,_0xc1acec,_0x1e918a,_0x2a7ea4,_0x15de49,_0x42d808,_0x465879,_0x2dc718),this[_0x27f708(0x301)]=_0x536ee3,g(this,_0x27f708(0x257),_0x27f708(0x249));}[_0x1abb79(0x212)](_0x2e45dc){const _0x2b6340=_0x1abb79;return this[_0x2b6340(0x307)][_0x2b6340(0x3ed)](_0x2e45dc),this[_0x2b6340(0x3c5)](),this;}[_0x1abb79(0x448)](_0x217a5f){throw Error('[OfflineState]:\x20received\x20changeset.');}['onRemoteAck'](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}['onRemoteRej'](){const _0x188a01=_0x1abb79;throw Error(_0x188a01(0x208));}[_0x1abb79(0x20a)](){return this;}[_0x1abb79(0x334)](){return this;}[_0x1abb79(0x27a)](){const _0x2ad24c=_0x1abb79;let {_injector:_0x392004,_pendingMutations:_0x23b76,_awaitingChangeset:_0x2b6aa5,unitID:_0x53a852,_handler:_0x3a5252,type:_0x3f2cb4}=this,_0x5c26d6=Te(_0x392004,_0x53a852,_0x3f2cb4,_0x2b6aa5,_0x23b76,_0x3a5252);return _0x5c26d6 instanceof j?_0x5c26d6[_0x2ad24c(0x29d)]():(_0x5c26d6 instanceof N||_0x5c26d6 instanceof M)&&_0x5c26d6[_0x2ad24c(0x276)](),_0x5c26d6;}[_0x1abb79(0x276)](){const _0x51a463=_0x1abb79;throw Error(_0x51a463(0x35c));}};F=y([v(0x5,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x1d5)])),v(0x6,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x2b2)])),v(0x7,t[_0x1abb79(0x426)]),v(0x8,t[_0x1abb79(0x42d)]),v(0x9,(0x0,t[_0x1abb79(0x323)])(S))],F);let I=class extends k{constructor(_0x20e83,_0x207df9,_0xe1d197,_0x3ef813,_0x3d6d8a,_0x1b42fe,_0x500dc8,_0x368a6c,_0x35f92d,_0xbddf7a,_0x1c8d90,_0x4c4e6e,_0x2dea63,_0x567ef9){const _0x540904=_0x1abb79;super(_0x20e83,_0x207df9,_0xe1d197,_0x3ef813,_0x500dc8,_0x1c8d90,_0x4c4e6e,_0x35f92d,_0x567ef9),this[_0x540904(0x404)]=_0x3d6d8a,this[_0x540904(0x40f)]=_0x1b42fe,this[_0x540904(0x301)]=_0x368a6c,this['_logService']=_0xbddf7a,this[_0x540904(0x20f)]=_0x2dea63,this[_0x540904(0x438)]=_0x567ef9,g(this,_0x540904(0x257),'fetch_missing');}[_0x1abb79(0x440)](_0x530361){const _0x29f844=_0x1abb79;try{if(this[_0x29f844(0x446)](_0x530361)[_0x29f844(0x3a7)])throw Error(_0x29f844(0x2ca));if(this[_0x29f844(0x446)]([...this[_0x29f844(0x40f)]]['sort']((_0x5312b2,_0x10369e)=>_0x5312b2['revision']-_0x10369e[_0x29f844(0x445)]))[_0x29f844(0x3a7)])return this[_0x29f844(0x40f)]=[],this[_0x29f844(0x3c5)](),this['_handler'][_0x29f844(0x2d5)]({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0x45cc1e=this[_0x29f844(0x3a5)],_0x1727d9=this[_0x29f844(0x307)],_0xf1714;if(_0x45cc1e&&_0x1727d9[_0x29f844(0x2b3)]!==0x0)_0xf1714=this[_0x29f844(0x301)][_0x29f844(0x427)](N,this['unitID'],this[_0x29f844(0x1ae)],_0x45cc1e,_0x1727d9,this['_handler'],void 0x0);else{if(_0x45cc1e&&_0x1727d9[_0x29f844(0x2b3)]===0x0)_0x45cc1e[_0x29f844(0x3b5)]=this[_0x29f844(0x3e4)](),_0xf1714=this[_0x29f844(0x301)][_0x29f844(0x427)](M,this['unitID'],this[_0x29f844(0x1ae)],_0x45cc1e,this['_handler']);else{if(_0x1727d9['length']!==0x0){let _0x440cda=this[_0x29f844(0x301)][_0x29f844(0x427)](j,this['unitID'],this[_0x29f844(0x1ae)],_0x1727d9,this['_handler']);_0x440cda[_0x29f844(0x29d)](),_0xf1714=_0x440cda;}else _0xf1714=this['_injector'][_0x29f844(0x427)](A,this[_0x29f844(0x383)],this[_0x29f844(0x1ae)],this[_0x29f844(0x2d8)]);}}return _0xf1714['_updateLocalCache'](),_0xf1714;}catch(_0x55f791){return this[_0x29f844(0x204)][_0x29f844(0x1ec)](_0x29f844(0x23a),_0x29f844(0x48a),_0x55f791),this[_0x29f844(0x301)]['createInstance'](P,this[_0x29f844(0x383)],this['type'],this[_0x29f844(0x3a5)],this['_pendingMutations'],this[_0x29f844(0x2d8)],!0x1);}}[_0x1abb79(0x446)](_0x59be97){const _0x4b5586=_0x1abb79;this[_0x4b5586(0x3e8)]();for(let _0x538c6b=0x0;_0x538c6b<_0x59be97[_0x4b5586(0x2b3)];_0x538c6b++){let _0x147c93=_0x59be97[_0x538c6b],_0x3d6fa2=this[_0x4b5586(0x3e4)]();if(!(_0x147c93[_0x4b5586(0x445)]<=_0x3d6fa2)){if(_0x147c93[_0x4b5586(0x445)]>_0x3d6fa2+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x147c93)){this[_0x4b5586(0x304)]();continue;}this[_0x4b5586(0x1f2)](_0x147c93),this['_acknowledgeAwaitingIfReady']();}}return{'missingChangesets':!0x1};}[_0x1abb79(0x1f2)](_0xb59a6c){const _0x1a21f0=_0x1abb79;let _0x11d155=_0xb59a6c,_0x5490cf=this[_0x1a21f0(0x3a5)];if(_0x5490cf){let _0x1c005=this[_0x1a21f0(0x20f)][_0x1a21f0(0x39b)]([_0xb59a6c],[_0x5490cf],!0x1);if(!(0x0,e['isTransformChangesetsSuccess'])(_0x1c005))throw _0x1c005[_0x1a21f0(0x1ec)];_0x11d155=_0x1c005[_0x1a21f0(0x3f6)][0x0],_0x5490cf=_0x1c005['c2Prime'][0x0];}let _0xc63e2a=this[_0x1a21f0(0x307)];if(_0xc63e2a[_0x1a21f0(0x2b3)]){let _0x2b75ba=this['_transformService'][_0x1a21f0(0x411)](_0x11d155,_0xc63e2a);if(!(0x0,e[_0x1a21f0(0x2e3)])(_0x2b75ba))throw _0x2b75ba['error'];_0x11d155=_0x2b75ba[_0x1a21f0(0x3f6)],_0xc63e2a=_0x2b75ba['m2Prime'];}this[_0x1a21f0(0x2e7)](_0x11d155),_0x5490cf&&(_0x5490cf['baseRev']=this[_0x1a21f0(0x3e4)]()),this[_0x1a21f0(0x3a5)]=_0x5490cf,this[_0x1a21f0(0x307)]=_0xc63e2a;}[_0x1abb79(0x3e8)](){const _0x16ba2d=_0x1abb79;if(!this['_awaitingChangeset']||this[_0x16ba2d(0x404)]==null)return;let _0x3eca88=this[_0x16ba2d(0x3e4)]();if(this[_0x16ba2d(0x404)]<=_0x3eca88)throw Error(_0x16ba2d(0x2ea)+this['_acknowledgedAwaitingRevision']+'.');this[_0x16ba2d(0x404)]===_0x3eca88+0x1&&this['_acknowledgeAwaiting']();}['_acknowledgeAwaiting'](){const _0x2b72ff=_0x1abb79;this['_incrementRevisionNumber'](),this[_0x2b72ff(0x3a5)]=null,this[_0x2b72ff(0x404)]=null;}[_0x1abb79(0x44a)](_0x596531){const _0x497eac=_0x1abb79;let _0x15852b=this[_0x497eac(0x3a5)];return!_0x15852b||!_0x15852b[_0x497eac(0x48c)]||_0x15852b['reqId']===null||_0x15852b['reqId']===void 0x0?!0x1:_0x596531[_0x497eac(0x383)]===_0x15852b[_0x497eac(0x383)]&&_0x596531[_0x497eac(0x48c)]===_0x15852b[_0x497eac(0x48c)]&&_0x596531[_0x497eac(0x28c)]===_0x15852b[_0x497eac(0x28c)];}[_0x1abb79(0x276)](){const _0x2b82dd=_0x1abb79;throw Error(_0x2b82dd(0x26d));}[_0x1abb79(0x212)](_0x16f889){const _0x11555a=_0x1abb79;return this[_0x11555a(0x307)]['push'](_0x16f889),this;}[_0x1abb79(0x448)](_0x3db979){const _0x4623fc=_0x1abb79;return this[_0x4623fc(0x40f)]['push'](_0x3db979),this;}[_0x1abb79(0x283)](_0xfec982){const _0x36f62d=_0x1abb79;if(this[_0x36f62d(0x3a5)]){let _0x2a7360=this[_0x36f62d(0x3e4)]();return _0xfec982[_0x36f62d(0x445)]<=_0x2a7360||(_0x2a7360+0x1===_0xfec982[_0x36f62d(0x445)]?(this[_0x36f62d(0x24a)](),this[_0x36f62d(0x3a5)]=null,this[_0x36f62d(0x404)]=null):this[_0x36f62d(0x404)]=_0xfec982[_0x36f62d(0x445)]),this;}if(_0xfec982['revision']<=this[_0x36f62d(0x3e4)]())return this;throw Error(_0x36f62d(0x34c));}[_0x1abb79(0x37b)](_0x56726b){const _0x310baa=_0x1abb79;return this['_onConflict'](!!(_0x56726b!=null&&_0x56726b[_0x310baa(0x3bb)]));}[_0x1abb79(0x20a)](){return this;}[_0x1abb79(0x334)](){const _0x40f6c0=_0x1abb79;return this[_0x40f6c0(0x301)][_0x40f6c0(0x427)](F,this[_0x40f6c0(0x383)],this[_0x40f6c0(0x1ae)],this['_awaitingChangeset'],this[_0x40f6c0(0x307)],this[_0x40f6c0(0x2d8)]);}[_0x1abb79(0x27a)](){return this;}['_onConflict'](_0xa687bd){const _0xb349c5=_0x1abb79;return this['_injector'][_0xb349c5(0x427)](P,this[_0xb349c5(0x383)],this[_0xb349c5(0x1ae)],this[_0xb349c5(0x3a5)],this[_0xb349c5(0x307)],this['_handler'],_0xa687bd);}};I=y([v(0x7,(0x0,t[_0x1abb79(0x3cc)])(t['Injector'])),v(0x8,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x2b2)])),v(0x9,t[_0x1abb79(0x22c)]),v(0xa,t[_0x1abb79(0x426)]),v(0xb,t[_0x1abb79(0x42d)]),v(0xc,e['ITransformService']),v(0xd,(0x0,t[_0x1abb79(0x323)])(S))],I);function Te(_0x5f4466,_0x55c090,_0x4edc40,_0x5ed28a,_0x417e68,_0x381c72){const _0x351b12=_0x1abb79;return _0x5ed28a&&_0x417e68[_0x351b12(0x2b3)]?_0x5f4466['createInstance'](N,_0x55c090,_0x4edc40,_0x5ed28a,_0x417e68,_0x381c72,void 0x0):_0x5ed28a?_0x5f4466[_0x351b12(0x427)](M,_0x55c090,_0x4edc40,_0x5ed28a,_0x381c72):_0x417e68['length']?_0x5f4466[_0x351b12(0x427)](j,_0x55c090,_0x4edc40,_0x417e68,_0x381c72):_0x5f4466['createInstance'](A,_0x55c090,_0x4edc40,_0x381c72);}let L=class extends t[_0x1abb79(0x464)]{get['state'](){return this['_state'];}constructor(_0x4643a9,_0x3578dd,_0x2d6060,_0x25e17f,_0x5a7dae,_0x1cf4aa,_0x14d722,_0x1cbf83,_0x2b5c12,_0x1ef983,_0x4fb0f8,_0x4d4e7e,_0x8d97a8,_0xe78f37){const _0x2b2e9a=_0x1abb79;super(),this[_0x2b2e9a(0x383)]=_0x4643a9,this[_0x2b2e9a(0x30f)]=_0x3578dd,this[_0x2b2e9a(0x3bf)]=_0x2d6060,this[_0x2b2e9a(0x301)]=_0x25e17f,this[_0x2b2e9a(0x25a)]=_0x5a7dae,this[_0x2b2e9a(0x447)]=_0x1cf4aa,this[_0x2b2e9a(0x407)]=_0x14d722,this[_0x2b2e9a(0x43f)]=_0x1cbf83,this[_0x2b2e9a(0x489)]=_0x2b5c12,this[_0x2b2e9a(0x204)]=_0x1ef983,this[_0x2b2e9a(0x2a2)]=_0x4fb0f8,this[_0x2b2e9a(0x244)]=_0x4d4e7e,this[_0x2b2e9a(0x42a)]=_0x8d97a8,this[_0x2b2e9a(0x1c9)]=_0xe78f37,g(this,_0x2b2e9a(0x311),new i[(_0x2b2e9a(0x428))](null)),g(this,'state$',this[_0x2b2e9a(0x311)][_0x2b2e9a(0x234)]()),g(this,'_state',void 0x0),g(this,_0x2b2e9a(0x43b),!0x1),g(this,_0x2b2e9a(0x345),''),g(this,_0x2b2e9a(0x1b1),0x0),g(this,'status$',this['state$'][_0x2b2e9a(0x3a1)]((0x0,i['map'])(_0x513b01=>_0x513b01?_0x513b01[_0x2b2e9a(0x257)]:_0x2b2e9a(0x249)),(0x0,i['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0x2b2e9a(0x2d7),!0x1),g(this,'_remoteChangesetQueue',[]);}async[_0x1abb79(0x434)](){const _0x2e936f=_0x1abb79;if(this[_0x2e936f(0x3d2)])throw Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this[_0x2e936f(0x216)]();}[_0x1abb79(0x36f)](){const _0x3139ae=_0x1abb79;return this[_0x3139ae(0x43b)]=!0x0,(0x0,t['toDisposable'])(()=>{const _0x3e46f1=_0x3139ae;this['_collaborationPaused']=!0x1,this[_0x3e46f1(0x34a)]();});}[_0x1abb79(0x302)](_0x4ced13){const _0x56569f=_0x1abb79;this[_0x56569f(0x363)](_0x4ced13);}[_0x1abb79(0x1ba)](_0x4678a8){const _0xc0e2af=_0x1abb79;this[_0xc0e2af(0x2a0)]=_0x4678a8,this[_0xc0e2af(0x311)][_0xc0e2af(0x343)](_0x4678a8);}async[_0x1abb79(0x216)](){const _0x5dcfd4=_0x1abb79;if(this[_0x5dcfd4(0x1ba)](await this['_createInitialState']()),this[_0x5dcfd4(0x42a)]){var _0x3da8f3;(_0x3da8f3=this[_0x5dcfd4(0x42a)])==null||_0x3da8f3['editingUnit'](this['unitID']),this[_0x5dcfd4(0x2d3)](this['_singleActiveUnitService'][_0x5dcfd4(0x359)](this['unitID'])[_0x5dcfd4(0x2ed)](_0x4b06dc=>{const _0x118fc8=_0x5dcfd4;this[_0x118fc8(0x204)][_0x118fc8(0x490)](_0x118fc8(0x3ab),_0x118fc8(0x47f),_0x4b06dc),_0x4b06dc===0x1?(this[_0x118fc8(0x43f)][_0x118fc8(0x1f5)]({'id':_0x118fc8(0x1b9)}),this[_0x118fc8(0x244)]['updatePermissionPoint'](new r['WorkbookEditablePermission'](this[_0x118fc8(0x383)])['id'],!0x1),this[_0x118fc8(0x244)][_0x118fc8(0x1ce)](!0x1)):(this[_0x118fc8(0x244)][_0x118fc8(0x2be)](new r['WorkbookEditablePermission'](this[_0x118fc8(0x383)])['id'],!0x0),this['_permissionService'][_0x118fc8(0x1ce)](!0x0));}));}let _0x397fa2=!0x1;return this[_0x5dcfd4(0x2d3)](this[_0x5dcfd4(0x30f)][_0x5dcfd4(0x3c0)][_0x5dcfd4(0x2ed)](_0x3afb85=>{const _0x1c5342=_0x5dcfd4;_0x3afb85===0x3?this[_0x1c5342(0x2e1)](_0x397fa2):_0x3afb85===0x2&&(_0x397fa2=!0x0,this[_0x1c5342(0x1c8)]());})),this[_0x5dcfd4(0x2d3)](this[_0x5dcfd4(0x30f)][_0x5dcfd4(0x36b)]['subscribe'](_0x4e68a7=>{const _0x3c0985=_0x5dcfd4;try{switch(_0x4e68a7[_0x3c0985(0x20b)]){case e['CollaborationEvent'][_0x3c0985(0x486)]:this['_onRemoteChangeset']((0x0,e[_0x3c0985(0x327)])(_0x4e68a7['data']));break;case e[_0x3c0985(0x380)]['CHANGESET_ACK']:this['_onRemoteACK'](_0x4e68a7[_0x3c0985(0x471)]);break;case e[_0x3c0985(0x380)][_0x3c0985(0x1b4)]:this[_0x3c0985(0x27b)]();break;case e[_0x3c0985(0x380)][_0x3c0985(0x2d1)]:this[_0x3c0985(0x47e)](_0x4e68a7[_0x3c0985(0x471)]);break;case e[_0x3c0985(0x380)]['PSEUDO_FETCH_MISSING_RESULT']:this['_onFetchMissResult'](_0x4e68a7['data'][_0x3c0985(0x2c1)][_0x3c0985(0x41d)](_0x238ab4=>(0x0,e['parseProtocolChangeset'])(_0x238ab4)));break;case e[_0x3c0985(0x380)][_0x3c0985(0x224)]:this[_0x3c0985(0x27b)]({'isPermissionRej':!0x0});break;case e[_0x3c0985(0x380)][_0x3c0985(0x1cc)]:break;}}catch(_0x11d7e3){throw console[_0x3c0985(0x1ec)](_0x3c0985(0x21c),_0x11d7e3),_0x11d7e3;}})),this[_0x5dcfd4(0x2a0)];}['_unlockTransition'](){this['_transitionLocked']=!0x1;}[_0x1abb79(0x28d)](){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['_transitionLocked']=!0x0;}[_0x1abb79(0x363)](_0x211693){const _0x2c17cb=_0x1abb79;this[_0x2c17cb(0x28d)](),this[_0x2c17cb(0x1ba)](this[_0x2c17cb(0x2a0)]['appendMutation'](_0x211693)),this[_0x2c17cb(0x220)]();}[_0x1abb79(0x325)](_0x21a0ef){const _0x3b8427=_0x1abb79;if(!(_0x21a0ef[_0x3b8427(0x445)]<=this[_0x3b8427(0x407)]['getCurrentRevOfUnit'](this[_0x3b8427(0x383)]))){if(this[_0x3b8427(0x43b)]){this[_0x3b8427(0x394)]['push'](_0x21a0ef);return;}this[_0x3b8427(0x285)](_0x21a0ef);}}[_0x1abb79(0x34a)](){const _0x458591=_0x1abb79;this[_0x458591(0x394)][_0x458591(0x222)](_0x38a75b=>this[_0x458591(0x285)](_0x38a75b)),this[_0x458591(0x394)]=[];}[_0x1abb79(0x285)](_0x56156e){const _0x1e77f3=_0x1abb79;let _0x22bd58=this[_0x1e77f3(0x25a)][_0x1e77f3(0x35f)]['fetchThroughInterceptors'](this[_0x1e77f3(0x25a)][_0x1e77f3(0x35f)][_0x1e77f3(0x43d)]()[_0x1e77f3(0x2a9)])(_0x56156e['mutations'],null)||_0x56156e[_0x1e77f3(0x2f2)],_0x6beac7={..._0x56156e,'mutations':_0x22bd58};this['_lockTransition'](),this[_0x1e77f3(0x1ba)](this[_0x1e77f3(0x2a0)][_0x1e77f3(0x448)](_0x6beac7)),this[_0x1e77f3(0x220)]();}[_0x1abb79(0x31c)](_0x4001ec){const _0x116f9e=_0x1abb79;this[_0x116f9e(0x28d)](),this[_0x116f9e(0x1ba)](this['_state'][_0x116f9e(0x283)](_0x4001ec)),this['_unlockTransition']();}[_0x1abb79(0x27b)](_0x1b3e4c){const _0x504fd6=_0x1abb79;this[_0x504fd6(0x28d)](),this[_0x504fd6(0x1ba)](this[_0x504fd6(0x2a0)][_0x504fd6(0x37b)](_0x1b3e4c)),this[_0x504fd6(0x220)]();}['_onRemoteRetry'](_0x2b6f68){const _0x21f706=_0x1abb79;this[_0x21f706(0x28d)](),this[_0x21f706(0x1ba)](this[_0x21f706(0x2a0)][_0x21f706(0x20a)](_0x2b6f68)),this['_unlockTransition']();}[_0x1abb79(0x483)](_0x3ee119){const _0x146507=_0x1abb79;if(!(this[_0x146507(0x2a0)]instanceof I))throw TypeError(_0x146507(0x2f1));let _0x2ed1bb=_0x3ee119[_0x146507(0x41d)](_0x38ac41=>{const _0x499954=_0x146507;let _0x19b36b=this[_0x499954(0x25a)][_0x499954(0x35f)][_0x499954(0x3dc)](this['_compressMutationService'][_0x499954(0x35f)]['getInterceptPoints']()[_0x499954(0x2a9)])(_0x38ac41[_0x499954(0x2f2)],null)||_0x38ac41['mutations'];return{..._0x38ac41,'mutations':_0x19b36b};});this[_0x146507(0x28d)](),this['_updateState'](this[_0x146507(0x2a0)][_0x146507(0x440)](_0x2ed1bb)),this['_unlockTransition']();}['_toggleOffline'](){const _0x28b222=_0x1abb79;this[_0x28b222(0x28d)](),this[_0x28b222(0x1ba)](this['_state'][_0x28b222(0x334)]()),this[_0x28b222(0x220)]();}[_0x1abb79(0x2e1)](_0x514fd2=!0x1){const _0x111277=_0x1abb79;this['_lockTransition'](),this[_0x111277(0x1ba)](this['_state'][_0x111277(0x27a)]()),this[_0x111277(0x220)]();let _0x25b7bc=this[_0x111277(0x2a0)];_0x514fd2&&_0x25b7bc instanceof A&&(this['_lockTransition'](),this[_0x111277(0x1ba)](_0x25b7bc['fetchMiss']()),this[_0x111277(0x220)]());}async[_0x1abb79(0x453)](){return new Promise(_0x1be902=>{const _0x5be689=_0x37da;this['session'][_0x5be689(0x3c0)][_0x5be689(0x3a1)]((0x0,i['take'])(0x1))[_0x5be689(0x2ed)](async _0x4fb033=>{const _0x5333cd=_0x5be689;_0x1be902(await this[_0x5333cd(0x37a)](_0x4fb033===0x3));});});}[_0x1abb79(0x3a8)](){const _0x11f16d=_0x1abb79;let _0x2029ea=this[_0x11f16d(0x383)];return{'onStateChange':(_0x395ae9,_0x57f91e)=>{const _0x3e3107=_0x11f16d;if(_0x395ae9!==this[_0x3e3107(0x2a0)])throw Error(_0x3e3107(0x2ac)+_0x395ae9[_0x3e3107(0x257)]+_0x3e3107(0x365)+_0x57f91e[_0x3e3107(0x257)]+_0x3e3107(0x2a4)+this[_0x3e3107(0x2a0)][_0x3e3107(0x257)]);this[_0x3e3107(0x1ba)](_0x57f91e);},'onSendChangeset':_0x34b460=>{const _0x5cd1fe=_0x11f16d;_0x34b460[_0x5cd1fe(0x48c)]||(_0x34b460[_0x5cd1fe(0x48c)]=this[_0x5cd1fe(0x345)],_0x34b460[_0x5cd1fe(0x28c)]=++this[_0x5cd1fe(0x1b1)]);let _0x4a9a74={'eventID':e[_0x5cd1fe(0x380)]['SUBMIT_CHANGESET'],'data':{'unitID':_0x34b460['unitID'],'unitType':this[_0x5cd1fe(0x3bf)],'changeset':_0x34b460,'memberID':this[_0x5cd1fe(0x30f)][_0x5cd1fe(0x358)]()}};this[_0x5cd1fe(0x30f)]['send'](_0x4a9a74,this[_0x5cd1fe(0x383)]);},'onMissingChangesets':({from:_0x5793e0,to:_0x45f1db})=>{const _0x42c49d=_0x11f16d;this[_0x42c49d(0x204)][_0x42c49d(0x490)](_0x42c49d(0x3ab),_0x42c49d(0x33e)+_0x5793e0+_0x42c49d(0x28a)+_0x45f1db);let _0x38db58={'eventID':e[_0x42c49d(0x380)][_0x42c49d(0x2f8)],'data':{'unitID':_0x2029ea,'unitType':this[_0x42c49d(0x3bf)],'from':_0x5793e0,'to':_0x45f1db}};this['session'][_0x42c49d(0x357)](_0x38db58,this[_0x42c49d(0x383)]);}};}async[_0x1abb79(0x37a)](_0x446d87){const _0xf22361=_0x1abb79;var _0x12979e,_0x20a093,_0xcdd03f;let _0x2de704=await((_0x12979e=this[_0xf22361(0x1c9)])==null?void 0x0:_0x12979e[_0xf22361(0x419)](this[_0xf22361(0x383)])),_0x16133d=(_0x20a093=_0x2de704==null?void 0x0:_0x2de704[_0xf22361(0x2f2)])==null?[]:_0x20a093,_0x222ea9=(_0xcdd03f=_0x2de704==null?void 0x0:_0x2de704[_0xf22361(0x443)])==null?null:_0xcdd03f,_0x295cbe=!!(_0x222ea9!=null&&_0x222ea9['sid'])&&!!(_0x222ea9!=null&&_0x222ea9['reqId']);this['_changesetSessionId']=_0x295cbe?_0x222ea9[_0xf22361(0x48c)]:(0x0,e['uuidv4'])(),this[_0xf22361(0x1b1)]=_0x295cbe?_0x222ea9[_0xf22361(0x28c)]:0x0;let _0x55f5bc=this[_0xf22361(0x383)];try{this['_replayCachedMutations'](_0x222ea9,_0x16133d);}catch(_0x50d193){this[_0xf22361(0x204)][_0xf22361(0x1ec)](_0x50d193);}let _0x3fc855=this[_0xf22361(0x3a8)]();if(_0x446d87){let _0x2010b5=Te(this['_injector'],_0x55f5bc,this[_0xf22361(0x3bf)],_0x222ea9,_0x16133d,_0x3fc855);return _0x2010b5 instanceof j?_0x2010b5[_0xf22361(0x29d)]():(_0x2010b5 instanceof N||_0x2010b5 instanceof M)&&_0x2010b5[_0xf22361(0x276)](),_0x2010b5;}return this[_0xf22361(0x301)][_0xf22361(0x427)](F,_0x55f5bc,this[_0xf22361(0x3bf)],_0x222ea9,_0x16133d,_0x3fc855);}['_replayCachedMutations'](_0x58fd2f,_0x2cb610){const _0x2e96ee=_0x1abb79;var _0xe1b0e2,_0x12b1e1;let _0x25b371=this[_0x2e96ee(0x25a)][_0x2e96ee(0x35f)][_0x2e96ee(0x3dc)](this[_0x2e96ee(0x25a)][_0x2e96ee(0x35f)][_0x2e96ee(0x43d)]()['COMPRESS_MUTATION_APPLY']);(_0xe1b0e2=_0x25b371((_0x58fd2f==null?void 0x0:_0x58fd2f[_0x2e96ee(0x2f2)])||[],null))==null||_0xe1b0e2[_0x2e96ee(0x222)](_0x19aa69=>this['_commandService'][_0x2e96ee(0x253)](_0x19aa69['id'],_0x19aa69['params'])),(_0x12b1e1=_0x25b371(_0x2cb610||[],null))==null||_0x12b1e1[_0x2e96ee(0x222)](_0x2b8a91=>this['_commandService'][_0x2e96ee(0x253)](_0x2b8a91['id'],_0x2b8a91['params']));}};L=y([v(0x3,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x1d5)])),v(0x4,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x1c3)])),v(0x5,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x20c)])),v(0x6,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x2b2)])),v(0x7,(0x0,t[_0x1abb79(0x3cc)])(_)),v(0x8,t[_0x1abb79(0x31a)]),v(0x9,t[_0x1abb79(0x22c)]),v(0xa,t[_0x1abb79(0x426)]),v(0xb,t['IPermissionService']),v(0xc,(0x0,t[_0x1abb79(0x323)])(w)),v(0xd,(0x0,t[_0x1abb79(0x323)])(S))],L);let R=class extends L{constructor(_0xd0caed,_0x4e7fad,_0x4600c2,_0x33bde5,_0x3c5868,_0x3f33b5,_0x91035c,_0x26d783,_0x5422b6,_0x233894,_0x1624bb,_0xd2e542,_0x531066,_0x283d22){const _0x4424e0=_0x1abb79;super(_0xd0caed,_0x4600c2,_0x4e7fad,_0x33bde5,_0x3c5868,_0x3f33b5,_0x91035c,_0x26d783,_0x5422b6,_0x233894,_0x1624bb,_0xd2e542,_0x531066,_0x283d22),this[_0x4424e0(0x383)]=_0xd0caed,this[_0x4424e0(0x1ae)]=_0x4e7fad,g(this,'_handlerCallback',null);}[_0x1abb79(0x450)](_0x3b8778){const _0xbe610c=_0x1abb79;this[_0xbe610c(0x29a)]=_0x3b8778;}[_0x1abb79(0x370)](){const _0x1ac8ec=_0x1abb79;this[_0x1ac8ec(0x29a)]=null,super[_0x1ac8ec(0x370)]();}[_0x1abb79(0x3a8)](){const _0x18c8c7=_0x1abb79;let _0x1a68c3=super['_createHandler']();return _0x1a68c3[_0x18c8c7(0x42f)]=_0x2ce620=>{const _0x348d3c=_0x18c8c7;var _0x2ca444,_0xbb5421;return(_0x2ca444=this[_0x348d3c(0x29a)])==null||(_0xbb5421=_0x2ca444['onTransformIME'])==null?void 0x0:_0xbb5421[_0x348d3c(0x25c)](_0x2ca444,_0x2ce620);},_0x1a68c3[_0x18c8c7(0x252)]=_0x4cbe08=>{const _0x4ef3db=_0x18c8c7;var _0xf2b00,_0x875fd2;return(_0xf2b00=this[_0x4ef3db(0x29a)])==null||(_0x875fd2=_0xf2b00[_0x4ef3db(0x252)])==null?void 0x0:_0x875fd2[_0x4ef3db(0x25c)](_0xf2b00,_0x4cbe08);},_0x1a68c3[_0x18c8c7(0x41f)]=_0x504457=>{const _0x1a2ee0=_0x18c8c7;var _0x2cc262,_0x31c4a5;return(_0x2cc262=this[_0x1a2ee0(0x29a)])==null||(_0x31c4a5=_0x2cc262[_0x1a2ee0(0x41f)])==null?void 0x0:_0x31c4a5[_0x1a2ee0(0x25c)](_0x2cc262,_0x504457);},_0x1a68c3['onSyncEditingCollabCursor']=_0x473ea6=>{const _0x1f1872=_0x18c8c7;var _0x4f4a01,_0xcefc8a;return(_0x4f4a01=this['_handlerCallback'])==null||(_0xcefc8a=_0x4f4a01[_0x1f1872(0x258)])==null?void 0x0:_0xcefc8a[_0x1f1872(0x25c)](_0x4f4a01,_0x473ea6);},_0x1a68c3[_0x18c8c7(0x27f)]=_0x3d2f98=>{const _0x2c14b9=_0x18c8c7;var _0x366579,_0x1686f8,_0x4d801f;if(!((_0x366579=this[_0x2c14b9(0x29a)])!=null&&_0x366579[_0x2c14b9(0x27f)]))throw Error(_0x2c14b9(0x38a));return(_0x1686f8=this[_0x2c14b9(0x29a)])==null||(_0x4d801f=_0x1686f8[_0x2c14b9(0x27f)])==null?void 0x0:_0x4d801f['call'](_0x1686f8,_0x3d2f98);},_0x1a68c3[_0x18c8c7(0x1e0)]=_0x4ef689=>{const _0xb356b2=_0x18c8c7;var _0x1e399a,_0x2178ea,_0x5d11ab;if(!((_0x1e399a=this[_0xb356b2(0x29a)])!=null&&_0x1e399a[_0xb356b2(0x1e0)]))throw Error('onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.');return(_0x2178ea=this['_handlerCallback'])==null||(_0x5d11ab=_0x2178ea[_0xb356b2(0x1e0)])==null?void 0x0:_0x5d11ab[_0xb356b2(0x25c)](_0x2178ea,_0x4ef689);},_0x1a68c3;}async[_0x1abb79(0x216)](){const _0x743a1a=_0x1abb79;let _0x594492=await super[_0x743a1a(0x216)]();return this[_0x743a1a(0x2d3)](this['_commandService'][_0x743a1a(0x2b1)]((_0x357056,_0x5b5cfd)=>{const _0x50ebb6=_0x743a1a;if(_0x357056[_0x50ebb6(0x1ae)]!==t[_0x50ebb6(0x429)][_0x50ebb6(0x360)]||_0x5b5cfd!=null&&_0x5b5cfd['fromCollab']||_0x5b5cfd!=null&&_0x5b5cfd['onlyLocal']||_0x357056['id']===n[_0x50ebb6(0x2cb)]['id'])return;let _0x227199=_0x357056[_0x50ebb6(0x2dc)];if((_0x227199==null?void 0x0:_0x227199[_0x50ebb6(0x355)])!==this[_0x50ebb6(0x383)])return;let _0x13a6c7=_0x357056,_0x570784=this[_0x50ebb6(0x25a)][_0x50ebb6(0x35f)][_0x50ebb6(0x3dc)](this['_compressMutationService'][_0x50ebb6(0x35f)]['getInterceptPoints']()[_0x50ebb6(0x414)])([_0x13a6c7],this[_0x50ebb6(0x489)])||[_0x13a6c7];this[_0x50ebb6(0x363)](_0x570784[0x0]);})),_0x594492;}};R=y([v(0x3,(0x0,t[_0x1abb79(0x3cc)])(t['Injector'])),v(0x4,(0x0,t[_0x1abb79(0x3cc)])(e['CompressMutationService'])),v(0x5,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x20c)])),v(0x6,(0x0,t['Inject'])(e[_0x1abb79(0x2b2)])),v(0x7,(0x0,t[_0x1abb79(0x3cc)])(_)),v(0x8,t[_0x1abb79(0x31a)]),v(0x9,t['ILogService']),v(0xa,t['ICommandService']),v(0xb,t['IPermissionService']),v(0xc,(0x0,t['Optional'])(w)),v(0xd,(0x0,t[_0x1abb79(0x323)])(S))],R);let z=class extends L{constructor(_0x3d3b4c,_0x16d366,_0x287e98,_0x26f898,_0x2a232e,_0xf8f2eb,_0x51ca73,_0x12eb81,_0x42fbe8,_0x8be63a,_0x36903a,_0x469593,_0x5b63a9,_0x2ce7f9,_0x31ee3b){const _0x471843=_0x1abb79;super(_0x3d3b4c,_0x287e98,_0x16d366,_0x26f898,_0x2a232e,_0xf8f2eb,_0x51ca73,_0x42fbe8,_0x8be63a,_0x36903a,_0x469593,_0x5b63a9,_0x2ce7f9,_0x31ee3b),this[_0x471843(0x383)]=_0x3d3b4c,this[_0x471843(0x1ae)]=_0x16d366,this[_0x471843(0x315)]=_0x12eb81;}[_0x1abb79(0x3a8)](){const _0x22e5b1=_0x1abb79;let _0x507a94=super[_0x22e5b1(0x3a8)]();return _0x507a94['onTransformSelections']=_0x3021bd=>this[_0x22e5b1(0x315)][_0x22e5b1(0x36c)](_0x3021bd),_0x507a94;}async[_0x1abb79(0x216)](){const _0x575215=_0x1abb79;let _0x3aeb82=await super[_0x575215(0x216)]();return this['disposeWithMe'](this[_0x575215(0x2a2)][_0x575215(0x2b1)]((_0x28b95f,_0x57662d)=>{const _0x112ef5=_0x575215;if(_0x28b95f['type']!==t[_0x112ef5(0x429)][_0x112ef5(0x360)]||_0x57662d!=null&&_0x57662d['fromCollab']||_0x57662d!=null&&_0x57662d['onlyLocal'])return;let _0x202b01=_0x28b95f[_0x112ef5(0x2dc)];if((_0x202b01==null?void 0x0:_0x202b01[_0x112ef5(0x355)])!==this[_0x112ef5(0x383)])return;let _0xed88d2=_0x28b95f,_0x5d560b=this[_0x112ef5(0x25a)]['interceptor'][_0x112ef5(0x3dc)](this[_0x112ef5(0x25a)]['interceptor'][_0x112ef5(0x43d)]()[_0x112ef5(0x414)])([_0xed88d2],this[_0x112ef5(0x489)])||[_0xed88d2];this[_0x112ef5(0x363)](_0x5d560b[0x0]);})),_0x3aeb82;}};z=y([v(0x3,(0x0,t['Inject'])(t[_0x1abb79(0x1d5)])),v(0x4,(0x0,t[_0x1abb79(0x3cc)])(e[_0x1abb79(0x1c3)])),v(0x5,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x20c)])),v(0x6,(0x0,t[_0x1abb79(0x3cc)])(e['RevisionService'])),v(0x7,(0x0,t['Inject'])(C)),v(0x8,(0x0,t[_0x1abb79(0x3cc)])(_)),v(0x9,t['IUniverInstanceService']),v(0xa,t[_0x1abb79(0x22c)]),v(0xb,t[_0x1abb79(0x426)]),v(0xc,t[_0x1abb79(0x2ad)]),v(0xd,(0x0,t[_0x1abb79(0x323)])(w)),v(0xe,(0x0,t[_0x1abb79(0x323)])(S))],z);const Ee=(0x0,t[_0x1abb79(0x205)])(_0x1abb79(0x45e));function De(_0x5a927d){const _0xada70f=_0x1abb79;let _0x4b6f12=_0x5a927d[_0xada70f(0x471)],_0x6d39e0=JSON[_0xada70f(0x1d3)](_0x4b6f12);switch(_0x6d39e0[_0xada70f(0x2d2)]){case a[_0xada70f(0x279)][_0xada70f(0x2f5)]:case a[_0xada70f(0x279)][_0xada70f(0x44c)]:{let _0x416f02=_0x6d39e0[_0xada70f(0x3db)];return{..._0x6d39e0,'data':_0x416f02,'cmd':_0x6d39e0[_0xada70f(0x2d2)]};}case a['CombCmd'][_0xada70f(0x1c2)]:{let _0x4d565f=_0x6d39e0[_0xada70f(0x243)];return{..._0x6d39e0,'data':_0x4d565f,'cmd':_0x6d39e0[_0xada70f(0x2d2)]};}case a['CombCmd']['RECV']:{let _0x4bf81a=_0x6d39e0[_0xada70f(0x288)];switch(_0x4bf81a['eventID']){case e[_0xada70f(0x380)][_0xada70f(0x224)]:var _0x5ebd81;return{..._0x6d39e0,'data':{..._0x4bf81a,'data':(_0x5ebd81=_0x4bf81a[_0xada70f(0x3ea)])==null?void 0x0:_0x5ebd81['cs']},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)][_0xada70f(0x2e4)]:var _0xb1f2e6;return{..._0x6d39e0,'data':{..._0x4bf81a,'data':(_0xb1f2e6=_0x4bf81a[_0xada70f(0x403)])==null?void 0x0:_0xb1f2e6['cs']},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)][_0xada70f(0x486)]:var _0xe31b1b;return{..._0x6d39e0,'data':{..._0x4bf81a,'data':(_0xe31b1b=_0x4bf81a[_0xada70f(0x306)])==null?void 0x0:_0xe31b1b['cs']},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)]['CHANGESET_REJ']:var _0xdc1448;return{..._0x6d39e0,'data':{..._0x4bf81a,'data':(_0xdc1448=_0x4bf81a[_0xada70f(0x219)])==null?void 0x0:_0xdc1448['cs']},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)][_0xada70f(0x2d1)]:var _0x202dc9;return{..._0x6d39e0,'data':{..._0x4bf81a,'data':(_0x202dc9=_0x4bf81a['csShouldRetryEvent'])==null?void 0x0:_0x202dc9['cs']},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)][_0xada70f(0x1f1)]:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a[_0xada70f(0x26f)]},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e['CollaborationEvent'][_0xada70f(0x3be)]:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a['joinEvent']},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)][_0xada70f(0x271)]:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a[_0xada70f(0x3cb)]},'cmd':_0x6d39e0['cmd']};case e[_0xada70f(0x380)][_0xada70f(0x1e9)]:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a[_0xada70f(0x3da)]},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e['CollaborationEvent']['LIVESHARE_FETCH_OPERATIONS']:case e['CollaborationEvent']['LIVESHARE_OPERATION']:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a[_0xada70f(0x31f)]},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e['CollaborationEvent'][_0xada70f(0x238)]:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a[_0xada70f(0x3da)]},'cmd':_0x6d39e0['cmd']};case e[_0xada70f(0x380)][_0xada70f(0x1e3)]:return{..._0x6d39e0,'data':_0x4bf81a,'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)]['COMMENT_UPDATE']:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a[_0xada70f(0x3f0)]},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)]['UPDATE_PERMISSION_OBJ']:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a['updatePermissionObjEvent']},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)][_0xada70f(0x2ec)]:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a[_0xada70f(0x262)]},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};case e[_0xada70f(0x380)][_0xada70f(0x1cc)]:return{..._0x6d39e0,'data':{..._0x4bf81a,'data':_0x4bf81a['uniscriptRunEvent']},'cmd':_0x6d39e0[_0xada70f(0x2d2)]};default:return _0x6d39e0;}}default:return _0x6d39e0;}}function Oe(_0xf144cb){const _0x3c0618=_0x1abb79;switch(_0xf144cb[_0x3c0618(0x2d2)]){case a['CombCmd'][_0x3c0618(0x2f5)]:case a[_0x3c0618(0x279)][_0x3c0618(0x44c)]:return JSON['stringify']({'cmd':_0xf144cb[_0x3c0618(0x2d2)],'routeKey':_0xf144cb[_0x3c0618(0x459)]});case a['CombCmd']['INGEST']:{let _0x14bb12;switch(_0xf144cb[_0x3c0618(0x471)][_0x3c0618(0x20b)]){case e[_0x3c0618(0x380)][_0x3c0618(0x1f1)]:_0x14bb12={'eventID':e['CollaborationEvent'][_0x3c0618(0x1f1)],'updateCursorEvent':_0xf144cb[_0x3c0618(0x471)][_0x3c0618(0x471)]};break;case e[_0x3c0618(0x380)][_0x3c0618(0x271)]:_0x14bb12={'eventID':e[_0x3c0618(0x380)][_0x3c0618(0x271)],'leaveEvent':_0xf144cb[_0x3c0618(0x471)][_0x3c0618(0x471)]};break;case e[_0x3c0618(0x380)][_0x3c0618(0x3be)]:_0x14bb12={'eventID':e['CollaborationEvent'][_0x3c0618(0x3be)],'joinEvent':_0xf144cb[_0x3c0618(0x471)]['data']};break;case e['CollaborationEvent'][_0x3c0618(0x1e9)]:_0x14bb12={'eventID':e[_0x3c0618(0x380)]['LIVESHARE_NEW_HOST'],'liveShareNewHost':_0xf144cb[_0x3c0618(0x471)][_0x3c0618(0x471)]};break;case e[_0x3c0618(0x380)][_0x3c0618(0x43e)]:_0x14bb12={'eventID':e[_0x3c0618(0x380)][_0x3c0618(0x43e)],'liveShareOperation':_0xf144cb[_0x3c0618(0x471)][_0x3c0618(0x471)]};break;case e['CollaborationEvent'][_0x3c0618(0x238)]:_0x14bb12={'eventID':e[_0x3c0618(0x380)]['LIVESHARE_TERMINATE'],'liveShareTerminate':_0xf144cb[_0x3c0618(0x471)][_0x3c0618(0x471)]};break;case e[_0x3c0618(0x380)]['LIVESHARE_REQUEST_HOST']:_0x14bb12={'eventID':e[_0x3c0618(0x380)][_0x3c0618(0x472)],'liveShareRequestHost':_0xf144cb['data'][_0x3c0618(0x471)]};break;case e['CollaborationEvent'][_0x3c0618(0x2d4)]:_0x14bb12={'eventID':e[_0x3c0618(0x380)][_0x3c0618(0x2d4)]};break;default:_0x14bb12={'eventID':_0xf144cb[_0x3c0618(0x471)][_0x3c0618(0x20b)]};}return JSON[_0x3c0618(0x20e)]({'cmd':_0xf144cb['cmd'],'routeKey':_0xf144cb[_0x3c0618(0x459)],'collaMsg':_0x14bb12});}case a[_0x3c0618(0x279)][_0x3c0618(0x1c2)]:return JSON['stringify']({'cmd':_0xf144cb[_0x3c0618(0x2d2)],'routeKey':_0xf144cb['routeKey'],'joinReq':_0xf144cb[_0x3c0618(0x471)]});case a[_0x3c0618(0x279)][_0x3c0618(0x390)]:return JSON[_0x3c0618(0x20e)]({'cmd':_0xf144cb[_0x3c0618(0x2d2)],'routeKey':_0xf144cb[_0x3c0618(0x459)],'leaveReq':_0xf144cb[_0x3c0618(0x471)]});default:throw Error('[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!');}}const B=(0x0,t[_0x1abb79(0x205)])(_0x1abb79(0x3c9));function ke(_0x1bcacc,_0x160e09,_0x5e086d){const _0x25758d=_0x1abb79;return _0x1bcacc+'/'+_0x160e09+_0x25758d(0x3d8)+_0x5e086d+_0x25758d(0x47c);}let V=class extends t[_0x1abb79(0x378)]{constructor(_0x3ba9f3,_0x537f09,_0xef58e3,_0x9848e,_0x22a614){const _0x728983=_0x1abb79;super(),this['_injector']=_0x3ba9f3,this[_0x728983(0x470)]=_0x537f09,this[_0x728983(0x1c0)]=_0xef58e3,this[_0x728983(0x204)]=_0x9848e,this[_0x728983(0x479)]=_0x22a614;}[_0x1abb79(0x26e)](_0x490c6c){const _0x45e5ec=_0x1abb79;let _0x660d9a=this[_0x45e5ec(0x301)]['get'](c[_0x45e5ec(0x268)]);if(!_0x660d9a)throw Error('[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!');let _0x1edd6b=_0x660d9a[_0x45e5ec(0x2ef)](_0x490c6c);if(!_0x1edd6b)throw Error(_0x45e5ec(0x469));let _0x21d3bc=new t[(_0x45e5ec(0x2c0))](),_0x51197b=new i[(_0x45e5ec(0x3b3))]();_0x21d3bc['add'](_0x1edd6b['close$'][_0x45e5ec(0x2ed)](_0x5378aa=>_0x51197b[_0x45e5ec(0x343)](_0x5378aa))),_0x21d3bc[_0x45e5ec(0x2bc)]((0x0,t[_0x45e5ec(0x431)])(()=>_0x51197b['complete']()));let _0x504a3d=new i[(_0x45e5ec(0x3b3))]();_0x21d3bc[_0x45e5ec(0x2bc)](_0x1edd6b['error$'][_0x45e5ec(0x2ed)](_0x443041=>_0x504a3d[_0x45e5ec(0x343)](_0x443041))),_0x21d3bc[_0x45e5ec(0x2bc)]((0x0,t[_0x45e5ec(0x431)])(()=>_0x504a3d[_0x45e5ec(0x23c)]()));let _0x1c5a15=new i['Subject']();_0x21d3bc[_0x45e5ec(0x2bc)](_0x1edd6b['message$'][_0x45e5ec(0x2ed)](_0x47f522=>{const _0x34d042=_0x45e5ec;let _0xc48c7=De(_0x47f522);_0x1c5a15[_0x34d042(0x343)](_0xc48c7);})),_0x21d3bc[_0x45e5ec(0x2bc)]((0x0,t['toDisposable'])(()=>_0x1c5a15[_0x45e5ec(0x23c)]()));let _0x4b14bb,_0x214cca=()=>{const _0x46f324=_0x45e5ec;_0x504a3d[_0x46f324(0x343)](new Event(_0x46f324(0x280))),_0x51197b['next'](new Event(_0x46f324(0x280))),_0x4b14bb[_0x46f324(0x28b)]();};return _0x4b14bb={'memberID':'','close$':_0x51197b[_0x45e5ec(0x234)](),'error$':_0x504a3d[_0x45e5ec(0x234)](),'open$':_0x1edd6b[_0x45e5ec(0x416)],'message$':_0x1c5a15['asObservable'](),'send':_0x5e40fa=>{const _0xf29519=_0x45e5ec;if(_0x5e40fa[_0xf29519(0x2d2)]===a[_0xf29519(0x279)][_0xf29519(0x37e)]){if(_0x5e40fa[_0xf29519(0x471)]['eventID']===e[_0xf29519(0x380)][_0xf29519(0x3e6)]){this[_0xf29519(0x43c)](_0x4b14bb,_0x5e40fa[_0xf29519(0x471)])[_0xf29519(0x2f6)](_0x4dc9b5=>{const _0x2a5f09=_0xf29519;this[_0x2a5f09(0x204)]['error'](_0x4dc9b5),_0x214cca();});return;}if(_0x5e40fa[_0xf29519(0x471)][_0xf29519(0x20b)]===e[_0xf29519(0x380)][_0xf29519(0x2f8)]){let _0x44f2f1=_0x5e40fa[_0xf29519(0x471)];this['_fetchMissChangesets'](_0x44f2f1)[_0xf29519(0x2bf)](_0x494690=>{const _0x2fd2ae=_0xf29519;_0x1c5a15[_0x2fd2ae(0x343)]({'cmd':a[_0x2fd2ae(0x279)][_0x2fd2ae(0x3e7)],'code':a[_0x2fd2ae(0x47a)]['OK'],'routeKey':_0x44f2f1[_0x2fd2ae(0x471)][_0x2fd2ae(0x383)],'routeType':'','data':{'eventID':e[_0x2fd2ae(0x380)][_0x2fd2ae(0x40d)],'data':{'changesets':_0x494690}}});})['catch'](_0x2c82d2=>{const _0x323b87=_0xf29519;this[_0x323b87(0x204)]['error'](_0x2c82d2),_0x214cca();});return;}}_0x1edd6b[_0xf29519(0x357)](Oe(_0x5e40fa));},'close':()=>{const _0x1a40eb=_0x45e5ec;_0x1edd6b[_0x1a40eb(0x28b)](),_0x21d3bc['dispose']();}},_0x4b14bb;}async[_0x1abb79(0x43c)](_0x214147,_0x1282d8){const _0x36631a=_0x1abb79;var _0x40553e;let {unitType:_0x2b0c70,unitID:_0x4c2d17,changeset:_0x49c53f}=_0x1282d8['data'],_0x3c36d0={'unitID':_0x4c2d17,'memberID':_0x214147[_0x36631a(0x1fd)],'type':_0x2b0c70,'changeset':(0x0,e[_0x36631a(0x1b0)])(_0x49c53f)},_0x41437a=this[_0x36631a(0x1c0)][_0x36631a(0x300)](T),_0x73973e=ke((_0x40553e=_0x41437a==null?void 0x0:_0x41437a[_0x36631a(0x2b0)])==null?_0x36631a(0x2a7):_0x40553e,_0x2b0c70,_0x4c2d17);try{await this[_0x36631a(0x470)]['post'](_0x73973e,{'body':_0x3c36d0});}catch(_0x5bf81c){throw this[_0x36631a(0x204)]['error'](_0x36631a(0x466),_0x36631a(0x241)),_0x5bf81c;}}async['_fetchMissChangesets'](_0x2d9805){const _0x2b8768=_0x1abb79;let {unitID:_0x29acf3,from:_0x560a9b,to:_0x515d4e,unitType:_0xa9c73f}=_0x2d9805['data'];return(await this[_0x2b8768(0x479)][_0x2b8768(0x251)]({'metadata':void 0x0},{'unitID':_0x29acf3,'type':_0xa9c73f,'from':_0x560a9b,'to':_0x515d4e}))[_0x2b8768(0x2c1)]['map'](_0x4adeb7=>((_0x4adeb7['mutations']===null||_0x4adeb7[_0x2b8768(0x2f2)]===void 0x0)&&(_0x4adeb7['mutations']=[]),_0x4adeb7));}};V=y([v(0x0,(0x0,t[_0x1abb79(0x3cc)])(t['Injector'])),v(0x1,(0x0,t[_0x1abb79(0x3cc)])(c[_0x1abb79(0x422)])),v(0x2,t['IConfigService']),v(0x3,t[_0x1abb79(0x22c)]),v(0x4,e[_0x1abb79(0x23d)])],V);let H=class extends t[_0x1abb79(0x378)]{get[_0x1abb79(0x1c4)](){const _0xf2d24c=_0x1abb79;return this['_socket$'][_0xf2d24c(0x3b6)]();}constructor(_0x29aa61,_0x2f1f90,_0x273e71,_0x1af6be,_0xa715f,_0xb84deb){const _0x1df220=_0x1abb79;super(),this[_0x1df220(0x301)]=_0x29aa61,this[_0x1df220(0x204)]=_0x2f1f90,this[_0x1df220(0x1c0)]=_0x273e71,this[_0x1df220(0x3c7)]=_0x1af6be,this[_0x1df220(0x420)]=_0xa715f,this[_0x1df220(0x246)]=_0xb84deb,g(this,_0x1df220(0x352),new i[(_0x1df220(0x428))](void 0x0)),g(this,_0x1df220(0x296),this['_socket$'][_0x1df220(0x234)]()),g(this,_0x1df220(0x1d7),null),g(this,_0x1df220(0x379),new Map()),g(this,_0x1df220(0x26a),new i[(_0x1df220(0x428))](0x0)),g(this,_0x1df220(0x236),this[_0x1df220(0x26a)][_0x1df220(0x234)]()),g(this,_0x1df220(0x232),!0x1),g(this,_0x1df220(0x2e6),void 0x0),g(this,_0x1df220(0x2a8),0x0),g(this,_0x1df220(0x1e6),null),g(this,'_sendHeartbeatTimer',void 0x0),g(this,_0x1df220(0x1fb),void 0x0),this[_0x1df220(0x381)]();}[_0x1abb79(0x381)](){const _0x7a01f8=_0x1abb79;this[_0x7a01f8(0x246)]&&this['disposeWithMe'](this['_networkConditionService'][_0x7a01f8(0x3f9)][_0x7a01f8(0x2ed)](_0x25cc35=>{const _0x4a2171=_0x7a01f8;_0x25cc35&&!this[_0x4a2171(0x1c4)]&&this[_0x4a2171(0x3fd)](),_0x25cc35||this[_0x4a2171(0x2ab)]();}));}[_0x1abb79(0x370)](){const _0x53f77e=_0x1abb79;var _0x11d420;super[_0x53f77e(0x370)](),(_0x11d420=this[_0x53f77e(0x1e6)])==null||_0x11d420[_0x53f77e(0x1db)](),this['_socketMessageSubscription']=null,this['_clearRetryConnectingTimer'](),this[_0x53f77e(0x38c)](),this[_0x53f77e(0x25f)](),this[_0x53f77e(0x379)][_0x53f77e(0x222)](_0x206627=>_0x206627[_0x53f77e(0x370)]()),this['_sessions'][_0x53f77e(0x3aa)](),this['_status$']['complete']();}async[_0x1abb79(0x3c1)](_0x385327){const _0x38f085=_0x1abb79;if(this['_sessions']['has'](_0x385327))return this['_sessions'][_0x38f085(0x277)](_0x385327);this[_0x38f085(0x1aa)]();let _0x2e60da=this[_0x38f085(0x301)][_0x38f085(0x427)](x,_0x385327,this[_0x38f085(0x352)][_0x38f085(0x234)]());return this[_0x38f085(0x379)]['set'](_0x385327,_0x2e60da),_0x2e60da;}['closeSession'](_0x5a0921){const _0x3e8313=_0x1abb79;let _0x28c023=this['_sessions'][_0x3e8313(0x277)](_0x5a0921);if(_0x28c023&&(this[_0x3e8313(0x379)]['delete'](_0x5a0921),_0x28c023[_0x3e8313(0x28b)]()),!this[_0x3e8313(0x379)][_0x3e8313(0x22a)]){var _0x59a48a;(_0x59a48a=this[_0x3e8313(0x1c4)])==null||_0x59a48a['close']();}}[_0x1abb79(0x3fd)](){const _0x43e810=_0x1abb79;this[_0x43e810(0x2a8)]=0x0,this[_0x43e810(0x242)](),this[_0x43e810(0x259)]();}[_0x1abb79(0x242)](){const _0x5f952a=_0x1abb79;this['_retryConnectingTimer']!=null&&(clearTimeout(this[_0x5f952a(0x2e6)]),this[_0x5f952a(0x2e6)]=null);}async[_0x1abb79(0x413)](){const _0x53f076=_0x1abb79;var _0xfb21db;let _0x3e34d3=this[_0x53f076(0x1c0)][_0x53f076(0x300)](T),_0x379ee4=(_0xfb21db=_0x3e34d3==null?void 0x0:_0x3e34d3['collabWebSocketUrl'])==null?p:_0xfb21db,_0x257cfd=await this[_0x53f076(0x3c7)]['createSocket'](_0x379ee4);return this['_candidateSocket']=_0x257cfd,_0x257cfd;}async[_0x1abb79(0x1aa)](){const _0x3d5f4f=_0x1abb79;try{var _0x4f51e3,_0x300943;let _0x305b2c=(_0x4f51e3=(_0x300943=this[_0x3d5f4f(0x1c4)])==null?this['_candidateSocket']:_0x300943)==null?await this['_createSocket']():_0x4f51e3;if(_0x305b2c){var _0x520447;let _0x1098e9=_0x305b2c[_0x3d5f4f(0x357)];_0x305b2c['send']=_0xfb02f6=>(_0xfb02f6[_0x3d5f4f(0x2d2)]!==a[_0x3d5f4f(0x279)][_0x3d5f4f(0x390)]&&this[_0x3d5f4f(0x451)](),_0x1098e9['apply'](_0x305b2c,[_0xfb02f6])),(_0x520447=this[_0x3d5f4f(0x1e6)])==null||_0x520447[_0x3d5f4f(0x1db)](),this[_0x3d5f4f(0x1e6)]=null,this[_0x3d5f4f(0x1e6)]=_0x305b2c[_0x3d5f4f(0x273)][_0x3d5f4f(0x2ed)](_0x32d080=>this[_0x3d5f4f(0x3af)](_0x305b2c,_0x32d080)),_0x305b2c[_0x3d5f4f(0x29f)][_0x3d5f4f(0x3a1)]((0x0,s[_0x3d5f4f(0x32b)])(0x1))[_0x3d5f4f(0x2ed)](_0x5e31c9=>this['_logService'][_0x3d5f4f(0x1ec)](_0x3d5f4f(0x39e),_0x5e31c9)),_0x305b2c[_0x3d5f4f(0x416)]['pipe']((0x0,s['take'])(0x1))['subscribe'](()=>{const _0x8416c4=_0x3d5f4f;this[_0x8416c4(0x452)](_0x305b2c);}),_0x305b2c['close$'][_0x3d5f4f(0x3a1)]((0x0,s[_0x3d5f4f(0x32b)])(0x1))['subscribe'](_0x3c189b=>{const _0xc5ed41=_0x3d5f4f;this[_0xc5ed41(0x204)][_0xc5ed41(0x490)](_0xc5ed41(0x3f2),_0xc5ed41(0x328),_0x3c189b),this[_0xc5ed41(0x22f)]();});}}catch(_0x6f946b){this[_0x3d5f4f(0x204)][_0x3d5f4f(0x1ec)](_0x6f946b),this['_onConnectionFailed']();}}[_0x1abb79(0x452)](_0x130078){const _0x5359af=_0x1abb79;this[_0x5359af(0x204)][_0x5359af(0x490)](_0x5359af(0x3f2),'socket\x20open.'),_0x130078[_0x5359af(0x357)]({'cmd':a[_0x5359af(0x279)][_0x5359af(0x44c)]}),this['_rescheduleHeartbeat']();}[_0x1abb79(0x2ab)](){const _0x4b3142=_0x1abb79;this['_socketReady']=!0x1,this[_0x4b3142(0x1d7)]=null,this['_status$']['next'](0x2),this[_0x4b3142(0x352)][_0x4b3142(0x343)](null),this[_0x4b3142(0x38c)](),this['_clearHeartbeatTimer']();}[_0x1abb79(0x22f)](){const _0x3bca76=_0x1abb79;var _0x10e5d5;this['_onOffline'](),this[_0x3bca76(0x2a8)]<((_0x10e5d5=this['_configService'][_0x3bca76(0x300)]('RETRY_CONNECTING_MAX_COUNT'))==null?0x3:_0x10e5d5)?(this['_collaborationUIEventService'][_0x3bca76(0x1f5)]({'id':'SOCKET_FAILED_RETRY'}),this[_0x3bca76(0x259)]()):this[_0x3bca76(0x420)][_0x3bca76(0x1f5)]({'id':_0x3bca76(0x31e)});}[_0x1abb79(0x259)](){const _0x112b9b=_0x1abb79;var _0xa9b0d2;let _0x463a52=this['_retryCount'],_0x3979f2=this[_0x112b9b(0x1c0)][_0x112b9b(0x300)](T),_0xda6b0b=_0x463a52===0x0?0x0:((_0xa9b0d2=_0x3979f2==null?void 0x0:_0x3979f2[_0x112b9b(0x3a2)])==null?0x4e20:_0xa9b0d2)*0x2**_0x463a52;this['_retryConnectingTimer']=setTimeout(()=>{const _0x4242a6=_0x112b9b;clearTimeout(this[_0x4242a6(0x2e6)]),this['_retryConnectingTimer']=null,this[_0x4242a6(0x1aa)]();},_0xda6b0b),this['_retryCount']+=0x1;}['_onMessage'](_0x232a89,_0x46ddcb){const _0x500d3d=_0x1abb79;let {cmd:_0x1c5d2b}=_0x46ddcb;_0x1c5d2b===a[_0x500d3d(0x279)][_0x500d3d(0x44c)]&&!this['_socketReady']&&(_0x232a89['memberID']=_0x46ddcb[_0x500d3d(0x471)][_0x500d3d(0x1fd)],this[_0x500d3d(0x352)][_0x500d3d(0x343)](_0x232a89),this[_0x500d3d(0x26a)][_0x500d3d(0x343)](0x3),this[_0x500d3d(0x232)]=!0x0,this[_0x500d3d(0x1d7)]=null),_0x1c5d2b===a[_0x500d3d(0x279)][_0x500d3d(0x2f5)]&&this['_clearTimeoutTimer'](),this['_rescheduleHeartbeat']();}[_0x1abb79(0x451)](){const _0x1d56cc=_0x1abb79;var _0x5090f5;this[_0x1d56cc(0x25f)](),this[_0x1d56cc(0x3cd)]=setTimeout(()=>this[_0x1d56cc(0x266)](),(_0x5090f5=this['_configService'][_0x1d56cc(0x300)](_0x1d56cc(0x24c)))==null?0x7530:_0x5090f5);}['_sendHeartbeat'](){const _0x1db07f=_0x1abb79;this[_0x1db07f(0x1c4)][_0x1db07f(0x357)]({'cmd':a[_0x1db07f(0x279)][_0x1db07f(0x2f5)]}),this[_0x1db07f(0x22d)]();}[_0x1abb79(0x22d)](){const _0x1a7529=_0x1abb79;var _0x267d94;this[_0x1a7529(0x1fb)]=setTimeout(()=>this[_0x1a7529(0x22f)](),(_0x267d94=this[_0x1a7529(0x1c0)][_0x1a7529(0x300)]('HEARTBEAT_TIMEOUT'))==null?m:_0x267d94);}['_clearHeartbeatTimer'](){const _0x4ba779=_0x1abb79;this[_0x4ba779(0x3cd)]!=null&&(clearTimeout(this[_0x4ba779(0x3cd)]),this[_0x4ba779(0x3cd)]=null);}[_0x1abb79(0x38c)](){const _0x317001=_0x1abb79;this['_timeoutTimer']!=null&&(clearTimeout(this[_0x317001(0x1fb)]),this[_0x317001(0x1fb)]=null);}};H=y([v(0x0,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x1d5)])),v(0x1,t[_0x1abb79(0x22c)]),v(0x2,t[_0x1abb79(0x2b4)]),v(0x3,B),v(0x4,(0x0,t[_0x1abb79(0x3cc)])(_)),v(0x5,(0x0,t[_0x1abb79(0x323)])(Ee))],H);let U=class extends t['RxDisposable']{constructor(_0x2cf3cb,_0xb032f9,_0x190b50,_0x210692){const _0x1defa6=_0x1abb79;var _0x535a71;super(),this['_injector']=_0x2cf3cb,this[_0x1defa6(0x314)]=_0xb032f9,this['_configService']=_0x190b50,this['_univerInstanceService']=_0x210692,g(this,'_entities',new Map()),g(this,_0x1defa6(0x2cf),new i[(_0x1defa6(0x3b3))]()),g(this,_0x1defa6(0x41c),this[_0x1defa6(0x2cf)][_0x1defa6(0x234)]()),((_0x535a71=this[_0x1defa6(0x1c0)][_0x1defa6(0x300)](_0x1defa6(0x210)))==null?void 0x0:_0x535a71[_0x1defa6(0x2aa)])!==!0x1&&this[_0x1defa6(0x216)]();}['dispose'](){const _0x29d050=_0x1abb79;super[_0x29d050(0x370)](),this[_0x29d050(0x1c5)]['forEach'](_0x4d9a8a=>_0x4d9a8a[_0x29d050(0x370)]()),this[_0x29d050(0x1c5)]['clear']();}[_0x1abb79(0x417)](_0x3bccf5){const _0x5f0cc0=_0x1abb79;var _0x249957;return(_0x249957=this[_0x5f0cc0(0x1c5)][_0x5f0cc0(0x277)](_0x3bccf5))==null?null:_0x249957;}[_0x1abb79(0x2cd)](_0x595ffe){const _0x277649=_0x1abb79;let _0x4d89a1=this[_0x277649(0x417)](_0x595ffe);return _0x4d89a1?(0x0,i['of'])(_0x4d89a1):this[_0x277649(0x2cf)][_0x277649(0x3a1)]((0x0,s[_0x277649(0x37f)])(_0x468cc8=>_0x468cc8[_0x277649(0x383)]===_0x595ffe));}[_0x1abb79(0x1ed)](_0x28ffa1){const _0x310ab3=_0x1abb79;return(0x0,i[_0x310ab3(0x439)])(this['getCollabEntity$'](_0x28ffa1)[_0x310ab3(0x3a1)]((0x0,s[_0x310ab3(0x41d)])(()=>void 0x0)));}[_0x1abb79(0x216)](){const _0x4dcc4c=_0x1abb79;this[_0x4dcc4c(0x489)][_0x4dcc4c(0x44f)](t['UniverInstanceType']['UNIVER_SHEET'])[_0x4dcc4c(0x3a1)]((0x0,i[_0x4dcc4c(0x299)])(this[_0x4dcc4c(0x3ba)]),(0x0,s[_0x4dcc4c(0x294)])(0x10))[_0x4dcc4c(0x2ed)](async _0x398517=>{const _0x56f186=_0x4dcc4c;let _0x4d5b72=_0x398517[_0x56f186(0x338)][_0x56f186(0x261)](),_0x1ad781=await this[_0x56f186(0x441)](_0x4d5b72,t[_0x56f186(0x3b9)][_0x56f186(0x45b)]);this[_0x56f186(0x1c5)][_0x56f186(0x35b)](_0x4d5b72,_0x1ad781);}),this[_0x4dcc4c(0x489)][_0x4dcc4c(0x44f)](t[_0x4dcc4c(0x3b9)][_0x4dcc4c(0x3d3)])[_0x4dcc4c(0x3a1)]((0x0,i['takeUntil'])(this[_0x4dcc4c(0x3ba)]),(0x0,s[_0x4dcc4c(0x294)])(0x10))[_0x4dcc4c(0x3a1)]((0x0,s[_0x4dcc4c(0x37f)])(_0x3834f3=>!_0x3834f3[_0x4dcc4c(0x338)][_0x4dcc4c(0x261)]()[_0x4dcc4c(0x37d)]('__')))['subscribe'](async _0x235d74=>{const _0x5618ac=_0x4dcc4c;let _0xd27992=_0x235d74[_0x5618ac(0x338)]['getUnitId'](),_0xf6bae6=await this['_startCollaboration'](_0xd27992,t[_0x5618ac(0x3b9)][_0x5618ac(0x3d3)]);this[_0x5618ac(0x1c5)][_0x5618ac(0x35b)](_0xd27992,_0xf6bae6);}),(0x0,i[_0x4dcc4c(0x295)])(this[_0x4dcc4c(0x489)][_0x4dcc4c(0x292)](t['UniverInstanceType'][_0x4dcc4c(0x45b)]),this[_0x4dcc4c(0x489)][_0x4dcc4c(0x292)](t[_0x4dcc4c(0x3b9)]['UNIVER_DOC']))['pipe']((0x0,i[_0x4dcc4c(0x299)])(this['dispose$']))['subscribe'](_0x58d1e6=>{const _0x1efd73=_0x4dcc4c;let _0x3adcc2=_0x58d1e6[_0x1efd73(0x261)](),_0x43d99c=this[_0x1efd73(0x1c5)][_0x1efd73(0x277)](_0x3adcc2);_0x43d99c&&(_0x43d99c['dispose'](),this[_0x1efd73(0x1c5)][_0x1efd73(0x3a3)](_0x3adcc2));});}async[_0x1abb79(0x441)](_0x3aa843,_0x34af02){const _0x4b148a=_0x1abb79;let _0x55d5cb=await this[_0x4b148a(0x314)][_0x4b148a(0x3c1)](_0x3aa843),_0x2ebb6b=this[_0x4b148a(0x301)][_0x4b148a(0x427)](this[_0x4b148a(0x347)](_0x34af02),_0x3aa843,_0x34af02,_0x55d5cb);return await _0x2ebb6b[_0x4b148a(0x434)](),this['_entityInit$'][_0x4b148a(0x343)](_0x2ebb6b),_0x2ebb6b;}[_0x1abb79(0x347)](_0x53138b){const _0x25cecb=_0x1abb79;switch(_0x53138b){case t[_0x25cecb(0x3b9)][_0x25cecb(0x3d3)]:return R;case t[_0x25cecb(0x3b9)][_0x25cecb(0x45b)]:return z;default:throw Error(_0x25cecb(0x2d9)+_0x53138b);}}};U=y([v(0x0,(0x0,t['Inject'])(t[_0x1abb79(0x1d5)])),v(0x1,(0x0,t[_0x1abb79(0x3cc)])(H)),v(0x2,t[_0x1abb79(0x2b4)]),v(0x3,t['IUniverInstanceService'])],U);var Ae=_0x1abb79(0x3f8),je=_0x1abb79(0x374);let Me=class extends t[_0x1abb79(0x378)]{constructor(_0x239da9,_0x453bc6){const _0x2f52b6=_0x1abb79;super(),this[_0x2f52b6(0x489)]=_0x239da9,this[_0x2f52b6(0x1c0)]=_0x453bc6,this[_0x2f52b6(0x216)]();}[_0x1abb79(0x216)](){const _0x5ef26e=_0x1abb79;this[_0x5ef26e(0x2d3)](this[_0x5ef26e(0x489)][_0x5ef26e(0x313)]['subscribe'](()=>{const _0x3386fa=_0x5ef26e;var _0xfd6af9;let _0x4f0182=this[_0x3386fa(0x489)][_0x3386fa(0x2a1)](),_0x381e04=(_0xfd6af9=this[_0x3386fa(0x1c0)]['getConfig']('DEFAULT_FILE_NAME'))==null?_0x3386fa(0x3dd):_0xfd6af9;_0x4f0182 instanceof t['Workbook']&&(_0x381e04=_0x4f0182[_0x3386fa(0x29b)]),document[_0x3386fa(0x29c)]=_0x381e04;}));}};Me=y([v(0x0,t[_0x1abb79(0x31a)]),v(0x1,t[_0x1abb79(0x2b4)])],Me);let W=class{constructor(_0x2b04b4,_0x1b4511,_0x177adf){const _0x4f0c03=_0x1abb79;this[_0x4f0c03(0x1c0)]=_0x2b04b4,this[_0x4f0c03(0x470)]=_0x1b4511,this[_0x4f0c03(0x2b8)]=_0x177adf,this[_0x4f0c03(0x434)]();}[_0x1abb79(0x434)](){const _0x279e19=_0x1abb79;this[_0x279e19(0x470)][_0x279e19(0x2c4)]({'priority':0x1,'interceptor':(_0x20e3de,_0x30fa12)=>_0x30fa12(_0x20e3de)[_0x279e19(0x3a1)]((0x0,i[_0x279e19(0x344)])(async _0x1db42f=>{const _0x453f45=_0x279e19;let _0x10a088=_0x1db42f;if(_0x10a088['status']===0x191){if(typeof window>'u')throw Error(_0x453f45(0x2ee));if(window[_0x453f45(0x2b5)](this['localeService']['t'](_0x453f45(0x406)))){let _0x6b894c=window[_0x453f45(0x2e9)](window[_0x453f45(0x3a0)][_0x453f45(0x401)]);window['location'][_0x453f45(0x401)]=this[_0x453f45(0x32f)]()+'?url='+_0x6b894c;}}return _0x10a088;}))});}[_0x1abb79(0x32f)](){const _0x40cdf9=_0x1abb79;var _0x48d6c6;let _0x5ebb12=this[_0x40cdf9(0x1c0)][_0x40cdf9(0x300)](T);return(_0x48d6c6=_0x5ebb12==null?void 0x0:_0x5ebb12['loginUrlKey'])==null?'/universer-api/oidc/authpage':_0x48d6c6;}};function _0x37da(_0x1f5e94,_0x355f7c){_0x1f5e94=_0x1f5e94-0x1aa;const _0x4130d5=_0x4130();let _0x37dac2=_0x4130d5[_0x1f5e94];return _0x37dac2;}W=y([v(0x0,t[_0x1abb79(0x2b4)]),v(0x1,(0x0,t['Inject'])(c[_0x1abb79(0x422)])),v(0x2,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x20c)]))],W);let G=class extends t[_0x1abb79(0x378)]{constructor(_0x243bb8,_0x157560){const _0x46efc1=_0x1abb79;super(),this[_0x46efc1(0x318)]=_0x243bb8,this[_0x46efc1(0x1c0)]=_0x157560,g(this,_0x46efc1(0x30e),!0x1),this[_0x46efc1(0x308)]();}[_0x1abb79(0x308)](){const _0x1947e6=_0x1abb79;let _0x3efc46=this;this[_0x1947e6(0x2d3)](this[_0x1947e6(0x318)][_0x1947e6(0x2c4)]({'priority':0x3e7,'interceptor':(0x0,c[_0x1947e6(0x21d)])({'isMatch'(_0x12b53e){const _0xbbf1d5=_0x1947e6;var _0x8a2e85;if(_0x12b53e[_0xbbf1d5(0x482)]===_0xbbf1d5(0x1af)&&(_0x8a2e85=_0x12b53e[_0xbbf1d5(0x1ca)])!=null&&_0x8a2e85['body']){let {objectID:_0xf98bf7,objectType:_0xc4ef48}=_0x12b53e['requestParams'][_0xbbf1d5(0x230)]||{};if(!_0xf98bf7||_0xc4ef48===void 0x0)return!0x1;let _0xb3b1f4=_0x3efc46[_0xbbf1d5(0x356)]()+'/'+_0xc4ef48+'/object/'+_0xf98bf7+_0xbbf1d5(0x3ac);if(_0x12b53e[_0xbbf1d5(0x389)]===_0xb3b1f4)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x4f2a24){const _0x13adcb=_0x1947e6;var _0x39fb76;return(_0x39fb76=_0x4f2a24[_0x13adcb(0x1ca)])==null?void 0x0:_0x39fb76[_0x13adcb(0x230)];},'mergeParamsToRequest'(_0x2cb69b,_0x1bf4d3){const _0x537926=_0x1947e6;let _0x3c6312=_0x3efc46[_0x537926(0x356)]()+_0x537926(0x21f),_0x44cb5b=_0x2cb69b['reduce']((_0x289898,_0x3e6bce)=>{const _0x3dcd75=_0x537926;let {unitID:_0x44aafe,objectID:_0x424017,objectType:_0x23690e,actions:_0x13bf5a}=_0x3e6bce;return _0x289898[_0x44aafe]||(_0x289898[_0x44aafe]=Object[_0x3dcd75(0x1dc)](null)),_0x289898[_0x44aafe][_0x424017]||(_0x289898[_0x44aafe][_0x424017]={'objectID':_0x424017,'objectType':_0x23690e,'actions':[]}),_0x289898[_0x44aafe][_0x424017][_0x3dcd75(0x25d)][_0x3dcd75(0x3ed)](..._0x13bf5a),_0x289898;},Object['create'](null)),_0xaf1348=[];for(let _0x3b8758 in _0x44cb5b)for(let _0x34efc4 in _0x44cb5b[_0x3b8758]){let {actions:_0x2ef748,objectType:_0x15f9a9}=_0x44cb5b[_0x3b8758][_0x34efc4],_0x2839a6=[...new Set(_0x2ef748)];_0xaf1348[_0x537926(0x3ed)]({'unitID':_0x3b8758,'objectID':_0x34efc4,'objectType':_0x15f9a9,'actions':_0x2839a6});}return new c[(_0x537926(0x310))]('POST',_0x3c6312,{'headers':_0x1bf4d3['headers'],'withCredentials':_0x1bf4d3[_0x537926(0x430)],'responseType':_0x1bf4d3['responseType'],'body':{'requests':_0xaf1348}});}},{'distributeResult'(_0x3578ef,_0x1d1b3e){const _0x44e4ef=_0x1947e6;let {objectActions:_0x4e694e}=_0x3578ef;return _0x1d1b3e[_0x44e4ef(0x41d)](_0x3a6138=>{const _0x1c94f5=_0x44e4ef;let {unitID:_0x3a2d49,objectID:_0x5f56a4,actions:_0x26a09c}=_0x3a6138,_0x365e10=_0x4e694e[_0x1c94f5(0x2eb)](_0x3da4ed=>_0x3da4ed[_0x1c94f5(0x383)]===_0x3a2d49&&_0x3da4ed['objectID']===_0x5f56a4);return{'config':_0x3a6138,'result':{'actions':_0x26a09c[_0x1c94f5(0x41d)](_0x243a82=>_0x365e10==null?void 0x0:_0x365e10[_0x1c94f5(0x25d)]['find'](_0x57cc4a=>_0x57cc4a[_0x1c94f5(0x2d0)]===_0x243a82))[_0x1c94f5(0x37f)](_0x265f76=>!!_0x265f76),'error':_0x3578ef[_0x1c94f5(0x1ec)]}};});}})}));}['_getAPIPrefixPath'](){const _0x47fca7=_0x1abb79;var _0x2b2218;let _0x463faf=this['_configService'][_0x47fca7(0x300)](T);return(_0x2b2218=_0x463faf==null?void 0x0:_0x463faf[_0x47fca7(0x33c)])==null?_0x47fca7(0x371):_0x2b2218;}async[_0x1abb79(0x1dc)](_0x4c8ef1){const _0x353fa3=_0x1abb79;let _0x312d67=this[_0x353fa3(0x356)]()+'/'+_0x4c8ef1[_0x353fa3(0x2f0)]+'/object';return(await this['_HTTPService'][_0x353fa3(0x3b8)](_0x312d67,{'body':_0x4c8ef1}))[_0x353fa3(0x230)]['objectID']||'';}async['list'](_0x2ffa82){const _0x1f478f=_0x1abb79;let _0x2b2202=this[_0x1f478f(0x356)]()+_0x1f478f(0x39c);return(await this[_0x1f478f(0x318)][_0x1f478f(0x3b8)](_0x2b2202,{'body':_0x2ffa82}))['body']['objects'];}async[_0x1abb79(0x1c6)](_0x255ff6){const _0x205b07=_0x1abb79;var _0x3e1f64;let _0x3a8a41=this[_0x205b07(0x356)]()+'/'+_0x255ff6[_0x205b07(0x2f0)]+'/object/'+_0x255ff6[_0x205b07(0x387)],_0x57ba29=await this[_0x205b07(0x318)][_0x205b07(0x3eb)](_0x3a8a41,{'body':_0x255ff6});if((_0x57ba29==null||(_0x3e1f64=_0x57ba29[_0x205b07(0x230)])==null||(_0x3e1f64=_0x3e1f64[_0x205b07(0x1ec)])==null?void 0x0:_0x3e1f64[_0x205b07(0x485)])!==0x1)throw Error(_0x205b07(0x1ee));}async[_0x1abb79(0x231)](_0x4600f4){const _0x588289=_0x1abb79;let _0x15047e=this[_0x588289(0x356)]()+'/'+_0x4600f4['objectType']+_0x588289(0x462)+_0x4600f4[_0x588289(0x387)]+'/allowed';return(await this[_0x588289(0x318)][_0x588289(0x3b8)](_0x15047e,{'body':_0x4600f4}))[_0x588289(0x230)][_0x588289(0x25d)];}async[_0x1abb79(0x2e0)](_0x2e88dd){const _0x4f70c9=_0x1abb79;let _0x407b40=this[_0x4f70c9(0x356)]()+_0x4f70c9(0x21f);return(await this['_HTTPService']['post'](_0x407b40,{'body':{'requests':_0x2e88dd}}))[_0x4f70c9(0x230)][_0x4f70c9(0x48e)];}async[_0x1abb79(0x2a6)](_0x2d85db){const _0x5a55aa=_0x1abb79;let _0x3228ce=this[_0x5a55aa(0x356)]()+'/'+_0x2d85db[_0x5a55aa(0x2f0)]+_0x5a55aa(0x2cc),_0x3ab0be=await this[_0x5a55aa(0x318)][_0x5a55aa(0x3b8)](_0x3228ce,{'body':_0x2d85db});return{'roles':_0x3ab0be[_0x5a55aa(0x230)][_0x5a55aa(0x1c7)],'actions':_0x3ab0be['body'][_0x5a55aa(0x25d)]};}async['deleteCollaborator'](_0x4dcdfa){const _0x51034d=_0x1abb79;let _0x309504=this[_0x51034d(0x356)]()+'/collaborator';await this[_0x51034d(0x318)][_0x51034d(0x3a3)](_0x309504,{'params':{'collaboratorID':_0x4dcdfa[_0x51034d(0x24e)],'objectID':_0x4dcdfa[_0x51034d(0x387)],'unitID':_0x4dcdfa[_0x51034d(0x383)]}});}async[_0x1abb79(0x432)](_0x5b656e){const _0x264318=_0x1abb79;let _0x2b8343=this[_0x264318(0x356)]()+'/collaborator';await this['_HTTPService'][_0x264318(0x201)](_0x2b8343,{'body':_0x5b656e});}async[_0x1abb79(0x3e1)](_0x1dd0a5){const _0x3266b6=_0x1abb79;let _0x1c7efa=this['_getAPIPrefixPath']()+'/collaborator';await this[_0x3266b6(0x318)]['post'](_0x1c7efa,{'body':_0x1dd0a5});}async[_0x1abb79(0x493)](_0x1f1ecc){const _0x4bff62=_0x1abb79;var _0x2f94b2;let _0x1d9bc1=this[_0x4bff62(0x356)]()+'/collaborator',_0xda9e9d=await this[_0x4bff62(0x318)][_0x4bff62(0x277)](_0x1d9bc1,{'params':{'objectID':_0x1f1ecc[_0x4bff62(0x387)],'unitID':_0x1f1ecc[_0x4bff62(0x383)]}});return this['setCfgEnableObjInherit']((_0x2f94b2=_0xda9e9d[_0x4bff62(0x230)][_0x4bff62(0x442)])==null?!0x1:_0x2f94b2),_0xda9e9d['body'][_0x4bff62(0x221)];}async[_0x1abb79(0x454)](_0x2161cb){const _0x4e5969=_0x1abb79;let _0x1fe494=this[_0x4e5969(0x356)]()+'/collaborator';await this[_0x4e5969(0x318)][_0x4e5969(0x3eb)](_0x1fe494,{'body':_0x2161cb});}[_0x1abb79(0x364)](_0x3cdc76){const _0x28a934=_0x1abb79;this[_0x28a934(0x30e)]=_0x3cdc76;}[_0x1abb79(0x396)](){const _0x15c8e5=_0x1abb79;return this[_0x15c8e5(0x30e)];}};G=y([v(0x0,(0x0,t[_0x1abb79(0x3cc)])(c[_0x1abb79(0x422)])),v(0x1,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x2b4)]))],G);function Ne(_0x43da9a){const _0x55b57c=_0x1abb79;let _0x3182d4=atob(_0x43da9a),_0x5983b4=new Uint8Array(_0x3182d4[_0x55b57c(0x2b3)]);for(let _0x17a8bd=0x0;_0x17a8bd<_0x3182d4['length'];_0x17a8bd++)_0x5983b4[_0x17a8bd]=_0x3182d4[_0x55b57c(0x384)](_0x17a8bd);return _0x5983b4;}function Pe(_0x13ac2c){const _0x193558=_0x1abb79;let _0x37fa53='';for(let _0x57444f=0x0;_0x57444f<_0x13ac2c['length'];_0x57444f++)_0x37fa53+=String[_0x193558(0x433)](_0x13ac2c[_0x57444f]);return btoa(_0x37fa53);}function Fe(_0x2dbd87,_0x4e1733){const _0x20dd14=_0x1abb79;let _0x30d590=Ne(_0x4e1733),_0x470bef=(0x0,f['randomBytes'])(0x10);return Pe((0x0,f[_0x20dd14(0x32d)])(_0x470bef,(0x0,d[_0x20dd14(0x3c2)])(_0x30d590,_0x470bef)['encrypt']((0x0,f[_0x20dd14(0x250)])(_0x2dbd87))));}function Ie(){const _0x79343c=_0x1abb79;let _0x30a4d5=(0x0,l[_0x79343c(0x1bb)])()[_0x79343c(0x1f9)];if(typeof window<'u'&&window[_0x79343c(0x3a0)]!==void 0x0&&_0x30a4d5){let _0x56425e={'time':Math['floor'](Date[_0x79343c(0x25e)]()/0x3e8),'domain':location[_0x79343c(0x319)]};return Fe(JSON[_0x79343c(0x20e)](_0x56425e),_0x30a4d5);}}let K=class{constructor(_0xd2b57d){const _0x155d74=_0x1abb79;this[_0x155d74(0x470)]=_0xd2b57d,this[_0x155d74(0x20d)]();}[_0x1abb79(0x20d)](){this['_httpService']['registerHTTPInterceptor']({'interceptor':(_0x4a5951,_0x14cff9)=>{const _0x208e23=_0x37da;let _0x559391=Ie();return _0x559391&&_0x4a5951[_0x208e23(0x1d0)][_0x208e23(0x35b)](_0x208e23(0x322),_0x559391),_0x14cff9(_0x4a5951);}});}};K=y([v(0x0,(0x0,t['Inject'])(c['HTTPService']))],K);let q=class extends t['RxDisposable']{constructor(_0x4b4ff6,_0x154410,_0x4777f7){const _0x3617c8=_0x1abb79;super(),this[_0x3617c8(0x204)]=_0x4b4ff6,this['_snapshotService']=_0x154410,this[_0x3617c8(0x1c9)]=_0x4777f7,g(this,_0x3617c8(0x1e1),new i['BehaviorSubject'](null)),g(this,_0x3617c8(0x3cf),this['_unitInfo$'][_0x3617c8(0x234)]());}async[_0x1abb79(0x477)](_0x2204d6,_0x5621d1,_0x4c58ae){const _0x2d6dbb=_0x1abb79;this[_0x2d6dbb(0x1e1)][_0x2d6dbb(0x343)]({'unitId':_0x2204d6,'type':_0x5621d1});let _0x3eab1b=null;switch(_0x5621d1){case t['UniverInstanceType'][_0x2d6dbb(0x45b)]:_0x3eab1b=await this[_0x2d6dbb(0x1d8)][_0x2d6dbb(0x44d)](_0x2204d6,_0x4c58ae);break;case t[_0x2d6dbb(0x3b9)][_0x2d6dbb(0x3d3)]:_0x3eab1b=await this[_0x2d6dbb(0x1d8)]['loadDoc'](_0x2204d6,_0x4c58ae);break;default:this[_0x2d6dbb(0x204)]['error'](_0x2d6dbb(0x206),_0x2d6dbb(0x386));break;}return _0x3eab1b;}async[_0x1abb79(0x1f7)](_0x326b5b,_0x217aa4,_0x32f21b){const _0x293b5b=_0x1abb79;var _0x551a22;this[_0x293b5b(0x1e1)]['next']({'unitId':_0x326b5b,'type':_0x217aa4,'subUnitId':_0x32f21b});let _0x5a997c=0x0,_0x2372bf=await((_0x551a22=this[_0x293b5b(0x1c9)])==null?void 0x0:_0x551a22[_0x293b5b(0x419)](_0x326b5b));return _0x2372bf&&(_0x2372bf[_0x293b5b(0x443)]||_0x2372bf[_0x293b5b(0x2f2)]['length']!==0x0)&&(_0x5a997c=_0x2372bf[_0x293b5b(0x1bc)]),_0x5a997c===0x0&&this[_0x293b5b(0x204)][_0x293b5b(0x490)](_0x293b5b(0x206),_0x293b5b(0x1f6)),this[_0x293b5b(0x477)](_0x326b5b,_0x217aa4,_0x5a997c);}};q=y([v(0x0,t[_0x1abb79(0x22c)]),v(0x1,(0x0,t[_0x1abb79(0x3cc)])(e['SnapshotService'])),v(0x2,(0x0,t[_0x1abb79(0x323)])(S))],q);let J=class{constructor(_0x298436,_0x2a269e,_0x5b2485){const _0x2f93b6=_0x1abb79;this[_0x2f93b6(0x470)]=_0x298436,this[_0x2f93b6(0x1c0)]=_0x2a269e,this['_univerInstanceService']=_0x5b2485,g(this,_0x2f93b6(0x2db),0x0),g(this,_0x2f93b6(0x2af),new i['Subject']()),g(this,_0x2f93b6(0x44b),this[_0x2f93b6(0x2af)]),g(this,_0x2f93b6(0x435),new Map());}['setWaitCount'](_0x143056){const _0x25cf19=_0x1abb79;this[_0x25cf19(0x2db)]=_0x143056,this[_0x25cf19(0x2af)][_0x25cf19(0x343)](_0x143056);}[_0x1abb79(0x22e)](_0x16d7e2,_0x1c94b7){const _0x1ee62c=_0x1abb79;if(_0x1c94b7===u[_0x1ee62c(0x372)][_0x1ee62c(0x449)]){let _0x1ff8c3=new Image();return _0x1ff8c3[_0x1ee62c(0x2fd)]=_0x16d7e2,_0x1ff8c3;}return this[_0x1ee62c(0x435)][_0x1ee62c(0x277)](_0x16d7e2);}['addImageSourceCache'](_0x3ce5b2,_0x27765b,_0x566703){const _0x3d8a5d=_0x1abb79;_0x27765b===u[_0x3d8a5d(0x372)][_0x3d8a5d(0x449)]||_0x566703==null||this[_0x3d8a5d(0x435)][_0x3d8a5d(0x35b)](_0x3ce5b2,_0x566703);}async[_0x1abb79(0x2df)](_0x2abfce){const _0x2730df=_0x1abb79;try{let _0x3b1a70=this['_replaceFileID'](this[_0x2730df(0x1bf)](),''+_0x2abfce),_0x3331d6=(await this[_0x2730df(0x470)][_0x2730df(0x277)](_0x3b1a70))[_0x2730df(0x230)];if(_0x3331d6[_0x2730df(0x1ec)]&&_0x3331d6[_0x2730df(0x1ec)]['code']===a['ErrorCode']['OK']){let _0x21c5f0=(0x0,t[_0x2730df(0x3d7)])(_0x3331d6['url'],this[_0x2730df(0x488)]());return Promise[_0x2730df(0x395)](_0x21c5f0);}return Promise[_0x2730df(0x361)](_0x3331d6[_0x2730df(0x1ec)]);}catch(_0x3cd001){return Promise[_0x2730df(0x361)](_0x3cd001);}}async[_0x1abb79(0x24b)](_0x3ecb23){const _0x38a9d1=_0x1abb79;let _0x32af7e='';if(!u[_0x38a9d1(0x46e)][_0x38a9d1(0x3a9)](_0x3ecb23[_0x38a9d1(0x1ae)]))return this[_0x38a9d1(0x1de)](),Promise['reject'](Error(u['ImageUploadStatusType']['ERROR_IMAGE_TYPE']));if(_0x3ecb23[_0x38a9d1(0x22a)]>(0x0,u[_0x38a9d1(0x240)])())return this[_0x38a9d1(0x1de)](),Promise[_0x38a9d1(0x361)](Error(u[_0x38a9d1(0x1e7)][_0x38a9d1(0x284)]));try{let _0x15b9d1=new FormData();_0x15b9d1[_0x38a9d1(0x46c)](_0x38a9d1(0x293),_0x3ecb23);let _0x2bb685=this['_univerInstanceService'][_0x38a9d1(0x2a1)](),_0x3ea581=_0x2bb685==null?void 0x0:_0x2bb685[_0x38a9d1(0x261)]();if(!_0x3ea581)throw Error('unitId\x20is\x20not\x20found');let _0x51b214=this[_0x38a9d1(0x475)]()+'?size='+_0x3ecb23[_0x38a9d1(0x22a)]['toString']()+_0x38a9d1(0x467)+a[_0x38a9d1(0x38f)][_0x38a9d1(0x48d)]+_0x38a9d1(0x457)+encodeURIComponent(_0x3ea581),_0x186d4={'body':_0x15b9d1},_0x143f6b=(await this['_httpService'][_0x38a9d1(0x3b8)](_0x51b214,_0x186d4))[_0x38a9d1(0x230)];if(typeof _0x143f6b[_0x38a9d1(0x1f4)]!='string')return this[_0x38a9d1(0x1de)](),Promise[_0x38a9d1(0x361)](Error(u['ImageUploadStatusType'][_0x38a9d1(0x1ac)]));_0x32af7e=_0x143f6b[_0x38a9d1(0x1f4)];}catch{return this['_decreaseWaiting'](),Promise[_0x38a9d1(0x361)](Error(u[_0x38a9d1(0x1e7)][_0x38a9d1(0x1ac)]));}return new Promise((_0x2e5bd9,_0x40fc87)=>{const _0x1c67a2=_0x38a9d1;let _0x51158b=new FileReader();_0x51158b['readAsDataURL'](_0x3ecb23),_0x51158b[_0x1c67a2(0x214)]=_0x1f2a38=>{const _0x54451f=_0x1c67a2;var _0x4ff300;let _0x2a94fb=(_0x4ff300=_0x1f2a38[_0x54451f(0x3c3)])==null?void 0x0:_0x4ff300[_0x54451f(0x229)];if(_0x2a94fb==null){this[_0x54451f(0x1de)](),_0x40fc87(Error(u[_0x54451f(0x1e7)][_0x54451f(0x1ac)]));return;}_0x2e5bd9({'imageId':(0x0,t[_0x54451f(0x1b3)])(0x6),'imageSourceType':u[_0x54451f(0x372)][_0x54451f(0x36e)],'source':_0x32af7e,'base64Cache':_0x2a94fb,'status':u[_0x54451f(0x1e7)][_0x54451f(0x40c)]}),this[_0x54451f(0x1de)]();};});}['_getUploadFileURL'](){const _0x5b47ba=_0x1abb79;var _0x1b3c9c;let _0x3d676b=this['_configService'][_0x5b47ba(0x300)](T);return(_0x1b3c9c=_0x3d676b==null?void 0x0:_0x3d676b[_0x5b47ba(0x400)])==null?_0x5b47ba(0x41b):_0x1b3c9c;}['_getSignURL'](){const _0x569ff1=_0x1abb79;var _0x95b91;let _0x5d1781=this[_0x569ff1(0x1c0)][_0x569ff1(0x300)](T);return(_0x95b91=_0x5d1781==null?void 0x0:_0x5d1781['signUrlServerUrl'])==null?_0x569ff1(0x45a):_0x95b91;}[_0x1abb79(0x488)](){const _0xb9b2d0=_0x1abb79;var _0x5a19d9;let _0x2f6216=this[_0xb9b2d0(0x1c0)][_0xb9b2d0(0x300)](T);return(_0x5a19d9=_0x2f6216==null?void 0x0:_0x2f6216['downloadEndpointUrl'])==null?location[_0xb9b2d0(0x1cd)]:_0x5a19d9;}[_0x1abb79(0x2c5)](_0x1591be,_0x78b86d){const _0x386945=_0x1abb79;return _0x1591be['replace'](_0x386945(0x1be),_0x78b86d);}[_0x1abb79(0x1de)](){const _0x22a798=_0x1abb79;--this[_0x22a798(0x2db)],this[_0x22a798(0x2af)][_0x22a798(0x343)](this['_waitCount']);}};J=y([v(0x0,(0x0,t['Inject'])(c['HTTPService'])),v(0x1,t['IConfigService']),v(0x2,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x31a)]))],J);let Y=class{constructor(_0x4ed3e1,_0x31b024){const _0x3ccfc7=_0x1abb79;this[_0x3ccfc7(0x1c0)]=_0x4ed3e1,this[_0x3ccfc7(0x318)]=_0x31b024;}[_0x1abb79(0x356)](){const _0x5954a7=_0x1abb79;var _0x24adca;let _0x291aa1=this[_0x5954a7(0x1c0)]['getConfig'](T);return(_0x24adca=_0x291aa1==null?void 0x0:_0x291aa1[_0x5954a7(0x33c)])==null?_0x5954a7(0x371):_0x24adca;}async['list'](_0x44b87d){const _0x1315f6=_0x1abb79;let _0x1a39ce=this[_0x1315f6(0x356)]()+_0x1315f6(0x342);return{'list':[{'title':_0x1315f6(0x412),'mentions':(await this[_0x1315f6(0x318)]['get'](_0x1a39ce,{'params':{'objectID':_0x44b87d[_0x1315f6(0x355)],'unitID':_0x44b87d['unitId']}}))[_0x1315f6(0x230)][_0x1315f6(0x221)][_0x1315f6(0x41d)](_0x4470cf=>({'objectId':_0x4470cf['id'],'name':_0x4470cf[_0x1315f6(0x331)][_0x1315f6(0x29b)],'metadata':{'icon':_0x4470cf['subject'][_0x1315f6(0x349)]},'label':_0x4470cf[_0x1315f6(0x331)]['name'],'objectType':t[_0x1315f6(0x492)][_0x1315f6(0x2d6)]})),'metadata':{},'type':t[_0x1315f6(0x492)][_0x1315f6(0x2d6)]}]};}};Y=y([v(0x0,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x2b4)])),v(0x1,(0x0,t['Inject'])(c['HTTPService']))],Y);let X=class extends t[_0x1abb79(0x464)]{constructor(_0x55f5cd,_0x4265ae,_0x4d80d9,_0x279594,_0x5f10d6){const _0x2fe618=_0x1abb79;super(),this[_0x2fe618(0x301)]=_0x55f5cd,this[_0x2fe618(0x489)]=_0x4265ae,this[_0x2fe618(0x244)]=_0x4d80d9,this['_collaborationSessionService']=_0x279594,this[_0x2fe618(0x420)]=_0x5f10d6,this[_0x2fe618(0x2fa)](),this[_0x2fe618(0x437)]();}[_0x1abb79(0x437)](){const _0x2ad968=_0x1abb79;let _0x508b88=async _0x5881ca=>{const _0x110372=_0x37da;(await this['_collaborationSessionService'][_0x110372(0x3c1)](_0x5881ca))[_0x110372(0x36b)][_0x110372(0x3a1)]((0x0,s[_0x110372(0x37f)])(_0x416dc5=>_0x416dc5['eventID']===e[_0x110372(0x380)][_0x110372(0x2ec)]),(0x0,s[_0x110372(0x299)])(this['dispose$']))[_0x110372(0x2ed)](_0x529013=>{const _0x355b80=_0x110372;let {reason:_0x4ba871}=_0x529013[_0x355b80(0x471)];this['_collaborationUIEventService']['emitEvent']({'id':_0x355b80(0x465),'data':_0x4ba871}),this['_permissionService'][_0x355b80(0x2be)](new r[(_0x355b80(0x209))](_0x5881ca)['id'],!0x1),this[_0x355b80(0x463)][_0x355b80(0x1ab)](_0x5881ca);});};(0x0,i[_0x2ad968(0x295)])(this[_0x2ad968(0x489)][_0x2ad968(0x44f)](t[_0x2ad968(0x3b9)]['UNIVER_SHEET']),this['_univerInstanceService']['getTypeOfUnitAdded$'](t['UniverInstanceType']['UNIVER_DOC']))[_0x2ad968(0x3a1)]((0x0,s[_0x2ad968(0x41d)])(_0x5c5e4f=>_0x5c5e4f[_0x2ad968(0x338)][_0x2ad968(0x261)]()),(0x0,s['filter'])(_0x2237de=>!(0x0,t['isInternalEditorID'])(_0x2237de)),(0x0,s[_0x2ad968(0x299)])(this[_0x2ad968(0x3ba)]))[_0x2ad968(0x2ed)](_0x19b118=>{_0x508b88(_0x19b118);});}['_initUnitPermissionChange'](){const _0x3d415b=_0x1abb79;let _0x203a3c=async _0x5c6a20=>{const _0x1ca00f=_0x37da;let _0x5b8753=await this[_0x1ca00f(0x463)][_0x1ca00f(0x3c1)](_0x5c6a20),_0x2bf25f=this[_0x1ca00f(0x301)][_0x1ca00f(0x277)](r['SheetPermissionInitController']);_0x5b8753[_0x1ca00f(0x36b)][_0x1ca00f(0x3a1)]((0x0,s[_0x1ca00f(0x37f)])(_0x38f2a2=>_0x38f2a2[_0x1ca00f(0x20b)]===e[_0x1ca00f(0x380)][_0x1ca00f(0x3df)]),(0x0,s[_0x1ca00f(0x299)])(this[_0x1ca00f(0x3ba)]))[_0x1ca00f(0x2ed)](_0x1f74ee=>{const _0x1387fe=_0x1ca00f;let {objectId:_0x140213}=_0x1f74ee[_0x1387fe(0x471)];_0x140213===_0x5c6a20?_0x2bf25f[_0x1387fe(0x456)](_0x5c6a20):_0x2bf25f['refreshPermission'](_0x5c6a20,_0x140213);});};(0x0,i[_0x3d415b(0x295)])(this[_0x3d415b(0x489)]['getTypeOfUnitAdded$'](t[_0x3d415b(0x3b9)][_0x3d415b(0x45b)]))['pipe']((0x0,s[_0x3d415b(0x41d)])(_0x3194d9=>_0x3194d9[_0x3d415b(0x338)][_0x3d415b(0x261)]()),(0x0,s[_0x3d415b(0x37f)])(_0x2612bd=>!(0x0,t[_0x3d415b(0x366)])(_0x2612bd)),(0x0,s[_0x3d415b(0x299)])(this['dispose$']))[_0x3d415b(0x2ed)](_0x5adb12=>{_0x203a3c(_0x5adb12);});}};X=y([v(0x0,(0x0,t[_0x1abb79(0x3cc)])(t[_0x1abb79(0x1d5)])),v(0x1,t[_0x1abb79(0x31a)]),v(0x2,t[_0x1abb79(0x2ad)]),v(0x3,(0x0,t[_0x1abb79(0x3cc)])(H)),v(0x4,(0x0,t[_0x1abb79(0x3cc)])(_))],X);let Z=class{constructor(_0x4d611a,_0x52874b){const _0x2fe268=_0x1abb79;this[_0x2fe268(0x1c0)]=_0x4d611a,this[_0x2fe268(0x470)]=_0x52874b;}async[_0x1abb79(0x1d2)](_0x438973,_0x646072){const _0x10df29=_0x1abb79;var _0x44a052;let {unitID:_0x6162e7,type:_0x5de2be,revision:_0x21f012=0x0}=_0x646072,_0x5d8a72=this['getSnapshotAPIPath']()+'/'+_0x5de2be+_0x10df29(0x3d8)+_0x6162e7+_0x10df29(0x1d9)+_0x21f012,_0x13aa77=(await this[_0x10df29(0x470)]['get'](_0x5d8a72))[_0x10df29(0x230)],_0xcc02b0=(_0x44a052=_0x13aa77['snapshot'])==null?void 0x0:_0x44a052[_0x10df29(0x270)];if(_0xcc02b0){let _0x216b23=_0xcc02b0==null?void 0x0:_0xcc02b0[_0x10df29(0x22b)];_0xcc02b0[_0x10df29(0x22b)]=e[_0x10df29(0x255)][_0x10df29(0x1b5)]((0x0,e[_0x10df29(0x3de)])(_0x216b23)),Object[_0x10df29(0x289)](_0xcc02b0[_0x10df29(0x41e)])[_0x10df29(0x222)](([,_0x105e3b])=>{const _0x52ded4=_0x10df29;let _0x2b4505=_0x105e3b['originalMeta'];_0x105e3b['originalMeta']=e['textEncoder'][_0x52ded4(0x1b5)]((0x0,e[_0x52ded4(0x3de)])(_0x2b4505));});}return _0x13aa77;}async[_0x1abb79(0x461)](_0x11532a,_0x41a05a){const _0x4cf2c1=_0x1abb79;let {unitID:_0x58cdaa,type:_0x2a4922,blockID:_0x2be550}=_0x41a05a,_0x446f5b=this[_0x4cf2c1(0x1b7)]()+'/'+_0x2a4922+'/unit/'+_0x58cdaa+_0x4cf2c1(0x1eb)+_0x2be550;return(await this[_0x4cf2c1(0x470)]['get'](_0x446f5b))['body'];}async['getDeserializedSheetBlock'](_0x2fae3f,_0x153ed0){const _0x53306a=_0x1abb79;let {unitID:_0x5b009f,type:_0x180f9e,blockID:_0x3d022c}=_0x153ed0,_0x5a7708=this[_0x53306a(0x1b7)]()+_0x53306a(0x1eb)+_0x180f9e+_0x53306a(0x3d8)+_0x5b009f+_0x53306a(0x1eb)+_0x3d022c;return(await this[_0x53306a(0x470)][_0x53306a(0x277)](_0x5a7708))[_0x53306a(0x230)];}async['fetchMissingChangesets'](_0x1dd2af,_0x4377d1){const _0xc98d51=_0x1abb79;let {unitID:_0xed5d9c,type:_0x421f52,from:_0x503685,to:_0x45a5cf}=_0x4377d1,_0x3d4321=this[_0xc98d51(0x1b7)]()+'/'+_0x421f52+_0xc98d51(0x3d8)+_0xed5d9c+'/fetchmissing?from='+_0x503685+_0xc98d51(0x2e5)+_0x45a5cf;return(await this[_0xc98d51(0x470)][_0xc98d51(0x277)](_0x3d4321))[_0xc98d51(0x230)];}['getSnapshotAPIPath'](){const _0x23356f=_0x1abb79;var _0x48ea9b;return(_0x48ea9b=this[_0x23356f(0x1c0)]['getConfig'](_0x23356f(0x46b)))==null?this['_getAPIPrefix']():_0x48ea9b;}[_0x1abb79(0x1b7)](){const _0x39d734=_0x1abb79;var _0x34a7fd;let _0x3ebffc=this[_0x39d734(0x1c0)][_0x39d734(0x300)](T);return(_0x34a7fd=_0x3ebffc==null?void 0x0:_0x3ebffc['snapshotServerUrl'])==null?'/universer-api/snapshot':_0x34a7fd;}async[_0x1abb79(0x38b)](_0x5e5d5a,_0x1638e4){const _0x3cd26c=_0x1abb79;let _0x580fec=_0x3cd26c(0x1cb)+_0x1638e4[_0x3cd26c(0x1ae)]+_0x3cd26c(0x3d8)+_0x1638e4[_0x3cd26c(0x383)]+_0x3cd26c(0x32a);return(await this[_0x3cd26c(0x470)][_0x3cd26c(0x277)](_0x580fec,{'params':{'resourceId':JSON[_0x3cd26c(0x20e)](_0x1638e4[_0x3cd26c(0x458)])}}))[_0x3cd26c(0x230)];}['saveSnapshot'](){const _0x5cb9b4=_0x1abb79;throw Error(_0x5cb9b4(0x233));}[_0x1abb79(0x1dd)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x1abb79(0x3d6)](){const _0x1cbde8=_0x1abb79;throw Error(_0x1cbde8(0x233));}['saveChangeset'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x1abb79(0x3b4)](){const _0x1e4a14=_0x1abb79;throw Error(_0x1e4a14(0x233));}[_0x1abb79(0x33a)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}};Z=y([v(0x0,t[_0x1abb79(0x2b4)]),v(0x1,(0x0,t[_0x1abb79(0x3cc)])(c[_0x1abb79(0x422)]))],Z);let Q=class extends t[_0x1abb79(0x1ff)]{constructor(_0x1df5f9,_0x3c0697,_0x274691,_0x4bc162,_0xfab0a7){const _0x2902c8=_0x1abb79;super(_0x1df5f9,_0x3c0697,_0x274691),this[_0x2902c8(0x20f)]=_0x4bc162,this[_0x2902c8(0x204)]=_0xfab0a7;}[_0x1abb79(0x335)](_0x3f7fe2,_0x2b8471){const _0x1d3099=_0x1abb79;let _0x56a745=this[_0x1d3099(0x3d1)](_0x3f7fe2);if(_0x56a745)try{let _0x36de39=this[_0x1d3099(0x1cf)](_0x56a745,_0x2b8471);this[_0x1d3099(0x35e)](_0x3f7fe2,_0x36de39);}catch(_0x500354){this[_0x1d3099(0x204)][_0x1d3099(0x1ec)](_0x1d3099(0x330),_0x500354),this[_0x1d3099(0x3ca)](_0x3f7fe2);}let _0x435e30=this[_0x1d3099(0x218)](_0x3f7fe2);if(_0x435e30)try{let _0x199ee0=this[_0x1d3099(0x1cf)](_0x435e30,_0x2b8471);this[_0x1d3099(0x207)](_0x3f7fe2,_0x199ee0);}catch(_0x460bce){this[_0x1d3099(0x204)]['error'](_0x460bce),this['_clearRedo'](_0x3f7fe2);}}['_clearUndo'](_0x377b8f){const _0x301491=_0x1abb79;let _0x30157f=this[_0x301491(0x3d1)](_0x377b8f);_0x30157f&&(_0x30157f[_0x301491(0x2b3)]=0x0,this[_0x301491(0x36a)]());}[_0x1abb79(0x1df)](_0x5fb659){const _0x41afc0=_0x1abb79;let _0x5e97e9=this[_0x41afc0(0x218)](_0x5fb659);_0x5e97e9&&(_0x5e97e9[_0x41afc0(0x2b3)]=0x0,this[_0x41afc0(0x36a)]());}[_0x1abb79(0x35e)](_0x14bdbd,_0x59c74e){const _0x3de628=_0x1abb79;this[_0x3de628(0x3ef)][_0x3de628(0x35b)](_0x14bdbd,_0x59c74e),this[_0x3de628(0x36a)]();}[_0x1abb79(0x207)](_0x2ebffd,_0x535fda){const _0x4597de=_0x1abb79;this[_0x4597de(0x337)]['set'](_0x2ebffd,_0x535fda),this['_updateStatus']();}[_0x1abb79(0x1cf)](_0x2c6934,_0x543c00){const _0x232494=_0x1abb79;let _0x20cfd1=[],_0x6d8e15=_0x543c00,_0x2b423a=_0x543c00;for(let _0x2a0d14=_0x2c6934[_0x232494(0x2b3)]-0x1;_0x2a0d14>=0x0;_0x2a0d14--){let {unitID:_0x1f579c,undoMutations:_0x5c0562,redoMutations:_0x1fe215}=_0x2c6934[_0x2a0d14],_0x522d29=this[_0x232494(0x20f)][_0x232494(0x411)](_0x6d8e15,_0x5c0562),_0x208271=this[_0x232494(0x20f)][_0x232494(0x411)](_0x2b423a,_0x1fe215);if((0x0,e[_0x232494(0x2c3)])(_0x522d29)||(0x0,e[_0x232494(0x2c3)])(_0x208271)){this[_0x232494(0x204)][_0x232494(0x1ec)](_0x232494(0x330),_0x232494(0x3ad),_0x522d29,_0x208271);break;}_0x6d8e15=_0x522d29[_0x232494(0x3f6)],_0x2b423a=_0x208271[_0x232494(0x3f6)],_0x20cfd1['push']({'unitID':_0x1f579c,'undoMutations':_0x522d29[_0x232494(0x34f)],'redoMutations':_0x208271[_0x232494(0x34f)]});}return _0x20cfd1[_0x232494(0x290)]();}};Q=y([v(0x0,t['IUniverInstanceService']),v(0x1,t[_0x1abb79(0x426)]),v(0x2,t[_0x1abb79(0x239)]),v(0x3,e[_0x1abb79(0x2f7)]),v(0x4,t[_0x1abb79(0x22c)])],Q);let $=class extends t[_0x1abb79(0x391)]{constructor(_0x3a5668={},_0x4a952b,_0x3c173a,_0x1395cc){const _0x17ef49=_0x1abb79;super(),this['_config']=_0x3a5668,this[_0x17ef49(0x204)]=_0x4a952b,this[_0x17ef49(0x301)]=_0x3c173a,this['_configService']=_0x1395cc;let {..._0x47d770}=(0x0,t[_0x17ef49(0x295)])({},de,_0x3a5668);if(!_0x47d770[_0x17ef49(0x1b2)])throw Error(_0x17ef49(0x388));this['_config']=_0x47d770,this[_0x17ef49(0x1c0)][_0x17ef49(0x348)](T,_0x47d770);}['onStarting'](){const _0x3ef4d3=_0x1abb79;this[_0x3ef4d3(0x35d)](),this[_0x3ef4d3(0x421)]();}[_0x1abb79(0x35d)](){const _0x348f5b=_0x1abb79;var _0x3d483e,_0xe1ca3a;this[_0x348f5b(0x301)][_0x348f5b(0x38d)](t[_0x348f5b(0x42d)])&&this[_0x348f5b(0x204)][_0x348f5b(0x1ec)](_0x348f5b(0x30d),_0x348f5b(0x491));let _0x1b8fb9=(0x0,t[_0x348f5b(0x21e)])([[t[_0x348f5b(0x42d)],{'useClass':Q}],[H],[b],[C],[W],[K],[ie],[X],[_],[q],[B,{'useClass':this['_config'][_0x348f5b(0x1b2)]}],[e[_0x348f5b(0x23d)],{'useClass':Z}],[t[_0x348f5b(0x41a)],{'useClass':G}],[u[_0x348f5b(0x43a)],{'useClass':J}],[t[_0x348f5b(0x397)],{'useClass':Y}],[U],[Me]],(_0x3d483e=this[_0x348f5b(0x2b6)])==null?void 0x0:_0x3d483e['override']);if(!((_0xe1ca3a=this['_config'])!=null&&_0xe1ca3a[_0x348f5b(0x3e0)])){let _0x5c9795=_0x1b8fb9[_0x348f5b(0x39a)](([_0x3a48c7])=>_0x3a48c7===w);_0x5c9795!==-0x1&&_0x1b8fb9['splice'](_0x5c9795,0x1);}(0x0,t[_0x348f5b(0x2fb)])(this[_0x348f5b(0x301)],_0x1b8fb9);}[_0x1abb79(0x421)](){const _0x302ee9=_0x1abb79;var _0x3aae19,_0x1919eb;if(this[_0x302ee9(0x301)][_0x302ee9(0x277)](c['HTTPService'])[_0x302ee9(0x2c4)]({'priority':0x14,'interceptor':(0x0,c[_0x302ee9(0x1f3)])({'maxParallel':0x6})}),!((_0x3aae19=this['_config'])!=null&&_0x3aae19[_0x302ee9(0x27d)])){var _0x32cf23;(_0x32cf23=this['_injector'][_0x302ee9(0x277)](S,t[_0x302ee9(0x3b0)][_0x302ee9(0x460)]))==null||_0x32cf23['disableLocalCache']();}(_0x1919eb=this['_config'])!=null&&_0x1919eb[_0x302ee9(0x382)]&&(0x0,t['touchDependencies'])(this[_0x302ee9(0x301)],[[W]]),(0x0,t[_0x302ee9(0x254)])(this['_injector'],[[K],[U],[X]]);}};g($,_0x1abb79(0x487),_0x1abb79(0x340)),g($,_0x1abb79(0x393),Ae),g($,'version',je),$=y([(0x0,t[_0x1abb79(0x32e)])(l['UniverLicensePlugin'],e[_0x1abb79(0x45d)],c[_0x1abb79(0x25b)]),v(0x1,t[_0x1abb79(0x22c)]),v(0x2,(0x0,t['Inject'])(t[_0x1abb79(0x1d5)])),v(0x3,t[_0x1abb79(0x2b4)])],$),Object[_0x1abb79(0x3b7)](exports,'AuthzIoHttpService',{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x24d),{'enumerable':!0x0,'get':function(){return M;}}),Object['defineProperty'](exports,_0x1abb79(0x1e5),{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x1abb79(0x305)]=T,Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x424),{'enumerable':!0x0,'get':function(){return U;}}),Object['defineProperty'](exports,'CollaborationEntity',{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x1abb79(0x3b7)](exports,'CollaborationImageIoService',{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x3ff),{'enumerable':!0x0,'get':function(){return x;}}),Object[_0x1abb79(0x3b7)](exports,'CollaborationSessionService',{'enumerable':!0x0,'get':function(){return H;}}),Object['defineProperty'](exports,_0x1abb79(0x2ba),{'enumerable':!0x0,'get':function(){return V;}}),exports[_0x1abb79(0x2e8)]=Se,exports['CollaborationUIEventId']=re,exports[_0x1abb79(0x47b)]=_,Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x2c9),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x1abb79(0x2c2)]=ie,Object['defineProperty'](exports,_0x1abb79(0x476),{'enumerable':!0x0,'get':function(){return P;}}),exports[_0x1abb79(0x1fa)]=p,exports[_0x1abb79(0x3fe)]=_0x1abb79(0x248),exports[_0x1abb79(0x2c8)]='/universer-api/user/session-ticket',Object['defineProperty'](exports,_0x1abb79(0x23b),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x326),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x287),{'enumerable':!0x0,'get':function(){return I;}}),exports[_0x1abb79(0x2da)]=_0x1abb79(0x24c),exports[_0x1abb79(0x42c)]=_0x1abb79(0x3f7),exports[_0x1abb79(0x225)]=B,exports[_0x1abb79(0x237)]=S,exports[_0x1abb79(0x26b)]=Ee,exports[_0x1abb79(0x3bd)]=w,exports['LOCAL_CACHE_INTERVAL']=0x3e8,exports[_0x1abb79(0x3b1)]=_0x1abb79(0x33f),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x213),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x2f3),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x40a),{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x3d5),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x1abb79(0x2dd)]='REMOTE_UNISCRIPT_EXECUTION_ENDPOINT',exports['RETRY_CONNECTING_MAX_COUNT_KEY']=_0x1abb79(0x377),exports['SessionStatus']=oe,Object[_0x1abb79(0x3b7)](exports,'SheetCollaborationEntity',{'enumerable':!0x0,'get':function(){return z;}}),Object['defineProperty'](exports,_0x1abb79(0x333),{'enumerable':!0x0,'get':function(){return C;}}),Object[_0x1abb79(0x3b7)](exports,'SnapshotServerOverHTTPService',{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x226),{'enumerable':!0x0,'get':function(){return A;}}),exports[_0x1abb79(0x320)]=ue,Object[_0x1abb79(0x3b7)](exports,_0x1abb79(0x37c),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x1abb79(0x42e)]=De,exports[_0x1abb79(0x408)]=ce,exports[_0x1abb79(0x39d)]=Oe;
|