@ckeditor/ckeditor5-real-time-collaboration 43.3.1-alpha.0 → 44.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -6
- package/build/real-time-collaboration.js +1 -1
- package/dist/augmentation.d.ts +8 -1
- package/dist/index.js +6 -6
- package/dist/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.d.ts +12 -0
- package/dist/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.d.ts +12 -0
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/augmentation.d.ts +8 -1
- package/src/common-translations.js +1 -1
- package/src/index.js +1 -1
- package/src/presencelist/presencelistui.js +1 -1
- package/src/presencelist/view/presencecounterview.js +1 -1
- package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
- package/src/presencelist/view/presencedropdownlistview.js +1 -1
- package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
- package/src/presencelist/view/presenceinlinelistview.js +1 -1
- package/src/presencelist/view/presencelistview.js +1 -1
- package/src/presencelist.js +1 -1
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
- package/src/realtimecollaborativecomments.js +1 -1
- package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
- package/src/realtimecollaborativeediting/sessions.js +1 -1
- package/src/realtimecollaborativeediting/usermarkers.js +1 -1
- package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
- package/src/realtimecollaborativeediting.js +1 -1
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.d.ts +12 -0
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.d.ts +12 -0
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
- package/src/realtimecollaborativetrackchanges.js +1 -1
package/dist/augmentation.d.ts
CHANGED
|
@@ -7,12 +7,19 @@
|
|
|
7
7
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
8
|
*/
|
|
9
9
|
import type { PresenceListConfig } from './config.js';
|
|
10
|
-
import type { RealTimeCollaborationClient } from './index.js';
|
|
10
|
+
import type { RealTimeCollaborativeEditing, RealTimeCollaborativeTrackChanges, RealTimeCollaborativeComments, RealTimeCollaborativeRevisionHistory, CloudServicesCommentsAdapter, CloudServicesTrackChangesAdapter, CloudServicesRevisionHistoryAdapter, RealTimeCollaborationClient } from './index.js';
|
|
11
11
|
declare module '@ckeditor/ckeditor5-core' {
|
|
12
12
|
interface EditorConfig {
|
|
13
13
|
presenceList?: PresenceListConfig;
|
|
14
14
|
}
|
|
15
15
|
interface PluginsMap {
|
|
16
|
+
[RealTimeCollaborativeEditing.pluginName]: RealTimeCollaborativeEditing;
|
|
17
|
+
[RealTimeCollaborativeTrackChanges.pluginName]: RealTimeCollaborativeTrackChanges;
|
|
18
|
+
[RealTimeCollaborativeComments.pluginName]: RealTimeCollaborativeComments;
|
|
19
|
+
[RealTimeCollaborativeRevisionHistory.pluginName]: RealTimeCollaborativeRevisionHistory;
|
|
20
|
+
[CloudServicesCommentsAdapter.pluginName]: CloudServicesCommentsAdapter;
|
|
21
|
+
[CloudServicesTrackChangesAdapter.pluginName]: CloudServicesTrackChangesAdapter;
|
|
22
|
+
[CloudServicesRevisionHistoryAdapter.pluginName]: CloudServicesRevisionHistoryAdapter;
|
|
16
23
|
[RealTimeCollaborationClient.pluginName]: RealTimeCollaborationClient;
|
|
17
24
|
}
|
|
18
25
|
}
|
package/dist/index.js
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ContextPlugin as
|
|
24
|
-
((()=>lt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x563021];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c62fe){super(_0x3c62fe),this['set']('state',_0x294a6e['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x2e2ed6);}['init'](){const _0x193116=this['context'],_0x17b53a=_0x193116['plugins']['get']('CloudServices'),_0x239603=_0x193116['plugins']['get'](_0x563021);if(!_0x17b53a['token'])throw new _0x4a76a1('websocketgateway-missing-token',this);if(!_0x17b53a['webSocketUrl'])throw new _0x4a76a1('websocketgateway-missing-websocket-url',this);return this['_domEmitter']['listenTo'](window,'offline',()=>this['_isBrowserOffline']=!0x0),this['_domEmitter']['listenTo'](window,'online',()=>this['_isBrowserOffline']=!0x1),this['context']['config']['define']('cloudServices.connectionTimeout',0xa),this['context']['config']['define']('cloudServices.requestTimeout',0x14),c['WebSocketGateway']['connect'](_0x17b53a['token'],_0x17b53a['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x127471=>{if(this['connection']=_0x127471,this['bind']('state')['to'](_0x127471,'state',this,'_isBrowserOffline',(_0x9cb631,_0x569025)=>('connected'!==_0x9cb631&&(this['_shouldPluginsReconnect']=!0x0),_0x569025||_0x9cb631!==_0x294a6e['CONNECTED']?_0x294a6e['DISCONNECTED']:this['state']==_0x294a6e['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x294a6e['CONNECTING']):_0x294a6e['CONNECTED'])),this['connection']['on']('error',(_0x4f2589,_0x32dbd7)=>{if('limitExceeded'!==_0x32dbd7['code'])throw console['error'](_0x32dbd7),new _0x4a76a1('cloudservices-init',null,{'originalError':_0x32dbd7});_0x239603['showWarning']('The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.',{'title':'Connected\x20users\x20limit\x20exceeded','namespace':'real-time-collaboration'});}),!_0x127471['me'])return new Promise(_0x217b89=>_0x127471['on']('change:me',_0x217b89));})['catch'](_0x5ac2c6=>{throw console['error'](_0x5ac2c6),new _0x4a76a1('cloudservices-init',null,{'originalError':_0x5ac2c6});});}['addToReconnectionStack'](_0x2cf06f){if('function'!=typeof _0x2cf06f['reconnect'])throw new _0x4a76a1('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x2cf06f))throw new _0x4a76a1('websocketgateway-plugin-already-registered',this,{'name':_0x2cf06f['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x2cf06f);}['removeFromReconnectionStack'](_0x1194b3){this['_reconnectionStack']['delete'](_0x1194b3);}['isInReconnectionStack'](_0x20fd16){return this['_reconnectionStack']['has'](_0x20fd16);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x119f91=>_0x119f91['reconnect']())))['then'](()=>this['state']=_0x294a6e['CONNECTED'])['catch'](_0x415b3b=>{throw console['error'](_0x415b3b),new _0x4a76a1('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x294a6e['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x5b7fc6{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[c,_0x11f245];}constructor(_0x464500){super(_0x464500),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x522579(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x11f245);}['init'](){const _0x105fd0=this['context']['plugins']['get'](c);this['listenTo'](_0x105fd0,'change:state',(_0x5175f1,_0x1ea16e,_0x385a65)=>{if('connected'!==_0x385a65)this['channelSessions']['forEach'](_0x5b0458=>_0x5b0458['clear']()),this['channelConnectedUsers']['forEach'](_0x2726e1=>_0x2726e1['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x5169a0,_0x161d30]of this['_registeredSessions'])for(const _0x48a568 of _0x161d30)this['_handleSessionAdd'](_0x5169a0,_0x48a568);}}),this['_createUser'](_0x105fd0['connection']['me'],!0x0);}['register'](_0x64aa24,_0x8f4181){if(this['_registeredSessions']['has'](_0x64aa24))throw new _0x4a76a1('sessions-register-already-registered',null,{'channelId':_0x64aa24});this['_registeredSessions']['set'](_0x64aa24,_0x8f4181),this['channelSessions']['set'](_0x64aa24,new _0x522579()),this['channelConnectedUsers']['set'](_0x64aa24,new _0x522579()),this['listenTo'](_0x8f4181,'add',(_0x46c5b2,_0x25b7da)=>this['_handleSessionAdd'](_0x64aa24,_0x25b7da)),this['listenTo'](_0x8f4181,'remove',(_0x2d2431,_0x2352f7)=>this['_handleSessionRemove'](_0x64aa24,_0x2352f7));for(const _0x12b553 of _0x8f4181)this['_handleSessionAdd'](_0x64aa24,_0x12b553);}['unregister'](_0x29a4df){if(!this['_registeredSessions']['has'](_0x29a4df))throw new _0x4a76a1('sessions-unregister-not-exist',null,{'channelId':_0x29a4df});const _0x25c967=this['_registeredSessions']['get'](_0x29a4df);this['stopListening'](_0x25c967);for(const _0x482038 of _0x25c967)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x29a4df,_0x482038);this['_registeredSessions']['delete'](_0x29a4df),this['channelSessions']['delete'](_0x29a4df),this['channelConnectedUsers']['delete'](_0x29a4df);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x438130){for(const _0x1a489e of this['channelSessions']['values']())for(const _0x3b81e7 of _0x1a489e)if(_0x3b81e7['id']===_0x438130)return _0x3b81e7['user'];}['getUserSessions'](_0x558322,_0x26af25){const _0xb5755f=_0x26af25?[this['channelSessions']['get'](_0x26af25)]:this['channelSessions']['values'](),_0x43de96=new Set();for(const _0x18b29f of _0xb5755f)for(const _0xad8acb of _0x18b29f)_0xad8acb['user']['id']===_0x558322['id']&&_0x43de96['add'](_0xad8acb['id']);return _0x43de96;}['getUserRole'](_0x12c602){for(const _0x316dff of this['channelSessions']['values']())for(const _0x4f8889 of _0x316dff)if(_0x4f8889['user']===_0x12c602)return _0x4f8889['role'];}['_handleSessionAdd'](_0x56d80a,_0xd831f2){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x2fd689=_0xd831f2['user'],_0x1eb6a6=this['_users']['getUser'](_0x2fd689['id'])||this['_createUser'](_0x2fd689),_0x51bb7b=Object['assign']({},_0xd831f2,{'user':_0x1eb6a6});this['channelSessions']['get'](_0x56d80a)['add'](_0x51bb7b);const _0xbd4f08=this['channelConnectedUsers']['get'](_0x56d80a);_0xbd4f08['has'](_0x1eb6a6['id'])||_0xbd4f08['add'](_0x1eb6a6),this['allConnectedUsers']['has'](_0x1eb6a6['id'])||this['allConnectedUsers']['add'](_0x1eb6a6,_0x1eb6a6['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x56d80a,{'channelId':_0x56d80a,'session':_0x51bb7b});}['_handleSessionRemove'](_0x559944,_0x21bc04){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x3d6629=this['channelConnectedUsers']['get'](_0x559944),_0x4e770e=_0x21bc04['user'];_0x4e770e['id']&&(this['channelSessions']['get'](_0x559944)['remove'](_0x21bc04['id']),_0x3d6629['has'](_0x4e770e['id'])&&!this['getUserSessions'](_0x4e770e,_0x559944)['size']&&_0x3d6629['remove'](_0x4e770e['id']),this['allConnectedUsers']['get'](_0x4e770e['id'])&&!this['getUserSessions'](_0x4e770e)['size']&&this['allConnectedUsers']['remove'](_0x4e770e['id']));}['_createUser'](_0x79d1a,_0x2af03e){const _0x3f407=this['_users']['addUser'](_0x79d1a);return _0x2af03e&&this['_users']['defineMe'](_0x79d1a['id']),_0x3f407['orderNumber']=this['_uniqueUsersCount']++,_0x3f407;}}class H extends _0x14de47{['_domEmitter']=new(_0x2e2ed6())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x1d79bb=this['editor'],_0x760c72=_0x1d79bb['plugins']['get'](i);_0x1d79bb['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x56f1bc,{writer:_0x3182d5})=>function(_0x3a904f,_0x2e8c8e,_0x203eb2,_0x150cbd){const _0x148def=_0x3a904f['markerName']['split'](':')[0x2],_0x5cd08b=_0x203eb2['getUserBySessionId'](_0x148def);if(!_0x5cd08b||_0x148def===_0x203eb2['mySessionId'])return;if(!_0x150cbd['model']['schema']['checkChild'](_0x3a904f['markerRange']['start'],'$text'))return;const _0x1ff225={'class':'ck-user__marker\x20'+_0x5cd08b['color']['getMarkerClass'](),'data-name':_0x5cd08b['name'],'data-session-id':_0x148def},_0x478fa4=_0x150cbd['model']['markers']['get'](_0x3a904f['markerName']),_0x136717=_0x478fa4['getStart'](),_0x56c619=_0x136717['nodeAfter'],_0x188c0f=_0x150cbd['model']['schema'];if(_0x56c619&&_0x188c0f['isObject'](_0x56c619)&&_0x188c0f['isInline'](_0x56c619)&&!_0x150cbd['model']['markers']['get']('user:range:'+_0x148def)['getRange']()['isCollapsed'])return;const _0x584a09=_0x136717['parent'];return _0x150cbd['model']['schema']['isLimit'](_0x584a09)&&!_0x150cbd['model']['hasContent'](_0x584a09)&&(_0x1ff225['contenteditable']=!0x1),function(_0x59c517,_0x2f8bb2,_0x9f4415){const _0x537006=_0x59c517['createUIElement']('span',_0x2f8bb2);return _0x59c517['setCustomProperty']('userPositionMarker',!0x0,_0x537006),_0x537006['render']=function(_0xb671d9){const _0x50f277=this['toDomElement'](_0xb671d9);return _0x50f277['innerHTML']='<span\x20class=\x22ck-user__marker-line\x22\x20contenteditable=\x22false\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span><span\x20class=\x22ck-user__marker-tooltip\x22\x20contenteditable=\x22false\x22\x20spellcheck=\x22false\x22>'+_0x9f4415['name']+'</span>',_0x50f277['addEventListener']('mouseenter',()=>{_0x50f277['classList']['add']('ck-user__marker_hovered');}),_0x50f277['addEventListener']('mouseleave',()=>{_0x50f277['classList']['remove']('ck-user__marker_hovered');}),_0x50f277;},_0x537006['isSimilar']=function(_0x592e11){return!(!this['getCustomProperty']('userPositionMarker')||!_0x592e11['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x592e11['getAttribute']('data-session-id'));},_0x537006;}(_0x2e8c8e,_0x1ff225,_0x5cd08b);}(_0x56f1bc,_0x3182d5,_0x760c72,_0x1d79bb)}),_0x1d79bb['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x2ff607=>function(_0xfd47ae,_0x2cac0d){const _0x5cfa01=_0xfd47ae['markerName']['split'](':')[0x2];if(_0x5cfa01===_0x2cac0d['mySessionId'])return null;const _0x4238e7=_0x2cac0d['getUserBySessionId'](_0x5cfa01);if(!_0x4238e7)return{'id':_0x5cfa01,'classes':[]};return{'id':_0x5cfa01,'classes':['ck-user__selection',_0x4238e7['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x5cfa01},'priority':0x7d0+_0x4238e7['orderNumber']};}(_0x2ff607,_0x760c72)}),function(_0x8b83e9){const _0x31bb2d=_0x8b83e9['model'],_0x4ca3a4=new Map(),_0x3a4816=_0x8b83e9['plugins']['get'](i);_0x31bb2d['markers']['on']('update:user:range',(_0x2b96c3,_0x346dac,_0x3a260d,_0x565f8c)=>{if(!_0x565f8c&&_0x4ca3a4['get'](_0x346dac['name']))return _0x4ca3a4['get'](_0x346dac['name'])['detach'](),void _0x4ca3a4['delete'](_0x346dac['name']);const _0x335900=_0x346dac['name']['split'](':')[0x2];if(_0x335900===_0x3a4816['mySessionId'])return;const _0x5e303e='user:position:'+_0x335900;_0x31bb2d['markers']['has'](_0x5e303e)&&_0x8b83e9['editing']['reconvertMarker'](_0x5e303e),_0x346dac['on']('change:range',(_0x5321d3,_0x2bba6e,_0x2a2c79)=>{if('$graveyard'!=_0x2bba6e['root']['rootName']&&'$graveyard'==_0x346dac['getRange']()['root']['rootName']&&!_0x4ca3a4['has'](_0x346dac['name'])){const _0x3509f5=_0x31bb2d['schema']['getNearestSelectionRange'](_0x2a2c79['deletionPosition']);if(_0x3509f5){const _0x1d77ef=ht['fromRange'](_0x3509f5);_0x4ca3a4['set'](_0x346dac['name'],_0x1d77ef),_0x1d77ef['on']('change:range',(_0x3e7300,_0xbb6dea,_0x2df80c)=>{if('$graveyard'==_0x1d77ef['root']['rootName']){const _0x241033=_0x31bb2d['schema']['getNearestSelectionRange'](_0x2df80c['deletionPosition']);_0x241033?(_0x1d77ef['start']=_0x241033['start'],_0x1d77ef['end']=_0x241033['end']):(_0x4ca3a4['delete'](_0x346dac['name']),_0x1d77ef['detach']());}});}}});}),_0x31bb2d['document']['on']('change',()=>{_0x4ca3a4['size']>0x0&&_0x31bb2d['enqueueChange']({'isUndoable':!0x1},_0x4e4ee4=>{for(const [_0x1644a3,_0x443434]of _0x4ca3a4)'$graveyard'==_0x31bb2d['markers']['get'](_0x1644a3)['getRange']()['root']['rootName']&&(re(_0x1644a3['split'](':')[0x2],_0x443434['toRange'](),_0x31bb2d,_0x4e4ee4),_0x443434['detach']());_0x4ca3a4['clear']();});});}(_0x1d79bb),this['_domEmitter']['listenTo'](_0x464eca['document'],'keydown',(_0x43f86a,{key:_0x5a441f})=>{'Escape'===_0x5a441f&&function(_0x64e4a1){_0x64e4a1['editing']['view']['change'](_0x4e95cb=>{for(const _0x2162e8 of _0x64e4a1['model']['markers']){if(!_0x2162e8['name']['startsWith']('user:position'))continue;const _0x40615a=_0x64e4a1['editing']['mapper']['markerNameToElements'](_0x2162e8['name']);if(_0x40615a){for(const _0x45a05b of _0x40615a)_0x4e95cb['removeClass']('ck-user__marker_hovered',_0x45a05b);}}});}(_0x1d79bb);},{'useCapture':!0x0});}['afterInit'](){const _0x5d7a0b=this['editor'],_0x25ab8f=_0x5d7a0b['commands']['get']('undo');_0x25ab8f&&_0x5d7a0b['model']['on']('applyOperation',(_0x1d2d1a,_0x142792)=>{const _0x265d6c=_0x142792[0x0];if('marker'!=_0x265d6c['type']||!_0x265d6c['name']['startsWith']('user:'))return;const _0x36029f=_0x265d6c['batch'];_0x25ab8f['_createdBatches']['has'](_0x36029f)&&(_0x265d6c['newRange']=_0x265d6c['oldRange']?_0x5d7a0b['model']['createRange'](_0x265d6c['oldRange']['start'],_0x265d6c['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0xce937=this['editor'],_0x14ed55=_0xce937['model']['document'],_0x1b1765=_0xce937['plugins']['get'](i);_0xce937['model']['enqueueChange']({'isUndoable':!0x1},_0x4c695a=>{const _0x378893='user:range:'+_0x1b1765['mySessionId'],_0x1abeb9='user:position:'+_0x1b1765['mySessionId'],_0x5c2e38=_0xce937['model']['markers']['has'](_0x378893);_0xce937['editing']['view']['hasDomSelection']?re(_0x1b1765['mySessionId'],_0x14ed55['selection']['getFirstRange'](),_0xce937['model'],_0x4c695a):_0x5c2e38&&(_0x4c695a['removeMarker'](_0x378893),_0x4c695a['removeMarker'](_0x1abeb9));});}}function re(_0x12adc6,_0x2ea80a,_0x407e31,_0x282e91){const _0x4fe9e6='user:range:'+_0x12adc6,_0xfbeafe='user:position:'+_0x12adc6,_0x3719a8=_0x2ea80a['getContainedElement']();let _0x31487=_0x2ea80a['start'];_0x3719a8&&_0x3719a8['is']('element','tableCell')&&(_0x31487=function(_0x222dfa,_0xb7bfd6){for(const _0x5685a8 of _0x222dfa['getPositions']())if(_0xb7bfd6['schema']['checkChild'](_0x5685a8,'$text'))return _0x5685a8;}(_0x2ea80a,_0x407e31),_0x2ea80a=_0x282e91['createRange'](_0x31487));const _0x527df2=_0x282e91['createRange'](_0x31487);_0x407e31['markers']['has'](_0x4fe9e6)?(_0x282e91['updateMarker'](_0x4fe9e6,{'range':_0x2ea80a}),_0x282e91['updateMarker'](_0xfbeafe,{'range':_0x527df2})):(_0x282e91['addMarker'](_0x4fe9e6,{'range':_0x2ea80a,'usingOperation':!0x0}),_0x282e91['addMarker'](_0xfbeafe,{'range':_0x527df2,'usingOperation':!0x0}));}function q(_0x3bb1b8,_0x266535,_0x432067){const _0x383210=_0x3bb1b8['t'],t=_0x3bb1b8['t'];switch(_0x266535){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');case'PENDING_ACTION_REVISION_HISTORY':return _0x383210({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x432067);default:return'';}}let K=0x1;class l extends _0x14de47{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
-
((()=>_0x8e956b)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,H,_0x123214,_0x11f245,_0x563021];}static get['pluginName'](){return'RealTimeCollaborationClient';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x12e806=this['serverHistory']['getOperations']();for(let _0x29fb68=_0x12e806['length']-0x1;_0x29fb68>=0x0;_0x29fb68--){const _0x5a6768=_0x12e806[_0x29fb68];if(!this['_disconnectionOperations']['has'](_0x5a6768))return _0x5a6768['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x4c3b71){if(super(_0x4c3b71),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x10f310(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x4a76a1('collaboration-missing-channelid',this);const _0x184ecc=_0x4c3b71['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x184ecc,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x4a7478(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new X(this['_disconnectionOperations']);}['init'](){const _0x168d93=this['editor'],_0x17d212=_0x168d93['plugins']['get'](_0x11f245),_0x332bce=_0x168d93['plugins']['get'](c);this['listenTo'](_0x17d212,'getOperationAuthor',(_0x520176,_0x3ec6f9)=>{const _0x13b18d=_0x3ec6f9[0x0];_0x13b18d['_authorId']&&(_0x520176['return']=_0x17d212['getUser'](_0x13b18d['_authorId']),_0x520176['stop']()),null===_0x13b18d['_authorId']&&(_0x520176['return']=null,_0x520176['stop']());},{'priority':'high'}),this['listenTo'](_0x168d93['model']['document']['selection'],'change:range',(_0x74b265,_0x242c4f)=>{_0x242c4f['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x168d93['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x168d93['model']['on']('applyOperation',(_0x5e6816,_0x56d095)=>{const _0x150418=_0x56d095[0x0];_0x150418['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x150418),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x332bce,'state',this,'_hasSynchronizationProblem',(_0x1c2a2a,_0x5b851d)=>'connected'===_0x1c2a2a&&!_0x5b851d),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x168d93['disableReadOnlyMode']('rtc-offline'):_0x168d93['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x168d93['disableReadOnlyMode']('rtc-offline'):_0x168d93['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x37ee72=this['editor']['plugins']['get'](i),_0x17e8a5=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x37ee72['unregister'](this['_channelId']);const _0x17c306=await this['_service']['reconnect'](_0x17e8a5['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x17c306)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x18fb28=await this['_service']['getConnectedSessions']();_0x37ee72['register'](this['_channelId'],_0x18fb28),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0xe9086d){if(function(_0x5cd1e0){return'404'===_0x5cd1e0['code'];}(_0xe9086d)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x2126b0){return'409'===_0x2126b0['code'];}(_0xe9086d)){const _0x20bde6=q(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x20bde6);}else{if(!(_0xe9086d instanceof J))throw _0xe9086d;this['_handleReconnectionError']();}}}}['destroy'](){const _0x1c3464=this['editor']['plugins']['get'](c),_0x45ab20=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x45ab20['channelSessions']['has'](this['_channelId'])&&_0x45ab20['unregister'](this['_channelId']),_0x1c3464['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x948b7e){if(this['sessionId']!==_0x948b7e['sessionId']&&this['_lastSyncedOperationId']!==_0x948b7e['lastOperationId'])throw new J();return this['sessionId']=_0x948b7e['sessionId'],this['_handleServerResponse']([],{..._0x948b7e,'wereChangesApplied':!0x1,'data':_0x948b7e['data']},'reconnect');}async['_connectService'](_0x3b6ca6,_0x2728ab=!0x1){const {connection:_0x8da68c}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x8da68c,this['_channelId'])['then'](_0x32dfac=>this['_initSessionsHandling'](_0x32dfac))['catch'](_0x143d70=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x143d70);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x5b8e66,_0x14c0d2)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x14c0d2);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x412c82=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x3b6ca6);this['_isPendingUpdate']=!0x0;const _0x42a3c0=await this['_service']['connect'](_0x8da68c,this['_compressOperations'](_0x3b6ca6),_0x412c82);if(this['sessionId']=_0x42a3c0['sessionId'],_0x2728ab){if(!_0x42a3c0['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x42a3c0['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x3b6ca6,_0x42a3c0,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x42a3c0,_0x3b6ca6);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x3a99b2=this['editor']['plugins']['get'](i),_0xfd7fb3=this['editor']['plugins']['get'](H),_0x26d4bb=_0x3a99b2['channelSessions']['get'](this['_channelId']);_0x26d4bb&&_0x26d4bb['length']>0x1?_0xfd7fb3['createUserMarkerOperations']():this['listenTo'](_0x3a99b2,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x3a99b2['channelSessions']['get'](this['_channelId'])['length']&&_0xfd7fb3['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x3ca33d,_0x78ef84,_0x478bf5,_0x749553){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x78ef84){const _0x18c382=this['_decompressOperations'](_0x478bf5,_0x749553);await this['_fetchMissingUsers'](_0x18c382),this['_handleExternalOperations'](_0x18c382,_0x78ef84,_0x478bf5['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x13d631}=this['editor'];let _0x39e3b3;try{_0x39e3b3=await this['_service']['getDocumentDetails']();}catch(_0x18e599){const _0x337ef7=q(_0x13d631,'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');return void this['_handleReconnectionError'](_0x337ef7);}const _0x5a9467=_0x39e3b3['currentDocumentSession']||_0x39e3b3['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x5a9467['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x3a3da3=q(_0x13d631,'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x3a3da3);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x4cbacf){const _0x53e64a=this['editor']['plugins']['get'](i);this['listenTo'](_0x53e64a,'sessionAdd:'+this['_channelId'],(_0x543cd4,{session:_0x29d03f})=>{if(_0x29d03f['id']===_0x53e64a['mySessionId']){_0x543cd4['off']();const _0x1deef5=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x50770f=_0x29d03f['permissions'];_0x1deef5&&_0x1deef5['isEnabled']&&(_0x50770f=_0x50770f['filter'](_0x23244a=>'document:write'!==_0x23244a)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x50770f,this['_channelId']);}}),_0x53e64a['register'](this['_channelId'],_0x4cbacf);}['_initThrowingOnDataSet'](){const _0x2a8c08=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x216c16)=>{if(!_0x216c16[_0x216c16['length']-0x1]['suppressErrorInCollaboration'])throw new _0x4a76a1('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x2a8c08['apply'](this['editor']['data'],_0x216c16);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x483947,[_0x1f3db9])=>{if(this['_document']['version'])throw new _0x4a76a1('realtimecollaborationclient-init-document-already-initialized',this);_0x483947['stop'](),this['_setPendingAction']();const _0x3525ed=this['editor']['config']['get']('rootsAttributes'),_0x59a41a=this['_getOperationsFromInitData'](_0x1f3db9,_0x3525ed);0x0==_0x59a41a['length']&&_0x59a41a['push'](new _0x16d544(0x0)),_0x483947['return']=this['_connectService'](_0x59a41a)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x3fb0d5=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x3fb0d5))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x5dd7ba,[_0x2f7871,_0x1f6ae4])=>{_0x5dd7ba['stop']();const _0x521b4a=this['editor']['model']['document']['getRoot'](_0x2f7871);if(!this['_knownRootNames']['has'](_0x2f7871)){const _0x4f77a0=_0x1f6ae4&&_0x1f6ae4['data']?_0x1f6ae4['data']:'',_0x1c21d5=_0x1f6ae4&&_0x1f6ae4['attributes']?_0x1f6ae4['attributes']:{};await this['_loadRoot'](_0x2f7871,_0x4f77a0,_0x1c21d5);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x521b4a['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x521b4a);});},{'priority':'high'});}async['_fetchMissingUsers'](_0xea7b99){const _0x40dde6=this['editor']['plugins']['get'](_0x11f245),{connection:_0x1cbd39}=this['editor']['plugins']['get'](c),_0x4a7a53=new Set();for(const _0x194828 of _0xea7b99){const _0x11d716=_0x194828['_authorId'];_0x11d716&&!_0x40dde6['getUser'](_0x11d716)&&_0x4a7a53['add'](_0x11d716);}if(0x0===_0x4a7a53['size'])return;const _0x582336=await dt['getMany'](_0x1cbd39,Array['from'](_0x4a7a53));for(const _0x13df9a of _0x582336)_0x40dde6['getUser'](_0x13df9a['id'])||_0x40dde6['addUser'](_0x13df9a);}['_getOperationsFromInitData'](_0xd77a6c,_0x5e4db6={}){const _0x261e11=this['editor']['model'],_0x249427=[];let _0x4e3979=0x0;const _0x27cbc2='string'==typeof _0xd77a6c?{'main':_0xd77a6c}:_0xd77a6c;for(const _0x30641b of Object['keys'](_0x27cbc2)){if(!this['_document']['roots']['has'](_0x30641b))throw new _0x4a76a1('realtimecollaborationclient-init-non-existent-root',this);const _0x5773ea=this['editor']['data']['parse'](_0x27cbc2[_0x30641b]),_0x1935a7=this['_document']['getRoot'](_0x30641b),_0x2f8929=new _0x40b766(_0x261e11['createPositionAt'](_0x1935a7,0x0),_0x5773ea,_0x4e3979++);_0x249427['push'](_0x2f8929);for(const [_0x1c6232,_0x13f8ed]of _0x5773ea['markers']){const _0x9cf59c=_0x261e11['createRange'](_0x261e11['createPositionFromPath'](_0x1935a7,_0x13f8ed['start']['path']['slice']()),_0x261e11['createPositionFromPath'](_0x1935a7,_0x13f8ed['end']['path']['slice']())),_0x90d806=new _0x569505(_0x1c6232,null,_0x9cf59c,_0x261e11['markers'],!0x0,_0x4e3979++);_0x249427['push'](_0x90d806);}}if(_0x5e4db6)for(const [_0x5c2357,_0x106193]of Object['entries'](_0x5e4db6)){const _0x2fd4a2=_0x261e11['document']['getRoot'](_0x5c2357);if(!_0x2fd4a2)throw new _0x4a76a1('multi-root-editor-root-attributes-no-root',null);for(const [_0x228a39,_0xd917e1]of Object['entries'](_0x106193))if(null!==_0xd917e1){const _0x2322a3=new _0x590b8d(_0x2fd4a2,_0x228a39,null,_0xd917e1,_0x4e3979++);_0x249427['push'](_0x2322a3);}}return _0x249427;}async['_loadRoot'](_0x2d043c,_0x527f1f,_0x496b42){this['_getOperationsFromInitData']({[_0x2d043c]:_0x527f1f},{[_0x2d043c]:_0x496b42})['forEach']((_0x40f0cd,_0x4f4603)=>{_0x40f0cd['baseVersion']=this['_document']['version']+_0x4f4603,_0x40f0cd['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x40f0cd);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x2afa3b,_0x5073a6){let _0x1931ab;this['_offset']=_0x2afa3b['offset'];const _0xd56396=_0x2afa3b['wereChangesApplied']&&!_0x2afa3b['initData'],_0x428bc8=_0xd56396?0x0:_0x2afa3b['data']['baseVersion'];if(_0x5073a6['forEach'](_0x4f00da=>{_0x4f00da['_isInit']=!0x0,_0x4f00da['createdAt']=_0x2afa3b['sessionCreatedAt'],_0x4f00da['_authorId']=null;}),_0xd56396)_0x1931ab=_0x5073a6,this['_applyOperationsSet'](_0x1931ab,_0xd56396);else{if(_0x2afa3b['initData']){const _0x2f54ab=this['_getOperationsFromInitData'](_0x2afa3b['initData']);this['_document']['history']['version']=-_0x2f54ab['length'],_0x2f54ab['forEach'](_0x3734cf=>{_0x3734cf['baseVersion']-=_0x2f54ab['length'],_0x3734cf['createdAt']=_0x2afa3b['sessionCreatedAt'],_0x3734cf['_isInit']=!0x0,_0x3734cf['_authorId']=null;}),this['_applyOperationsSet'](_0x2f54ab,!0x0),this['serverHistory']['version']=-_0x2f54ab['length']+this['_offset'],this['_updateServerHistory'](_0x2f54ab);}this['_document']['history']['version']=_0x428bc8,_0x1931ab=this['_decompressOperations'](_0x2afa3b['data'],_0x2afa3b['metadata']),await this['_fetchMissingUsers'](_0x1931ab),this['_applyOperationsSet'](_0x1931ab,_0xd56396);}_0x2afa3b['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x1931ab,_0x2afa3b['lastOperationId']),this['_lastSyncedOperationId']=_0x2afa3b['lastOperationId']),this['serverHistory']['version']=_0x428bc8+this['_offset'],this['_updateServerHistory'](_0x1931ab),_0x5073a6['filter'](_0x37d68a=>{const _0x3550fa=this['_getAffectedRoot'](_0x37d68a);return _0x3550fa&&!this['_knownRootNames']['has'](_0x3550fa);})['forEach']((_0x5a30eb,_0x42175f)=>{_0x5a30eb['baseVersion']=this['_document']['version']+_0x42175f,this['_saveOperationInBuffer'](_0x5a30eb);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x29ff8a,_0x58a589){throw this['_isPendingUpdate']=!0x0,_0x58a589&&console['error'](_0x58a589),new _0x4a76a1(_0x29ff8a,this['editor']);}['_saveOperationInBuffer'](_0x3c5cc5){this['_knownOperations']['has'](_0x3c5cc5)||(this['_knownOperations']['add'](_0x3c5cc5),this['_bufferedOperations']['push'](_0x3c5cc5),this['_pendingAction']||'marker'==_0x3c5cc5['type']&&!_0x3c5cc5['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x12ab3e=!0x1){!_0x12ab3e&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x336e02=>{_0x336e02&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x4abafc=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x34237b){return _0x34237b['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x34237b['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x34237b['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x4abafc))throw _0x4abafc;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x333bd6=>{this['on']('change:_isPendingUpdate',()=>{_0x333bd6();});});}async['_sendBufferedOperations'](){const _0x56e532=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x56e532['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x5f0452=[...this['_bufferedOperations']];for(const _0x12ebac of _0x5f0452)_0x12ebac['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x12ebac);const _0x2a3c2a=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x5f0452),_0x42927f=K++,_0x400a79=this['_compressOperations'](_0x5f0452),_0x26d626=await this['_service']['sendOperations'](_0x400a79,_0x400a79['baseVersion'],_0x2a3c2a);try{return await this['_handleServerResponse'](_0x5f0452,_0x26d626,_0x42927f);}catch(_0x61880b){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x61880b);}}async['_handleServerResponse'](_0x5f3ae0,_0xfdd3a9,_0x4a0dd6){if('error'in _0xfdd3a9)throw _0xfdd3a9['error'];let _0x34cfbd=!0x1;if(_0xfdd3a9['wereChangesApplied']){_0xfdd3a9['lastOperationId']&&(this['_lastSyncedOperationId']=_0xfdd3a9['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x21fe9f=>!_0x5f3ae0['includes'](_0x21fe9f));for(const _0x4598e0 of _0x5f3ae0)_0x4598e0['createdAt']='lastOperationAcceptedAt'in _0xfdd3a9&&_0xfdd3a9['lastOperationAcceptedAt']||void 0x0;Q(_0x5f3ae0,_0xfdd3a9['version']-_0x5f3ae0['length']),this['_updateServerHistory'](_0x5f3ae0);const _0x1b2b0b=_0x5f3ae0['filter'](_0x31eb06=>{if(!_0x31eb06['_isInit'])return!0x1;const _0x536e00=this['_getAffectedRoot'](_0x31eb06);return _0x536e00&&!this['_knownRootNames']['has'](_0x536e00);});Q(_0x1b2b0b,this['_document']['version']),this['_applyOperationsSet'](_0x1b2b0b),_0x34cfbd=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x54ff3f=this['_decompressOperations'](_0xfdd3a9['data'],_0xfdd3a9['metadata'])['filter'](_0x1f7142=>_0x1f7142['baseVersion']>=this['_lastServerVersion']);_0x54ff3f['forEach'](_0x6e2721=>this['_addKnownRoot'](_0x6e2721)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x5a64bc=>!_0x5a64bc['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x5a64bc))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x54ff3f),_0x34cfbd=this['_handleExternalOperations'](_0x54ff3f,_0xfdd3a9['version'],_0xfdd3a9['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x34cfbd?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x585f6f,_0x205e21,_0x3f2f78){try{const _0x4a0fac={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x584f26,operationsB:_0xe45bee,originalOperations:_0xcb5be}=_0x395948(_0x585f6f,this['_bufferedOperations'],_0x4a0fac);Q(_0x584f26,this['_document']['version']),Q(_0xe45bee,_0x205e21);for(const _0x534b4a of _0x584f26){const _0xc6fc8b=_0xcb5be['get'](_0x534b4a);_0x534b4a['_authorId']=_0xc6fc8b?_0xc6fc8b['_authorId']:null;}_0x3f2f78&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x585f6f,_0x3f2f78),this['_lastSyncedOperationId']=_0x3f2f78),this['_bufferedOperations']=[..._0xe45bee],this['_applyOperationsSet'](_0x584f26),this['_updateServerHistory'](_0x585f6f);}catch(_0x25e268){return console['error'](_0x25e268),!0x1;}return!0x0;}['_applyOperationsSet'](_0x330849,_0x534996=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x2ab2c1=>{for(const _0xddbb96 of _0x330849)this['_knownOperations']['add'](_0xddbb96),this['_addKnownRoot'](_0xddbb96),_0x2ab2c1['batch']['addOperation'](_0xddbb96),this['editor']['model']['applyOperation'](_0xddbb96);});}['_addKnownRoot'](_0xb4b4c6){const _0xd6d70a=this['_getAffectedRoot'](_0xb4b4c6);_0xd6d70a&&this['_knownRootNames']['add'](_0xd6d70a);}['_getAffectedRoot'](_0x3b78e7){let _0x43cad4,_0x224726;switch(_0x3b78e7['type']){case'insert':_0x43cad4=_0x3b78e7['position']['root'];break;case'marker':if(_0x224726=_0x3b78e7['newRange'],!_0x224726)return null;_0x43cad4=_0x224726['root'];break;case'addRootAttribute':_0x43cad4=_0x3b78e7['root'];break;case'addRoot':_0x43cad4=_0x3b78e7['affectedSelectable'];break;case'move':_0x43cad4=_0x3b78e7['targetPosition']['root'];break;default:return null;}return _0x43cad4['rootName'];}['_updateServerHistory'](_0xcf8877){_0xcf8877['forEach'](_0xe87ad=>{const _0x150a00=_0xe87ad['clone']();_0x150a00['_authorId']=_0xe87ad['_authorId'],_0x150a00['_isInit']=!!_0xe87ad['_isInit'],_0x150a00['createdAt']=_0xe87ad['createdAt'],_0x150a00['baseVersion']+=this['_offset'],_0xe87ad['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x150a00),this['serverHistory']['addOperation'](_0x150a00);});}['_handleReconnectionError'](_0x3f9934){const _0x1b0675=this['editor']['plugins']['get']('Notification'),_0x3224c3=this['editor']['locale'];_0x3f9934||(_0x3f9934=q(_0x3224c3,'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.')),_0x1b0675['showWarning'](_0x3f9934,{'title':q(_0x3224c3,'Synchronization\x20issue'),'namespace':'real-time-collaboration'}),this['_hasSynchronizationProblem']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_bufferedOperations']=[],this['editor']['plugins']['get'](c)['destroy']();}['_setPendingAction'](){this['_pendingAction']||(this['_pendingAction']=this['editor']['plugins']['get'](_0x123214)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x123214)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x4c4361){const _0x43c91f=_0x4c4361['map'](_0x13f888=>_0x13f888['toJSON']());return this['_compressor']['compress'](_0x43c91f);}['_decompressOperations'](_0x3726bc,_0x1da686){return this['_compressor']['decompress'](_0x3726bc)['map']((_0x1e447a,_0x302eb7)=>{const _0x330fdb='init'==_0x1da686[_0x302eb7]['type'];if('InsertOperation'==_0x1e447a['__className']){const _0x10b131=_0x1e447a['position']['root'];!this['_document']['getRoot'](_0x10b131)&&(this['_document']['createRoot']('$root',_0x10b131)['_isAttached']=!0x1);}const _0x310eba=_0x5cad72['fromJSON'](_0x1e447a,this['_document']);return _0x310eba['wasUndone']=_0x1e447a['wasUndone'],_0x310eba['_isInit']=_0x330fdb,_0x310eba['_authorId']=_0x330fdb?null:_0x1da686[_0x302eb7]['userId'],_0x310eba['_isDisconnection']='cs:removeUser'===_0x1da686[_0x302eb7]['type'],_0x310eba['createdAt']=_0x1da686[_0x302eb7]['createdAt'],_0x310eba;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x55153b=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x55153b&&_0x55153b['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x569839,_0x27cf71){for(const _0x550f41 of _0x569839)_0x550f41['baseVersion']=_0x27cf71++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x3ee893){this['_ignoredOperations']=_0x3ee893,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x3a84bc){let _0x2d8bff=_0x3a84bc['length'];for(;_0x2d8bff--;){const _0x2b5f08=_0x3a84bc[_0x2d8bff];if(!this['_ignoredOperations']['has'](_0x2b5f08)){if(!this['_operationToId']['has'](_0x2b5f08)){const _0x62bef5=_0x10ed5f()['slice'](0x1,0x12);this['_operationToId']['set'](_0x2b5f08,_0x62bef5);}return this['_operationToId']['get'](_0x2b5f08);}}}['setIdForTheLastOperation'](_0x5e1fc1,_0x4af634){if(!_0x4af634)return;let _0xfc4153=_0x5e1fc1['length'];for(;_0xfc4153--;){const _0x30b703=_0x5e1fc1[_0xfc4153];this['_ignoredOperations']['has'](_0x30b703)||this['_operationToId']['set'](_0x30b703,_0x4af634);}}}class n extends _0x14de47{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x5b7fc6{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
-
((()=>_0x2e5868)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x11f245];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x413778){super(_0x413778),this['_services']=new Map();}async['init'](){const _0x4246d2=this['context'],_0xc5ca72=_0x4246d2['plugins']['get']('CommentsRepository');if(_0x4246d2['plugins']['get'](c)['addToReconnectionStack'](this),_0xc5ca72['adapter']={'addCommentThread':async({channelId:_0x23dbd7,threadId:_0x6d2837,comments:_0x3b89ef,resolvedAt:_0x269cec,resolvedBy:_0xb05643,context:_0x175084,attributes:_0x1e3328})=>{const _0x3656ed=await this['_getService'](_0x23dbd7)['addCommentThread']({'commentThreadId':_0x6d2837,'comments':_0x3b89ef['map'](_0x4d3b62=>function(_0x29a163,_0x8858e9,_0x217dd0){return{'commentThreadId':_0x217dd0,'commentId':_0x29a163['commentId'],'userId':_0x29a163['authorId'],'content':_0x29a163['content'],'documentId':_0x8858e9,'createdAt':_0x29a163['createdAt'],'attributes':_0x29a163['attributes']||{}};}(_0x4d3b62,_0x23dbd7,_0x6d2837)),'resolvedAt':_0x269cec,'resolvedBy':_0xb05643,'context':_0x175084,'attributes':_0x1e3328})['catch'](ut);return{'threadId':_0x3656ed['commentThreadId'],'comments':_0x3656ed['comments']};},'getCommentThread':async({channelId:_0x5b722c,threadId:_0x4fae9c})=>{const _0x5bda9f=await this['_getService'](_0x5b722c)['getCommentThread'](_0x4fae9c)['catch'](ut);return _0x5bda9f['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x5bda9f]),{'threadId':_0x5bda9f['commentThreadId'],'comments':_0x5bda9f['comments']['map'](S),'context':_0x5bda9f['context'],'resolvedAt':_0x5bda9f['resolvedAt'],'resolvedBy':_0x5bda9f['resolvedBy'],'attributes':_0x5bda9f['attributes']||{}});},'updateCommentThread':async({channelId:_0x2a732b,threadId:_0x48d391,context:_0x48582a,unlinkedAt:_0x394300,attributes:_0x395b8c})=>this['_getService'](_0x2a732b)['updateCommentThread']({'commentThreadId':_0x48d391,'context':_0x48582a,'attributes':_0x395b8c,'unlinkedAt':_0x394300})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x1d527e,threadId:_0x1c423f})=>{const _0x4321e7=await this['_getService'](_0x1d527e)['resolveCommentThread'](_0x1c423f)['catch'](B)['catch'](ut);return{'threadId':_0x4321e7['commentThreadId'],'resolvedAt':_0x4321e7['resolvedAt'],'resolvedBy':_0x4321e7['resolvedBy']};},'reopenCommentThread':async({channelId:_0x4922e1,threadId:_0x50ea6f})=>this['_getService'](_0x4922e1)['reopenCommentThread'](_0x50ea6f)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x482d93,threadId:_0x2936e9})=>this['_getService'](_0x482d93)['removeCommentThread'](_0x2936e9)['catch'](B)['catch'](ut),'addComment':({channelId:_0x28d9d2,threadId:_0x19757a,commentId:_0x5e2ff8,content:_0x7832b2,attributes:_0x4910e4})=>this['_getService'](_0x28d9d2)['addComment'](_0x19757a,_0x5e2ff8,_0x7832b2,_0x4910e4)['catch'](ut),'updateComment':({channelId:_0x5e020e,threadId:_0x39b6c3,commentId:_0x29fd51,content:_0x39b3d0,attributes:_0x5d9a35})=>this['_getService'](_0x5e020e)['updateComment'](_0x39b6c3,_0x29fd51,_0x39b3d0,_0x5d9a35)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x2fec24,threadId:_0x34f4da,commentId:_0x5caad5})=>this['_getService'](_0x2fec24)['removeComment'](_0x34f4da,_0x5caad5)['catch'](B)['catch'](ut)},_0x4246d2 instanceof _0x519f07){const _0x560f9c=_0x4246d2['config']['get']('collaboration.channelId'),_0x3d29ef=_0x4246d2['plugins']['get'](i);await this['_setUpService'](_0x560f9c);const _0x213624=await this['_services']['get'](_0x560f9c)['getConnectedSessions']();this['listenTo'](_0x3d29ef,'sessionAdd:'+_0x560f9c,(_0x321bf0,{session:_0x430aad})=>{_0x430aad['id']===_0x3d29ef['mySessionId']&&(_0x321bf0['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x430aad['permissions'],_0x560f9c));}),_0x3d29ef['register'](_0x560f9c,_0x213624);}}async['_setUpService'](_0x150e5){if(this['_services']['has'](_0x150e5))throw new _0x4a76a1('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x150e5});const _0xd5f8f4=this['context']['plugins']['get']('CommentsRepository'),_0x4148cf=new a['CommentsService'](_0x150e5);this['_services']['set'](_0x150e5,_0x4148cf),this['listenTo'](_0x4148cf,'commentThreadAdded',(_0x9672b2,_0x15dc57)=>{const {commentThreadId:_0xb5826e,documentId:_0x30c0b9,context:_0x38ebf3,attributes:_0x1a9b53,resolvedAt:_0x4adc5a,resolvedBy:_0x3d966f,comments:_0x53f064}=_0x15dc57;_0xd5f8f4['getCommentThread'](_0xb5826e)||_0xd5f8f4['addCommentThread']({'threadId':_0xb5826e,'channelId':_0x30c0b9,'comments':_0x53f064?_0x53f064['map'](S):[],'context':_0x38ebf3,'attributes':_0x1a9b53,'resolvedAt':_0x4adc5a,'resolvedBy':_0x3d966f,'isFromAdapter':!0x0});}),this['listenTo'](_0x4148cf,'commentThreadUpdated',(_0x40bfd4,{commentThreadId:_0x450098,documentId:_0x3498d2,context:_0x524c5b,unlinkedAt:_0x1002e5,attributes:_0x2fc99d})=>{_0xd5f8f4['getCommentThread'](_0x450098)&&_0xd5f8f4['updateCommentThread']({'threadId':_0x450098,'channelId':_0x3498d2,'context':_0x524c5b,'unlinkedAt':_0x1002e5,'attributes':_0x2fc99d,'isFromAdapter':!0x0});}),this['listenTo'](_0x4148cf,'commentThreadResolved',(_0x3e0216,{commentThreadId:_0x4d1d15,resolvedBy:_0x2d1b02,resolvedAt:_0x140d71})=>{const _0x76d106=_0xd5f8f4['getCommentThread'](_0x4d1d15);_0x76d106&&_0x76d106['resolve']({'resolvedBy':_0x2d1b02,'resolvedAt':_0x140d71,'isFromAdapter':!0x0});}),this['listenTo'](_0x4148cf,'commentThreadReopened',(_0x4c662d,{commentThreadId:_0x518b60})=>{const _0xd7e987=_0xd5f8f4['getCommentThread'](_0x518b60);_0xd7e987&&_0xd7e987['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x4148cf,'commentThreadRemoved',(_0x296b5b,{commentThreadId:_0x4c164b})=>{const _0x198533=_0xd5f8f4['getCommentThread'](_0x4c164b);_0x198533&&_0x198533['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x4148cf,'commentAdded',(_0x14fe13,_0x115b00)=>{const _0x78d955=_0x115b00['commentThreadId'],_0xaf8391=_0xd5f8f4['getCommentThread'](_0x78d955);_0xaf8391&&_0xaf8391['addComment']({...S(_0x115b00),'isFromAdapter':!0x0});}),this['listenTo'](_0x4148cf,'commentUpdated',(_0x5b01d0,{commentThreadId:_0x32cfd3,commentId:_0xb8b3b3,content:_0x15463b,attributes:_0x152f37})=>{const _0x77b8fd=_0xd5f8f4['getCommentThread'](_0x32cfd3);if(_0x77b8fd){const _0x5829cd=_0x77b8fd['getComment'](_0xb8b3b3);_0x5829cd&&_0x5829cd['update']({'content':_0x15463b,'attributes':_0x152f37,'isFromAdapter':!0x0});}}),this['listenTo'](_0x4148cf,'commentRemoved',(_0x17af77,{commentThreadId:_0x1cf090,commentId:_0x3e9f8e})=>{const _0x19d5a2=_0xd5f8f4['getCommentThread'](_0x1cf090);if(_0x19d5a2){const _0xf2f4ae=_0x19d5a2['getComment'](_0x3e9f8e);_0xf2f4ae&&_0xf2f4ae['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x150e5);}['destroy'](){if(this['context']instanceof _0x519f07){const _0x4370a0=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x4370a0);}}['_terminateService'](_0x3b1464){if(!this['_services']['has'](_0x3b1464))throw new _0x4a76a1('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x3b1464});this['_getService'](_0x3b1464)['disconnect'](),this['_services']['delete'](_0x3b1464);}async['reconnect'](){for(const _0x32364c of this['_services']['keys']())await this['_connectService'](_0x32364c);if(this['context']instanceof _0x519f07){const _0x4c1b67=this['context']['config']['get']('collaboration.channelId'),_0xecb594=this['context']['plugins']['get'](i);_0xecb594['unregister'](_0x4c1b67);const _0x4084d2=await this['_services']['get'](_0x4c1b67)['getConnectedSessions']();_0xecb594['register'](_0x4c1b67,_0x4084d2);}}async['_connectService'](_0x5811a8){const {connection:_0x1e2187}=this['context']['plugins']['get'](c),_0x505b24=this['context']['plugins']['get']('CommentsRepository'),_0x56ff89=this['_services']['get'](_0x5811a8),_0x2badee=await _0x56ff89['connect'](_0x1e2187);await this['_fetchMissingUsersForThreads'](_0x2badee);const _0x181f03=new Set(Array['from'](_0x505b24['getCommentThreads']({'channelId':_0x5811a8}),_0x1bda0b=>_0x1bda0b['id']));for(const _0x263a52 of _0x2badee)_0x263a52['deletedAt']||_0x181f03['delete'](_0x263a52['commentThreadId']);for(const _0x3e71b4 of _0x181f03)_0x505b24['getCommentThread'](_0x3e71b4)['remove']({'isFromAdapter':!0x0});for(const _0xea1f5d of _0x2badee){let _0x565e60=_0x505b24['getCommentThread'](_0xea1f5d['commentThreadId']);const {commentThreadId:_0x3158a9,context:_0x172eb3,attributes:_0x3fc607,resolvedBy:_0x139716,resolvedAt:_0x39cbe3,unlinkedAt:_0xebfb2,deletedAt:_0x462e5d}=_0xea1f5d;if(_0x462e5d)continue;_0x565e60||(_0x565e60=_0x505b24['addCommentThread']({'channelId':_0x5811a8,'threadId':_0x3158a9,'context':_0x172eb3,'attributes':_0x3fc607||{},'resolvedBy':_0x139716,'resolvedAt':_0x39cbe3,'unlinkedAt':_0xebfb2,'isFromAdapter':!0x0}));const _0x57d88a=new Set(Array['from'](_0x565e60['comments'],_0x1ae139=>_0x1ae139['id']));for(const _0x43cd30 of _0xea1f5d['comments'])_0x57d88a['delete'](_0x43cd30['commentId']);for(const _0x3c6987 of _0x57d88a)_0x565e60['getComment'](_0x3c6987)['remove']({'isFromAdapter':!0x0});for(const _0xa27dc8 of _0xea1f5d['comments']){const _0x2f4a32=_0x565e60['getComment'](_0xa27dc8['commentId']);_0x2f4a32?_0x2f4a32['content']!==_0xa27dc8['content']&&_0x2f4a32['update']({'content':_0xa27dc8['content'],'isFromAdapter':!0x0}):_0x565e60['addComment'](Object['assign'](S(_0xa27dc8),{'isFromAdapter':!0x0}));}}}['_getService'](_0xc9050a){if(!this['_services']['has'](_0xc9050a))throw new _0x4a76a1('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0xc9050a});return this['_services']['get'](_0xc9050a);}async['_fetchMissingUsersForThreads'](_0x5ec93d){const _0xb7c9b=this['context']['plugins']['get'](_0x11f245),{connection:_0x30289}=this['context']['plugins']['get'](c),_0x4539fb=new Set();for(const {resolvedBy:_0xfaaa44,comments:_0x37c24f}of _0x5ec93d){_0xfaaa44&&!_0xb7c9b['getUser'](_0xfaaa44)&&_0x4539fb['add'](_0xfaaa44);for(const {userId:_0x228d59}of _0x37c24f)_0xb7c9b['getUser'](_0x228d59)||_0x4539fb['add'](_0x228d59);}if(0x0===_0x4539fb['size'])return;const _0x490d76=await dt['getMany'](_0x30289,Array['from'](_0x4539fb));for(const _0xa967fc of _0x490d76)_0xb7c9b['getUser'](_0xa967fc['id'])||_0xb7c9b['addUser'](_0xa967fc);}}async function B(_0x46e247){if('404'!==_0x46e247['code'])throw _0x46e247;}function ut(_0x442237){if((_0x280f7b=_0x442237)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x280f7b['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x280f7b['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x280f7b;throw _0x442237;}function S(_0x1293ec){return{'threadId':_0x1293ec['commentThreadId'],'commentId':_0x1293ec['commentId'],'content':_0x1293ec['content'],'createdAt':_0x1293ec['createdAt'],'authorId':_0x1293ec['userId'],'attributes':_0x1293ec['attributes']||{}};}class f extends _0x14de47{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
-
((()=>
|
|
28
|
-
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x11f245];}constructor(_0x133907){super(_0x133907);const _0x283e06=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x283e06);}async['init'](){const _0x3ba511=this['editor']['plugins']['get'](l),_0x16d48a=_0x3ba511['serverHistory'],_0xc3c148=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x16d48a,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x3ba511['sessionId']});const _0x221854=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x42c10a=await tt['isBundleUploaded'](_0xc3c148['connection'],_0x221854);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x41ab65})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x41ab65)),'updateRevisions':async _0x2ddc5c=>{await this['_waitForServiceReady']();const _0x33215f=this['_revisionTracker']['currentRevision'];if(_0x42c10a&&0x1===_0x2ddc5c['length']&&_0x2ddc5c[0x0]['id']===_0x33215f['id'])return _0x2ddc5c;for(const _0x133c71 of _0x2ddc5c)_0x133c71['id']===_0x33215f['id']&&(_0x133c71['isEmptyCurrent']=_0x133c71['fromVersion']===_0x133c71['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x2ddc5c,this['_lastRequestId'])['then'](_0x1b094c=>(this['_lastRequestId']=_0x1b094c,_0x2ddc5c))['catch'](_0x25ef1b=>{if(st(_0x25ef1b)||'400'===_0x25ef1b['code']&&void 0x0!==_0x25ef1b['data']['wrongRequestId']){for(const _0x6827c9 of _0x2ddc5c){!this['_revisionTracker']['repository']['getRevision'](_0x6827c9['id'])||this['_revisionTracker']['_bufferUpdate'](_0x6827c9['id'],_0x6827c9,!0x1);}if(st(_0x25ef1b))throw _0x25ef1b;return _0x2ddc5c;}throw _0x25ef1b;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x3e2650,{revisionsData:_0x52fcc4,requestId:_0x30ba17})=>{Math['max'](..._0x52fcc4['map'](_0x268b1a=>_0x268b1a['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x52fcc4,_0x30ba17);}):this['_handleRevisionsUpdate'](_0x52fcc4,_0x30ba17);});const {revisions:_0x111bcc,requestId:_0x4644d3}=await this['_revisionHistoryService']['connect'](_0xc3c148['connection']);_0xc3c148['addToReconnectionStack'](this),this['_lastRequestId']=_0x4644d3,await this['_fetchMissingUsers'](_0x111bcc);for(const _0x39967c of _0x111bcc)this['_revisionTracker']['addRevisionData'](_0x39967c);this['listenTo'](_0x3ba511,'change:_isConnected',(_0x426cba,_0x36b5e3,_0x278ee6)=>{_0x278ee6&&(this['_oldOffset']=_0x3ba511['_offset'],_0x426cba['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0xc3c148,'state',_0x3d42fa=>_0x3d42fa===_0x294a6e['CONNECTED']);}async['reconnect'](){const _0x575cdf=this['editor']['plugins']['get'](c),_0x465b88=this['editor']['plugins']['get'](l),_0x6a0537=async()=>{const _0x21ce6d=this['_revisionTracker']['currentRevision'],_0x427293=_0x21ce6d['id'],_0x35a76a=_0x427293!==_0x465b88['sessionId'];if(_0x35a76a){const _0x50d5b3=_0x465b88['_offset']-this['_oldOffset'],_0x53cffc=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x21ce6d['toVersion']+_0x50d5b3!==_0x53cffc){const _0x167f9f=_0x21ce6d['fromVersion']+_0x50d5b3,_0x52908b=this['editor']['plugins']['get'](_0x11f245),_0x2374d3=this['_revisionTracker']['buildRevisionData']({'revision':_0x21ce6d,'from':_0x167f9f,'to':_0x53cffc});_0x2374d3['id']=_0x21ce6d['id'];const _0x299fcb=_0x2374d3['authorsIds']['map'](_0x30ba1f=>_0x52908b['getUser'](_0x30ba1f));_0x21ce6d['_update']({..._0x2374d3,'authors':_0x299fcb},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x21ce6d['id'],_0x2374d3,!0x0);}this['_revisionTracker']['_startingVersion']=_0x53cffc,(_0x21ce6d['toVersion']===_0x21ce6d['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x427293)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x427293),this['_revisionTracker']['_createCurrentRevision'](_0x53cffc));}const {revisions:_0x4f957f,requestId:_0x57c215}=await this['_revisionHistoryService']['reconnect'](_0x575cdf['connection'],this['_lastRequestId']);_0x35a76a&&_0x4f957f['length']>0x0?_0x465b88['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x4f957f),this['_handleRevisionsUpdate'](_0x4f957f,_0x57c215),this['_revisionTracker']['sendBufferedUpdates']());};return _0x465b88['_isConnected']?_0x6a0537():new Promise((_0x1a86e9,_0x2fd87e)=>{_0x465b88['once']('change:_isConnected',()=>{_0x6a0537()['then'](_0x1a86e9)['catch'](_0x2fd87e);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x3f936d=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x496fac=>{_0x496fac['off'](),_0x3f936d();});});}['_getLatestVersionFromServerOperations'](){const _0xc2a6ea=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x9fcdc5 of _0xc2a6ea)if('marker'!==_0x9fcdc5['type']||_0x9fcdc5['affectsData'])return _0x9fcdc5['baseVersion']+0x1;}['_getLatestVersion'](){const _0x55eea7=this['editor']['plugins']['get'](l);return new Promise(_0x58e560=>{_0x55eea7['_isPendingUpdate']?_0x55eea7['once']('change:_isPendingUpdate',()=>{_0x58e560(this['_getLatestVersionFromServerOperations']());}):_0x58e560(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x49e426,_0x5c015a){const _0x264117=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x5c015a;for(const _0x2f9611 of _0x49e426){const _0x3e8ee5=_0x264117['getRevision'](_0x2f9611['id']);if(_0x3e8ee5){if((_0x2f9611['fromVersion']||_0x2f9611['toVersion'])&&(_0x2f9611['diffData']=null),_0x3e8ee5===this['_revisionTracker']['currentRevision']){const _0x200adf=Math['max'](_0x3e8ee5['toVersion'],_0x2f9611['toVersion']),_0x51bce7=Math['max'](_0x3e8ee5['fromVersion'],_0x2f9611['fromVersion']);let _0x2d440a;_0x3e8ee5['toVersion']===_0x2f9611['toVersion']&&_0x3e8ee5['fromVersion']===_0x2f9611['fromVersion']?(_0x2d440a=!0x0,this['_preventResendingRevisionData'](_0x2f9611)):_0x2f9611['toVersion']===_0x200adf&&_0x2f9611['fromVersion']===_0x51bce7?_0x2d440a=!0x1:(_0x3e8ee5['toVersion']===_0x200adf&&_0x3e8ee5['fromVersion']===_0x51bce7||this['_fixRevision']({'revision':_0x3e8ee5,'from':_0x51bce7,'to':_0x200adf}),_0x2d440a=!0x0),_0x2d440a&&(delete _0x2f9611['fromVersion'],delete _0x2f9611['toVersion'],delete _0x2f9611['diffData'],delete _0x2f9611['createdAt'],delete _0x2f9611['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x2f9611),this['_preventResendingRevisionData'](_0x2f9611);}else this['_revisionTracker']['addRevisionData'](_0x2f9611);}const _0x18a3ef=_0x264117['getRevisions']();_0x18a3ef['reverse']();for(let _0x36978e=0x0;_0x36978e<_0x18a3ef['length']-0x1;_0x36978e++){const _0x210703=_0x18a3ef[_0x36978e],_0x49054e=_0x18a3ef[_0x36978e+0x1];if(_0x210703['fromVersion']<_0x49054e['toVersion']){const _0x267814=_0x49054e['toVersion'],_0x2c71be=Math['max'](_0x267814,_0x210703['toVersion']);this['_fixRevision']({'revision':_0x210703,'from':_0x267814,'to':_0x2c71be});}}}['_fixRevision']({revision:_0x221d25,from:_0x1fa786,to:_0x47e6f1}={}){const _0x1ec727=this['editor']['plugins']['get'](_0x11f245),_0x2eac76=this['_revisionTracker']['buildRevisionData']({'revision':_0x221d25,'from':_0x1fa786,'to':_0x47e6f1});_0x2eac76['authors']=_0x2eac76['authorsIds']['map'](_0x52b29e=>_0x1ec727['getUser'](_0x52b29e)),_0x221d25['_update'](_0x2eac76);}['_preventResendingRevisionData'](_0x504353){const _0x41f766={};_0x41f766['id']=_0x504353['id'];for(const _0x531873 of Object['keys'](_0x504353))'id'!==_0x531873&&(_0x41f766[_0x531873]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x41f766['id'],_0x41f766,!0x0);}async['_fetchMissingUsers'](_0xb8750d){const _0x4175d5=this['editor']['plugins']['get'](_0x11f245),{connection:_0x16d4df}=this['editor']['plugins']['get'](c),_0x8a1c66=new Set();for(const _0x19ec17 of _0xb8750d){for(const _0x4f1b75 of _0x19ec17['authorsIds'])_0x3d3e52(_0x4f1b75);_0x19ec17['creatorId']&&_0x3d3e52(_0x19ec17['creatorId']);}if(0x0===_0x8a1c66['size'])return;const _0x54122d=await dt['getMany'](_0x16d4df,Array['from'](_0x8a1c66));for(const _0x2b0023 of _0x54122d)_0x4175d5['getUser'](_0x2b0023['id'])||_0x4175d5['addUser'](_0x2b0023);function _0x3d3e52(_0xa7083){_0x4175d5['getUser'](_0xa7083)||_0x8a1c66['add'](_0xa7083);}}}function st(_0x5a2b4e){return _0x5a2b4e['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x5a2b4e['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x5a2b4e['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x14de47{static get['requires'](){return['RevisionHistory',u,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class ts extends _0x339a2e{constructor(_0x2cc5ed){super(_0x2cc5ed);const _0x1b9961=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x1b9961['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x1b9961['to']('usersCount',_0x3e165c=>q(_0x2cc5ed,'CONNECTED_USERS',_0x3e165c))}]});}}class es extends _0x339a2e{['items'];['keystrokes'];constructor(_0x24b9d0){super(_0x24b9d0);const _0xe8b9d8=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x348a7e(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0xe8b9d8['if']('hasPopup'),'aria-expanded':_0xe8b9d8['to']('isExpanded',_0xe44123=>this['hasPopup']&&String(_0xe44123)),'aria-label':_0xe8b9d8['to']('hasPopup',_0x1c77da=>q(_0x24b9d0,_0x1c77da?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0xe8b9d8['to']('hasPopup',_0x30637d=>!!_0x30637d&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0xe8b9d8['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x2a437e,_0x14965d,_0x30b934)=>{this['element']&&(_0x30b934?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class L extends _0x339a2e{['counterView'];['inlineListView'];constructor(_0x5e51ef){super(_0x5e51ef);const _0x33363d=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x5e51ef),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x5b513a of this['inlineListView']['items'])_0x5b513a['tooltipPosition']='s';this['inlineListView']['items']['first']&&(this['inlineListView']['items']['first']['tooltipPosition']='se');}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list','ck-reset','ck-rounded-corners',_0x33363d['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x339a2e{['listWrapperView'];constructor(_0x50b340,_0x258e17){super(_0x50b340),this['listWrapperView']=new mt(_0x50b340,_0x258e17),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x50b340,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x844517{constructor(_0x736e10,_0x8f628b){super(_0x736e10);const _0x390e12=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x8f628b?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x390e12['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x390e12['to']('role'),'aria-label':_0x390e12['to']('ariaLabel'),'aria-labelledby':_0x390e12['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x464eca['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x5e41b9=this['element'];_0x5e41b9&&(this['_isScrollable']=Math['max'](_0x5e41b9['scrollHeight'],_0x5e41b9['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x3d2d34,_0x221a3d,_0x4a7911){super(_0x3d2d34);const _0x53dfec=this['bindTemplate'];this['userView']=new ct(_0x3d2d34,_0x221a3d);const _0x23d2db={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x221a3d['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x221a3d['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x221a3d['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x4a7911&&(_0x23d2db['tag']='button',_0x23d2db['on']={'click':_0x53dfec['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x23d2db);}['focus'](){this['element']['focus']();}}class y extends _0x339a2e{['userView'];['markerView'];constructor(_0x1c547b,_0x2a0c8a,_0xa35692){super(_0x1c547b);const _0x2f6b12=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x1c547b,_0x2a0c8a),this['markerView']=new at(_0x1c547b,_0x2a0c8a);const _0x282fba=new ot(_0x1c547b);_0x282fba['template']['tag']='span',_0x282fba['text']=_0x2a0c8a['name'];const _0x13f43a={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x2f6b12['to']('isFocusable',_0x1e0198=>!!_0x1e0198&&0x0),'aria-labelledby':_0x282fba['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x2f6b12['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x2f6b12['to']('hasTooltip',_0x3d3fa7=>!_0x3d3fa7),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x282fba]};_0xa35692&&(_0x13f43a['tag']='button',_0x13f43a['on']={'click':_0x2f6b12['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x13f43a);}}class at extends _0x339a2e{constructor(_0x40749d,_0x3a1e29){super(_0x40749d),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x3a1e29['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x5b7fc6{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x2db825){super(_0x2db825),this['context']['config']['define']('presenceList',A);const _0x59ce41=_0x2db825['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x59ce41)throw new _0x4a76a1('presencelist-collapseat-invalid-format',this);if(_0x59ce41<0x1)throw new _0x4a76a1('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x522579(),this['balloonPanelView']=new _0x587910(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x258838 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x258838);this['listenTo'](this['_allConnectedUsers'],'add',(_0x525d61,_0x24032f)=>{this['_handleUserAdd'](_0x24032f);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x43f1fd,_0x4d59c7)=>{this['_handleUserRemove'](_0x4d59c7);});}['_createView'](){const _0x533bf6=this['context'],_0x2438f2=new L(this['context']['locale']),_0x409856=this['balloonPanelView'];if(!_0x12ec12(_0x533bf6['config']['get']('presenceList.container')))throw new _0x4a76a1('presencelist-missing-container',this);return _0x2438f2['counterView']['bind']('usersCount')['to'](this),_0x2438f2['bind']('isCollapsed')['to'](this,'usersCount',_0x4e3fdc=>{const {collapseAt:_0x44c136,displayMe:_0x358998}=_0x533bf6['config']['get']('presenceList'),_0x2e0f5a=_0x4e3fdc>=_0x44c136;return _0x2438f2['counterView']['isHidden']=!(0x1==_0x4e3fdc&&_0x358998||_0x2e0f5a),_0x2e0f5a||this['hideDropdown'](),_0x2e0f5a;}),_0x2438f2['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x2a6a6d=>{const _0x478558=_0x533bf6['config']['get']('presenceList'),_0x30379d=new y(_0x533bf6['locale'],_0x2a6a6d,!!_0x478558['onClick']);return _0x30379d['bind']('hasTooltip')['to'](_0x2438f2,'isCollapsed',_0x2db536=>!_0x2db536),_0x30379d['bind']('isFocusable')['to'](_0x2438f2,'isCollapsed',_0x456be8=>!_0x456be8),_0x478558['onClick']&&this['listenTo'](_0x30379d,'execute',()=>{this['view']['isCollapsed']||_0x478558['onClick'](_0x2a6a6d,_0x30379d['element']);}),_0x30379d;}),this['listenTo'](_0x2438f2['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x2438f2['inlineListView']['keystrokes']['set']('Enter',(_0x3c2535,_0x206ed6)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x206ed6());}),_0x2438f2['render'](),_0x409856['render'](),_0x38d9a6({'emitter':_0x2438f2,'activator':()=>_0x409856['isVisible'],'contextElements':[_0x409856['element'],_0x2438f2['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x533bf6['config']['get']('presenceList.container')['appendChild'](_0x2438f2['element']),this['_bodyCollection']=new _0x173f50(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x2438f2;}['_handleUserAdd'](_0x38acc4){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x38acc4['isMe'])return;const _0x3e0356=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x3e0356&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x2d97cc=_0x38acc4['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x38acc4,_0x2d97cc);}['_handleUserRemove'](_0xde341b){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0xde341b['id'])&&(this['currentDisplayedUsers']['remove'](_0xde341b['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x1dcb7f of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x1dcb7f['id']))return void this['currentDisplayedUsers']['add'](_0x1dcb7f,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x59f82f=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x59f82f['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x5959f2}=this['presenceDropdownView'];_0x5959f2['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x523196=>{if(!_0x59f82f['displayMe']&&_0x523196['isMe'])return null;const _0x37f6c6=new k(this['context']['locale'],_0x523196,!!_0x59f82f['onClick']);return _0x59f82f['onClick']&&this['listenTo'](_0x37f6c6,'execute',()=>{_0x59f82f['onClick'](_0x523196,_0x37f6c6['element']);}),_0x37f6c6;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x5959f2['focus'](),_0x5959f2['checkIfScrollable']();const _0x7c221d=(_0x455916,_0x52be95)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x52be95();};_0x5959f2['keystrokes']['set']('Esc',_0x7c221d),_0x5959f2['keystrokes']['set']('Shift+Tab',_0x7c221d),_0x5959f2['keystrokes']['set']('Tab',(_0x531e1e,_0x5a62b3)=>{!function(_0x595c9a){const _0xe6373d=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x246659=>_0x246659+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x1b4e2f=[...document['body']['querySelectorAll'](_0xe6373d)]['filter'](_0x7ab03a=>_0x7ab03a===document['activeElement']||_0x7ab03a['offsetWidth']+_0x7ab03a['offsetHeight']>0x0)['sort']((_0x3bbe17,_0x16ab21)=>(_0x3bbe17['tabIndex']||0x0)-(_0x16ab21['tabIndex']||0x0)),_0x3b84cd=_0x1b4e2f['indexOf'](_0x595c9a),_0x13213f=_0x1b4e2f[(_0x3b84cd+0x1)%_0x1b4e2f['length']];_0x13213f&&_0x13213f['focus']();}(this['view']['element']),this['hideDropdown'](),_0x5a62b3();}),_0x5959f2['focusTracker']['add'](this['view']['element']),_0x5959f2['focusTracker']['on']('change:isFocused',(_0x355a45,_0xc5dc65,_0x4e6385)=>{_0x4e6385||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class s extends _0x5b7fc6{static get['requires'](){return[i,r];}static get['pluginName'](){return'PresenceList';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{a as CloudServicesCommentsAdapter,u as CloudServicesRevisionHistoryAdapter,f as CloudServicesTrackChangesAdapter,s as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,g as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
|
|
23
|
+
import{ContextPlugin as _0x39d5da,Plugin as _0x27d590,PendingActions as _0x19f112,Context as _0x5bfadf}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x33556b,CKEditorError as _0x1b7f9d,Collection as _0x5537fa,global as _0x31082d,version as dt,uid as _0x40aeaa,KeystrokeHandler as _0x127892}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x362261,View as _0x223bed,ListView as _0x6c055f,ListItemView as ct,LabelView as lt,BalloonPanelView as tt,clickOutsideHandler as _0x4367c7,BodyCollection as st}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ut,History as _0x8e518f,NoOperation as _0x33216c,InsertOperation as _0x2522c2,MarkerOperation as _0x5d0fef,RootAttributeOperation as _0x46ec06,transformSets as _0x5b6935,OperationFactory as _0x35f2d5}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as ft,WEB_SOCKET_GATEWAY_STATES as _0x151d50,CollaborativeEditingService as _0xe5ae00,User as mt,CommentsService as _0x1c0992,TrackChangesService as _0x309631,RevisionHistoryService as _0x1d8807,EditorService as _0x35e74c}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x59a1a9,UserView as at}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x4d8a5d}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as it}from'lodash-es';class c extends _0x39d5da{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
|
|
24
|
+
((()=>ft)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x362261];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3375d8){super(_0x3375d8),this['set']('state',_0x151d50['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x33556b);}['init'](){const _0x2a09ac=this['context'],_0x415330=_0x2a09ac['plugins']['get']('CloudServices'),_0x51df11=_0x2a09ac['plugins']['get'](_0x362261);if(!_0x415330['token'])throw new _0x1b7f9d('websocketgateway-missing-token',this);if(!_0x415330['webSocketUrl'])throw new _0x1b7f9d('websocketgateway-missing-websocket-url',this);return this['_domEmitter']['listenTo'](window,'offline',()=>this['_isBrowserOffline']=!0x0),this['_domEmitter']['listenTo'](window,'online',()=>this['_isBrowserOffline']=!0x1),this['context']['config']['define']('cloudServices.connectionTimeout',0xa),this['context']['config']['define']('cloudServices.requestTimeout',0x14),c['WebSocketGateway']['connect'](_0x415330['token'],_0x415330['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x209ea8=>{if(this['connection']=_0x209ea8,this['bind']('state')['to'](_0x209ea8,'state',this,'_isBrowserOffline',(_0x199148,_0x3bad9e)=>('connected'!==_0x199148&&(this['_shouldPluginsReconnect']=!0x0),_0x3bad9e||_0x199148!==_0x151d50['CONNECTED']?_0x151d50['DISCONNECTED']:this['state']==_0x151d50['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x151d50['CONNECTING']):_0x151d50['CONNECTED'])),this['connection']['on']('error',(_0xc23a0,_0x4ec1e9)=>{if('limitExceeded'!==_0x4ec1e9['code'])throw console['error'](_0x4ec1e9),new _0x1b7f9d('cloudservices-init',null,{'originalError':_0x4ec1e9});_0x51df11['showWarning']('The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.',{'title':'Connected\x20users\x20limit\x20exceeded','namespace':'real-time-collaboration'});}),!_0x209ea8['me'])return new Promise(_0x50a6d1=>_0x209ea8['on']('change:me',_0x50a6d1));})['catch'](_0x305d5f=>{throw console['error'](_0x305d5f),new _0x1b7f9d('cloudservices-init',null,{'originalError':_0x305d5f});});}['addToReconnectionStack'](_0x45f00a){if('function'!=typeof _0x45f00a['reconnect'])throw new _0x1b7f9d('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x45f00a))throw new _0x1b7f9d('websocketgateway-plugin-already-registered',this,{'name':_0x45f00a['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x45f00a);}['removeFromReconnectionStack'](_0x5553f4){this['_reconnectionStack']['delete'](_0x5553f4);}['isInReconnectionStack'](_0x552d62){return this['_reconnectionStack']['has'](_0x552d62);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0xdfaa54=>_0xdfaa54['reconnect']())))['then'](()=>this['state']=_0x151d50['CONNECTED'])['catch'](_0x57d6a2=>{throw console['error'](_0x57d6a2),new _0x1b7f9d('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x151d50['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x39d5da{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[c,_0x59a1a9];}constructor(_0xe95990){super(_0xe95990),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x5537fa(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x59a1a9);}['init'](){const _0x26cd45=this['context']['plugins']['get'](c);this['listenTo'](_0x26cd45,'change:state',(_0x21879b,_0x3f5834,_0x5a3fd8)=>{if('connected'!==_0x5a3fd8)this['channelSessions']['forEach'](_0x44366b=>_0x44366b['clear']()),this['channelConnectedUsers']['forEach'](_0x55724c=>_0x55724c['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0xd74cd,_0x4cb996]of this['_registeredSessions'])for(const _0xc297f3 of _0x4cb996)this['_handleSessionAdd'](_0xd74cd,_0xc297f3);}}),this['_createUser'](_0x26cd45['connection']['me'],!0x0);}['register'](_0x5dea34,_0x47b944){if(this['_registeredSessions']['has'](_0x5dea34))throw new _0x1b7f9d('sessions-register-already-registered',null,{'channelId':_0x5dea34});this['_registeredSessions']['set'](_0x5dea34,_0x47b944),this['channelSessions']['set'](_0x5dea34,new _0x5537fa()),this['channelConnectedUsers']['set'](_0x5dea34,new _0x5537fa()),this['listenTo'](_0x47b944,'add',(_0x27342e,_0x313d17)=>this['_handleSessionAdd'](_0x5dea34,_0x313d17)),this['listenTo'](_0x47b944,'remove',(_0x538d66,_0xbc50dd)=>this['_handleSessionRemove'](_0x5dea34,_0xbc50dd));for(const _0x8b80cc of _0x47b944)this['_handleSessionAdd'](_0x5dea34,_0x8b80cc);}['unregister'](_0x5ae613){if(!this['_registeredSessions']['has'](_0x5ae613))throw new _0x1b7f9d('sessions-unregister-not-exist',null,{'channelId':_0x5ae613});const _0x481e0f=this['_registeredSessions']['get'](_0x5ae613);this['stopListening'](_0x481e0f);for(const _0x35f0cf of _0x481e0f)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x5ae613,_0x35f0cf);this['_registeredSessions']['delete'](_0x5ae613),this['channelSessions']['delete'](_0x5ae613),this['channelConnectedUsers']['delete'](_0x5ae613);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0xd648c1){for(const _0x5d5518 of this['channelSessions']['values']())for(const _0x11f888 of _0x5d5518)if(_0x11f888['id']===_0xd648c1)return _0x11f888['user'];}['getUserSessions'](_0x5d30eb,_0x3d152){const _0x13e980=_0x3d152?[this['channelSessions']['get'](_0x3d152)]:this['channelSessions']['values'](),_0x103933=new Set();for(const _0x3cef0c of _0x13e980)for(const _0x2d6524 of _0x3cef0c)_0x2d6524['user']['id']===_0x5d30eb['id']&&_0x103933['add'](_0x2d6524['id']);return _0x103933;}['getUserRole'](_0x303ce0){for(const _0x5e7491 of this['channelSessions']['values']())for(const _0x348baa of _0x5e7491)if(_0x348baa['user']===_0x303ce0)return _0x348baa['role'];}['_handleSessionAdd'](_0x3dafd5,_0x5bf288){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x4488aa=_0x5bf288['user'],_0x336e56=this['_users']['getUser'](_0x4488aa['id'])||this['_createUser'](_0x4488aa),_0x20775=Object['assign']({},_0x5bf288,{'user':_0x336e56});this['channelSessions']['get'](_0x3dafd5)['add'](_0x20775);const _0x54ec06=this['channelConnectedUsers']['get'](_0x3dafd5);_0x54ec06['has'](_0x336e56['id'])||_0x54ec06['add'](_0x336e56),this['allConnectedUsers']['has'](_0x336e56['id'])||this['allConnectedUsers']['add'](_0x336e56,_0x336e56['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x3dafd5,{'channelId':_0x3dafd5,'session':_0x20775});}['_handleSessionRemove'](_0xf9f9c,_0x1b1267){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x4d129a=this['channelConnectedUsers']['get'](_0xf9f9c),_0x217506=_0x1b1267['user'];_0x217506['id']&&(this['channelSessions']['get'](_0xf9f9c)['remove'](_0x1b1267['id']),_0x4d129a['has'](_0x217506['id'])&&!this['getUserSessions'](_0x217506,_0xf9f9c)['size']&&_0x4d129a['remove'](_0x217506['id']),this['allConnectedUsers']['get'](_0x217506['id'])&&!this['getUserSessions'](_0x217506)['size']&&this['allConnectedUsers']['remove'](_0x217506['id']));}['_createUser'](_0x1c7d98,_0x5e0dec){const _0x3d9646=this['_users']['addUser'](_0x1c7d98);return _0x5e0dec&&this['_users']['defineMe'](_0x1c7d98['id']),_0x3d9646['orderNumber']=this['_uniqueUsersCount']++,_0x3d9646;}}class N extends _0x27d590{['_domEmitter']=new(_0x33556b())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x4c7266=this['editor'],_0x35e51b=_0x4c7266['plugins']['get'](i);_0x4c7266['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x404273,{writer:_0x1c9a79})=>function(_0x5f462b,_0x2e1143,_0x586c3d,_0x5803e8){const _0x26260f=_0x5f462b['markerName']['split'](':')[0x2],_0x3dc808=_0x586c3d['getUserBySessionId'](_0x26260f);if(!_0x3dc808||_0x26260f===_0x586c3d['mySessionId'])return;if(!_0x5803e8['model']['schema']['checkChild'](_0x5f462b['markerRange']['start'],'$text'))return;const _0x60c88b={'class':'ck-user__marker\x20'+_0x3dc808['color']['getMarkerClass'](),'data-name':_0x3dc808['name'],'data-session-id':_0x26260f},_0x176c8f=_0x5803e8['model']['markers']['get'](_0x5f462b['markerName']),_0x394d90=_0x176c8f['getStart'](),_0x13652a=_0x394d90['nodeAfter'],_0x3e4a47=_0x5803e8['model']['schema'];if(_0x13652a&&_0x3e4a47['isObject'](_0x13652a)&&_0x3e4a47['isInline'](_0x13652a)&&!_0x5803e8['model']['markers']['get']('user:range:'+_0x26260f)['getRange']()['isCollapsed'])return;const _0x45c07a=_0x394d90['parent'];return _0x5803e8['model']['schema']['isLimit'](_0x45c07a)&&!_0x5803e8['model']['hasContent'](_0x45c07a)&&(_0x60c88b['contenteditable']=!0x1),function(_0xc4eb6e,_0x284638,_0x4f2227){const _0x198459=_0xc4eb6e['createUIElement']('span',_0x284638);return _0xc4eb6e['setCustomProperty']('userPositionMarker',!0x0,_0x198459),_0x198459['render']=function(_0xa27a54){const _0x4d7d4a=this['toDomElement'](_0xa27a54);return _0x4d7d4a['innerHTML']='<span\x20class=\x22ck-user__marker-line\x22\x20contenteditable=\x22false\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span><span\x20class=\x22ck-user__marker-tooltip\x22\x20contenteditable=\x22false\x22\x20spellcheck=\x22false\x22>'+_0x4f2227['name']+'</span>',_0x4d7d4a['addEventListener']('mouseenter',()=>{_0x4d7d4a['classList']['add']('ck-user__marker_hovered');}),_0x4d7d4a['addEventListener']('mouseleave',()=>{_0x4d7d4a['classList']['remove']('ck-user__marker_hovered');}),_0x4d7d4a;},_0x198459['isSimilar']=function(_0x4fb102){return!(!this['getCustomProperty']('userPositionMarker')||!_0x4fb102['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x4fb102['getAttribute']('data-session-id'));},_0x198459;}(_0x2e1143,_0x60c88b,_0x3dc808);}(_0x404273,_0x1c9a79,_0x35e51b,_0x4c7266)}),_0x4c7266['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x1998bd=>function(_0x495446,_0x1f7714){const _0x4c278a=_0x495446['markerName']['split'](':')[0x2];if(_0x4c278a===_0x1f7714['mySessionId'])return null;const _0x1a7e87=_0x1f7714['getUserBySessionId'](_0x4c278a);if(!_0x1a7e87)return{'id':_0x4c278a,'classes':[]};return{'id':_0x4c278a,'classes':['ck-user__selection',_0x1a7e87['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x4c278a},'priority':0x7d0+_0x1a7e87['orderNumber']};}(_0x1998bd,_0x35e51b)}),function(_0x1ec68e){const _0x37516e=_0x1ec68e['model'],_0x58018a=new Map(),_0x132b6a=_0x1ec68e['plugins']['get'](i);_0x37516e['markers']['on']('update:user:range',(_0x518715,_0x2dfa58,_0x1f1077,_0x20ade9)=>{if(!_0x20ade9&&_0x58018a['get'](_0x2dfa58['name']))return _0x58018a['get'](_0x2dfa58['name'])['detach'](),void _0x58018a['delete'](_0x2dfa58['name']);const _0x399a82=_0x2dfa58['name']['split'](':')[0x2];if(_0x399a82===_0x132b6a['mySessionId'])return;const _0x5f8381='user:position:'+_0x399a82;_0x37516e['markers']['has'](_0x5f8381)&&_0x1ec68e['editing']['reconvertMarker'](_0x5f8381),_0x2dfa58['on']('change:range',(_0x24781e,_0x24ca28,_0xdff982)=>{if('$graveyard'!=_0x24ca28['root']['rootName']&&'$graveyard'==_0x2dfa58['getRange']()['root']['rootName']&&!_0x58018a['has'](_0x2dfa58['name'])){const _0x34a376=_0x37516e['schema']['getNearestSelectionRange'](_0xdff982['deletionPosition']);if(_0x34a376){const _0x5b46e8=ut['fromRange'](_0x34a376);_0x58018a['set'](_0x2dfa58['name'],_0x5b46e8),_0x5b46e8['on']('change:range',(_0x16f462,_0x35ec89,_0x3553a3)=>{if('$graveyard'==_0x5b46e8['root']['rootName']){const _0x35e2cc=_0x37516e['schema']['getNearestSelectionRange'](_0x3553a3['deletionPosition']);_0x35e2cc?(_0x5b46e8['start']=_0x35e2cc['start'],_0x5b46e8['end']=_0x35e2cc['end']):(_0x58018a['delete'](_0x2dfa58['name']),_0x5b46e8['detach']());}});}}});}),_0x37516e['document']['on']('change',()=>{_0x58018a['size']>0x0&&_0x37516e['enqueueChange']({'isUndoable':!0x1},_0x30545d=>{for(const [_0x1a4be0,_0x5e0369]of _0x58018a)'$graveyard'==_0x37516e['markers']['get'](_0x1a4be0)['getRange']()['root']['rootName']&&(G(_0x1a4be0['split'](':')[0x2],_0x5e0369['toRange'](),_0x37516e,_0x30545d),_0x5e0369['detach']());_0x58018a['clear']();});});}(_0x4c7266),this['_domEmitter']['listenTo'](_0x31082d['document'],'keydown',(_0x978dbf,{key:_0x200ada})=>{'Escape'===_0x200ada&&function(_0x196998){_0x196998['editing']['view']['change'](_0x436070=>{for(const _0x4547a9 of _0x196998['model']['markers']){if(!_0x4547a9['name']['startsWith']('user:position'))continue;const _0x31f6e5=_0x196998['editing']['mapper']['markerNameToElements'](_0x4547a9['name']);if(_0x31f6e5){for(const _0x2108cc of _0x31f6e5)_0x436070['removeClass']('ck-user__marker_hovered',_0x2108cc);}}});}(_0x4c7266);},{'useCapture':!0x0});}['afterInit'](){const _0x4277d5=this['editor'],_0x1e0e9f=_0x4277d5['commands']['get']('undo');_0x1e0e9f&&_0x4277d5['model']['on']('applyOperation',(_0x17f041,_0x2f22b1)=>{const _0x5b652e=_0x2f22b1[0x0];if('marker'!=_0x5b652e['type']||!_0x5b652e['name']['startsWith']('user:'))return;const _0x532129=_0x5b652e['batch'];_0x1e0e9f['_createdBatches']['has'](_0x532129)&&(_0x5b652e['newRange']=_0x5b652e['oldRange']?_0x4277d5['model']['createRange'](_0x5b652e['oldRange']['start'],_0x5b652e['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x41aa55=this['editor'],_0x362f0f=_0x41aa55['model']['document'],_0x46d4e0=_0x41aa55['plugins']['get'](i);_0x41aa55['model']['enqueueChange']({'isUndoable':!0x1},_0x498388=>{const _0x5e6ad2='user:range:'+_0x46d4e0['mySessionId'],_0x17cf1f='user:position:'+_0x46d4e0['mySessionId'],_0xa775a1=_0x41aa55['model']['markers']['has'](_0x5e6ad2);_0x41aa55['editing']['view']['hasDomSelection']?G(_0x46d4e0['mySessionId'],_0x362f0f['selection']['getFirstRange'](),_0x41aa55['model'],_0x498388):_0xa775a1&&(_0x498388['removeMarker'](_0x5e6ad2),_0x498388['removeMarker'](_0x17cf1f));});}}function G(_0x32f02a,_0x417a8c,_0x5dd7f3,_0x4d7aff){const _0x4c3741='user:range:'+_0x32f02a,_0x5d86a1='user:position:'+_0x32f02a,_0x3887c3=_0x417a8c['getContainedElement']();let _0x5997cd=_0x417a8c['start'];_0x3887c3&&_0x3887c3['is']('element','tableCell')&&(_0x5997cd=function(_0x5dc32e,_0x49c199){for(const _0x4ba8f6 of _0x5dc32e['getPositions']())if(_0x49c199['schema']['checkChild'](_0x4ba8f6,'$text'))return _0x4ba8f6;}(_0x417a8c,_0x5dd7f3),_0x417a8c=_0x4d7aff['createRange'](_0x5997cd));const _0x5cc2a0=_0x4d7aff['createRange'](_0x5997cd);_0x5dd7f3['markers']['has'](_0x4c3741)?(_0x4d7aff['updateMarker'](_0x4c3741,{'range':_0x417a8c}),_0x4d7aff['updateMarker'](_0x5d86a1,{'range':_0x5cc2a0})):(_0x4d7aff['addMarker'](_0x4c3741,{'range':_0x417a8c,'usingOperation':!0x0}),_0x4d7aff['addMarker'](_0x5d86a1,{'range':_0x5cc2a0,'usingOperation':!0x0}));}function E(_0x1e8d76,_0x145db9,_0x4b0bb6){const _0x3b705f=_0x1e8d76['t'],t=_0x1e8d76['t'];switch(_0x145db9){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');case'PENDING_ACTION_REVISION_HISTORY':return _0x3b705f({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x4b0bb6);default:return'';}}let M=0x1;class l extends _0x27d590{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
+
((()=>_0xe5ae00)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,N,_0x19f112,_0x59a1a9,_0x362261];}static get['pluginName'](){return'RealTimeCollaborationClient';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x5833ff=this['serverHistory']['getOperations']();for(let _0x43a662=_0x5833ff['length']-0x1;_0x43a662>=0x0;_0x43a662--){const _0x5bc86b=_0x5833ff[_0x43a662];if(!this['_disconnectionOperations']['has'](_0x5bc86b))return _0x5bc86b['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x3f76bd){if(super(_0x3f76bd),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x8e518f(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x1b7f9d('collaboration-missing-channelid',this);const _0x1dd62a=_0x3f76bd['config']['get']('cloudServices.bundleVersion')||dt;this['_service']=new l['CollaborativeEditingService'](_0x1dd62a,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x4d8a5d(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new W(this['_disconnectionOperations']);}['init'](){const _0x1be984=this['editor'],_0x43c443=_0x1be984['plugins']['get'](_0x59a1a9),_0x34130f=_0x1be984['plugins']['get'](c);this['listenTo'](_0x43c443,'getOperationAuthor',(_0x4ea714,_0x2b92f9)=>{const _0xe1f9ce=_0x2b92f9[0x0];_0xe1f9ce['_authorId']&&(_0x4ea714['return']=_0x43c443['getUser'](_0xe1f9ce['_authorId']),_0x4ea714['stop']()),null===_0xe1f9ce['_authorId']&&(_0x4ea714['return']=null,_0x4ea714['stop']());},{'priority':'high'}),this['listenTo'](_0x1be984['model']['document']['selection'],'change:range',(_0x4cd3e9,_0x5da977)=>{_0x5da977['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x1be984['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x1be984['model']['on']('applyOperation',(_0x150bd4,_0x38b8d3)=>{const _0x3d9825=_0x38b8d3[0x0];_0x3d9825['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x3d9825),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x34130f,'state',this,'_hasSynchronizationProblem',(_0x32f5e4,_0x13b35f)=>'connected'===_0x32f5e4&&!_0x13b35f),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x1be984['disableReadOnlyMode']('rtc-offline'):_0x1be984['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x1be984['disableReadOnlyMode']('rtc-offline'):_0x1be984['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x25fcdf=this['editor']['plugins']['get'](i),_0x5813d8=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x25fcdf['unregister'](this['_channelId']);const _0x459388=await this['_service']['reconnect'](_0x5813d8['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x459388)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x4223da=await this['_service']['getConnectedSessions']();_0x25fcdf['register'](this['_channelId'],_0x4223da),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x281166){if(function(_0xbf4234){return'404'===_0xbf4234['code'];}(_0x281166)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x28570d){return'409'===_0x28570d['code'];}(_0x281166)){const _0x5a37a6=E(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x5a37a6);}else{if(!(_0x281166 instanceof z))throw _0x281166;this['_handleReconnectionError']();}}}}['destroy'](){const _0x105d5a=this['editor']['plugins']['get'](c),_0x42aade=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x42aade['channelSessions']['has'](this['_channelId'])&&_0x42aade['unregister'](this['_channelId']),_0x105d5a['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x5f32e9){if(this['sessionId']!==_0x5f32e9['sessionId']&&this['_lastSyncedOperationId']!==_0x5f32e9['lastOperationId'])throw new z();return this['sessionId']=_0x5f32e9['sessionId'],this['_handleServerResponse']([],{..._0x5f32e9,'wereChangesApplied':!0x1,'data':_0x5f32e9['data']},'reconnect');}async['_connectService'](_0x20029d,_0x471633=!0x1){const {connection:_0x4e30cc}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x4e30cc,this['_channelId'])['then'](_0x519662=>this['_initSessionsHandling'](_0x519662))['catch'](_0x252ba6=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x252ba6);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x17b0f7,_0x17f985)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x17f985);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x24444b=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x20029d);this['_isPendingUpdate']=!0x0;const _0xb0634a=await this['_service']['connect'](_0x4e30cc,this['_compressOperations'](_0x20029d),_0x24444b);if(this['sessionId']=_0xb0634a['sessionId'],_0x471633){if(!_0xb0634a['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0xb0634a['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x20029d,_0xb0634a,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0xb0634a,_0x20029d);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x5ea37d=this['editor']['plugins']['get'](i),_0x3bb0e2=this['editor']['plugins']['get'](N),_0x3bc37c=_0x5ea37d['channelSessions']['get'](this['_channelId']);_0x3bc37c&&_0x3bc37c['length']>0x1?_0x3bb0e2['createUserMarkerOperations']():this['listenTo'](_0x5ea37d,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x5ea37d['channelSessions']['get'](this['_channelId'])['length']&&_0x3bb0e2['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x18aa77,_0x2c0c74,_0x4cbe7a,_0x5a673e){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x2c0c74){const _0x32acac=this['_decompressOperations'](_0x4cbe7a,_0x5a673e);await this['_fetchMissingUsers'](_0x32acac),this['_handleExternalOperations'](_0x32acac,_0x2c0c74,_0x4cbe7a['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x3dc56d}=this['editor'];let _0x221fdc;try{_0x221fdc=await this['_service']['getDocumentDetails']();}catch(_0x34dbf8){const _0x122e7a=E(_0x3dc56d,'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');return void this['_handleReconnectionError'](_0x122e7a);}const _0x55595e=_0x221fdc['currentDocumentSession']||_0x221fdc['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x55595e['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x18ecd7=E(_0x3dc56d,'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x18ecd7);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x53fa87){const _0x97216=this['editor']['plugins']['get'](i);this['listenTo'](_0x97216,'sessionAdd:'+this['_channelId'],(_0x13f8fd,{session:_0x10a8dc})=>{if(_0x10a8dc['id']===_0x97216['mySessionId']){_0x13f8fd['off']();const _0x2e5a35=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x12eb68=_0x10a8dc['permissions'];_0x2e5a35&&_0x2e5a35['isEnabled']&&(_0x12eb68=_0x12eb68['filter'](_0x5148ec=>'document:write'!==_0x5148ec)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x12eb68,this['_channelId']);}}),_0x97216['register'](this['_channelId'],_0x53fa87);}['_initThrowingOnDataSet'](){const _0x4bc4a4=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x5e258f)=>{if(!_0x5e258f[_0x5e258f['length']-0x1]['suppressErrorInCollaboration'])throw new _0x1b7f9d('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x4bc4a4['apply'](this['editor']['data'],_0x5e258f);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x3f70fd,[_0x3361eb])=>{if(this['_document']['version'])throw new _0x1b7f9d('realtimecollaborationclient-init-document-already-initialized',this);_0x3f70fd['stop'](),this['_setPendingAction']();const _0x4b2275=this['editor']['config']['get']('rootsAttributes'),_0x22acd7=this['_getOperationsFromInitData'](_0x3361eb,_0x4b2275);0x0==_0x22acd7['length']&&_0x22acd7['push'](new _0x33216c(0x0)),_0x3f70fd['return']=this['_connectService'](_0x22acd7)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x165bc4=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x165bc4))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0xdae4fa,[_0x2d88dd,_0x1ce810])=>{_0xdae4fa['stop']();const _0x38740a=this['editor']['model']['document']['getRoot'](_0x2d88dd);if(!this['_knownRootNames']['has'](_0x2d88dd)){const _0x7d481e=_0x1ce810&&_0x1ce810['data']?_0x1ce810['data']:'',_0x1250cc=_0x1ce810&&_0x1ce810['attributes']?_0x1ce810['attributes']:{};await this['_loadRoot'](_0x2d88dd,_0x7d481e,_0x1250cc);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x38740a['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x38740a);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x52bc9b){const _0x1247c8=this['editor']['plugins']['get'](_0x59a1a9),{connection:_0x4ee3f1}=this['editor']['plugins']['get'](c),_0x925baa=new Set();for(const _0xf4b75c of _0x52bc9b){const _0x4256be=_0xf4b75c['_authorId'];_0x4256be&&!_0x1247c8['getUser'](_0x4256be)&&_0x925baa['add'](_0x4256be);}if(0x0===_0x925baa['size'])return;const _0x30e184=await mt['getMany'](_0x4ee3f1,Array['from'](_0x925baa));for(const _0x1abf0b of _0x30e184)_0x1247c8['getUser'](_0x1abf0b['id'])||_0x1247c8['addUser'](_0x1abf0b);}['_getOperationsFromInitData'](_0x280058,_0x508e62={}){const _0x18d453=this['editor']['model'],_0x6012c0=[];let _0x379391=0x0;const _0x1d4d3f='string'==typeof _0x280058?{'main':_0x280058}:_0x280058;for(const _0x453684 of Object['keys'](_0x1d4d3f)){if(!this['_document']['roots']['has'](_0x453684))throw new _0x1b7f9d('realtimecollaborationclient-init-non-existent-root',this);const _0x6da3a3=this['editor']['data']['parse'](_0x1d4d3f[_0x453684]),_0x45be7d=this['_document']['getRoot'](_0x453684),_0x404860=new _0x2522c2(_0x18d453['createPositionAt'](_0x45be7d,0x0),_0x6da3a3,_0x379391++);_0x6012c0['push'](_0x404860);for(const [_0x3b7f0d,_0x457ef]of _0x6da3a3['markers']){const _0x34c780=_0x18d453['createRange'](_0x18d453['createPositionFromPath'](_0x45be7d,_0x457ef['start']['path']['slice']()),_0x18d453['createPositionFromPath'](_0x45be7d,_0x457ef['end']['path']['slice']())),_0x2fac1f=new _0x5d0fef(_0x3b7f0d,null,_0x34c780,_0x18d453['markers'],!0x0,_0x379391++);_0x6012c0['push'](_0x2fac1f);}}if(_0x508e62)for(const [_0x4417fd,_0x221c46]of Object['entries'](_0x508e62)){const _0x30c126=_0x18d453['document']['getRoot'](_0x4417fd);if(!_0x30c126)throw new _0x1b7f9d('multi-root-editor-root-attributes-no-root',null);for(const [_0x4e8056,_0x1ec288]of Object['entries'](_0x221c46))if(null!==_0x1ec288){const _0x5b8b33=new _0x46ec06(_0x30c126,_0x4e8056,null,_0x1ec288,_0x379391++);_0x6012c0['push'](_0x5b8b33);}}return _0x6012c0;}async['_loadRoot'](_0x18b73f,_0x2d288c,_0x68fba2){this['_getOperationsFromInitData']({[_0x18b73f]:_0x2d288c},{[_0x18b73f]:_0x68fba2})['forEach']((_0x26fd74,_0x2aea2f)=>{_0x26fd74['baseVersion']=this['_document']['version']+_0x2aea2f,_0x26fd74['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x26fd74);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x2d5525,_0x2f91ce){let _0x33d061;this['_offset']=_0x2d5525['offset'];const _0x36408e=_0x2d5525['wereChangesApplied']&&!_0x2d5525['initData'],_0x58ff27=_0x36408e?0x0:_0x2d5525['data']['baseVersion'];if(_0x2f91ce['forEach'](_0x2714bc=>{_0x2714bc['_isInit']=!0x0,_0x2714bc['createdAt']=_0x2d5525['sessionCreatedAt'],_0x2714bc['_authorId']=null;}),_0x36408e)_0x33d061=_0x2f91ce,this['_applyOperationsSet'](_0x33d061,_0x36408e);else{if(_0x2d5525['initData']){const _0x1731fd=this['_getOperationsFromInitData'](_0x2d5525['initData']);this['_document']['history']['version']=-_0x1731fd['length'],_0x1731fd['forEach'](_0x3140a5=>{_0x3140a5['baseVersion']-=_0x1731fd['length'],_0x3140a5['createdAt']=_0x2d5525['sessionCreatedAt'],_0x3140a5['_isInit']=!0x0,_0x3140a5['_authorId']=null;}),this['_applyOperationsSet'](_0x1731fd,!0x0),this['serverHistory']['version']=-_0x1731fd['length']+this['_offset'],this['_updateServerHistory'](_0x1731fd);}this['_document']['history']['version']=_0x58ff27,_0x33d061=this['_decompressOperations'](_0x2d5525['data'],_0x2d5525['metadata']),await this['_fetchMissingUsers'](_0x33d061),this['_applyOperationsSet'](_0x33d061,_0x36408e);}_0x2d5525['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x33d061,_0x2d5525['lastOperationId']),this['_lastSyncedOperationId']=_0x2d5525['lastOperationId']),this['serverHistory']['version']=_0x58ff27+this['_offset'],this['_updateServerHistory'](_0x33d061),_0x2f91ce['filter'](_0x15b68d=>{const _0xb75bed=this['_getAffectedRoot'](_0x15b68d);return _0xb75bed&&!this['_knownRootNames']['has'](_0xb75bed);})['forEach']((_0x5bde4f,_0x296c48)=>{_0x5bde4f['baseVersion']=this['_document']['version']+_0x296c48,this['_saveOperationInBuffer'](_0x5bde4f);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x4ca936,_0x1b64fd,_0x11a74b){throw this['_isPendingUpdate']=!0x0,_0x1b64fd&&console['error'](_0x1b64fd),_0x11a74b&&this['editor']['enableReadOnlyMode']('realtimecollaborationclient-error'),new _0x1b7f9d(_0x4ca936,this['editor']);}['_saveOperationInBuffer'](_0x3f3eb1){this['_knownOperations']['has'](_0x3f3eb1)||(this['_knownOperations']['add'](_0x3f3eb1),this['_bufferedOperations']['push'](_0x3f3eb1),this['_pendingAction']||'marker'==_0x3f3eb1['type']&&!_0x3f3eb1['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x4bd2f7=!0x1){!_0x4bd2f7&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x3e5617=>{_0x3e5617&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x4abe53=>{this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,function(_0x23d283){return _0x23d283['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x23d283['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x23d283['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x4abe53)||this['_crash'](_0x4abe53['message'],_0x4abe53,!0x0);});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x59252e=>{this['on']('change:_isPendingUpdate',()=>{_0x59252e();});});}async['_sendBufferedOperations'](){const _0x2779dc=this['editor']['plugins']['get'](N);if(this['_shouldSendSelectionUpdate']()&&(_0x2779dc['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x3e4134=[...this['_bufferedOperations']];for(const _0x4ecf5c of _0x3e4134)_0x4ecf5c['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x4ecf5c);const _0x38247d=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x3e4134),_0x4c5a60=M++,_0x24c805=this['_compressOperations'](_0x3e4134),_0x2eb53c=await this['_service']['sendOperations'](_0x24c805,_0x24c805['baseVersion'],_0x38247d);try{return await this['_handleServerResponse'](_0x3e4134,_0x2eb53c,_0x4c5a60);}catch(_0x50f9a7){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x50f9a7);}}async['_handleServerResponse'](_0x11bc56,_0x1da90c,_0x34df7c){if('error'in _0x1da90c)throw _0x1da90c['error'];let _0x2ecf4c=!0x1;if(_0x1da90c['wereChangesApplied']){_0x1da90c['lastOperationId']&&(this['_lastSyncedOperationId']=_0x1da90c['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x1a83d5=>!_0x11bc56['includes'](_0x1a83d5));for(const _0xb59000 of _0x11bc56)_0xb59000['createdAt']='lastOperationAcceptedAt'in _0x1da90c&&_0x1da90c['lastOperationAcceptedAt']||void 0x0;V(_0x11bc56,_0x1da90c['version']-_0x11bc56['length']),this['_updateServerHistory'](_0x11bc56);const _0x1a4ca6=_0x11bc56['filter'](_0x268d09=>{if(!_0x268d09['_isInit'])return!0x1;const _0x18d9f5=this['_getAffectedRoot'](_0x268d09);return _0x18d9f5&&!this['_knownRootNames']['has'](_0x18d9f5);});V(_0x1a4ca6,this['_document']['version']),this['_applyOperationsSet'](_0x1a4ca6),_0x2ecf4c=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x900f85=this['_decompressOperations'](_0x1da90c['data'],_0x1da90c['metadata'])['filter'](_0x51b465=>_0x51b465['baseVersion']>=this['_lastServerVersion']);_0x900f85['forEach'](_0x474c46=>this['_addKnownRoot'](_0x474c46)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x34c36f=>!_0x34c36f['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x34c36f))),this['_bufferedOperations']['length']&&V(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x900f85),_0x2ecf4c=this['_handleExternalOperations'](_0x900f85,_0x1da90c['version'],_0x1da90c['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x2ecf4c?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x1ab6d0,_0xc65886,_0x52f95c){try{const _0x178c1c={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x18e47d,operationsB:_0x286a89,originalOperations:_0x506ff1}=_0x5b6935(_0x1ab6d0,this['_bufferedOperations'],_0x178c1c);V(_0x18e47d,this['_document']['version']),V(_0x286a89,_0xc65886);for(const _0x33c258 of _0x18e47d){const _0x24be43=_0x506ff1['get'](_0x33c258);_0x33c258['_authorId']=_0x24be43?_0x24be43['_authorId']:null;}_0x52f95c&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x1ab6d0,_0x52f95c),this['_lastSyncedOperationId']=_0x52f95c),this['_bufferedOperations']=[..._0x286a89],this['_applyOperationsSet'](_0x18e47d),this['_updateServerHistory'](_0x1ab6d0);}catch(_0x1642fc){return console['error'](_0x1642fc),!0x1;}return!0x0;}['_applyOperationsSet'](_0x5ab35e,_0x22279a=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x5a3e50=>{for(const _0x1b2cab of _0x5ab35e)this['_knownOperations']['add'](_0x1b2cab),this['_addKnownRoot'](_0x1b2cab),_0x5a3e50['batch']['addOperation'](_0x1b2cab),this['editor']['model']['applyOperation'](_0x1b2cab);});}['_addKnownRoot'](_0x488bc0){const _0x54a6c3=this['_getAffectedRoot'](_0x488bc0);_0x54a6c3&&this['_knownRootNames']['add'](_0x54a6c3);}['_getAffectedRoot'](_0x4a2332){let _0x4c972a,_0x263b40;switch(_0x4a2332['type']){case'insert':_0x4c972a=_0x4a2332['position']['root'];break;case'marker':if(_0x263b40=_0x4a2332['newRange'],!_0x263b40)return null;_0x4c972a=_0x263b40['root'];break;case'addRootAttribute':_0x4c972a=_0x4a2332['root'];break;case'addRoot':_0x4c972a=_0x4a2332['affectedSelectable'];break;case'move':_0x4c972a=_0x4a2332['targetPosition']['root'];break;default:return null;}return _0x4c972a['rootName'];}['_updateServerHistory'](_0x31de88){_0x31de88['forEach'](_0x5ddee5=>{const _0x786597=_0x5ddee5['clone']();_0x786597['_authorId']=_0x5ddee5['_authorId'],_0x786597['_isInit']=!!_0x5ddee5['_isInit'],_0x786597['createdAt']=_0x5ddee5['createdAt'],_0x786597['baseVersion']+=this['_offset'],_0x5ddee5['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x786597),this['serverHistory']['addOperation'](_0x786597);});}['_handleReconnectionError'](_0x48b633){const _0x48eca4=this['editor']['plugins']['get']('Notification'),_0x1f02e8=this['editor']['locale'];_0x48b633||(_0x48b633=E(_0x1f02e8,'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.')),_0x48eca4['showWarning'](_0x48b633,{'title':E(_0x1f02e8,'Synchronization\x20issue'),'namespace':'real-time-collaboration'}),this['_hasSynchronizationProblem']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_bufferedOperations']=[],this['editor']['plugins']['get'](c)['destroy']();}['_setPendingAction'](){this['_pendingAction']||(this['_pendingAction']=this['editor']['plugins']['get'](_0x19f112)['add'](E(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x19f112)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x1db123){const _0x5f54c8=_0x1db123['map'](_0xa97fa0=>_0xa97fa0['toJSON']());return this['_compressor']['compress'](_0x5f54c8);}['_decompressOperations'](_0x2303f6,_0x551baf){return this['_compressor']['decompress'](_0x2303f6)['map']((_0x5d80c5,_0x33998a)=>{const _0x5e60a3='init'==_0x551baf[_0x33998a]['type'];if('InsertOperation'==_0x5d80c5['__className']){const _0x39a46a=_0x5d80c5['position']['root'];!this['_document']['getRoot'](_0x39a46a)&&(this['_document']['createRoot']('$root',_0x39a46a)['_isAttached']=!0x1);}const _0x1e1318=_0x35f2d5['fromJSON'](_0x5d80c5,this['_document']);return _0x1e1318['wasUndone']=_0x5d80c5['wasUndone'],_0x1e1318['_isInit']=_0x5e60a3,_0x1e1318['_authorId']=_0x5e60a3?null:_0x551baf[_0x33998a]['userId'],_0x1e1318['_isDisconnection']='cs:removeUser'===_0x551baf[_0x33998a]['type'],_0x1e1318['createdAt']=_0x551baf[_0x33998a]['createdAt'],_0x1e1318;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x11db21=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x11db21&&_0x11db21['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class z extends Error{}function V(_0x555483,_0xab0d81){for(const _0x1a728c of _0x555483)_0x1a728c['baseVersion']=_0xab0d81++;}class W{['_ignoredOperations'];['_operationToId'];constructor(_0x4afd57){this['_ignoredOperations']=_0x4afd57,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x583e54){let _0x4ee61e=_0x583e54['length'];for(;_0x4ee61e--;){const _0x4af995=_0x583e54[_0x4ee61e];if(!this['_ignoredOperations']['has'](_0x4af995)){if(!this['_operationToId']['has'](_0x4af995)){const _0x788b97=_0x40aeaa()['slice'](0x1,0x12);this['_operationToId']['set'](_0x4af995,_0x788b97);}return this['_operationToId']['get'](_0x4af995);}}}['setIdForTheLastOperation'](_0x216d7,_0x46e0b3){if(!_0x46e0b3)return;let _0x33aa52=_0x216d7['length'];for(;_0x33aa52--;){const _0x39b4c0=_0x216d7[_0x33aa52];this['_ignoredOperations']['has'](_0x39b4c0)||this['_operationToId']['set'](_0x39b4c0,_0x46e0b3);}}}class n extends _0x27d590{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x39d5da{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>_0x1c0992)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x59a1a9];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59c81a){super(_0x59c81a),this['_services']=new Map();}async['init'](){const _0x4668c4=this['context'],_0xac1d78=_0x4668c4['plugins']['get']('CommentsRepository');if(_0x4668c4['plugins']['get'](c)['addToReconnectionStack'](this),_0xac1d78['adapter']={'addCommentThread':async({channelId:_0x1d01b1,threadId:_0x3eee99,comments:_0x16355f,resolvedAt:_0x2537d5,resolvedBy:_0x4cde1c,context:_0x2e50ee,attributes:_0x3141b3})=>{const _0x159c71=await this['_getService'](_0x1d01b1)['addCommentThread']({'commentThreadId':_0x3eee99,'comments':_0x16355f['map'](_0x5b7b98=>function(_0x2d2e4e,_0x3ec49e,_0x3b0604){return{'commentThreadId':_0x3b0604,'commentId':_0x2d2e4e['commentId'],'userId':_0x2d2e4e['authorId'],'content':_0x2d2e4e['content'],'documentId':_0x3ec49e,'createdAt':_0x2d2e4e['createdAt'],'attributes':_0x2d2e4e['attributes']||{}};}(_0x5b7b98,_0x1d01b1,_0x3eee99)),'resolvedAt':_0x2537d5,'resolvedBy':_0x4cde1c,'context':_0x2e50ee,'attributes':_0x3141b3})['catch'](gt);return{'threadId':_0x159c71['commentThreadId'],'comments':_0x159c71['comments']};},'getCommentThread':async({channelId:_0x1dc641,threadId:_0x3cba28})=>{const _0x5efb50=await this['_getService'](_0x1dc641)['getCommentThread'](_0x3cba28)['catch'](gt);return _0x5efb50['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x5efb50]),{'threadId':_0x5efb50['commentThreadId'],'comments':_0x5efb50['comments']['map'](b),'context':_0x5efb50['context'],'resolvedAt':_0x5efb50['resolvedAt'],'resolvedBy':_0x5efb50['resolvedBy'],'attributes':_0x5efb50['attributes']||{}});},'updateCommentThread':async({channelId:_0x5e65f8,threadId:_0x34ae36,context:_0x2cfc40,unlinkedAt:_0x40fed1,attributes:_0x353c8e})=>this['_getService'](_0x5e65f8)['updateCommentThread']({'commentThreadId':_0x34ae36,'context':_0x2cfc40,'attributes':_0x353c8e,'unlinkedAt':_0x40fed1})['catch'](y)['catch'](gt),'resolveCommentThread':async({channelId:_0x569351,threadId:_0x5a23a8})=>{const _0x4ee5f4=await this['_getService'](_0x569351)['resolveCommentThread'](_0x5a23a8)['catch'](y)['catch'](gt);return{'threadId':_0x4ee5f4['commentThreadId'],'resolvedAt':_0x4ee5f4['resolvedAt'],'resolvedBy':_0x4ee5f4['resolvedBy']};},'reopenCommentThread':async({channelId:_0x11f72a,threadId:_0x5f28f2})=>this['_getService'](_0x11f72a)['reopenCommentThread'](_0x5f28f2)['catch'](y)['catch'](gt),'removeCommentThread':({channelId:_0x1139ca,threadId:_0x1dcaab})=>this['_getService'](_0x1139ca)['removeCommentThread'](_0x1dcaab)['catch'](y)['catch'](gt),'addComment':({channelId:_0x58b265,threadId:_0x45f2e7,commentId:_0x1280d5,content:_0x388057,attributes:_0x16a514})=>this['_getService'](_0x58b265)['addComment'](_0x45f2e7,_0x1280d5,_0x388057,_0x16a514)['catch'](gt),'updateComment':({channelId:_0x230034,threadId:_0x3b9d32,commentId:_0x1291e8,content:_0x10e482,attributes:_0x15df51})=>this['_getService'](_0x230034)['updateComment'](_0x3b9d32,_0x1291e8,_0x10e482,_0x15df51)['catch'](y)['catch'](gt),'removeComment':({channelId:_0x228c16,threadId:_0x373ae8,commentId:_0x165600})=>this['_getService'](_0x228c16)['removeComment'](_0x373ae8,_0x165600)['catch'](y)['catch'](gt)},_0x4668c4 instanceof _0x5bfadf){const _0x37eaa7=_0x4668c4['config']['get']('collaboration.channelId'),_0x35cb71=_0x4668c4['plugins']['get'](i);await this['_setUpService'](_0x37eaa7);const _0x332687=await this['_services']['get'](_0x37eaa7)['getConnectedSessions']();this['listenTo'](_0x35cb71,'sessionAdd:'+_0x37eaa7,(_0xfa5f85,{session:_0x483fd0})=>{_0x483fd0['id']===_0x35cb71['mySessionId']&&(_0xfa5f85['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x483fd0['permissions'],_0x37eaa7));}),_0x35cb71['register'](_0x37eaa7,_0x332687);}}async['_setUpService'](_0x4c6a44){if(this['_services']['has'](_0x4c6a44))throw new _0x1b7f9d('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x4c6a44});const _0x440ec9=this['context']['plugins']['get']('CommentsRepository'),_0x38765d=new a['CommentsService'](_0x4c6a44);this['_services']['set'](_0x4c6a44,_0x38765d),this['listenTo'](_0x38765d,'commentThreadAdded',(_0x96e3ea,_0x2c6dae)=>{const {commentThreadId:_0x2744d5,documentId:_0x537d58,context:_0x28fc73,attributes:_0x5cbc9a,resolvedAt:_0x55ac4b,resolvedBy:_0x32b069,comments:_0x1198f2}=_0x2c6dae;_0x440ec9['getCommentThread'](_0x2744d5)||_0x440ec9['addCommentThread']({'threadId':_0x2744d5,'channelId':_0x537d58,'comments':_0x1198f2?_0x1198f2['map'](b):[],'context':_0x28fc73,'attributes':_0x5cbc9a,'resolvedAt':_0x55ac4b,'resolvedBy':_0x32b069,'isFromAdapter':!0x0});}),this['listenTo'](_0x38765d,'commentThreadUpdated',(_0x2e10f0,{commentThreadId:_0x4100b3,documentId:_0x1f7b04,context:_0x1bb6a5,unlinkedAt:_0x13be65,attributes:_0x21bc54})=>{_0x440ec9['getCommentThread'](_0x4100b3)&&_0x440ec9['updateCommentThread']({'threadId':_0x4100b3,'channelId':_0x1f7b04,'context':_0x1bb6a5,'unlinkedAt':_0x13be65,'attributes':_0x21bc54,'isFromAdapter':!0x0});}),this['listenTo'](_0x38765d,'commentThreadResolved',(_0x15503a,{commentThreadId:_0x176354,resolvedBy:_0x25b787,resolvedAt:_0x17f0ed})=>{const _0x47e3ff=_0x440ec9['getCommentThread'](_0x176354);_0x47e3ff&&_0x47e3ff['resolve']({'resolvedBy':_0x25b787,'resolvedAt':_0x17f0ed,'isFromAdapter':!0x0});}),this['listenTo'](_0x38765d,'commentThreadReopened',(_0x3d17d2,{commentThreadId:_0x2789c7})=>{const _0x32f136=_0x440ec9['getCommentThread'](_0x2789c7);_0x32f136&&_0x32f136['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x38765d,'commentThreadRemoved',(_0x2c4962,{commentThreadId:_0x74b2c3})=>{const _0x5afdeb=_0x440ec9['getCommentThread'](_0x74b2c3);_0x5afdeb&&_0x5afdeb['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x38765d,'commentAdded',(_0x474696,_0x444f9c)=>{const _0x2802ec=_0x444f9c['commentThreadId'],_0x5a9ee0=_0x440ec9['getCommentThread'](_0x2802ec);_0x5a9ee0&&_0x5a9ee0['addComment']({...b(_0x444f9c),'isFromAdapter':!0x0});}),this['listenTo'](_0x38765d,'commentUpdated',(_0x20df22,{commentThreadId:_0x42fb94,commentId:_0x15f562,content:_0x282d8d,attributes:_0x3bd228})=>{const _0x10b5f2=_0x440ec9['getCommentThread'](_0x42fb94);if(_0x10b5f2){const _0x373901=_0x10b5f2['getComment'](_0x15f562);_0x373901&&_0x373901['update']({'content':_0x282d8d,'attributes':_0x3bd228,'isFromAdapter':!0x0});}}),this['listenTo'](_0x38765d,'commentRemoved',(_0x55c66b,{commentThreadId:_0x4ffcb3,commentId:_0x4061f1})=>{const _0x4a98ef=_0x440ec9['getCommentThread'](_0x4ffcb3);if(_0x4a98ef){const _0x202d7b=_0x4a98ef['getComment'](_0x4061f1);_0x202d7b&&_0x202d7b['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x4c6a44);}['destroy'](){if(this['context']instanceof _0x5bfadf){const _0x17e175=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x17e175);}}['_terminateService'](_0x52fbea){if(!this['_services']['has'](_0x52fbea))throw new _0x1b7f9d('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x52fbea});this['_getService'](_0x52fbea)['disconnect'](),this['_services']['delete'](_0x52fbea);}async['reconnect'](){for(const _0x31f65d of this['_services']['keys']())await this['_connectService'](_0x31f65d);if(this['context']instanceof _0x5bfadf){const _0x26ec80=this['context']['config']['get']('collaboration.channelId'),_0x1ef5ef=this['context']['plugins']['get'](i);_0x1ef5ef['unregister'](_0x26ec80);const _0x4e7c48=await this['_services']['get'](_0x26ec80)['getConnectedSessions']();_0x1ef5ef['register'](_0x26ec80,_0x4e7c48);}}async['_connectService'](_0x35e753){const {connection:_0x2898f2}=this['context']['plugins']['get'](c),_0x2e2131=this['context']['plugins']['get']('CommentsRepository'),_0x396316=this['_services']['get'](_0x35e753),_0x3dbd9f=await _0x396316['connect'](_0x2898f2);await this['_fetchMissingUsersForThreads'](_0x3dbd9f);const _0x5e36af=new Set(Array['from'](_0x2e2131['getCommentThreads']({'channelId':_0x35e753}),_0x38ab3c=>_0x38ab3c['id']));for(const _0x522f42 of _0x3dbd9f)_0x522f42['deletedAt']||_0x5e36af['delete'](_0x522f42['commentThreadId']);for(const _0x5dc4d5 of _0x5e36af)_0x2e2131['getCommentThread'](_0x5dc4d5)['remove']({'isFromAdapter':!0x0});for(const _0xa29821 of _0x3dbd9f){let _0x59ffc0=_0x2e2131['getCommentThread'](_0xa29821['commentThreadId']);const {commentThreadId:_0x1f10bd,context:_0x525c0e,attributes:_0x45d60b,resolvedBy:_0x18555c,resolvedAt:_0x484e08,unlinkedAt:_0x28152f,deletedAt:_0x55c017}=_0xa29821;if(_0x55c017)continue;_0x59ffc0||(_0x59ffc0=_0x2e2131['addCommentThread']({'channelId':_0x35e753,'threadId':_0x1f10bd,'context':_0x525c0e,'attributes':_0x45d60b||{},'resolvedBy':_0x18555c,'resolvedAt':_0x484e08,'unlinkedAt':_0x28152f,'isFromAdapter':!0x0}));const _0x1bd3f0=new Set(Array['from'](_0x59ffc0['comments'],_0x32d99e=>_0x32d99e['id']));for(const _0x1a7758 of _0xa29821['comments'])_0x1bd3f0['delete'](_0x1a7758['commentId']);for(const _0xf7e1d3 of _0x1bd3f0)_0x59ffc0['getComment'](_0xf7e1d3)['remove']({'isFromAdapter':!0x0});for(const _0x3dfc85 of _0xa29821['comments']){const _0x2c2073=_0x59ffc0['getComment'](_0x3dfc85['commentId']);_0x2c2073?_0x2c2073['content']!==_0x3dfc85['content']&&_0x2c2073['update']({'content':_0x3dfc85['content'],'isFromAdapter':!0x0}):_0x59ffc0['addComment'](Object['assign'](b(_0x3dfc85),{'isFromAdapter':!0x0}));}}}['_getService'](_0x14b790){if(!this['_services']['has'](_0x14b790))throw new _0x1b7f9d('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x14b790});return this['_services']['get'](_0x14b790);}async['_fetchMissingUsersForThreads'](_0x3cb008){const _0x290a26=this['context']['plugins']['get'](_0x59a1a9),{connection:_0x302250}=this['context']['plugins']['get'](c),_0x52e8d3=new Set();for(const {resolvedBy:_0x33886e,comments:_0x2a4d09}of _0x3cb008){_0x33886e&&!_0x290a26['getUser'](_0x33886e)&&_0x52e8d3['add'](_0x33886e);for(const {userId:_0x248356}of _0x2a4d09)_0x290a26['getUser'](_0x248356)||_0x52e8d3['add'](_0x248356);}if(0x0===_0x52e8d3['size'])return;const _0x2f8a08=await mt['getMany'](_0x302250,Array['from'](_0x52e8d3));for(const _0xcad1c9 of _0x2f8a08)_0x290a26['getUser'](_0xcad1c9['id'])||_0x290a26['addUser'](_0xcad1c9);}}async function y(_0xd24a72){if('404'!==_0xd24a72['code'])throw _0xd24a72;}function gt(_0x19e37f){if((_0x2ceeb3=_0x19e37f)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x2ceeb3['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2ceeb3['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x2ceeb3;throw _0x19e37f;}function b(_0x5c793a){return{'threadId':_0x5c793a['commentThreadId'],'commentId':_0x5c793a['commentId'],'content':_0x5c793a['content'],'createdAt':_0x5c793a['createdAt'],'authorId':_0x5c793a['userId'],'attributes':_0x5c793a['attributes']||{}};}class f extends _0x27d590{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
+
((()=>_0x309631)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}static get['pluginName'](){return'CloudServicesTrackChangesAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x532456){super(_0x532456);const _0x31b6b2=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x31b6b2);}['init'](){const _0x3d6dba=this['editor']['plugins']['get'](c),_0x2eaf62=this['editor']['plugins']['get']('TrackChangesEditing');return _0x2eaf62['adapter']={'getSuggestion':async _0x5e66d4=>{await this['_waitForServiceReady']();const _0x4a1f41=await this['_trackChangesService']['get'](_0x5e66d4)['catch'](w);return await this['_fetchMissingUsersForThreads']([_0x4a1f41]),_0x4a1f41;},'addSuggestion':async({id:_0x44bcef,type:_0x37a41e,data:_0x44727c,originalSuggestionId:_0x5e9038,attributes:_0x384178})=>{await this['_waitForServiceReady']();const _0x2ddb74={'id':_0x44bcef,'type':_0x37a41e,'data':_0x44727c,'originalSuggestionId':_0x5e9038,'attributes':_0x384178},_0x426e9c=await this['_trackChangesService']['add'](_0x44bcef,_0x37a41e,_0x44727c,_0x5e9038,_0x384178)['catch'](_0x28a337=>{if(wt(_0x28a337))return new Promise(_0x13c465=>{this['_bufferedRequests']['set'](_0x44bcef,{'resolve':_0x13c465,'suggestionData':_0x2ddb74});});throw _0x28a337;});return this['_bufferedRequests']['delete'](_0x44bcef),_0x426e9c;},'updateSuggestion':async(_0x4fa8ce,_0x33e43e)=>{if(await this['_waitForServiceReady'](),'open'!==_0x33e43e['state'])return this['_trackChangesService']['update'](_0x4fa8ce,_0x33e43e)['catch'](w);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x4c050e,_0x4f2aa7)=>{_0x2eaf62['hasSuggestion'](_0x4f2aa7['id'])&&(_0x2eaf62['getSuggestion'](_0x4f2aa7['id'])['attributes']=_0x4f2aa7['attributes']);}),this['_trackChangesService']['connect'](_0x3d6dba['connection'])['then'](_0x2823c6=>(_0x3d6dba['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x2823c6)['then'](()=>{for(const _0x4721c6 of _0x2823c6){_0x2eaf62['addSuggestionData'](_0x4721c6)['_saved']=!0x0;}})));}async['reconnect'](){const _0x26f4d0=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x84aaf7}=this['editor']['plugins']['get'](c),_0x2bcd37=await this['_trackChangesService']['connect'](_0x84aaf7);await this['_fetchMissingUsersForThreads'](_0x2bcd37);for(const {suggestionData:_0x227464,resolve:_0x20491a}of this['_bufferedRequests']['values']()){let _0x17ac6f=_0x2bcd37['find'](_0x911c4d=>_0x911c4d['id']===_0x227464['id']);_0x17ac6f||(_0x17ac6f=await this['_trackChangesService']['add'](_0x227464['id'],_0x227464['type'],_0x227464['data'],_0x227464['originalSuggestionId'])),_0x20491a(_0x17ac6f);}for(const _0x5ebbf1 of _0x2bcd37)_0x26f4d0['hasSuggestion'](_0x5ebbf1['id'])||_0x26f4d0['addSuggestionData'](_0x5ebbf1);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x1d6809=>{this['listenTo'](this['_trackChangesService'],'connected',_0x3b9fbf=>{_0x3b9fbf['off'](),_0x1d6809();});});}async['_fetchMissingUsersForThreads'](_0x5570db){const _0x42ee99=this['editor']['plugins']['get'](_0x59a1a9),{connection:_0x397b4f}=this['editor']['plugins']['get'](c),_0x178e78=new Set();for(const {authorId:_0x46a810}of _0x5570db)_0x42ee99['getUser'](_0x46a810)||_0x178e78['add'](_0x46a810);if(0x0===_0x178e78['size'])return;const _0x2f6d38=await mt['getMany'](_0x397b4f,Array['from'](_0x178e78));for(const _0x23fc0e of _0x2f6d38)_0x42ee99['getUser'](_0x23fc0e['id'])||_0x42ee99['addUser'](_0x23fc0e);}}function w(_0x14798a){if(wt(_0x14798a))return new Promise(()=>{});throw _0x14798a;}function wt(_0x273a6){return _0x273a6['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x273a6['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x27d590{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x26911f=this['editor']['plugins']['get'](c),_0x2e2d92=this['editor']['plugins']['get']('CommentsEditing'),_0x43fc6f=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x26911f,'change:state',(_0x595e07,_0x495c7f,_0x176a18)=>{_0x2e2d92['isThreadsLoadingPaused']='connected'!==_0x176a18;});}),this['listenTo'](_0x26911f,'change:state',(_0x218990,_0x1911ff,_0x504441)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x504441);}),_0x43fc6f['_setUpService'](this['editor']['config']['get']('collaboration.channelId'));}['destroy'](){this['editor']['plugins']['get'](a)['_terminateService'](this['editor']['config']['get']('collaboration.channelId')),super['destroy']();}}class p extends _0x27d590{static get['requires'](){return[m,f,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class u extends _0x27d590{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
|
|
28
|
+
((()=>_0x1d8807)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x59a1a9];}static get['pluginName'](){return'CloudServicesRevisionHistoryAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x14b635){super(_0x14b635);const _0x2a9b68=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x2a9b68);}async['init'](){const _0xa814d3=this['editor']['plugins']['get'](l),_0x37c2ad=_0xa814d3['serverHistory'],_0x52a8fd=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x37c2ad,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0xa814d3['sessionId']});const _0x2b8d40=this['editor']['config']['get']('cloudServices.bundleVersion')||dt,_0x550eb2=await _0x35e74c['isBundleUploaded'](_0x52a8fd['connection'],_0x2b8d40);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x4468bf})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x4468bf)),'updateRevisions':async _0x3912e2=>{await this['_waitForServiceReady']();const _0xf98759=this['_revisionTracker']['currentRevision'];if(_0x550eb2&&0x1===_0x3912e2['length']&&_0x3912e2[0x0]['id']===_0xf98759['id'])return _0x3912e2;for(const _0xd76cd7 of _0x3912e2)_0xd76cd7['id']===_0xf98759['id']&&(_0xd76cd7['isEmptyCurrent']=_0xd76cd7['fromVersion']===_0xd76cd7['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x3912e2,this['_lastRequestId'])['then'](_0x5a4fb1=>(this['_lastRequestId']=_0x5a4fb1,_0x3912e2))['catch'](_0x27bb71=>{if(X(_0x27bb71)||'400'===_0x27bb71['code']&&void 0x0!==_0x27bb71['data']['wrongRequestId']){for(const _0x8df1ee of _0x3912e2){!this['_revisionTracker']['repository']['getRevision'](_0x8df1ee['id'])||this['_revisionTracker']['_bufferUpdate'](_0x8df1ee['id'],_0x8df1ee,!0x1);}if(X(_0x27bb71))throw _0x27bb71;return _0x3912e2;}throw _0x27bb71;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x1c14a5,{revisionsData:_0x14274b,requestId:_0xb8aca2})=>{Math['max'](..._0x14274b['map'](_0x435392=>_0x435392['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x14274b,_0xb8aca2);}):this['_handleRevisionsUpdate'](_0x14274b,_0xb8aca2);});const {revisions:_0x349efd,requestId:_0x20f763}=await this['_revisionHistoryService']['connect'](_0x52a8fd['connection']);_0x52a8fd['addToReconnectionStack'](this),this['_lastRequestId']=_0x20f763,await this['_fetchMissingUsers'](_0x349efd);for(const _0x23178a of _0x349efd)this['_revisionTracker']['addRevisionData'](_0x23178a);this['listenTo'](_0xa814d3,'change:_isConnected',(_0x2522b9,_0x549dc4,_0x2a399b)=>{_0x2a399b&&(this['_oldOffset']=_0xa814d3['_offset'],_0x2522b9['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x52a8fd,'state',_0x40fdd9=>_0x40fdd9===_0x151d50['CONNECTED']);}async['reconnect'](){const _0xfba6e5=this['editor']['plugins']['get'](c),_0x2f1c09=this['editor']['plugins']['get'](l),_0x163a90=async()=>{const _0x5e4156=this['_revisionTracker']['currentRevision'],_0x270391=_0x5e4156['id'],_0x272f8c=_0x270391!==_0x2f1c09['sessionId'];if(_0x272f8c){const _0x1f5a4a=_0x2f1c09['_offset']-this['_oldOffset'],_0x2da586=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x5e4156['toVersion']+_0x1f5a4a!==_0x2da586){const _0x5467c3=_0x5e4156['fromVersion']+_0x1f5a4a,_0x3c3505=this['editor']['plugins']['get'](_0x59a1a9),_0x267f54=this['_revisionTracker']['buildRevisionData']({'revision':_0x5e4156,'from':_0x5467c3,'to':_0x2da586});_0x267f54['id']=_0x5e4156['id'];const _0x511a5f=_0x267f54['authorsIds']['map'](_0x292e9b=>_0x3c3505['getUser'](_0x292e9b));_0x5e4156['_update']({..._0x267f54,'authors':_0x511a5f},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x5e4156['id'],_0x267f54,!0x0);}this['_revisionTracker']['_startingVersion']=_0x2da586,(_0x5e4156['toVersion']===_0x5e4156['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x270391)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x270391),this['_revisionTracker']['_createCurrentRevision'](_0x2da586));}const {revisions:_0x4fbe1c,requestId:_0x2336bb}=await this['_revisionHistoryService']['reconnect'](_0xfba6e5['connection'],this['_lastRequestId']);_0x272f8c&&_0x4fbe1c['length']>0x0?_0x2f1c09['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x4fbe1c),this['_handleRevisionsUpdate'](_0x4fbe1c,_0x2336bb),this['_revisionTracker']['sendBufferedUpdates']());};return _0x2f1c09['_isConnected']?_0x163a90():new Promise((_0x59d6ae,_0x41db08)=>{_0x2f1c09['once']('change:_isConnected',()=>{_0x163a90()['then'](_0x59d6ae)['catch'](_0x41db08);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x3b7561=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x27a573=>{_0x27a573['off'](),_0x3b7561();});});}['_getLatestVersionFromServerOperations'](){const _0x5e08a9=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x465567 of _0x5e08a9)if('marker'!==_0x465567['type']||_0x465567['affectsData'])return _0x465567['baseVersion']+0x1;}['_getLatestVersion'](){const _0x949b9a=this['editor']['plugins']['get'](l);return new Promise(_0x38be73=>{_0x949b9a['_isPendingUpdate']?_0x949b9a['once']('change:_isPendingUpdate',()=>{_0x38be73(this['_getLatestVersionFromServerOperations']());}):_0x38be73(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x57bef8,_0xce4aef){const _0x859c24=this['_revisionTracker']['repository'];this['_lastRequestId']=_0xce4aef;for(const _0x4d0cb5 of _0x57bef8){const _0xb19bb6=_0x859c24['getRevision'](_0x4d0cb5['id']);if(_0xb19bb6){if((_0x4d0cb5['fromVersion']||_0x4d0cb5['toVersion'])&&(_0x4d0cb5['diffData']=null),_0xb19bb6===this['_revisionTracker']['currentRevision']){const _0x24eb7a=Math['max'](_0xb19bb6['toVersion'],_0x4d0cb5['toVersion']),_0x8438e2=Math['max'](_0xb19bb6['fromVersion'],_0x4d0cb5['fromVersion']);let _0x2e8425;_0xb19bb6['toVersion']===_0x4d0cb5['toVersion']&&_0xb19bb6['fromVersion']===_0x4d0cb5['fromVersion']?(_0x2e8425=!0x0,this['_preventResendingRevisionData'](_0x4d0cb5)):_0x4d0cb5['toVersion']===_0x24eb7a&&_0x4d0cb5['fromVersion']===_0x8438e2?_0x2e8425=!0x1:(_0xb19bb6['toVersion']===_0x24eb7a&&_0xb19bb6['fromVersion']===_0x8438e2||this['_fixRevision']({'revision':_0xb19bb6,'from':_0x8438e2,'to':_0x24eb7a}),_0x2e8425=!0x0),_0x2e8425&&(delete _0x4d0cb5['fromVersion'],delete _0x4d0cb5['toVersion'],delete _0x4d0cb5['diffData'],delete _0x4d0cb5['createdAt'],delete _0x4d0cb5['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x4d0cb5),this['_preventResendingRevisionData'](_0x4d0cb5);}else this['_revisionTracker']['addRevisionData'](_0x4d0cb5);}const _0x2e2b2b=_0x859c24['getRevisions']();_0x2e2b2b['reverse']();for(let _0x2ac9e8=0x0;_0x2ac9e8<_0x2e2b2b['length']-0x1;_0x2ac9e8++){const _0x11fac4=_0x2e2b2b[_0x2ac9e8],_0x187a36=_0x2e2b2b[_0x2ac9e8+0x1];if(_0x11fac4['fromVersion']<_0x187a36['toVersion']){const _0x44d375=_0x187a36['toVersion'],_0x49c48e=Math['max'](_0x44d375,_0x11fac4['toVersion']);this['_fixRevision']({'revision':_0x11fac4,'from':_0x44d375,'to':_0x49c48e});}}}['_fixRevision']({revision:_0x2fbaf0,from:_0x536c29,to:_0xe04d2f}={}){const _0x4c0844=this['editor']['plugins']['get'](_0x59a1a9),_0xcf321f=this['_revisionTracker']['buildRevisionData']({'revision':_0x2fbaf0,'from':_0x536c29,'to':_0xe04d2f});_0xcf321f['authors']=_0xcf321f['authorsIds']['map'](_0x3b0c98=>_0x4c0844['getUser'](_0x3b0c98)),_0x2fbaf0['_update'](_0xcf321f);}['_preventResendingRevisionData'](_0x52060d){const _0x573b20={};_0x573b20['id']=_0x52060d['id'];for(const _0x38b738 of Object['keys'](_0x52060d))'id'!==_0x38b738&&(_0x573b20[_0x38b738]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x573b20['id'],_0x573b20,!0x0);}async['_fetchMissingUsers'](_0x4dc440){const _0xb4869c=this['editor']['plugins']['get'](_0x59a1a9),{connection:_0x572ba5}=this['editor']['plugins']['get'](c),_0x30afe1=new Set();for(const _0x25b590 of _0x4dc440){for(const _0x14bbf9 of _0x25b590['authorsIds'])_0x1c6d1d(_0x14bbf9);_0x25b590['creatorId']&&_0x1c6d1d(_0x25b590['creatorId']);}if(0x0===_0x30afe1['size'])return;const _0x27094b=await mt['getMany'](_0x572ba5,Array['from'](_0x30afe1));for(const _0x512e5a of _0x27094b)_0xb4869c['getUser'](_0x512e5a['id'])||_0xb4869c['addUser'](_0x512e5a);function _0x1c6d1d(_0x39992e){_0xb4869c['getUser'](_0x39992e)||_0x30afe1['add'](_0x39992e);}}}function X(_0x357510){return _0x357510['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x357510['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x357510['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x27d590{static get['requires'](){return['RevisionHistory',u,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class ts extends _0x223bed{constructor(_0x2f6316){super(_0x2f6316);const _0x2801e9=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x2801e9['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x2801e9['to']('usersCount',_0x1bf51e=>E(_0x2f6316,'CONNECTED_USERS',_0x1bf51e))}]});}}class es extends _0x223bed{['items'];['keystrokes'];constructor(_0x5cb3f4){super(_0x5cb3f4);const _0x3385bd=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x127892(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x3385bd['if']('hasPopup'),'aria-expanded':_0x3385bd['to']('isExpanded',_0x1e9d29=>this['hasPopup']&&String(_0x1e9d29)),'aria-label':_0x3385bd['to']('hasPopup',_0x4f7fbd=>E(_0x5cb3f4,_0x4f7fbd?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x3385bd['to']('hasPopup',_0x170fdc=>!!_0x170fdc&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x3385bd['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x297d4a,_0x173ffc,_0xf17377)=>{this['element']&&(_0xf17377?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class et extends _0x223bed{['counterView'];['inlineListView'];constructor(_0x49d9d8){super(_0x49d9d8);const _0x4917d1=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x49d9d8),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x53853b of this['inlineListView']['items'])_0x53853b['tooltipPosition']='s';this['inlineListView']['items']['first']&&(this['inlineListView']['items']['first']['tooltipPosition']='se');}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list','ck-reset','ck-rounded-corners',_0x4917d1['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class ht extends _0x223bed{['listWrapperView'];constructor(_0x1d70b2,_0x51a0a0){super(_0x1d70b2),this['listWrapperView']=new vt(_0x1d70b2,_0x51a0a0),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':E(_0x1d70b2,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class vt extends _0x6c055f{constructor(_0x2d39c4,_0x2ca3fa){super(_0x2d39c4);const _0x1347b3=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x2ca3fa?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x1347b3['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x1347b3['to']('role'),'aria-label':_0x1347b3['to']('ariaLabel'),'aria-labelledby':_0x1347b3['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x31082d['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x469079=this['element'];_0x469079&&(this['_isScrollable']=Math['max'](_0x469079['scrollHeight'],_0x469079['clientHeight'])>0.8*window['innerHeight']);}}class rt extends ct{['userView'];constructor(_0x1b15dd,_0x4d006a,_0x15cbe9){super(_0x1b15dd);const _0x3aabae=this['bindTemplate'];this['userView']=new at(_0x1b15dd,_0x4d006a);const _0x5dc59e={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x4d006a['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x4d006a['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x4d006a['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x15cbe9&&(_0x5dc59e['tag']='button',_0x5dc59e['on']={'click':_0x3aabae['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x5dc59e);}['focus'](){this['element']['focus']();}}class ot extends _0x223bed{['userView'];['markerView'];constructor(_0x1eb9bd,_0x5e6f8f,_0x3b9965){super(_0x1eb9bd);const _0x21e5bd=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new at(_0x1eb9bd,_0x5e6f8f),this['markerView']=new pt(_0x1eb9bd,_0x5e6f8f);const _0x395c94=new lt(_0x1eb9bd);_0x395c94['template']['tag']='span',_0x395c94['text']=_0x5e6f8f['name'];const _0xfa9ad4={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x21e5bd['to']('isFocusable',_0x5eb355=>!!_0x5eb355&&0x0),'aria-labelledby':_0x395c94['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x21e5bd['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x21e5bd['to']('hasTooltip',_0x30cc3a=>!_0x30cc3a),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x395c94]};_0x3b9965&&(_0xfa9ad4['tag']='button',_0xfa9ad4['on']={'click':_0x21e5bd['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0xfa9ad4);}}class pt extends _0x223bed{constructor(_0x5b8981,_0x1a72c5){super(_0x5b8981),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x1a72c5['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const nt={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x39d5da{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x4d1e84){super(_0x4d1e84),this['context']['config']['define']('presenceList',nt);const _0x4bb5b2=_0x4d1e84['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x4bb5b2)throw new _0x1b7f9d('presencelist-collapseat-invalid-format',this);if(_0x4bb5b2<0x1)throw new _0x1b7f9d('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x5537fa(),this['balloonPanelView']=new tt(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x19753d of this['_allConnectedUsers'])this['_handleUserAdd'](_0x19753d);this['listenTo'](this['_allConnectedUsers'],'add',(_0x267bd2,_0xe63384)=>{this['_handleUserAdd'](_0xe63384);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x4284e7,_0x4a62b3)=>{this['_handleUserRemove'](_0x4a62b3);});}['_createView'](){const _0x2e67e7=this['context'],_0x11bfa8=new et(this['context']['locale']),_0x5d98f2=this['balloonPanelView'];if(!it(_0x2e67e7['config']['get']('presenceList.container')))throw new _0x1b7f9d('presencelist-missing-container',this);return _0x11bfa8['counterView']['bind']('usersCount')['to'](this),_0x11bfa8['bind']('isCollapsed')['to'](this,'usersCount',_0x3fa28f=>{const {collapseAt:_0x328720,displayMe:_0x4b40f4}=_0x2e67e7['config']['get']('presenceList'),_0x48d32a=_0x3fa28f>=_0x328720;return _0x11bfa8['counterView']['isHidden']=!(0x1==_0x3fa28f&&_0x4b40f4||_0x48d32a),_0x48d32a||this['hideDropdown'](),_0x48d32a;}),_0x11bfa8['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x4d4422=>{const _0x5015be=_0x2e67e7['config']['get']('presenceList'),_0x3d8b0b=new ot(_0x2e67e7['locale'],_0x4d4422,!!_0x5015be['onClick']);return _0x3d8b0b['bind']('hasTooltip')['to'](_0x11bfa8,'isCollapsed',_0x2469f2=>!_0x2469f2),_0x3d8b0b['bind']('isFocusable')['to'](_0x11bfa8,'isCollapsed',_0x5d1aaf=>!_0x5d1aaf),_0x5015be['onClick']&&this['listenTo'](_0x3d8b0b,'execute',()=>{this['view']['isCollapsed']||_0x5015be['onClick'](_0x4d4422,_0x3d8b0b['element']);}),_0x3d8b0b;}),this['listenTo'](_0x11bfa8['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x11bfa8['inlineListView']['keystrokes']['set']('Enter',(_0x56c748,_0x5b72e1)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x5b72e1());}),_0x11bfa8['render'](),_0x5d98f2['render'](),_0x4367c7({'emitter':_0x11bfa8,'activator':()=>_0x5d98f2['isVisible'],'contextElements':[_0x5d98f2['element'],_0x11bfa8['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x2e67e7['config']['get']('presenceList.container')['appendChild'](_0x11bfa8['element']),this['_bodyCollection']=new st(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x11bfa8;}['_handleUserAdd'](_0x537b5d){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x537b5d['isMe'])return;const _0x340f9f=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x340f9f&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x438893=_0x537b5d['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x537b5d,_0x438893);}['_handleUserRemove'](_0x397182){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x397182['id'])&&(this['currentDisplayedUsers']['remove'](_0x397182['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0xf05252 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0xf05252['id']))return void this['currentDisplayedUsers']['add'](_0xf05252,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0xe0f5cf=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new ht(this['context']['locale'],!!_0xe0f5cf['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x3441d0}=this['presenceDropdownView'];_0x3441d0['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x35ab82=>{if(!_0xe0f5cf['displayMe']&&_0x35ab82['isMe'])return null;const _0x365f5a=new rt(this['context']['locale'],_0x35ab82,!!_0xe0f5cf['onClick']);return _0xe0f5cf['onClick']&&this['listenTo'](_0x365f5a,'execute',()=>{_0xe0f5cf['onClick'](_0x35ab82,_0x365f5a['element']);}),_0x365f5a;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x3441d0['focus'](),_0x3441d0['checkIfScrollable']();const _0xf1c294=(_0x2552d8,_0x38f1d3)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x38f1d3();};_0x3441d0['keystrokes']['set']('Esc',_0xf1c294),_0x3441d0['keystrokes']['set']('Shift+Tab',_0xf1c294),_0x3441d0['keystrokes']['set']('Tab',(_0x5cb6ec,_0x19a1d6)=>{!function(_0x3442ee){const _0x152eb7=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x5148d3=>_0x5148d3+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x229525=[...document['body']['querySelectorAll'](_0x152eb7)]['filter'](_0x239f18=>_0x239f18===document['activeElement']||_0x239f18['offsetWidth']+_0x239f18['offsetHeight']>0x0)['sort']((_0x2868e1,_0x5ade3f)=>(_0x2868e1['tabIndex']||0x0)-(_0x5ade3f['tabIndex']||0x0)),_0x5d9c3b=_0x229525['indexOf'](_0x3442ee),_0x30baff=_0x229525[(_0x5d9c3b+0x1)%_0x229525['length']];_0x30baff&&_0x30baff['focus']();}(this['view']['element']),this['hideDropdown'](),_0x19a1d6();}),_0x3441d0['focusTracker']['add'](this['view']['element']),_0x3441d0['focusTracker']['on']('change:isFocused',(_0x7058b2,_0x53b3d0,_0x15abe2)=>{_0x15abe2||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class s extends _0x39d5da{static get['requires'](){return[i,r];}static get['pluginName'](){return'PresenceList';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{a as CloudServicesCommentsAdapter,u as CloudServicesRevisionHistoryAdapter,f as CloudServicesTrackChangesAdapter,s as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,g as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
|
|
@@ -25,6 +25,18 @@ export default class CloudServicesRevisionHistoryAdapter extends Plugin implemen
|
|
|
25
25
|
* @inheritDoc
|
|
26
26
|
*/
|
|
27
27
|
static get requires(): readonly [typeof WebSocketGateway, typeof RealTimeCollaborationClient, "RevisionTracker", typeof Sessions, typeof Users];
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get pluginName(): "CloudServicesRevisionHistoryAdapter";
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
static get isOfficialPlugin(): true;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
static get isPremiumPlugin(): true;
|
|
28
40
|
/**
|
|
29
41
|
* @inheritDoc
|
|
30
42
|
*/
|