@univerjs-pro/collaboration-client-ui 0.22.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.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-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.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-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/locale/ko-KR.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-TW.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.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-TW.js +1 -1
- package/package.json +17 -17
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1222a9=_0x2f58;(function(_0xa981a3,_0x10919f){const _0x37fee1=_0x2f58,_0x4656b4=_0xa981a3();while(!![]){try{const _0x992ae9=parseInt(_0x37fee1(0x335))/0x1*(parseInt(_0x37fee1(0x349))/0x2)+parseInt(_0x37fee1(0x375))/0x3+-parseInt(_0x37fee1(0x22b))/0x4*(parseInt(_0x37fee1(0x283))/0x5)+-parseInt(_0x37fee1(0x27a))/0x6*(parseInt(_0x37fee1(0x2f3))/0x7)+-parseInt(_0x37fee1(0x23e))/0x8*(parseInt(_0x37fee1(0x2e7))/0x9)+parseInt(_0x37fee1(0x2ba))/0xa*(parseInt(_0x37fee1(0x2b7))/0xb)+parseInt(_0x37fee1(0x1f0))/0xc*(parseInt(_0x37fee1(0x3ff))/0xd);if(_0x992ae9===_0x10919f)break;else _0x4656b4['push'](_0x4656b4['shift']());}catch(_0x37eba5){_0x4656b4['push'](_0x4656b4['shift']());}}}(_0x1895,0x7cc4e));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationController,CollaborationSessionService,CollaborationSocketService,CollaborationStatus,CollaborationUIEventId,CollaborationUIEventService,DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,DEFAULT_WS_SESSION_TICKET_URL,DataLoaderService,DocCollaborationEntity,ILocalCacheService,LOCAL_CACHE_INTERVAL,LOCAL_CACHE_INTERVAL_KEY,MemberService,REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,SessionStatus,UnitStatus,UniverCollaborationClientPlugin,getLocalCacheKey}from'@univerjs-pro/collaboration-client';import{COLORS,CanceledError,ColorKit,CommandType,DOC_RANGE_TYPE,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,ILocalStorageService,ILogService,IUniverInstanceService,Inject,Injector,LocaleService,Optional,Plugin,Rectangle,RxDisposable,ThemeService,Tools,UniverInstanceType,Workbook,createIdentifier,debounce,fromEventSubject,generateRandomId,isFormulaId,isFormulaString,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';import{BuiltInUIPart,IBeforeCloseService,IMessageService,INotificationService,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{BehaviorSubject,Subject,combineLatest,debounceTime,distinctUntilChanged,filter,fromEvent,mapTo,merge as _0x47a541,of,shareReplay,switchMap,takeUntil}from'rxjs';import{MessageType,Tooltip,clsx}from'@univerjs/design';import{LoadingMultiIcon,OffLineIcon,OnLineIcon}from'@univerjs/icons';import{useCallback,useMemo}from'react';import{jsx}from'react/jsx-runtime';import{IRemoteInstanceService}from'@univerjs/rpc';import{EffectRefRangId,RefRangeService,SetSelectionsOperation,SetWorksheetActivateCommand,SheetsSelectionsService,handleDeleteRangeMoveLeft,handleDeleteRangeMoveUp,handleIRemoveCol,handleIRemoveRow,handleInsertCol,handleInsertRangeMoveDown,handleInsertRangeMoveRight,handleInsertRow,handleMoveRange,runRefRangeMutations}from'@univerjs/sheets';import{IRenderManagerService,Rect,RegularPolygon,SHEET_VIEWPORT_KEY,Shape,TRANSFORM_CHANGE_OBSERVABLE_TYPE,Vector2,getColor}from'@univerjs/engine-render';import{HTTPService,ISocketService,WebSocketService}from'@univerjs/network';import{DocIMEInputManagerService,DocStateChangeManagerService,IDocClipboardService,NodePositionConvertToCursor,NodePositionConvertToRectRange,SetDocZoomRatioOperation,TEXT_RANGE_LAYER_INDEX}from'@univerjs/docs-ui';import{IImageIoService}from'@univerjs/drawing';import{CollaborationEvent,ISnapshotServerService,ITransformService,RevisionService,isTransformMutationFailure,isTransformMutationsWithChangesetSuccess}from'@univerjs-pro/collaboration';import{DocSelectionManagerService,DocSkeletonManagerService,RichTextEditingMutation,SetTextSelectionsOperation}from'@univerjs/docs';import{FormulaExecuteStageType,FormulaExecutedStateType,SetFormulaCalculationNotificationMutation,SetFormulaCalculationStartMutation,deserializeRangeWithSheet,serializeRangeWithSheet}from'@univerjs/engine-formula';import{filter as _0x454b35,map,switchMap as _0x5f06ec,takeUntil as _0x4f9116,throttleTime}from'rxjs/operators';import{SheetSkeletonManagerService,getCoordByCell,getSheetObject}from'@univerjs/sheets-ui';import{ErrorCode}from'@univerjs/protocol';function getStatusConfig(_0x26c933){const _0x3669a5=_0x2f58;switch(_0x26c933){case CollaborationStatus['OFFLINE']:return{'icon':jsx(OffLineIcon,{}),'colorClass':_0x3669a5(0x362),'i18nKey':'collabStatus.offline','tooltipKey':_0x3669a5(0x2f8),'clickable':!![],'indicator':_0x3669a5(0x3f6)};case CollaborationStatus[_0x3669a5(0x254)]:return{'icon':jsx(OffLineIcon,{}),'colorClass':_0x3669a5(0x3b1),'i18nKey':_0x3669a5(0x399),'clickable':![],'indicator':_0x3669a5(0x3f6)};case CollaborationStatus['FETCH_MISS']:return{'icon':jsx(LoadingMultiIcon,{}),'colorClass':_0x3669a5(0x3a9),'i18nKey':_0x3669a5(0x30f),'clickable':![],'indicator':_0x3669a5(0x350)};case CollaborationStatus['NOT_COLLAB']:return{'icon':jsx(OnLineIcon,{}),'colorClass':'univer-text-gray-400','i18nKey':_0x3669a5(0x3f5),'clickable':![],'indicator':_0x3669a5(0x3f6)};case CollaborationStatus[_0x3669a5(0x405)]:case CollaborationStatus[_0x3669a5(0x337)]:return{'icon':jsx(LoadingMultiIcon,{}),'colorClass':_0x3669a5(0x3a9),'i18nKey':_0x3669a5(0x221),'clickable':![],'indicator':'spin'};case CollaborationStatus[_0x3669a5(0x312)]:case CollaborationStatus[_0x3669a5(0x2c7)]:return{'icon':jsx(OnLineIcon,{}),'colorClass':_0x3669a5(0x365),'i18nKey':_0x3669a5(0x34c),'clickable':![],'indicator':'static'};}}function CollaborationStatusDisplay(_0x3254a5){const _0x4b662c=_0x2f58,{status$:_0x4f9e46}=_0x3254a5,_0x20f776=useObservable(_0x4f9e46,CollaborationStatus[_0x4b662c(0x207)]),_0x334675=useDependency(LocaleService),_0x2a0b2f=useDependency(CollaborationSessionService),_0x398af1=useMemo(()=>getStatusConfig(_0x20f776),[_0x20f776]),_0x5d66e3=_0x20f776!==CollaborationStatus[_0x4b662c(0x3e6)],_0x3576ea=_0x334675['t'](_0x398af1['i18nKey']),_0x58912e=_0x398af1[_0x4b662c(0x274)]?_0x334675['t'](_0x398af1['tooltipKey']):_0x3576ea,_0x5ac4ea=useCallback(()=>{if(!_0x5d66e3)_0x2a0b2f['reconnect']();},[_0x5d66e3,_0x2a0b2f]),_0x4bd1c8=useCallback(_0x3f8a43=>{const _0x3bd424=_0x4b662c;!_0x5d66e3&&(_0x3f8a43[_0x3bd424(0x3cc)]==='Enter'||_0x3f8a43[_0x3bd424(0x3cc)]==='\x20')&&(_0x3f8a43[_0x3bd424(0x3ab)](),_0x2a0b2f[_0x3bd424(0x244)]());},[_0x5d66e3,_0x2a0b2f]),_0x42f6e0=jsx(_0x4b662c(0x249),{'className':clsx('univer-flex\x20univer-items-center\x20univer-justify-center',_0x4b662c(0x3a0),_0x398af1[_0x4b662c(0x412)],{'univer-animate-spin':_0x398af1[_0x4b662c(0x3f9)]===_0x4b662c(0x350),'univer-animate-pulse':_0x398af1[_0x4b662c(0x3f9)]==='pulse'}),'aria-hidden':_0x4b662c(0x37b),'children':_0x398af1[_0x4b662c(0x358)]}),_0x4737ef=jsx(_0x4b662c(0x249),{'className':clsx(_0x4b662c(0x20e),_0x4b662c(0x217),_0x4b662c(0x314),_0x4b662c(0x3ae),_0x4b662c(0x3a8),{'univer-cursor-pointer\x20hover:univer-bg-gray-100\x20dark:hover:univer-bg-gray-700':_0x398af1[_0x4b662c(0x363)],'univer-cursor-default':!_0x398af1[_0x4b662c(0x363)]}),'children':_0x42f6e0});if(_0x398af1['clickable'])return jsx(Tooltip,{'title':_0x58912e,'placement':_0x4b662c(0x3d2),'children':jsx('button',{'type':_0x4b662c(0x2b1),'onClick':_0x5ac4ea,'onKeyDown':_0x4bd1c8,'className':clsx(_0x4b662c(0x411),_0x4b662c(0x3e1),_0x4b662c(0x33e),'univer-appearance-none'),'aria-label':_0x3576ea+_0x4b662c(0x34a)+_0x58912e,'role':_0x4b662c(0x23a),'aria-live':_0x4b662c(0x2ff),'aria-atomic':'true','children':_0x4737ef})});return jsx(Tooltip,{'title':_0x58912e,'placement':_0x4b662c(0x3d2),'children':jsx('div',{'className':clsx(_0x4b662c(0x411),_0x4b662c(0x3e1),_0x4b662c(0x33e)),'aria-label':_0x3576ea,'role':_0x4b662c(0x23a),'aria-live':'polite','aria-atomic':_0x4b662c(0x37b),'children':_0x4737ef})});}function _typeof(_0x175ae2){'@babel/helpers - typeof';const _0x2343fe=_0x2f58;return _typeof='function'==typeof Symbol&&_0x2343fe(0x260)==typeof Symbol[_0x2343fe(0x292)]?function(_0x2eba3f){return typeof _0x2eba3f;}:function(_0x41fdeb){const _0x332512=_0x2343fe;return _0x41fdeb&&_0x332512(0x250)==typeof Symbol&&_0x41fdeb[_0x332512(0x220)]===Symbol&&_0x41fdeb!==Symbol['prototype']?'symbol':typeof _0x41fdeb;},_typeof(_0x175ae2);}function toPrimitive(_0x585bc5,_0x364ad0){const _0x55a40d=_0x2f58;if(_0x55a40d(0x203)!=_typeof(_0x585bc5)||!_0x585bc5)return _0x585bc5;var _0xce16f7=_0x585bc5[Symbol[_0x55a40d(0x2b9)]];if(void 0x0!==_0xce16f7){var _0x5b28a9=_0xce16f7[_0x55a40d(0x33f)](_0x585bc5,_0x364ad0||_0x55a40d(0x2c3));if(_0x55a40d(0x203)!=_typeof(_0x5b28a9))return _0x5b28a9;throw new TypeError(_0x55a40d(0x24b));}return(_0x55a40d(0x309)===_0x364ad0?String:Number)(_0x585bc5);}function toPropertyKey(_0x3dda3f){const _0x5baf96=_0x2f58;var _0x14793f=toPrimitive(_0x3dda3f,_0x5baf96(0x309));return _0x5baf96(0x260)==_typeof(_0x14793f)?_0x14793f:_0x14793f+'';}function _defineProperty(_0x167149,_0xc89ccc,_0x4c2ab2){return(_0xc89ccc=toPropertyKey(_0xc89ccc))in _0x167149?Object['defineProperty'](_0x167149,_0xc89ccc,{'value':_0x4c2ab2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x167149[_0xc89ccc]=_0x4c2ab2,_0x167149;}function __decorateParam(_0x14a185,_0xa82173){return function(_0x4e6366,_0x41e4fb){_0xa82173(_0x4e6366,_0x41e4fb,_0x14a185);};}function __decorate(_0x47251b,_0x5e2233,_0xb3354d,_0x984cf9){const _0x287f84=_0x2f58;var _0x3a695a=arguments[_0x287f84(0x2c1)],_0x521a5e=_0x3a695a<0x3?_0x5e2233:_0x984cf9===null?_0x984cf9=Object[_0x287f84(0x336)](_0x5e2233,_0xb3354d):_0x984cf9,_0x45d760;if(typeof Reflect==='object'&&typeof Reflect[_0x287f84(0x285)]===_0x287f84(0x250))_0x521a5e=Reflect[_0x287f84(0x285)](_0x47251b,_0x5e2233,_0xb3354d,_0x984cf9);else{for(var _0x598a43=_0x47251b[_0x287f84(0x2c1)]-0x1;_0x598a43>=0x0;_0x598a43--)if(_0x45d760=_0x47251b[_0x598a43])_0x521a5e=(_0x3a695a<0x3?_0x45d760(_0x521a5e):_0x3a695a>0x3?_0x45d760(_0x5e2233,_0xb3354d,_0x521a5e):_0x45d760(_0x5e2233,_0xb3354d))||_0x521a5e;}return _0x3a695a>0x3&&_0x521a5e&&Object[_0x287f84(0x409)](_0x5e2233,_0xb3354d,_0x521a5e),_0x521a5e;}let DesktopCollaborationStatusDisplayController=class DesktopCollaborationStatusDisplayController extends Disposable{constructor(_0x1545ff,_0x59d528,_0x390bb4,_0x14edc8){const _0x214bd7=_0x2f58;super(),this['_univerInstanceService']=_0x1545ff,this[_0x214bd7(0x21b)]=_0x59d528,this['_collaborationController']=_0x390bb4,this[_0x214bd7(0x276)]=_0x14edc8,_defineProperty(this,'_status$',new BehaviorSubject(CollaborationStatus[_0x214bd7(0x207)])),this['_initStatusComponent'](),this[_0x214bd7(0x31c)]();}[_0x1222a9(0x31c)](){const _0x570060=_0x1222a9;this[_0x570060(0x3e4)](this[_0x570060(0x239)][_0x570060(0x386)]['pipe'](switchMap(()=>{const _0x3b9f39=_0x570060,_0x3c4197=this[_0x3b9f39(0x239)][_0x3b9f39(0x24d)]();if(_0x3c4197)return this[_0x3b9f39(0x3d6)][_0x3b9f39(0x3dc)](_0x3c4197[_0x3b9f39(0x22a)]());return of(null);}),switchMap(_0x315902=>{const _0x18d90d=_0x570060;if(_0x315902)return _0x315902[_0x18d90d(0x398)];return of(CollaborationStatus[_0x18d90d(0x207)]);}))['subscribe'](_0x4a9590=>{const _0x2ecadf=_0x570060;this[_0x2ecadf(0x2e6)][_0x2ecadf(0x266)](_0x4a9590);}));}[_0x1222a9(0x2a8)](){const _0x2388e1=_0x1222a9;this['disposeWithMe'](this[_0x2388e1(0x276)][_0x2388e1(0x26e)](BuiltInUIPart['HEADER_MENU'],()=>connectInjector(passProps({'status$':this[_0x2388e1(0x2e6)][_0x2388e1(0x2d2)]()}),this[_0x2388e1(0x21b)])));}};DesktopCollaborationStatusDisplayController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationController)),__decorateParam(0x3,IUIPartsService)],DesktopCollaborationStatusDisplayController);function passProps(_0x253b85){const {status$:_0x549b00}=_0x253b85;return function _0x1275e0(){return jsx(CollaborationStatusDisplay,{'status$':_0x549b00});};}const IURLService=createIdentifier(_0x1222a9(0x2c0));let CollaborationDataLoaderController=class CollaborationDataLoaderController extends RxDisposable{constructor(_0x5d5c36,_0x4e2708,_0x235f88,_0x2d2692,_0xec8199){const _0x300f6f=_0x1222a9;super(),this['_urlService']=_0x5d5c36,this['_logService']=_0x4e2708,this[_0x300f6f(0x23f)]=_0x235f88,this[_0x300f6f(0x36b)]=_0x2d2692;if(_0xec8199)_0xec8199===null||_0xec8199===void 0x0||_0xec8199['whenReady']()['then'](()=>this[_0x300f6f(0x338)]());else this[_0x300f6f(0x38a)]['debug'](_0x300f6f(0x3fc),_0x300f6f(0x1ef)),this[_0x300f6f(0x338)]();}async[_0x1222a9(0x338)](){const _0xac5244=_0x1222a9,_0x16f202=this[_0xac5244(0x36e)]['getParam']('unit'),_0x456aa9=this[_0xac5244(0x36e)][_0xac5244(0x370)](_0xac5244(0x24e)),_0x194860=this['_urlService'][_0xac5244(0x370)](_0xac5244(0x228));if(!_0x16f202||!_0x456aa9){this[_0xac5244(0x38a)][_0xac5244(0x1e1)](_0xac5244(0x3fc),'No\x20unitID\x20or\x20type\x20in\x20URL.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.');return;}const _0x223692=await this['_dataLoaderService'][_0xac5244(0x258)](_0x16f202,Number(_0x456aa9),_0x194860);if(_0x223692&&_0x223692 instanceof Workbook)this[_0xac5244(0x261)](_0x223692);}async['_setupSubUnitSync'](_0xffafe6){const _0x2ffaae=_0x1222a9;await this[_0x2ffaae(0x22d)](_0xffafe6),_0xffafe6[_0x2ffaae(0x307)]['pipe'](takeUntil(this[_0x2ffaae(0x381)]))['subscribe'](_0x4e7ff5=>{const _0x47b001=_0x2ffaae;if(_0x4e7ff5)this[_0x47b001(0x2f1)](_0x4e7ff5);}),this[_0x2ffaae(0x36e)]['urlChange$']['pipe'](takeUntil(this[_0x2ffaae(0x381)]))[_0x2ffaae(0x3a1)](()=>this['_updateSubUnitFromURLParams'](_0xffafe6));}[_0x1222a9(0x2f1)](_0xc1a4b1,_0x229296=![]){const _0x1e8d17=_0x1222a9,_0x28a75e=this[_0x1e8d17(0x36e)][_0x1e8d17(0x370)](_0x1e8d17(0x228));if(_0xc1a4b1[_0x1e8d17(0x286)]()!==_0x28a75e)this['_urlService'][_0x1e8d17(0x2fb)](_0x1e8d17(0x228),_0xc1a4b1[_0x1e8d17(0x286)](),_0x229296);}async[_0x1222a9(0x22d)](_0x838711){const _0x9909d1=_0x1222a9;var _0x4fb1a7;const _0x786514=this[_0x9909d1(0x36e)][_0x9909d1(0x370)](_0x9909d1(0x228));if(!_0x786514||!_0x838711['getSheetBySheetId'](_0x786514)){const _0x468fb2=_0x838711['getUnhiddenWorksheets']()[0x0],_0x447d03=_0x838711[_0x9909d1(0x3dd)](_0x468fb2);if(!_0x447d03)return;this['_updateURLWithCurrentState'](_0x447d03,!![]),await this[_0x9909d1(0x23f)][_0x9909d1(0x3de)](SetWorksheetActivateCommand['id'],{'unitId':_0x838711[_0x9909d1(0x22a)](),'subUnitId':_0x468fb2});return;}if(((_0x4fb1a7=_0x838711[_0x9909d1(0x3e7)]())===null||_0x4fb1a7===void 0x0?void 0x0:_0x4fb1a7[_0x9909d1(0x286)]())===_0x786514)return;await this[_0x9909d1(0x23f)]['executeCommand'](SetWorksheetActivateCommand['id'],{'unitId':_0x838711[_0x9909d1(0x22a)](),'subUnitId':_0x786514});}};CollaborationDataLoaderController=__decorate([__decorateParam(0x0,IURLService),__decorateParam(0x1,ILogService),__decorateParam(0x2,ICommandService),__decorateParam(0x3,Inject(DataLoaderService)),__decorateParam(0x4,Optional(IRemoteInstanceService))],CollaborationDataLoaderController);var name='@univerjs-pro/collaboration-client-ui',version=_0x1222a9(0x3c7);let ImagePasteController=class ImagePasteController extends RxDisposable{constructor(_0x37522d,_0x569c40){const _0x1c9191=_0x1222a9;super(),this[_0x1c9191(0x3a4)]=_0x37522d,this['_imageIoService']=_0x569c40,this[_0x1c9191(0x338)]();}['_init'](){const _0x3342c4=_0x1222a9,_0x387312=this;this['disposeWithMe'](this[_0x3342c4(0x3a4)][_0x3342c4(0x2e2)]({'onBeforePasteImage':async _0x1977bb=>{const _0x1f5167=_0x3342c4,_0x1d5f8c=await _0x387312[_0x1f5167(0x21d)][_0x1f5167(0x330)](_0x1977bb);if(_0x1d5f8c)return{'source':_0x1d5f8c[_0x1f5167(0x263)],'imageSourceType':_0x1d5f8c[_0x1f5167(0x3ea)]};return null;}}));}};ImagePasteController=__decorate([__decorateParam(0x0,IDocClipboardService),__decorateParam(0x1,IImageIoService)],ImagePasteController);const BACKGROUND_TOKENS=[_0x1222a9(0x1e2),_0x1222a9(0x3e3),_0x1222a9(0x3e8),_0x1222a9(0x39a),'blue.400','yellow.400'];var ColorAssignService=class extends Disposable{constructor(..._0x1f58f3){const _0x586a62=_0x1222a9;super(..._0x1f58f3),_defineProperty(this,_0x586a62(0x248),new Map()),_defineProperty(this,_0x586a62(0x3e9),0x0);}['assignAColorForMemberID'](_0x2560f5){const _0x4802f8=_0x1222a9;if(this[_0x4802f8(0x248)][_0x4802f8(0x3fd)](_0x2560f5))return this[_0x4802f8(0x248)]['get'](_0x2560f5);const _0x29f1b0=BACKGROUND_TOKENS[this[_0x4802f8(0x3e9)]];return this[_0x4802f8(0x3e9)]=(this[_0x4802f8(0x3e9)]+0x1)%BACKGROUND_TOKENS[_0x4802f8(0x2c1)],this['_assignedColors']['set'](_0x2560f5,_0x29f1b0),_0x29f1b0;}};function serializeDocTextRanges(_0x274bea){const _0x213a67=_0x1222a9;let _0x32f53f='';for(const _0x324a7e of _0x274bea){const {startOffset:_0x215b93,endOffset:_0x505c44,isActive:_0x57a602,rangeType:_0x34d03d,segmentId:_0xae0dd3,segmentPage:_0x258b5f}=_0x324a7e;if(_0x32f53f[_0x213a67(0x2c1)])_0x32f53f+=',';_0x32f53f+=_0x215b93+':'+_0x505c44+':'+(_0x57a602?'1':'0')+':'+_0x34d03d+':'+_0xae0dd3+':'+_0x258b5f;}return _0x32f53f;}function deserializeDocTextRanges(_0x184562){const _0x40d2c2=_0x1222a9,_0x2a1aef=_0x184562[_0x40d2c2(0x39f)](','),_0x5c2eaa=[];for(const _0x516ee0 of _0x2a1aef){const [_0x3b3f19,_0xa4ad0b,_0x1c2560,_0x161416,_0x5df5fd,_0xf1f9d5]=_0x516ee0[_0x40d2c2(0x39f)](':');_0x5c2eaa[_0x40d2c2(0x29a)]({'startOffset':Number(_0x3b3f19),'endOffset':Number(_0xa4ad0b),'collapsed':_0x3b3f19===_0xa4ad0b,'isActive':_0x1c2560==='1','rangeType':_0x161416===DOC_RANGE_TYPE['TEXT']?DOC_RANGE_TYPE[_0x40d2c2(0x20c)]:DOC_RANGE_TYPE['RECT'],'segmentId':typeof _0x5df5fd===_0x40d2c2(0x309)?String(_0x5df5fd):'','segmentPage':Number(_0xf1f9d5!==null&&_0xf1f9d5!==void 0x0?_0xf1f9d5:-0x1)});}if(!_0x5c2eaa[_0x40d2c2(0x2cd)](_0x463d5f=>_0x463d5f[_0x40d2c2(0x3e0)]))_0x5c2eaa[0x0]['isActive']=!![];return _0x5c2eaa;}var DocSyncEditingCollabCursorService=class extends RxDisposable{constructor(..._0x43cd19){const _0x24659a=_0x1222a9;super(..._0x43cd19),_defineProperty(this,'_collabCursorState$',new BehaviorSubject(null)),_defineProperty(this,_0x24659a(0x216),this[_0x24659a(0x1fb)][_0x24659a(0x2d2)]());}[_0x1222a9(0x2ae)](_0xe5a0a5){const _0x5303bb=_0x1222a9,{unitID:_0x210e39,memberID:_0x58caee,textRanges:_0x487650}=_0xe5a0a5,_0x105f02=serializeDocTextRanges(_0x487650);if(_0x105f02==='')return;const _0x6886cd={'unitID':_0x210e39,'memberID':_0x58caee,'selection':_0x105f02};this[_0x5303bb(0x1fb)][_0x5303bb(0x266)](_0x6886cd);}};const DEBOUNCE_TIME$1=0x12c,SHARE_LOCAL_DEBOUNCE_TIME$1=0x64;let DocCollabCursorEntity=class DocCollabCursorEntity extends RxDisposable{get[_0x1222a9(0x331)](){const _0x3bd117=_0x1222a9;return this['_cursorInfo$'][_0x3bd117(0x1e5)]();}get[_0x1222a9(0x342)](){const _0xaa1a73=_0x1222a9;return this[_0xaa1a73(0x40b)][_0xaa1a73(0x1e5)]();}constructor(_0x4f6ed0,_0x4a9051,_0x5a8b6a,_0xf63a96,_0x2f5649,_0xdb755c,_0x28329f,_0xbd3baf,_0x39e155){const _0x16136e=_0x1222a9;super(),this[_0x16136e(0x3eb)]=_0x4f6ed0,this[_0x16136e(0x2bb)]=_0x4a9051,this[_0x16136e(0x21b)]=_0x5a8b6a,this['_colorAssignService']=_0xf63a96,this[_0x16136e(0x2ed)]=_0x2f5649,this['_syncEditingCollabCursorService']=_0xdb755c,this[_0x16136e(0x352)]=_0x28329f,this[_0x16136e(0x239)]=_0xbd3baf,this['_commandService']=_0x39e155,_defineProperty(this,_0x16136e(0x1e8),![]),_defineProperty(this,_0x16136e(0x338),![]),_defineProperty(this,'_cursorInfo$',new BehaviorSubject(new Map())),_defineProperty(this,_0x16136e(0x2b0),this[_0x16136e(0x3ce)][_0x16136e(0x2d2)]()),_defineProperty(this,_0x16136e(0x40b),new BehaviorSubject([])),_defineProperty(this,_0x16136e(0x297),this[_0x16136e(0x40b)][_0x16136e(0x31b)](debounceTime(DEBOUNCE_TIME$1))),_defineProperty(this,_0x16136e(0x2ab),debounce(_0x37a38b=>{const _0x6348c0=_0x16136e,_0x27e26d={'eventID':CollaborationEvent[_0x6348c0(0x2cc)],'data':{'unitID':this[_0x6348c0(0x3eb)],'memberID':this[_0x6348c0(0x2bb)][_0x6348c0(0x33b)](),'selection':serializeDocTextRanges(_0x37a38b)}};this[_0x6348c0(0x2bb)][_0x6348c0(0x38f)](_0x27e26d,this['unitID']);},SHARE_LOCAL_DEBOUNCE_TIME$1));}[_0x1222a9(0x23d)](){const _0x1a30c9=_0x1222a9;super[_0x1a30c9(0x23d)](),this['_cursorInfo$']['next'](new Map()),this['_cursorInfo$'][_0x1a30c9(0x40d)](),this['_roomMembers$'][_0x1a30c9(0x266)]([]),this['_roomMembers$'][_0x1a30c9(0x40d)]();}[_0x1222a9(0x2a3)](){const _0x187783=_0x1222a9;if(this[_0x187783(0x338)])return;this[_0x187783(0x338)]=!![],this[_0x187783(0x2bb)]['sessionStatus$']['pipe'](takeUntil(this[_0x187783(0x381)]))[_0x187783(0x3a1)](_0x20b960=>{const _0x221d9e=_0x187783;if(_0x20b960===SessionStatus[_0x221d9e(0x1fa)])this[_0x221d9e(0x3b9)]();else this[_0x221d9e(0x30e)]();}),this['_session']['event$'][_0x187783(0x31b)](takeUntil(this['dispose$']))[_0x187783(0x3a1)](_0x2b072a=>{const _0x4289a0=_0x187783,_0x5cbcf8=_0x2b072a[_0x4289a0(0x34e)];if(_0x5cbcf8===CollaborationEvent[_0x4289a0(0x2cc)])this['_onCursorUpdate'](_0x2b072a);if(_0x5cbcf8===CollaborationEvent[_0x4289a0(0x1f2)])this[_0x4289a0(0x30c)](_0x2b072a);}),this[_0x187783(0x3e4)](this[_0x187783(0x23f)]['onCommandExecuted'](_0x1a6c00=>{const _0x5db2ba=_0x187783,_0x316892=_0x1a6c00[_0x5db2ba(0x3ec)];if(_0x316892==null)return;if(this[_0x5db2ba(0x1e8)]&&_0x1a6c00['id']===SetTextSelectionsOperation['id']&&_0x316892['unitId']===this['unitID']&&_0x316892[_0x5db2ba(0x39e)]===![]&&_0x316892['ranges'][_0x5db2ba(0x2c1)]>0x0)this['_updateLocalCursor'](_0x316892['ranges']);})),this[_0x187783(0x281)]['collabCursorState$'][_0x187783(0x31b)](takeUntil(this['dispose$']))[_0x187783(0x3a1)](_0x53e603=>{const _0x5be045=_0x187783;if((_0x53e603===null||_0x53e603===void 0x0?void 0x0:_0x53e603[_0x5be045(0x3eb)])!==this['unitID'])return;const _0x1edea5={'eventID':CollaborationEvent[_0x5be045(0x2cc)],'data':_0x53e603};this['_onCursorUpdate'](_0x1edea5);}),this[_0x187783(0x3e4)](this['_commandService'][_0x187783(0x37c)](_0x1d5a85=>{const _0x3096da=_0x187783;if(_0x1d5a85[_0x3096da(0x3ec)]==null)return;const _0x5e97a6=_0x1d5a85[_0x3096da(0x3ec)];if(_0x1d5a85['id']!==RichTextEditingMutation['id']||_0x5e97a6['unitId']!==this[_0x3096da(0x3eb)])return;const _0x2e8e5d={'id':'doc.mutation.rich-text-editing','params':_0x5e97a6},_0x375b99=this[_0x3096da(0x331)];for(const [_0xfeff6,_0x56857b]of _0x375b99){const _0x3b7b40={'id':_0x3096da(0x2e0),'params':{'unitId':this[_0x3096da(0x3eb)],'actions':null,'textRanges':_0x56857b[_0x3096da(0x27d)]}},_0x498bb1=this[_0x3096da(0x352)][_0x3096da(0x3f4)](_0x2e8e5d,_0x3b7b40,![]);if(isTransformMutationFailure(_0x498bb1))throw _0x498bb1[_0x3096da(0x3c0)];_0x375b99[_0x3096da(0x37a)](_0xfeff6,{..._0x56857b,'ranges':_0x498bb1[_0x3096da(0x359)][_0x3096da(0x3ec)][_0x3096da(0x290)]});}queueMicrotask(()=>{const _0x295e7c=_0x3096da;this[_0x295e7c(0x3ce)][_0x295e7c(0x266)](_0x375b99);});}));}[_0x1222a9(0x22c)](_0x2aa957){const _0x5d2b8d=_0x1222a9;var _0x543d01,_0x48b0d5;const {memberID:_0x485000,selection:_0x417834}=_0x2aa957[_0x5d2b8d(0x2c9)],_0xdc3118=deserializeDocTextRanges(_0x417834),_0x2daa1c=(_0x543d01=(_0x48b0d5=this[_0x5d2b8d(0x2ed)][_0x5d2b8d(0x28d)](this[_0x5d2b8d(0x3eb)],_0x485000))===null||_0x48b0d5===void 0x0?void 0x0:_0x48b0d5['name'])!==null&&_0x543d01!==void 0x0?_0x543d01:_0x5d2b8d(0x282),_0x1234eb={'color':this['_colorAssignService'][_0x5d2b8d(0x2a4)](_0x485000),'name':_0x2daa1c,'ranges':_0xdc3118},_0xecc9f2=this[_0x5d2b8d(0x331)];_0xecc9f2[_0x5d2b8d(0x37a)](_0x485000,_0x1234eb),this[_0x5d2b8d(0x3ce)][_0x5d2b8d(0x266)](_0xecc9f2);}[_0x1222a9(0x30c)](_0x59a11d){const _0x29f0c8=_0x1222a9,{memberID:_0x469b2a}=_0x59a11d['data'],_0x21951c=this['cursorInfo'];_0x21951c[_0x29f0c8(0x24f)](_0x469b2a),this[_0x29f0c8(0x3ce)]['next'](_0x21951c);}[_0x1222a9(0x3b9)](){const _0x26cdb0=_0x1222a9;var _0xae738b;this[_0x26cdb0(0x1e8)]=!![];if(((_0xae738b=this[_0x26cdb0(0x239)][_0x26cdb0(0x24d)]())===null||_0xae738b===void 0x0?void 0x0:_0xae738b[_0x26cdb0(0x22a)]())!==this['unitID'])return;const _0x1f27ef=this['_injector'][_0x26cdb0(0x232)](DocSelectionManagerService)['getDocRanges']();if(Array[_0x26cdb0(0x1e6)](_0x1f27ef)&&_0x1f27ef[_0x26cdb0(0x2c1)]>0x0)this[_0x26cdb0(0x2ab)](_0x1f27ef);}[_0x1222a9(0x30e)](){const _0x313153=_0x1222a9;this[_0x313153(0x1e8)]=![];}};DocCollabCursorEntity=__decorate([__decorateParam(0x2,Inject(Injector)),__decorateParam(0x3,Inject(ColorAssignService)),__decorateParam(0x4,Inject(MemberService)),__decorateParam(0x5,Inject(DocSyncEditingCollabCursorService)),__decorateParam(0x6,ITransformService),__decorateParam(0x7,IUniverInstanceService),__decorateParam(0x8,ICommandService)],DocCollabCursorEntity);const DEBOUNCE_TIME=0x12c,SHARE_LOCAL_DEBOUNCE_TIME=0x64,createNextTick=()=>{let _0x4fc828=[],_0xd6d2da=![];return _0x4bb419=>{const _0x349944=_0x2f58;_0x4fc828[_0x349944(0x29a)](_0x4bb419),!_0xd6d2da&&(_0xd6d2da=!![],setTimeout(()=>{const _0x4d3457=_0x349944;_0x4fc828[_0x4d3457(0x2bc)](_0x47ea39=>_0x47ea39()),_0x4fc828=[],_0xd6d2da=![];}));};};let SheetCollabCursorEntity=class SheetCollabCursorEntity extends RxDisposable{get['cursorInfo'](){const _0xb83077=_0x1222a9;return this['_cursorInfo$'][_0xb83077(0x1e5)]();}get[_0x1222a9(0x342)](){const _0x2558d0=_0x1222a9;return this[_0x2558d0(0x40b)][_0x2558d0(0x1e5)]();}constructor(_0x5bb3ce,_0x1a846a,_0x393d2a,_0x32f5af,_0x31de02,_0x13eb9a,_0x3840c2,_0x38de5e){const _0x32a5f4=_0x1222a9;super(),this[_0x32a5f4(0x3eb)]=_0x5bb3ce,this[_0x32a5f4(0x2bb)]=_0x1a846a,this[_0x32a5f4(0x21b)]=_0x393d2a,this['_colorAssignService']=_0x32f5af,this['_memberService']=_0x31de02,this['_univerInstanceService']=_0x13eb9a,this[_0x32a5f4(0x23f)]=_0x3840c2,this[_0x32a5f4(0x225)]=_0x38de5e,_defineProperty(this,_0x32a5f4(0x1e8),![]),_defineProperty(this,_0x32a5f4(0x338),![]),_defineProperty(this,_0x32a5f4(0x3ce),new BehaviorSubject(new Map())),_defineProperty(this,'cursorInfo$',this[_0x32a5f4(0x3ce)][_0x32a5f4(0x2d2)]()),_defineProperty(this,_0x32a5f4(0x40b),new BehaviorSubject([])),_defineProperty(this,'roomMembers$',this['_roomMembers$'][_0x32a5f4(0x31b)](debounceTime(DEBOUNCE_TIME))),_defineProperty(this,_0x32a5f4(0x2ab),debounce((_0x3e54ad,_0x33733d)=>{const _0x34c871=_0x32a5f4,_0x319505={'eventID':CollaborationEvent[_0x34c871(0x2cc)],'data':{'unitID':this[_0x34c871(0x3eb)],'memberID':this[_0x34c871(0x2bb)][_0x34c871(0x33b)](),'selection':serializeRangeWithSheet(_0x3e54ad,_0x33733d[_0x34c871(0x298)])}};this[_0x34c871(0x2bb)][_0x34c871(0x38f)](_0x319505,this[_0x34c871(0x3eb)]);},SHARE_LOCAL_DEBOUNCE_TIME));}[_0x1222a9(0x23d)](){const _0x5441af=_0x1222a9;super[_0x5441af(0x23d)](),this[_0x5441af(0x3ce)]['next'](new Map()),this['_cursorInfo$'][_0x5441af(0x40d)](),this[_0x5441af(0x40b)]['next']([]),this[_0x5441af(0x40b)][_0x5441af(0x40d)]();}[_0x1222a9(0x2a3)](){const _0x33c0e3=_0x1222a9;if(this[_0x33c0e3(0x338)])return;this[_0x33c0e3(0x338)]=!![],this[_0x33c0e3(0x2bb)]['sessionStatus$'][_0x33c0e3(0x31b)](takeUntil(this['dispose$']))[_0x33c0e3(0x3a1)](_0x1a5810=>{const _0x388e2b=_0x33c0e3;if(_0x1a5810===SessionStatus[_0x388e2b(0x1fa)])this[_0x388e2b(0x3b9)]();else this[_0x388e2b(0x30e)]();}),this[_0x33c0e3(0x2bb)]['event$'][_0x33c0e3(0x31b)](takeUntil(this[_0x33c0e3(0x381)]))[_0x33c0e3(0x3a1)](_0x1797d8=>{const _0x515679=_0x33c0e3,_0x54f588=_0x1797d8['eventID'];if(_0x54f588===CollaborationEvent['UPDATE_CURSOR'])this[_0x515679(0x22c)](_0x1797d8);if(_0x54f588===CollaborationEvent[_0x515679(0x1f2)])this['_onCursorDelete'](_0x1797d8);}),this[_0x33c0e3(0x211)](),this[_0x33c0e3(0x3e4)](this['_commandService'][_0x33c0e3(0x37c)](_0x30bdfb=>{const _0x2d8484=_0x33c0e3;if(this[_0x2d8484(0x1e8)]&&_0x30bdfb['id']===SetSelectionsOperation['id']&&_0x30bdfb[_0x2d8484(0x3ec)]['unitId']===this[_0x2d8484(0x3eb)]){const _0xb16ab1=_0x30bdfb[_0x2d8484(0x3ec)];this[_0x2d8484(0x2ab)](_0xb16ab1[_0x2d8484(0x28c)],_0xb16ab1[_0x2d8484(0x34f)][0x0]);}}));}['_onCursorUpdate'](_0x52028b){const _0x20434e=_0x1222a9;var _0x1b975c,_0x2e341c;const {memberID:_0x18b8ae,selection:_0x313c11}=_0x52028b[_0x20434e(0x2c9)],{sheetName:_0x140305,range:_0x4e6d05}=deserializeRangeWithSheet(_0x313c11),_0x57b19c={'name':(_0x1b975c=(_0x2e341c=this['_memberService']['getMember'](this['unitID'],_0x18b8ae))===null||_0x2e341c===void 0x0?void 0x0:_0x2e341c[_0x20434e(0x35c)])!==null&&_0x1b975c!==void 0x0?_0x1b975c:'Unknown\x20user','range':this['_getMergeRange'](_0x140305,_0x4e6d05),'sheetID':_0x140305,'color':this['_colorAssignService'][_0x20434e(0x2a4)](_0x18b8ae),'selection':_0x313c11},_0x51b89b=this[_0x20434e(0x331)];_0x51b89b[_0x20434e(0x37a)](_0x18b8ae,_0x57b19c),this['_cursorInfo$'][_0x20434e(0x266)](_0x51b89b);}[_0x1222a9(0x30c)](_0x5deb4d){const _0xb298a8=_0x1222a9,{memberID:_0x1ee8aa}=_0x5deb4d[_0xb298a8(0x2c9)],_0x106b6e=this['cursorInfo'];_0x106b6e[_0xb298a8(0x24f)](_0x1ee8aa),this[_0xb298a8(0x3ce)][_0xb298a8(0x266)](_0x106b6e);}[_0x1222a9(0x404)](_0x840f5f,_0x546fe5){const _0x804cf8=_0x1222a9;var _0x2094d0;const _0x51a9da=(_0x2094d0=this[_0x804cf8(0x239)][_0x804cf8(0x214)](this[_0x804cf8(0x3eb)]))===null||_0x2094d0===void 0x0||(_0x2094d0=_0x2094d0[_0x804cf8(0x3dd)](_0x840f5f))===null||_0x2094d0===void 0x0?void 0x0:_0x2094d0[_0x804cf8(0x30a)]();return(_0x51a9da===null||_0x51a9da===void 0x0?void 0x0:_0x51a9da['find'](_0x5e4153=>Rectangle['contains'](_0x5e4153,_0x546fe5)))||_0x546fe5;}['_onRefRangeChange'](){const _0x317251=_0x1222a9,_0x386874=new DisposableCollection(),_0x39738e=createNextTick(),_0x1b9349=()=>{const _0x413fc3=_0x2f58;_0x386874['dispose']();const _0x35d427=(_0x19879,_0x54f599,_0x5e0ee2,_0x17031d)=>{const _0x2e0b06=_0x2f58;let _0x4f0a6c=[];switch(_0x19879['id']){case EffectRefRangId[_0x2e0b06(0x2ec)]:_0x4f0a6c=handleDeleteRangeMoveLeft(_0x19879,_0x17031d);break;case EffectRefRangId[_0x2e0b06(0x355)]:_0x4f0a6c=handleDeleteRangeMoveUp(_0x19879,_0x17031d);break;case EffectRefRangId[_0x2e0b06(0x202)]:_0x4f0a6c=handleInsertCol(_0x19879,_0x17031d);break;case EffectRefRangId['InsertRangeMoveDownCommandId']:_0x4f0a6c=handleInsertRangeMoveDown(_0x19879,_0x17031d);break;case EffectRefRangId['InsertRangeMoveRightCommandId']:_0x4f0a6c=handleInsertRangeMoveRight(_0x19879,_0x17031d);break;case EffectRefRangId[_0x2e0b06(0x323)]:_0x4f0a6c=handleInsertRow(_0x19879,_0x17031d);break;case EffectRefRangId[_0x2e0b06(0x333)]:_0x4f0a6c=handleMoveRange(_0x19879,_0x17031d);break;case EffectRefRangId[_0x2e0b06(0x2a9)]:_0x4f0a6c=handleIRemoveCol(_0x19879,_0x17031d);break;case EffectRefRangId[_0x2e0b06(0x231)]:_0x4f0a6c=handleIRemoveRow(_0x19879,_0x17031d);break;}const _0x37b7af=runRefRangeMutations(_0x4f0a6c,_0x17031d),_0x2eb86e=this['cursorInfo'][_0x2e0b06(0x232)](_0x54f599);if(_0x2eb86e&&_0x37b7af){const _0x103f1a={..._0x2eb86e,'range':_0x37b7af};this[_0x2e0b06(0x331)][_0x2e0b06(0x37a)](_0x54f599,_0x103f1a),_0x39738e(()=>{const _0x33635d=_0x2e0b06,_0x1ebdb9=this['_refRangeService']['registerRefRange'](_0x37b7af,_0x518db7=>{const _0x486be0=_0x2f58;return _0x1ebdb9[_0x486be0(0x23d)](),_0x35d427(_0x518db7,_0x54f599,_0x5e0ee2,_0x37b7af);});_0x386874[_0x33635d(0x2e3)](_0x1ebdb9);});}return{'redos':[],'undos':[]};};this[_0x413fc3(0x331)][_0x413fc3(0x2bc)]((_0x32d054,_0x544a1c)=>{const _0x34ccc6=_0x413fc3,{range:_0x534fe2,sheetID:_0x1a24c4}=_0x32d054,_0xeb5269=this[_0x34ccc6(0x225)][_0x34ccc6(0x256)](_0x534fe2,_0x19482b=>{const _0x43c2af=_0x34ccc6;return _0xeb5269[_0x43c2af(0x23d)](),_0x35d427(_0x19482b,_0x544a1c,_0x1a24c4,_0x534fe2);});_0x386874[_0x34ccc6(0x2e3)](_0xeb5269);});};this[_0x317251(0x3e4)](toDisposable(this['_cursorInfo$'][_0x317251(0x3a1)](()=>{_0x1b9349();})));}[_0x1222a9(0x3b9)](){const _0x201dc9=_0x1222a9;var _0x205c0f,_0x541ac4;this['_online']=!![];if(((_0x205c0f=this[_0x201dc9(0x239)][_0x201dc9(0x24d)]())===null||_0x205c0f===void 0x0?void 0x0:_0x205c0f[_0x201dc9(0x22a)]())!==this[_0x201dc9(0x3eb)])return;const _0x3e6ca3=(_0x541ac4=this[_0x201dc9(0x21b)]['get'](SheetsSelectionsService)[_0x201dc9(0x237)]())===null||_0x541ac4===void 0x0?void 0x0:_0x541ac4[0x0],_0x43d317=this[_0x201dc9(0x239)][_0x201dc9(0x35b)](UniverInstanceType[_0x201dc9(0x23c)])['getActiveSheet']();if(_0x3e6ca3&&_0x43d317)this[_0x201dc9(0x2ab)](_0x43d317[_0x201dc9(0x286)](),_0x3e6ca3);}['_toggleOffline'](){this['_online']=![];}};SheetCollabCursorEntity=__decorate([__decorateParam(0x2,Inject(Injector)),__decorateParam(0x3,Inject(ColorAssignService)),__decorateParam(0x4,Inject(MemberService)),__decorateParam(0x5,IUniverInstanceService),__decorateParam(0x6,ICommandService),__decorateParam(0x7,Inject(RefRangeService))],SheetCollabCursorEntity);let CollabCursorController=class CollabCursorController extends RxDisposable{constructor(_0x27b7b9,_0x3da3ad,_0x1ead2c){const _0x1be94f=_0x1222a9;super(),this['_univerInstanceService']=_0x27b7b9,this['_injector']=_0x3da3ad,this[_0x1be94f(0x29d)]=_0x1ead2c,_defineProperty(this,_0x1be94f(0x2fe),new Map()),_defineProperty(this,_0x1be94f(0x2bd),new Subject()),this[_0x1be94f(0x338)]();}[_0x1222a9(0x23d)](){const _0x41b5e9=_0x1222a9;super[_0x41b5e9(0x23d)](),this[_0x41b5e9(0x2bd)][_0x41b5e9(0x40d)](),this[_0x41b5e9(0x2fe)]['forEach'](_0x3ed973=>_0x3ed973[_0x41b5e9(0x23d)]());}['getCollabCursors$'](_0xd71ec3){const _0x5e9e65=_0x1222a9;if(this['_entities'][_0x5e9e65(0x3fd)](_0xd71ec3))return this[_0x5e9e65(0x2fe)]['get'](_0xd71ec3)[_0x5e9e65(0x2b0)];return this[_0x5e9e65(0x2bd)][_0x5e9e65(0x31b)](filter(_0x179c56=>_0x179c56['unitID']===_0xd71ec3),switchMap(_0x2cfc8d=>_0x2cfc8d[_0x5e9e65(0x2b0)]));}[_0x1222a9(0x338)](){const _0x2fec67=_0x1222a9;this[_0x2fec67(0x239)][_0x2fec67(0x3bd)](UniverInstanceType[_0x2fec67(0x23c)])['pipe'](takeUntil(this['dispose$']))[_0x2fec67(0x3a1)](async _0x376d51=>{const _0x7fe7ae=_0x2fec67,_0x131820=_0x376d51[_0x7fe7ae(0x29b)][_0x7fe7ae(0x22a)](),_0xc63d27=await this[_0x7fe7ae(0x21e)](_0x131820);this['_entityInit$'][_0x7fe7ae(0x266)](_0xc63d27),this[_0x7fe7ae(0x2fe)][_0x7fe7ae(0x37a)](_0x131820,_0xc63d27);}),this['_univerInstanceService'][_0x2fec67(0x3bd)](UniverInstanceType[_0x2fec67(0x329)])['pipe'](takeUntil(this['dispose$']))['pipe'](filter(_0x1bee71=>{const _0x5b45e4=_0x2fec67;return!_0x1bee71[_0x5b45e4(0x29b)][_0x5b45e4(0x22a)]()[_0x5b45e4(0x392)]('__');}))[_0x2fec67(0x3a1)](async _0x1fe90e=>{const _0x2d857b=_0x2fec67,{unit:_0x22723e}=_0x1fe90e,_0x1fe821=_0x22723e[_0x2d857b(0x22a)](),_0x55544e=await this[_0x2d857b(0x376)](_0x1fe821);this[_0x2d857b(0x2bd)][_0x2d857b(0x266)](_0x55544e),this[_0x2d857b(0x2fe)][_0x2d857b(0x37a)](_0x1fe821,_0x55544e);}),_0x47a541(this[_0x2fec67(0x239)]['getTypeOfUnitDisposed$'](UniverInstanceType['UNIVER_DOC']),this[_0x2fec67(0x239)][_0x2fec67(0x306)](UniverInstanceType[_0x2fec67(0x23c)]))[_0x2fec67(0x31b)](takeUntil(this[_0x2fec67(0x381)]))[_0x2fec67(0x3a1)](_0x1a2a1e=>{const _0x4eca53=_0x2fec67,_0x2c5697=_0x1a2a1e['getUnitId'](),_0x3ca2f0=this[_0x4eca53(0x2fe)][_0x4eca53(0x232)](_0x2c5697);_0x3ca2f0&&(_0x3ca2f0['dispose'](),this[_0x4eca53(0x2fe)]['delete'](_0x2c5697));});}async[_0x1222a9(0x21e)](_0xf4c407){const _0x358c64=_0x1222a9,_0x1b901c=await this[_0x358c64(0x29d)]['requireSession'](_0xf4c407),_0xb78591=this[_0x358c64(0x21b)][_0x358c64(0x391)](SheetCollabCursorEntity,_0xf4c407,_0x1b901c);return _0xb78591[_0x358c64(0x2a3)](),_0xb78591;}async[_0x1222a9(0x376)](_0x154596){const _0x11db20=_0x1222a9,_0x8def6c=await this[_0x11db20(0x29d)][_0x11db20(0x21f)](_0x154596),_0x56dde9=this[_0x11db20(0x21b)][_0x11db20(0x391)](DocCollabCursorEntity,_0x154596,_0x8def6c);return _0x56dde9[_0x11db20(0x2a3)](),_0x56dde9;}};CollabCursorController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],CollabCursorController);function _0x2f58(_0x4c40c7,_0x4556e6){_0x4c40c7=_0x4c40c7-0x1e1;const _0x189583=_0x1895();let _0x2f58a5=_0x189583[_0x4c40c7];return _0x2f58a5;}const COLLAB_CURSOR_LABEL_HEIGHT=0x14,COLLAB_CURSOR_LABEL_MAX_WIDTH=0xc8,COLLAB_CURSOR_LABEL_TEXT_PADDING_LR=0x4,COLLAB_CURSOR_LABEL_TEXT_PADDING_TB=0x5;function drawBubble(_0x51b1e4,_0x1ad9f5){const _0xe9b236=_0x1222a9;var _0x5c7e5d,_0x2a794b,_0x4c3b24;let {radius:_0x55f43,width:_0x3f5dad,height:_0x2d2dde}=_0x1ad9f5;_0x55f43=(_0x5c7e5d=_0x55f43)!==null&&_0x5c7e5d!==void 0x0?_0x5c7e5d:0x0,_0x3f5dad=(_0x2a794b=_0x3f5dad)!==null&&_0x2a794b!==void 0x0?_0x2a794b:0x1e,_0x2d2dde=(_0x4c3b24=_0x2d2dde)!==null&&_0x4c3b24!==void 0x0?_0x4c3b24:0x1e;let _0x56538a=0x0,_0x2efbb4=0x0,_0x1e7fda=0x0;_0x56538a=_0x2efbb4=_0x1e7fda=Math['min'](_0x55f43,_0x3f5dad/0x2,_0x2d2dde/0x2),_0x51b1e4[_0xe9b236(0x2b4)](),_0x51b1e4[_0xe9b236(0x308)](_0x56538a,0x0),_0x51b1e4[_0xe9b236(0x223)](_0x3f5dad-_0x2efbb4,0x0),_0x51b1e4['arc'](_0x3f5dad-_0x2efbb4,_0x2efbb4,_0x2efbb4,Math['PI']*0x3/0x2,0x0,![]),_0x51b1e4[_0xe9b236(0x223)](_0x3f5dad,_0x2d2dde-_0x1e7fda),_0x51b1e4[_0xe9b236(0x2d6)](_0x3f5dad-_0x1e7fda,_0x2d2dde-_0x1e7fda,_0x1e7fda,0x0,Math['PI']/0x2,![]),_0x51b1e4[_0xe9b236(0x223)](0x0,_0x2d2dde),_0x51b1e4[_0xe9b236(0x223)](0x0,_0x56538a),_0x51b1e4[_0xe9b236(0x2d6)](_0x56538a,_0x56538a,_0x56538a,Math['PI'],Math['PI']*0x3/0x2,![]),_0x51b1e4[_0xe9b236(0x20f)]();if(_0x1ad9f5[_0xe9b236(0x334)]){_0x51b1e4[_0xe9b236(0x1e3)](),_0x51b1e4[_0xe9b236(0x302)]=_0x1ad9f5[_0xe9b236(0x334)];if(_0x1ad9f5[_0xe9b236(0x326)]===_0xe9b236(0x3cf))_0x51b1e4[_0xe9b236(0x334)](_0xe9b236(0x3cf));else _0x51b1e4[_0xe9b236(0x334)]();_0x51b1e4[_0xe9b236(0x341)]();}}var TextBubbleShape=class TextBubbleShape extends Shape{constructor(_0x1506e0,_0x55ec37){const _0x3fb100=_0x1222a9;super(_0x1506e0,_0x55ec37),_defineProperty(this,'color',void 0x0),_defineProperty(this,_0x3fb100(0x40c),void 0x0),this[_0x3fb100(0x304)]=_0x55ec37===null||_0x55ec37===void 0x0?void 0x0:_0x55ec37[_0x3fb100(0x304)],this['text']=_0x55ec37===null||_0x55ec37===void 0x0?void 0x0:_0x55ec37[_0x3fb100(0x40c)];}static[_0x1222a9(0x218)](_0x3b44a8,_0x9c2dfd){const _0x275c88=_0x1222a9,{text:_0x2d04f4,color:_0x2360b5}=_0x9c2dfd;_0x3b44a8['save'](),_0x3b44a8[_0x275c88(0x3b0)]=_0x275c88(0x384);const _0x59416d=_0x3b44a8[_0x275c88(0x3ee)](_0x2d04f4)[_0x275c88(0x31e)];drawBubble(_0x3b44a8,{'height':0x14,'radius':0x4,'width':Math[_0x275c88(0x402)](_0x59416d+0x2*0x4,0xc8),'fill':_0x2360b5,'evented':![]}),_0x3b44a8[_0x275c88(0x302)]=_0x275c88(0x2ee);const _0x57a8f9=0x4,_0x1c5065=0x14-0x5,_0x5e9a84=0xc8-0x2*0x4;if(_0x59416d>_0x5e9a84){let _0x333fd0='',_0x4d838c=0x0;for(const _0x28f104 of _0x2d04f4){const _0x406a56=_0x3b44a8[_0x275c88(0x3ee)](_0x28f104)[_0x275c88(0x31e)];if(_0x4d838c+_0x406a56<=_0x5e9a84-_0x3b44a8[_0x275c88(0x3ee)](_0x275c88(0x2b5))[_0x275c88(0x31e)])_0x333fd0+=_0x28f104,_0x4d838c+=_0x406a56;else{_0x333fd0+=_0x275c88(0x2b5);break;}}_0x3b44a8[_0x275c88(0x3c6)](_0x333fd0,_0x57a8f9,_0x1c5065);}else _0x3b44a8['fillText'](_0x2d04f4,_0x57a8f9,_0x1c5065);_0x3b44a8[_0x275c88(0x341)]();}[_0x1222a9(0x300)](_0x52943c){const _0x5aaf5d=_0x1222a9;TextBubbleShape[_0x5aaf5d(0x218)](_0x52943c,this);}};const COLLAB_TEXT_ANCHOR_KEY_PREFIX='collab-text-anchor-',COLLAB_TEXT_RANGE_KEY_PREFIX=_0x1222a9(0x3a5),COLLAB_RECT_RANGE_KEY_PREFIX=_0x1222a9(0x294),ID_LENGTH=0x6,COLLAB_TEXT_ANCHOR_WIDTH=1.5,COLLAB_TEXT_ANCHOR_DOT_WIDTH=0x4,SELECTION_CONTROL_BORDER_BUFFER_WIDTH=1.5,SELECTION_CONTROL_BORDER_BUFFER_COLOR='rgba(255,\x20255,\x20255,\x200.01)';function _0x1895(){const _0x42bd30=['permission.content','_dataLoaderService','catch','_hideTimer','_urlService','highlightSecond','getParam','_renderManagerService','_instanceService','socket$','_selfUnitIDs','1585218WWENOI','_startDocCollabCursor','pluginName','_taskIds','_revisionService','set','true','onCommandExecuted','onRendered','post','findNodePositionByCharIndex','disableLocalCache','dispose$','_currentUsage','dirtyRanges','bold\x2013px\x20Source\x20Han\x20Sans\x20CN','transformStateCache','focused$','_collabCursorController','triggerDblclick','_saveCache','_logService','MUTATION','_config','_hasFormulaInDirtyRanges','_getAnchorBounding','send','releaseFormulaLimitUrl','createInstance','startsWith','SUCCESS','VIEW_MAIN','?taskId=','deepClone','_initResize','status$','collabStatus.conflict','red.300','href','_sheetSkeletonManagerService','stageInfo','isEditing','split','univer-text-xl\x20univer-transition-colors\x20univer-duration-200','subscribe','getUnit','_hovered','_docClipboardService','collab-text-range-','FromArray','top','dark:focus:univer-ring-offset-gray-800','univer-text-blue-500','getVpScrollXYInfoByPosToVp','preventDefault','beforeCommandExecuted','undoState','focus:univer-outline-none\x20focus:univer-ring-2\x20focus:univer-ring-primary-500\x20focus:univer-ring-offset-2','with','font','univer-text-orange-500','formula.calculation.started','getCellPositionByOffset','_initUnhandledRejectionListener','search','_themeService','toString','map','_toggleOnline','message','labelPosition','offsetY','getTypeOfUnitAdded$','lineno','session.collaboration-timeout','error','invokeId','_id','OTHER_CLIENTS_EDITING','exhaustSavingTask','startFormulaLimitUrl','fillText','0.22.0','enableFrontendLog','storage','history','newValue','key','_cursor','_cursorInfo$','evenodd','updateOfflineData','registerBeforeClose','bottom','_hover','currentTheme$','getViewport','_collaborationController','onPointerEnter$','parseInt','onStarting','_cursorShapes','clearTimeout','getCollabEntity$','getSheetBySheetId','executeCommand','maxFormulaLimit','isActive','univer-border-none\x20univer-bg-transparent','_localCacheService','jiqing.500','disposeWithMe','JOIN_ROOM_FAILED','OFFLINE','getActiveSheet','green.600','_colorIndex','imageSourceType','unitID','params','_lastResponseTimestamp','measureText','parse','_textBubble','Failed','registerRenderModule','collaboration.closeRoom','transformMutation','collabStatus.notCollab','static','_render','undefined','indicator','_initEvent','black','[CollaborationDataLoaderController]','has','_monkeyPatchLogService','403eauHcQ','onLocalMutation','_pollingInterval','min','rgba(','_getMergeRange','AWAITING','_scheduleClearOtherTimer','_heartbeatTimer','replaceDocRanges','defineProperty','_checkCalculationAvailable','_roomMembers$','text','complete','_localeService','getSkeleton','transformIMECache','univer-inline-flex\x20univer-items-center\x20univer-justify-center','colorClass','debug','purple.300','save','_releaseCalculationLimit','getValue','isArray','SOCKET_FAILED','_online','hovered','includes','_initEntityListener','_collaborationSessionService','[LogService\x20Error]:\x20','m1Prime','No\x20remote\x20instance\x20service\x20injected.\x20May\x20not\x20syncing\x20edits\x20to\x20the\x20web\x20worker.','281364tuUAYt','unsubscribe','USERS_LEAVE','docStateChange$','_initCommandInterceptor','addEventListener','collaboration.offline-data-not-saved','size','RECT','getCurrentRevOfUnit','ONLINE','_collabCursorState$','setAlpha','totalFormulasToCalculate','actions','getUnitStatus$','_highlight','_getSheetObject','InsertColCommandId','object','searchParams','setUndoRedoMutationParamsCache','entityInit$','NOT_COLLAB','_lastPointer','code','setInterval','getCollabCursors$','TEXT','_scheduleSaving','univer-flex\x20univer-items-center\x20univer-justify-center','closePath','addHandlerCallback','_onRefRangeChange','_color','getAncestorScale','getUniverSheetInstance','addObject','collabCursorState$','univer-h-8\x20univer-w-8\x20univer-rounded-lg','drawWith','limitInfo','_docTransformSelectionsService','_injector','_maxFormulaLimit','_imageIoService','_startSheetCollabCursor','requireSession','constructor','collabStatus.syncing','_unitOnClients','lineTo','_eventUnsubscribe','_refRangeService','_notificationService','getRangePointData','subunit','makeDirty','getUnitId','678916MdEFlC','_onCursorUpdate','_updateSubUnitFromURLParams','_initCommandExecutedListener','/universer-api/license/formula/limit/start','_getLighterColor','RemoveRowCommandId','get','stringify','onTransformChange$','_localStorageService','_applyCommand','getCurrentSelections','_initDependencies','_univerInstanceService','status','_getSessionTicket','UNIVER_SHEET','dispose','120ZkLpCu','_commandService','unshift','_docSkeleton','_handleLeaveEvent','_context','reconnect','_labelPosition','Success','result','_assignedColors','span','show','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','redoState','getFocusedUnit','type','delete','function','_range','_name','permission.title','CONFLICT','max','registerRefRange','_blinkTimer','loadUnit','location','addObjects','_getScale',',\x200.2)','toRgbString','[Unhandled\x20Rejection]:\x20','_clearOtherTimers','symbol','_setupSubUnitSync','_cachedData','source','removeEventListener','_handleEvent','next','_setupBeforeClosingHandler','getConfig','_getFormulaLimitStatus','session.connection-failed','getColorFromTheme','flatMap','START_CALCULATION','registerComponent','_stopBlinking','slice','override','_anchorDot','unitId','tooltipKey','setStateCache','_uiPartsService','_shapes','_drawRectRange','subscribeEvent','6EZbBVF','_docTransformIMECacheService','_anchor','ranges','rgba','_disabled','_getSaveTimeout','_syncEditingCollabCursorService','Unknown\x20user','5rFBBjL','engine','decorate','getSheetId','ACTIVE_UNIT_EVENT_CHANNEL','showText','replace','_transformPreviousActiveRange','_startCalculationLimit','subUnitId','getMember','onPointerMove$','all','textRanges','currentSkeleton$','iterator','values','collab-rect-range-','getOffsetConfig','rgb','roomMembers$','range','wsSessionTicketUrl','push','unit','then','_collabSessionService','_initUserListener','_memberID','getStateCache','from','setOffsetY','init','assignAColorForMemberID','endRow','_docStateChangeManagerService','_beforeCloseService','_initStatusComponent','RemoveColCommandId','event$','_updateLocalCursor','setShapeProps','loadOfflineData','syncEditingCollabCursor','row','cursorInfo$','button','origin','runOnServer','beginPath','...','_checkAndWaitForCalculationPermission','11CDbHgN','formula.calculation.waiting','toPrimitive','3379790UgivdF','_session','forEach','_entityInit$','highlight','selection','uni.network.url-service','length','endColumn','default','stack','_removeCollabCursors','removeParam','PENDING','transformRemoteChangeset','data','column','_unitStatus','UPDATE_CURSOR','some','_transformUndoRedoStack','application/json','PERMISSION_DENIED','_uploadLog','asObservable','OTHER_CLIENT_EDITING','functionsExecutedState','_send','arc','_ensureSubject','height','_docSkeletonManagerService','getCurrentSkeleton','packageName','startRow','_httpService','body','clearInterval','doc.mutation.rich-text-editing','collaboration.single-unit.warning','addClipboardHook','add','version','replaceState','_status$','417537LWsmbl','_highlightSecond','getUndoRedoMutationParamsCache','getRenderById','strokeWidth','DeleteRangeMoveLeftCommandId','_memberService','#FFF','0.2)','sheetID','_updateURLWithCurrentState','_scheduleHeartbeat','1769278NaZpmO','_showText','stage','/run/','now','collab-client.tooltip.reconnect','_blinkIntervalTimer','_handleHover','setParam','colno','_handleJoinEvent','_entities','polite','_draw','_initWindowErrorListener','fillStyle','getFormulaLimitStatusUrl','color','_docSyncEditingCollabCursorService','getTypeOfUnitDisposed$','activeSheet$','moveTo','string','getMergeData','getCellMatrix','_onCursorDelete','formula.calculation.unable','_toggleOffline','collabStatus.fetchMiss','mutations','_showGuardMessage','SYNCED','hide','univer-transition-all\x20univer-duration-200','_isBlinkVisible','onPointerLeave$','_updateCollabCursors','_createSocketURL','_document','_collaborationUIEventService','pipe','_initStatusListener','_saveTaskMap','width','_transformHistoryAndStateStack','backgroundColor','Error','shift','InsertRowCommandId','join','_docTransformStateCacheService','fillRule','NO_OTHER_CLIENTS_EDITING','_setFormulaLimitStatus','UNIVER_DOC','unhandledrejection','transformSelections','_registerDependencies','_doCreateSocket','\x20at\x20','sessionTicket','saveImage','cursorInfo','onMouseMove','MoveRangeCommandId','fill','385RynYuF','getOwnPropertyDescriptor','AWAITING_WITH_PENDING','_init','CLOSE_ROOM','setItem','getMemberID','saveTaskMap','startColumn','univer-m-0\x20univer-p-0','call','transformMutationsWithChangeset','restore','roomMembers','_offsetY','executionId','_registerRenderDependencies','runId','_removeClearOtherTimer','_drawAnchor','188DoOfTC','\x20-\x20','currentUsage','collabStatus.synced','urlChange$','eventID','selections','spin','setTimeout','_transformService','_backgroundColor','_clearPolling','DeleteRangeMoveUpCommandId','_configService','/universer-api/license/formula/limit/status','icon','m2Prime','_cursors','getCurrentUnitForType','name','UNIVER_COLLABORATION_CLIENT_WEB_PLUGIN','memberID','getRelativeToViewportCoord','collaboration-client-ui.config','Warning','univer-text-red-500','clickable','_messageService','univer-text-green-500','_refreshCollabCursors','_handleHeartbeatEvent','transform','_scene'];_0x1895=function(){return _0x42bd30;};return _0x1895();}var DocCollabCursor=class{constructor(_0x3ea2c5,_0x36e228,_0x47775f,_0xa59263){const _0x5d297c=_0x1222a9;this['_cursor']=_0x3ea2c5,this[_0x5d297c(0x369)]=_0x36e228,this[_0x5d297c(0x241)]=_0x47775f,this[_0x5d297c(0x319)]=_0xa59263,_defineProperty(this,_0x5d297c(0x277),[]),_defineProperty(this,_0x5d297c(0x27c),null),_defineProperty(this,_0x5d297c(0x3f0),null),_defineProperty(this,_0x5d297c(0x272),null),_defineProperty(this,_0x5d297c(0x36d),null),_defineProperty(this,_0x5d297c(0x224),null),this[_0x5d297c(0x3f7)]();}set[_0x1222a9(0x3d3)](_0x1a153b){const _0x132c5e=_0x1222a9;_0x1a153b?(this[_0x132c5e(0x272)]&&this[_0x132c5e(0x272)][_0x132c5e(0x313)](),this[_0x132c5e(0x3f0)]&&this['_textBubble'][_0x132c5e(0x24a)]()):(this[_0x132c5e(0x272)]&&this[_0x132c5e(0x272)][_0x132c5e(0x24a)](),this[_0x132c5e(0x3f0)]&&this[_0x132c5e(0x3f0)][_0x132c5e(0x313)]());}[_0x1222a9(0x23d)](){const _0xccea93=_0x1222a9;for(const _0x570a15 of this[_0xccea93(0x277)])_0x570a15[_0xccea93(0x23d)]();if(this[_0xccea93(0x3f0)])this['_textBubble'][_0xccea93(0x23d)]();if(this[_0xccea93(0x272)])this['_anchorDot']['dispose']();if(this[_0xccea93(0x27c)])this[_0xccea93(0x27c)][_0xccea93(0x23d)]();if(this['_eventUnsubscribe'])this[_0xccea93(0x224)]();}[_0x1222a9(0x3f7)](){const _0x3a889f=_0x1222a9,{_docSkeleton:_0x23cd03,_document:_0x59d886}=this,{color:_0x5f1fa3,name:_0x43fbbe,ranges:_0xa505e9}=this[_0x3a889f(0x3cd)],_0xe59d93=_0x59d886[_0x3a889f(0x295)](),{docsLeft:_0x27d576,docsTop:_0xf9c10f}=_0xe59d93,_0x2a0800=new NodePositionConvertToCursor(_0xe59d93,_0x23cd03);for(const {startOffset:_0x2f3c8e,endOffset:_0xc7e7a4,rangeType:_0x2199e1,segmentId:_0x32870d,segmentPage:_0x404e96,collapsed:_0x5245da,isActive:_0x50f6f4}of _0xa505e9){const _0x2a1b50=_0x23cd03[_0x3a889f(0x37f)](_0x2f3c8e,!![],_0x32870d,_0x404e96);let _0x3d992f=_0x23cd03[_0x3a889f(0x37f)](_0xc7e7a4,!![],_0x32870d,_0x404e96);if(_0x3d992f==null)_0x3d992f=_0x23cd03['findNodePositionByCharIndex'](_0xc7e7a4-0x1,![],_0x32870d,_0x404e96);if(_0x50f6f4){const {contentBoxPointGroup:_0x411164}=_0x2a0800[_0x3a889f(0x227)](_0x3d992f,_0x3d992f);if(_0x411164['length']===0x0)continue;this[_0x3a889f(0x348)](_0x5f1fa3,_0x411164,_0x27d576,_0xf9c10f,_0x43fbbe),this['_eventUnsubscribe']=this[_0x3a889f(0x2fa)]();}if(_0x2a1b50&&_0x3d992f){if(_0x2199e1===DOC_RANGE_TYPE[_0x3a889f(0x1f8)]){var _0x2eebb9;const {pointGroup:_0x203891}=(_0x2eebb9=new NodePositionConvertToRectRange(_0xe59d93,_0x23cd03)[_0x3a889f(0x227)](_0x2a1b50,_0x3d992f))!==null&&_0x2eebb9!==void 0x0?_0x2eebb9:{};if(_0x203891==null||_0x203891[_0x3a889f(0x2c1)]===0x0)continue;this['_drawRectRange'](_0x5f1fa3,_0x203891,_0x27d576,_0xf9c10f);}else{if(!_0x5245da){const {borderBoxPointGroup:_0x3f07e6}=_0x2a0800[_0x3a889f(0x227)](_0x2a1b50,_0x3d992f);if(_0x3f07e6[_0x3a889f(0x2c1)]===0x0)continue;this['_drawTextRange'](_0x5f1fa3,_0x3f07e6,_0x27d576,_0xf9c10f);}}}}}[_0x1222a9(0x348)](_0x36d3b1,_0xb62ed3,_0x30522a,_0x51c70a,_0x2f1047){const _0x1148dc=_0x1222a9,{left:_0x386ef4,top:_0x47dd69,height:_0x5982ed}=this['_getAnchorBounding'](_0xb62ed3),_0x53d408=SELECTION_CONTROL_BORDER_BUFFER_WIDTH/this[_0x1148dc(0x25b)](),_0x3fb6bb=new Rect(COLLAB_TEXT_ANCHOR_KEY_PREFIX+generateRandomId(ID_LENGTH),{'left':_0x386ef4+_0x30522a-_0x53d408,'top':_0x47dd69+_0x51c70a,'height':_0x5982ed,'width':COLLAB_TEXT_ANCHOR_WIDTH,'fill':_0x36d3b1||getColor(COLORS[_0x1148dc(0x3fb)],0x0),'strokeWidth':_0x53d408,'stroke':SELECTION_CONTROL_BORDER_BUFFER_COLOR,'evented':!![]});this[_0x1148dc(0x27c)]=_0x3fb6bb,this[_0x1148dc(0x369)][_0x1148dc(0x215)](_0x3fb6bb,TEXT_RANGE_LAYER_INDEX);const _0x1c4ba8=new Rect(COLLAB_TEXT_ANCHOR_KEY_PREFIX+generateRandomId(ID_LENGTH),{'left':_0x386ef4+_0x30522a-_0x53d408,'top':_0x47dd69+_0x51c70a-COLLAB_TEXT_ANCHOR_DOT_WIDTH/0x2,'height':COLLAB_TEXT_ANCHOR_DOT_WIDTH,'width':COLLAB_TEXT_ANCHOR_DOT_WIDTH,'fill':_0x36d3b1||getColor(COLORS[_0x1148dc(0x3fb)],0x0),'strokeWidth':0x0,'stroke':_0x36d3b1||getColor(COLORS[_0x1148dc(0x3fb)],0x0),'evented':![]});this[_0x1148dc(0x272)]=_0x1c4ba8,this['_scene'][_0x1148dc(0x215)](_0x1c4ba8,TEXT_RANGE_LAYER_INDEX);const _0xec8cda=new TextBubbleShape(COLLAB_TEXT_ANCHOR_KEY_PREFIX+generateRandomId(ID_LENGTH),{'left':_0x386ef4+_0x30522a-_0x53d408,'top':_0x47dd69+_0x51c70a-0x14,'text':_0x2f1047,'color':_0x36d3b1});this[_0x1148dc(0x3f0)]=_0xec8cda,this[_0x1148dc(0x369)]['addObject'](_0xec8cda,TEXT_RANGE_LAYER_INDEX),this['_hover']=![];}[_0x1222a9(0x2fa)](){const _0x2044f6=_0x1222a9,_0x443fc9=this[_0x2044f6(0x27c)][_0x2044f6(0x3d7)]['subscribeEvent'](()=>{const _0x616740=_0x2044f6;this[_0x616740(0x3d3)]=!![];}),_0x3c5a0e=this[_0x2044f6(0x27c)]['onPointerLeave$'][_0x2044f6(0x279)](()=>{const _0x4ba33d=_0x2044f6;if(this[_0x4ba33d(0x36d)])clearTimeout(this[_0x4ba33d(0x36d)]);this[_0x4ba33d(0x36d)]=setTimeout(()=>{const _0x1905cc=_0x4ba33d;this[_0x1905cc(0x3d3)]=![];},0x7d0);});return()=>{const _0x297a73=_0x2044f6;_0x443fc9[_0x297a73(0x1f1)](),_0x3c5a0e[_0x297a73(0x1f1)]();};}['_drawTextRange'](_0x45c967,_0x423e7a,_0x4f21c6,_0x1281bd){const _0x569096=_0x1222a9,_0x169e08=0.2,_0x40733c=new ColorKit(_0x45c967)[_0x569096(0x1fc)](_0x169e08)[_0x569096(0x25d)](),_0x175d3d=new RegularPolygon(COLLAB_TEXT_RANGE_KEY_PREFIX+generateRandomId(ID_LENGTH),{'pointsGroup':_0x423e7a,'fill':_0x40733c||getColor(COLORS[_0x569096(0x3fb)],_0x169e08),'left':_0x4f21c6,'top':_0x1281bd,'evented':![],'debounceParentDirty':![]});this['_shapes'][_0x569096(0x29a)](_0x175d3d),this[_0x569096(0x369)][_0x569096(0x215)](_0x175d3d,TEXT_RANGE_LAYER_INDEX);}[_0x1222a9(0x278)](_0x3117d1,_0x113a49,_0x1ad51b,_0x455fa8){const _0x26e7b4=_0x1222a9,_0x2a9966=0.2,_0x1ce95f=new ColorKit(_0x3117d1)[_0x26e7b4(0x1fc)](_0x2a9966)['toRgbString'](),_0x29ca2a=new RegularPolygon(COLLAB_RECT_RANGE_KEY_PREFIX+generateRandomId(ID_LENGTH),{'pointsGroup':_0x113a49,'fill':_0x1ce95f||getColor(COLORS[_0x26e7b4(0x3fb)],_0x2a9966),'left':_0x1ad51b,'top':_0x455fa8,'evented':![],'debounceParentDirty':![]});this[_0x26e7b4(0x277)]['push'](_0x29ca2a),this['_scene'][_0x26e7b4(0x215)](_0x29ca2a,TEXT_RANGE_LAYER_INDEX);}[_0x1222a9(0x38e)](_0x138ac9){const _0x260b33=_0x138ac9[0x0],_0x58c6c0=_0x260b33[0x0],_0x3e12c3=_0x260b33[0x2],{x:_0x943c8f,y:_0xb9b67e}=_0x58c6c0,{x:_0x15bfb5,y:_0x197bf4}=_0x3e12c3;return{'left':_0x943c8f,'top':_0xb9b67e,'width':_0x15bfb5-_0x943c8f,'height':_0x197bf4-_0xb9b67e};}[_0x1222a9(0x25b)](){const _0x4df53a=_0x1222a9,{scaleX:_0x7a5cc6,scaleY:_0x53a572}=this['_scene'][_0x4df53a(0x213)]();return Math[_0x4df53a(0x255)](_0x7a5cc6,_0x53a572);}};let DocCollabCursorRenderController=class DocCollabCursorRenderController extends RxDisposable{constructor(_0x344c35,_0x3b4459,_0x84c111,_0x35b1e3,_0x4b9291){const _0x3c6051=_0x1222a9;super(),this[_0x3c6051(0x243)]=_0x344c35,this['_docSkeletonManagerService']=_0x3b4459,this['_collabCursorController']=_0x84c111,this[_0x3c6051(0x23f)]=_0x35b1e3,this[_0x3c6051(0x3b6)]=_0x4b9291,_defineProperty(this,_0x3c6051(0x3da),[]),_defineProperty(this,_0x3c6051(0x35a),[]),this[_0x3c6051(0x338)]();}[_0x1222a9(0x338)](){const _0x51b0dc=_0x1222a9,_0x2edcf4=this[_0x51b0dc(0x243)][_0x51b0dc(0x273)],_0x5cf8d7=this[_0x51b0dc(0x2d9)];this[_0x51b0dc(0x3e4)](combineLatest([this['_collabCursorController']['getCollabCursors$'](_0x2edcf4),this[_0x51b0dc(0x3b6)][_0x51b0dc(0x3d4)]])[_0x51b0dc(0x31b)](map(([_0x557f69,_0x1f43ee])=>({'skeleton':_0x5cf8d7[_0x51b0dc(0x40f)](),'cursors':[..._0x557f69[_0x51b0dc(0x293)]()][_0x51b0dc(0x26c)](_0x8e166b=>({..._0x8e166b,'color':this[_0x51b0dc(0x3b6)]['getColorFromTheme'](_0x8e166b[_0x51b0dc(0x304)])}))})))[_0x51b0dc(0x3a1)](_0x55fecc=>{const _0x2948c2=_0x51b0dc;this[_0x2948c2(0x2c5)]();if(_0x55fecc){const {skeleton:_0x1d3906,cursors:_0x447718}=_0x55fecc;this[_0x2948c2(0x317)](_0x1d3906,_0x447718);}})),this[_0x51b0dc(0x397)](),this[_0x51b0dc(0x22e)]();}[_0x1222a9(0x317)](_0x135511,_0x2ecd57){const _0x2ade5e=_0x1222a9,{scene:_0x32de59,mainComponent:_0x7a55fe}=this[_0x2ade5e(0x243)],_0x4e9056=_0x2ecd57['map'](_0x3c8d14=>new DocCollabCursor(_0x3c8d14,_0x32de59,_0x135511,_0x7a55fe));this[_0x2ade5e(0x3da)]=_0x4e9056,this[_0x2ade5e(0x35a)]=_0x2ecd57;}[_0x1222a9(0x366)](){const _0x2d57c9=_0x1222a9;this['_removeCollabCursors']();const {scene:_0x4453d5,mainComponent:_0x5a3b8a}=this['_context'],_0x111a85=this[_0x2d57c9(0x2d9)]['getSkeleton'](),_0x4efd43=this[_0x2d57c9(0x35a)]['map'](_0x7a5ace=>new DocCollabCursor(_0x7a5ace,_0x4453d5,_0x111a85,_0x5a3b8a));this[_0x2d57c9(0x3da)]=_0x4efd43;}[_0x1222a9(0x2c5)](){const _0x2f33c0=_0x1222a9;this[_0x2f33c0(0x3da)][_0x2f33c0(0x2bc)](_0x4abb61=>_0x4abb61[_0x2f33c0(0x23d)]()),this[_0x2f33c0(0x3da)]=[];}[_0x1222a9(0x22e)](){const _0x18da8a=_0x1222a9,_0x176f87=[SetDocZoomRatioOperation['id']];this[_0x18da8a(0x3e4)](this[_0x18da8a(0x23f)][_0x18da8a(0x37c)](_0x111788=>{const _0x24e76e=_0x18da8a;if(_0x176f87[_0x24e76e(0x1ea)](_0x111788['id'])&&_0x111788[_0x24e76e(0x3ec)]['unitId']===this['_context'][_0x24e76e(0x273)])this[_0x24e76e(0x366)]();}));}[_0x1222a9(0x397)](){const _0x2ea744=_0x1222a9;this[_0x2ea744(0x3e4)](fromEventSubject(this[_0x2ea744(0x243)][_0x2ea744(0x284)][_0x2ea744(0x234)])['pipe'](_0x454b35(_0x3a8312=>_0x3a8312[_0x2ea744(0x24e)]===TRANSFORM_CHANGE_OBSERVABLE_TYPE['resize']),throttleTime(0x10))[_0x2ea744(0x3a1)](()=>{const _0x15471b=_0x2ea744;this[_0x15471b(0x366)]();}));}};DocCollabCursorRenderController=__decorate([__decorateParam(0x1,Inject(DocSkeletonManagerService)),__decorateParam(0x2,Inject(CollabCursorController)),__decorateParam(0x3,ICommandService),__decorateParam(0x4,Inject(ThemeService))],DocCollabCursorRenderController);const SHEET_COLLAB_CURSOR_BORDER_WIDTH=1.5;var SheetCollabCursorShape=class extends Shape{constructor(_0x2bd91f,_0x394283){const _0x49510b=_0x1222a9;super(_0x2bd91f,_0x394283),_defineProperty(this,_0x49510b(0x212),void 0x0),_defineProperty(this,_0x49510b(0x3a3),![]),_defineProperty(this,_0x49510b(0x251),void 0x0),_defineProperty(this,_0x49510b(0x252),''),_defineProperty(this,'_labelPosition',_0x49510b(0x3a7)),_defineProperty(this,_0x49510b(0x353),void 0x0),_defineProperty(this,'_showText',void 0x0),_defineProperty(this,_0x49510b(0x200),void 0x0),_defineProperty(this,_0x49510b(0x2e8),0x4),_defineProperty(this,_0x49510b(0x257),void 0x0),_defineProperty(this,_0x49510b(0x2f9),void 0x0),_defineProperty(this,_0x49510b(0x315),!![]),_defineProperty(this,_0x49510b(0x343),0x0);if(_0x394283){var _0x60d40d;this[_0x49510b(0x2ac)](_0x394283);if(_0x394283[_0x49510b(0x2be)]&&((_0x60d40d=_0x394283[_0x49510b(0x36f)])!==null&&_0x60d40d!==void 0x0?_0x60d40d:this[_0x49510b(0x2e8)])){var _0x40c82e;this['_startBlinking']((_0x40c82e=_0x394283[_0x49510b(0x36f)])!==null&&_0x40c82e!==void 0x0?_0x40c82e:this[_0x49510b(0x2e8)]);}}this[_0x49510b(0x3d7)]['subscribeEvent'](()=>this[_0x49510b(0x2ac)]({'hovered':!![]})),this[_0x49510b(0x316)][_0x49510b(0x279)](()=>this[_0x49510b(0x2ac)]({'hovered':![]}));}[_0x1222a9(0x2a2)](_0x35c808){this['_offsetY']=_0x35c808;}[_0x1222a9(0x2ac)](_0x527e3e){const _0x20f129=_0x1222a9;var _0x7ed917,_0x5404f0,_0x2f7893,_0x3a49ac,_0x285985,_0x1f7449,_0xe65893;this[_0x20f129(0x212)]=(_0x7ed917=_0x527e3e[_0x20f129(0x304)])!==null&&_0x7ed917!==void 0x0?_0x7ed917:this[_0x20f129(0x212)],this[_0x20f129(0x3a3)]=(_0x5404f0=_0x527e3e[_0x20f129(0x1e9)])!==null&&_0x5404f0!==void 0x0?_0x5404f0:this[_0x20f129(0x3a3)],this[_0x20f129(0x251)]=(_0x2f7893=_0x527e3e[_0x20f129(0x298)])!==null&&_0x2f7893!==void 0x0?_0x2f7893:this[_0x20f129(0x251)],this['_name']=(_0x3a49ac=_0x527e3e['name'])!==null&&_0x3a49ac!==void 0x0?_0x3a49ac:this[_0x20f129(0x252)],this[_0x20f129(0x245)]=(_0x285985=_0x527e3e[_0x20f129(0x3bb)])!==null&&_0x285985!==void 0x0?_0x285985:this['_labelPosition'],this[_0x20f129(0x353)]=(_0x1f7449=_0x527e3e[_0x20f129(0x320)])!==null&&_0x1f7449!==void 0x0?_0x1f7449:this[_0x20f129(0x353)],this['_showText']=(_0xe65893=_0x527e3e[_0x20f129(0x288)])!==null&&_0xe65893!==void 0x0?_0xe65893:this[_0x20f129(0x2f4)];if(_0x527e3e['highlightSecond']!==void 0x0)this['_highlightSecond']=_0x527e3e['highlightSecond'];if(_0x527e3e[_0x20f129(0x2be)]!==void 0x0)this['_highlight']=_0x527e3e[_0x20f129(0x2be)];if(_0x527e3e[_0x20f129(0x3bc)]!==void 0x0)this['_offsetY']=_0x527e3e[_0x20f129(0x3bc)];this['transformByState']({'width':_0x527e3e[_0x20f129(0x31e)],'height':_0x527e3e[_0x20f129(0x2d8)]});}[_0x1222a9(0x332)](_0x2d064a){const _0xdc8c4=_0x1222a9,{row:_0x4acffe,column:_0x497f60}=_0x2d064a;if(_0x4acffe>=this[_0xdc8c4(0x251)][_0xdc8c4(0x2dc)]&&_0x4acffe<=this['_range'][_0xdc8c4(0x2a5)]&&_0x497f60>=this[_0xdc8c4(0x251)][_0xdc8c4(0x33d)]&&_0x497f60<=this[_0xdc8c4(0x251)][_0xdc8c4(0x2c2)]){this[_0xdc8c4(0x2ac)]({'hovered':!![]});return;}this[_0xdc8c4(0x2ac)]({'hovered':![]});}['_startBlinking'](_0x28a76a){const _0x6bb20a=_0x1222a9;this[_0x6bb20a(0x26f)](),this[_0x6bb20a(0x315)]=!![],this[_0x6bb20a(0x2f9)]=window[_0x6bb20a(0x20a)](()=>{const _0x59e08d=_0x6bb20a;this[_0x59e08d(0x315)]=!this[_0x59e08d(0x315)],this['makeDirty'](!![]);},0x1f4),this['_blinkTimer']=window[_0x6bb20a(0x351)](()=>{const _0x4d4acd=_0x6bb20a;this[_0x4d4acd(0x26f)](),this[_0x4d4acd(0x315)]=!![],this['makeDirty'](!![]);},_0x28a76a*0x3e8);}['_stopBlinking'](){const _0xf942=_0x1222a9;this[_0xf942(0x2f9)]&&(window[_0xf942(0x2df)](this[_0xf942(0x2f9)]),this['_blinkIntervalTimer']=void 0x0),this[_0xf942(0x257)]&&(window[_0xf942(0x3db)](this['_blinkTimer']),this[_0xf942(0x257)]=void 0x0);}[_0x1222a9(0x388)](_0x2199e2){return![];}[_0x1222a9(0x23d)](){const _0x545b72=_0x1222a9;this['_stopBlinking'](),super[_0x545b72(0x23d)]();}[_0x1222a9(0x300)](_0x3a8ebf){const _0xd4eeb=_0x1222a9;let _0x3f7ffb=this[_0xd4eeb(0x212)],_0xa2e376=this[_0xd4eeb(0x353)];this[_0xd4eeb(0x200)]&&!this[_0xd4eeb(0x315)]&&(_0x3f7ffb=this[_0xd4eeb(0x230)](this[_0xd4eeb(0x212)]),_0xa2e376=this[_0xd4eeb(0x353)]?this['_getLighterColor'](this['_backgroundColor']):void 0x0);Rect[_0xd4eeb(0x218)](_0x3a8ebf,{'width':this['width'],'height':this[_0xd4eeb(0x2d8)],'strokeWidth':this[_0xd4eeb(0x2eb)]||1.5,'stroke':_0x3f7ffb,'evented':![],'fill':_0xa2e376});if(this[_0xd4eeb(0x3a3)]||this[_0xd4eeb(0x2f4)]){var _0x40aa28;_0x3a8ebf[_0xd4eeb(0x1e3)](),_0x3a8ebf[_0xd4eeb(0x368)](0x1,0x0,0x0,0x1,this[_0xd4eeb(0x31e)],(this[_0xd4eeb(0x245)]===_0xd4eeb(0x3d2)?0x0:-0x14)+((_0x40aa28=this[_0xd4eeb(0x343)])!==null&&_0x40aa28!==void 0x0?_0x40aa28:0x0)),TextBubbleShape['drawWith'](_0x3a8ebf,{'text':this[_0xd4eeb(0x252)],'color':_0x3f7ffb}),_0x3a8ebf[_0xd4eeb(0x341)]();}}[_0x1222a9(0x230)](_0x17d309){const _0x188a47=_0x1222a9;if(_0x17d309['startsWith']('#'))return _0x188a47(0x403)+Number[_0x188a47(0x3d8)](_0x17d309[_0x188a47(0x270)](0x1,0x3),0x10)+',\x20'+Number['parseInt'](_0x17d309[_0x188a47(0x270)](0x3,0x5),0x10)+',\x20'+Number[_0x188a47(0x3d8)](_0x17d309[_0x188a47(0x270)](0x5,0x7),0x10)+_0x188a47(0x25c);if(_0x17d309[_0x188a47(0x392)](_0x188a47(0x27e)))return _0x17d309[_0x188a47(0x289)](/[\d.]+\)$/g,_0x188a47(0x2ef));if(_0x17d309[_0x188a47(0x392)](_0x188a47(0x296)))return _0x17d309[_0x188a47(0x289)](_0x188a47(0x296),'rgba')[_0x188a47(0x289)](')',_0x188a47(0x25c));return _0x17d309;}};const SHEETS_COLLABORATION_CURSOR_Z_INDEX=0x1389;let SheetCollabCursorRenderController=class SheetCollabCursorRenderController extends RxDisposable{constructor(_0x441d3d,_0x1ff14b,_0x3e0ee8,_0x58c2a4){const _0x1f548c=_0x1222a9;super(),this['_context']=_0x441d3d,this[_0x1f548c(0x39c)]=_0x1ff14b,this[_0x1f548c(0x387)]=_0x3e0ee8,this['_themeService']=_0x58c2a4,_defineProperty(this,'_cursors',new Set()),_defineProperty(this,'_lastPointer',null),this['_init']();}[_0x1222a9(0x338)](){const _0x50c6bd=_0x1222a9;this[_0x50c6bd(0x39c)][_0x50c6bd(0x291)][_0x50c6bd(0x31b)](_0x4f9116(this[_0x50c6bd(0x381)]),_0x5f06ec(_0xd56fee=>{const _0x30dd2e=_0x50c6bd;if(_0xd56fee){const _0x150df9=_0xd56fee['sheetId'];return combineLatest(this[_0x30dd2e(0x387)][_0x30dd2e(0x20b)](this['_context']['unitId']),this[_0x30dd2e(0x3b6)]['currentTheme$'])['pipe'](map(([_0x220ab8,_0x326444])=>{const _0x1f2ff6=_0x30dd2e,_0x3b7cd0=new Map();return _0x220ab8[_0x1f2ff6(0x2bc)]((_0xfac682,_0x3546f4)=>{const _0xc773c0=_0x1f2ff6;if(_0xfac682[_0xc773c0(0x2f0)]===_0x150df9){const _0x271975={..._0xfac682};_0x271975[_0xc773c0(0x304)]=this[_0xc773c0(0x3b6)][_0xc773c0(0x26b)](_0xfac682[_0xc773c0(0x304)]),_0x3b7cd0[_0xc773c0(0x37a)](_0x3546f4,_0x271975);}}),{'skeleton':_0xd56fee,'cursors':_0x3b7cd0};}));}return of({'skeleton':null,'cursors':new Map()});}))['subscribe'](({skeleton:_0x56afd8,cursors:_0x1e9159})=>{const _0x1f5269=_0x50c6bd;this[_0x1f5269(0x2c5)]();if(_0x56afd8)this[_0x1f5269(0x317)](_0x56afd8,_0x1e9159);}),this[_0x50c6bd(0x39c)]['currentSkeleton$'][_0x50c6bd(0x3a1)](_0x4e2cd5=>{const _0x7fb969=_0x50c6bd;if(_0x4e2cd5==null)return;const {skeleton:_0x22cb37}=_0x4e2cd5,{scene:_0x2390a6}=this[_0x7fb969(0x243)];_0x2390a6[_0x7fb969(0x28e)]['subscribeEvent'](debounce(_0x3358bb=>{const _0x47d03d=_0x7fb969;var _0x596303,_0x43a711;const {offsetX:_0x596a8a,offsetY:_0x5314d8}=_0x3358bb,{x:_0x36ca42,y:_0x418e55}=_0x2390a6[_0x47d03d(0x35f)](Vector2[_0x47d03d(0x3a6)]([_0x596a8a,_0x5314d8])),{scaleX:_0x416723,scaleY:_0x535108}=_0x2390a6[_0x47d03d(0x213)](),_0x101432=_0x2390a6[_0x47d03d(0x3d5)](SHEET_VIEWPORT_KEY[_0x47d03d(0x394)]),_0x5186b0=_0x2390a6[_0x47d03d(0x3aa)](Vector2[_0x47d03d(0x3a6)]([_0x36ca42,_0x418e55]),_0x101432),_0x42db5e=_0x22cb37[_0x47d03d(0x3b3)](_0x596a8a,_0x5314d8,_0x416723,_0x535108,_0x5186b0);if(((_0x596303=this[_0x47d03d(0x208)])===null||_0x596303===void 0x0?void 0x0:_0x596303[_0x47d03d(0x2ca)])===_0x42db5e[_0x47d03d(0x2ca)]&&((_0x43a711=this[_0x47d03d(0x208)])===null||_0x43a711===void 0x0?void 0x0:_0x43a711[_0x47d03d(0x2af)])===_0x42db5e['row'])return;this[_0x47d03d(0x35a)][_0x47d03d(0x2bc)](_0x29d3c1=>{_0x29d3c1['onMouseMove'](_0x42db5e);});},0x64));});}[_0x1222a9(0x317)](_0x45fce3,_0x4936c2){const _0x3a7aff=_0x1222a9,_0x332cc4=this[_0x3a7aff(0x39c)][_0x3a7aff(0x2da)]();if(!_0x332cc4)return;const _0x3469fd=this[_0x3a7aff(0x201)]();if(!_0x3469fd)return;this['_cursors'][_0x3a7aff(0x2bc)](_0x158364=>{const _0x39d6d3=_0x3a7aff;_0x158364[_0x39d6d3(0x229)]();});const {scene:_0x465eaf}=_0x3469fd,_0x5f1d8d=mergeCollabCursors(Array[_0x3a7aff(0x2a1)](_0x4936c2[_0x3a7aff(0x293)]()))[_0x3a7aff(0x3b8)](_0x1b5fee=>{const _0x549d29=_0x3a7aff,{color:_0x5cd80a,range:_0x59dc80,name:_0x2415a3,selection:_0xd7433d,sheetID:_0x331079}=_0x1b5fee,{startColumn:_0x1b7214,startRow:_0x400a9f,endColumn:_0x3864f4,endRow:_0x39a976}=_0x59dc80,_0x4f1b33=getCoordByCell(_0x400a9f,_0x1b7214,_0x465eaf,_0x332cc4),_0x58d963=getCoordByCell(_0x39a976,_0x3864f4,_0x465eaf,_0x332cc4),{columnHeaderHeightAndMarginTop:_0x3ff865}=_0x332cc4,{startX:_0x2dc885,startY:_0x552ffd}=_0x4f1b33,{endX:_0x256a0e,endY:_0x28b9bc}=_0x58d963,_0x3decb2=_0x256a0e-_0x2dc885,_0x143228=_0x28b9bc-_0x552ffd;return new SheetCollabCursorShape(_0x2415a3,{'labelPosition':_0x552ffd-_0x3ff865>=0x14?_0x549d29(0x3a7):_0x549d29(0x3d2),'sheetID':_0x331079,'range':_0x59dc80,'color':_0x5cd80a,'name':_0x2415a3,'selection':_0xd7433d,'left':_0x2dc885,'top':_0x552ffd,'width':_0x3decb2,'height':_0x143228,'evented':![],'zIndex':SHEETS_COLLABORATION_CURSOR_Z_INDEX});});_0x465eaf[_0x3a7aff(0x25a)](_0x5f1d8d,0x1),this[_0x3a7aff(0x35a)]=new Set(_0x5f1d8d);}[_0x1222a9(0x2c5)](){const _0x578388=_0x1222a9;var _0x178b01;(_0x178b01=this[_0x578388(0x35a)])===null||_0x178b01===void 0x0||_0x178b01['forEach'](_0x2a6c26=>_0x2a6c26[_0x578388(0x23d)]());}[_0x1222a9(0x201)](){const _0x52bd25=_0x1222a9;return getSheetObject(this[_0x52bd25(0x243)][_0x52bd25(0x29b)],this[_0x52bd25(0x243)]);}};SheetCollabCursorRenderController=__decorate([__decorateParam(0x1,Inject(SheetSkeletonManagerService)),__decorateParam(0x2,Inject(CollabCursorController)),__decorateParam(0x3,Inject(ThemeService))],SheetCollabCursorRenderController);function mergeCollabCursors(_0x48de02){const _0x442c54=new Map();return _0x48de02['forEach'](_0xe3c246=>{const _0x524394=_0x2f58;if(_0x442c54[_0x524394(0x3fd)](_0xe3c246[_0x524394(0x2bf)])){const _0x10c813=_0x442c54[_0x524394(0x232)](_0xe3c246['selection']);_0x10c813[_0x524394(0x35c)]+=',\x20'+_0xe3c246['name'];}else _0x442c54['set'](_0xe3c246[_0x524394(0x2bf)],_0xe3c246);}),Array['from'](_0x442c54['values']());}let CollaborationClientUIController=class CollaborationClientUIController extends Disposable{constructor(_0x5e44aa,_0x36e3b2,_0x4d444a,_0x4be7c8,_0x132063,_0x2364cc){const _0x44aea6=_0x1222a9;super(),this[_0x44aea6(0x2a7)]=_0x5e44aa,this[_0x44aea6(0x3e2)]=_0x36e3b2,this[_0x44aea6(0x31a)]=_0x4d444a,this[_0x44aea6(0x364)]=_0x4be7c8,this[_0x44aea6(0x226)]=_0x132063,this['_localeService']=_0x2364cc,this[_0x44aea6(0x267)](),this[_0x44aea6(0x3fa)]();}[_0x1222a9(0x267)](){const _0xa4a6b7=_0x1222a9;this[_0xa4a6b7(0x3e4)](this[_0xa4a6b7(0x2a7)][_0xa4a6b7(0x3d1)](()=>{const _0x2176bf=_0xa4a6b7;if(this[_0x2176bf(0x3e2)][_0x2176bf(0x33c)]['size'])return this[_0x2176bf(0x40e)]['t'](_0x2176bf(0x1f6));}));}[_0x1222a9(0x3fa)](){const _0x4bf714=_0x1222a9;this[_0x4bf714(0x3e4)](this['_collaborationUIEventService'][_0x4bf714(0x2aa)][_0x4bf714(0x3a1)](_0x50e8af=>{const _0x523c5d=_0x4bf714;if(_0x50e8af['id']===CollaborationUIEventId[_0x523c5d(0x2d3)])this['_messageService']['show']({'type':MessageType[_0x523c5d(0x361)],'content':this[_0x523c5d(0x40e)]['t'](_0x523c5d(0x2e1))});if(_0x50e8af['id']===CollaborationUIEventId[_0x523c5d(0x339)])this[_0x523c5d(0x364)][_0x523c5d(0x24a)]({'type':MessageType[_0x523c5d(0x361)],'content':this[_0x523c5d(0x40e)]['t'](_0x523c5d(0x3f3))});if(_0x50e8af['id']===CollaborationUIEventId[_0x523c5d(0x2d0)])this['_notificationService'][_0x523c5d(0x24a)]({'title':this[_0x523c5d(0x40e)]['t'](_0x523c5d(0x253)),'content':this['_localeService']['t'](_0x523c5d(0x36a)),'type':_0x523c5d(0x3c0),'duration':0x0});if(_0x50e8af['id']===CollaborationUIEventId['CONFLICT'])this['_messageService'][_0x523c5d(0x24a)]({'type':MessageType['Error'],'content':this[_0x523c5d(0x40e)]['t']('collaboration.closeRoom')+'('+_0x50e8af[_0x523c5d(0x2c9)]+')'});if(_0x50e8af['id']===CollaborationUIEventId[_0x523c5d(0x3e5)])this[_0x523c5d(0x364)]['show']({'type':MessageType[_0x523c5d(0x361)],'content':this[_0x523c5d(0x40e)]['t'](_0x50e8af[_0x523c5d(0x2c9)]||'')});if(_0x50e8af['id']===CollaborationUIEventId['SOCKET_FAILED_RETRY'])this[_0x523c5d(0x364)]['show']({'type':MessageType[_0x523c5d(0x361)],'content':this[_0x523c5d(0x40e)]['t']('session.will-retry')});if(_0x50e8af['id']===CollaborationUIEventId[_0x523c5d(0x1e7)])this['_messageService']['show']({'type':MessageType[_0x523c5d(0x321)],'content':this['_localeService']['t'](_0x523c5d(0x26a))});if(_0x50e8af['id']===CollaborationUIEventId['SUBMIT_CHANGESET_TIMEOUT'])this[_0x523c5d(0x364)]['show']({'type':MessageType[_0x523c5d(0x321)],'content':this[_0x523c5d(0x40e)]['t'](_0x523c5d(0x3bf))});}));}};CollaborationClientUIController=__decorate([__decorateParam(0x0,IBeforeCloseService),__decorateParam(0x1,ILocalCacheService),__decorateParam(0x2,Inject(CollaborationUIEventService)),__decorateParam(0x3,IMessageService),__decorateParam(0x4,INotificationService),__decorateParam(0x5,Inject(LocaleService))],CollaborationClientUIController);const PLUGIN_CONFIG_KEY=_0x1222a9(0x360),configSymbol=Symbol(PLUGIN_CONFIG_KEY),defaultPluginConfig={};let DocTransformIMECacheService=class DocTransformIMECacheService{constructor(_0x102cc5,_0x589545){const _0x73313b=_0x1222a9;this[_0x73313b(0x352)]=_0x102cc5,this[_0x73313b(0x371)]=_0x589545;}[_0x1222a9(0x410)](_0x2557ba){const _0x159f44=_0x1222a9;this[_0x159f44(0x2ce)](_0x2557ba),this[_0x159f44(0x28a)](_0x2557ba);}[_0x1222a9(0x2c8)](_0x53a87f){const _0x563bd4=_0x1222a9,{unitID:_0x35bbd7}=_0x53a87f,{redoCache:_0x2c68d1}=this['_renderManagerService'][_0x563bd4(0x2ea)](_0x35bbd7)[_0x563bd4(0x3af)](DocIMEInputManagerService)[_0x563bd4(0x2e9)]();if(_0x2c68d1[_0x563bd4(0x2c1)]===0x0)return _0x53a87f;let _0x5a56ad=Tools[_0x563bd4(0x396)](_0x53a87f[_0x563bd4(0x310)][0x0]);for(let _0x29352b=0x0;_0x29352b<_0x2c68d1['length'];_0x29352b++){const _0x3946fd={'id':_0x563bd4(0x2e0),'params':{..._0x2c68d1[_0x29352b]}},_0x1b1abc=this[_0x563bd4(0x352)][_0x563bd4(0x3f4)](_0x5a56ad,_0x3946fd,![]);if(isTransformMutationFailure(_0x1b1abc))throw _0x1b1abc[_0x563bd4(0x3c0)];_0x5a56ad=_0x1b1abc[_0x563bd4(0x1ee)];}return{...Tools[_0x563bd4(0x396)](_0x53a87f),'mutations':[_0x5a56ad]};}[_0x1222a9(0x2ce)](_0x33f673){const _0x471b6d=_0x1222a9,{unitID:_0x16c3d7}=_0x33f673,_0x46e6bd=this[_0x471b6d(0x371)][_0x471b6d(0x2ea)](_0x16c3d7)['with'](DocIMEInputManagerService),{undoCache:_0x146eec,redoCache:_0x4a4662}=_0x46e6bd[_0x471b6d(0x2e9)]();if(_0x146eec['length']===0x0||_0x4a4662[_0x471b6d(0x2c1)]===0x0)return;const _0x23c87c=[],_0x20c6e9=[];let _0x758a5e=Tools['deepClone'](_0x33f673['mutations'][0x0]),_0x2f17c4=Tools[_0x471b6d(0x396)](_0x33f673[_0x471b6d(0x310)][0x0]);for(let _0x3bd1a1=_0x146eec[_0x471b6d(0x2c1)]-0x1;_0x3bd1a1>=0x0;_0x3bd1a1--){const _0x18cfa7={'id':_0x471b6d(0x2e0),'params':{..._0x146eec[_0x3bd1a1]}},_0x2a37d0={'id':_0x471b6d(0x2e0),'params':{..._0x4a4662[_0x3bd1a1]}},_0x988c98=this[_0x471b6d(0x352)][_0x471b6d(0x3f4)](_0x758a5e,_0x18cfa7,![]),_0x50f509=this[_0x471b6d(0x352)][_0x471b6d(0x3f4)](_0x2f17c4,_0x2a37d0,![]);if(isTransformMutationFailure(_0x988c98))throw _0x988c98[_0x471b6d(0x3c0)];if(isTransformMutationFailure(_0x50f509))throw _0x50f509[_0x471b6d(0x3c0)];_0x23c87c[_0x471b6d(0x240)](_0x988c98['m2Prime'][_0x471b6d(0x3ec)]),_0x20c6e9[_0x471b6d(0x240)](_0x50f509[_0x471b6d(0x359)]['params']),_0x758a5e=_0x988c98['m1Prime'],_0x2f17c4=_0x50f509['m1Prime'];}_0x46e6bd[_0x471b6d(0x205)]({'undoCache':_0x23c87c,'redoCache':_0x20c6e9});}['_transformPreviousActiveRange'](_0x219a7f){const _0xb184ee=_0x1222a9,{unitID:_0x466f31}=_0x219a7f,_0x239061=this[_0xb184ee(0x371)][_0xb184ee(0x2ea)](_0x466f31)[_0xb184ee(0x3af)](DocIMEInputManagerService),_0x47c1cd=_0x239061['getActiveRange']();if(_0x47c1cd==null)return;const _0xa7c842=[{'id':_0xb184ee(0x2e0),'params':{'unitId':_0x219a7f[_0xb184ee(0x3eb)],'actions':null,'textRanges':[_0x47c1cd]}}],_0x4bb891=this[_0xb184ee(0x352)][_0xb184ee(0x340)](_0x219a7f,_0xa7c842);if(!isTransformMutationsWithChangesetSuccess(_0x4bb891))throw _0x4bb891[_0xb184ee(0x3c0)];const _0x2659d8=_0x4bb891['m2Prime'][0x0][_0xb184ee(0x3ec)]['textRanges'];if(Array['isArray'](_0x2659d8)&&_0x2659d8[_0xb184ee(0x2c1)])_0x239061['setActiveRange'](_0x2659d8[0x0]);}};DocTransformIMECacheService=__decorate([__decorateParam(0x0,ITransformService),__decorateParam(0x1,IRenderManagerService)],DocTransformIMECacheService);let DocTransformStateCacheService=class DocTransformStateCacheService{constructor(_0xe019ee,_0x17149f,_0x123560){const _0xa2969e=_0x1222a9;this[_0xa2969e(0x21b)]=_0xe019ee,this[_0xa2969e(0x352)]=_0x17149f,this[_0xa2969e(0x2a6)]=_0x123560;}['transformStateCache'](_0x3e4cd0){const _0x13c87a=_0x1222a9;this[_0x13c87a(0x31f)](_0x3e4cd0);}['transformRemoteChangeset'](_0x2313f1){const _0x2293e5=_0x1222a9,{unitID:_0x5281bf}=_0x2313f1,{collaboration:_0x250e6e}=this[_0x2293e5(0x2a6)][_0x2293e5(0x2a0)](_0x5281bf);if(_0x250e6e[_0x2293e5(0x2c1)]===0x0)return _0x2313f1;let _0x5593a2=Tools['deepClone'](_0x2313f1[_0x2293e5(0x310)][0x0]);for(let _0x3492c1=0x0;_0x3492c1<_0x250e6e[_0x2293e5(0x2c1)];_0x3492c1++){const _0x33882={'id':'doc.mutation.rich-text-editing','params':{'unitId':_0x250e6e[_0x3492c1][_0x2293e5(0x273)],..._0x250e6e[_0x3492c1][_0x2293e5(0x24c)]}},_0xa81be=this['_transformService'][_0x2293e5(0x3f4)](_0x5593a2,_0x33882,![]);if(isTransformMutationFailure(_0xa81be))throw _0xa81be[_0x2293e5(0x3c0)];_0x5593a2=_0xa81be['m1Prime'];}return{...Tools[_0x2293e5(0x396)](_0x2313f1),'mutations':[_0x5593a2]};}[_0x1222a9(0x31f)](_0x286edf){const _0x4892e6=_0x1222a9,{unitID:_0x586554}=_0x286edf,{history:_0xbe9ed5,collaboration:_0x31f4f1}=this[_0x4892e6(0x2a6)][_0x4892e6(0x2a0)](_0x586554);if(_0xbe9ed5[_0x4892e6(0x2c1)]===0x0&&_0x31f4f1[_0x4892e6(0x2c1)]===0x0)return;const _0x14b56a=[],_0x1dd2c3=[];let _0x543286=Tools[_0x4892e6(0x396)](_0x286edf[_0x4892e6(0x310)][0x0]),_0x56102b=Tools[_0x4892e6(0x396)](_0x286edf['mutations'][0x0]);for(let _0x2af9e2=_0xbe9ed5[_0x4892e6(0x2c1)]-0x1;_0x2af9e2>=0x0;_0x2af9e2--){const _0x24cd87={'id':_0x4892e6(0x2e0),'params':{'unitId':_0xbe9ed5[_0x2af9e2][_0x4892e6(0x273)],..._0xbe9ed5[_0x2af9e2]['undoState']}},_0x1854d0={'id':_0x4892e6(0x2e0),'params':{'unitId':_0xbe9ed5[_0x2af9e2][_0x4892e6(0x273)],..._0xbe9ed5[_0x2af9e2][_0x4892e6(0x24c)]}},_0x140854=this[_0x4892e6(0x352)][_0x4892e6(0x3f4)](_0x543286,_0x24cd87,![]),_0x4e57bc=this['_transformService'][_0x4892e6(0x3f4)](_0x56102b,_0x1854d0,![]);if(isTransformMutationFailure(_0x140854))throw _0x140854['error'];if(isTransformMutationFailure(_0x4e57bc))throw _0x4e57bc[_0x4892e6(0x3c0)];_0x14b56a[_0x4892e6(0x240)]({..._0xbe9ed5[_0x2af9e2],'undoState':_0x140854['m2Prime'][_0x4892e6(0x3ec)],'redoState':_0x4e57bc[_0x4892e6(0x359)][_0x4892e6(0x3ec)]}),_0x543286=_0x140854[_0x4892e6(0x1ee)],_0x56102b=_0x4e57bc['m1Prime'];}_0x543286=Tools['deepClone'](_0x286edf[_0x4892e6(0x310)][0x0]),_0x56102b=Tools[_0x4892e6(0x396)](_0x286edf[_0x4892e6(0x310)][0x0]);for(let _0x30cd43=_0x31f4f1[_0x4892e6(0x2c1)]-0x1;_0x30cd43>=0x0;_0x30cd43--){const _0xfa6ec2={'id':'doc.mutation.rich-text-editing','params':{'unitId':_0x31f4f1[_0x30cd43][_0x4892e6(0x273)],..._0x31f4f1[_0x30cd43][_0x4892e6(0x3ad)]}},_0x26babb={'id':'doc.mutation.rich-text-editing','params':{'unitId':_0x31f4f1[_0x30cd43][_0x4892e6(0x273)],..._0x31f4f1[_0x30cd43][_0x4892e6(0x24c)]}},_0x1065a4=this[_0x4892e6(0x352)][_0x4892e6(0x3f4)](_0x543286,_0xfa6ec2,![]),_0x3e493b=this[_0x4892e6(0x352)][_0x4892e6(0x3f4)](_0x56102b,_0x26babb,![]);if(isTransformMutationFailure(_0x1065a4))throw _0x1065a4[_0x4892e6(0x3c0)];if(isTransformMutationFailure(_0x3e493b))throw _0x3e493b['error'];_0x1dd2c3['unshift']({..._0x31f4f1[_0x30cd43],'undoState':_0x1065a4[_0x4892e6(0x359)][_0x4892e6(0x3ec)],'redoState':_0x3e493b[_0x4892e6(0x359)][_0x4892e6(0x3ec)]}),_0x543286=_0x1065a4['m1Prime'],_0x56102b=_0x3e493b['m1Prime'];}this[_0x4892e6(0x2a6)][_0x4892e6(0x275)](_0x586554,{'history':_0x14b56a,'collaboration':_0x1dd2c3});}};DocTransformStateCacheService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,ITransformService),__decorateParam(0x2,Inject(DocStateChangeManagerService))],DocTransformStateCacheService);let DocTransformSelectionsService=class DocTransformSelectionsService{constructor(_0x295a8d,_0x58629e){const _0x214ca7=_0x1222a9;this[_0x214ca7(0x21b)]=_0x295a8d,this[_0x214ca7(0x352)]=_0x58629e;}[_0x1222a9(0x32b)](_0x3a7e3a){const _0x79da65=_0x1222a9;var _0x1d5ec5;const _0x2a4e68=this[_0x79da65(0x21b)][_0x79da65(0x232)](DocSelectionManagerService),_0x322bd4=(_0x1d5ec5=_0x2a4e68['getDocRanges']())!==null&&_0x1d5ec5!==void 0x0?_0x1d5ec5:[];if(_0x322bd4[_0x79da65(0x2c1)]===0x0)return;const _0x131b62=_0x3a7e3a[_0x79da65(0x3eb)],_0x5834b0=[{'id':_0x79da65(0x2e0),'params':{'unitId':_0x131b62,'actions':null,'textRanges':_0x322bd4}}],_0x4c7029=this[_0x79da65(0x352)]['transformMutationsWithChangeset'](_0x3a7e3a,_0x5834b0);if(!isTransformMutationsWithChangesetSuccess(_0x4c7029))throw _0x4c7029['error'];const _0x2ee11e=_0x4c7029[_0x79da65(0x359)][0x0][_0x79da65(0x3ec)][_0x79da65(0x290)];if(Array[_0x79da65(0x1e6)](_0x2ee11e)&&_0x2ee11e[_0x79da65(0x2c1)])_0x2a4e68[_0x79da65(0x408)](_0x2ee11e,{'unitId':_0x131b62,'subUnitId':_0x131b62},![]);}};DocTransformSelectionsService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,ITransformService)],DocTransformSelectionsService);let CollaborationEntityUIController=class CollaborationEntityUIController extends Disposable{constructor(_0x481810,_0x5c402b,_0x10b515,_0x18c9cf,_0x181590,_0xaa4b49,_0x40be34,_0x4d6c0c){const _0x2b10c2=_0x1222a9;super(),this[_0x2b10c2(0x2a6)]=_0x481810,this[_0x2b10c2(0x3d6)]=_0x5c402b,this[_0x2b10c2(0x27b)]=_0x10b515,this[_0x2b10c2(0x325)]=_0x18c9cf,this[_0x2b10c2(0x21a)]=_0x181590,this[_0x2b10c2(0x305)]=_0xaa4b49,this[_0x2b10c2(0x364)]=_0x40be34,this[_0x2b10c2(0x40e)]=_0x4d6c0c,_defineProperty(this,_0x2b10c2(0x2e6),new BehaviorSubject(CollaborationStatus['NOT_COLLAB'])),this['_initEntityListener']();}[_0x1222a9(0x1eb)](){const _0x3e2cf4=_0x1222a9;this[_0x3e2cf4(0x3e4)](this[_0x3e2cf4(0x3d6)][_0x3e2cf4(0x206)][_0x3e2cf4(0x3a1)](_0x326eca=>{const _0x140b60=_0x3e2cf4,_0x40a8b9=this['_docStateChangeManagerService'][_0x140b60(0x1f3)][_0x140b60(0x3a1)](_0x3b6deb=>{const _0x47194a=_0x140b60;if(_0x3b6deb==null)return;const {unitId:_0x2ae191,redoState:_0xcef46,commandId:_0x3ab0d7}=_0x3b6deb;if(_0x2ae191!==_0x326eca[_0x47194a(0x3eb)])return;const _0x54ed25={'id':_0x3ab0d7,'type':CommandType[_0x47194a(0x38b)],'params':{'unitId':_0x2ae191,'actions':_0xcef46[_0x47194a(0x1fe)],'textRanges':null}};_0x326eca[_0x47194a(0x400)](_0x54ed25);});_0x326eca[_0x140b60(0x3e4)](_0x40a8b9);if(_0x326eca instanceof DocCollaborationEntity)_0x326eca[_0x140b60(0x210)]({'onTransformIME':_0x1a45eb=>this[_0x140b60(0x27b)][_0x140b60(0x410)](_0x1a45eb),'onTransformState':_0x5d580b=>this[_0x140b60(0x325)][_0x140b60(0x385)](_0x5d580b),'onTransformSelections':_0x32c147=>this['_docTransformSelectionsService'][_0x140b60(0x32b)](_0x32c147),'onSyncEditingCollabCursor':_0x3ffd26=>this[_0x140b60(0x305)][_0x140b60(0x2ae)](_0x3ffd26),'onTransformRemoteChangesetByIMECache':_0x1df20f=>this['_docTransformIMECacheService'][_0x140b60(0x2c8)](_0x1df20f),'onTransformRemoteChangesetByStateCache':_0xf5409b=>this[_0x140b60(0x325)][_0x140b60(0x2c8)](_0xf5409b)});}));}};CollaborationEntityUIController=__decorate([__decorateParam(0x0,Inject(DocStateChangeManagerService)),__decorateParam(0x1,Inject(CollaborationController)),__decorateParam(0x2,Inject(DocTransformIMECacheService)),__decorateParam(0x3,Inject(DocTransformStateCacheService)),__decorateParam(0x4,Inject(DocTransformSelectionsService)),__decorateParam(0x5,Inject(DocSyncEditingCollabCursorService)),__decorateParam(0x6,IMessageService),__decorateParam(0x7,Inject(LocaleService))],CollaborationEntityUIController);let FrontendLogController=class FrontendLogController extends Disposable{constructor(_0x2d6ba3,_0x3774e5,_0xf12879,_0x1998d5){const _0x5c3f96=_0x1222a9;super(),this[_0x5c3f96(0x21b)]=_0x2d6ba3,this[_0x5c3f96(0x2dd)]=_0x3774e5,this[_0x5c3f96(0x38a)]=_0xf12879,this[_0x5c3f96(0x1ec)]=_0x1998d5,_defineProperty(this,_0x5c3f96(0x29f),void 0x0),this['_init']();}['_init'](){const _0x30b0ed=_0x1222a9;this[_0x30b0ed(0x301)](),this['_initUnhandledRejectionListener'](),this[_0x30b0ed(0x3fe)](),this[_0x30b0ed(0x29e)]();}[_0x1222a9(0x29e)](){const _0x1848d4=_0x1222a9;this[_0x1848d4(0x3e4)](this['_collaborationSessionService'][_0x1848d4(0x373)][_0x1848d4(0x3a1)](_0xe2eb51=>{const _0x2bfb71=_0x1848d4;this[_0x2bfb71(0x29f)]=_0xe2eb51===null||_0xe2eb51===void 0x0?void 0x0:_0xe2eb51[_0x2bfb71(0x35e)];}));}['_initWindowErrorListener'](){const _0x2c1b29=_0x1222a9,_0x9c88b8=_0x2e3e55=>{const _0x248023=_0x2f58;var _0x55cc03;this[_0x248023(0x2d1)](_0x248023(0x3c0),'[Window\x20Error]:\x20'+_0x2e3e55[_0x248023(0x3ba)]+_0x248023(0x32e)+_0x2e3e55['filename']+':'+_0x2e3e55[_0x248023(0x3be)]+':'+_0x2e3e55[_0x248023(0x2fc)]+'\x0a'+(((_0x55cc03=_0x2e3e55[_0x248023(0x3c0)])===null||_0x55cc03===void 0x0?void 0x0:_0x55cc03[_0x248023(0x2c4)])||''));};window[_0x2c1b29(0x1f5)](_0x2c1b29(0x3c0),_0x9c88b8),this[_0x2c1b29(0x3e4)](()=>{const _0x2016bb=_0x2c1b29;window[_0x2016bb(0x264)](_0x2016bb(0x3c0),_0x9c88b8);});}[_0x1222a9(0x3b4)](){const _0x5b547a=_0x1222a9,_0x563f21=_0x4c4494=>{const _0x4c9c41=_0x2f58;this['_uploadLog'](_0x4c9c41(0x3c0),_0x4c9c41(0x25e)+_0x4c4494['reason']);};window[_0x5b547a(0x1f5)](_0x5b547a(0x32a),_0x563f21),this[_0x5b547a(0x3e4)](()=>{const _0x49dc29=_0x5b547a;window[_0x49dc29(0x264)](_0x49dc29(0x32a),_0x563f21);});}[_0x1222a9(0x3fe)](){const _0x37228e=_0x1222a9,_0x9fd22d=this[_0x37228e(0x38a)]['error']['bind'](this[_0x37228e(0x38a)]);this[_0x37228e(0x38a)][_0x37228e(0x3c0)]=(..._0x3348c2)=>{const _0x42bc22=_0x37228e,_0x598e62=_0x3348c2[_0x42bc22(0x3b8)](_0x53e918=>_0x53e918 instanceof Error?_0x53e918[_0x42bc22(0x3ba)]+'\x0a'+_0x53e918[_0x42bc22(0x2c4)]:String(_0x53e918))[_0x42bc22(0x324)]('\x20');this['_uploadLog'](_0x42bc22(0x3c0),_0x42bc22(0x1ed)+_0x598e62),_0x9fd22d(..._0x3348c2);},this[_0x37228e(0x3e4)](()=>{const _0x2e4d19=_0x37228e;this[_0x2e4d19(0x38a)]['error']=_0x9fd22d;});}['_uploadLog'](_0x37cb0c,_0x34dbff){const _0x4b92f5=_0x1222a9;try{const _0x55c21a={'userId':this['_memberID'],'logLabel':_0x37cb0c,'content':_0x34dbff};this[_0x4b92f5(0x2dd)][_0x4b92f5(0x37e)]('/universer-api/frontend/logs',{'body':_0x55c21a})[_0x4b92f5(0x36c)](()=>{});}catch{}}};FrontendLogController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,ILogService),__decorateParam(0x3,Inject(CollaborationSessionService))],FrontendLogController);function isCalculationStart(_0x3fc4fc){const _0x422f2b=_0x1222a9;var _0x52a3df,_0x2d72d5;const _0x275cf5=(_0x52a3df=_0x3fc4fc[_0x422f2b(0x39d)])===null||_0x52a3df===void 0x0?void 0x0:_0x52a3df[_0x422f2b(0x2f5)],_0x7010e9=((_0x2d72d5=_0x3fc4fc[_0x422f2b(0x39d)])===null||_0x2d72d5===void 0x0?void 0x0:_0x2d72d5[_0x422f2b(0x1fd)])||0x0;return _0x275cf5===FormulaExecuteStageType[_0x422f2b(0x26d)]&&_0x7010e9>0x0;}function isCalculationComplete(_0x50fa61){const _0x57e95f=_0x1222a9;return _0x50fa61[_0x57e95f(0x2d4)]===FormulaExecutedStateType[_0x57e95f(0x393)];}const DEFAULT_FORMULA_CALCULATION_LIMIT_STATUS_URL=_0x1222a9(0x357),DEFAULT_FORMULA_CALCULATION_LIMIT_START_URL=_0x1222a9(0x22f),DEFAULT_FORMULA_CALCULATION_LIMIT_DONE_URL='/universer-api/license/formula/limit/done';let FormulaCalculationGuardService=class FormulaCalculationGuardService extends Disposable{constructor(_0x2dfdca,_0x130853,_0x461704,_0x493ba5,_0x3f1a9f,_0x17ff05,_0x48299d){const _0x5f46eb=_0x1222a9;super(),this['_messageService']=_0x2dfdca,this[_0x5f46eb(0x23f)]=_0x130853,this[_0x5f46eb(0x356)]=_0x461704,this[_0x5f46eb(0x2dd)]=_0x493ba5,this['_univerInstanceService']=_0x3f1a9f,this[_0x5f46eb(0x38a)]=_0x17ff05,this[_0x5f46eb(0x40e)]=_0x48299d,_defineProperty(this,'_pollingInterval',null),_defineProperty(this,'_maxFormulaLimit',0x0),_defineProperty(this,_0x5f46eb(0x382),0x0),_defineProperty(this,_0x5f46eb(0x378),[]),_defineProperty(this,'_lastResponseTimestamp',0x0),this[_0x5f46eb(0x1f4)]();}[_0x1222a9(0x1f4)](){const _0x2f6596=_0x1222a9;this['disposeWithMe'](this[_0x2f6596(0x23f)][_0x2f6596(0x3ac)]((_0x3d0f88,_0x5bc0b3)=>{const _0x4fb787=_0x2f6596;var _0x190757;if(_0x3d0f88['id']!==SetFormulaCalculationStartMutation['id'])return;const _0x34465d=_0x3d0f88[_0x4fb787(0x3ec)];if(!this[_0x4fb787(0x38d)]((_0x190757=_0x34465d[_0x4fb787(0x383)])!==null&&_0x190757!==void 0x0?_0x190757:[]))return;if(!this[_0x4fb787(0x40a)]()){this['_checkAndWaitForCalculationPermission'](_0x3d0f88,_0x5bc0b3),this[_0x4fb787(0x311)]();throw new CanceledError();}})),this[_0x2f6596(0x3e4)](this[_0x2f6596(0x23f)][_0x2f6596(0x37c)]((_0xa1b9ea,_0x35aa14)=>{const _0x124418=_0x2f6596;if(_0xa1b9ea['id']!==SetFormulaCalculationNotificationMutation['id'])return;const _0x388793=_0xa1b9ea['params'];if(isCalculationStart(_0x388793)){const _0x216a9e=generateRandomId();this[_0x124418(0x378)][_0x124418(0x29a)](_0x216a9e),this[_0x124418(0x28b)](_0x216a9e);}else{if(isCalculationComplete(_0x388793)){if(this['_taskIds']['length']>0x0){const _0x5c10c8=this['_taskIds'][_0x124418(0x322)]();this['_releaseCalculationLimit'](_0x5c10c8);}}}}));}['dispose'](){const _0xa601e8=_0x1222a9;super[_0xa601e8(0x23d)](),this[_0xa601e8(0x354)](),this['_taskIds']=[],this['_currentUsage']=0x0,this[_0xa601e8(0x21c)]=0x0,this[_0xa601e8(0x3ed)]=0x0;}async[_0x1222a9(0x2b6)](_0x3aad94,_0x235582){const _0x2588bc=_0x1222a9,_0x29d34a=0x1e,_0x27cfbb=0x3e8;for(let _0x343ee7=0x0;_0x343ee7<_0x29d34a;_0x343ee7++)try{await this['_getFormulaLimitStatus']();if(this[_0x2588bc(0x40a)]()){this[_0x2588bc(0x236)](_0x3aad94,_0x235582),this['_messageService'][_0x2588bc(0x24a)]({'content':this[_0x2588bc(0x40e)]['t'](_0x2588bc(0x3b2)),'type':MessageType[_0x2588bc(0x246)]});return;}await new Promise(_0x42112d=>{const _0x3cf5b0=_0x2588bc;this[_0x3cf5b0(0x401)]=window[_0x3cf5b0(0x351)](_0x42112d,_0x27cfbb);});}catch(_0x26a4a9){this[_0x2588bc(0x38a)][_0x2588bc(0x3c0)](_0x26a4a9);}this[_0x2588bc(0x364)]['show']({'content':this['_localeService']['t'](_0x2588bc(0x30d)),'type':MessageType[_0x2588bc(0x321)]});}[_0x1222a9(0x236)](_0x2e0d80,_0x33240){const _0x2ef765=_0x1222a9;try{this['_commandService']['executeCommand'](_0x2e0d80['id'],_0x2e0d80[_0x2ef765(0x3ec)],_0x33240);}catch(_0x468f82){this[_0x2ef765(0x38a)][_0x2ef765(0x3c0)](_0x468f82);}}[_0x1222a9(0x328)](_0x2edc19,_0x3c1b51){const _0x41f651=_0x1222a9;if(_0x3c1b51<this[_0x41f651(0x3ed)])return;this[_0x41f651(0x3ed)]=_0x3c1b51,this['_maxFormulaLimit']=Number[_0x41f651(0x3d8)](_0x2edc19[_0x41f651(0x3df)]),this[_0x41f651(0x382)]=Number['parseInt'](_0x2edc19[_0x41f651(0x34b)]);}async[_0x1222a9(0x28b)](_0x4dcdc4){const _0xc11dc4=_0x1222a9,_0x504b17=Date[_0xc11dc4(0x2f7)]();try{var _0xab9c11,_0x3ecbf2;const _0x1f464c=((_0xab9c11=this[_0xc11dc4(0x356)][_0xc11dc4(0x268)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0xab9c11===void 0x0?void 0x0:_0xab9c11[_0xc11dc4(0x3c5)])||DEFAULT_FORMULA_CALCULATION_LIMIT_START_URL,_0x4117b7=(await this[_0xc11dc4(0x2dd)]['post'](_0x1f464c,{'body':JSON[_0xc11dc4(0x233)]({'taskId':_0x4dcdc4})}))['body'];if(((_0x3ecbf2=_0x4117b7[_0xc11dc4(0x3c0)])===null||_0x3ecbf2===void 0x0?void 0x0:_0x3ecbf2[_0xc11dc4(0x209)])!==ErrorCode['OK'])return;this[_0xc11dc4(0x328)](_0x4117b7[_0xc11dc4(0x219)],_0x504b17);}catch(_0x3d7f24){this[_0xc11dc4(0x38a)]['error'](_0x3d7f24);}}async[_0x1222a9(0x269)](_0x465392){const _0x42045a=_0x1222a9,_0x50cb9f=Date['now']();try{var _0x3df64e,_0x45ad65;const _0x4bf490=((_0x3df64e=this['_configService'][_0x42045a(0x268)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x3df64e===void 0x0?void 0x0:_0x3df64e[_0x42045a(0x303)])||DEFAULT_FORMULA_CALCULATION_LIMIT_STATUS_URL,_0x33fe0b=_0x465392?_0x4bf490+_0x42045a(0x395)+encodeURIComponent(_0x465392):_0x4bf490,_0xd4a077=(await this['_httpService'][_0x42045a(0x232)](_0x33fe0b))[_0x42045a(0x2de)];if(((_0x45ad65=_0xd4a077[_0x42045a(0x3c0)])===null||_0x45ad65===void 0x0?void 0x0:_0x45ad65['code'])!==ErrorCode['OK'])return;this['_setFormulaLimitStatus'](_0xd4a077[_0x42045a(0x219)],_0x50cb9f);}catch(_0x1b5062){this[_0x42045a(0x38a)][_0x42045a(0x3c0)](_0x1b5062);}}async[_0x1222a9(0x1e4)](_0x167bc3){const _0x31e867=_0x1222a9,_0x150327=Date[_0x31e867(0x2f7)]();try{var _0x7b2764,_0x15658d;const _0x328984=((_0x7b2764=this[_0x31e867(0x356)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x7b2764===void 0x0?void 0x0:_0x7b2764[_0x31e867(0x390)])||DEFAULT_FORMULA_CALCULATION_LIMIT_DONE_URL,_0xa05c82=(await this[_0x31e867(0x2dd)]['post'](_0x328984,{'body':JSON[_0x31e867(0x233)]({'taskId':_0x167bc3})}))[_0x31e867(0x2de)];if(((_0x15658d=_0xa05c82['error'])===null||_0x15658d===void 0x0?void 0x0:_0x15658d['code'])!==ErrorCode['OK'])return;this['_setFormulaLimitStatus'](_0xa05c82[_0x31e867(0x219)],_0x150327);}catch(_0x27e926){this[_0x31e867(0x38a)][_0x31e867(0x3c0)](_0x27e926);}}[_0x1222a9(0x40a)](){const _0x51a564=_0x1222a9;if(this[_0x51a564(0x21c)]===0x0)return!![];return this[_0x51a564(0x21c)]-this[_0x51a564(0x382)]>0x0;}['_clearPolling'](){const _0x401416=_0x1222a9;this[_0x401416(0x401)]&&(clearTimeout(this[_0x401416(0x401)]),this[_0x401416(0x401)]=null);}[_0x1222a9(0x311)](){const _0xa041f1=_0x1222a9;this[_0xa041f1(0x364)]['show']({'content':this[_0xa041f1(0x40e)]['t'](_0xa041f1(0x2b8)),'type':MessageType['Loading']});}['_hasFormulaInDirtyRanges'](_0x3d9803){const _0x400019=_0x1222a9;for(const _0xb09331 of _0x3d9803){const {unitId:_0x6fdce7,sheetId:_0x239ceb,range:_0x313dcb}=_0xb09331,_0x3ef01f=this[_0x400019(0x239)][_0x400019(0x3a2)](_0x6fdce7);if(!_0x3ef01f)continue;const _0x4da0dd=_0x3ef01f['getSheetBySheetId'](_0x239ceb);if(!_0x4da0dd)continue;const _0x58af7a=_0x4da0dd[_0x400019(0x30b)]();for(let _0x121c13=_0x313dcb[_0x400019(0x2dc)];_0x121c13<=_0x313dcb[_0x400019(0x2a5)];_0x121c13++)for(let _0x46ff31=_0x313dcb[_0x400019(0x33d)];_0x46ff31<=_0x313dcb['endColumn'];_0x46ff31++){const _0x26ff4b=_0x58af7a[_0x400019(0x1e5)](_0x121c13,_0x46ff31);if(_0x26ff4b&&(isFormulaString(_0x26ff4b['f'])||isFormulaId(_0x26ff4b['si'])))return!![];}}return![];}};FormulaCalculationGuardService=__decorate([__decorateParam(0x0,Inject(IMessageService)),__decorateParam(0x1,ICommandService),__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(HTTPService)),__decorateParam(0x4,IUniverInstanceService),__decorateParam(0x5,ILogService),__decorateParam(0x6,Inject(LocaleService))],FormulaCalculationGuardService);let WebLocalCacheService=class WebLocalCacheService extends Disposable{constructor(_0x423f06,_0x320977,_0x54d792){const _0x4d8ccc=_0x1222a9;super(),this['_configService']=_0x423f06,this['_localStorageService']=_0x320977,this[_0x4d8ccc(0x379)]=_0x54d792,_defineProperty(this,_0x4d8ccc(0x262),new Map()),_defineProperty(this,_0x4d8ccc(0x31d),new Map()),_defineProperty(this,_0x4d8ccc(0x27f),![]);}[_0x1222a9(0x380)](){const _0x14e86b=_0x1222a9;this[_0x14e86b(0x27f)]=!![];}['enableLocalCache'](){const _0x184a2c=_0x1222a9;this[_0x184a2c(0x27f)]=![];}get['saveTaskMap'](){const _0x12a60b=_0x1222a9;return this[_0x12a60b(0x31d)];}['dispose'](){const _0x1ef8f2=_0x1222a9;this['exhaustSavingTask']()[_0x1ef8f2(0x29c)](()=>super[_0x1ef8f2(0x23d)]());}async[_0x1222a9(0x2ad)](_0x306d7f){const _0x5cf514=_0x1222a9;if(this['_disabled'])return null;return this[_0x5cf514(0x235)]['getItem'](getLocalCacheKey(_0x306d7f));}async['saveOfflineData'](_0x366ee9,_0x2cb515){const _0x4812e7=_0x1222a9;return!!this[_0x4812e7(0x235)][_0x4812e7(0x33a)](_0x366ee9,_0x2cb515);}[_0x1222a9(0x3d0)](_0x3dae11,_0x15765e,_0x7458ca,_0x1358b5){const _0x5ccf94=_0x1222a9,_0x477262=this[_0x5ccf94(0x379)][_0x5ccf94(0x1f9)](_0x3dae11);this[_0x5ccf94(0x262)][_0x5ccf94(0x37a)](_0x3dae11,{'unitID':_0x3dae11,'type':_0x15765e,'awaitingChangeset':_0x7458ca,'mutations':_0x1358b5,'rev':_0x477262});if(!this['_saveTaskMap'][_0x5ccf94(0x3fd)](_0x3dae11))this[_0x5ccf94(0x20d)](_0x3dae11);}[_0x1222a9(0x20d)](_0x5ef6bd){const _0x2ec825=_0x1222a9,_0x3f4974=this[_0x2ec825(0x280)]();if(_0x3f4974===0x0)this[_0x2ec825(0x389)](_0x5ef6bd);else this[_0x2ec825(0x31d)][_0x2ec825(0x37a)](_0x5ef6bd,setTimeout(()=>this[_0x2ec825(0x389)](_0x5ef6bd),_0x3f4974));}[_0x1222a9(0x280)](){const _0x499baf=_0x1222a9;var _0x3ef6b6;return(_0x3ef6b6=this[_0x499baf(0x356)]['getConfig'](LOCAL_CACHE_INTERVAL_KEY))!==null&&_0x3ef6b6!==void 0x0?_0x3ef6b6:LOCAL_CACHE_INTERVAL;}[_0x1222a9(0x389)](_0x208ebf){const _0x21217c=_0x1222a9,_0x514e9d=this[_0x21217c(0x31d)][_0x21217c(0x232)](_0x208ebf);if(_0x514e9d!==void 0x0)window[_0x21217c(0x3db)](_0x514e9d);return this[_0x21217c(0x235)]['setItem'](getLocalCacheKey(_0x208ebf),this[_0x21217c(0x262)][_0x21217c(0x232)](_0x208ebf))[_0x21217c(0x29c)](()=>this[_0x21217c(0x31d)][_0x21217c(0x24f)](_0x208ebf));}async[_0x1222a9(0x3c4)](){const _0x2d8d05=_0x1222a9,_0x50e5ca=[];this['_saveTaskMap']['forEach']((_0x40a306,_0x3951fc)=>{const _0x446491=_0x2f58;window['clearTimeout'](_0x40a306),_0x50e5ca[_0x446491(0x29a)](this[_0x446491(0x389)](_0x3951fc)[_0x446491(0x29c)](()=>{const _0x1c4530=_0x446491;this[_0x1c4530(0x31d)][_0x1c4530(0x24f)](_0x3951fc);}));}),await Promise[_0x2d8d05(0x28f)](_0x50e5ca);}};WebLocalCacheService=__decorate([__decorateParam(0x0,IConfigService),__decorateParam(0x1,ILocalStorageService),__decorateParam(0x2,Inject(RevisionService))],WebLocalCacheService);var WebURLService=class extends RxDisposable{constructor(){const _0x1f5384=_0x1222a9;super(),_defineProperty(this,_0x1f5384(0x34d),void 0x0),this[_0x1f5384(0x34d)]=fromEvent(window,'popstate')[_0x1f5384(0x31b)](takeUntil(this[_0x1f5384(0x381)]),shareReplay(0x1),mapTo(void 0x0));}[_0x1222a9(0x2fb)](_0x5b2618,_0x23cee0,_0x14ee23=![]){const _0x5f559e=_0x1222a9,_0x381aef=new URL(window['location'][_0x5f559e(0x39b)]);_0x381aef[_0x5f559e(0x204)]['set'](_0x5b2618,_0x23cee0);if(_0x14ee23)window[_0x5f559e(0x3ca)][_0x5f559e(0x2e5)]('','',_0x381aef['toString']());else window[_0x5f559e(0x3ca)]['pushState']('','',_0x381aef[_0x5f559e(0x3b7)]());}[_0x1222a9(0x2c6)](_0x233b53,_0x1d6fb7=![]){const _0x52ffa9=_0x1222a9,_0x2fec4e=new URL(window['location'][_0x52ffa9(0x39b)]);_0x2fec4e['searchParams']['delete'](_0x233b53);if(_0x1d6fb7)window['history']['replaceState']('','',_0x2fec4e['toString']());else window[_0x52ffa9(0x3ca)]['pushState']('','',_0x2fec4e[_0x52ffa9(0x3b7)]());}[_0x1222a9(0x370)](_0x556f34){const _0x28ab6a=_0x1222a9;var _0x3456e0;return(_0x3456e0=new URL(window[_0x28ab6a(0x259)]['href'])[_0x28ab6a(0x204)]['get'](_0x556f34))!==null&&_0x3456e0!==void 0x0?_0x3456e0:void 0x0;}};let UniverCollaborationClientUIPlugin=class UniverCollaborationClientUIPlugin extends Plugin{constructor(_0xaa99cf=defaultPluginConfig,_0x1f698e,_0x158978,_0x5102fa){const _0x382e2=_0x1222a9;super(),this['_config']=_0xaa99cf,this[_0x382e2(0x371)]=_0x1f698e,this[_0x382e2(0x21b)]=_0x158978,this[_0x382e2(0x356)]=_0x5102fa;const {..._0x442003}=merge({},defaultPluginConfig,this['_config']);this[_0x382e2(0x356)]['setConfig'](PLUGIN_CONFIG_KEY,_0x442003);}[_0x1222a9(0x3d9)](){const _0xf22a44=_0x1222a9;this['_registerDependencies'](),this[_0xf22a44(0x238)]();}[_0x1222a9(0x37d)](){const _0x34dbce=_0x1222a9;this[_0x34dbce(0x345)]();}[_0x1222a9(0x32c)](){const _0x1280ac=_0x1222a9;var _0x400334;const _0x44682c=[[ColorAssignService],[FormulaCalculationGuardService],[DocTransformSelectionsService],[DocTransformIMECacheService],[DocTransformStateCacheService],[DocSyncEditingCollabCursorService],[IURLService,{'useClass':WebURLService}],[ISocketService,{'useClass':WebSocketService}],[ILocalCacheService,{'useClass':WebLocalCacheService}],[DesktopCollaborationStatusDisplayController],[CollaborationEntityUIController],[CollaborationClientUIController],[CollabCursorController],[ImagePasteController],[CollaborationDataLoaderController]];if(this[_0x1280ac(0x38c)][_0x1280ac(0x3c8)])_0x44682c[_0x1280ac(0x29a)]([FrontendLogController]);registerDependencies(this[_0x1280ac(0x21b)],mergeOverrideWithDependencies(_0x44682c,(_0x400334=this[_0x1280ac(0x38c)])===null||_0x400334===void 0x0?void 0x0:_0x400334[_0x1280ac(0x271)]));}[_0x1222a9(0x345)](){const _0x3db580=_0x1222a9;this['disposeWithMe'](this[_0x3db580(0x371)][_0x3db580(0x3f2)](UniverInstanceType[_0x3db580(0x329)],[DocCollabCursorRenderController])),this['disposeWithMe'](this[_0x3db580(0x371)][_0x3db580(0x3f2)](UniverInstanceType[_0x3db580(0x23c)],[SheetCollabCursorRenderController]));}[_0x1222a9(0x238)](){const _0x25932f=_0x1222a9;touchDependencies(this[_0x25932f(0x21b)],[[CollabCursorController],[DesktopCollaborationStatusDisplayController],[CollaborationEntityUIController],[CollaborationClientUIController],[CollaborationDataLoaderController],[FormulaCalculationGuardService]]);if(this[_0x25932f(0x38c)][_0x25932f(0x3c8)])touchDependencies(this['_injector'],[[FrontendLogController]]);}};_defineProperty(UniverCollaborationClientUIPlugin,_0x1222a9(0x377),_0x1222a9(0x35d)),_defineProperty(UniverCollaborationClientUIPlugin,_0x1222a9(0x2db),name),_defineProperty(UniverCollaborationClientUIPlugin,_0x1222a9(0x2e4),version),UniverCollaborationClientUIPlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IRenderManagerService),__decorateParam(0x2,Inject(Injector)),__decorateParam(0x3,IConfigService)],UniverCollaborationClientUIPlugin);let BrowserCollaborationSocketService=class BrowserCollaborationSocketService extends CollaborationSocketService{constructor(_0x5a5dce,_0x1cb266,_0x112d3a,_0x11f192,_0xaadad){super(_0x5a5dce,_0x1cb266,_0x112d3a,_0x11f192,_0xaadad);}async['createSocket'](_0x48ae58){const _0xbcdefb=_0x1222a9,_0x4b289f=await this[_0xbcdefb(0x23b)](),_0x358138=this[_0xbcdefb(0x318)](_0x48ae58,_0x4b289f);return this[_0xbcdefb(0x32d)](_0x358138);}['_createSocketURL'](_0x2b5f3f,_0x16daeb){const _0x19b86d=_0x1222a9,_0x1d1c5b=typeof window===_0x19b86d(0x3f8)?new URL(_0x2b5f3f):new URL(_0x2b5f3f,window['location'][_0x19b86d(0x2b2)]);_0x1d1c5b['searchParams'][_0x19b86d(0x37a)](_0x19b86d(0x32f),_0x16daeb);const _0x143fc5=typeof window===_0x19b86d(0x3f8)?new URLSearchParams():new URLSearchParams(window[_0x19b86d(0x259)][_0x19b86d(0x3b5)]);return _0x143fc5[_0x19b86d(0x232)](_0x19b86d(0x346))&&_0x1d1c5b['searchParams'][_0x19b86d(0x37a)](_0x19b86d(0x346),_0x143fc5['get'](_0x19b86d(0x346))),_0x1d1c5b[_0x19b86d(0x3b7)]();}async['_getSessionTicket'](){const _0x210643=_0x1222a9;var _0x4ec6c9,_0x28c3b5,_0xb6bdbf;const _0x4cc809=this[_0x210643(0x356)][_0x210643(0x268)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x4ce798=(_0x4ec6c9=_0x4cc809===null||_0x4cc809===void 0x0?void 0x0:_0x4cc809[_0x210643(0x299)])!==null&&_0x4ec6c9!==void 0x0?_0x4ec6c9:DEFAULT_WS_SESSION_TICKET_URL;return(_0x28c3b5=(_0xb6bdbf=(await this[_0x210643(0x2dd)][_0x210643(0x232)](_0x4ce798,{'headers':{'Content-Type':_0x210643(0x2cf)}}))[_0x210643(0x2de)])===null||_0xb6bdbf===void 0x0?void 0x0:_0xb6bdbf['ticket'])!==null&&_0x28c3b5!==void 0x0?_0x28c3b5:'';}};BrowserCollaborationSocketService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ILogService),__decorateParam(0x4,ISnapshotServerService)],BrowserCollaborationSocketService);let RemoteUniscriptService=class RemoteUniscriptService extends Disposable{constructor(_0x28f65d,_0x314a4f,_0x1a5696){const _0x4799b9=_0x1222a9;super(),this[_0x4799b9(0x372)]=_0x28f65d,this[_0x4799b9(0x2dd)]=_0x314a4f,this[_0x4799b9(0x356)]=_0x1a5696;}async[_0x1222a9(0x2b3)](_0x472869,_0x224d12,_0x34ecf0,..._0x25e9c5){const _0x4ef69c=_0x1222a9;var _0x3afea5,_0x439c26,_0x14bdf7,_0x5a7794;const _0x17a72f=this[_0x4ef69c(0x372)][_0x4ef69c(0x24d)]();if(!_0x17a72f)throw new Error('[RemoteUniscriptService]:\x20no\x20focused\x20unit');const _0x4a6d1e=((_0x3afea5=this[_0x4ef69c(0x356)][_0x4ef69c(0x268)](REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY))!==null&&_0x3afea5!==void 0x0?_0x3afea5:DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT)+'/'+_0x472869+_0x4ef69c(0x2f6)+_0x224d12,_0x4bf4f5={'scriptId':_0x472869,'runId':(_0x439c26=new URL(window[_0x4ef69c(0x259)][_0x4ef69c(0x39b)])[_0x4ef69c(0x204)][_0x4ef69c(0x232)]('runId'))!==null&&_0x439c26!==void 0x0?_0x439c26:'','function':_0x224d12,'unitId':_0x17a72f['getUnitId'](),'argsOfFunction':JSON['stringify'](_0x25e9c5),'invokeId':(_0x14bdf7=_0x34ecf0[_0x4ef69c(0x3c1)])!==null&&_0x14bdf7!==void 0x0?_0x14bdf7:'','executionId':(_0x5a7794=_0x34ecf0[_0x4ef69c(0x344)])!==null&&_0x5a7794!==void 0x0?_0x5a7794:''};try{const _0x1a1b10=await this[_0x4ef69c(0x2dd)][_0x4ef69c(0x37e)](_0x4a6d1e,{'body':_0x4bf4f5});if(_0x1a1b10[_0x4ef69c(0x2de)][_0x4ef69c(0x3c0)]&&_0x1a1b10[_0x4ef69c(0x2de)][_0x4ef69c(0x3c0)]['code']!==ErrorCode['OK'])return _0x4ef69c(0x3f1);return _0x1a1b10[_0x4ef69c(0x2de)][_0x4ef69c(0x247)];}catch{return _0x4ef69c(0x3f1);}}};RemoteUniscriptService=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService)],RemoteUniscriptService);const HEARTBEAT_INTERVAL=0x7530,ACTIVE_UNIT_EVENT_CHANNEL=_0x1222a9(0x287);var WebBrowserSingleActiveUnitService=class extends Disposable{constructor(){const _0x5bf9d2=_0x1222a9;super(),_defineProperty(this,'_id',generateRandomId()),_defineProperty(this,_0x5bf9d2(0x374),new Set()),_defineProperty(this,'_unitOnClients',new Map()),_defineProperty(this,'_heartbeatTimer',null),_defineProperty(this,'_clearOtherTimers',new Map()),_defineProperty(this,_0x5bf9d2(0x2cb),new Map()),this[_0x5bf9d2(0x338)]();}[_0x1222a9(0x23d)](){const _0x27d6b8=_0x1222a9;super[_0x27d6b8(0x23d)](),this[_0x27d6b8(0x25f)][_0x27d6b8(0x2bc)]((_0x3eddd8,_0x397b3b)=>this[_0x27d6b8(0x347)](_0x397b3b));if(this[_0x27d6b8(0x407)])window[_0x27d6b8(0x2df)](this['_heartbeatTimer']);}[_0x1222a9(0x1ff)](_0x2c1666){const _0xc869a5=_0x1222a9;return this['_ensureSubject'](_0x2c1666)[_0xc869a5(0x31b)](distinctUntilChanged());}['editingUnit'](_0x4b5509){const _0x167f1a=_0x1222a9;if(this['_selfUnitIDs'][_0x167f1a(0x1f7)]===0x0)this[_0x167f1a(0x2f2)]();this['_selfUnitIDs'][_0x167f1a(0x2e3)](_0x4b5509),this['_send']({'type':0x0,'memberID':this[_0x167f1a(0x3c2)],'unitIDs':[_0x4b5509],'isForwarded':![]});}['disposeUnit'](_0x129a94){const _0x293ec7=_0x1222a9;this[_0x293ec7(0x374)][_0x293ec7(0x24f)](_0x129a94);if(this['_selfUnitIDs'][_0x293ec7(0x1f7)]===0x0&&this[_0x293ec7(0x407)])window[_0x293ec7(0x2df)](this['_heartbeatTimer']);}[_0x1222a9(0x338)](){const _0x455a8e=_0x1222a9;this[_0x455a8e(0x3e4)](toDisposable(fromEvent(window,_0x455a8e(0x3c9))[_0x455a8e(0x3a1)](_0x387c46=>{const _0x23738e=_0x455a8e;if(_0x387c46['key']!==ACTIVE_UNIT_EVENT_CHANNEL||!_0x387c46[_0x23738e(0x3cb)])return;const _0x1d6005=JSON[_0x23738e(0x3ef)](_0x387c46[_0x23738e(0x3cb)]);this[_0x23738e(0x265)](_0x1d6005);}))),window[_0x455a8e(0x1f5)]('unload',()=>this[_0x455a8e(0x2d5)]({'type':0x1,'memberID':this[_0x455a8e(0x3c2)],'unitIDs':Array[_0x455a8e(0x2a1)](this[_0x455a8e(0x374)])}));}[_0x1222a9(0x265)](_0x1c4d70){const _0x240e30=_0x1222a9;switch(_0x1c4d70[_0x240e30(0x24e)]){case 0x0:this[_0x240e30(0x2fd)](_0x1c4d70);break;case 0x1:this[_0x240e30(0x242)](_0x1c4d70);break;case 0x2:this['_handleHeartbeatEvent'](_0x1c4d70);break;}}[_0x1222a9(0x2fd)](_0x265f81){const _0x531f72=_0x1222a9,{unitIDs:_0x5a0e44,memberID:_0x1ee681,isForwarded:_0x21f0be}=_0x265f81;_0x5a0e44[_0x531f72(0x2bc)](_0x4ede8a=>{const _0xdd5b73=_0x531f72;if(!_0x21f0be&&this['_unitOnClients'][_0xdd5b73(0x3fd)](_0x4ede8a))this[_0xdd5b73(0x2d7)](_0x4ede8a)['next'](UnitStatus[_0xdd5b73(0x3c3)]);if(!this[_0xdd5b73(0x222)]['has'](_0x4ede8a)||!this[_0xdd5b73(0x222)][_0xdd5b73(0x232)](_0x4ede8a)[_0xdd5b73(0x3fd)](_0x1ee681)){const _0x5b00ac=this[_0xdd5b73(0x222)]['get'](_0x4ede8a)||new Set();_0x5b00ac[_0xdd5b73(0x2e3)](_0x1ee681),this[_0xdd5b73(0x222)][_0xdd5b73(0x37a)](_0x4ede8a,_0x5b00ac),this[_0xdd5b73(0x406)](_0x1ee681);}});if(!_0x21f0be)this[_0x531f72(0x2d5)]({'type':0x0,'memberID':this[_0x531f72(0x3c2)],'unitIDs':[...this[_0x531f72(0x374)]],'isForwarded':!![]});}['_scheduleClearOtherTimer'](_0x459143){const _0x496990=_0x1222a9;this['_removeClearOtherTimer'](_0x459143);const _0x313a8f=window[_0x496990(0x351)](()=>{const _0x448869=_0x496990;this[_0x448869(0x222)][_0x448869(0x2bc)](_0x300e9a=>{_0x300e9a['delete'](_0x459143);});},HEARTBEAT_INTERVAL*0x2);this[_0x496990(0x25f)][_0x496990(0x37a)](_0x459143,_0x313a8f);}['_removeClearOtherTimer'](_0x223ac4){const _0x596a2d=_0x1222a9;if(this[_0x596a2d(0x25f)][_0x596a2d(0x3fd)](_0x223ac4)){const _0xa1623a=this[_0x596a2d(0x25f)]['get'](_0x223ac4);if(_0xa1623a)window[_0x596a2d(0x3db)](_0xa1623a);this[_0x596a2d(0x25f)][_0x596a2d(0x37a)](_0x223ac4,null);}}[_0x1222a9(0x242)](_0xf4b4d8){const _0x1d4f31=_0x1222a9,{memberID:_0x117667,unitIDs:_0x578b77}=_0xf4b4d8;_0x578b77['forEach'](_0xaf8eae=>{const _0x4424f6=_0x2f58;var _0x3ef690;const _0x419774=this[_0x4424f6(0x222)][_0x4424f6(0x232)](_0xaf8eae);if(!_0x419774)return;_0x419774[_0x4424f6(0x24f)](_0x117667),(_0x3ef690=this[_0x4424f6(0x2d7)](_0xaf8eae))===null||_0x3ef690===void 0x0||_0x3ef690[_0x4424f6(0x266)](_0x419774[_0x4424f6(0x1f7)]===0x0?UnitStatus['NO_OTHER_CLIENTS_EDITING']:UnitStatus[_0x4424f6(0x3c3)]);}),this[_0x1d4f31(0x347)](_0x117667);}[_0x1222a9(0x367)](_0x2acd5d){const _0x15ac8c=_0x1222a9;this[_0x15ac8c(0x406)](_0x2acd5d[_0x15ac8c(0x35e)]);}[_0x1222a9(0x2d5)](_0x4a9b59){const _0x2c6f21=_0x1222a9;localStorage[_0x2c6f21(0x33a)](ACTIVE_UNIT_EVENT_CHANNEL,JSON[_0x2c6f21(0x233)](_0x4a9b59));}[_0x1222a9(0x2f2)](){const _0x4978ba=_0x1222a9;this[_0x4978ba(0x407)]=window[_0x4978ba(0x20a)](()=>{const _0x5e01f4=_0x4978ba;this[_0x5e01f4(0x2d5)]({'type':0x2,'memberID':this[_0x5e01f4(0x3c2)]});},HEARTBEAT_INTERVAL);}[_0x1222a9(0x2d7)](_0x330df7){const _0x20e194=_0x1222a9;if(!this['_unitStatus'][_0x20e194(0x3fd)](_0x330df7))this[_0x20e194(0x2cb)][_0x20e194(0x37a)](_0x330df7,new BehaviorSubject(UnitStatus[_0x20e194(0x327)]));return this[_0x20e194(0x2cb)][_0x20e194(0x232)](_0x330df7);}};export{BrowserCollaborationSocketService,CollaborationDataLoaderController,DesktopCollaborationStatusDisplayController,IURLService,RemoteUniscriptService,SheetCollabCursorShape,UniverCollaborationClientUIPlugin,WebBrowserSingleActiveUnitService,WebURLService};
|
|
1
|
+
const _0x385291=_0x2feb;(function(_0x541020,_0x35c9ad){const _0x1072d1=_0x2feb,_0x24d1e1=_0x541020();while(!![]){try{const _0x30a057=-parseInt(_0x1072d1(0x3c1))/0x1*(parseInt(_0x1072d1(0x1ee))/0x2)+-parseInt(_0x1072d1(0x293))/0x3+-parseInt(_0x1072d1(0x338))/0x4*(parseInt(_0x1072d1(0x276))/0x5)+-parseInt(_0x1072d1(0x243))/0x6*(-parseInt(_0x1072d1(0x39a))/0x7)+-parseInt(_0x1072d1(0x396))/0x8+-parseInt(_0x1072d1(0x342))/0x9*(parseInt(_0x1072d1(0x24e))/0xa)+parseInt(_0x1072d1(0x2db))/0xb;if(_0x30a057===_0x35c9ad)break;else _0x24d1e1['push'](_0x24d1e1['shift']());}catch(_0xaf8f69){_0x24d1e1['push'](_0x24d1e1['shift']());}}}(_0xdf91,0xb1284));import{COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,CollaborationController,CollaborationSessionService,CollaborationSocketService,CollaborationStatus,CollaborationUIEventId,CollaborationUIEventService,DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,DEFAULT_WS_SESSION_TICKET_URL,DataLoaderService,DocCollaborationEntity,ILocalCacheService,LOCAL_CACHE_INTERVAL,LOCAL_CACHE_INTERVAL_KEY,MemberService,REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,SessionStatus,UnitStatus,UniverCollaborationClientPlugin,getLocalCacheKey}from'@univerjs-pro/collaboration-client';import{COLORS,CanceledError,ColorKit,CommandType,DOC_RANGE_TYPE,DependentOn,Disposable,DisposableCollection,ICommandService,IConfigService,ILocalStorageService,ILogService,IUniverInstanceService,Inject,Injector,LocaleService,Optional,Plugin,Rectangle,RxDisposable,ThemeService,Tools,UniverInstanceType,Workbook,createIdentifier,debounce,fromEventSubject,generateRandomId,isFormulaId,isFormulaString,merge,mergeOverrideWithDependencies,registerDependencies,toDisposable,touchDependencies}from'@univerjs/core';import{BuiltInUIPart,IBeforeCloseService,IMessageService,INotificationService,IUIPartsService,connectInjector,useDependency,useObservable}from'@univerjs/ui';import{BehaviorSubject,Subject,combineLatest,debounceTime,distinctUntilChanged,filter,fromEvent,mapTo,merge as _0x3c0893,of,shareReplay,switchMap,takeUntil}from'rxjs';import{MessageType,Tooltip,clsx}from'@univerjs/design';import{LoadingMultiIcon,OffLineIcon,OnLineIcon}from'@univerjs/icons';import{useCallback,useMemo}from'react';import{jsx}from'react/jsx-runtime';import{IRemoteInstanceService}from'@univerjs/rpc';import{EffectRefRangId,RefRangeService,SetSelectionsOperation,SetWorksheetActivateCommand,SheetsSelectionsService,handleDeleteRangeMoveLeft,handleDeleteRangeMoveUp,handleIRemoveCol,handleIRemoveRow,handleInsertCol,handleInsertRangeMoveDown,handleInsertRangeMoveRight,handleInsertRow,handleMoveRange,runRefRangeMutations}from'@univerjs/sheets';import{IRenderManagerService,Rect,RegularPolygon,SHEET_VIEWPORT_KEY,Shape,TRANSFORM_CHANGE_OBSERVABLE_TYPE,Vector2,getColor}from'@univerjs/engine-render';import{HTTPService,ISocketService,WebSocketService}from'@univerjs/network';import{DocIMEInputManagerService,DocStateChangeManagerService,IDocClipboardService,NodePositionConvertToCursor,NodePositionConvertToRectRange,SetDocZoomRatioOperation,TEXT_RANGE_LAYER_INDEX}from'@univerjs/docs-ui';import{IImageIoService}from'@univerjs/drawing';import{CollaborationEvent,ISnapshotServerService,ITransformService,RevisionService,isTransformMutationFailure,isTransformMutationsWithChangesetSuccess}from'@univerjs-pro/collaboration';import{DocSelectionManagerService,DocSkeletonManagerService,RichTextEditingMutation,SetTextSelectionsOperation}from'@univerjs/docs';import{FormulaExecuteStageType,FormulaExecutedStateType,SetFormulaCalculationNotificationMutation,SetFormulaCalculationStartMutation,deserializeRangeWithSheet,serializeRangeWithSheet}from'@univerjs/engine-formula';import{filter as _0x38f1c2,map,switchMap as _0x4e4672,takeUntil as _0x3d2c5f,throttleTime}from'rxjs/operators';import{SheetSkeletonManagerService,getCoordByCell,getSheetObject}from'@univerjs/sheets-ui';import{ErrorCode}from'@univerjs/protocol';function getStatusConfig(_0x33577d){const _0x53eb2d=_0x2feb;switch(_0x33577d){case CollaborationStatus[_0x53eb2d(0x237)]:return{'icon':jsx(OffLineIcon,{}),'colorClass':_0x53eb2d(0x317),'i18nKey':'collabStatus.offline','tooltipKey':_0x53eb2d(0x1da),'clickable':!![],'indicator':_0x53eb2d(0x304)};case CollaborationStatus[_0x53eb2d(0x25b)]:return{'icon':jsx(OffLineIcon,{}),'colorClass':_0x53eb2d(0x265),'i18nKey':_0x53eb2d(0x3b0),'clickable':![],'indicator':_0x53eb2d(0x304)};case CollaborationStatus[_0x53eb2d(0x2f5)]:return{'icon':jsx(LoadingMultiIcon,{}),'colorClass':_0x53eb2d(0x1ac),'i18nKey':_0x53eb2d(0x24a),'clickable':![],'indicator':_0x53eb2d(0x29e)};case CollaborationStatus['NOT_COLLAB']:return{'icon':jsx(OnLineIcon,{}),'colorClass':_0x53eb2d(0x380),'i18nKey':_0x53eb2d(0x207),'clickable':![],'indicator':_0x53eb2d(0x304)};case CollaborationStatus['AWAITING']:case CollaborationStatus['AWAITING_WITH_PENDING']:return{'icon':jsx(LoadingMultiIcon,{}),'colorClass':_0x53eb2d(0x1ac),'i18nKey':'collabStatus.syncing','clickable':![],'indicator':_0x53eb2d(0x29e)};case CollaborationStatus[_0x53eb2d(0x3bd)]:case CollaborationStatus[_0x53eb2d(0x231)]:return{'icon':jsx(OnLineIcon,{}),'colorClass':_0x53eb2d(0x36c),'i18nKey':_0x53eb2d(0x209),'clickable':![],'indicator':_0x53eb2d(0x304)};}}function CollaborationStatusDisplay(_0x5e05d2){const _0x31864e=_0x2feb,{status$:_0x397d2e}=_0x5e05d2,_0x5aae8c=useObservable(_0x397d2e,CollaborationStatus['NOT_COLLAB']),_0x5f2f5d=useDependency(LocaleService),_0x3009bb=useDependency(CollaborationSessionService),_0x553589=useMemo(()=>getStatusConfig(_0x5aae8c),[_0x5aae8c]),_0x17eb21=_0x5aae8c!==CollaborationStatus[_0x31864e(0x237)],_0x1ce895=_0x5f2f5d['t'](_0x553589['i18nKey']),_0x28d466=_0x553589['tooltipKey']?_0x5f2f5d['t'](_0x553589[_0x31864e(0x3ba)]):_0x1ce895,_0x537499=useCallback(()=>{const _0xabf2e9=_0x31864e;if(!_0x17eb21)_0x3009bb[_0xabf2e9(0x1b0)]();},[_0x17eb21,_0x3009bb]),_0x32eb69=useCallback(_0x28e150=>{const _0x117980=_0x31864e;!_0x17eb21&&(_0x28e150[_0x117980(0x393)]===_0x117980(0x1ec)||_0x28e150['key']==='\x20')&&(_0x28e150[_0x117980(0x2bc)](),_0x3009bb[_0x117980(0x1b0)]());},[_0x17eb21,_0x3009bb]),_0x12c00a=jsx(_0x31864e(0x37e),{'className':clsx('univer-flex\x20univer-items-center\x20univer-justify-center',_0x31864e(0x1c4),_0x553589[_0x31864e(0x36a)],{'univer-animate-spin':_0x553589[_0x31864e(0x2e0)]===_0x31864e(0x29e),'univer-animate-pulse':_0x553589[_0x31864e(0x2e0)]===_0x31864e(0x1f0)}),'aria-hidden':_0x31864e(0x239),'children':_0x553589[_0x31864e(0x28d)]}),_0x5f246e=jsx(_0x31864e(0x37e),{'className':clsx('univer-flex\x20univer-items-center\x20univer-justify-center',_0x31864e(0x31a),_0x31864e(0x2f4),'focus:univer-outline-none\x20focus:univer-ring-2\x20focus:univer-ring-primary-500\x20focus:univer-ring-offset-2',_0x31864e(0x2e8),{'univer-cursor-pointer\x20hover:univer-bg-gray-100\x20dark:hover:univer-bg-gray-700':_0x553589[_0x31864e(0x292)],'univer-cursor-default':!_0x553589['clickable']}),'children':_0x12c00a});if(_0x553589[_0x31864e(0x292)])return jsx(Tooltip,{'title':_0x28d466,'placement':_0x31864e(0x30a),'children':jsx(_0x31864e(0x297),{'type':_0x31864e(0x297),'onClick':_0x537499,'onKeyDown':_0x32eb69,'className':clsx(_0x31864e(0x26b),_0x31864e(0x38e),_0x31864e(0x225),_0x31864e(0x2f9)),'aria-label':_0x1ce895+'\x20-\x20'+_0x28d466,'role':_0x31864e(0x371),'aria-live':'polite','aria-atomic':_0x31864e(0x239),'children':_0x5f246e})});return jsx(Tooltip,{'title':_0x28d466,'placement':_0x31864e(0x30a),'children':jsx(_0x31864e(0x2c9),{'className':clsx(_0x31864e(0x26b),_0x31864e(0x38e),_0x31864e(0x225)),'aria-label':_0x1ce895,'role':_0x31864e(0x371),'aria-live':_0x31864e(0x279),'aria-atomic':_0x31864e(0x239),'children':_0x5f246e})});}function _typeof(_0x4622a8){'@babel/helpers - typeof';const _0x882a64=_0x2feb;return _typeof=_0x882a64(0x2b0)==typeof Symbol&&_0x882a64(0x20e)==typeof Symbol[_0x882a64(0x1cf)]?function(_0xe2fad7){return typeof _0xe2fad7;}:function(_0x1a3098){const _0x4d413e=_0x882a64;return _0x1a3098&&'function'==typeof Symbol&&_0x1a3098[_0x4d413e(0x2e6)]===Symbol&&_0x1a3098!==Symbol[_0x4d413e(0x1cd)]?_0x4d413e(0x20e):typeof _0x1a3098;},_typeof(_0x4622a8);}function toPrimitive(_0x326347,_0x207c49){const _0x1c3715=_0x2feb;if(_0x1c3715(0x32e)!=_typeof(_0x326347)||!_0x326347)return _0x326347;var _0xe2f844=_0x326347[Symbol[_0x1c3715(0x228)]];if(void 0x0!==_0xe2f844){var _0x217724=_0xe2f844[_0x1c3715(0x27d)](_0x326347,_0x207c49||_0x1c3715(0x319));if(_0x1c3715(0x32e)!=_typeof(_0x217724))return _0x217724;throw new TypeError(_0x1c3715(0x22f));}return(_0x1c3715(0x30c)===_0x207c49?String:Number)(_0x326347);}function toPropertyKey(_0x402cb8){const _0x2c8447=_0x2feb;var _0xc2d3c9=toPrimitive(_0x402cb8,_0x2c8447(0x30c));return'symbol'==_typeof(_0xc2d3c9)?_0xc2d3c9:_0xc2d3c9+'';}function _defineProperty(_0x5a50bb,_0x592514,_0x5104fa){const _0x4708cc=_0x2feb;return(_0x592514=toPropertyKey(_0x592514))in _0x5a50bb?Object[_0x4708cc(0x1c7)](_0x5a50bb,_0x592514,{'value':_0x5104fa,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5a50bb[_0x592514]=_0x5104fa,_0x5a50bb;}function __decorateParam(_0x11c70e,_0x5528e8){return function(_0x59535c,_0xf55ac9){_0x5528e8(_0x59535c,_0xf55ac9,_0x11c70e);};}function __decorate(_0x8294e,_0x3bb16f,_0x2c4bc1,_0x5f109c){const _0x45455c=_0x2feb;var _0x4a0c14=arguments[_0x45455c(0x287)],_0xbb74f3=_0x4a0c14<0x3?_0x3bb16f:_0x5f109c===null?_0x5f109c=Object[_0x45455c(0x2b7)](_0x3bb16f,_0x2c4bc1):_0x5f109c,_0x25eca0;if(typeof Reflect===_0x45455c(0x32e)&&typeof Reflect[_0x45455c(0x300)]===_0x45455c(0x2b0))_0xbb74f3=Reflect[_0x45455c(0x300)](_0x8294e,_0x3bb16f,_0x2c4bc1,_0x5f109c);else{for(var _0x33af63=_0x8294e['length']-0x1;_0x33af63>=0x0;_0x33af63--)if(_0x25eca0=_0x8294e[_0x33af63])_0xbb74f3=(_0x4a0c14<0x3?_0x25eca0(_0xbb74f3):_0x4a0c14>0x3?_0x25eca0(_0x3bb16f,_0x2c4bc1,_0xbb74f3):_0x25eca0(_0x3bb16f,_0x2c4bc1))||_0xbb74f3;}return _0x4a0c14>0x3&&_0xbb74f3&&Object[_0x45455c(0x1c7)](_0x3bb16f,_0x2c4bc1,_0xbb74f3),_0xbb74f3;}let DesktopCollaborationStatusDisplayController=class DesktopCollaborationStatusDisplayController extends Disposable{constructor(_0x3c5b88,_0x6a18b6,_0x10364a,_0x485c38){const _0x359074=_0x2feb;super(),this[_0x359074(0x1ed)]=_0x3c5b88,this['_injector']=_0x6a18b6,this[_0x359074(0x3a4)]=_0x10364a,this[_0x359074(0x312)]=_0x485c38,_defineProperty(this,'_status$',new BehaviorSubject(CollaborationStatus[_0x359074(0x340)])),this[_0x359074(0x2c2)](),this[_0x359074(0x238)]();}[_0x385291(0x238)](){const _0x394fe4=_0x385291;this[_0x394fe4(0x21f)](this[_0x394fe4(0x1ed)][_0x394fe4(0x246)][_0x394fe4(0x1e6)](switchMap(()=>{const _0x19c97c=_0x394fe4,_0x52db4e=this['_univerInstanceService'][_0x19c97c(0x1bd)]();if(_0x52db4e)return this[_0x19c97c(0x3a4)][_0x19c97c(0x35a)](_0x52db4e[_0x19c97c(0x1ce)]());return of(null);}),switchMap(_0x42ca5d=>{const _0x481905=_0x394fe4;if(_0x42ca5d)return _0x42ca5d['status$'];return of(CollaborationStatus[_0x481905(0x340)]);}))[_0x394fe4(0x36d)](_0x4c4954=>{const _0x40cf69=_0x394fe4;this[_0x40cf69(0x390)][_0x40cf69(0x1bb)](_0x4c4954);}));}[_0x385291(0x2c2)](){const _0x4ac833=_0x385291;this[_0x4ac833(0x21f)](this[_0x4ac833(0x312)][_0x4ac833(0x2d0)](BuiltInUIPart[_0x4ac833(0x247)],()=>connectInjector(passProps({'status$':this[_0x4ac833(0x390)]['asObservable']()}),this[_0x4ac833(0x1b9)])));}};DesktopCollaborationStatusDisplayController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationController)),__decorateParam(0x3,IUIPartsService)],DesktopCollaborationStatusDisplayController);function passProps(_0x45a09e){const {status$:_0x56ce7c}=_0x45a09e;return function _0x10bfa7(){return jsx(CollaborationStatusDisplay,{'status$':_0x56ce7c});};}const IURLService=createIdentifier(_0x385291(0x2ba));let CollaborationDataLoaderController=class CollaborationDataLoaderController extends RxDisposable{constructor(_0x2f7e17,_0x4980db,_0x5dfc23,_0x634fdb,_0x54fd99){const _0x583fbd=_0x385291;super(),this['_urlService']=_0x2f7e17,this['_logService']=_0x4980db,this[_0x583fbd(0x2cc)]=_0x5dfc23,this[_0x583fbd(0x382)]=_0x634fdb;if(_0x54fd99)_0x54fd99===null||_0x54fd99===void 0x0||_0x54fd99['whenReady']()[_0x583fbd(0x2e1)](()=>this[_0x583fbd(0x1d2)]());else this[_0x583fbd(0x21a)]['debug'](_0x583fbd(0x213),_0x583fbd(0x1e7)),this[_0x583fbd(0x1d2)]();}async[_0x385291(0x1d2)](){const _0x130370=_0x385291,_0x34bd83=this[_0x130370(0x2f8)][_0x130370(0x384)](_0x130370(0x233)),_0x12f3e7=this[_0x130370(0x2f8)]['getParam'](_0x130370(0x3c9)),_0x1a7c30=this['_urlService'][_0x130370(0x384)]('subunit');if(!_0x34bd83||!_0x12f3e7){this['_logService'][_0x130370(0x29c)](_0x130370(0x213),_0x130370(0x298));return;}const _0x3eb1de=await this['_dataLoaderService'][_0x130370(0x3b4)](_0x34bd83,Number(_0x12f3e7),_0x1a7c30);if(_0x3eb1de&&_0x3eb1de instanceof Workbook)this[_0x130370(0x36b)](_0x3eb1de);}async[_0x385291(0x36b)](_0x2adaf1){const _0x21bc5e=_0x385291;await this[_0x21bc5e(0x278)](_0x2adaf1),_0x2adaf1[_0x21bc5e(0x3af)][_0x21bc5e(0x1e6)](takeUntil(this['dispose$']))[_0x21bc5e(0x36d)](_0x502bf7=>{if(_0x502bf7)this['_updateURLWithCurrentState'](_0x502bf7);}),this[_0x21bc5e(0x2f8)][_0x21bc5e(0x311)][_0x21bc5e(0x1e6)](takeUntil(this[_0x21bc5e(0x2d2)]))[_0x21bc5e(0x36d)](()=>this[_0x21bc5e(0x278)](_0x2adaf1));}['_updateURLWithCurrentState'](_0x37e51c,_0x46892c=![]){const _0x4a982a=_0x385291,_0x2312f4=this[_0x4a982a(0x2f8)][_0x4a982a(0x384)](_0x4a982a(0x2e7));if(_0x37e51c[_0x4a982a(0x2b8)]()!==_0x2312f4)this[_0x4a982a(0x2f8)][_0x4a982a(0x358)](_0x4a982a(0x2e7),_0x37e51c[_0x4a982a(0x2b8)](),_0x46892c);}async[_0x385291(0x278)](_0x2ecd71){const _0x24e864=_0x385291;var _0x4a7532;const _0x296e74=this[_0x24e864(0x2f8)][_0x24e864(0x384)](_0x24e864(0x2e7));if(!_0x296e74||!_0x2ecd71[_0x24e864(0x241)](_0x296e74)){const _0x1e41df=_0x2ecd71['getUnhiddenWorksheets']()[0x0],_0x28c179=_0x2ecd71[_0x24e864(0x241)](_0x1e41df);if(!_0x28c179)return;this[_0x24e864(0x320)](_0x28c179,!![]),await this[_0x24e864(0x2cc)][_0x24e864(0x224)](SetWorksheetActivateCommand['id'],{'unitId':_0x2ecd71[_0x24e864(0x1ce)](),'subUnitId':_0x1e41df});return;}if(((_0x4a7532=_0x2ecd71['getActiveSheet']())===null||_0x4a7532===void 0x0?void 0x0:_0x4a7532[_0x24e864(0x2b8)]())===_0x296e74)return;await this['_commandService'][_0x24e864(0x224)](SetWorksheetActivateCommand['id'],{'unitId':_0x2ecd71[_0x24e864(0x1ce)](),'subUnitId':_0x296e74});}};CollaborationDataLoaderController=__decorate([__decorateParam(0x0,IURLService),__decorateParam(0x1,ILogService),__decorateParam(0x2,ICommandService),__decorateParam(0x3,Inject(DataLoaderService)),__decorateParam(0x4,Optional(IRemoteInstanceService))],CollaborationDataLoaderController);var name=_0x385291(0x296),version=_0x385291(0x214);let ImagePasteController=class ImagePasteController extends RxDisposable{constructor(_0xb7fa6b,_0x1a146d){const _0x1b7402=_0x385291;super(),this[_0x1b7402(0x37b)]=_0xb7fa6b,this[_0x1b7402(0x1ff)]=_0x1a146d,this[_0x1b7402(0x1d2)]();}[_0x385291(0x1d2)](){const _0x48dba2=_0x385291,_0x13390b=this;this[_0x48dba2(0x21f)](this[_0x48dba2(0x37b)][_0x48dba2(0x3a5)]({'onBeforePasteImage':async _0x3a8fb4=>{const _0x11e7bd=_0x48dba2,_0x32e6d0=await _0x13390b[_0x11e7bd(0x1ff)]['saveImage'](_0x3a8fb4);if(_0x32e6d0)return{'source':_0x32e6d0['source'],'imageSourceType':_0x32e6d0['imageSourceType']};return null;}}));}};ImagePasteController=__decorate([__decorateParam(0x0,IDocClipboardService),__decorateParam(0x1,IImageIoService)],ImagePasteController);function _0x2feb(_0x430f45,_0x295e1c){_0x430f45=_0x430f45-0x1a6;const _0xdf9198=_0xdf91();let _0x2febbd=_0xdf9198[_0x430f45];return _0x2febbd;}const BACKGROUND_TOKENS=[_0x385291(0x1c0),_0x385291(0x2b3),_0x385291(0x230),_0x385291(0x2cd),_0x385291(0x1df),'yellow.400'];var ColorAssignService=class extends Disposable{constructor(..._0x4d7379){const _0x44fda3=_0x385291;super(..._0x4d7379),_defineProperty(this,_0x44fda3(0x1b7),new Map()),_defineProperty(this,_0x44fda3(0x2fa),0x0);}[_0x385291(0x262)](_0x974b83){const _0x34c5f3=_0x385291;if(this[_0x34c5f3(0x1b7)][_0x34c5f3(0x333)](_0x974b83))return this[_0x34c5f3(0x1b7)][_0x34c5f3(0x212)](_0x974b83);const _0x32e8e5=BACKGROUND_TOKENS[this['_colorIndex']];return this[_0x34c5f3(0x2fa)]=(this[_0x34c5f3(0x2fa)]+0x1)%BACKGROUND_TOKENS['length'],this['_assignedColors'][_0x34c5f3(0x222)](_0x974b83,_0x32e8e5),_0x32e8e5;}};function serializeDocTextRanges(_0x30e952){let _0x40f180='';for(const _0x2028f2 of _0x30e952){const {startOffset:_0x2320b6,endOffset:_0x52adef,isActive:_0x4e1b1c,rangeType:_0x137c7d,segmentId:_0x12c574,segmentPage:_0x16611a}=_0x2028f2;if(_0x40f180['length'])_0x40f180+=',';_0x40f180+=_0x2320b6+':'+_0x52adef+':'+(_0x4e1b1c?'1':'0')+':'+_0x137c7d+':'+_0x12c574+':'+_0x16611a;}return _0x40f180;}function deserializeDocTextRanges(_0x990428){const _0xa86e22=_0x385291,_0x231524=_0x990428[_0xa86e22(0x38d)](','),_0x5a8f1d=[];for(const _0x363529 of _0x231524){const [_0x4be82e,_0x371db7,_0x56e150,_0x3ccbab,_0x5818da,_0x536bab]=_0x363529[_0xa86e22(0x38d)](':');_0x5a8f1d[_0xa86e22(0x1fb)]({'startOffset':Number(_0x4be82e),'endOffset':Number(_0x371db7),'collapsed':_0x4be82e===_0x371db7,'isActive':_0x56e150==='1','rangeType':_0x3ccbab===DOC_RANGE_TYPE[_0xa86e22(0x383)]?DOC_RANGE_TYPE[_0xa86e22(0x383)]:DOC_RANGE_TYPE[_0xa86e22(0x35b)],'segmentId':typeof _0x5818da==='string'?String(_0x5818da):'','segmentPage':Number(_0x536bab!==null&&_0x536bab!==void 0x0?_0x536bab:-0x1)});}if(!_0x5a8f1d[_0xa86e22(0x305)](_0x3d3814=>_0x3d3814[_0xa86e22(0x25d)]))_0x5a8f1d[0x0][_0xa86e22(0x25d)]=!![];return _0x5a8f1d;}var DocSyncEditingCollabCursorService=class extends RxDisposable{constructor(..._0x4f26c7){const _0x390680=_0x385291;super(..._0x4f26c7),_defineProperty(this,'_collabCursorState$',new BehaviorSubject(null)),_defineProperty(this,_0x390680(0x386),this[_0x390680(0x352)][_0x390680(0x2d3)]());}[_0x385291(0x321)](_0xdd6d33){const _0x3fb6a6=_0x385291,{unitID:_0x5d6615,memberID:_0x7a3515,textRanges:_0x344e9a}=_0xdd6d33,_0x2e22a2=serializeDocTextRanges(_0x344e9a);if(_0x2e22a2==='')return;const _0x5e84b1={'unitID':_0x5d6615,'memberID':_0x7a3515,'selection':_0x2e22a2};this[_0x3fb6a6(0x352)][_0x3fb6a6(0x1bb)](_0x5e84b1);}};const DEBOUNCE_TIME$1=0x12c,SHARE_LOCAL_DEBOUNCE_TIME$1=0x64;let DocCollabCursorEntity=class DocCollabCursorEntity extends RxDisposable{get[_0x385291(0x1bf)](){const _0x146084=_0x385291;return this[_0x146084(0x23c)][_0x146084(0x323)]();}get[_0x385291(0x353)](){const _0x15a27b=_0x385291;return this['_roomMembers$'][_0x15a27b(0x323)]();}constructor(_0x25c9a3,_0x31f519,_0x1cb4cf,_0x305af0,_0x5918e2,_0x4af974,_0x444bf7,_0x587783,_0x29366f){const _0x24a185=_0x385291;super(),this['unitID']=_0x25c9a3,this['_session']=_0x31f519,this['_injector']=_0x1cb4cf,this[_0x24a185(0x21c)]=_0x305af0,this[_0x24a185(0x270)]=_0x5918e2,this['_syncEditingCollabCursorService']=_0x4af974,this[_0x24a185(0x23f)]=_0x444bf7,this['_univerInstanceService']=_0x587783,this['_commandService']=_0x29366f,_defineProperty(this,'_online',![]),_defineProperty(this,_0x24a185(0x1d2),![]),_defineProperty(this,_0x24a185(0x23c),new BehaviorSubject(new Map())),_defineProperty(this,_0x24a185(0x29a),this[_0x24a185(0x23c)][_0x24a185(0x2d3)]()),_defineProperty(this,_0x24a185(0x2de),new BehaviorSubject([])),_defineProperty(this,_0x24a185(0x1cb),this[_0x24a185(0x2de)][_0x24a185(0x1e6)](debounceTime(DEBOUNCE_TIME$1))),_defineProperty(this,_0x24a185(0x20d),debounce(_0x2f25c4=>{const _0x5ab62d=_0x24a185,_0x15fcef={'eventID':CollaborationEvent[_0x5ab62d(0x2ce)],'data':{'unitID':this['unitID'],'memberID':this['_session'][_0x5ab62d(0x1f8)](),'selection':serializeDocTextRanges(_0x2f25c4)}};this[_0x5ab62d(0x1a7)][_0x5ab62d(0x329)](_0x15fcef,this[_0x5ab62d(0x2e4)]);},SHARE_LOCAL_DEBOUNCE_TIME$1));}[_0x385291(0x272)](){const _0xd8d481=_0x385291;super[_0xd8d481(0x272)](),this[_0xd8d481(0x23c)][_0xd8d481(0x1bb)](new Map()),this[_0xd8d481(0x23c)]['complete'](),this[_0xd8d481(0x2de)][_0xd8d481(0x1bb)]([]),this[_0xd8d481(0x2de)][_0xd8d481(0x37c)]();}[_0x385291(0x1d1)](){const _0x1bb7bb=_0x385291;if(this[_0x1bb7bb(0x1d2)])return;this[_0x1bb7bb(0x1d2)]=!![],this[_0x1bb7bb(0x1a7)]['sessionStatus$'][_0x1bb7bb(0x1e6)](takeUntil(this[_0x1bb7bb(0x2d2)]))[_0x1bb7bb(0x36d)](_0x27b65e=>{const _0x4eb549=_0x1bb7bb;if(_0x27b65e===SessionStatus['ONLINE'])this[_0x4eb549(0x24d)]();else this[_0x4eb549(0x336)]();}),this[_0x1bb7bb(0x1a7)][_0x1bb7bb(0x251)][_0x1bb7bb(0x1e6)](takeUntil(this[_0x1bb7bb(0x2d2)]))[_0x1bb7bb(0x36d)](_0x4f5991=>{const _0x1ee627=_0x1bb7bb,_0x493949=_0x4f5991['eventID'];if(_0x493949===CollaborationEvent[_0x1ee627(0x2ce)])this[_0x1ee627(0x2fe)](_0x4f5991);if(_0x493949===CollaborationEvent[_0x1ee627(0x1b3)])this['_onCursorDelete'](_0x4f5991);}),this[_0x1bb7bb(0x21f)](this[_0x1bb7bb(0x2cc)][_0x1bb7bb(0x295)](_0x101852=>{const _0x4a9925=_0x1bb7bb,_0x52e85e=_0x101852[_0x4a9925(0x1db)];if(_0x52e85e==null)return;if(this[_0x4a9925(0x269)]&&_0x101852['id']===SetTextSelectionsOperation['id']&&_0x52e85e[_0x4a9925(0x34d)]===this[_0x4a9925(0x2e4)]&&_0x52e85e[_0x4a9925(0x2b9)]===![]&&_0x52e85e[_0x4a9925(0x32f)]['length']>0x0)this['_updateLocalCursor'](_0x52e85e[_0x4a9925(0x32f)]);})),this[_0x1bb7bb(0x2d8)]['collabCursorState$'][_0x1bb7bb(0x1e6)](takeUntil(this[_0x1bb7bb(0x2d2)]))[_0x1bb7bb(0x36d)](_0x5d822a=>{const _0x3ec3c3=_0x1bb7bb;if((_0x5d822a===null||_0x5d822a===void 0x0?void 0x0:_0x5d822a['unitID'])!==this[_0x3ec3c3(0x2e4)])return;const _0x36a650={'eventID':CollaborationEvent[_0x3ec3c3(0x2ce)],'data':_0x5d822a};this[_0x3ec3c3(0x2fe)](_0x36a650);}),this[_0x1bb7bb(0x21f)](this['_commandService'][_0x1bb7bb(0x295)](_0xf72523=>{const _0x2518a2=_0x1bb7bb;if(_0xf72523['params']==null)return;const _0x2cc7c9=_0xf72523['params'];if(_0xf72523['id']!==RichTextEditingMutation['id']||_0x2cc7c9['unitId']!==this[_0x2518a2(0x2e4)])return;const _0x373afc={'id':_0x2518a2(0x2be),'params':_0x2cc7c9},_0x247301=this[_0x2518a2(0x1bf)];for(const [_0x8d7ccb,_0xf4ac1b]of _0x247301){const _0x287f51={'id':_0x2518a2(0x2be),'params':{'unitId':this[_0x2518a2(0x2e4)],'actions':null,'textRanges':_0xf4ac1b[_0x2518a2(0x32f)]}},_0x59e957=this[_0x2518a2(0x23f)][_0x2518a2(0x226)](_0x373afc,_0x287f51,![]);if(isTransformMutationFailure(_0x59e957))throw _0x59e957[_0x2518a2(0x32c)];_0x247301['set'](_0x8d7ccb,{..._0xf4ac1b,'ranges':_0x59e957[_0x2518a2(0x3b8)][_0x2518a2(0x1db)][_0x2518a2(0x1c5)]});}queueMicrotask(()=>{const _0x5375a9=_0x2518a2;this[_0x5375a9(0x23c)]['next'](_0x247301);});}));}['_onCursorUpdate'](_0x7fdbd1){const _0x2f3189=_0x385291;var _0x3de0cc,_0x49acfd;const {memberID:_0x7739d7,selection:_0x2529d3}=_0x7fdbd1[_0x2f3189(0x1e5)],_0x300331=deserializeDocTextRanges(_0x2529d3),_0x1d6003=(_0x3de0cc=(_0x49acfd=this['_memberService'][_0x2f3189(0x2a7)](this[_0x2f3189(0x2e4)],_0x7739d7))===null||_0x49acfd===void 0x0?void 0x0:_0x49acfd[_0x2f3189(0x2ed)])!==null&&_0x3de0cc!==void 0x0?_0x3de0cc:_0x2f3189(0x318),_0x269b0d={'color':this['_colorAssignService'][_0x2f3189(0x262)](_0x7739d7),'name':_0x1d6003,'ranges':_0x300331},_0x5354cd=this[_0x2f3189(0x1bf)];_0x5354cd['set'](_0x7739d7,_0x269b0d),this[_0x2f3189(0x23c)][_0x2f3189(0x1bb)](_0x5354cd);}[_0x385291(0x399)](_0x2b88bb){const _0x5886ec=_0x385291,{memberID:_0x367a74}=_0x2b88bb[_0x5886ec(0x1e5)],_0x127f39=this[_0x5886ec(0x1bf)];_0x127f39[_0x5886ec(0x282)](_0x367a74),this['_cursorInfo$'][_0x5886ec(0x1bb)](_0x127f39);}['_toggleOnline'](){const _0x80420f=_0x385291;var _0x328cf1;this[_0x80420f(0x269)]=!![];if(((_0x328cf1=this[_0x80420f(0x1ed)][_0x80420f(0x1bd)]())===null||_0x328cf1===void 0x0?void 0x0:_0x328cf1[_0x80420f(0x1ce)]())!==this[_0x80420f(0x2e4)])return;const _0x5df627=this[_0x80420f(0x1b9)]['get'](DocSelectionManagerService)[_0x80420f(0x391)]();if(Array['isArray'](_0x5df627)&&_0x5df627[_0x80420f(0x287)]>0x0)this[_0x80420f(0x20d)](_0x5df627);}[_0x385291(0x336)](){const _0xf29857=_0x385291;this[_0xf29857(0x269)]=![];}};DocCollabCursorEntity=__decorate([__decorateParam(0x2,Inject(Injector)),__decorateParam(0x3,Inject(ColorAssignService)),__decorateParam(0x4,Inject(MemberService)),__decorateParam(0x5,Inject(DocSyncEditingCollabCursorService)),__decorateParam(0x6,ITransformService),__decorateParam(0x7,IUniverInstanceService),__decorateParam(0x8,ICommandService)],DocCollabCursorEntity);const DEBOUNCE_TIME=0x12c,SHARE_LOCAL_DEBOUNCE_TIME=0x64,createNextTick=()=>{let _0x944105=[],_0x358582=![];return _0x15b9f4=>{const _0x3fc65d=_0x2feb;_0x944105[_0x3fc65d(0x1fb)](_0x15b9f4),!_0x358582&&(_0x358582=!![],setTimeout(()=>{const _0x373dd9=_0x3fc65d;_0x944105[_0x373dd9(0x1ef)](_0x2b1e44=>_0x2b1e44()),_0x944105=[],_0x358582=![];}));};};let SheetCollabCursorEntity=class SheetCollabCursorEntity extends RxDisposable{get[_0x385291(0x1bf)](){const _0x57d123=_0x385291;return this[_0x57d123(0x23c)][_0x57d123(0x323)]();}get['roomMembers'](){const _0x48568d=_0x385291;return this[_0x48568d(0x2de)][_0x48568d(0x323)]();}constructor(_0x216067,_0xc3d70,_0x2bbe0d,_0xa53b81,_0x3f6aff,_0xbbbe4,_0x6216ee,_0x3c426a){const _0x42cd4d=_0x385291;super(),this[_0x42cd4d(0x2e4)]=_0x216067,this[_0x42cd4d(0x1a7)]=_0xc3d70,this['_injector']=_0x2bbe0d,this[_0x42cd4d(0x21c)]=_0xa53b81,this[_0x42cd4d(0x270)]=_0x3f6aff,this[_0x42cd4d(0x1ed)]=_0xbbbe4,this[_0x42cd4d(0x2cc)]=_0x6216ee,this[_0x42cd4d(0x2e2)]=_0x3c426a,_defineProperty(this,_0x42cd4d(0x269),![]),_defineProperty(this,'_init',![]),_defineProperty(this,_0x42cd4d(0x23c),new BehaviorSubject(new Map())),_defineProperty(this,'cursorInfo$',this['_cursorInfo$'][_0x42cd4d(0x2d3)]()),_defineProperty(this,_0x42cd4d(0x2de),new BehaviorSubject([])),_defineProperty(this,_0x42cd4d(0x1cb),this[_0x42cd4d(0x2de)][_0x42cd4d(0x1e6)](debounceTime(DEBOUNCE_TIME))),_defineProperty(this,_0x42cd4d(0x20d),debounce((_0x31ff11,_0x1fabc2)=>{const _0x2e8a8c=_0x42cd4d,_0xe1c21={'eventID':CollaborationEvent[_0x2e8a8c(0x2ce)],'data':{'unitID':this[_0x2e8a8c(0x2e4)],'memberID':this[_0x2e8a8c(0x1a7)][_0x2e8a8c(0x1f8)](),'selection':serializeRangeWithSheet(_0x31ff11,_0x1fabc2['range'])}};this['_session'][_0x2e8a8c(0x329)](_0xe1c21,this[_0x2e8a8c(0x2e4)]);},SHARE_LOCAL_DEBOUNCE_TIME));}[_0x385291(0x272)](){const _0x41c996=_0x385291;super[_0x41c996(0x272)](),this['_cursorInfo$'][_0x41c996(0x1bb)](new Map()),this['_cursorInfo$'][_0x41c996(0x37c)](),this[_0x41c996(0x2de)][_0x41c996(0x1bb)]([]),this[_0x41c996(0x2de)][_0x41c996(0x37c)]();}[_0x385291(0x1d1)](){const _0x320b21=_0x385291;if(this['_init'])return;this['_init']=!![],this['_session']['sessionStatus$'][_0x320b21(0x1e6)](takeUntil(this[_0x320b21(0x2d2)]))[_0x320b21(0x36d)](_0x516255=>{const _0x426557=_0x320b21;if(_0x516255===SessionStatus[_0x426557(0x2b2)])this['_toggleOnline']();else this[_0x426557(0x336)]();}),this['_session'][_0x320b21(0x251)][_0x320b21(0x1e6)](takeUntil(this[_0x320b21(0x2d2)]))['subscribe'](_0x17e076=>{const _0x4ab437=_0x320b21,_0x132e0=_0x17e076['eventID'];if(_0x132e0===CollaborationEvent['UPDATE_CURSOR'])this[_0x4ab437(0x2fe)](_0x17e076);if(_0x132e0===CollaborationEvent[_0x4ab437(0x1b3)])this['_onCursorDelete'](_0x17e076);}),this['_onRefRangeChange'](),this[_0x320b21(0x21f)](this[_0x320b21(0x2cc)]['onCommandExecuted'](_0x304737=>{const _0x44fbd1=_0x320b21;if(this['_online']&&_0x304737['id']===SetSelectionsOperation['id']&&_0x304737[_0x44fbd1(0x1db)][_0x44fbd1(0x34d)]===this[_0x44fbd1(0x2e4)]){const _0x46d808=_0x304737[_0x44fbd1(0x1db)];this[_0x44fbd1(0x20d)](_0x46d808['subUnitId'],_0x46d808[_0x44fbd1(0x284)][0x0]);}}));}[_0x385291(0x2fe)](_0x160ace){const _0x3521a2=_0x385291;var _0xaff412,_0x335393;const {memberID:_0x14ec1b,selection:_0x9daf52}=_0x160ace[_0x3521a2(0x1e5)],{sheetName:_0x448845,range:_0x516bfd}=deserializeRangeWithSheet(_0x9daf52),_0x50a89b={'name':(_0xaff412=(_0x335393=this[_0x3521a2(0x270)][_0x3521a2(0x2a7)](this[_0x3521a2(0x2e4)],_0x14ec1b))===null||_0x335393===void 0x0?void 0x0:_0x335393[_0x3521a2(0x2ed)])!==null&&_0xaff412!==void 0x0?_0xaff412:'Unknown\x20user','range':this[_0x3521a2(0x335)](_0x448845,_0x516bfd),'sheetID':_0x448845,'color':this[_0x3521a2(0x21c)][_0x3521a2(0x262)](_0x14ec1b),'selection':_0x9daf52},_0x4afb82=this['cursorInfo'];_0x4afb82[_0x3521a2(0x222)](_0x14ec1b,_0x50a89b),this[_0x3521a2(0x23c)]['next'](_0x4afb82);}[_0x385291(0x399)](_0x55c812){const _0x1367f0=_0x385291,{memberID:_0x5a43e1}=_0x55c812[_0x1367f0(0x1e5)],_0x2bff40=this[_0x1367f0(0x1bf)];_0x2bff40[_0x1367f0(0x282)](_0x5a43e1),this[_0x1367f0(0x23c)]['next'](_0x2bff40);}[_0x385291(0x335)](_0x4fd953,_0x245985){const _0x48c884=_0x385291;var _0x3ce108;const _0x350a39=(_0x3ce108=this['_univerInstanceService']['getUniverSheetInstance'](this[_0x48c884(0x2e4)]))===null||_0x3ce108===void 0x0||(_0x3ce108=_0x3ce108[_0x48c884(0x241)](_0x4fd953))===null||_0x3ce108===void 0x0?void 0x0:_0x3ce108[_0x48c884(0x1c1)]();return(_0x350a39===null||_0x350a39===void 0x0?void 0x0:_0x350a39['find'](_0x5a1c6e=>Rectangle['contains'](_0x5a1c6e,_0x245985)))||_0x245985;}[_0x385291(0x39e)](){const _0x4a6a13=_0x385291,_0x1f55d1=new DisposableCollection(),_0x2ba155=createNextTick(),_0x111d49=()=>{const _0x432cd6=_0x2feb;_0x1f55d1[_0x432cd6(0x272)]();const _0x1f1867=(_0x2c10fc,_0x186160,_0x318385,_0xb7645f)=>{const _0x577a5e=_0x432cd6;let _0x5df8e0=[];switch(_0x2c10fc['id']){case EffectRefRangId[_0x577a5e(0x31f)]:_0x5df8e0=handleDeleteRangeMoveLeft(_0x2c10fc,_0xb7645f);break;case EffectRefRangId[_0x577a5e(0x1d4)]:_0x5df8e0=handleDeleteRangeMoveUp(_0x2c10fc,_0xb7645f);break;case EffectRefRangId[_0x577a5e(0x2c4)]:_0x5df8e0=handleInsertCol(_0x2c10fc,_0xb7645f);break;case EffectRefRangId[_0x577a5e(0x359)]:_0x5df8e0=handleInsertRangeMoveDown(_0x2c10fc,_0xb7645f);break;case EffectRefRangId[_0x577a5e(0x1de)]:_0x5df8e0=handleInsertRangeMoveRight(_0x2c10fc,_0xb7645f);break;case EffectRefRangId[_0x577a5e(0x260)]:_0x5df8e0=handleInsertRow(_0x2c10fc,_0xb7645f);break;case EffectRefRangId[_0x577a5e(0x1d9)]:_0x5df8e0=handleMoveRange(_0x2c10fc,_0xb7645f);break;case EffectRefRangId[_0x577a5e(0x379)]:_0x5df8e0=handleIRemoveCol(_0x2c10fc,_0xb7645f);break;case EffectRefRangId['RemoveRowCommandId']:_0x5df8e0=handleIRemoveRow(_0x2c10fc,_0xb7645f);break;}const _0xea137a=runRefRangeMutations(_0x5df8e0,_0xb7645f),_0x57d700=this['cursorInfo'][_0x577a5e(0x212)](_0x186160);if(_0x57d700&&_0xea137a){const _0x58d4a7={..._0x57d700,'range':_0xea137a};this[_0x577a5e(0x1bf)]['set'](_0x186160,_0x58d4a7),_0x2ba155(()=>{const _0x4a2488=_0x577a5e,_0x4b8469=this[_0x4a2488(0x2e2)][_0x4a2488(0x1f2)](_0xea137a,_0x1df839=>{const _0x3e2403=_0x4a2488;return _0x4b8469[_0x3e2403(0x272)](),_0x1f1867(_0x1df839,_0x186160,_0x318385,_0xea137a);});_0x1f55d1[_0x4a2488(0x26a)](_0x4b8469);});}return{'redos':[],'undos':[]};};this[_0x432cd6(0x1bf)][_0x432cd6(0x1ef)]((_0x14c0ae,_0x563eed)=>{const _0x2fd379=_0x432cd6,{range:_0x590d9b,sheetID:_0x39bf9a}=_0x14c0ae,_0x2d655c=this[_0x2fd379(0x2e2)][_0x2fd379(0x1f2)](_0x590d9b,_0x723555=>{return _0x2d655c['dispose'](),_0x1f1867(_0x723555,_0x563eed,_0x39bf9a,_0x590d9b);});_0x1f55d1[_0x2fd379(0x26a)](_0x2d655c);});};this['disposeWithMe'](toDisposable(this['_cursorInfo$'][_0x4a6a13(0x36d)](()=>{_0x111d49();})));}['_toggleOnline'](){const _0x4d128f=_0x385291;var _0x20d7ae,_0xea2dff;this[_0x4d128f(0x269)]=!![];if(((_0x20d7ae=this['_univerInstanceService'][_0x4d128f(0x1bd)]())===null||_0x20d7ae===void 0x0?void 0x0:_0x20d7ae[_0x4d128f(0x1ce)]())!==this['unitID'])return;const _0x5c8f53=(_0xea2dff=this[_0x4d128f(0x1b9)][_0x4d128f(0x212)](SheetsSelectionsService)[_0x4d128f(0x2e5)]())===null||_0xea2dff===void 0x0?void 0x0:_0xea2dff[0x0],_0xb8b309=this[_0x4d128f(0x1ed)][_0x4d128f(0x1bc)](UniverInstanceType[_0x4d128f(0x36e)])[_0x4d128f(0x376)]();if(_0x5c8f53&&_0xb8b309)this[_0x4d128f(0x20d)](_0xb8b309['getSheetId'](),_0x5c8f53);}[_0x385291(0x336)](){const _0x2a7f6c=_0x385291;this[_0x2a7f6c(0x269)]=![];}};SheetCollabCursorEntity=__decorate([__decorateParam(0x2,Inject(Injector)),__decorateParam(0x3,Inject(ColorAssignService)),__decorateParam(0x4,Inject(MemberService)),__decorateParam(0x5,IUniverInstanceService),__decorateParam(0x6,ICommandService),__decorateParam(0x7,Inject(RefRangeService))],SheetCollabCursorEntity);let CollabCursorController=class CollabCursorController extends RxDisposable{constructor(_0xbb103,_0x362473,_0x46324c){const _0x2f03d5=_0x385291;super(),this['_univerInstanceService']=_0xbb103,this['_injector']=_0x362473,this['_collabSessionService']=_0x46324c,_defineProperty(this,'_entities',new Map()),_defineProperty(this,'_entityInit$',new Subject()),this[_0x2f03d5(0x1d2)]();}[_0x385291(0x272)](){const _0xcccd0b=_0x385291;super[_0xcccd0b(0x272)](),this[_0xcccd0b(0x331)][_0xcccd0b(0x37c)](),this['_entities'][_0xcccd0b(0x1ef)](_0x1a6505=>_0x1a6505[_0xcccd0b(0x272)]());}[_0x385291(0x244)](_0x5c6aa5){const _0x30e2fa=_0x385291;if(this[_0x30e2fa(0x3ab)][_0x30e2fa(0x333)](_0x5c6aa5))return this['_entities'][_0x30e2fa(0x212)](_0x5c6aa5)[_0x30e2fa(0x29a)];return this[_0x30e2fa(0x331)][_0x30e2fa(0x1e6)](filter(_0x4f4e4e=>_0x4f4e4e[_0x30e2fa(0x2e4)]===_0x5c6aa5),switchMap(_0x287b86=>_0x287b86[_0x30e2fa(0x29a)]));}[_0x385291(0x1d2)](){const _0x64c95f=_0x385291;this[_0x64c95f(0x1ed)]['getTypeOfUnitAdded$'](UniverInstanceType[_0x64c95f(0x36e)])['pipe'](takeUntil(this[_0x64c95f(0x2d2)]))[_0x64c95f(0x36d)](async _0x4917d3=>{const _0x29b4f0=_0x64c95f,_0x2f765b=_0x4917d3[_0x29b4f0(0x233)]['getUnitId'](),_0xd256a7=await this['_startSheetCollabCursor'](_0x2f765b);this[_0x29b4f0(0x331)]['next'](_0xd256a7),this[_0x29b4f0(0x3ab)]['set'](_0x2f765b,_0xd256a7);}),this[_0x64c95f(0x1ed)][_0x64c95f(0x23b)](UniverInstanceType[_0x64c95f(0x294)])[_0x64c95f(0x1e6)](takeUntil(this['dispose$']))[_0x64c95f(0x1e6)](filter(_0x557586=>{const _0x161768=_0x64c95f;return!_0x557586[_0x161768(0x233)]['getUnitId']()[_0x161768(0x220)]('__');}))[_0x64c95f(0x36d)](async _0xb26907=>{const _0x255cee=_0x64c95f,{unit:_0xfe88b7}=_0xb26907,_0x306bf1=_0xfe88b7[_0x255cee(0x1ce)](),_0x4d4799=await this[_0x255cee(0x3aa)](_0x306bf1);this[_0x255cee(0x331)][_0x255cee(0x1bb)](_0x4d4799),this[_0x255cee(0x3ab)]['set'](_0x306bf1,_0x4d4799);}),_0x3c0893(this[_0x64c95f(0x1ed)][_0x64c95f(0x31e)](UniverInstanceType[_0x64c95f(0x294)]),this[_0x64c95f(0x1ed)][_0x64c95f(0x31e)](UniverInstanceType[_0x64c95f(0x36e)]))[_0x64c95f(0x1e6)](takeUntil(this[_0x64c95f(0x2d2)]))[_0x64c95f(0x36d)](_0x5ef996=>{const _0x229842=_0x64c95f,_0x19eb97=_0x5ef996[_0x229842(0x1ce)](),_0x2a1431=this[_0x229842(0x3ab)]['get'](_0x19eb97);_0x2a1431&&(_0x2a1431[_0x229842(0x272)](),this[_0x229842(0x3ab)][_0x229842(0x282)](_0x19eb97));});}async[_0x385291(0x395)](_0x2bcec4){const _0x3c31f6=_0x385291,_0x90487e=await this[_0x3c31f6(0x1fa)][_0x3c31f6(0x1b4)](_0x2bcec4),_0x13558c=this[_0x3c31f6(0x1b9)][_0x3c31f6(0x33c)](SheetCollabCursorEntity,_0x2bcec4,_0x90487e);return _0x13558c['init'](),_0x13558c;}async[_0x385291(0x3aa)](_0x2f590a){const _0x4d66a4=_0x385291,_0x2f9cb5=await this[_0x4d66a4(0x1fa)][_0x4d66a4(0x1b4)](_0x2f590a),_0x21f835=this['_injector'][_0x4d66a4(0x33c)](DocCollabCursorEntity,_0x2f590a,_0x2f9cb5);return _0x21f835[_0x4d66a4(0x1d1)](),_0x21f835;}};CollabCursorController=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,Inject(CollaborationSessionService))],CollabCursorController);const COLLAB_CURSOR_LABEL_HEIGHT=0x14,COLLAB_CURSOR_LABEL_MAX_WIDTH=0xc8,COLLAB_CURSOR_LABEL_TEXT_PADDING_LR=0x4,COLLAB_CURSOR_LABEL_TEXT_PADDING_TB=0x5;function drawBubble(_0x5df04a,_0x4232f6){const _0x1b2a54=_0x385291;var _0xd6b3e4,_0x2d5ae6,_0x229cb9;let {radius:_0x2ee3fc,width:_0x5098cf,height:_0x3e6e9b}=_0x4232f6;_0x2ee3fc=(_0xd6b3e4=_0x2ee3fc)!==null&&_0xd6b3e4!==void 0x0?_0xd6b3e4:0x0,_0x5098cf=(_0x2d5ae6=_0x5098cf)!==null&&_0x2d5ae6!==void 0x0?_0x2d5ae6:0x1e,_0x3e6e9b=(_0x229cb9=_0x3e6e9b)!==null&&_0x229cb9!==void 0x0?_0x229cb9:0x1e;let _0x5a112a=0x0,_0x4816e6=0x0,_0x172540=0x0;_0x5a112a=_0x4816e6=_0x172540=Math[_0x1b2a54(0x29d)](_0x2ee3fc,_0x5098cf/0x2,_0x3e6e9b/0x2),_0x5df04a['beginPath'](),_0x5df04a[_0x1b2a54(0x3c7)](_0x5a112a,0x0),_0x5df04a['lineTo'](_0x5098cf-_0x4816e6,0x0),_0x5df04a[_0x1b2a54(0x39b)](_0x5098cf-_0x4816e6,_0x4816e6,_0x4816e6,Math['PI']*0x3/0x2,0x0,![]),_0x5df04a[_0x1b2a54(0x26f)](_0x5098cf,_0x3e6e9b-_0x172540),_0x5df04a['arc'](_0x5098cf-_0x172540,_0x3e6e9b-_0x172540,_0x172540,0x0,Math['PI']/0x2,![]),_0x5df04a[_0x1b2a54(0x26f)](0x0,_0x3e6e9b),_0x5df04a['lineTo'](0x0,_0x5a112a),_0x5df04a[_0x1b2a54(0x39b)](_0x5a112a,_0x5a112a,_0x5a112a,Math['PI'],Math['PI']*0x3/0x2,![]),_0x5df04a[_0x1b2a54(0x27a)]();if(_0x4232f6[_0x1b2a54(0x2f3)]){_0x5df04a[_0x1b2a54(0x36f)](),_0x5df04a[_0x1b2a54(0x1e0)]=_0x4232f6['fill'];if(_0x4232f6['fillRule']==='evenodd')_0x5df04a[_0x1b2a54(0x2f3)](_0x1b2a54(0x2ee));else _0x5df04a[_0x1b2a54(0x2f3)]();_0x5df04a[_0x1b2a54(0x22a)]();}}var TextBubbleShape=class TextBubbleShape extends Shape{constructor(_0x38b5c1,_0x14e3da){const _0x1a5ceb=_0x385291;super(_0x38b5c1,_0x14e3da),_defineProperty(this,_0x1a5ceb(0x252),void 0x0),_defineProperty(this,'text',void 0x0),this[_0x1a5ceb(0x252)]=_0x14e3da===null||_0x14e3da===void 0x0?void 0x0:_0x14e3da[_0x1a5ceb(0x252)],this['text']=_0x14e3da===null||_0x14e3da===void 0x0?void 0x0:_0x14e3da['text'];}static['drawWith'](_0x322817,_0x4857cc){const _0x4cc909=_0x385291,{text:_0x47db16,color:_0x342f10}=_0x4857cc;_0x322817[_0x4cc909(0x36f)](),_0x322817[_0x4cc909(0x33d)]=_0x4cc909(0x2ca);const _0x3c9833=_0x322817[_0x4cc909(0x3a3)](_0x47db16)[_0x4cc909(0x286)];drawBubble(_0x322817,{'height':0x14,'radius':0x4,'width':Math[_0x4cc909(0x29d)](_0x3c9833+0x2*0x4,0xc8),'fill':_0x342f10,'evented':![]}),_0x322817[_0x4cc909(0x1e0)]=_0x4cc909(0x277);const _0x1564a8=0x4,_0x5b7294=0x14-0x5,_0x1bff9f=0xc8-0x2*0x4;if(_0x3c9833>_0x1bff9f){let _0x51b278='',_0x3564ad=0x0;for(const _0x3707e9 of _0x47db16){const _0x2cfb6f=_0x322817['measureText'](_0x3707e9)['width'];if(_0x3564ad+_0x2cfb6f<=_0x1bff9f-_0x322817[_0x4cc909(0x3a3)](_0x4cc909(0x2dc))['width'])_0x51b278+=_0x3707e9,_0x3564ad+=_0x2cfb6f;else{_0x51b278+='...';break;}}_0x322817[_0x4cc909(0x324)](_0x51b278,_0x1564a8,_0x5b7294);}else _0x322817[_0x4cc909(0x324)](_0x47db16,_0x1564a8,_0x5b7294);_0x322817[_0x4cc909(0x22a)]();}['_draw'](_0x35742e){const _0x4bf97b=_0x385291;TextBubbleShape[_0x4bf97b(0x2bf)](_0x35742e,this);}};const COLLAB_TEXT_ANCHOR_KEY_PREFIX=_0x385291(0x3a9),COLLAB_TEXT_RANGE_KEY_PREFIX=_0x385291(0x33b),COLLAB_RECT_RANGE_KEY_PREFIX='collab-rect-range-',ID_LENGTH=0x6,COLLAB_TEXT_ANCHOR_WIDTH=1.5,COLLAB_TEXT_ANCHOR_DOT_WIDTH=0x4,SELECTION_CONTROL_BORDER_BUFFER_WIDTH=1.5,SELECTION_CONTROL_BORDER_BUFFER_COLOR='rgba(255,\x20255,\x20255,\x200.01)';var DocCollabCursor=class{constructor(_0xc17547,_0x638505,_0x561a35,_0x29e4d0){const _0x2c94ab=_0x385291;this[_0x2c94ab(0x216)]=_0xc17547,this[_0x2c94ab(0x1fc)]=_0x638505,this[_0x2c94ab(0x219)]=_0x561a35,this[_0x2c94ab(0x349)]=_0x29e4d0,_defineProperty(this,'_shapes',[]),_defineProperty(this,'_anchor',null),_defineProperty(this,'_textBubble',null),_defineProperty(this,_0x2c94ab(0x3b7),null),_defineProperty(this,_0x2c94ab(0x236),null),_defineProperty(this,'_eventUnsubscribe',null),this[_0x2c94ab(0x301)]();}set['_hover'](_0x9ca6f4){const _0x305d82=_0x385291;_0x9ca6f4?(this['_anchorDot']&&this[_0x305d82(0x3b7)][_0x305d82(0x350)](),this[_0x305d82(0x25e)]&&this[_0x305d82(0x25e)]['show']()):(this['_anchorDot']&&this[_0x305d82(0x3b7)]['show'](),this[_0x305d82(0x25e)]&&this['_textBubble'][_0x305d82(0x350)]());}[_0x385291(0x272)](){const _0x3755dc=_0x385291;for(const _0x171c26 of this[_0x3755dc(0x339)])_0x171c26['dispose']();if(this[_0x3755dc(0x25e)])this['_textBubble']['dispose']();if(this[_0x3755dc(0x3b7)])this[_0x3755dc(0x3b7)]['dispose']();if(this[_0x3755dc(0x2fb)])this[_0x3755dc(0x2fb)][_0x3755dc(0x272)]();if(this['_eventUnsubscribe'])this[_0x3755dc(0x3c4)]();}[_0x385291(0x301)](){const _0x2df18b=_0x385291,{_docSkeleton:_0xca1818,_document:_0x38d04c}=this,{color:_0x2cd706,name:_0x52e10f,ranges:_0x4fd14c}=this['_cursor'],_0x21d571=_0x38d04c[_0x2df18b(0x378)](),{docsLeft:_0x18f86a,docsTop:_0x49c6a6}=_0x21d571,_0x17486e=new NodePositionConvertToCursor(_0x21d571,_0xca1818);for(const {startOffset:_0x336ceb,endOffset:_0x1c068f,rangeType:_0x1ca6aa,segmentId:_0x255c62,segmentPage:_0x122bf9,collapsed:_0x1d2655,isActive:_0x244f32}of _0x4fd14c){const _0x2a69fc=_0xca1818[_0x2df18b(0x1b2)](_0x336ceb,!![],_0x255c62,_0x122bf9);let _0x14ba19=_0xca1818[_0x2df18b(0x1b2)](_0x1c068f,!![],_0x255c62,_0x122bf9);if(_0x14ba19==null)_0x14ba19=_0xca1818[_0x2df18b(0x1b2)](_0x1c068f-0x1,![],_0x255c62,_0x122bf9);if(_0x244f32){const {contentBoxPointGroup:_0x16b0a9}=_0x17486e['getRangePointData'](_0x14ba19,_0x14ba19);if(_0x16b0a9[_0x2df18b(0x287)]===0x0)continue;this[_0x2df18b(0x1dd)](_0x2cd706,_0x16b0a9,_0x18f86a,_0x49c6a6,_0x52e10f),this[_0x2df18b(0x3c4)]=this[_0x2df18b(0x34a)]();}if(_0x2a69fc&&_0x14ba19){if(_0x1ca6aa===DOC_RANGE_TYPE['RECT']){var _0xf275d0;const {pointGroup:_0x18c865}=(_0xf275d0=new NodePositionConvertToRectRange(_0x21d571,_0xca1818)[_0x2df18b(0x314)](_0x2a69fc,_0x14ba19))!==null&&_0xf275d0!==void 0x0?_0xf275d0:{};if(_0x18c865==null||_0x18c865[_0x2df18b(0x287)]===0x0)continue;this[_0x2df18b(0x375)](_0x2cd706,_0x18c865,_0x18f86a,_0x49c6a6);}else{if(!_0x1d2655){const {borderBoxPointGroup:_0x187df6}=_0x17486e['getRangePointData'](_0x2a69fc,_0x14ba19);if(_0x187df6['length']===0x0)continue;this[_0x2df18b(0x307)](_0x2cd706,_0x187df6,_0x18f86a,_0x49c6a6);}}}}}[_0x385291(0x1dd)](_0x3d09f2,_0x44fd12,_0x36b6d6,_0x5b2e1e,_0x14c7bc){const _0x1bdab1=_0x385291,{left:_0x5867ed,top:_0x3c8594,height:_0x5b8735}=this[_0x1bdab1(0x366)](_0x44fd12),_0xfbcaad=SELECTION_CONTROL_BORDER_BUFFER_WIDTH/this[_0x1bdab1(0x259)](),_0x229234=new Rect(COLLAB_TEXT_ANCHOR_KEY_PREFIX+generateRandomId(ID_LENGTH),{'left':_0x5867ed+_0x36b6d6-_0xfbcaad,'top':_0x3c8594+_0x5b2e1e,'height':_0x5b8735,'width':COLLAB_TEXT_ANCHOR_WIDTH,'fill':_0x3d09f2||getColor(COLORS['black'],0x0),'strokeWidth':_0xfbcaad,'stroke':SELECTION_CONTROL_BORDER_BUFFER_COLOR,'evented':!![]});this[_0x1bdab1(0x2fb)]=_0x229234,this[_0x1bdab1(0x1fc)][_0x1bdab1(0x3cc)](_0x229234,TEXT_RANGE_LAYER_INDEX);const _0x4c9b44=new Rect(COLLAB_TEXT_ANCHOR_KEY_PREFIX+generateRandomId(ID_LENGTH),{'left':_0x5867ed+_0x36b6d6-_0xfbcaad,'top':_0x3c8594+_0x5b2e1e-COLLAB_TEXT_ANCHOR_DOT_WIDTH/0x2,'height':COLLAB_TEXT_ANCHOR_DOT_WIDTH,'width':COLLAB_TEXT_ANCHOR_DOT_WIDTH,'fill':_0x3d09f2||getColor(COLORS[_0x1bdab1(0x2dd)],0x0),'strokeWidth':0x0,'stroke':_0x3d09f2||getColor(COLORS['black'],0x0),'evented':![]});this[_0x1bdab1(0x3b7)]=_0x4c9b44,this['_scene'][_0x1bdab1(0x3cc)](_0x4c9b44,TEXT_RANGE_LAYER_INDEX);const _0x2af18e=new TextBubbleShape(COLLAB_TEXT_ANCHOR_KEY_PREFIX+generateRandomId(ID_LENGTH),{'left':_0x5867ed+_0x36b6d6-_0xfbcaad,'top':_0x3c8594+_0x5b2e1e-0x14,'text':_0x14c7bc,'color':_0x3d09f2});this['_textBubble']=_0x2af18e,this[_0x1bdab1(0x1fc)]['addObject'](_0x2af18e,TEXT_RANGE_LAYER_INDEX),this[_0x1bdab1(0x308)]=![];}[_0x385291(0x34a)](){const _0xe5fc08=_0x385291,_0x1b9c4f=this[_0xe5fc08(0x2fb)][_0xe5fc08(0x3ad)][_0xe5fc08(0x275)](()=>{const _0x45f074=_0xe5fc08;this[_0x45f074(0x308)]=!![];}),_0x2fc846=this['_anchor']['onPointerLeave$'][_0xe5fc08(0x275)](()=>{const _0xc7fb2=_0xe5fc08;if(this[_0xc7fb2(0x236)])clearTimeout(this[_0xc7fb2(0x236)]);this[_0xc7fb2(0x236)]=setTimeout(()=>{this['_hover']=![];},0x7d0);});return()=>{const _0x2ef363=_0xe5fc08;_0x1b9c4f[_0x2ef363(0x2a5)](),_0x2fc846[_0x2ef363(0x2a5)]();};}['_drawTextRange'](_0x1c0f2f,_0x306d0d,_0x130b30,_0x4a74b7){const _0x2006b4=_0x385291,_0x1633aa=0.2,_0x40c0ed=new ColorKit(_0x1c0f2f)[_0x2006b4(0x3a0)](_0x1633aa)['toRgbString'](),_0x52b791=new RegularPolygon(COLLAB_TEXT_RANGE_KEY_PREFIX+generateRandomId(ID_LENGTH),{'pointsGroup':_0x306d0d,'fill':_0x40c0ed||getColor(COLORS[_0x2006b4(0x2dd)],_0x1633aa),'left':_0x130b30,'top':_0x4a74b7,'evented':![],'debounceParentDirty':![]});this[_0x2006b4(0x339)]['push'](_0x52b791),this['_scene'][_0x2006b4(0x3cc)](_0x52b791,TEXT_RANGE_LAYER_INDEX);}[_0x385291(0x375)](_0x19283f,_0x3fc6a0,_0x2e8125,_0x4bc067){const _0x5129fa=_0x385291,_0x1a79c1=0.2,_0x399341=new ColorKit(_0x19283f)['setAlpha'](_0x1a79c1)['toRgbString'](),_0x54787c=new RegularPolygon(COLLAB_RECT_RANGE_KEY_PREFIX+generateRandomId(ID_LENGTH),{'pointsGroup':_0x3fc6a0,'fill':_0x399341||getColor(COLORS[_0x5129fa(0x2dd)],_0x1a79c1),'left':_0x2e8125,'top':_0x4bc067,'evented':![],'debounceParentDirty':![]});this[_0x5129fa(0x339)][_0x5129fa(0x1fb)](_0x54787c),this[_0x5129fa(0x1fc)]['addObject'](_0x54787c,TEXT_RANGE_LAYER_INDEX);}['_getAnchorBounding'](_0x56c966){const _0x41b331=_0x56c966[0x0],_0x452b05=_0x41b331[0x0],_0x583ac1=_0x41b331[0x2],{x:_0x5acf3a,y:_0x36ee11}=_0x452b05,{x:_0x7c584f,y:_0x5989ff}=_0x583ac1;return{'left':_0x5acf3a,'top':_0x36ee11,'width':_0x7c584f-_0x5acf3a,'height':_0x5989ff-_0x36ee11};}[_0x385291(0x259)](){const _0x228f2d=_0x385291,{scaleX:_0x62b403,scaleY:_0x3e888a}=this[_0x228f2d(0x1fc)][_0x228f2d(0x26e)]();return Math[_0x228f2d(0x20b)](_0x62b403,_0x3e888a);}};let DocCollabCursorRenderController=class DocCollabCursorRenderController extends RxDisposable{constructor(_0x54366a,_0x5a390c,_0x5bd3e5,_0x45bc8e,_0x5a7157){const _0x3f9f0a=_0x385291;super(),this['_context']=_0x54366a,this[_0x3f9f0a(0x35f)]=_0x5a390c,this[_0x3f9f0a(0x35e)]=_0x5bd3e5,this[_0x3f9f0a(0x2cc)]=_0x45bc8e,this[_0x3f9f0a(0x3a6)]=_0x5a7157,_defineProperty(this,_0x3f9f0a(0x2d9),[]),_defineProperty(this,_0x3f9f0a(0x385),[]),this[_0x3f9f0a(0x1d2)]();}['_init'](){const _0x532737=_0x385291,_0x3d266d=this[_0x532737(0x347)][_0x532737(0x34d)],_0x3a92df=this[_0x532737(0x35f)];this['disposeWithMe'](combineLatest([this[_0x532737(0x35e)]['getCollabCursors$'](_0x3d266d),this[_0x532737(0x3a6)]['currentTheme$']])['pipe'](map(([_0x30ff03,_0xacc696])=>({'skeleton':_0x3a92df[_0x532737(0x289)](),'cursors':[..._0x30ff03[_0x532737(0x38b)]()][_0x532737(0x3b9)](_0x5207ca=>({..._0x5207ca,'color':this[_0x532737(0x3a6)][_0x532737(0x257)](_0x5207ca[_0x532737(0x252)])}))})))['subscribe'](_0x28bea8=>{const _0x1960cb=_0x532737;this['_removeCollabCursors']();if(_0x28bea8){const {skeleton:_0x5613ee,cursors:_0x3e1401}=_0x28bea8;this[_0x1960cb(0x32d)](_0x5613ee,_0x3e1401);}})),this[_0x532737(0x1c2)](),this[_0x532737(0x2f6)]();}[_0x385291(0x32d)](_0x4f9006,_0x55d147){const _0x2545cc=_0x385291,{scene:_0x417530,mainComponent:_0x45f3c0}=this[_0x2545cc(0x347)],_0x4f8d93=_0x55d147[_0x2545cc(0x24f)](_0x3232db=>new DocCollabCursor(_0x3232db,_0x417530,_0x4f9006,_0x45f3c0));this['_cursorShapes']=_0x4f8d93,this[_0x2545cc(0x385)]=_0x55d147;}[_0x385291(0x354)](){const _0x6c750d=_0x385291;this[_0x6c750d(0x397)]();const {scene:_0x533227,mainComponent:_0x3db5a1}=this['_context'],_0x22eb58=this[_0x6c750d(0x35f)][_0x6c750d(0x289)](),_0x4c1dbe=this[_0x6c750d(0x385)][_0x6c750d(0x24f)](_0x204f03=>new DocCollabCursor(_0x204f03,_0x533227,_0x22eb58,_0x3db5a1));this[_0x6c750d(0x2d9)]=_0x4c1dbe;}[_0x385291(0x397)](){const _0x24052c=_0x385291;this[_0x24052c(0x2d9)][_0x24052c(0x1ef)](_0xa867f1=>_0xa867f1[_0x24052c(0x272)]()),this['_cursorShapes']=[];}[_0x385291(0x2f6)](){const _0x18ad3d=_0x385291,_0x29efd7=[SetDocZoomRatioOperation['id']];this[_0x18ad3d(0x21f)](this['_commandService']['onCommandExecuted'](_0x1409b3=>{const _0x541973=_0x18ad3d;if(_0x29efd7[_0x541973(0x27b)](_0x1409b3['id'])&&_0x1409b3[_0x541973(0x1db)]['unitId']===this[_0x541973(0x347)][_0x541973(0x34d)])this[_0x541973(0x354)]();}));}[_0x385291(0x1c2)](){const _0x2fb2c6=_0x385291;this[_0x2fb2c6(0x21f)](fromEventSubject(this['_context'][_0x2fb2c6(0x1f1)][_0x2fb2c6(0x39c)])[_0x2fb2c6(0x1e6)](_0x38f1c2(_0x1e3fd6=>_0x1e3fd6['type']===TRANSFORM_CHANGE_OBSERVABLE_TYPE[_0x2fb2c6(0x30f)]),throttleTime(0x10))['subscribe'](()=>{const _0x132dad=_0x2fb2c6;this[_0x132dad(0x354)]();}));}};DocCollabCursorRenderController=__decorate([__decorateParam(0x1,Inject(DocSkeletonManagerService)),__decorateParam(0x2,Inject(CollabCursorController)),__decorateParam(0x3,ICommandService),__decorateParam(0x4,Inject(ThemeService))],DocCollabCursorRenderController);const SHEET_COLLAB_CURSOR_BORDER_WIDTH=1.5;var SheetCollabCursorShape=class extends Shape{constructor(_0x337f12,_0x39b1ef){const _0x32feee=_0x385291;super(_0x337f12,_0x39b1ef),_defineProperty(this,'_color',void 0x0),_defineProperty(this,_0x32feee(0x3b5),![]),_defineProperty(this,_0x32feee(0x316),void 0x0),_defineProperty(this,_0x32feee(0x38a),''),_defineProperty(this,'_labelPosition','top'),_defineProperty(this,_0x32feee(0x2a2),void 0x0),_defineProperty(this,_0x32feee(0x2d1),void 0x0),_defineProperty(this,_0x32feee(0x242),void 0x0),_defineProperty(this,_0x32feee(0x2b5),0x4),_defineProperty(this,_0x32feee(0x20a),void 0x0),_defineProperty(this,'_blinkIntervalTimer',void 0x0),_defineProperty(this,_0x32feee(0x263),!![]),_defineProperty(this,_0x32feee(0x327),0x0);if(_0x39b1ef){var _0x39af0f;this[_0x32feee(0x345)](_0x39b1ef);if(_0x39b1ef['highlight']&&((_0x39af0f=_0x39b1ef[_0x32feee(0x34b)])!==null&&_0x39af0f!==void 0x0?_0x39af0f:this[_0x32feee(0x2b5)])){var _0x3e485e;this['_startBlinking']((_0x3e485e=_0x39b1ef[_0x32feee(0x34b)])!==null&&_0x3e485e!==void 0x0?_0x3e485e:this[_0x32feee(0x2b5)]);}}this[_0x32feee(0x3ad)][_0x32feee(0x275)](()=>this[_0x32feee(0x345)]({'hovered':!![]})),this[_0x32feee(0x328)]['subscribeEvent'](()=>this[_0x32feee(0x345)]({'hovered':![]}));}[_0x385291(0x2f2)](_0x516604){const _0x541a79=_0x385291;this[_0x541a79(0x327)]=_0x516604;}['setShapeProps'](_0x4c7be2){const _0x259379=_0x385291;var _0x544a6d,_0x6b4c5e,_0x14830f,_0x187f35,_0x2b2035,_0x4eb01a,_0x56066c;this[_0x259379(0x3a7)]=(_0x544a6d=_0x4c7be2[_0x259379(0x252)])!==null&&_0x544a6d!==void 0x0?_0x544a6d:this[_0x259379(0x3a7)],this[_0x259379(0x3b5)]=(_0x6b4c5e=_0x4c7be2[_0x259379(0x223)])!==null&&_0x6b4c5e!==void 0x0?_0x6b4c5e:this[_0x259379(0x3b5)],this[_0x259379(0x316)]=(_0x14830f=_0x4c7be2[_0x259379(0x23e)])!==null&&_0x14830f!==void 0x0?_0x14830f:this['_range'],this['_name']=(_0x187f35=_0x4c7be2[_0x259379(0x2ed)])!==null&&_0x187f35!==void 0x0?_0x187f35:this[_0x259379(0x38a)],this[_0x259379(0x280)]=(_0x2b2035=_0x4c7be2[_0x259379(0x274)])!==null&&_0x2b2035!==void 0x0?_0x2b2035:this['_labelPosition'],this[_0x259379(0x2a2)]=(_0x4eb01a=_0x4c7be2['backgroundColor'])!==null&&_0x4eb01a!==void 0x0?_0x4eb01a:this[_0x259379(0x2a2)],this[_0x259379(0x2d1)]=(_0x56066c=_0x4c7be2[_0x259379(0x3ac)])!==null&&_0x56066c!==void 0x0?_0x56066c:this[_0x259379(0x2d1)];if(_0x4c7be2[_0x259379(0x34b)]!==void 0x0)this[_0x259379(0x2b5)]=_0x4c7be2['highlightSecond'];if(_0x4c7be2['highlight']!==void 0x0)this[_0x259379(0x242)]=_0x4c7be2[_0x259379(0x2ea)];if(_0x4c7be2[_0x259379(0x268)]!==void 0x0)this[_0x259379(0x327)]=_0x4c7be2['offsetY'];this[_0x259379(0x355)]({'width':_0x4c7be2['width'],'height':_0x4c7be2[_0x259379(0x31c)]});}[_0x385291(0x2ac)](_0x178929){const _0x1d75b9=_0x385291,{row:_0x116785,column:_0x429c4d}=_0x178929;if(_0x116785>=this[_0x1d75b9(0x316)][_0x1d75b9(0x23d)]&&_0x116785<=this['_range']['endRow']&&_0x429c4d>=this[_0x1d75b9(0x316)][_0x1d75b9(0x2e3)]&&_0x429c4d<=this[_0x1d75b9(0x316)][_0x1d75b9(0x248)]){this[_0x1d75b9(0x345)]({'hovered':!![]});return;}this['setShapeProps']({'hovered':![]});}[_0x385291(0x21d)](_0x2c728e){const _0x14388a=_0x385291;this[_0x14388a(0x234)](),this[_0x14388a(0x263)]=!![],this[_0x14388a(0x28b)]=window[_0x14388a(0x273)](()=>{const _0x24122c=_0x14388a;this[_0x24122c(0x263)]=!this[_0x24122c(0x263)],this[_0x24122c(0x1dc)](!![]);},0x1f4),this['_blinkTimer']=window[_0x14388a(0x1b8)](()=>{const _0xf01b4a=_0x14388a;this[_0xf01b4a(0x234)](),this[_0xf01b4a(0x263)]=!![],this['makeDirty'](!![]);},_0x2c728e*0x3e8);}[_0x385291(0x234)](){const _0x5790c0=_0x385291;this['_blinkIntervalTimer']&&(window[_0x5790c0(0x3c3)](this[_0x5790c0(0x28b)]),this[_0x5790c0(0x28b)]=void 0x0),this[_0x5790c0(0x20a)]&&(window[_0x5790c0(0x2cf)](this[_0x5790c0(0x20a)]),this[_0x5790c0(0x20a)]=void 0x0);}[_0x385291(0x283)](_0x2dc1fe){return![];}[_0x385291(0x272)](){const _0x6c26d1=_0x385291;this[_0x6c26d1(0x234)](),super['dispose']();}[_0x385291(0x37f)](_0x3e9b2f){const _0x1ad36e=_0x385291;let _0x1a2c18=this['_color'],_0x55b112=this['_backgroundColor'];this[_0x1ad36e(0x242)]&&!this[_0x1ad36e(0x263)]&&(_0x1a2c18=this[_0x1ad36e(0x330)](this[_0x1ad36e(0x3a7)]),_0x55b112=this[_0x1ad36e(0x2a2)]?this[_0x1ad36e(0x330)](this[_0x1ad36e(0x2a2)]):void 0x0);Rect[_0x1ad36e(0x2bf)](_0x3e9b2f,{'width':this[_0x1ad36e(0x286)],'height':this[_0x1ad36e(0x31c)],'strokeWidth':this['strokeWidth']||1.5,'stroke':_0x1a2c18,'evented':![],'fill':_0x55b112});if(this[_0x1ad36e(0x3b5)]||this[_0x1ad36e(0x2d1)]){var _0x238a3d;_0x3e9b2f[_0x1ad36e(0x36f)](),_0x3e9b2f[_0x1ad36e(0x2a6)](0x1,0x0,0x0,0x1,this[_0x1ad36e(0x286)],(this[_0x1ad36e(0x280)]===_0x1ad36e(0x30a)?0x0:-0x14)+((_0x238a3d=this[_0x1ad36e(0x327)])!==null&&_0x238a3d!==void 0x0?_0x238a3d:0x0)),TextBubbleShape[_0x1ad36e(0x2bf)](_0x3e9b2f,{'text':this[_0x1ad36e(0x38a)],'color':_0x1a2c18}),_0x3e9b2f[_0x1ad36e(0x22a)]();}}['_getLighterColor'](_0x19a503){const _0x2d33d9=_0x385291;if(_0x19a503[_0x2d33d9(0x220)]('#'))return _0x2d33d9(0x25c)+Number[_0x2d33d9(0x1ad)](_0x19a503['slice'](0x1,0x3),0x10)+',\x20'+Number[_0x2d33d9(0x1ad)](_0x19a503[_0x2d33d9(0x28e)](0x3,0x5),0x10)+',\x20'+Number['parseInt'](_0x19a503[_0x2d33d9(0x28e)](0x5,0x7),0x10)+_0x2d33d9(0x3c8);if(_0x19a503[_0x2d33d9(0x220)](_0x2d33d9(0x27e)))return _0x19a503['replace'](/[\d.]+\)$/g,_0x2d33d9(0x229));if(_0x19a503[_0x2d33d9(0x220)](_0x2d33d9(0x343)))return _0x19a503[_0x2d33d9(0x1eb)]('rgb','rgba')['replace'](')',_0x2d33d9(0x3c8));return _0x19a503;}};const SHEETS_COLLABORATION_CURSOR_Z_INDEX=0x1389;let SheetCollabCursorRenderController=class SheetCollabCursorRenderController extends RxDisposable{constructor(_0x587b99,_0x1f0dd6,_0x472134,_0x11b3c1){const _0x276ff6=_0x385291;super(),this['_context']=_0x587b99,this[_0x276ff6(0x1d8)]=_0x1f0dd6,this[_0x276ff6(0x35e)]=_0x472134,this[_0x276ff6(0x3a6)]=_0x11b3c1,_defineProperty(this,_0x276ff6(0x385),new Set()),_defineProperty(this,_0x276ff6(0x264),null),this[_0x276ff6(0x1d2)]();}[_0x385291(0x1d2)](){const _0x274edc=_0x385291;this['_sheetSkeletonManagerService'][_0x274edc(0x1ca)][_0x274edc(0x1e6)](_0x3d2c5f(this['dispose$']),_0x4e4672(_0x487bde=>{const _0x5bfcec=_0x274edc;if(_0x487bde){const _0x42812e=_0x487bde['sheetId'];return combineLatest(this[_0x5bfcec(0x35e)][_0x5bfcec(0x244)](this['_context'][_0x5bfcec(0x34d)]),this[_0x5bfcec(0x3a6)][_0x5bfcec(0x1d5)])[_0x5bfcec(0x1e6)](map(([_0x2fefab,_0x44fcda])=>{const _0x428e7d=new Map();return _0x2fefab['forEach']((_0x3d929f,_0x242bfa)=>{const _0x180831=_0x2feb;if(_0x3d929f[_0x180831(0x337)]===_0x42812e){const _0x149dca={..._0x3d929f};_0x149dca[_0x180831(0x252)]=this[_0x180831(0x3a6)][_0x180831(0x257)](_0x3d929f[_0x180831(0x252)]),_0x428e7d[_0x180831(0x222)](_0x242bfa,_0x149dca);}}),{'skeleton':_0x487bde,'cursors':_0x428e7d};}));}return of({'skeleton':null,'cursors':new Map()});}))[_0x274edc(0x36d)](({skeleton:_0x8bc4ab,cursors:_0x4155c4})=>{const _0x1a76ca=_0x274edc;this[_0x1a76ca(0x397)]();if(_0x8bc4ab)this['_updateCollabCursors'](_0x8bc4ab,_0x4155c4);}),this[_0x274edc(0x1d8)][_0x274edc(0x1ca)][_0x274edc(0x36d)](_0x333a2b=>{const _0x5676c1=_0x274edc;if(_0x333a2b==null)return;const {skeleton:_0x5d911f}=_0x333a2b,{scene:_0x213aad}=this[_0x5676c1(0x347)];_0x213aad['onPointerMove$'][_0x5676c1(0x275)](debounce(_0x21132d=>{const _0x41e462=_0x5676c1;var _0x632915,_0x578ac0;const {offsetX:_0xa1a9ba,offsetY:_0x3f7a0f}=_0x21132d,{x:_0x334d4c,y:_0x3fa057}=_0x213aad[_0x41e462(0x2cb)](Vector2[_0x41e462(0x368)]([_0xa1a9ba,_0x3f7a0f])),{scaleX:_0x3e4617,scaleY:_0x50c07c}=_0x213aad[_0x41e462(0x26e)](),_0x55cdaf=_0x213aad['getViewport'](SHEET_VIEWPORT_KEY[_0x41e462(0x290)]),_0x40d8c4=_0x213aad[_0x41e462(0x249)](Vector2[_0x41e462(0x368)]([_0x334d4c,_0x3fa057]),_0x55cdaf),_0x26de79=_0x5d911f['getCellPositionByOffset'](_0xa1a9ba,_0x3f7a0f,_0x3e4617,_0x50c07c,_0x40d8c4);if(((_0x632915=this[_0x41e462(0x264)])===null||_0x632915===void 0x0?void 0x0:_0x632915[_0x41e462(0x1f9)])===_0x26de79[_0x41e462(0x1f9)]&&((_0x578ac0=this[_0x41e462(0x264)])===null||_0x578ac0===void 0x0?void 0x0:_0x578ac0[_0x41e462(0x313)])===_0x26de79[_0x41e462(0x313)])return;this['_cursors']['forEach'](_0x110328=>{const _0x54141b=_0x41e462;_0x110328[_0x54141b(0x2ac)](_0x26de79);});},0x64));});}['_updateCollabCursors'](_0x3d7375,_0x571cf5){const _0x282ab8=_0x385291,_0xae31c8=this[_0x282ab8(0x1d8)][_0x282ab8(0x205)]();if(!_0xae31c8)return;const _0x212e35=this[_0x282ab8(0x1be)]();if(!_0x212e35)return;this[_0x282ab8(0x385)][_0x282ab8(0x1ef)](_0x40db75=>{const _0x1a11db=_0x282ab8;_0x40db75[_0x1a11db(0x1dc)]();});const {scene:_0x3fe85c}=_0x212e35,_0x5ea701=mergeCollabCursors(Array[_0x282ab8(0x210)](_0x571cf5[_0x282ab8(0x38b)]()))[_0x282ab8(0x24f)](_0x400f2c=>{const _0x41fb16=_0x282ab8,{color:_0x2ff65b,range:_0x50e09c,name:_0x11d24a,selection:_0x5e5fc1,sheetID:_0x156ff1}=_0x400f2c,{startColumn:_0x58a29e,startRow:_0x32ffdc,endColumn:_0x527869,endRow:_0x169d96}=_0x50e09c,_0x1e3915=getCoordByCell(_0x32ffdc,_0x58a29e,_0x3fe85c,_0xae31c8),_0x5cf4e3=getCoordByCell(_0x169d96,_0x527869,_0x3fe85c,_0xae31c8),{columnHeaderHeightAndMarginTop:_0x5f04d0}=_0xae31c8,{startX:_0x222422,startY:_0x454792}=_0x1e3915,{endX:_0x231865,endY:_0x3ff280}=_0x5cf4e3,_0x31fd8d=_0x231865-_0x222422,_0x13d02a=_0x3ff280-_0x454792;return new SheetCollabCursorShape(_0x11d24a,{'labelPosition':_0x454792-_0x5f04d0>=0x14?_0x41fb16(0x3c5):_0x41fb16(0x30a),'sheetID':_0x156ff1,'range':_0x50e09c,'color':_0x2ff65b,'name':_0x11d24a,'selection':_0x5e5fc1,'left':_0x222422,'top':_0x454792,'width':_0x31fd8d,'height':_0x13d02a,'evented':![],'zIndex':SHEETS_COLLABORATION_CURSOR_Z_INDEX});});_0x3fe85c[_0x282ab8(0x1e2)](_0x5ea701,0x1),this[_0x282ab8(0x385)]=new Set(_0x5ea701);}[_0x385291(0x397)](){const _0x19630b=_0x385291;var _0x9c5a12;(_0x9c5a12=this[_0x19630b(0x385)])===null||_0x9c5a12===void 0x0||_0x9c5a12[_0x19630b(0x1ef)](_0x58fc28=>_0x58fc28['dispose']());}[_0x385291(0x1be)](){const _0x1f2ce7=_0x385291;return getSheetObject(this[_0x1f2ce7(0x347)][_0x1f2ce7(0x233)],this[_0x1f2ce7(0x347)]);}};SheetCollabCursorRenderController=__decorate([__decorateParam(0x1,Inject(SheetSkeletonManagerService)),__decorateParam(0x2,Inject(CollabCursorController)),__decorateParam(0x3,Inject(ThemeService))],SheetCollabCursorRenderController);function mergeCollabCursors(_0x4eb937){const _0x3d3a14=_0x385291,_0x1e5cb9=new Map();return _0x4eb937[_0x3d3a14(0x1ef)](_0x29ef2f=>{const _0x351475=_0x3d3a14;if(_0x1e5cb9[_0x351475(0x333)](_0x29ef2f['selection'])){const _0x37e9d1=_0x1e5cb9['get'](_0x29ef2f[_0x351475(0x1b1)]);_0x37e9d1[_0x351475(0x2ed)]+=',\x20'+_0x29ef2f[_0x351475(0x2ed)];}else _0x1e5cb9[_0x351475(0x222)](_0x29ef2f[_0x351475(0x1b1)],_0x29ef2f);}),Array[_0x3d3a14(0x210)](_0x1e5cb9[_0x3d3a14(0x38b)]());}let CollaborationClientUIController=class CollaborationClientUIController extends Disposable{constructor(_0x571883,_0x3067bf,_0x19740e,_0x177512,_0x40cfd3,_0x525ac5){const _0x295431=_0x385291;super(),this[_0x295431(0x3c0)]=_0x571883,this[_0x295431(0x3cb)]=_0x3067bf,this[_0x295431(0x1d3)]=_0x19740e,this[_0x295431(0x1af)]=_0x177512,this['_notificationService']=_0x40cfd3,this[_0x295431(0x1fd)]=_0x525ac5,this['_setupBeforeClosingHandler'](),this[_0x295431(0x22d)]();}['_setupBeforeClosingHandler'](){const _0x280223=_0x385291;this[_0x280223(0x21f)](this[_0x280223(0x3c0)][_0x280223(0x25a)](()=>{const _0x12f565=_0x280223;if(this[_0x12f565(0x3cb)][_0x12f565(0x369)]['size'])return this[_0x12f565(0x1fd)]['t'](_0x12f565(0x28f));}));}['_initEvent'](){const _0x4b58de=_0x385291;this[_0x4b58de(0x21f)](this['_collaborationUIEventService'][_0x4b58de(0x251)][_0x4b58de(0x36d)](_0x781573=>{const _0x3c9b7b=_0x4b58de;if(_0x781573['id']===CollaborationUIEventId[_0x3c9b7b(0x360)])this[_0x3c9b7b(0x1af)]['show']({'type':MessageType['Warning'],'content':this[_0x3c9b7b(0x1fd)]['t'](_0x3c9b7b(0x3b6))});if(_0x781573['id']===CollaborationUIEventId[_0x3c9b7b(0x2ad)])this[_0x3c9b7b(0x1af)][_0x3c9b7b(0x34c)]({'type':MessageType['Warning'],'content':this['_localeService']['t'](_0x3c9b7b(0x3c6))});if(_0x781573['id']===CollaborationUIEventId[_0x3c9b7b(0x332)])this['_notificationService'][_0x3c9b7b(0x34c)]({'title':this['_localeService']['t'](_0x3c9b7b(0x32b)),'content':this[_0x3c9b7b(0x1fd)]['t']('permission.content'),'type':'error','duration':0x0});if(_0x781573['id']===CollaborationUIEventId['CONFLICT'])this[_0x3c9b7b(0x1af)][_0x3c9b7b(0x34c)]({'type':MessageType[_0x3c9b7b(0x1a6)],'content':this['_localeService']['t']('collaboration.closeRoom')+'('+_0x781573['data']+')'});if(_0x781573['id']===CollaborationUIEventId[_0x3c9b7b(0x29b)])this[_0x3c9b7b(0x1af)][_0x3c9b7b(0x34c)]({'type':MessageType[_0x3c9b7b(0x3ae)],'content':this[_0x3c9b7b(0x1fd)]['t'](_0x781573[_0x3c9b7b(0x1e5)]||'')});if(_0x781573['id']===CollaborationUIEventId[_0x3c9b7b(0x253)])this[_0x3c9b7b(0x1af)][_0x3c9b7b(0x34c)]({'type':MessageType[_0x3c9b7b(0x3ae)],'content':this[_0x3c9b7b(0x1fd)]['t'](_0x3c9b7b(0x2ab))});if(_0x781573['id']===CollaborationUIEventId['SOCKET_FAILED'])this[_0x3c9b7b(0x1af)]['show']({'type':MessageType[_0x3c9b7b(0x1a6)],'content':this[_0x3c9b7b(0x1fd)]['t'](_0x3c9b7b(0x30b))});if(_0x781573['id']===CollaborationUIEventId[_0x3c9b7b(0x1e9)])this[_0x3c9b7b(0x1af)][_0x3c9b7b(0x34c)]({'type':MessageType['Error'],'content':this[_0x3c9b7b(0x1fd)]['t']('session.collaboration-timeout')});}));}};CollaborationClientUIController=__decorate([__decorateParam(0x0,IBeforeCloseService),__decorateParam(0x1,ILocalCacheService),__decorateParam(0x2,Inject(CollaborationUIEventService)),__decorateParam(0x3,IMessageService),__decorateParam(0x4,INotificationService),__decorateParam(0x5,Inject(LocaleService))],CollaborationClientUIController);const PLUGIN_CONFIG_KEY=_0x385291(0x389),configSymbol=Symbol(PLUGIN_CONFIG_KEY),defaultPluginConfig={};let DocTransformIMECacheService=class DocTransformIMECacheService{constructor(_0x4838c9,_0x3e855a){const _0x29b79b=_0x385291;this['_transformService']=_0x4838c9,this[_0x29b79b(0x211)]=_0x3e855a;}[_0x385291(0x1d0)](_0x19988e){const _0x497df0=_0x385291;this[_0x497df0(0x35c)](_0x19988e),this[_0x497df0(0x302)](_0x19988e);}[_0x385291(0x392)](_0xd4f6ae){const _0x3ab1f8=_0x385291,{unitID:_0x51a02c}=_0xd4f6ae,{redoCache:_0x3649e3}=this['_renderManagerService'][_0x3ab1f8(0x2ff)](_0x51a02c)[_0x3ab1f8(0x2d6)](DocIMEInputManagerService)[_0x3ab1f8(0x39f)]();if(_0x3649e3[_0x3ab1f8(0x287)]===0x0)return _0xd4f6ae;let _0x818ee=Tools['deepClone'](_0xd4f6ae[_0x3ab1f8(0x218)][0x0]);for(let _0x1c95a7=0x0;_0x1c95a7<_0x3649e3[_0x3ab1f8(0x287)];_0x1c95a7++){const _0x2ade71={'id':_0x3ab1f8(0x2be),'params':{..._0x3649e3[_0x1c95a7]}},_0x352735=this[_0x3ab1f8(0x23f)][_0x3ab1f8(0x226)](_0x818ee,_0x2ade71,![]);if(isTransformMutationFailure(_0x352735))throw _0x352735[_0x3ab1f8(0x32c)];_0x818ee=_0x352735[_0x3ab1f8(0x2eb)];}return{...Tools[_0x3ab1f8(0x346)](_0xd4f6ae),'mutations':[_0x818ee]};}[_0x385291(0x35c)](_0x5b2af0){const _0x50d041=_0x385291,{unitID:_0x13fdfd}=_0x5b2af0,_0x5a23b3=this[_0x50d041(0x211)][_0x50d041(0x2ff)](_0x13fdfd)['with'](DocIMEInputManagerService),{undoCache:_0x122b11,redoCache:_0xa871f3}=_0x5a23b3[_0x50d041(0x39f)]();if(_0x122b11['length']===0x0||_0xa871f3[_0x50d041(0x287)]===0x0)return;const _0x35c06e=[],_0x1fe5e2=[];let _0xa53397=Tools[_0x50d041(0x346)](_0x5b2af0['mutations'][0x0]),_0x4fe42d=Tools[_0x50d041(0x346)](_0x5b2af0[_0x50d041(0x218)][0x0]);for(let _0x4fa54e=_0x122b11['length']-0x1;_0x4fa54e>=0x0;_0x4fa54e--){const _0x27529c={'id':_0x50d041(0x2be),'params':{..._0x122b11[_0x4fa54e]}},_0x25cec2={'id':'doc.mutation.rich-text-editing','params':{..._0xa871f3[_0x4fa54e]}},_0x401bee=this[_0x50d041(0x23f)][_0x50d041(0x226)](_0xa53397,_0x27529c,![]),_0x272f4c=this['_transformService'][_0x50d041(0x226)](_0x4fe42d,_0x25cec2,![]);if(isTransformMutationFailure(_0x401bee))throw _0x401bee['error'];if(isTransformMutationFailure(_0x272f4c))throw _0x272f4c[_0x50d041(0x32c)];_0x35c06e[_0x50d041(0x200)](_0x401bee['m2Prime'][_0x50d041(0x1db)]),_0x1fe5e2[_0x50d041(0x200)](_0x272f4c[_0x50d041(0x3b8)][_0x50d041(0x1db)]),_0xa53397=_0x401bee['m1Prime'],_0x4fe42d=_0x272f4c['m1Prime'];}_0x5a23b3[_0x50d041(0x2ae)]({'undoCache':_0x35c06e,'redoCache':_0x1fe5e2});}[_0x385291(0x302)](_0x3c7624){const _0x2704be=_0x385291,{unitID:_0x33e95a}=_0x3c7624,_0x521727=this[_0x2704be(0x211)][_0x2704be(0x2ff)](_0x33e95a)['with'](DocIMEInputManagerService),_0x357390=_0x521727[_0x2704be(0x26d)]();if(_0x357390==null)return;const _0xc2b422=[{'id':'doc.mutation.rich-text-editing','params':{'unitId':_0x3c7624[_0x2704be(0x2e4)],'actions':null,'textRanges':[_0x357390]}}],_0x571d5e=this[_0x2704be(0x23f)][_0x2704be(0x341)](_0x3c7624,_0xc2b422);if(!isTransformMutationsWithChangesetSuccess(_0x571d5e))throw _0x571d5e[_0x2704be(0x32c)];const _0x29ae76=_0x571d5e[_0x2704be(0x3b8)][0x0][_0x2704be(0x1db)][_0x2704be(0x1c5)];if(Array[_0x2704be(0x2af)](_0x29ae76)&&_0x29ae76[_0x2704be(0x287)])_0x521727['setActiveRange'](_0x29ae76[0x0]);}};DocTransformIMECacheService=__decorate([__decorateParam(0x0,ITransformService),__decorateParam(0x1,IRenderManagerService)],DocTransformIMECacheService);let DocTransformStateCacheService=class DocTransformStateCacheService{constructor(_0x169263,_0x4a9917,_0x27d6ed){const _0x3b49d0=_0x385291;this[_0x3b49d0(0x1b9)]=_0x169263,this[_0x3b49d0(0x23f)]=_0x4a9917,this[_0x3b49d0(0x322)]=_0x27d6ed;}['transformStateCache'](_0x50eda7){this['_transformHistoryAndStateStack'](_0x50eda7);}[_0x385291(0x392)](_0x1d7d7d){const _0x228c7b=_0x385291,{unitID:_0x23cc12}=_0x1d7d7d,{collaboration:_0xaa4f21}=this[_0x228c7b(0x322)]['getStateCache'](_0x23cc12);if(_0xaa4f21[_0x228c7b(0x287)]===0x0)return _0x1d7d7d;let _0x5229cc=Tools[_0x228c7b(0x346)](_0x1d7d7d['mutations'][0x0]);for(let _0x9d4c6f=0x0;_0x9d4c6f<_0xaa4f21[_0x228c7b(0x287)];_0x9d4c6f++){const _0x6c9fa9={'id':_0x228c7b(0x2be),'params':{'unitId':_0xaa4f21[_0x9d4c6f][_0x228c7b(0x34d)],..._0xaa4f21[_0x9d4c6f][_0x228c7b(0x38f)]}},_0x593d20=this['_transformService']['transformMutation'](_0x5229cc,_0x6c9fa9,![]);if(isTransformMutationFailure(_0x593d20))throw _0x593d20[_0x228c7b(0x32c)];_0x5229cc=_0x593d20['m1Prime'];}return{...Tools[_0x228c7b(0x346)](_0x1d7d7d),'mutations':[_0x5229cc]};}[_0x385291(0x3b1)](_0x50c5d1){const _0x110b13=_0x385291,{unitID:_0x1239f0}=_0x50c5d1,{history:_0x34061d,collaboration:_0x69c309}=this[_0x110b13(0x322)][_0x110b13(0x21b)](_0x1239f0);if(_0x34061d[_0x110b13(0x287)]===0x0&&_0x69c309[_0x110b13(0x287)]===0x0)return;const _0x553d09=[],_0x13a6e4=[];let _0x528105=Tools[_0x110b13(0x346)](_0x50c5d1['mutations'][0x0]),_0x470440=Tools['deepClone'](_0x50c5d1[_0x110b13(0x218)][0x0]);for(let _0x589db3=_0x34061d[_0x110b13(0x287)]-0x1;_0x589db3>=0x0;_0x589db3--){const _0x39165d={'id':_0x110b13(0x2be),'params':{'unitId':_0x34061d[_0x589db3][_0x110b13(0x34d)],..._0x34061d[_0x589db3]['undoState']}},_0x5a1b68={'id':_0x110b13(0x2be),'params':{'unitId':_0x34061d[_0x589db3][_0x110b13(0x34d)],..._0x34061d[_0x589db3]['redoState']}},_0x3d3516=this[_0x110b13(0x23f)][_0x110b13(0x226)](_0x528105,_0x39165d,![]),_0x2a3898=this['_transformService'][_0x110b13(0x226)](_0x470440,_0x5a1b68,![]);if(isTransformMutationFailure(_0x3d3516))throw _0x3d3516[_0x110b13(0x32c)];if(isTransformMutationFailure(_0x2a3898))throw _0x2a3898['error'];_0x553d09[_0x110b13(0x200)]({..._0x34061d[_0x589db3],'undoState':_0x3d3516['m2Prime'][_0x110b13(0x1db)],'redoState':_0x2a3898[_0x110b13(0x3b8)]['params']}),_0x528105=_0x3d3516[_0x110b13(0x2eb)],_0x470440=_0x2a3898[_0x110b13(0x2eb)];}_0x528105=Tools[_0x110b13(0x346)](_0x50c5d1[_0x110b13(0x218)][0x0]),_0x470440=Tools[_0x110b13(0x346)](_0x50c5d1[_0x110b13(0x218)][0x0]);for(let _0x479bd0=_0x69c309[_0x110b13(0x287)]-0x1;_0x479bd0>=0x0;_0x479bd0--){const _0x3fe9dd={'id':_0x110b13(0x2be),'params':{'unitId':_0x69c309[_0x479bd0][_0x110b13(0x34d)],..._0x69c309[_0x479bd0][_0x110b13(0x3c2)]}},_0x312036={'id':'doc.mutation.rich-text-editing','params':{'unitId':_0x69c309[_0x479bd0][_0x110b13(0x34d)],..._0x69c309[_0x479bd0][_0x110b13(0x38f)]}},_0x3a5680=this[_0x110b13(0x23f)][_0x110b13(0x226)](_0x528105,_0x3fe9dd,![]),_0x13bd83=this[_0x110b13(0x23f)][_0x110b13(0x226)](_0x470440,_0x312036,![]);if(isTransformMutationFailure(_0x3a5680))throw _0x3a5680[_0x110b13(0x32c)];if(isTransformMutationFailure(_0x13bd83))throw _0x13bd83['error'];_0x13a6e4[_0x110b13(0x200)]({..._0x69c309[_0x479bd0],'undoState':_0x3a5680[_0x110b13(0x3b8)]['params'],'redoState':_0x13bd83[_0x110b13(0x3b8)][_0x110b13(0x1db)]}),_0x528105=_0x3a5680[_0x110b13(0x2eb)],_0x470440=_0x13bd83[_0x110b13(0x2eb)];}this[_0x110b13(0x322)][_0x110b13(0x202)](_0x1239f0,{'history':_0x553d09,'collaboration':_0x13a6e4});}};DocTransformStateCacheService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,ITransformService),__decorateParam(0x2,Inject(DocStateChangeManagerService))],DocTransformStateCacheService);let DocTransformSelectionsService=class DocTransformSelectionsService{constructor(_0x439e71,_0x1ce5a7){const _0x348d48=_0x385291;this[_0x348d48(0x1b9)]=_0x439e71,this['_transformService']=_0x1ce5a7;}['transformSelections'](_0x1b80bf){const _0x385c5d=_0x385291;var _0x487a5f;const _0x59bd94=this[_0x385c5d(0x1b9)][_0x385c5d(0x212)](DocSelectionManagerService),_0x283f44=(_0x487a5f=_0x59bd94['getDocRanges']())!==null&&_0x487a5f!==void 0x0?_0x487a5f:[];if(_0x283f44[_0x385c5d(0x287)]===0x0)return;const _0x5a2eaa=_0x1b80bf[_0x385c5d(0x2e4)],_0x2d577d=[{'id':_0x385c5d(0x2be),'params':{'unitId':_0x5a2eaa,'actions':null,'textRanges':_0x283f44}}],_0x3c3236=this['_transformService'][_0x385c5d(0x341)](_0x1b80bf,_0x2d577d);if(!isTransformMutationsWithChangesetSuccess(_0x3c3236))throw _0x3c3236['error'];const _0x517ce7=_0x3c3236[_0x385c5d(0x3b8)][0x0][_0x385c5d(0x1db)][_0x385c5d(0x1c5)];if(Array[_0x385c5d(0x2af)](_0x517ce7)&&_0x517ce7[_0x385c5d(0x287)])_0x59bd94[_0x385c5d(0x325)](_0x517ce7,{'unitId':_0x5a2eaa,'subUnitId':_0x5a2eaa},![]);}};DocTransformSelectionsService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,ITransformService)],DocTransformSelectionsService);let CollaborationEntityUIController=class CollaborationEntityUIController extends Disposable{constructor(_0x1ac2c3,_0x3cc92e,_0x1e4977,_0x13da8b,_0xe94ec4,_0x53cd20,_0x1a2bdc,_0x444ddf){const _0x57ed3f=_0x385291;super(),this[_0x57ed3f(0x322)]=_0x1ac2c3,this[_0x57ed3f(0x3a4)]=_0x3cc92e,this[_0x57ed3f(0x364)]=_0x1e4977,this[_0x57ed3f(0x365)]=_0x13da8b,this['_docTransformSelectionsService']=_0xe94ec4,this[_0x57ed3f(0x2fd)]=_0x53cd20,this[_0x57ed3f(0x1af)]=_0x1a2bdc,this['_localeService']=_0x444ddf,_defineProperty(this,_0x57ed3f(0x390),new BehaviorSubject(CollaborationStatus[_0x57ed3f(0x340)])),this[_0x57ed3f(0x2d5)]();}[_0x385291(0x2d5)](){const _0x2074b2=_0x385291;this[_0x2074b2(0x21f)](this[_0x2074b2(0x3a4)][_0x2074b2(0x266)][_0x2074b2(0x36d)](_0x54b879=>{const _0x102496=_0x2074b2,_0x56eff3=this[_0x102496(0x322)][_0x102496(0x2a8)]['subscribe'](_0x63d5e6=>{const _0x4b1a7f=_0x102496;if(_0x63d5e6==null)return;const {unitId:_0x656c23,redoState:_0x44fb8c,commandId:_0x1f899a}=_0x63d5e6;if(_0x656c23!==_0x54b879[_0x4b1a7f(0x2e4)])return;const _0x2fc59d={'id':_0x1f899a,'type':CommandType[_0x4b1a7f(0x2a4)],'params':{'unitId':_0x656c23,'actions':_0x44fb8c[_0x4b1a7f(0x398)],'textRanges':null}};_0x54b879[_0x4b1a7f(0x2c7)](_0x2fc59d);});_0x54b879['disposeWithMe'](_0x56eff3);if(_0x54b879 instanceof DocCollaborationEntity)_0x54b879[_0x102496(0x261)]({'onTransformIME':_0x25e5c5=>this[_0x102496(0x364)]['transformIMECache'](_0x25e5c5),'onTransformState':_0x52605d=>this['_docTransformStateCacheService'][_0x102496(0x1b6)](_0x52605d),'onTransformSelections':_0x23f4ad=>this[_0x102496(0x1c6)][_0x102496(0x35d)](_0x23f4ad),'onSyncEditingCollabCursor':_0x55a5ce=>this[_0x102496(0x2fd)][_0x102496(0x321)](_0x55a5ce),'onTransformRemoteChangesetByIMECache':_0x3747a5=>this[_0x102496(0x364)][_0x102496(0x392)](_0x3747a5),'onTransformRemoteChangesetByStateCache':_0x2ec79d=>this[_0x102496(0x365)][_0x102496(0x392)](_0x2ec79d)});}));}};CollaborationEntityUIController=__decorate([__decorateParam(0x0,Inject(DocStateChangeManagerService)),__decorateParam(0x1,Inject(CollaborationController)),__decorateParam(0x2,Inject(DocTransformIMECacheService)),__decorateParam(0x3,Inject(DocTransformStateCacheService)),__decorateParam(0x4,Inject(DocTransformSelectionsService)),__decorateParam(0x5,Inject(DocSyncEditingCollabCursorService)),__decorateParam(0x6,IMessageService),__decorateParam(0x7,Inject(LocaleService))],CollaborationEntityUIController);let FrontendLogController=class FrontendLogController extends Disposable{constructor(_0x103d78,_0x3938ce,_0x2f69a9,_0x5c1dc6){const _0x36c88e=_0x385291;super(),this[_0x36c88e(0x1b9)]=_0x103d78,this[_0x36c88e(0x2a9)]=_0x3938ce,this['_logService']=_0x2f69a9,this[_0x36c88e(0x2ef)]=_0x5c1dc6,_defineProperty(this,_0x36c88e(0x388),void 0x0),this[_0x36c88e(0x1d2)]();}[_0x385291(0x1d2)](){const _0x2b3e52=_0x385291;this['_initWindowErrorListener'](),this[_0x2b3e52(0x299)](),this['_monkeyPatchLogService'](),this[_0x2b3e52(0x1e1)]();}[_0x385291(0x1e1)](){const _0x45d00e=_0x385291;this[_0x45d00e(0x21f)](this['_collaborationSessionService'][_0x45d00e(0x309)][_0x45d00e(0x36d)](_0x35327d=>{const _0x2a6517=_0x45d00e;this[_0x2a6517(0x388)]=_0x35327d===null||_0x35327d===void 0x0?void 0x0:_0x35327d['memberID'];}));}[_0x385291(0x2b4)](){const _0x4a26f4=_0x385291,_0x25f7e0=_0x1bf21b=>{const _0x35d164=_0x2feb;var _0x319c7f;this[_0x35d164(0x38c)](_0x35d164(0x32c),'[Window\x20Error]:\x20'+_0x1bf21b[_0x35d164(0x281)]+_0x35d164(0x363)+_0x1bf21b[_0x35d164(0x201)]+':'+_0x1bf21b[_0x35d164(0x1e4)]+':'+_0x1bf21b[_0x35d164(0x21e)]+'\x0a'+(((_0x319c7f=_0x1bf21b[_0x35d164(0x32c)])===null||_0x319c7f===void 0x0?void 0x0:_0x319c7f['stack'])||''));};window[_0x4a26f4(0x1f3)](_0x4a26f4(0x32c),_0x25f7e0),this['disposeWithMe'](()=>{const _0x32e215=_0x4a26f4;window['removeEventListener'](_0x32e215(0x32c),_0x25f7e0);});}['_initUnhandledRejectionListener'](){const _0x632f8f=_0x385291,_0x1af4e2=_0x429232=>{const _0x74eb37=_0x2feb;this[_0x74eb37(0x38c)](_0x74eb37(0x32c),_0x74eb37(0x245)+_0x429232[_0x74eb37(0x227)]);};window['addEventListener'](_0x632f8f(0x387),_0x1af4e2),this[_0x632f8f(0x21f)](()=>{const _0x4dfde8=_0x632f8f;window[_0x4dfde8(0x370)](_0x4dfde8(0x387),_0x1af4e2);});}[_0x385291(0x372)](){const _0x3f524b=_0x385291,_0x302974=this['_logService'][_0x3f524b(0x32c)][_0x3f524b(0x3be)](this[_0x3f524b(0x21a)]);this[_0x3f524b(0x21a)][_0x3f524b(0x32c)]=(..._0x33a0dd)=>{const _0x43a649=_0x3f524b,_0x8940d=_0x33a0dd[_0x43a649(0x24f)](_0x404991=>_0x404991 instanceof Error?_0x404991[_0x43a649(0x281)]+'\x0a'+_0x404991[_0x43a649(0x2f7)]:String(_0x404991))['join']('\x20');this[_0x43a649(0x38c)](_0x43a649(0x32c),_0x43a649(0x361)+_0x8940d),_0x302974(..._0x33a0dd);},this[_0x3f524b(0x21f)](()=>{this['_logService']['error']=_0x302974;});}[_0x385291(0x38c)](_0x24616a,_0x2417ab){const _0x43b259=_0x385291;try{const _0x3a717e={'userId':this[_0x43b259(0x388)],'logLabel':_0x24616a,'content':_0x2417ab};this[_0x43b259(0x2a9)][_0x43b259(0x1ea)](_0x43b259(0x28c),{'body':_0x3a717e})[_0x43b259(0x1e3)](()=>{});}catch{}}};FrontendLogController=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,ILogService),__decorateParam(0x3,Inject(CollaborationSessionService))],FrontendLogController);function isCalculationStart(_0x4ea05e){const _0x47deac=_0x385291;var _0x1563a5,_0xc2f578;const _0x54824b=(_0x1563a5=_0x4ea05e[_0x47deac(0x215)])===null||_0x1563a5===void 0x0?void 0x0:_0x1563a5[_0x47deac(0x288)],_0x22a960=((_0xc2f578=_0x4ea05e['stageInfo'])===null||_0xc2f578===void 0x0?void 0x0:_0xc2f578[_0x47deac(0x334)])||0x0;return _0x54824b===FormulaExecuteStageType['START_CALCULATION']&&_0x22a960>0x0;}function isCalculationComplete(_0x2f103f){const _0x9eb409=_0x385291;return _0x2f103f['functionsExecutedState']===FormulaExecutedStateType[_0x9eb409(0x1ba)];}const DEFAULT_FORMULA_CALCULATION_LIMIT_STATUS_URL=_0x385291(0x217),DEFAULT_FORMULA_CALCULATION_LIMIT_START_URL=_0x385291(0x28a),DEFAULT_FORMULA_CALCULATION_LIMIT_DONE_URL='/universer-api/license/formula/limit/done';let FormulaCalculationGuardService=class FormulaCalculationGuardService extends Disposable{constructor(_0x1f415a,_0x278f06,_0x3fa49c,_0x49e3d8,_0x5c583b,_0x581433,_0x11bc2f){const _0x59f61f=_0x385291;super(),this[_0x59f61f(0x1af)]=_0x1f415a,this[_0x59f61f(0x2cc)]=_0x278f06,this[_0x59f61f(0x1f5)]=_0x3fa49c,this['_httpService']=_0x49e3d8,this[_0x59f61f(0x1ed)]=_0x5c583b,this[_0x59f61f(0x21a)]=_0x581433,this[_0x59f61f(0x1fd)]=_0x11bc2f,_defineProperty(this,_0x59f61f(0x2c8),null),_defineProperty(this,_0x59f61f(0x3b2),0x0),_defineProperty(this,_0x59f61f(0x2f1),0x0),_defineProperty(this,_0x59f61f(0x285),[]),_defineProperty(this,_0x59f61f(0x2aa),0x0),this[_0x59f61f(0x373)]();}[_0x385291(0x373)](){const _0x3a4b42=_0x385291;this[_0x3a4b42(0x21f)](this[_0x3a4b42(0x2cc)][_0x3a4b42(0x3a8)]((_0x2c42a8,_0x1cc695)=>{const _0x44003c=_0x3a4b42;var _0x1949c3;if(_0x2c42a8['id']!==SetFormulaCalculationStartMutation['id'])return;const _0xf5bb7f=_0x2c42a8['params'];if(!this['_hasFormulaInDirtyRanges']((_0x1949c3=_0xf5bb7f['dirtyRanges'])!==null&&_0x1949c3!==void 0x0?_0x1949c3:[]))return;if(!this[_0x44003c(0x2df)]()){this[_0x44003c(0x204)](_0x2c42a8,_0x1cc695),this['_showGuardMessage']();throw new CanceledError();}})),this['disposeWithMe'](this[_0x3a4b42(0x2cc)][_0x3a4b42(0x295)]((_0x516aa0,_0x6bcf25)=>{const _0x5cea75=_0x3a4b42;if(_0x516aa0['id']!==SetFormulaCalculationNotificationMutation['id'])return;const _0x939256=_0x516aa0[_0x5cea75(0x1db)];if(isCalculationStart(_0x939256)){const _0x4432be=generateRandomId();this[_0x5cea75(0x285)]['push'](_0x4432be),this[_0x5cea75(0x37d)](_0x4432be);}else{if(isCalculationComplete(_0x939256)){if(this['_taskIds']['length']>0x0){const _0x2209e6=this[_0x5cea75(0x285)]['shift']();this[_0x5cea75(0x374)](_0x2209e6);}}}}));}[_0x385291(0x272)](){const _0x1ae32e=_0x385291;super[_0x1ae32e(0x272)](),this[_0x1ae32e(0x20c)](),this[_0x1ae32e(0x285)]=[],this['_currentUsage']=0x0,this[_0x1ae32e(0x3b2)]=0x0,this[_0x1ae32e(0x2aa)]=0x0;}async['_checkAndWaitForCalculationPermission'](_0x34b0fc,_0x33d38b){const _0x5df14e=_0x385291,_0x73e5d6=0x1e,_0x2562bb=0x3e8;for(let _0x4380b3=0x0;_0x4380b3<_0x73e5d6;_0x4380b3++)try{await this[_0x5df14e(0x221)]();if(this[_0x5df14e(0x2df)]()){this[_0x5df14e(0x30e)](_0x34b0fc,_0x33d38b),this['_messageService'][_0x5df14e(0x34c)]({'content':this[_0x5df14e(0x1fd)]['t'](_0x5df14e(0x2b1)),'type':MessageType['Success']});return;}await new Promise(_0x5e647c=>{const _0x5eec2c=_0x5df14e;this[_0x5eec2c(0x2c8)]=window[_0x5eec2c(0x1b8)](_0x5e647c,_0x2562bb);});}catch(_0x177ec1){this[_0x5df14e(0x21a)]['error'](_0x177ec1);}this['_messageService'][_0x5df14e(0x34c)]({'content':this[_0x5df14e(0x1fd)]['t'](_0x5df14e(0x2a3)),'type':MessageType[_0x5df14e(0x1a6)]});}['_applyCommand'](_0x3b279e,_0x43d24a){const _0xc92ae9=_0x385291;try{this[_0xc92ae9(0x2cc)]['executeCommand'](_0x3b279e['id'],_0x3b279e['params'],_0x43d24a);}catch(_0x5c8f4c){this[_0xc92ae9(0x21a)][_0xc92ae9(0x32c)](_0x5c8f4c);}}[_0x385291(0x306)](_0xcae8ed,_0xddbfe4){const _0x53a62b=_0x385291;if(_0xddbfe4<this['_lastResponseTimestamp'])return;this['_lastResponseTimestamp']=_0xddbfe4,this[_0x53a62b(0x3b2)]=Number[_0x53a62b(0x1ad)](_0xcae8ed['maxFormulaLimit']),this['_currentUsage']=Number[_0x53a62b(0x1ad)](_0xcae8ed['currentUsage']);}async[_0x385291(0x37d)](_0x368536){const _0x37cac3=_0x385291,_0x2db021=Date['now']();try{var _0x21a866,_0x371dd3;const _0x33a15f=((_0x21a866=this['_configService']['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x21a866===void 0x0?void 0x0:_0x21a866[_0x37cac3(0x357)])||DEFAULT_FORMULA_CALCULATION_LIMIT_START_URL,_0x19e9b5=(await this['_httpService'][_0x37cac3(0x1ea)](_0x33a15f,{'body':JSON['stringify']({'taskId':_0x368536})}))['body'];if(((_0x371dd3=_0x19e9b5[_0x37cac3(0x32c)])===null||_0x371dd3===void 0x0?void 0x0:_0x371dd3['code'])!==ErrorCode['OK'])return;this[_0x37cac3(0x306)](_0x19e9b5['limitInfo'],_0x2db021);}catch(_0xffb286){this[_0x37cac3(0x21a)]['error'](_0xffb286);}}async['_getFormulaLimitStatus'](_0x444d6c){const _0x43b4d0=_0x385291,_0x22d9b5=Date[_0x43b4d0(0x3bf)]();try{var _0x52025f,_0x3366e9;const _0x1c2c42=((_0x52025f=this[_0x43b4d0(0x1f5)][_0x43b4d0(0x2c6)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x52025f===void 0x0?void 0x0:_0x52025f['getFormulaLimitStatusUrl'])||DEFAULT_FORMULA_CALCULATION_LIMIT_STATUS_URL,_0x1a58f1=_0x444d6c?_0x1c2c42+_0x43b4d0(0x31d)+encodeURIComponent(_0x444d6c):_0x1c2c42,_0x5dfcbd=(await this[_0x43b4d0(0x2a9)][_0x43b4d0(0x212)](_0x1a58f1))[_0x43b4d0(0x1e8)];if(((_0x3366e9=_0x5dfcbd[_0x43b4d0(0x32c)])===null||_0x3366e9===void 0x0?void 0x0:_0x3366e9[_0x43b4d0(0x22b)])!==ErrorCode['OK'])return;this[_0x43b4d0(0x306)](_0x5dfcbd[_0x43b4d0(0x2a0)],_0x22d9b5);}catch(_0x5c75fa){this[_0x43b4d0(0x21a)][_0x43b4d0(0x32c)](_0x5c75fa);}}async['_releaseCalculationLimit'](_0x241e78){const _0x55c7c6=_0x385291,_0x45845e=Date[_0x55c7c6(0x3bf)]();try{var _0x28268f,_0x44b362;const _0x35ceb4=((_0x28268f=this[_0x55c7c6(0x1f5)][_0x55c7c6(0x2c6)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY))===null||_0x28268f===void 0x0?void 0x0:_0x28268f['releaseFormulaLimitUrl'])||DEFAULT_FORMULA_CALCULATION_LIMIT_DONE_URL,_0x2d547e=(await this[_0x55c7c6(0x2a9)][_0x55c7c6(0x1ea)](_0x35ceb4,{'body':JSON[_0x55c7c6(0x2c0)]({'taskId':_0x241e78})}))[_0x55c7c6(0x1e8)];if(((_0x44b362=_0x2d547e[_0x55c7c6(0x32c)])===null||_0x44b362===void 0x0?void 0x0:_0x44b362['code'])!==ErrorCode['OK'])return;this['_setFormulaLimitStatus'](_0x2d547e[_0x55c7c6(0x2a0)],_0x45845e);}catch(_0x402364){this[_0x55c7c6(0x21a)][_0x55c7c6(0x32c)](_0x402364);}}[_0x385291(0x2df)](){const _0x124cf8=_0x385291;if(this[_0x124cf8(0x3b2)]===0x0)return!![];return this[_0x124cf8(0x3b2)]-this[_0x124cf8(0x2f1)]>0x0;}[_0x385291(0x20c)](){const _0x18749b=_0x385291;this[_0x18749b(0x2c8)]&&(clearTimeout(this[_0x18749b(0x2c8)]),this['_pollingInterval']=null);}[_0x385291(0x2ec)](){const _0x730af4=_0x385291;this[_0x730af4(0x1af)]['show']({'content':this[_0x730af4(0x1fd)]['t'](_0x730af4(0x24b)),'type':MessageType[_0x730af4(0x27f)]});}['_hasFormulaInDirtyRanges'](_0x1e29ce){const _0x1cabf8=_0x385291;for(const _0x4cdb3a of _0x1e29ce){const {unitId:_0x248a74,sheetId:_0x5a4c32,range:_0x14d57f}=_0x4cdb3a,_0x2155d0=this[_0x1cabf8(0x1ed)][_0x1cabf8(0x3a1)](_0x248a74);if(!_0x2155d0)continue;const _0x58f4f7=_0x2155d0[_0x1cabf8(0x241)](_0x5a4c32);if(!_0x58f4f7)continue;const _0x1d27e8=_0x58f4f7[_0x1cabf8(0x3bb)]();for(let _0x2fc350=_0x14d57f[_0x1cabf8(0x23d)];_0x2fc350<=_0x14d57f['endRow'];_0x2fc350++)for(let _0x240230=_0x14d57f['startColumn'];_0x240230<=_0x14d57f[_0x1cabf8(0x248)];_0x240230++){const _0x3dd445=_0x1d27e8[_0x1cabf8(0x323)](_0x2fc350,_0x240230);if(_0x3dd445&&(isFormulaString(_0x3dd445['f'])||isFormulaId(_0x3dd445['si'])))return!![];}}return![];}};FormulaCalculationGuardService=__decorate([__decorateParam(0x0,Inject(IMessageService)),__decorateParam(0x1,ICommandService),__decorateParam(0x2,IConfigService),__decorateParam(0x3,Inject(HTTPService)),__decorateParam(0x4,IUniverInstanceService),__decorateParam(0x5,ILogService),__decorateParam(0x6,Inject(LocaleService))],FormulaCalculationGuardService);let WebLocalCacheService=class WebLocalCacheService extends Disposable{constructor(_0x5e1c2f,_0x571967,_0x2f9c75){const _0x16d385=_0x385291;super(),this[_0x16d385(0x1f5)]=_0x5e1c2f,this[_0x16d385(0x2c1)]=_0x571967,this[_0x16d385(0x2a1)]=_0x2f9c75,_defineProperty(this,_0x16d385(0x255),new Map()),_defineProperty(this,_0x16d385(0x33f),new Map()),_defineProperty(this,_0x16d385(0x1fe),![]);}[_0x385291(0x2bd)](){this['_disabled']=!![];}[_0x385291(0x258)](){this['_disabled']=![];}get[_0x385291(0x369)](){const _0xc1eeba=_0x385291;return this[_0xc1eeba(0x33f)];}[_0x385291(0x272)](){const _0x139bab=_0x385291;this[_0x139bab(0x208)]()[_0x139bab(0x2e1)](()=>super['dispose']());}async[_0x385291(0x2fc)](_0x2d5a1e){const _0x5d22e4=_0x385291;if(this[_0x5d22e4(0x1fe)])return null;return this[_0x5d22e4(0x2c1)]['getItem'](getLocalCacheKey(_0x2d5a1e));}async[_0x385291(0x351)](_0x458503,_0xd7391d){const _0x561b8d=_0x385291;return!!this[_0x561b8d(0x2c1)][_0x561b8d(0x2b6)](_0x458503,_0xd7391d);}['updateOfflineData'](_0x3ad582,_0x35cf50,_0x3aed46,_0x23a909){const _0x10286=_0x385291,_0x2f39af=this[_0x10286(0x2a1)][_0x10286(0x250)](_0x3ad582);this['_cachedData']['set'](_0x3ad582,{'unitID':_0x3ad582,'type':_0x35cf50,'awaitingChangeset':_0x3aed46,'mutations':_0x23a909,'rev':_0x2f39af});if(!this[_0x10286(0x33f)]['has'](_0x3ad582))this[_0x10286(0x1c3)](_0x3ad582);}[_0x385291(0x1c3)](_0x4cece1){const _0x3b2554=_0x385291,_0x10e70e=this[_0x3b2554(0x315)]();if(_0x10e70e===0x0)this[_0x3b2554(0x24c)](_0x4cece1);else this[_0x3b2554(0x33f)][_0x3b2554(0x222)](_0x4cece1,setTimeout(()=>this[_0x3b2554(0x24c)](_0x4cece1),_0x10e70e));}[_0x385291(0x315)](){const _0xb67787=_0x385291;var _0x4a3fe8;return(_0x4a3fe8=this[_0xb67787(0x1f5)][_0xb67787(0x2c6)](LOCAL_CACHE_INTERVAL_KEY))!==null&&_0x4a3fe8!==void 0x0?_0x4a3fe8:LOCAL_CACHE_INTERVAL;}['_saveCache'](_0x3b1706){const _0x1883a3=_0x385291,_0xdc8879=this['_saveTaskMap'][_0x1883a3(0x212)](_0x3b1706);if(_0xdc8879!==void 0x0)window[_0x1883a3(0x2cf)](_0xdc8879);return this['_localStorageService'][_0x1883a3(0x2b6)](getLocalCacheKey(_0x3b1706),this[_0x1883a3(0x255)][_0x1883a3(0x212)](_0x3b1706))[_0x1883a3(0x2e1)](()=>this[_0x1883a3(0x33f)]['delete'](_0x3b1706));}async[_0x385291(0x208)](){const _0x49a8d3=_0x385291,_0x33d475=[];this[_0x49a8d3(0x33f)]['forEach']((_0x1210c0,_0xce3471)=>{const _0x5f9a35=_0x49a8d3;window[_0x5f9a35(0x2cf)](_0x1210c0),_0x33d475[_0x5f9a35(0x1fb)](this[_0x5f9a35(0x24c)](_0xce3471)[_0x5f9a35(0x2e1)](()=>{const _0x35370a=_0x5f9a35;this[_0x35370a(0x33f)][_0x35370a(0x282)](_0xce3471);}));}),await Promise[_0x49a8d3(0x2e9)](_0x33d475);}};WebLocalCacheService=__decorate([__decorateParam(0x0,IConfigService),__decorateParam(0x1,ILocalStorageService),__decorateParam(0x2,Inject(RevisionService))],WebLocalCacheService);var WebURLService=class extends RxDisposable{constructor(){const _0x3bd52c=_0x385291;super(),_defineProperty(this,_0x3bd52c(0x311),void 0x0),this[_0x3bd52c(0x311)]=fromEvent(window,_0x3bd52c(0x3bc))[_0x3bd52c(0x1e6)](takeUntil(this[_0x3bd52c(0x2d2)]),shareReplay(0x1),mapTo(void 0x0));}[_0x385291(0x358)](_0x4d6e54,_0x5f0088,_0x2bd7d4=![]){const _0x2d330c=_0x385291,_0x17235e=new URL(window[_0x2d330c(0x2da)]['href']);_0x17235e['searchParams'][_0x2d330c(0x222)](_0x4d6e54,_0x5f0088);if(_0x2bd7d4)window[_0x2d330c(0x1aa)][_0x2d330c(0x2d7)]('','',_0x17235e[_0x2d330c(0x362)]());else window[_0x2d330c(0x1aa)]['pushState']('','',_0x17235e[_0x2d330c(0x362)]());}[_0x385291(0x348)](_0x56bef2,_0x540200=![]){const _0x58fedd=_0x385291,_0x15ce32=new URL(window[_0x58fedd(0x2da)]['href']);_0x15ce32[_0x58fedd(0x1d7)][_0x58fedd(0x282)](_0x56bef2);if(_0x540200)window[_0x58fedd(0x1aa)][_0x58fedd(0x2d7)]('','',_0x15ce32[_0x58fedd(0x362)]());else window[_0x58fedd(0x1aa)][_0x58fedd(0x267)]('','',_0x15ce32[_0x58fedd(0x362)]());}[_0x385291(0x384)](_0x453d77){const _0x149929=_0x385291;var _0x3e0d44;return(_0x3e0d44=new URL(window[_0x149929(0x2da)][_0x149929(0x1d6)])[_0x149929(0x1d7)][_0x149929(0x212)](_0x453d77))!==null&&_0x3e0d44!==void 0x0?_0x3e0d44:void 0x0;}};let UniverCollaborationClientUIPlugin=class UniverCollaborationClientUIPlugin extends Plugin{constructor(_0xf1688e=defaultPluginConfig,_0x47dcba,_0x34ef80,_0x4b63e2){const _0x1fbcd4=_0x385291;super(),this[_0x1fbcd4(0x367)]=_0xf1688e,this[_0x1fbcd4(0x211)]=_0x47dcba,this['_injector']=_0x34ef80,this[_0x1fbcd4(0x1f5)]=_0x4b63e2;const {..._0x4c532e}=merge({},defaultPluginConfig,this[_0x1fbcd4(0x367)]);this['_configService'][_0x1fbcd4(0x291)](PLUGIN_CONFIG_KEY,_0x4c532e);}[_0x385291(0x326)](){const _0x183f99=_0x385291;this[_0x183f99(0x271)](),this[_0x183f99(0x30d)]();}[_0x385291(0x235)](){this['_registerRenderDependencies']();}[_0x385291(0x271)](){const _0x2c60ab=_0x385291;var _0x39a6fa;const _0xbe930e=[[ColorAssignService],[FormulaCalculationGuardService],[DocTransformSelectionsService],[DocTransformIMECacheService],[DocTransformStateCacheService],[DocSyncEditingCollabCursorService],[IURLService,{'useClass':WebURLService}],[ISocketService,{'useClass':WebSocketService}],[ILocalCacheService,{'useClass':WebLocalCacheService}],[DesktopCollaborationStatusDisplayController],[CollaborationEntityUIController],[CollaborationClientUIController],[CollabCursorController],[ImagePasteController],[CollaborationDataLoaderController]];if(this[_0x2c60ab(0x367)][_0x2c60ab(0x344)])_0xbe930e[_0x2c60ab(0x1fb)]([FrontendLogController]);registerDependencies(this[_0x2c60ab(0x1b9)],mergeOverrideWithDependencies(_0xbe930e,(_0x39a6fa=this[_0x2c60ab(0x367)])===null||_0x39a6fa===void 0x0?void 0x0:_0x39a6fa['override']));}[_0x385291(0x310)](){const _0x358632=_0x385291;this[_0x358632(0x21f)](this[_0x358632(0x211)][_0x358632(0x1ab)](UniverInstanceType[_0x358632(0x294)],[DocCollabCursorRenderController])),this[_0x358632(0x21f)](this[_0x358632(0x211)][_0x358632(0x1ab)](UniverInstanceType['UNIVER_SHEET'],[SheetCollabCursorRenderController]));}[_0x385291(0x30d)](){const _0x28c5b7=_0x385291;touchDependencies(this[_0x28c5b7(0x1b9)],[[CollabCursorController],[DesktopCollaborationStatusDisplayController],[CollaborationEntityUIController],[CollaborationClientUIController],[CollaborationDataLoaderController],[FormulaCalculationGuardService]]);if(this[_0x28c5b7(0x367)]['enableFrontendLog'])touchDependencies(this[_0x28c5b7(0x1b9)],[[FrontendLogController]]);}};function _0xdf91(){const _0x213071=['?taskId=','getTypeOfUnitDisposed$','DeleteRangeMoveLeftCommandId','_updateURLWithCurrentState','syncEditingCollabCursor','_docStateChangeManagerService','getValue','fillText','replaceDocRanges','onStarting','_offsetY','onPointerLeave$','send','_unitOnClients','permission.title','error','_updateCollabCursors','object','ranges','_getLighterColor','_entityInit$','PERMISSION_DENIED','has','totalFormulasToCalculate','_getMergeRange','_toggleOffline','sheetID','1348JFuvXo','_shapes','_handleJoinEvent','collab-text-range-','createInstance','font','_handleLeaveEvent','_saveTaskMap','NOT_COLLAB','transformMutationsWithChangeset','2755197mByQvj','rgb','enableFrontendLog','setShapeProps','deepClone','_context','removeParam','_document','_handleHover','highlightSecond','show','unitId','invokeId','_handleEvent','hide','saveOfflineData','_collabCursorState$','roomMembers','_refreshCollabCursors','transformByState','search','startFormulaLimitUrl','setParam','InsertRangeMoveDownCommandId','getCollabEntity$','RECT','_transformUndoRedoStack','transformSelections','_collabCursorController','_docSkeletonManagerService','OTHER_CLIENT_EDITING','[LogService\x20Error]:\x20','toString','\x20at\x20','_docTransformIMECacheService','_docTransformStateCacheService','_getAnchorBounding','_config','FromArray','saveTaskMap','colorClass','_setupSubUnitSync','univer-text-green-500','subscribe','UNIVER_SHEET','save','removeEventListener','status','_monkeyPatchLogService','_initCommandInterceptor','_releaseCalculationLimit','_drawRectRange','getActiveSheet','parse','getOffsetConfig','RemoveColCommandId','_scheduleHeartbeat','_docClipboardService','complete','_startCalculationLimit','span','_draw','univer-text-gray-400','undefined','_dataLoaderService','TEXT','getParam','_cursors','collabCursorState$','unhandledrejection','_memberID','collaboration-client-ui.config','_name','values','_uploadLog','split','univer-border-none\x20univer-bg-transparent','redoState','_status$','getDocRanges','transformRemoteChangeset','key','UNIVER_COLLABORATION_CLIENT_WEB_PLUGIN','_startSheetCollabCursor','10852360ennsdq','_removeCollabCursors','actions','_onCursorDelete','668612rePoZR','arc','onTransformChange$','_unitStatus','_onRefRangeChange','getUndoRedoMutationParamsCache','setAlpha','getUnit','_clearOtherTimers','measureText','_collaborationController','addClipboardHook','_themeService','_color','beforeCommandExecuted','collab-text-anchor-','_startDocCollabCursor','_entities','showText','onPointerEnter$','Warning','activeSheet$','collabStatus.conflict','_transformHistoryAndStateStack','_maxFormulaLimit','_removeClearOtherTimer','loadUnit','_hovered','collaboration.single-unit.warning','_anchorDot','m2Prime','flatMap','tooltipKey','getCellMatrix','popstate','SYNCED','bind','now','_beforeCloseService','197881krNKIt','undoState','clearInterval','_eventUnsubscribe','top','collaboration.closeRoom','moveTo',',\x200.2)','type','storage','_localCacheService','addObject','Error','_session','createSocket','_heartbeatTimer','history','registerRenderModule','univer-text-blue-500','parseInt','ticket','_messageService','reconnect','selection','findNodePositionByCharIndex','USERS_LEAVE','requireSession','Failed','transformStateCache','_assignedColors','setTimeout','_injector','SUCCESS','next','getCurrentUnitForType','getFocusedUnit','_getSheetObject','cursorInfo','purple.300','getMergeData','_initResize','_scheduleSaving','univer-text-xl\x20univer-transition-colors\x20univer-duration-200','textRanges','_docTransformSelectionsService','defineProperty','sessionTicket','_ensureSubject','currentSkeleton$','roomMembers$','size','prototype','getUnitId','iterator','transformIMECache','init','_init','_collaborationUIEventService','DeleteRangeMoveUpCommandId','currentTheme$','href','searchParams','_sheetSkeletonManagerService','MoveRangeCommandId','collab-client.tooltip.reconnect','params','makeDirty','_drawAnchor','InsertRangeMoveRightCommandId','blue.400','fillStyle','_initUserListener','addObjects','catch','lineno','data','pipe','No\x20remote\x20instance\x20service\x20injected.\x20May\x20not\x20syncing\x20edits\x20to\x20the\x20web\x20worker.','body','SUBMIT_CHANGESET_TIMEOUT','post','replace','Enter','_univerInstanceService','10XIknmP','forEach','pulse','engine','registerRefRange','addEventListener','_selfUnitIDs','_configService','_createSocketURL','editingUnit','getMemberID','column','_collabSessionService','push','_scene','_localeService','_disabled','_imageIoService','unshift','filename','setStateCache','_instanceService','_checkAndWaitForCalculationPermission','getCurrentSkeleton','memberID','collabStatus.notCollab','exhaustSavingTask','collabStatus.synced','_blinkTimer','max','_clearPolling','_updateLocalCursor','symbol','/run/','from','_renderManagerService','get','[CollaborationDataLoaderController]','0.22.1','stageInfo','_cursor','/universer-api/license/formula/limit/status','mutations','_docSkeleton','_logService','getStateCache','_colorAssignService','_startBlinking','colno','disposeWithMe','startsWith','_getFormulaLimitStatus','set','hovered','executeCommand','univer-m-0\x20univer-p-0','transformMutation','reason','toPrimitive','0.2)','restore','code','_scheduleClearOtherTimer','_initEvent','unload','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','green.600','PENDING','origin','unit','_stopBlinking','onRendered','_hideTimer','OFFLINE','_initStatusListener','true','result','getTypeOfUnitAdded$','_cursorInfo$','startRow','range','_transformService','_doCreateSocket','getSheetBySheetId','_highlight','30BAfYwB','getCollabCursors$','[Unhandled\x20Rejection]:\x20','focused$','HEADER_MENU','endColumn','getVpScrollXYInfoByPosToVp','collabStatus.fetchMiss','formula.calculation.waiting','_saveCache','_toggleOnline','10loQqkY','map','getCurrentRevOfUnit','event$','color','SOCKET_FAILED_RETRY','application/json','_cachedData','runOnServer','getColorFromTheme','enableLocalCache','_getScale','registerBeforeClose','CONFLICT','rgba(','isActive','_textBubble','NO_OTHER_CLIENTS_EDITING','InsertRowCommandId','addHandlerCallback','assignAColorForMemberID','_isBlinkVisible','_lastPointer','univer-text-orange-500','entityInit$','pushState','offsetY','_online','add','univer-inline-flex\x20univer-items-center\x20univer-justify-center','ACTIVE_UNIT_EVENT_CHANNEL','getActiveRange','getAncestorScale','lineTo','_memberService','_registerDependencies','dispose','setInterval','labelPosition','subscribeEvent','2135BoNHAM','#FFF','_updateSubUnitFromURLParams','polite','closePath','includes','_id','call','rgba','Loading','_labelPosition','message','delete','triggerDblclick','selections','_taskIds','width','length','stage','getSkeleton','/universer-api/license/formula/limit/start','_blinkIntervalTimer','/universer-api/frontend/logs','icon','slice','collaboration.offline-data-not-saved','VIEW_MAIN','setConfig','clickable','2899443BqYzPR','UNIVER_DOC','onCommandExecuted','@univerjs-pro/collaboration-client-ui','button','No\x20unitID\x20or\x20type\x20in\x20URL.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','_initUnhandledRejectionListener','cursorInfo$','JOIN_ROOM_FAILED','debug','min','spin','OTHER_CLIENTS_EDITING','limitInfo','_revisionService','_backgroundColor','formula.calculation.unable','MUTATION','unsubscribe','transform','getMember','docStateChange$','_httpService','_lastResponseTimestamp','session.will-retry','onMouseMove','CLOSE_ROOM','setUndoRedoMutationParamsCache','isArray','function','formula.calculation.started','ONLINE','jiqing.500','_initWindowErrorListener','_highlightSecond','setItem','getOwnPropertyDescriptor','getSheetId','isEditing','uni.network.url-service','_getSessionTicket','preventDefault','disableLocalCache','doc.mutation.rich-text-editing','drawWith','stringify','_localStorageService','_initStatusComponent','_send','InsertColCommandId','executionId','getConfig','onLocalMutation','_pollingInterval','div','bold\x2013px\x20Source\x20Han\x20Sans\x20CN','getRelativeToViewportCoord','_commandService','red.300','UPDATE_CURSOR','clearTimeout','registerComponent','_showText','dispose$','asObservable','packageName','_initEntityListener','with','replaceState','_syncEditingCollabCursorService','_cursorShapes','location','44115709NeDQmt','...','black','_roomMembers$','_checkCalculationAvailable','indicator','then','_refRangeService','startColumn','unitID','getCurrentSelections','constructor','subunit','dark:focus:univer-ring-offset-gray-800','all','highlight','m1Prime','_showGuardMessage','name','evenodd','_collaborationSessionService','runId','_currentUsage','setOffsetY','fill','univer-transition-all\x20univer-duration-200','FETCH_MISS','_initCommandExecutedListener','stack','_urlService','univer-appearance-none','_colorIndex','_anchor','loadOfflineData','_docSyncEditingCollabCursorService','_onCursorUpdate','getRenderById','decorate','_render','_transformPreviousActiveRange','wsSessionTicketUrl','static','some','_setFormulaLimitStatus','_drawTextRange','_hover','socket$','bottom','session.connection-failed','string','_initDependencies','_applyCommand','resize','_registerRenderDependencies','urlChange$','_uiPartsService','row','getRangePointData','_getSaveTimeout','_range','univer-text-red-500','Unknown\x20user','default','univer-h-8\x20univer-w-8\x20univer-rounded-lg','newValue','height'];_0xdf91=function(){return _0x213071;};return _0xdf91();}_defineProperty(UniverCollaborationClientUIPlugin,'pluginName',_0x385291(0x394)),_defineProperty(UniverCollaborationClientUIPlugin,_0x385291(0x2d4),name),_defineProperty(UniverCollaborationClientUIPlugin,'version',version),UniverCollaborationClientUIPlugin=__decorate([DependentOn(UniverCollaborationClientPlugin),__decorateParam(0x1,IRenderManagerService),__decorateParam(0x2,Inject(Injector)),__decorateParam(0x3,IConfigService)],UniverCollaborationClientUIPlugin);let BrowserCollaborationSocketService=class BrowserCollaborationSocketService extends CollaborationSocketService{constructor(_0x2419dc,_0x4dc481,_0x274c62,_0xe78bb2,_0x2f0abf){super(_0x2419dc,_0x4dc481,_0x274c62,_0xe78bb2,_0x2f0abf);}async[_0x385291(0x1a8)](_0x55a464){const _0x2016a8=_0x385291,_0x94d33=await this[_0x2016a8(0x2bb)](),_0x584703=this[_0x2016a8(0x1f6)](_0x55a464,_0x94d33);return this[_0x2016a8(0x240)](_0x584703);}[_0x385291(0x1f6)](_0x1f7931,_0x4eb4da){const _0x4540df=_0x385291,_0x52dac5=typeof window==='undefined'?new URL(_0x1f7931):new URL(_0x1f7931,window[_0x4540df(0x2da)][_0x4540df(0x232)]);_0x52dac5[_0x4540df(0x1d7)]['set'](_0x4540df(0x1c8),_0x4eb4da);const _0x54aedc=typeof window===_0x4540df(0x381)?new URLSearchParams():new URLSearchParams(window['location'][_0x4540df(0x356)]);return _0x54aedc[_0x4540df(0x212)](_0x4540df(0x2f0))&&_0x52dac5[_0x4540df(0x1d7)][_0x4540df(0x222)](_0x4540df(0x2f0),_0x54aedc['get'](_0x4540df(0x2f0))),_0x52dac5['toString']();}async[_0x385291(0x2bb)](){const _0x256011=_0x385291;var _0x566cf3,_0x447508,_0x45c813;const _0x2f8bf9=this[_0x256011(0x1f5)][_0x256011(0x2c6)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x21324f=(_0x566cf3=_0x2f8bf9===null||_0x2f8bf9===void 0x0?void 0x0:_0x2f8bf9[_0x256011(0x303)])!==null&&_0x566cf3!==void 0x0?_0x566cf3:DEFAULT_WS_SESSION_TICKET_URL;return(_0x447508=(_0x45c813=(await this['_httpService'][_0x256011(0x212)](_0x21324f,{'headers':{'Content-Type':_0x256011(0x254)}}))['body'])===null||_0x45c813===void 0x0?void 0x0:_0x45c813[_0x256011(0x1ae)])!==null&&_0x447508!==void 0x0?_0x447508:'';}};BrowserCollaborationSocketService=__decorate([__decorateParam(0x0,Inject(Injector)),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService),__decorateParam(0x3,ILogService),__decorateParam(0x4,ISnapshotServerService)],BrowserCollaborationSocketService);let RemoteUniscriptService=class RemoteUniscriptService extends Disposable{constructor(_0x2fd4bd,_0x5debfe,_0x3c8525){const _0x1083d7=_0x385291;super(),this[_0x1083d7(0x203)]=_0x2fd4bd,this[_0x1083d7(0x2a9)]=_0x5debfe,this[_0x1083d7(0x1f5)]=_0x3c8525;}async[_0x385291(0x256)](_0x3f0974,_0xb66dcc,_0x183463,..._0x348727){const _0x21962e=_0x385291;var _0xb52164,_0x1e71a0,_0x944e63,_0x3045ad;const _0x1f64d6=this['_instanceService']['getFocusedUnit']();if(!_0x1f64d6)throw new Error('[RemoteUniscriptService]:\x20no\x20focused\x20unit');const _0xd8e036=((_0xb52164=this[_0x21962e(0x1f5)][_0x21962e(0x2c6)](REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY))!==null&&_0xb52164!==void 0x0?_0xb52164:DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT)+'/'+_0x3f0974+_0x21962e(0x20f)+_0xb66dcc,_0x3722a3={'scriptId':_0x3f0974,'runId':(_0x1e71a0=new URL(window[_0x21962e(0x2da)][_0x21962e(0x1d6)])[_0x21962e(0x1d7)][_0x21962e(0x212)]('runId'))!==null&&_0x1e71a0!==void 0x0?_0x1e71a0:'','function':_0xb66dcc,'unitId':_0x1f64d6[_0x21962e(0x1ce)](),'argsOfFunction':JSON[_0x21962e(0x2c0)](_0x348727),'invokeId':(_0x944e63=_0x183463[_0x21962e(0x34e)])!==null&&_0x944e63!==void 0x0?_0x944e63:'','executionId':(_0x3045ad=_0x183463[_0x21962e(0x2c5)])!==null&&_0x3045ad!==void 0x0?_0x3045ad:''};try{const _0x5d765a=await this[_0x21962e(0x2a9)][_0x21962e(0x1ea)](_0xd8e036,{'body':_0x3722a3});if(_0x5d765a[_0x21962e(0x1e8)]['error']&&_0x5d765a[_0x21962e(0x1e8)][_0x21962e(0x32c)][_0x21962e(0x22b)]!==ErrorCode['OK'])return _0x21962e(0x1b5);return _0x5d765a[_0x21962e(0x1e8)][_0x21962e(0x23a)];}catch{return _0x21962e(0x1b5);}}};RemoteUniscriptService=__decorate([__decorateParam(0x0,IUniverInstanceService),__decorateParam(0x1,Inject(HTTPService)),__decorateParam(0x2,IConfigService)],RemoteUniscriptService);const HEARTBEAT_INTERVAL=0x7530,ACTIVE_UNIT_EVENT_CHANNEL=_0x385291(0x26c);var WebBrowserSingleActiveUnitService=class extends Disposable{constructor(){const _0x5e4876=_0x385291;super(),_defineProperty(this,_0x5e4876(0x27c),generateRandomId()),_defineProperty(this,_0x5e4876(0x1f4),new Set()),_defineProperty(this,'_unitOnClients',new Map()),_defineProperty(this,'_heartbeatTimer',null),_defineProperty(this,_0x5e4876(0x3a2),new Map()),_defineProperty(this,_0x5e4876(0x39d),new Map()),this[_0x5e4876(0x1d2)]();}['dispose'](){const _0x18cf8b=_0x385291;super[_0x18cf8b(0x272)](),this[_0x18cf8b(0x3a2)]['forEach']((_0x2fa712,_0x2f1d2b)=>this['_removeClearOtherTimer'](_0x2f1d2b));if(this['_heartbeatTimer'])window[_0x18cf8b(0x3c3)](this[_0x18cf8b(0x1a9)]);}['getUnitStatus$'](_0x45d96e){const _0x3505fd=_0x385291;return this[_0x3505fd(0x1c9)](_0x45d96e)[_0x3505fd(0x1e6)](distinctUntilChanged());}[_0x385291(0x1f7)](_0x569083){const _0x1f74db=_0x385291;if(this[_0x1f74db(0x1f4)][_0x1f74db(0x1cc)]===0x0)this[_0x1f74db(0x37a)]();this[_0x1f74db(0x1f4)][_0x1f74db(0x26a)](_0x569083),this['_send']({'type':0x0,'memberID':this[_0x1f74db(0x27c)],'unitIDs':[_0x569083],'isForwarded':![]});}['disposeUnit'](_0x37dafa){const _0xe6e85f=_0x385291;this['_selfUnitIDs'][_0xe6e85f(0x282)](_0x37dafa);if(this[_0xe6e85f(0x1f4)]['size']===0x0&&this[_0xe6e85f(0x1a9)])window['clearInterval'](this[_0xe6e85f(0x1a9)]);}['_init'](){const _0x4b6026=_0x385291;this['disposeWithMe'](toDisposable(fromEvent(window,_0x4b6026(0x3ca))[_0x4b6026(0x36d)](_0x4d8318=>{const _0x212628=_0x4b6026;if(_0x4d8318[_0x212628(0x393)]!==ACTIVE_UNIT_EVENT_CHANNEL||!_0x4d8318[_0x212628(0x31b)])return;const _0x1d0fa6=JSON[_0x212628(0x377)](_0x4d8318[_0x212628(0x31b)]);this[_0x212628(0x34f)](_0x1d0fa6);}))),window[_0x4b6026(0x1f3)](_0x4b6026(0x22e),()=>this['_send']({'type':0x1,'memberID':this['_id'],'unitIDs':Array[_0x4b6026(0x210)](this[_0x4b6026(0x1f4)])}));}[_0x385291(0x34f)](_0x229f0e){const _0x1ccc76=_0x385291;switch(_0x229f0e[_0x1ccc76(0x3c9)]){case 0x0:this[_0x1ccc76(0x33a)](_0x229f0e);break;case 0x1:this['_handleLeaveEvent'](_0x229f0e);break;case 0x2:this['_handleHeartbeatEvent'](_0x229f0e);break;}}[_0x385291(0x33a)](_0xcb9066){const _0x459c6f=_0x385291,{unitIDs:_0x5ad1ef,memberID:_0xe03f7a,isForwarded:_0x57835c}=_0xcb9066;_0x5ad1ef[_0x459c6f(0x1ef)](_0x180cb2=>{const _0x413024=_0x459c6f;if(!_0x57835c&&this[_0x413024(0x32a)][_0x413024(0x333)](_0x180cb2))this[_0x413024(0x1c9)](_0x180cb2)[_0x413024(0x1bb)](UnitStatus[_0x413024(0x29f)]);if(!this[_0x413024(0x32a)]['has'](_0x180cb2)||!this[_0x413024(0x32a)][_0x413024(0x212)](_0x180cb2)[_0x413024(0x333)](_0xe03f7a)){const _0x350bdc=this[_0x413024(0x32a)][_0x413024(0x212)](_0x180cb2)||new Set();_0x350bdc[_0x413024(0x26a)](_0xe03f7a),this['_unitOnClients']['set'](_0x180cb2,_0x350bdc),this[_0x413024(0x22c)](_0xe03f7a);}});if(!_0x57835c)this[_0x459c6f(0x2c3)]({'type':0x0,'memberID':this['_id'],'unitIDs':[...this[_0x459c6f(0x1f4)]],'isForwarded':!![]});}[_0x385291(0x22c)](_0x55ed63){const _0x4b3465=_0x385291;this['_removeClearOtherTimer'](_0x55ed63);const _0x324abd=window[_0x4b3465(0x1b8)](()=>{const _0x429ea9=_0x4b3465;this[_0x429ea9(0x32a)][_0x429ea9(0x1ef)](_0x3444f1=>{const _0x12e9b4=_0x429ea9;_0x3444f1[_0x12e9b4(0x282)](_0x55ed63);});},HEARTBEAT_INTERVAL*0x2);this[_0x4b3465(0x3a2)][_0x4b3465(0x222)](_0x55ed63,_0x324abd);}['_removeClearOtherTimer'](_0x461496){const _0x2fddc2=_0x385291;if(this[_0x2fddc2(0x3a2)][_0x2fddc2(0x333)](_0x461496)){const _0x14d593=this[_0x2fddc2(0x3a2)][_0x2fddc2(0x212)](_0x461496);if(_0x14d593)window[_0x2fddc2(0x2cf)](_0x14d593);this[_0x2fddc2(0x3a2)][_0x2fddc2(0x222)](_0x461496,null);}}[_0x385291(0x33e)](_0x393c3c){const _0x5aed3f=_0x385291,{memberID:_0x4ad407,unitIDs:_0x43c907}=_0x393c3c;_0x43c907[_0x5aed3f(0x1ef)](_0x4a91a1=>{const _0x3e2564=_0x5aed3f;var _0x19d816;const _0x49b9a6=this[_0x3e2564(0x32a)][_0x3e2564(0x212)](_0x4a91a1);if(!_0x49b9a6)return;_0x49b9a6[_0x3e2564(0x282)](_0x4ad407),(_0x19d816=this[_0x3e2564(0x1c9)](_0x4a91a1))===null||_0x19d816===void 0x0||_0x19d816[_0x3e2564(0x1bb)](_0x49b9a6[_0x3e2564(0x1cc)]===0x0?UnitStatus[_0x3e2564(0x25f)]:UnitStatus['OTHER_CLIENTS_EDITING']);}),this[_0x5aed3f(0x3b3)](_0x4ad407);}['_handleHeartbeatEvent'](_0xf59363){const _0x2b61f7=_0x385291;this[_0x2b61f7(0x22c)](_0xf59363[_0x2b61f7(0x206)]);}[_0x385291(0x2c3)](_0x388219){const _0x5b8d4a=_0x385291;localStorage['setItem'](ACTIVE_UNIT_EVENT_CHANNEL,JSON[_0x5b8d4a(0x2c0)](_0x388219));}[_0x385291(0x37a)](){const _0x192709=_0x385291;this['_heartbeatTimer']=window[_0x192709(0x273)](()=>{const _0x4a9a3d=_0x192709;this['_send']({'type':0x2,'memberID':this[_0x4a9a3d(0x27c)]});},HEARTBEAT_INTERVAL);}['_ensureSubject'](_0x4e9f99){const _0x3b8e2b=_0x385291;if(!this[_0x3b8e2b(0x39d)][_0x3b8e2b(0x333)](_0x4e9f99))this[_0x3b8e2b(0x39d)][_0x3b8e2b(0x222)](_0x4e9f99,new BehaviorSubject(UnitStatus[_0x3b8e2b(0x25f)]));return this['_unitStatus']['get'](_0x4e9f99);}};export{BrowserCollaborationSocketService,CollaborationDataLoaderController,DesktopCollaborationStatusDisplayController,IURLService,RemoteUniscriptService,SheetCollabCursorShape,UniverCollaborationClientUIPlugin,WebBrowserSingleActiveUnitService,WebURLService};
|