@ckeditor/ckeditor5-real-time-collaboration 44.1.0-alpha.2 → 44.1.0-alpha.3
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/build/real-time-collaboration.js +2 -2
- package/dist/index.js +6 -6
- 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/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.js +1 -1
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
- package/src/realtimecollaborativetrackchanges.js +1 -1
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',_0x39ca86];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ca0db){super(_0x3ca0db),this['set']('state',_0x1b4187['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x4c9d2a);}['init'](){const _0x52aa42=this['context'],_0x248ce4=_0x52aa42['plugins']['get']('CloudServices'),_0x398282=_0x52aa42['plugins']['get'](_0x39ca86);if(!_0x248ce4['token'])throw new _0x2e3272('websocketgateway-missing-token',this);if(!_0x248ce4['webSocketUrl'])throw new _0x2e3272('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'](_0x248ce4['token'],_0x248ce4['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x50143e=>{if(this['connection']=_0x50143e,this['bind']('state')['to'](_0x50143e,'state',this,'_isBrowserOffline',(_0x35e524,_0x198855)=>('connected'!==_0x35e524&&(this['_shouldPluginsReconnect']=!0x0),_0x198855||_0x35e524!==_0x1b4187['CONNECTED']?_0x1b4187['DISCONNECTED']:this['state']==_0x1b4187['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x1b4187['CONNECTING']):_0x1b4187['CONNECTED'])),this['connection']['on']('error',(_0xba2678,_0xa24497)=>{if('limitExceeded'!==_0xa24497['code'])throw console['error'](_0xa24497),new _0x2e3272('cloudservices-init',null,{'originalError':_0xa24497});_0x398282['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'});}),!_0x50143e['me'])return new Promise(_0x53b723=>_0x50143e['on']('change:me',_0x53b723));})['catch'](_0x5c8ee4=>{throw console['error'](_0x5c8ee4),new _0x2e3272('cloudservices-init',null,{'originalError':_0x5c8ee4});});}['addToReconnectionStack'](_0x4dca7c){if('function'!=typeof _0x4dca7c['reconnect'])throw new _0x2e3272('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x4dca7c))throw new _0x2e3272('websocketgateway-plugin-already-registered',this,{'name':_0x4dca7c['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x4dca7c);}['removeFromReconnectionStack'](_0x230c14){this['_reconnectionStack']['delete'](_0x230c14);}['isInReconnectionStack'](_0x2816d1){return this['_reconnectionStack']['has'](_0x2816d1);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x2f24de=>_0x2f24de['reconnect']())))['then'](()=>this['state']=_0x1b4187['CONNECTED'])['catch'](_0x3e2481=>{throw console['error'](_0x3e2481),new _0x2e3272('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x1b4187['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x2570ba{['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,_0x1adc04];}constructor(_0x2d1f90){super(_0x2d1f90),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x1b4970(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x1adc04);}['init'](){const _0xd98c84=this['context']['plugins']['get'](c);this['listenTo'](_0xd98c84,'change:state',(_0x2152d8,_0x528d2c,_0x22baee)=>{if('connected'!==_0x22baee)this['channelSessions']['forEach'](_0x1d8f4a=>_0x1d8f4a['clear']()),this['channelConnectedUsers']['forEach'](_0x4994fb=>_0x4994fb['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x25318f,_0x38d542]of this['_registeredSessions'])for(const _0x7ac5b7 of _0x38d542)this['_handleSessionAdd'](_0x25318f,_0x7ac5b7);}}),this['_createUser'](_0xd98c84['connection']['me'],!0x0);}['register'](_0x193149,_0x41b3be){if(this['_registeredSessions']['has'](_0x193149))throw new _0x2e3272('sessions-register-already-registered',null,{'channelId':_0x193149});this['_registeredSessions']['set'](_0x193149,_0x41b3be),this['channelSessions']['set'](_0x193149,new _0x1b4970()),this['channelConnectedUsers']['set'](_0x193149,new _0x1b4970()),this['listenTo'](_0x41b3be,'add',(_0x54913b,_0x41f63f)=>this['_handleSessionAdd'](_0x193149,_0x41f63f)),this['listenTo'](_0x41b3be,'remove',(_0x3df78b,_0x1cc673)=>this['_handleSessionRemove'](_0x193149,_0x1cc673));for(const _0x1e324e of _0x41b3be)this['_handleSessionAdd'](_0x193149,_0x1e324e);}['unregister'](_0xb876fd){if(!this['_registeredSessions']['has'](_0xb876fd))throw new _0x2e3272('sessions-unregister-not-exist',null,{'channelId':_0xb876fd});const _0x3c024d=this['_registeredSessions']['get'](_0xb876fd);this['stopListening'](_0x3c024d);for(const _0x51ce93 of _0x3c024d)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0xb876fd,_0x51ce93);this['_registeredSessions']['delete'](_0xb876fd),this['channelSessions']['delete'](_0xb876fd),this['channelConnectedUsers']['delete'](_0xb876fd);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x3e69f2){for(const _0xbab6b1 of this['channelSessions']['values']())for(const _0x38851f of _0xbab6b1)if(_0x38851f['id']===_0x3e69f2)return _0x38851f['user'];}['getUserSessions'](_0x18aa6e,_0x210174){const _0x13ed4c=_0x210174?[this['channelSessions']['get'](_0x210174)]:this['channelSessions']['values'](),_0x44e8f7=new Set();for(const _0xaceb5c of _0x13ed4c)for(const _0x1d6282 of _0xaceb5c)_0x1d6282['user']['id']===_0x18aa6e['id']&&_0x44e8f7['add'](_0x1d6282['id']);return _0x44e8f7;}['getUserRole'](_0x22356e){for(const _0x240eaa of this['channelSessions']['values']())for(const _0x1fb728 of _0x240eaa)if(_0x1fb728['user']===_0x22356e)return _0x1fb728['role'];}['_handleSessionAdd'](_0x2f2aa7,_0x2c586e){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x241cda=_0x2c586e['user'],_0x19a6dc=this['_users']['getUser'](_0x241cda['id'])||this['_createUser'](_0x241cda),_0x55c0a8=Object['assign']({},_0x2c586e,{'user':_0x19a6dc});this['channelSessions']['get'](_0x2f2aa7)['add'](_0x55c0a8);const _0x113cdd=this['channelConnectedUsers']['get'](_0x2f2aa7);_0x113cdd['has'](_0x19a6dc['id'])||_0x113cdd['add'](_0x19a6dc),this['allConnectedUsers']['has'](_0x19a6dc['id'])||this['allConnectedUsers']['add'](_0x19a6dc,_0x19a6dc['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x2f2aa7,{'channelId':_0x2f2aa7,'session':_0x55c0a8});}['_handleSessionRemove'](_0x35411d,_0x4c4188){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x441e57=this['channelConnectedUsers']['get'](_0x35411d),_0x5e5a0c=_0x4c4188['user'];_0x5e5a0c['id']&&(this['channelSessions']['get'](_0x35411d)['remove'](_0x4c4188['id']),_0x441e57['has'](_0x5e5a0c['id'])&&!this['getUserSessions'](_0x5e5a0c,_0x35411d)['size']&&_0x441e57['remove'](_0x5e5a0c['id']),this['allConnectedUsers']['get'](_0x5e5a0c['id'])&&!this['getUserSessions'](_0x5e5a0c)['size']&&this['allConnectedUsers']['remove'](_0x5e5a0c['id']));}['_createUser'](_0x128aa1,_0x185496){const _0x5b82de=this['_users']['addUser'](_0x128aa1);return _0x185496&&this['_users']['defineMe'](_0x128aa1['id']),_0x5b82de['orderNumber']=this['_uniqueUsersCount']++,_0x5b82de;}}class H extends _0x348114{['_domEmitter']=new(_0x4c9d2a())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x3992e8=this['editor'],_0x135ebf=_0x3992e8['plugins']['get'](i);_0x3992e8['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x3de16d,{writer:_0x5d7eec})=>function(_0x573370,_0xfc431f,_0x1b378d,_0x2f94a9){const _0x1c6012=_0x573370['markerName']['split'](':')[0x2],_0x52df54=_0x1b378d['getUserBySessionId'](_0x1c6012);if(!_0x52df54||_0x1c6012===_0x1b378d['mySessionId'])return;if(!_0x2f94a9['model']['schema']['checkChild'](_0x573370['markerRange']['start'],'$text'))return;const _0x590d57={'class':'ck-user__marker\x20'+_0x52df54['color']['getMarkerClass'](),'data-name':_0x52df54['name'],'data-session-id':_0x1c6012},_0x580b96=_0x2f94a9['model']['markers']['get'](_0x573370['markerName']),_0x9c78a6=_0x580b96['getStart'](),_0x281d90=_0x9c78a6['nodeAfter'],_0x559ad1=_0x2f94a9['model']['schema'];if(_0x281d90&&_0x559ad1['isObject'](_0x281d90)&&_0x559ad1['isInline'](_0x281d90)&&!_0x2f94a9['model']['markers']['get']('user:range:'+_0x1c6012)['getRange']()['isCollapsed'])return;const _0x34b9d2=_0x9c78a6['parent'];return _0x2f94a9['model']['schema']['isLimit'](_0x34b9d2)&&!_0x2f94a9['model']['hasContent'](_0x34b9d2)&&(_0x590d57['contenteditable']=!0x1),function(_0x15f31a,_0xa89c9c,_0x527cbb){const _0x52b845=_0x15f31a['createUIElement']('span',_0xa89c9c);return _0x15f31a['setCustomProperty']('userPositionMarker',!0x0,_0x52b845),_0x52b845['render']=function(_0xafe3cf){const _0x3c5482=this['toDomElement'](_0xafe3cf);return _0x3c5482['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>'+_0x527cbb['name']+'</span>',_0x3c5482['addEventListener']('mouseenter',()=>{_0x3c5482['classList']['add']('ck-user__marker_hovered');}),_0x3c5482['addEventListener']('mouseleave',()=>{_0x3c5482['classList']['remove']('ck-user__marker_hovered');}),_0x3c5482;},_0x52b845['isSimilar']=function(_0x4372c6){return!(!this['getCustomProperty']('userPositionMarker')||!_0x4372c6['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x4372c6['getAttribute']('data-session-id'));},_0x52b845;}(_0xfc431f,_0x590d57,_0x52df54);}(_0x3de16d,_0x5d7eec,_0x135ebf,_0x3992e8)}),_0x3992e8['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x4f05aa=>function(_0x36403f,_0x18f93a){const _0xae48ad=_0x36403f['markerName']['split'](':')[0x2];if(_0xae48ad===_0x18f93a['mySessionId'])return null;const _0x3df567=_0x18f93a['getUserBySessionId'](_0xae48ad);if(!_0x3df567)return{'id':_0xae48ad,'classes':[]};return{'id':_0xae48ad,'classes':['ck-user__selection',_0x3df567['color']['getSelectionClass']()],'attributes':{'data-session-id':_0xae48ad},'priority':0x7d0+_0x3df567['orderNumber']};}(_0x4f05aa,_0x135ebf)}),function(_0x53ad44){const _0x359ba4=_0x53ad44['model'],_0x594e02=new Map(),_0x4ee20b=_0x53ad44['plugins']['get'](i);_0x359ba4['markers']['on']('update:user:range',(_0x3817a9,_0x43068d,_0x54e8c0,_0xf3cc66)=>{if(!_0xf3cc66&&_0x594e02['get'](_0x43068d['name']))return _0x594e02['get'](_0x43068d['name'])['detach'](),void _0x594e02['delete'](_0x43068d['name']);const _0x4c03e4=_0x43068d['name']['split'](':')[0x2];if(_0x4c03e4===_0x4ee20b['mySessionId'])return;const _0x1bb72e='user:position:'+_0x4c03e4;_0x359ba4['markers']['has'](_0x1bb72e)&&_0x53ad44['editing']['reconvertMarker'](_0x1bb72e),_0x43068d['on']('change:range',(_0x5282fc,_0x262784,_0x3c433d)=>{if('$graveyard'!=_0x262784['root']['rootName']&&'$graveyard'==_0x43068d['getRange']()['root']['rootName']&&!_0x594e02['has'](_0x43068d['name'])){const _0x236b83=_0x359ba4['schema']['getNearestSelectionRange'](_0x3c433d['deletionPosition']);if(_0x236b83){const _0x595d01=ht['fromRange'](_0x236b83);_0x594e02['set'](_0x43068d['name'],_0x595d01),_0x595d01['on']('change:range',(_0x51326c,_0x48a0a1,_0x31158a)=>{if('$graveyard'==_0x595d01['root']['rootName']){const _0x43bb0a=_0x359ba4['schema']['getNearestSelectionRange'](_0x31158a['deletionPosition']);_0x43bb0a?(_0x595d01['start']=_0x43bb0a['start'],_0x595d01['end']=_0x43bb0a['end']):(_0x594e02['delete'](_0x43068d['name']),_0x595d01['detach']());}});}}});}),_0x359ba4['document']['on']('change',()=>{_0x594e02['size']>0x0&&_0x359ba4['enqueueChange']({'isUndoable':!0x1},_0x2b17b4=>{for(const [_0x579ac4,_0x46999f]of _0x594e02)'$graveyard'==_0x359ba4['markers']['get'](_0x579ac4)['getRange']()['root']['rootName']&&(re(_0x579ac4['split'](':')[0x2],_0x46999f['toRange'](),_0x359ba4,_0x2b17b4),_0x46999f['detach']());_0x594e02['clear']();});});}(_0x3992e8),this['_domEmitter']['listenTo'](_0x23615d['document'],'keydown',(_0x557bec,{key:_0x98adc7})=>{'Escape'===_0x98adc7&&function(_0x46108a){_0x46108a['editing']['view']['change'](_0x4659f3=>{for(const _0x1c085b of _0x46108a['model']['markers']){if(!_0x1c085b['name']['startsWith']('user:position'))continue;const _0x37f231=_0x46108a['editing']['mapper']['markerNameToElements'](_0x1c085b['name']);if(_0x37f231){for(const _0x18e10f of _0x37f231)_0x4659f3['removeClass']('ck-user__marker_hovered',_0x18e10f);}}});}(_0x3992e8);},{'useCapture':!0x0});}['afterInit'](){const _0x593867=this['editor'],_0x3d4cff=_0x593867['commands']['get']('undo');_0x3d4cff&&_0x593867['model']['on']('applyOperation',(_0x35f639,_0x144741)=>{const _0x31cdf7=_0x144741[0x0];if('marker'!=_0x31cdf7['type']||!_0x31cdf7['name']['startsWith']('user:'))return;const _0x746e=_0x31cdf7['batch'];_0x3d4cff['_createdBatches']['has'](_0x746e)&&(_0x31cdf7['newRange']=_0x31cdf7['oldRange']?_0x593867['model']['createRange'](_0x31cdf7['oldRange']['start'],_0x31cdf7['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x4409c0=this['editor'],_0x49d2a3=_0x4409c0['model']['document'],_0xd1d0e2=_0x4409c0['plugins']['get'](i);_0x4409c0['model']['enqueueChange']({'isUndoable':!0x1},_0x1615f6=>{const _0x3db767='user:range:'+_0xd1d0e2['mySessionId'],_0x4762ae='user:position:'+_0xd1d0e2['mySessionId'],_0x437d89=_0x4409c0['model']['markers']['has'](_0x3db767);_0x4409c0['editing']['view']['hasDomSelection']?re(_0xd1d0e2['mySessionId'],_0x49d2a3['selection']['getFirstRange'](),_0x4409c0['model'],_0x1615f6):_0x437d89&&(_0x1615f6['removeMarker'](_0x3db767),_0x1615f6['removeMarker'](_0x4762ae));});}}function re(_0x2b1549,_0xf20440,_0x214868,_0x21dd28){const _0x2ef6df='user:range:'+_0x2b1549,_0x2dc874='user:position:'+_0x2b1549,_0xdd548f=_0xf20440['getContainedElement']();let _0x2b3ffe=_0xf20440['start'];_0xdd548f&&_0xdd548f['is']('element','tableCell')&&(_0x2b3ffe=function(_0x14a6d9,_0x364180){for(const _0x450668 of _0x14a6d9['getPositions']())if(_0x364180['schema']['checkChild'](_0x450668,'$text'))return _0x450668;}(_0xf20440,_0x214868),_0xf20440=_0x21dd28['createRange'](_0x2b3ffe));const _0x583efc=_0x21dd28['createRange'](_0x2b3ffe);_0x214868['markers']['has'](_0x2ef6df)?(_0x21dd28['updateMarker'](_0x2ef6df,{'range':_0xf20440}),_0x21dd28['updateMarker'](_0x2dc874,{'range':_0x583efc})):(_0x21dd28['addMarker'](_0x2ef6df,{'range':_0xf20440,'usingOperation':!0x0}),_0x21dd28['addMarker'](_0x2dc874,{'range':_0x583efc,'usingOperation':!0x0}));}function q(_0x37c31b,_0x503dec,_0x33f9fc){const _0x555433=_0x37c31b['t'],t=_0x37c31b['t'];switch(_0x503dec){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 _0x555433({'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'},_0x33f9fc);default:return'';}}let K=0x1;class l extends _0x348114{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
-
((()=>_0x478d92)());['_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,_0x4d25bd,_0x1adc04,_0x39ca86];}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 _0x5dc52f=this['serverHistory']['getOperations']();for(let _0x13a924=_0x5dc52f['length']-0x1;_0x13a924>=0x0;_0x13a924--){const _0x51c414=_0x5dc52f[_0x13a924];if(!this['_disconnectionOperations']['has'](_0x51c414))return _0x51c414['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x23af4a){if(super(_0x23af4a),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x12abdb(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x2e3272('collaboration-missing-channelid',this);const _0x12e2c1=_0x23af4a['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x12e2c1,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x17f265(),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 _0x1a777a=this['editor'],_0x287733=_0x1a777a['plugins']['get'](_0x1adc04),_0x2c0485=_0x1a777a['plugins']['get'](c);this['listenTo'](_0x287733,'getOperationAuthor',(_0x1de7e8,_0xa094d3)=>{const _0x558837=_0xa094d3[0x0];_0x558837['_authorId']&&(_0x1de7e8['return']=_0x287733['getUser'](_0x558837['_authorId']),_0x1de7e8['stop']()),null===_0x558837['_authorId']&&(_0x1de7e8['return']=null,_0x1de7e8['stop']());},{'priority':'high'}),this['listenTo'](_0x1a777a['model']['document']['selection'],'change:range',(_0x116f29,_0x780832)=>{_0x780832['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x1a777a['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x1a777a['model']['on']('applyOperation',(_0x1b975c,_0x449ca3)=>{const _0x2156f2=_0x449ca3[0x0];_0x2156f2['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x2156f2),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x2c0485,'state',this,'_hasSynchronizationProblem',(_0x360592,_0x4cddd9)=>'connected'===_0x360592&&!_0x4cddd9),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x1a777a['disableReadOnlyMode']('rtc-offline'):_0x1a777a['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x1a777a['disableReadOnlyMode']('rtc-offline'):_0x1a777a['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x40003e=this['editor']['plugins']['get'](i),_0x380cda=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x40003e['unregister'](this['_channelId']);const _0x12456a=await this['_service']['reconnect'](_0x380cda['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x12456a)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x853314=await this['_service']['getConnectedSessions']();_0x40003e['register'](this['_channelId'],_0x853314),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x535765){if(function(_0x597d90){return'404'===_0x597d90['code'];}(_0x535765)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x452761){return'409'===_0x452761['code'];}(_0x535765)){const _0x3c449c=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'](_0x3c449c);}else{if(!(_0x535765 instanceof J))throw _0x535765;this['_handleReconnectionError']();}}}}['destroy'](){const _0x18d280=this['editor']['plugins']['get'](c),_0xd40ace=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0xd40ace['channelSessions']['has'](this['_channelId'])&&_0xd40ace['unregister'](this['_channelId']),_0x18d280['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x11c50c){if(this['sessionId']!==_0x11c50c['sessionId']&&this['_lastSyncedOperationId']!==_0x11c50c['lastOperationId'])throw new J();return this['sessionId']=_0x11c50c['sessionId'],this['_handleServerResponse']([],{..._0x11c50c,'wereChangesApplied':!0x1,'data':_0x11c50c['data']},'reconnect');}async['_connectService'](_0x5a26ff,_0x4586ce=!0x1){const {connection:_0x1f9643}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x1f9643,this['_channelId'])['then'](_0x407831=>this['_initSessionsHandling'](_0x407831))['catch'](_0x56fab2=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x56fab2);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x419bfc,_0x3e2e37)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x3e2e37);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x3b3186=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x5a26ff);this['_isPendingUpdate']=!0x0;const _0x49a34c=await this['_service']['connect'](_0x1f9643,this['_compressOperations'](_0x5a26ff),_0x3b3186);if(this['sessionId']=_0x49a34c['sessionId'],_0x4586ce){if(!_0x49a34c['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x49a34c['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x5a26ff,_0x49a34c,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x49a34c,_0x5a26ff);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x3da62a=this['editor']['plugins']['get'](i),_0x35abaf=this['editor']['plugins']['get'](H),_0x57c019=_0x3da62a['channelSessions']['get'](this['_channelId']);_0x57c019&&_0x57c019['length']>0x1?_0x35abaf['createUserMarkerOperations']():this['listenTo'](_0x3da62a,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x3da62a['channelSessions']['get'](this['_channelId'])['length']&&_0x35abaf['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x4b6256,_0x1cc85f,_0x615ada,_0x19aeaf){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x1cc85f){const _0x4eeec8=this['_decompressOperations'](_0x615ada,_0x19aeaf);await this['_fetchMissingUsers'](_0x4eeec8),this['_handleExternalOperations'](_0x4eeec8,_0x1cc85f,_0x615ada['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x2c83fa}=this['editor'];let _0xb5d03b;try{_0xb5d03b=await this['_service']['getDocumentDetails']();}catch(_0x558a3e){const _0x5a622e=q(_0x2c83fa,'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'](_0x5a622e);}const _0x579678=_0xb5d03b['currentDocumentSession']||_0xb5d03b['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x579678['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x415392=q(_0x2c83fa,'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'](_0x415392);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x7bbce5){const _0x12872d=this['editor']['plugins']['get'](i);this['listenTo'](_0x12872d,'sessionAdd:'+this['_channelId'],(_0x4c016f,{session:_0x32f1d7})=>{if(_0x32f1d7['id']===_0x12872d['mySessionId']){_0x4c016f['off']();const _0x2ff757=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x1f0423=_0x32f1d7['permissions'];_0x2ff757&&_0x2ff757['isEnabled']&&(_0x1f0423=_0x1f0423['filter'](_0x3845b3=>'document:write'!==_0x3845b3)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x1f0423,this['_channelId']);}}),_0x12872d['register'](this['_channelId'],_0x7bbce5);}['_initThrowingOnDataSet'](){const _0x478ce1=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x2a89d3)=>{if(!_0x2a89d3[_0x2a89d3['length']-0x1]['suppressErrorInCollaboration'])throw new _0x2e3272('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x478ce1['apply'](this['editor']['data'],_0x2a89d3);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x1d9782,[_0x596fc4])=>{if(this['_document']['version'])throw new _0x2e3272('realtimecollaborationclient-init-document-already-initialized',this);_0x1d9782['stop'](),this['_setPendingAction']();const _0x308098=this['editor']['config']['get']('rootsAttributes'),_0x42832e=this['_getOperationsFromInitData'](_0x596fc4,_0x308098);0x0==_0x42832e['length']&&_0x42832e['push'](new _0x3848dc(0x0)),_0x1d9782['return']=this['_connectService'](_0x42832e)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x55ee3c=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x55ee3c))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x2d76aa,[_0x836075,_0x52909b])=>{_0x2d76aa['stop']();const _0x27d7eb=this['editor']['model']['document']['getRoot'](_0x836075);if(!this['_knownRootNames']['has'](_0x836075)){const _0xd074d9=_0x52909b&&_0x52909b['data']?_0x52909b['data']:'',_0x24182c=_0x52909b&&_0x52909b['attributes']?_0x52909b['attributes']:{};await this['_loadRoot'](_0x836075,_0xd074d9,_0x24182c);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x27d7eb['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x27d7eb);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x4b7e40){const _0x1bbcdb=this['editor']['plugins']['get'](_0x1adc04),{connection:_0x5ac9ef}=this['editor']['plugins']['get'](c),_0x5dc107=new Set();for(const _0x5dba26 of _0x4b7e40){const _0x2c9080=_0x5dba26['_authorId'];_0x2c9080&&!_0x1bbcdb['getUser'](_0x2c9080)&&_0x5dc107['add'](_0x2c9080);}if(0x0===_0x5dc107['size'])return;const _0x33e835=await dt['getMany'](_0x5ac9ef,Array['from'](_0x5dc107));for(const _0x564daa of _0x33e835)_0x1bbcdb['getUser'](_0x564daa['id'])||_0x1bbcdb['addUser'](_0x564daa);}['_getOperationsFromInitData'](_0x4c6981,_0x2040f7={}){const _0x184192=this['editor']['model'],_0x7cf1d4=[];let _0x12bca5=0x0;const _0x58cf5='string'==typeof _0x4c6981?{'main':_0x4c6981}:_0x4c6981;for(const _0x9ce8c2 of Object['keys'](_0x58cf5)){if(!this['_document']['roots']['has'](_0x9ce8c2))throw new _0x2e3272('realtimecollaborationclient-init-non-existent-root',this);const _0x42094f=this['editor']['data']['parse'](_0x58cf5[_0x9ce8c2]),_0x29e02b=this['_document']['getRoot'](_0x9ce8c2),_0x4940c2=new _0x5e3fb9(_0x184192['createPositionAt'](_0x29e02b,0x0),_0x42094f,_0x12bca5++);_0x7cf1d4['push'](_0x4940c2);for(const [_0x5c8ecf,_0x268296]of _0x42094f['markers']){const _0x45ff2f=_0x184192['createRange'](_0x184192['createPositionFromPath'](_0x29e02b,_0x268296['start']['path']['slice']()),_0x184192['createPositionFromPath'](_0x29e02b,_0x268296['end']['path']['slice']())),_0x47b7c2=new _0x468189(_0x5c8ecf,null,_0x45ff2f,_0x184192['markers'],!0x0,_0x12bca5++);_0x7cf1d4['push'](_0x47b7c2);}}if(_0x2040f7)for(const [_0x597b66,_0x57aa8f]of Object['entries'](_0x2040f7)){const _0x3efe5f=_0x184192['document']['getRoot'](_0x597b66);if(!_0x3efe5f)throw new _0x2e3272('multi-root-editor-root-attributes-no-root',null);for(const [_0x1c9ce9,_0x154219]of Object['entries'](_0x57aa8f))if(null!==_0x154219){const _0x2a4965=new _0x1fed11(_0x3efe5f,_0x1c9ce9,null,_0x154219,_0x12bca5++);_0x7cf1d4['push'](_0x2a4965);}}return _0x7cf1d4;}async['_loadRoot'](_0x3edb96,_0x4cb640,_0x30d4d7){this['_getOperationsFromInitData']({[_0x3edb96]:_0x4cb640},{[_0x3edb96]:_0x30d4d7})['forEach']((_0xdc1f6a,_0x3b4183)=>{_0xdc1f6a['baseVersion']=this['_document']['version']+_0x3b4183,_0xdc1f6a['_isInit']=!0x0,this['_saveOperationInBuffer'](_0xdc1f6a);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x30f104,_0x594ab6){let _0x27971a;this['_offset']=_0x30f104['offset'];const _0x200d22=_0x30f104['wereChangesApplied']&&!_0x30f104['initData'],_0x48543c=_0x200d22?0x0:_0x30f104['data']['baseVersion'];if(_0x594ab6['forEach'](_0x19d891=>{_0x19d891['_isInit']=!0x0,_0x19d891['createdAt']=_0x30f104['sessionCreatedAt'],_0x19d891['_authorId']=null;}),_0x200d22)_0x27971a=_0x594ab6,this['_applyOperationsSet'](_0x27971a,_0x200d22);else{if(_0x30f104['initData']){const _0x3ef415=this['_getOperationsFromInitData'](_0x30f104['initData']);this['_document']['history']['version']=-_0x3ef415['length'],_0x3ef415['forEach'](_0x3710f9=>{_0x3710f9['baseVersion']-=_0x3ef415['length'],_0x3710f9['createdAt']=_0x30f104['sessionCreatedAt'],_0x3710f9['_isInit']=!0x0,_0x3710f9['_authorId']=null;}),this['_applyOperationsSet'](_0x3ef415,!0x0),this['serverHistory']['version']=-_0x3ef415['length']+this['_offset'],this['_updateServerHistory'](_0x3ef415);}this['_document']['history']['version']=_0x48543c,_0x27971a=this['_decompressOperations'](_0x30f104['data'],_0x30f104['metadata']),await this['_fetchMissingUsers'](_0x27971a),this['_applyOperationsSet'](_0x27971a,_0x200d22);}_0x30f104['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x27971a,_0x30f104['lastOperationId']),this['_lastSyncedOperationId']=_0x30f104['lastOperationId']),this['serverHistory']['version']=_0x48543c+this['_offset'],this['_updateServerHistory'](_0x27971a),_0x594ab6['filter'](_0x5c3064=>{const _0x3b63ae=this['_getAffectedRoot'](_0x5c3064);return _0x3b63ae&&!this['_knownRootNames']['has'](_0x3b63ae);})['forEach']((_0xa40cd0,_0x37d7be)=>{_0xa40cd0['baseVersion']=this['_document']['version']+_0x37d7be,this['_saveOperationInBuffer'](_0xa40cd0);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x325cf8,_0x2151d8,_0x3c0bf6){throw this['_isPendingUpdate']=!0x0,_0x2151d8&&console['error'](_0x2151d8),_0x3c0bf6&&this['editor']['enableReadOnlyMode']('realtimecollaborationclient-error'),new _0x2e3272(_0x325cf8,this['editor']);}['_saveOperationInBuffer'](_0x5a8a83){this['_knownOperations']['has'](_0x5a8a83)||(this['_knownOperations']['add'](_0x5a8a83),this['_bufferedOperations']['push'](_0x5a8a83),this['_pendingAction']||'marker'==_0x5a8a83['type']&&!_0x5a8a83['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x241dff=!0x1){!_0x241dff&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x84bb47=>{_0x84bb47&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x6ee949=>{this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,function(_0x53fb48){return _0x53fb48['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x53fb48['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x53fb48['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x6ee949)||this['_crash'](_0x6ee949['message'],_0x6ee949,!0x0);});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x5f1125=>{this['on']('change:_isPendingUpdate',()=>{_0x5f1125();});});}async['_sendBufferedOperations'](){const _0x5f52f2=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x5f52f2['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x17815e=[...this['_bufferedOperations']];for(const _0x1b25a1 of _0x17815e)_0x1b25a1['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x1b25a1);const _0x4fc879=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x17815e),_0x38ec32=K++,_0x11bb73=this['_compressOperations'](_0x17815e),_0x2b1ca5=await this['_service']['sendOperations'](_0x11bb73,_0x11bb73['baseVersion'],_0x4fc879);try{return await this['_handleServerResponse'](_0x17815e,_0x2b1ca5,_0x38ec32);}catch(_0x9756ff){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x9756ff);}}async['_handleServerResponse'](_0x55f852,_0x7c171a,_0x143d06){if('error'in _0x7c171a)throw _0x7c171a['error'];let _0x276a3a=!0x1;if(_0x7c171a['wereChangesApplied']){_0x7c171a['lastOperationId']&&(this['_lastSyncedOperationId']=_0x7c171a['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x294262=>!_0x55f852['includes'](_0x294262));for(const _0x866acb of _0x55f852)_0x866acb['createdAt']='lastOperationAcceptedAt'in _0x7c171a&&_0x7c171a['lastOperationAcceptedAt']||void 0x0;Q(_0x55f852,_0x7c171a['version']-_0x55f852['length']),this['_updateServerHistory'](_0x55f852);const _0x1fbddb=_0x55f852['filter'](_0x434693=>{if(!_0x434693['_isInit'])return!0x1;const _0x261e1e=this['_getAffectedRoot'](_0x434693);return _0x261e1e&&!this['_knownRootNames']['has'](_0x261e1e);});Q(_0x1fbddb,this['_document']['version']),this['_applyOperationsSet'](_0x1fbddb),_0x276a3a=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x2ab3e9=this['_decompressOperations'](_0x7c171a['data'],_0x7c171a['metadata'])['filter'](_0x1a8c77=>_0x1a8c77['baseVersion']>=this['_lastServerVersion']);_0x2ab3e9['forEach'](_0x180b24=>this['_addKnownRoot'](_0x180b24)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x1e318e=>!_0x1e318e['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x1e318e))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x2ab3e9),_0x276a3a=this['_handleExternalOperations'](_0x2ab3e9,_0x7c171a['version'],_0x7c171a['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x276a3a?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x5eb1e1,_0x1f1e46,_0x26e55b){try{const _0x447766={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x17d0f3,operationsB:_0x3b3811,originalOperations:_0x538c71}=_0x2dd9b2(_0x5eb1e1,this['_bufferedOperations'],_0x447766);Q(_0x17d0f3,this['_document']['version']),Q(_0x3b3811,_0x1f1e46);for(const _0x344949 of _0x17d0f3){const _0x1383c2=_0x538c71['get'](_0x344949);_0x344949['_authorId']=_0x1383c2?_0x1383c2['_authorId']:null;}_0x26e55b&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x5eb1e1,_0x26e55b),this['_lastSyncedOperationId']=_0x26e55b),this['_bufferedOperations']=[..._0x3b3811],this['_applyOperationsSet'](_0x17d0f3),this['_updateServerHistory'](_0x5eb1e1);}catch(_0x42f656){return console['error'](_0x42f656),!0x1;}return!0x0;}['_applyOperationsSet'](_0x1b5d74,_0x259a6c=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0xa7f78d=>{for(const _0x510531 of _0x1b5d74)this['_knownOperations']['add'](_0x510531),this['_addKnownRoot'](_0x510531),_0xa7f78d['batch']['addOperation'](_0x510531),this['editor']['model']['applyOperation'](_0x510531);});}['_addKnownRoot'](_0x4affea){const _0x2fc6c7=this['_getAffectedRoot'](_0x4affea);_0x2fc6c7&&this['_knownRootNames']['add'](_0x2fc6c7);}['_getAffectedRoot'](_0x661f9b){let _0x56e307,_0x4eeda8;switch(_0x661f9b['type']){case'insert':_0x56e307=_0x661f9b['position']['root'];break;case'marker':if(_0x4eeda8=_0x661f9b['newRange'],!_0x4eeda8)return null;_0x56e307=_0x4eeda8['root'];break;case'addRootAttribute':_0x56e307=_0x661f9b['root'];break;case'addRoot':_0x56e307=_0x661f9b['affectedSelectable'];break;case'move':_0x56e307=_0x661f9b['targetPosition']['root'];break;default:return null;}return _0x56e307['rootName'];}['_updateServerHistory'](_0x53fa0c){_0x53fa0c['forEach'](_0x122a57=>{const _0x25d0d8=_0x122a57['clone']();_0x25d0d8['_authorId']=_0x122a57['_authorId'],_0x25d0d8['_isInit']=!!_0x122a57['_isInit'],_0x25d0d8['createdAt']=_0x122a57['createdAt'],_0x25d0d8['baseVersion']+=this['_offset'],_0x122a57['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x25d0d8),this['serverHistory']['addOperation'](_0x25d0d8);});}['_handleReconnectionError'](_0x465f16){const _0x58740f=this['editor']['plugins']['get']('Notification'),_0x1f6fd9=this['editor']['locale'];_0x465f16||(_0x465f16=q(_0x1f6fd9,'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.')),_0x58740f['showWarning'](_0x465f16,{'title':q(_0x1f6fd9,'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'](_0x4d25bd)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x4d25bd)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0xc1edd){const _0x39492e=_0xc1edd['map'](_0x1f8765=>_0x1f8765['toJSON']());return this['_compressor']['compress'](_0x39492e);}['_decompressOperations'](_0x1db9a8,_0x1bdc8c){return this['_compressor']['decompress'](_0x1db9a8)['map']((_0x1af40b,_0x4c49a9)=>{const _0x420140='init'==_0x1bdc8c[_0x4c49a9]['type'];if('InsertOperation'==_0x1af40b['__className']){const _0x38224d=_0x1af40b['position']['root'];!this['_document']['getRoot'](_0x38224d)&&(this['_document']['createRoot']('$root',_0x38224d)['_isAttached']=!0x1);}const _0x24ceda=_0x198c4d['fromJSON'](_0x1af40b,this['_document']);return _0x24ceda['wasUndone']=_0x1af40b['wasUndone'],_0x24ceda['_isInit']=_0x420140,_0x24ceda['_authorId']=_0x420140?null:_0x1bdc8c[_0x4c49a9]['userId'],_0x24ceda['_isDisconnection']='cs:removeUser'===_0x1bdc8c[_0x4c49a9]['type'],_0x24ceda['createdAt']=_0x1bdc8c[_0x4c49a9]['createdAt'],_0x24ceda;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x34f1ac=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x34f1ac&&_0x34f1ac['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x31b24f,_0x4feabc){for(const _0x50aaf5 of _0x31b24f)_0x50aaf5['baseVersion']=_0x4feabc++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x38a36b){this['_ignoredOperations']=_0x38a36b,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x1ea6f3){let _0xb40b5f=_0x1ea6f3['length'];for(;_0xb40b5f--;){const _0x1609bf=_0x1ea6f3[_0xb40b5f];if(!this['_ignoredOperations']['has'](_0x1609bf)){if(!this['_operationToId']['has'](_0x1609bf)){const _0x1c52d9=_0x50f5fd()['slice'](0x1,0x12);this['_operationToId']['set'](_0x1609bf,_0x1c52d9);}return this['_operationToId']['get'](_0x1609bf);}}}['setIdForTheLastOperation'](_0x9cbd70,_0x271734){if(!_0x271734)return;let _0x585450=_0x9cbd70['length'];for(;_0x585450--;){const _0x4d8306=_0x9cbd70[_0x585450];this['_ignoredOperations']['has'](_0x4d8306)||this['_operationToId']['set'](_0x4d8306,_0x271734);}}}class n extends _0x348114{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x2570ba{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
-
((()=>_0xa0ac43)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x1adc04];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x63e1b4){super(_0x63e1b4),this['_services']=new Map();}async['init'](){const _0x220328=this['context'],_0x3e7b20=_0x220328['plugins']['get']('CommentsRepository');if(_0x220328['plugins']['get'](c)['addToReconnectionStack'](this),_0x3e7b20['adapter']={'addCommentThread':async({channelId:_0x4f3b63,threadId:_0x641ef1,comments:_0x425047,resolvedAt:_0x536209,resolvedBy:_0x179c96,context:_0x2e0961,attributes:_0x218dc2})=>{const _0x38b7ef=await this['_getService'](_0x4f3b63)['addCommentThread']({'commentThreadId':_0x641ef1,'comments':_0x425047['map'](_0x1b2411=>function(_0x27283c,_0x38b120,_0x328ddb){return{'commentThreadId':_0x328ddb,'commentId':_0x27283c['commentId'],'userId':_0x27283c['authorId'],'content':_0x27283c['content'],'documentId':_0x38b120,'createdAt':_0x27283c['createdAt'],'attributes':_0x27283c['attributes']||{}};}(_0x1b2411,_0x4f3b63,_0x641ef1)),'resolvedAt':_0x536209,'resolvedBy':_0x179c96,'context':_0x2e0961,'attributes':_0x218dc2})['catch'](ut);return{'threadId':_0x38b7ef['commentThreadId'],'comments':_0x38b7ef['comments']};},'getCommentThread':async({channelId:_0x3fc91e,threadId:_0x5378f2})=>{const _0x5e37ab=await this['_getService'](_0x3fc91e)['getCommentThread'](_0x5378f2)['catch'](ut);return _0x5e37ab['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x5e37ab]),{'threadId':_0x5e37ab['commentThreadId'],'comments':_0x5e37ab['comments']['map'](S),'context':_0x5e37ab['context'],'resolvedAt':_0x5e37ab['resolvedAt'],'resolvedBy':_0x5e37ab['resolvedBy'],'attributes':_0x5e37ab['attributes']||{}});},'updateCommentThread':async({channelId:_0x239f0c,threadId:_0x84f70c,context:_0x36b467,unlinkedAt:_0x426f5e,attributes:_0x193f4b})=>this['_getService'](_0x239f0c)['updateCommentThread']({'commentThreadId':_0x84f70c,'context':_0x36b467,'attributes':_0x193f4b,'unlinkedAt':_0x426f5e})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x3ab7da,threadId:_0x8c7163})=>{const _0x19660f=await this['_getService'](_0x3ab7da)['resolveCommentThread'](_0x8c7163)['catch'](B)['catch'](ut);return{'threadId':_0x19660f['commentThreadId'],'resolvedAt':_0x19660f['resolvedAt'],'resolvedBy':_0x19660f['resolvedBy']};},'reopenCommentThread':async({channelId:_0x2c4735,threadId:_0x3222f3})=>this['_getService'](_0x2c4735)['reopenCommentThread'](_0x3222f3)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x5d04c4,threadId:_0x4b30e2})=>this['_getService'](_0x5d04c4)['removeCommentThread'](_0x4b30e2)['catch'](B)['catch'](ut),'addComment':({channelId:_0x3e53c6,threadId:_0x47fa15,commentId:_0x48548d,content:_0x5809f5,attributes:_0x125c69})=>this['_getService'](_0x3e53c6)['addComment'](_0x47fa15,_0x48548d,_0x5809f5,_0x125c69)['catch'](ut),'updateComment':({channelId:_0x32fde3,threadId:_0x5ae98b,commentId:_0x56c0e0,content:_0x295555,attributes:_0x38b595})=>this['_getService'](_0x32fde3)['updateComment'](_0x5ae98b,_0x56c0e0,_0x295555,_0x38b595)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x1fa2df,threadId:_0x5714bc,commentId:_0xc83b7e})=>this['_getService'](_0x1fa2df)['removeComment'](_0x5714bc,_0xc83b7e)['catch'](B)['catch'](ut)},_0x220328 instanceof _0xd60d61){const _0x50ca6a=_0x220328['config']['get']('collaboration.channelId'),_0x3ac1bf=_0x220328['plugins']['get'](i);await this['_setUpService'](_0x50ca6a);const _0x45ac6d=await this['_services']['get'](_0x50ca6a)['getConnectedSessions']();this['listenTo'](_0x3ac1bf,'sessionAdd:'+_0x50ca6a,(_0xf1ae57,{session:_0x3613fb})=>{_0x3613fb['id']===_0x3ac1bf['mySessionId']&&(_0xf1ae57['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x3613fb['permissions'],_0x50ca6a));}),_0x3ac1bf['register'](_0x50ca6a,_0x45ac6d);}}async['_setUpService'](_0x27b8a4){if(this['_services']['has'](_0x27b8a4))throw new _0x2e3272('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x27b8a4});const _0x503482=this['context']['plugins']['get']('CommentsRepository'),_0x5381c2=new a['CommentsService'](_0x27b8a4);this['_services']['set'](_0x27b8a4,_0x5381c2),this['listenTo'](_0x5381c2,'commentThreadAdded',(_0x247c75,_0xf27e6)=>{const {commentThreadId:_0x65ac04,documentId:_0x252551,context:_0x2c6346,attributes:_0x3682b5,resolvedAt:_0x3f1340,resolvedBy:_0x2cf8a1,comments:_0x19a524}=_0xf27e6;_0x503482['getCommentThread'](_0x65ac04)||_0x503482['addCommentThread']({'threadId':_0x65ac04,'channelId':_0x252551,'comments':_0x19a524?_0x19a524['map'](S):[],'context':_0x2c6346,'attributes':_0x3682b5,'resolvedAt':_0x3f1340,'resolvedBy':_0x2cf8a1,'isFromAdapter':!0x0});}),this['listenTo'](_0x5381c2,'commentThreadUpdated',(_0x159738,{commentThreadId:_0x4b1d8d,documentId:_0x7a57af,context:_0x570e21,unlinkedAt:_0x46b2f5,attributes:_0xf78d17})=>{_0x503482['getCommentThread'](_0x4b1d8d)&&_0x503482['updateCommentThread']({'threadId':_0x4b1d8d,'channelId':_0x7a57af,'context':_0x570e21,'unlinkedAt':_0x46b2f5,'attributes':_0xf78d17,'isFromAdapter':!0x0});}),this['listenTo'](_0x5381c2,'commentThreadResolved',(_0x1c97b1,{commentThreadId:_0x5e14ae,resolvedBy:_0x284549,resolvedAt:_0x54e9d0})=>{const _0x13cf76=_0x503482['getCommentThread'](_0x5e14ae);_0x13cf76&&_0x13cf76['resolve']({'resolvedBy':_0x284549,'resolvedAt':_0x54e9d0,'isFromAdapter':!0x0});}),this['listenTo'](_0x5381c2,'commentThreadReopened',(_0x1bccf6,{commentThreadId:_0x250770})=>{const _0x4adecf=_0x503482['getCommentThread'](_0x250770);_0x4adecf&&_0x4adecf['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x5381c2,'commentThreadRemoved',(_0xb60215,{commentThreadId:_0x3f6089})=>{const _0x25cad8=_0x503482['getCommentThread'](_0x3f6089);_0x25cad8&&_0x25cad8['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x5381c2,'commentAdded',(_0x2e8f7e,_0x517afc)=>{const _0x5a14e1=_0x517afc['commentThreadId'],_0xaf954a=_0x503482['getCommentThread'](_0x5a14e1);_0xaf954a&&_0xaf954a['addComment']({...S(_0x517afc),'isFromAdapter':!0x0});}),this['listenTo'](_0x5381c2,'commentUpdated',(_0x227406,{commentThreadId:_0x595658,commentId:_0x403c7d,content:_0x3ab222,attributes:_0x38ff58})=>{const _0x38b0a9=_0x503482['getCommentThread'](_0x595658);if(_0x38b0a9){const _0x265af8=_0x38b0a9['getComment'](_0x403c7d);_0x265af8&&_0x265af8['update']({'content':_0x3ab222,'attributes':_0x38ff58,'isFromAdapter':!0x0});}}),this['listenTo'](_0x5381c2,'commentRemoved',(_0x5c0952,{commentThreadId:_0x4d56e4,commentId:_0x3e89bd})=>{const _0x3b0395=_0x503482['getCommentThread'](_0x4d56e4);if(_0x3b0395){const _0x5cc2f5=_0x3b0395['getComment'](_0x3e89bd);_0x5cc2f5&&_0x5cc2f5['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x27b8a4);}['destroy'](){if(this['context']instanceof _0xd60d61){const _0x91f386=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x91f386);}}['_terminateService'](_0x370980){if(!this['_services']['has'](_0x370980))throw new _0x2e3272('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x370980});this['_getService'](_0x370980)['disconnect'](),this['_services']['delete'](_0x370980);}async['reconnect'](){for(const _0x2cc08d of this['_services']['keys']())await this['_connectService'](_0x2cc08d);if(this['context']instanceof _0xd60d61){const _0xc0fc48=this['context']['config']['get']('collaboration.channelId'),_0x140e6c=this['context']['plugins']['get'](i);_0x140e6c['unregister'](_0xc0fc48);const _0xf936b6=await this['_services']['get'](_0xc0fc48)['getConnectedSessions']();_0x140e6c['register'](_0xc0fc48,_0xf936b6);}}async['_connectService'](_0x3db70a){const {connection:_0x358509}=this['context']['plugins']['get'](c),_0xc57012=this['context']['plugins']['get']('CommentsRepository'),_0x257a71=this['_services']['get'](_0x3db70a),_0x191890=await _0x257a71['connect'](_0x358509);await this['_fetchMissingUsersForThreads'](_0x191890);const _0x4828e3=new Set(Array['from'](_0xc57012['getCommentThreads']({'channelId':_0x3db70a}),_0x5ca850=>_0x5ca850['id']));for(const _0xf69356 of _0x191890)_0xf69356['deletedAt']||_0x4828e3['delete'](_0xf69356['commentThreadId']);for(const _0x1f91a8 of _0x4828e3)_0xc57012['getCommentThread'](_0x1f91a8)['remove']({'isFromAdapter':!0x0});for(const _0x57dc70 of _0x191890){let _0x3b6938=_0xc57012['getCommentThread'](_0x57dc70['commentThreadId']);const {commentThreadId:_0x4e07ff,context:_0x4b1f8f,attributes:_0x22ec45,resolvedBy:_0x20042e,resolvedAt:_0x2e26b2,unlinkedAt:_0x44ba42,deletedAt:_0x12476e}=_0x57dc70;if(_0x12476e)continue;_0x3b6938||(_0x3b6938=_0xc57012['addCommentThread']({'channelId':_0x3db70a,'threadId':_0x4e07ff,'context':_0x4b1f8f,'attributes':_0x22ec45||{},'resolvedBy':_0x20042e,'resolvedAt':_0x2e26b2,'unlinkedAt':_0x44ba42,'isFromAdapter':!0x0}));const _0x596c53=new Set(Array['from'](_0x3b6938['comments'],_0x1b4d88=>_0x1b4d88['id']));for(const _0x42c888 of _0x57dc70['comments'])_0x596c53['delete'](_0x42c888['commentId']);for(const _0x3331c4 of _0x596c53)_0x3b6938['getComment'](_0x3331c4)['remove']({'isFromAdapter':!0x0});for(const _0x20b4a8 of _0x57dc70['comments']){const _0x5b228e=_0x3b6938['getComment'](_0x20b4a8['commentId']);_0x5b228e?_0x5b228e['content']!==_0x20b4a8['content']&&_0x5b228e['update']({'content':_0x20b4a8['content'],'isFromAdapter':!0x0}):_0x3b6938['addComment'](Object['assign'](S(_0x20b4a8),{'isFromAdapter':!0x0}));}}}['_getService'](_0x4016a6){if(!this['_services']['has'](_0x4016a6))throw new _0x2e3272('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x4016a6});return this['_services']['get'](_0x4016a6);}async['_fetchMissingUsersForThreads'](_0x46decc){const _0x2b0f84=this['context']['plugins']['get'](_0x1adc04),{connection:_0x13a1c6}=this['context']['plugins']['get'](c),_0x5c724d=new Set();for(const {resolvedBy:_0x252252,comments:_0x10fa5d}of _0x46decc){_0x252252&&!_0x2b0f84['getUser'](_0x252252)&&_0x5c724d['add'](_0x252252);for(const {userId:_0x2dc696}of _0x10fa5d)_0x2b0f84['getUser'](_0x2dc696)||_0x5c724d['add'](_0x2dc696);}if(0x0===_0x5c724d['size'])return;const _0x2ca472=await dt['getMany'](_0x13a1c6,Array['from'](_0x5c724d));for(const _0x1d96b7 of _0x2ca472)_0x2b0f84['getUser'](_0x1d96b7['id'])||_0x2b0f84['addUser'](_0x1d96b7);}}async function B(_0x2ce13f){if('404'!==_0x2ce13f['code'])throw _0x2ce13f;}function ut(_0x1e2e45){if((_0x49ad45=_0x1e2e45)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x49ad45['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x49ad45['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x49ad45;throw _0x1e2e45;}function S(_0xbb2d14){return{'threadId':_0xbb2d14['commentThreadId'],'commentId':_0xbb2d14['commentId'],'content':_0xbb2d14['content'],'createdAt':_0xbb2d14['createdAt'],'authorId':_0xbb2d14['userId'],'attributes':_0xbb2d14['attributes']||{}};}class f extends _0x348114{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
-
((()=>
|
|
28
|
-
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x1adc04];}static get['pluginName'](){return'CloudServicesRevisionHistoryAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ac6c9){super(_0x1ac6c9);const _0x1c2d19=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x1c2d19);}async['init'](){const _0x363dbd=this['editor']['plugins']['get'](l),_0x29fa02=_0x363dbd['serverHistory'],_0x367c28=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x29fa02,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x363dbd['sessionId']});const _0x129702=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x23f196=await tt['isBundleUploaded'](_0x367c28['connection'],_0x129702);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x4161bb})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x4161bb)),'updateRevisions':async _0x3030da=>{await this['_waitForServiceReady']();const _0x16a590=this['_revisionTracker']['currentRevision'];if(_0x23f196&&0x1===_0x3030da['length']&&_0x3030da[0x0]['id']===_0x16a590['id'])return _0x3030da;for(const _0x4f3d5a of _0x3030da)_0x4f3d5a['id']===_0x16a590['id']&&(_0x4f3d5a['isEmptyCurrent']=_0x4f3d5a['fromVersion']===_0x4f3d5a['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x3030da,this['_lastRequestId'])['then'](_0x2f1dba=>(this['_lastRequestId']=_0x2f1dba,_0x3030da))['catch'](_0x468597=>{if(st(_0x468597)||'400'===_0x468597['code']&&void 0x0!==_0x468597['data']['wrongRequestId']){for(const _0x1e08a0 of _0x3030da){!this['_revisionTracker']['repository']['getRevision'](_0x1e08a0['id'])||this['_revisionTracker']['_bufferUpdate'](_0x1e08a0['id'],_0x1e08a0,!0x1);}if(st(_0x468597))throw _0x468597;return _0x3030da;}throw _0x468597;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x241b3e,{revisionsData:_0x271335,requestId:_0x20fbd4})=>{Math['max'](..._0x271335['map'](_0x293f5f=>_0x293f5f['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x271335,_0x20fbd4);}):this['_handleRevisionsUpdate'](_0x271335,_0x20fbd4);});const {revisions:_0x31284a,requestId:_0x1c318c}=await this['_revisionHistoryService']['connect'](_0x367c28['connection']);_0x367c28['addToReconnectionStack'](this),this['_lastRequestId']=_0x1c318c,await this['_fetchMissingUsers'](_0x31284a);for(const _0x26b177 of _0x31284a)this['_revisionTracker']['addRevisionData'](_0x26b177);this['listenTo'](_0x363dbd,'change:_isConnected',(_0x196e9a,_0x531c3c,_0x1fb31e)=>{_0x1fb31e&&(this['_oldOffset']=_0x363dbd['_offset'],_0x196e9a['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x367c28,'state',_0x3be282=>_0x3be282===_0x1b4187['CONNECTED']);}async['reconnect'](){const _0x1faf8c=this['editor']['plugins']['get'](c),_0x191f08=this['editor']['plugins']['get'](l),_0x798822=async()=>{const _0x48affc=this['_revisionTracker']['currentRevision'],_0x232cbb=_0x48affc['id'],_0x2e9ca5=_0x232cbb!==_0x191f08['sessionId'];if(_0x2e9ca5){const _0x4e8f47=_0x191f08['_offset']-this['_oldOffset'],_0x39657a=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x48affc['toVersion']+_0x4e8f47!==_0x39657a){const _0x56fe4d=_0x48affc['fromVersion']+_0x4e8f47,_0x562e3e=this['editor']['plugins']['get'](_0x1adc04),_0x101193=this['_revisionTracker']['buildRevisionData']({'revision':_0x48affc,'from':_0x56fe4d,'to':_0x39657a});_0x101193['id']=_0x48affc['id'];const _0xce24f8=_0x101193['authorsIds']['map'](_0xb8c058=>_0x562e3e['getUser'](_0xb8c058));_0x48affc['_update']({..._0x101193,'authors':_0xce24f8},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x48affc['id'],_0x101193,!0x0);}this['_revisionTracker']['_startingVersion']=_0x39657a,(_0x48affc['toVersion']===_0x48affc['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x232cbb)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x232cbb),this['_revisionTracker']['_createCurrentRevision'](_0x39657a));}const {revisions:_0x39ad36,requestId:_0x3229dc}=await this['_revisionHistoryService']['reconnect'](_0x1faf8c['connection'],this['_lastRequestId']);_0x2e9ca5&&_0x39ad36['length']>0x0?_0x191f08['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x39ad36),this['_handleRevisionsUpdate'](_0x39ad36,_0x3229dc),this['_revisionTracker']['sendBufferedUpdates']());};return _0x191f08['_isConnected']?_0x798822():new Promise((_0x2f5f35,_0x5e02bb)=>{_0x191f08['once']('change:_isConnected',()=>{_0x798822()['then'](_0x2f5f35)['catch'](_0x5e02bb);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x46de36=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x3a345d=>{_0x3a345d['off'](),_0x46de36();});});}['_getLatestVersionFromServerOperations'](){const _0xb27226=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x5a16ce of _0xb27226)if('marker'!==_0x5a16ce['type']||_0x5a16ce['affectsData'])return _0x5a16ce['baseVersion']+0x1;}['_getLatestVersion'](){const _0x1e0cd0=this['editor']['plugins']['get'](l);return new Promise(_0x39818a=>{_0x1e0cd0['_isPendingUpdate']?_0x1e0cd0['once']('change:_isPendingUpdate',()=>{_0x39818a(this['_getLatestVersionFromServerOperations']());}):_0x39818a(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0xe20361,_0x3d74f0){const _0x4fa1a7=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x3d74f0;for(const _0x31cbe8 of _0xe20361){const _0x45a9a9=_0x4fa1a7['getRevision'](_0x31cbe8['id']);if(_0x45a9a9){if((_0x31cbe8['fromVersion']||_0x31cbe8['toVersion'])&&(_0x31cbe8['diffData']=null),_0x45a9a9===this['_revisionTracker']['currentRevision']){const _0x550bfd=Math['max'](_0x45a9a9['toVersion'],_0x31cbe8['toVersion']),_0x2412b5=Math['max'](_0x45a9a9['fromVersion'],_0x31cbe8['fromVersion']);let _0x4b6dd7;_0x45a9a9['toVersion']===_0x31cbe8['toVersion']&&_0x45a9a9['fromVersion']===_0x31cbe8['fromVersion']?(_0x4b6dd7=!0x0,this['_preventResendingRevisionData'](_0x31cbe8)):_0x31cbe8['toVersion']===_0x550bfd&&_0x31cbe8['fromVersion']===_0x2412b5?_0x4b6dd7=!0x1:(_0x45a9a9['toVersion']===_0x550bfd&&_0x45a9a9['fromVersion']===_0x2412b5||this['_fixRevision']({'revision':_0x45a9a9,'from':_0x2412b5,'to':_0x550bfd}),_0x4b6dd7=!0x0),_0x4b6dd7&&(delete _0x31cbe8['fromVersion'],delete _0x31cbe8['toVersion'],delete _0x31cbe8['diffData'],delete _0x31cbe8['createdAt'],delete _0x31cbe8['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x31cbe8),this['_preventResendingRevisionData'](_0x31cbe8);}else this['_revisionTracker']['addRevisionData'](_0x31cbe8);}const _0x4138d9=_0x4fa1a7['getRevisions']();_0x4138d9['reverse']();for(let _0x344b0e=0x0;_0x344b0e<_0x4138d9['length']-0x1;_0x344b0e++){const _0x31db26=_0x4138d9[_0x344b0e],_0x443885=_0x4138d9[_0x344b0e+0x1];if(_0x31db26['fromVersion']<_0x443885['toVersion']){const _0x45ff92=_0x443885['toVersion'],_0x124e74=Math['max'](_0x45ff92,_0x31db26['toVersion']);this['_fixRevision']({'revision':_0x31db26,'from':_0x45ff92,'to':_0x124e74});}}}['_fixRevision']({revision:_0x24204d,from:_0xec6e6a,to:_0x30cbec}={}){const _0x1f3a37=this['editor']['plugins']['get'](_0x1adc04),_0x139ee3=this['_revisionTracker']['buildRevisionData']({'revision':_0x24204d,'from':_0xec6e6a,'to':_0x30cbec});_0x139ee3['authors']=_0x139ee3['authorsIds']['map'](_0x4817e7=>_0x1f3a37['getUser'](_0x4817e7)),_0x24204d['_update'](_0x139ee3);}['_preventResendingRevisionData'](_0x585206){const _0x112b26={};_0x112b26['id']=_0x585206['id'];for(const _0x3cd2da of Object['keys'](_0x585206))'id'!==_0x3cd2da&&(_0x112b26[_0x3cd2da]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x112b26['id'],_0x112b26,!0x0);}async['_fetchMissingUsers'](_0x4fc114){const _0x2102ff=this['editor']['plugins']['get'](_0x1adc04),{connection:_0x7ddb8f}=this['editor']['plugins']['get'](c),_0x5db1fb=new Set();for(const _0x192da1 of _0x4fc114){for(const _0x1570b7 of _0x192da1['authorsIds'])_0x2a79ba(_0x1570b7);_0x192da1['creatorId']&&_0x2a79ba(_0x192da1['creatorId']);}if(0x0===_0x5db1fb['size'])return;const _0x29f2a6=await dt['getMany'](_0x7ddb8f,Array['from'](_0x5db1fb));for(const _0x467536 of _0x29f2a6)_0x2102ff['getUser'](_0x467536['id'])||_0x2102ff['addUser'](_0x467536);function _0x2a79ba(_0x4ce7ef){_0x2102ff['getUser'](_0x4ce7ef)||_0x5db1fb['add'](_0x4ce7ef);}}}function st(_0x38e6b7){return _0x38e6b7['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x38e6b7['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x38e6b7['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x348114{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 _0x3f9851{constructor(_0x76ec97){super(_0x76ec97);const _0x1da8f2=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x1da8f2['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x1da8f2['to']('usersCount',_0x1963d5=>q(_0x76ec97,'CONNECTED_USERS',_0x1963d5))}]});}}class es extends _0x3f9851{['items'];['keystrokes'];constructor(_0x36554e){super(_0x36554e);const _0x393e9d=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0xd8aef6(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x393e9d['if']('hasPopup'),'aria-expanded':_0x393e9d['to']('isExpanded',_0x4d5c3a=>this['hasPopup']&&String(_0x4d5c3a)),'aria-label':_0x393e9d['to']('hasPopup',_0x1a1acd=>q(_0x36554e,_0x1a1acd?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x393e9d['to']('hasPopup',_0x31d8cc=>!!_0x31d8cc&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x393e9d['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x135a06,_0x334ac5,_0x5532b7)=>{this['element']&&(_0x5532b7?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 _0x3f9851{['counterView'];['inlineListView'];constructor(_0x3d2a34){super(_0x3d2a34);const _0x2ef2cf=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x3d2a34),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x10980f of this['inlineListView']['items'])_0x10980f['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',_0x2ef2cf['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x3f9851{['listWrapperView'];constructor(_0x58abc8,_0x1a92cb){super(_0x58abc8),this['listWrapperView']=new mt(_0x58abc8,_0x1a92cb),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x58abc8,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x3304c8{constructor(_0x3814a2,_0x21337c){super(_0x3814a2);const _0x4110de=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x21337c?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x4110de['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x4110de['to']('role'),'aria-label':_0x4110de['to']('ariaLabel'),'aria-labelledby':_0x4110de['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x23615d['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x3c9257=this['element'];_0x3c9257&&(this['_isScrollable']=Math['max'](_0x3c9257['scrollHeight'],_0x3c9257['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x1dc546,_0x41eeb9,_0x5e73dd){super(_0x1dc546);const _0x5d50ef=this['bindTemplate'];this['userView']=new ct(_0x1dc546,_0x41eeb9);const _0xb5fda3={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x41eeb9['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x41eeb9['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x41eeb9['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x5e73dd&&(_0xb5fda3['tag']='button',_0xb5fda3['on']={'click':_0x5d50ef['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0xb5fda3);}['focus'](){this['element']['focus']();}}class y extends _0x3f9851{['userView'];['markerView'];constructor(_0x414c0d,_0x118816,_0x9b1c8e){super(_0x414c0d);const _0xf91c04=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x414c0d,_0x118816),this['markerView']=new at(_0x414c0d,_0x118816);const _0x1d6842=new ot(_0x414c0d);_0x1d6842['template']['tag']='span',_0x1d6842['text']=_0x118816['name'];const _0x1dbf2b={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0xf91c04['to']('isFocusable',_0x279d8b=>!!_0x279d8b&&0x0),'aria-labelledby':_0x1d6842['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0xf91c04['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0xf91c04['to']('hasTooltip',_0x408376=>!_0x408376),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x1d6842]};_0x9b1c8e&&(_0x1dbf2b['tag']='button',_0x1dbf2b['on']={'click':_0xf91c04['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1dbf2b);}}class at extends _0x3f9851{constructor(_0x1c3ce7,_0x2b5bfd){super(_0x1c3ce7),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x2b5bfd['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x2570ba{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x36d129){super(_0x36d129),this['context']['config']['define']('presenceList',A);const _0x1e043d=_0x36d129['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x1e043d)throw new _0x2e3272('presencelist-collapseat-invalid-format',this);if(_0x1e043d<0x1)throw new _0x2e3272('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x1b4970(),this['balloonPanelView']=new _0x99933(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x4af79e of this['_allConnectedUsers'])this['_handleUserAdd'](_0x4af79e);this['listenTo'](this['_allConnectedUsers'],'add',(_0x95032,_0x3fa28e)=>{this['_handleUserAdd'](_0x3fa28e);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x198ab5,_0x25251a)=>{this['_handleUserRemove'](_0x25251a);});}['_createView'](){const _0x4fc22b=this['context'],_0xd53dc7=new L(this['context']['locale']),_0x278f41=this['balloonPanelView'];if(!_0x3f492d(_0x4fc22b['config']['get']('presenceList.container')))throw new _0x2e3272('presencelist-missing-container',this);return _0xd53dc7['counterView']['bind']('usersCount')['to'](this),_0xd53dc7['bind']('isCollapsed')['to'](this,'usersCount',_0x170078=>{const {collapseAt:_0x4cff2c,displayMe:_0x56403e}=_0x4fc22b['config']['get']('presenceList'),_0x1cc609=_0x170078>=_0x4cff2c;return _0xd53dc7['counterView']['isHidden']=!(0x1==_0x170078&&_0x56403e||_0x1cc609),_0x1cc609||this['hideDropdown'](),_0x1cc609;}),_0xd53dc7['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0xd32276=>{const _0x3b05d8=_0x4fc22b['config']['get']('presenceList'),_0x2c5f76=new y(_0x4fc22b['locale'],_0xd32276,!!_0x3b05d8['onClick']);return _0x2c5f76['bind']('hasTooltip')['to'](_0xd53dc7,'isCollapsed',_0x438fd3=>!_0x438fd3),_0x2c5f76['bind']('isFocusable')['to'](_0xd53dc7,'isCollapsed',_0x4d7cf9=>!_0x4d7cf9),_0x3b05d8['onClick']&&this['listenTo'](_0x2c5f76,'execute',()=>{this['view']['isCollapsed']||_0x3b05d8['onClick'](_0xd32276,_0x2c5f76['element']);}),_0x2c5f76;}),this['listenTo'](_0xd53dc7['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0xd53dc7['inlineListView']['keystrokes']['set']('Enter',(_0x52019e,_0x3ca201)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x3ca201());}),_0xd53dc7['render'](),_0x278f41['render'](),_0x1b10bb({'emitter':_0xd53dc7,'activator':()=>_0x278f41['isVisible'],'contextElements':[_0x278f41['element'],_0xd53dc7['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x4fc22b['config']['get']('presenceList.container')['appendChild'](_0xd53dc7['element']),this['_bodyCollection']=new _0x4dadbb(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0xd53dc7;}['_handleUserAdd'](_0x4f326e){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x4f326e['isMe'])return;const _0xde5b75=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0xde5b75&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x33a9ad=_0x4f326e['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x4f326e,_0x33a9ad);}['_handleUserRemove'](_0xac9954){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0xac9954['id'])&&(this['currentDisplayedUsers']['remove'](_0xac9954['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x298c53 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x298c53['id']))return void this['currentDisplayedUsers']['add'](_0x298c53,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0xfbc7b=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0xfbc7b['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x22d233}=this['presenceDropdownView'];_0x22d233['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x7fc5c3=>{if(!_0xfbc7b['displayMe']&&_0x7fc5c3['isMe'])return null;const _0x4bacbb=new k(this['context']['locale'],_0x7fc5c3,!!_0xfbc7b['onClick']);return _0xfbc7b['onClick']&&this['listenTo'](_0x4bacbb,'execute',()=>{_0xfbc7b['onClick'](_0x7fc5c3,_0x4bacbb['element']);}),_0x4bacbb;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x22d233['focus'](),_0x22d233['checkIfScrollable']();const _0x4d7825=(_0x276917,_0x1365f2)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x1365f2();};_0x22d233['keystrokes']['set']('Esc',_0x4d7825),_0x22d233['keystrokes']['set']('Shift+Tab',_0x4d7825),_0x22d233['keystrokes']['set']('Tab',(_0x1b4249,_0x4d2d96)=>{!function(_0x153102){const _0x25a907=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x4c65eb=>_0x4c65eb+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0xe9bb6b=[...document['body']['querySelectorAll'](_0x25a907)]['filter'](_0xf83c76=>_0xf83c76===document['activeElement']||_0xf83c76['offsetWidth']+_0xf83c76['offsetHeight']>0x0)['sort']((_0x8c9e0f,_0x392515)=>(_0x8c9e0f['tabIndex']||0x0)-(_0x392515['tabIndex']||0x0)),_0xa7ee47=_0xe9bb6b['indexOf'](_0x153102),_0x3c5890=_0xe9bb6b[(_0xa7ee47+0x1)%_0xe9bb6b['length']];_0x3c5890&&_0x3c5890['focus']();}(this['view']['element']),this['hideDropdown'](),_0x4d2d96();}),_0x22d233['focusTracker']['add'](this['view']['element']),_0x22d233['focusTracker']['on']('change:isFocused',(_0x50c9d7,_0x94a843,_0x53f5ef)=>{_0x53f5ef||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 _0x2570ba{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 _0xf32368,Plugin as _0x54be99,PendingActions as _0x45e8ba,Context as _0x3b8260}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x3c3e51,CKEditorError as _0x47f125,Collection as _0x2fe827,global as _0x1d2af1,version as nt,uid as _0x5cace2,KeystrokeHandler as _0x2eface}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x2cb949,View as _0x30ffbd,ListView as _0x551b2d,ListItemView as et,LabelView as ot,BalloonPanelView as _0x46174d,clickOutsideHandler as _0x3df6cb,BodyCollection as _0x498766}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as at,History as _0x304a65,NoOperation as _0x452668,InsertOperation as _0x21d99d,MarkerOperation as _0x3dccf2,RootAttributeOperation as _0x16d8c6,transformSets as _0x312986,OperationFactory as _0x444cba}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as ht,WEB_SOCKET_GATEWAY_STATES as _0x347654,CollaborativeEditingService as _0x49dce4,User as lt,CommentsService as _0x77088c,TrackChangesService as _0x4254e2,RevisionHistoryService as _0x304e9e,EditorService as _0x1f0bdd}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x1e9797,UserView as rt}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x395e46}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x5056da}from'lodash-es';class c extends _0xf32368{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
|
|
24
|
+
((()=>ht)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x2cb949];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46f87b){super(_0x46f87b),this['set']('state',_0x347654['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x3c3e51);}['init'](){const _0x44441c=this['context'],_0x5dd1d4=_0x44441c['plugins']['get']('CloudServices'),_0x489b51=_0x44441c['plugins']['get'](_0x2cb949);if(!_0x5dd1d4['token'])throw new _0x47f125('websocketgateway-missing-token',this);if(!_0x5dd1d4['webSocketUrl'])throw new _0x47f125('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'](_0x5dd1d4['token'],_0x5dd1d4['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x1ca47a=>{if(this['connection']=_0x1ca47a,this['bind']('state')['to'](_0x1ca47a,'state',this,'_isBrowserOffline',(_0x430f8b,_0x337e5d)=>('connected'!==_0x430f8b&&(this['_shouldPluginsReconnect']=!0x0),_0x337e5d||_0x430f8b!==_0x347654['CONNECTED']?_0x347654['DISCONNECTED']:this['state']==_0x347654['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x347654['CONNECTING']):_0x347654['CONNECTED'])),this['connection']['on']('error',(_0x3010c3,_0x3c0a9e)=>{if('limitExceeded'!==_0x3c0a9e['code'])throw console['error'](_0x3c0a9e),new _0x47f125('cloudservices-init',null,{'originalError':_0x3c0a9e});_0x489b51['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'});}),!_0x1ca47a['me'])return new Promise(_0x1e3098=>_0x1ca47a['on']('change:me',_0x1e3098));})['catch'](_0x32fbcc=>{throw console['error'](_0x32fbcc),new _0x47f125('cloudservices-init',null,{'originalError':_0x32fbcc});});}['addToReconnectionStack'](_0x2288ad){if('function'!=typeof _0x2288ad['reconnect'])throw new _0x47f125('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x2288ad))throw new _0x47f125('websocketgateway-plugin-already-registered',this,{'name':_0x2288ad['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x2288ad);}['removeFromReconnectionStack'](_0x372f21){this['_reconnectionStack']['delete'](_0x372f21);}['isInReconnectionStack'](_0x40264e){return this['_reconnectionStack']['has'](_0x40264e);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x3652b3=>_0x3652b3['reconnect']())))['then'](()=>this['state']=_0x347654['CONNECTED'])['catch'](_0x13c2d4=>{throw console['error'](_0x13c2d4),new _0x47f125('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x347654['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0xf32368{['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,_0x1e9797];}constructor(_0x364cec){super(_0x364cec),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x2fe827(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x1e9797);}['init'](){const _0xdae5d9=this['context']['plugins']['get'](c);this['listenTo'](_0xdae5d9,'change:state',(_0x226e49,_0x4e944a,_0x276b4a)=>{if('connected'!==_0x276b4a)this['channelSessions']['forEach'](_0x376a43=>_0x376a43['clear']()),this['channelConnectedUsers']['forEach'](_0x49f568=>_0x49f568['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x17c251,_0x51d65a]of this['_registeredSessions'])for(const _0xcc5045 of _0x51d65a)this['_handleSessionAdd'](_0x17c251,_0xcc5045);}}),this['_createUser'](_0xdae5d9['connection']['me'],!0x0);}['register'](_0x2e0413,_0x5abb8f){if(this['_registeredSessions']['has'](_0x2e0413))throw new _0x47f125('sessions-register-already-registered',null,{'channelId':_0x2e0413});this['_registeredSessions']['set'](_0x2e0413,_0x5abb8f),this['channelSessions']['set'](_0x2e0413,new _0x2fe827()),this['channelConnectedUsers']['set'](_0x2e0413,new _0x2fe827()),this['listenTo'](_0x5abb8f,'add',(_0xa7b01,_0x2a9952)=>this['_handleSessionAdd'](_0x2e0413,_0x2a9952)),this['listenTo'](_0x5abb8f,'remove',(_0x5def71,_0x3b5f8a)=>this['_handleSessionRemove'](_0x2e0413,_0x3b5f8a));for(const _0x22bf09 of _0x5abb8f)this['_handleSessionAdd'](_0x2e0413,_0x22bf09);}['unregister'](_0x179e5e){if(!this['_registeredSessions']['has'](_0x179e5e))throw new _0x47f125('sessions-unregister-not-exist',null,{'channelId':_0x179e5e});const _0x188792=this['_registeredSessions']['get'](_0x179e5e);this['stopListening'](_0x188792);for(const _0x4fc3eb of _0x188792)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x179e5e,_0x4fc3eb);this['_registeredSessions']['delete'](_0x179e5e),this['channelSessions']['delete'](_0x179e5e),this['channelConnectedUsers']['delete'](_0x179e5e);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x179201){for(const _0x34c771 of this['channelSessions']['values']())for(const _0x2c572c of _0x34c771)if(_0x2c572c['id']===_0x179201)return _0x2c572c['user'];}['getUserSessions'](_0x209574,_0x56f653){const _0x5adc58=_0x56f653?[this['channelSessions']['get'](_0x56f653)]:this['channelSessions']['values'](),_0x554220=new Set();for(const _0x254a35 of _0x5adc58)for(const _0x55b135 of _0x254a35)_0x55b135['user']['id']===_0x209574['id']&&_0x554220['add'](_0x55b135['id']);return _0x554220;}['getUserRole'](_0x6cae7a){for(const _0x5713e0 of this['channelSessions']['values']())for(const _0x228105 of _0x5713e0)if(_0x228105['user']===_0x6cae7a)return _0x228105['role'];}['_handleSessionAdd'](_0x52d488,_0x5e170f){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x2b7f8a=_0x5e170f['user'],_0x23620f=this['_users']['getUser'](_0x2b7f8a['id'])||this['_createUser'](_0x2b7f8a),_0x2df5f2=Object['assign']({},_0x5e170f,{'user':_0x23620f});this['channelSessions']['get'](_0x52d488)['add'](_0x2df5f2);const _0x3ff645=this['channelConnectedUsers']['get'](_0x52d488);_0x3ff645['has'](_0x23620f['id'])||_0x3ff645['add'](_0x23620f),this['allConnectedUsers']['has'](_0x23620f['id'])||this['allConnectedUsers']['add'](_0x23620f,_0x23620f['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x52d488,{'channelId':_0x52d488,'session':_0x2df5f2});}['_handleSessionRemove'](_0xd76203,_0x3358e5){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0xf3783e=this['channelConnectedUsers']['get'](_0xd76203),_0x539e8b=_0x3358e5['user'];_0x539e8b['id']&&(this['channelSessions']['get'](_0xd76203)['remove'](_0x3358e5['id']),_0xf3783e['has'](_0x539e8b['id'])&&!this['getUserSessions'](_0x539e8b,_0xd76203)['size']&&_0xf3783e['remove'](_0x539e8b['id']),this['allConnectedUsers']['get'](_0x539e8b['id'])&&!this['getUserSessions'](_0x539e8b)['size']&&this['allConnectedUsers']['remove'](_0x539e8b['id']));}['_createUser'](_0x58b8bf,_0x51df03){const _0x5325f7=this['_users']['addUser'](_0x58b8bf);return _0x51df03&&this['_users']['defineMe'](_0x58b8bf['id']),_0x5325f7['orderNumber']=this['_uniqueUsersCount']++,_0x5325f7;}}class J extends _0x54be99{['_domEmitter']=new(_0x3c3e51())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x2baa59=this['editor'],_0x494b8e=_0x2baa59['plugins']['get'](i);_0x2baa59['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x16f887,{writer:_0x44cc30})=>function(_0x477584,_0x3ae0db,_0x4896e5,_0x54e2b6){const _0x50b785=_0x477584['markerName']['split'](':')[0x2],_0x1d0e58=_0x4896e5['getUserBySessionId'](_0x50b785);if(!_0x1d0e58||_0x50b785===_0x4896e5['mySessionId'])return;if(!_0x54e2b6['model']['schema']['checkChild'](_0x477584['markerRange']['start'],'$text'))return;const _0x4e3630={'class':'ck-user__marker\x20'+_0x1d0e58['color']['getMarkerClass'](),'data-name':_0x1d0e58['name'],'data-session-id':_0x50b785},_0xae34df=_0x54e2b6['model']['markers']['get'](_0x477584['markerName']),_0x58eb6f=_0xae34df['getStart'](),_0x3b1a5c=_0x58eb6f['nodeAfter'],_0x2c0ff8=_0x54e2b6['model']['schema'];if(_0x3b1a5c&&_0x2c0ff8['isObject'](_0x3b1a5c)&&_0x2c0ff8['isInline'](_0x3b1a5c)&&!_0x54e2b6['model']['markers']['get']('user:range:'+_0x50b785)['getRange']()['isCollapsed'])return;const _0x17e284=_0x58eb6f['parent'];return _0x54e2b6['model']['schema']['isLimit'](_0x17e284)&&!_0x54e2b6['model']['hasContent'](_0x17e284)&&(_0x4e3630['contenteditable']=!0x1),function(_0x5334c6,_0x4542b8,_0x146eed){const _0x565d7b=_0x5334c6['createUIElement']('span',_0x4542b8);return _0x5334c6['setCustomProperty']('userPositionMarker',!0x0,_0x565d7b),_0x565d7b['render']=function(_0x3c1050){const _0x3a83f4=this['toDomElement'](_0x3c1050);return _0x3a83f4['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>'+_0x146eed['name']+'</span>',_0x3a83f4['addEventListener']('mouseenter',()=>{_0x3a83f4['classList']['add']('ck-user__marker_hovered');}),_0x3a83f4['addEventListener']('mouseleave',()=>{_0x3a83f4['classList']['remove']('ck-user__marker_hovered');}),_0x3a83f4;},_0x565d7b['isSimilar']=function(_0xf1f27e){return!(!this['getCustomProperty']('userPositionMarker')||!_0xf1f27e['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0xf1f27e['getAttribute']('data-session-id'));},_0x565d7b;}(_0x3ae0db,_0x4e3630,_0x1d0e58);}(_0x16f887,_0x44cc30,_0x494b8e,_0x2baa59)}),_0x2baa59['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x5ba6b1=>function(_0x20b672,_0x5288d5){const _0x402ac7=_0x20b672['markerName']['split'](':')[0x2];if(_0x402ac7===_0x5288d5['mySessionId'])return null;const _0x15cee7=_0x5288d5['getUserBySessionId'](_0x402ac7);if(!_0x15cee7)return{'id':_0x402ac7,'classes':[]};return{'id':_0x402ac7,'classes':['ck-user__selection',_0x15cee7['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x402ac7},'priority':0x7d0+_0x15cee7['orderNumber']};}(_0x5ba6b1,_0x494b8e)}),function(_0x3b333a){const _0x46e382=_0x3b333a['model'],_0x24e484=new Map(),_0x169cf2=_0x3b333a['plugins']['get'](i);_0x46e382['markers']['on']('update:user:range',(_0x20ff0f,_0xbc7bb9,_0x32eced,_0x2db3d7)=>{if(!_0x2db3d7&&_0x24e484['get'](_0xbc7bb9['name']))return _0x24e484['get'](_0xbc7bb9['name'])['detach'](),void _0x24e484['delete'](_0xbc7bb9['name']);const _0x538a5c=_0xbc7bb9['name']['split'](':')[0x2];if(_0x538a5c===_0x169cf2['mySessionId'])return;const _0x55bbda='user:position:'+_0x538a5c;_0x46e382['markers']['has'](_0x55bbda)&&_0x3b333a['editing']['reconvertMarker'](_0x55bbda),_0xbc7bb9['on']('change:range',(_0x16d07e,_0x3f1ef7,_0x50411f)=>{if('$graveyard'!=_0x3f1ef7['root']['rootName']&&'$graveyard'==_0xbc7bb9['getRange']()['root']['rootName']&&!_0x24e484['has'](_0xbc7bb9['name'])){const _0x3505a0=_0x46e382['schema']['getNearestSelectionRange'](_0x50411f['deletionPosition']);if(_0x3505a0){const _0x5110a6=at['fromRange'](_0x3505a0);_0x24e484['set'](_0xbc7bb9['name'],_0x5110a6),_0x5110a6['on']('change:range',(_0x1651cc,_0x298655,_0x178ee8)=>{if('$graveyard'==_0x5110a6['root']['rootName']){const _0x909439=_0x46e382['schema']['getNearestSelectionRange'](_0x178ee8['deletionPosition']);_0x909439?(_0x5110a6['start']=_0x909439['start'],_0x5110a6['end']=_0x909439['end']):(_0x24e484['delete'](_0xbc7bb9['name']),_0x5110a6['detach']());}});}}});}),_0x46e382['document']['on']('change',()=>{_0x24e484['size']>0x0&&_0x46e382['enqueueChange']({'isUndoable':!0x1},_0x4b3086=>{for(const [_0x2f8849,_0x1573ba]of _0x24e484)'$graveyard'==_0x46e382['markers']['get'](_0x2f8849)['getRange']()['root']['rootName']&&(te(_0x2f8849['split'](':')[0x2],_0x1573ba['toRange'](),_0x46e382,_0x4b3086),_0x1573ba['detach']());_0x24e484['clear']();});});}(_0x2baa59),this['_domEmitter']['listenTo'](_0x1d2af1['document'],'keydown',(_0x333f18,{key:_0x1e4585})=>{'Escape'===_0x1e4585&&function(_0x259242){_0x259242['editing']['view']['change'](_0x1d6165=>{for(const _0x165725 of _0x259242['model']['markers']){if(!_0x165725['name']['startsWith']('user:position'))continue;const _0x5d8c51=_0x259242['editing']['mapper']['markerNameToElements'](_0x165725['name']);if(_0x5d8c51){for(const _0x11e82e of _0x5d8c51)_0x1d6165['removeClass']('ck-user__marker_hovered',_0x11e82e);}}});}(_0x2baa59);},{'useCapture':!0x0});}['afterInit'](){const _0x166270=this['editor'],_0x564ea7=_0x166270['commands']['get']('undo');_0x564ea7&&_0x166270['model']['on']('applyOperation',(_0x40aa0c,_0x13d7e3)=>{const _0x32ff88=_0x13d7e3[0x0];if('marker'!=_0x32ff88['type']||!_0x32ff88['name']['startsWith']('user:'))return;const _0x4948d2=_0x32ff88['batch'];_0x564ea7['_createdBatches']['has'](_0x4948d2)&&(_0x32ff88['newRange']=_0x32ff88['oldRange']?_0x166270['model']['createRange'](_0x32ff88['oldRange']['start'],_0x32ff88['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x5cde50=this['editor'],_0xe5d96b=_0x5cde50['model']['document'],_0x4e83d5=_0x5cde50['plugins']['get'](i);_0x5cde50['model']['enqueueChange']({'isUndoable':!0x1},_0x11a05d=>{const _0x299dc1='user:range:'+_0x4e83d5['mySessionId'],_0x849962='user:position:'+_0x4e83d5['mySessionId'],_0x190960=_0x5cde50['model']['markers']['has'](_0x299dc1);_0x5cde50['editing']['view']['hasDomSelection']?te(_0x4e83d5['mySessionId'],_0xe5d96b['selection']['getFirstRange'](),_0x5cde50['model'],_0x11a05d):_0x190960&&(_0x11a05d['removeMarker'](_0x299dc1),_0x11a05d['removeMarker'](_0x849962));});}}function te(_0x5e52c9,_0x1a51b1,_0x595038,_0x2a9f3c){const _0x5ef373='user:range:'+_0x5e52c9,_0x178520='user:position:'+_0x5e52c9,_0xe95ff1=_0x1a51b1['getContainedElement']();let _0x5382c0=_0x1a51b1['start'];_0xe95ff1&&_0xe95ff1['is']('element','tableCell')&&(_0x5382c0=function(_0x42686d,_0x12101b){for(const _0x581abc of _0x42686d['getPositions']())if(_0x12101b['schema']['checkChild'](_0x581abc,'$text'))return _0x581abc;}(_0x1a51b1,_0x595038),_0x1a51b1=_0x2a9f3c['createRange'](_0x5382c0));const _0x4d4788=_0x2a9f3c['createRange'](_0x5382c0);_0x595038['markers']['has'](_0x5ef373)?(_0x2a9f3c['updateMarker'](_0x5ef373,{'range':_0x1a51b1}),_0x2a9f3c['updateMarker'](_0x178520,{'range':_0x4d4788})):(_0x2a9f3c['addMarker'](_0x5ef373,{'range':_0x1a51b1,'usingOperation':!0x0}),_0x2a9f3c['addMarker'](_0x178520,{'range':_0x4d4788,'usingOperation':!0x0}));}function Q(_0x5d461b,_0x57a324,_0x35f02d){const _0x4bb02b=_0x5d461b['t'],t=_0x5d461b['t'];switch(_0x57a324){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 _0x4bb02b({'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'},_0x35f02d);default:return'';}}let Z=0x1;class l extends _0x54be99{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
+
((()=>_0x49dce4)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,J,_0x45e8ba,_0x1e9797,_0x2cb949];}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 _0x5f48da=this['serverHistory']['getOperations']();for(let _0xa171bb=_0x5f48da['length']-0x1;_0xa171bb>=0x0;_0xa171bb--){const _0x577ee8=_0x5f48da[_0xa171bb];if(!this['_disconnectionOperations']['has'](_0x577ee8))return _0x577ee8['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x4a84ee){if(super(_0x4a84ee),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x304a65(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x47f125('collaboration-missing-channelid',this);const _0xf0ca04=_0x4a84ee['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0xf0ca04,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x395e46(),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 st(this['_disconnectionOperations']);}['init'](){const _0x46e656=this['editor'],_0x2c430e=_0x46e656['plugins']['get'](_0x1e9797),_0x28949d=_0x46e656['plugins']['get'](c);this['listenTo'](_0x2c430e,'getOperationAuthor',(_0x4034d7,_0x64d4b9)=>{const _0x5712f1=_0x64d4b9[0x0];_0x5712f1['_authorId']&&(_0x4034d7['return']=_0x2c430e['getUser'](_0x5712f1['_authorId']),_0x4034d7['stop']()),null===_0x5712f1['_authorId']&&(_0x4034d7['return']=null,_0x4034d7['stop']());},{'priority':'high'}),this['listenTo'](_0x46e656['model']['document']['selection'],'change:range',(_0x5f210b,_0xba1520)=>{_0xba1520['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x46e656['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x46e656['model']['on']('applyOperation',(_0x3cb04b,_0x280520)=>{const _0x69f2fa=_0x280520[0x0];_0x69f2fa['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x69f2fa),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x28949d,'state',this,'_hasSynchronizationProblem',(_0x1e1bc0,_0x184257)=>'connected'===_0x1e1bc0&&!_0x184257),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x46e656['disableReadOnlyMode']('rtc-offline'):_0x46e656['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x46e656['disableReadOnlyMode']('rtc-offline'):_0x46e656['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x37ec0c=this['editor']['plugins']['get'](i),_0x1b84d1=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x37ec0c['unregister'](this['_channelId']);const _0x497dd7=await this['_service']['reconnect'](_0x1b84d1['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x497dd7)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x5ad4b2=await this['_service']['getConnectedSessions']();_0x37ec0c['register'](this['_channelId'],_0x5ad4b2),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x31e68e){if(function(_0x1056e7){return'404'===_0x1056e7['code'];}(_0x31e68e)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0xd3e527){return'409'===_0xd3e527['code'];}(_0x31e68e)){const _0x1cb8a9=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'](_0x1cb8a9);}else{if(!(_0x31e68e instanceof tt))throw _0x31e68e;this['_handleReconnectionError']();}}}}['destroy'](){const _0xbe6408=this['editor']['plugins']['get'](c),_0x57541a=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x57541a['channelSessions']['has'](this['_channelId'])&&_0x57541a['unregister'](this['_channelId']),_0xbe6408['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x4b4745){if(this['sessionId']!==_0x4b4745['sessionId']&&this['_lastSyncedOperationId']!==_0x4b4745['lastOperationId'])throw new tt();return this['sessionId']=_0x4b4745['sessionId'],this['_handleServerResponse']([],{..._0x4b4745,'wereChangesApplied':!0x1,'data':_0x4b4745['data']},'reconnect');}async['_connectService'](_0x2f0e63,_0x4700d6=!0x1){const {connection:_0x33efba}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x33efba,this['_channelId'])['then'](_0xa44d1e=>this['_initSessionsHandling'](_0xa44d1e))['catch'](_0x1e14ca=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x1e14ca);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x24b019,_0x20e629)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x20e629);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x727d1e=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x2f0e63);this['_isPendingUpdate']=!0x0;const _0x374828=await this['_service']['connect'](_0x33efba,this['_compressOperations'](_0x2f0e63),_0x727d1e);if(this['sessionId']=_0x374828['sessionId'],_0x4700d6){if(!_0x374828['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x374828['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x2f0e63,_0x374828,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x374828,_0x2f0e63);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x10fd68=this['editor']['plugins']['get'](i),_0x4a72ef=this['editor']['plugins']['get'](J),_0xd547f4=_0x10fd68['channelSessions']['get'](this['_channelId']);_0xd547f4&&_0xd547f4['length']>0x1?_0x4a72ef['createUserMarkerOperations']():this['listenTo'](_0x10fd68,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x10fd68['channelSessions']['get'](this['_channelId'])['length']&&_0x4a72ef['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x49fe99,_0x137723,_0x4d3f66,_0x8eb27b){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x137723){const _0x165af6=this['_decompressOperations'](_0x4d3f66,_0x8eb27b);await this['_fetchMissingUsers'](_0x165af6),this['_handleExternalOperations'](_0x165af6,_0x137723,_0x4d3f66['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x36289f}=this['editor'];let _0x22e45f;try{_0x22e45f=await this['_service']['getDocumentDetails']();}catch(_0x544180){const _0x57f2ec=Q(_0x36289f,'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'](_0x57f2ec);}const _0x2d2141=_0x22e45f['currentDocumentSession']||_0x22e45f['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x2d2141['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x23c440=Q(_0x36289f,'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'](_0x23c440);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x197c8e){const _0x39dcb3=this['editor']['plugins']['get'](i);this['listenTo'](_0x39dcb3,'sessionAdd:'+this['_channelId'],(_0x49b797,{session:_0x5cd0ec})=>{if(_0x5cd0ec['id']===_0x39dcb3['mySessionId']){_0x49b797['off']();const _0x59fc27=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x7192b0=_0x5cd0ec['permissions'];_0x59fc27&&_0x59fc27['isEnabled']&&(_0x7192b0=_0x7192b0['filter'](_0x360100=>'document:write'!==_0x360100)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x7192b0,this['_channelId']);}}),_0x39dcb3['register'](this['_channelId'],_0x197c8e);}['_initThrowingOnDataSet'](){const _0x4f167f=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x42c0d0)=>{if(!_0x42c0d0[_0x42c0d0['length']-0x1]['suppressErrorInCollaboration'])throw new _0x47f125('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x4f167f['apply'](this['editor']['data'],_0x42c0d0);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x36498f,[_0x1dba46])=>{if(this['_document']['version'])throw new _0x47f125('realtimecollaborationclient-init-document-already-initialized',this);_0x36498f['stop'](),this['_setPendingAction']();const _0x57797b=this['editor']['config']['get']('rootsAttributes'),_0x514828=this['_getOperationsFromInitData'](_0x1dba46,_0x57797b);0x0==_0x514828['length']&&_0x514828['push'](new _0x452668(0x0)),_0x36498f['return']=this['_connectService'](_0x514828)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x469275=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x469275))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x1901a7,[_0x16d0ac,_0x5f0a15])=>{_0x1901a7['stop']();const _0x1efbd3=this['editor']['model']['document']['getRoot'](_0x16d0ac);if(!this['_knownRootNames']['has'](_0x16d0ac)){const _0x41b9ec=_0x5f0a15&&_0x5f0a15['data']?_0x5f0a15['data']:'',_0x3def4d=_0x5f0a15&&_0x5f0a15['attributes']?_0x5f0a15['attributes']:{};await this['_loadRoot'](_0x16d0ac,_0x41b9ec,_0x3def4d);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x1efbd3['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x1efbd3);});},{'priority':'high'});}async['_fetchMissingUsers'](_0xcc850d){const _0x5920ce=this['editor']['plugins']['get'](_0x1e9797),{connection:_0x273c4f}=this['editor']['plugins']['get'](c),_0x37560f=new Set();for(const _0x16282e of _0xcc850d){const _0x3a9145=_0x16282e['_authorId'];_0x3a9145&&!_0x5920ce['getUser'](_0x3a9145)&&_0x37560f['add'](_0x3a9145);}if(0x0===_0x37560f['size'])return;const _0x168a3c=await lt['getMany'](_0x273c4f,Array['from'](_0x37560f));for(const _0x4b6b0b of _0x168a3c)_0x5920ce['getUser'](_0x4b6b0b['id'])||_0x5920ce['addUser'](_0x4b6b0b);}['_getOperationsFromInitData'](_0x289c7c,_0x567b82={}){const _0x353f79=this['editor']['model'],_0x2818ee=[];let _0x1c9508=0x0;const _0x2203f1='string'==typeof _0x289c7c?{'main':_0x289c7c}:_0x289c7c;for(const _0x1a06fd of Object['keys'](_0x2203f1)){if(!this['_document']['roots']['has'](_0x1a06fd))throw new _0x47f125('realtimecollaborationclient-init-non-existent-root',this);const _0x3ec0d4=this['editor']['data']['parse'](_0x2203f1[_0x1a06fd]),_0x2dcc8f=this['_document']['getRoot'](_0x1a06fd),_0x599ba9=new _0x21d99d(_0x353f79['createPositionAt'](_0x2dcc8f,0x0),_0x3ec0d4,_0x1c9508++);_0x2818ee['push'](_0x599ba9);for(const [_0x4b5a3c,_0x4411ea]of _0x3ec0d4['markers']){const _0x1b226f=_0x353f79['createRange'](_0x353f79['createPositionFromPath'](_0x2dcc8f,_0x4411ea['start']['path']['slice']()),_0x353f79['createPositionFromPath'](_0x2dcc8f,_0x4411ea['end']['path']['slice']())),_0x364da9=new _0x3dccf2(_0x4b5a3c,null,_0x1b226f,_0x353f79['markers'],!0x0,_0x1c9508++);_0x2818ee['push'](_0x364da9);}}if(_0x567b82)for(const [_0x592ff8,_0x1562eb]of Object['entries'](_0x567b82)){const _0x3d14a4=_0x353f79['document']['getRoot'](_0x592ff8);if(!_0x3d14a4)throw new _0x47f125('multi-root-editor-root-attributes-no-root',null);for(const [_0x2097f3,_0x44494d]of Object['entries'](_0x1562eb))if(null!==_0x44494d){const _0xd7229d=new _0x16d8c6(_0x3d14a4,_0x2097f3,null,_0x44494d,_0x1c9508++);_0x2818ee['push'](_0xd7229d);}}return _0x2818ee;}async['_loadRoot'](_0x90edc9,_0x2658e6,_0x23bbc8){this['_getOperationsFromInitData']({[_0x90edc9]:_0x2658e6},{[_0x90edc9]:_0x23bbc8})['forEach']((_0x147fb8,_0x567b64)=>{_0x147fb8['baseVersion']=this['_document']['version']+_0x567b64,_0x147fb8['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x147fb8);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x55e580,_0x4c4ae4){let _0xcb3539;this['_offset']=_0x55e580['offset'];const _0x420566=_0x55e580['wereChangesApplied']&&!_0x55e580['initData'],_0x19eda6=_0x420566?0x0:_0x55e580['data']['baseVersion'];if(_0x4c4ae4['forEach'](_0x3cb112=>{_0x3cb112['_isInit']=!0x0,_0x3cb112['createdAt']=_0x55e580['sessionCreatedAt'],_0x3cb112['_authorId']=null;}),_0x420566)_0xcb3539=_0x4c4ae4,this['_applyOperationsSet'](_0xcb3539,_0x420566);else{if(_0x55e580['initData']){const _0x252b62=this['_getOperationsFromInitData'](_0x55e580['initData']);this['_document']['history']['version']=-_0x252b62['length'],_0x252b62['forEach'](_0x1d1d99=>{_0x1d1d99['baseVersion']-=_0x252b62['length'],_0x1d1d99['createdAt']=_0x55e580['sessionCreatedAt'],_0x1d1d99['_isInit']=!0x0,_0x1d1d99['_authorId']=null;}),this['_applyOperationsSet'](_0x252b62,!0x0),this['serverHistory']['version']=-_0x252b62['length']+this['_offset'],this['_updateServerHistory'](_0x252b62);}this['_document']['history']['version']=_0x19eda6,_0xcb3539=this['_decompressOperations'](_0x55e580['data'],_0x55e580['metadata']),await this['_fetchMissingUsers'](_0xcb3539),this['_applyOperationsSet'](_0xcb3539,_0x420566);}_0x55e580['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0xcb3539,_0x55e580['lastOperationId']),this['_lastSyncedOperationId']=_0x55e580['lastOperationId']),this['serverHistory']['version']=_0x19eda6+this['_offset'],this['_updateServerHistory'](_0xcb3539),_0x4c4ae4['filter'](_0x8b073e=>{const _0x43ed15=this['_getAffectedRoot'](_0x8b073e);return _0x43ed15&&!this['_knownRootNames']['has'](_0x43ed15);})['forEach']((_0x576465,_0x500489)=>{_0x576465['baseVersion']=this['_document']['version']+_0x500489,this['_saveOperationInBuffer'](_0x576465);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x3414c8,_0x568804,_0x3b9623){throw this['_isPendingUpdate']=!0x0,_0x568804&&console['error'](_0x568804),_0x3b9623&&this['editor']['enableReadOnlyMode']('realtimecollaborationclient-error'),new _0x47f125(_0x3414c8,this['editor']);}['_saveOperationInBuffer'](_0x1d4c7d){this['_knownOperations']['has'](_0x1d4c7d)||(this['_knownOperations']['add'](_0x1d4c7d),this['_bufferedOperations']['push'](_0x1d4c7d),this['_pendingAction']||'marker'==_0x1d4c7d['type']&&!_0x1d4c7d['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x3118e4=!0x1){!_0x3118e4&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x264686=>{_0x264686&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x411a2f=>{this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,function(_0x25294a){return _0x25294a['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x25294a['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x25294a['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x411a2f)||this['_crash'](_0x411a2f['message'],_0x411a2f,!0x0);});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x550de6=>{this['on']('change:_isPendingUpdate',()=>{_0x550de6();});});}async['_sendBufferedOperations'](){const _0x3687d0=this['editor']['plugins']['get'](J);if(this['_shouldSendSelectionUpdate']()&&(_0x3687d0['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x264b46=[...this['_bufferedOperations']];for(const _0x477667 of _0x264b46)_0x477667['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x477667);const _0x29eb3a=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x264b46),_0x59f7d2=Z++,_0x27b0bd=this['_compressOperations'](_0x264b46),_0x4cef04=await this['_service']['sendOperations'](_0x27b0bd,_0x27b0bd['baseVersion'],_0x29eb3a);try{return await this['_handleServerResponse'](_0x264b46,_0x4cef04,_0x59f7d2);}catch(_0x5c21e8){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x5c21e8);}}async['_handleServerResponse'](_0x56ab96,_0x3b0f38,_0x1c07f5){if('error'in _0x3b0f38)throw _0x3b0f38['error'];let _0x2820d9=!0x1;if(_0x3b0f38['wereChangesApplied']){_0x3b0f38['lastOperationId']&&(this['_lastSyncedOperationId']=_0x3b0f38['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x3c80c7=>!_0x56ab96['includes'](_0x3c80c7));for(const _0x22c07b of _0x56ab96)_0x22c07b['createdAt']='lastOperationAcceptedAt'in _0x3b0f38&&_0x3b0f38['lastOperationAcceptedAt']||void 0x0;it(_0x56ab96,_0x3b0f38['version']-_0x56ab96['length']),this['_updateServerHistory'](_0x56ab96);const _0x38f03c=_0x56ab96['filter'](_0x18f5e0=>{if(!_0x18f5e0['_isInit'])return!0x1;const _0x2294ca=this['_getAffectedRoot'](_0x18f5e0);return _0x2294ca&&!this['_knownRootNames']['has'](_0x2294ca);});it(_0x38f03c,this['_document']['version']),this['_applyOperationsSet'](_0x38f03c),_0x2820d9=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x104a68=this['_decompressOperations'](_0x3b0f38['data'],_0x3b0f38['metadata'])['filter'](_0x56f9f1=>_0x56f9f1['baseVersion']>=this['_lastServerVersion']);_0x104a68['forEach'](_0x5023aa=>this['_addKnownRoot'](_0x5023aa)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x377389=>!_0x377389['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x377389))),this['_bufferedOperations']['length']&&it(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x104a68),_0x2820d9=this['_handleExternalOperations'](_0x104a68,_0x3b0f38['version'],_0x3b0f38['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x2820d9?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x5d4747,_0x2ae268,_0x17013f){try{const _0x3f8c2a={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x2d03d7,operationsB:_0x2c6295,originalOperations:_0x33302b}=_0x312986(_0x5d4747,this['_bufferedOperations'],_0x3f8c2a);it(_0x2d03d7,this['_document']['version']),it(_0x2c6295,_0x2ae268);for(const _0x2b413d of _0x2d03d7){const _0x445481=_0x33302b['get'](_0x2b413d);_0x2b413d['_authorId']=_0x445481?_0x445481['_authorId']:null;}_0x17013f&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x5d4747,_0x17013f),this['_lastSyncedOperationId']=_0x17013f),this['_bufferedOperations']=[..._0x2c6295],this['_applyOperationsSet'](_0x2d03d7),this['_updateServerHistory'](_0x5d4747);}catch(_0x2d057b){return console['error'](_0x2d057b),!0x1;}return!0x0;}['_applyOperationsSet'](_0x28bd08,_0x22b65d=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x50080e=>{for(const _0x13a500 of _0x28bd08)this['_knownOperations']['add'](_0x13a500),this['_addKnownRoot'](_0x13a500),_0x50080e['batch']['addOperation'](_0x13a500),this['editor']['model']['applyOperation'](_0x13a500);});}['_addKnownRoot'](_0x26ce67){const _0x52c34a=this['_getAffectedRoot'](_0x26ce67);_0x52c34a&&this['_knownRootNames']['add'](_0x52c34a);}['_getAffectedRoot'](_0xc388ae){let _0x38b4d5,_0x37e6d4;switch(_0xc388ae['type']){case'insert':_0x38b4d5=_0xc388ae['position']['root'];break;case'marker':if(_0x37e6d4=_0xc388ae['newRange'],!_0x37e6d4)return null;_0x38b4d5=_0x37e6d4['root'];break;case'addRootAttribute':_0x38b4d5=_0xc388ae['root'];break;case'addRoot':_0x38b4d5=_0xc388ae['affectedSelectable'];break;case'move':_0x38b4d5=_0xc388ae['targetPosition']['root'];break;default:return null;}return _0x38b4d5['rootName'];}['_updateServerHistory'](_0x32a571){_0x32a571['forEach'](_0x1934ae=>{const _0x3b5846=_0x1934ae['clone']();_0x3b5846['_authorId']=_0x1934ae['_authorId'],_0x3b5846['_isInit']=!!_0x1934ae['_isInit'],_0x3b5846['createdAt']=_0x1934ae['createdAt'],_0x3b5846['baseVersion']+=this['_offset'],_0x1934ae['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x3b5846),this['serverHistory']['addOperation'](_0x3b5846);});}['_handleReconnectionError'](_0x2cd85d){const _0x414c97=this['editor']['plugins']['get']('Notification'),_0x51fcca=this['editor']['locale'];_0x2cd85d||(_0x2cd85d=Q(_0x51fcca,'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.')),_0x414c97['showWarning'](_0x2cd85d,{'title':Q(_0x51fcca,'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'](_0x45e8ba)['add'](Q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x45e8ba)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x6f948){const _0x2eac31=_0x6f948['map'](_0x5b0c2b=>_0x5b0c2b['toJSON']());return this['_compressor']['compress'](_0x2eac31);}['_decompressOperations'](_0x9eeee6,_0x2f96c1){return this['_compressor']['decompress'](_0x9eeee6)['map']((_0x3656fb,_0x5a8956)=>{const _0x44c19f='init'==_0x2f96c1[_0x5a8956]['type'];if('InsertOperation'==_0x3656fb['__className']){const _0xdafa4d=_0x3656fb['position']['root'];!this['_document']['getRoot'](_0xdafa4d)&&(this['_document']['createRoot']('$root',_0xdafa4d)['_isAttached']=!0x1);}const _0x1af5e5=_0x444cba['fromJSON'](_0x3656fb,this['_document']);return _0x1af5e5['wasUndone']=_0x3656fb['wasUndone'],_0x1af5e5['_isInit']=_0x44c19f,_0x1af5e5['_authorId']=_0x44c19f?null:_0x2f96c1[_0x5a8956]['userId'],_0x1af5e5['_isDisconnection']='cs:removeUser'===_0x2f96c1[_0x5a8956]['type'],_0x1af5e5['createdAt']=_0x2f96c1[_0x5a8956]['createdAt'],_0x1af5e5;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x501848=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x501848&&_0x501848['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class tt extends Error{}function it(_0x2f7835,_0x59a0c2){for(const _0x3d4074 of _0x2f7835)_0x3d4074['baseVersion']=_0x59a0c2++;}class st{['_ignoredOperations'];['_operationToId'];constructor(_0x25c302){this['_ignoredOperations']=_0x25c302,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x3ee824){let _0x1a7df4=_0x3ee824['length'];for(;_0x1a7df4--;){const _0x41c3fd=_0x3ee824[_0x1a7df4];if(!this['_ignoredOperations']['has'](_0x41c3fd)){if(!this['_operationToId']['has'](_0x41c3fd)){const _0x4939c3=_0x5cace2()['slice'](0x1,0x12);this['_operationToId']['set'](_0x41c3fd,_0x4939c3);}return this['_operationToId']['get'](_0x41c3fd);}}}['setIdForTheLastOperation'](_0x136ac6,_0x4aa472){if(!_0x4aa472)return;let _0x5e8794=_0x136ac6['length'];for(;_0x5e8794--;){const _0x22bd7e=_0x136ac6[_0x5e8794];this['_ignoredOperations']['has'](_0x22bd7e)||this['_operationToId']['set'](_0x22bd7e,_0x4aa472);}}}class n extends _0x54be99{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0xf32368{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>_0x77088c)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x1e9797];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x404d25){super(_0x404d25),this['_services']=new Map();}async['init'](){const _0x5c8504=this['context'],_0xd9c63b=_0x5c8504['plugins']['get']('CommentsRepository');if(_0x5c8504['plugins']['get'](c)['addToReconnectionStack'](this),_0xd9c63b['adapter']={'addCommentThread':async({channelId:_0x229c37,threadId:_0x250aee,comments:_0xc9e4dd,resolvedAt:_0x295097,resolvedBy:_0x37bae5,context:_0x53a39c,attributes:_0x3a0023})=>{const _0x1df1c6=await this['_getService'](_0x229c37)['addCommentThread']({'commentThreadId':_0x250aee,'comments':_0xc9e4dd['map'](_0x2ad7db=>function(_0xf3ba2e,_0x358f4f,_0x4e31b6){return{'commentThreadId':_0x4e31b6,'commentId':_0xf3ba2e['commentId'],'userId':_0xf3ba2e['authorId'],'content':_0xf3ba2e['content'],'documentId':_0x358f4f,'createdAt':_0xf3ba2e['createdAt'],'attributes':_0xf3ba2e['attributes']||{}};}(_0x2ad7db,_0x229c37,_0x250aee)),'resolvedAt':_0x295097,'resolvedBy':_0x37bae5,'context':_0x53a39c,'attributes':_0x3a0023})['catch'](dt);return{'threadId':_0x1df1c6['commentThreadId'],'comments':_0x1df1c6['comments']};},'getCommentThread':async({channelId:_0x4832af,threadId:_0x16902e})=>{const _0xe9f60b=await this['_getService'](_0x4832af)['getCommentThread'](_0x16902e)['catch'](dt);return _0xe9f60b['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0xe9f60b]),{'threadId':_0xe9f60b['commentThreadId'],'comments':_0xe9f60b['comments']['map'](S),'context':_0xe9f60b['context'],'resolvedAt':_0xe9f60b['resolvedAt'],'resolvedBy':_0xe9f60b['resolvedBy'],'attributes':_0xe9f60b['attributes']||{}});},'updateCommentThread':async({channelId:_0x3ceafe,threadId:_0x187916,context:_0x271bb8,unlinkedAt:_0x305adb,attributes:_0x3d89aa})=>this['_getService'](_0x3ceafe)['updateCommentThread']({'commentThreadId':_0x187916,'context':_0x271bb8,'attributes':_0x3d89aa,'unlinkedAt':_0x305adb})['catch'](B)['catch'](dt),'resolveCommentThread':async({channelId:_0xfb9591,threadId:_0xce15d0})=>{const _0xf11b20=await this['_getService'](_0xfb9591)['resolveCommentThread'](_0xce15d0)['catch'](B)['catch'](dt);return{'threadId':_0xf11b20['commentThreadId'],'resolvedAt':_0xf11b20['resolvedAt'],'resolvedBy':_0xf11b20['resolvedBy']};},'reopenCommentThread':async({channelId:_0x59abf8,threadId:_0x1e61fd})=>this['_getService'](_0x59abf8)['reopenCommentThread'](_0x1e61fd)['catch'](B)['catch'](dt),'removeCommentThread':({channelId:_0x3bd265,threadId:_0x36dccc})=>this['_getService'](_0x3bd265)['removeCommentThread'](_0x36dccc)['catch'](B)['catch'](dt),'addComment':({channelId:_0x3c7701,threadId:_0x108bad,commentId:_0x39efb5,content:_0xf8f601,attributes:_0x3ae504})=>this['_getService'](_0x3c7701)['addComment'](_0x108bad,_0x39efb5,_0xf8f601,_0x3ae504)['catch'](dt),'updateComment':({channelId:_0x10bddd,threadId:_0x42e9e6,commentId:_0x2c1d45,content:_0x21f9ba,attributes:_0x3559b3})=>this['_getService'](_0x10bddd)['updateComment'](_0x42e9e6,_0x2c1d45,_0x21f9ba,_0x3559b3)['catch'](B)['catch'](dt),'removeComment':({channelId:_0x3eb3a2,threadId:_0x3c090b,commentId:_0x3d76b2})=>this['_getService'](_0x3eb3a2)['removeComment'](_0x3c090b,_0x3d76b2)['catch'](B)['catch'](dt)},_0x5c8504 instanceof _0x3b8260){const _0x3ba4e4=_0x5c8504['config']['get']('collaboration.channelId'),_0x16983c=_0x5c8504['plugins']['get'](i);await this['_setUpService'](_0x3ba4e4);const _0x11d065=await this['_services']['get'](_0x3ba4e4)['getConnectedSessions']();this['listenTo'](_0x16983c,'sessionAdd:'+_0x3ba4e4,(_0x3f2735,{session:_0x3726d5})=>{_0x3726d5['id']===_0x16983c['mySessionId']&&(_0x3f2735['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x3726d5['permissions'],_0x3ba4e4));}),_0x16983c['register'](_0x3ba4e4,_0x11d065);}}async['_setUpService'](_0x262725){if(this['_services']['has'](_0x262725))throw new _0x47f125('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x262725});const _0x2276a2=this['context']['plugins']['get']('CommentsRepository'),_0x4575fd=new a['CommentsService'](_0x262725);this['_services']['set'](_0x262725,_0x4575fd),this['listenTo'](_0x4575fd,'commentThreadAdded',(_0x57678a,_0x1bb17d)=>{const {commentThreadId:_0x5c68cb,documentId:_0x5bdea4,context:_0x38314c,attributes:_0x5c2393,resolvedAt:_0x25b4cd,resolvedBy:_0x4dbd9d,comments:_0x905218}=_0x1bb17d;_0x2276a2['getCommentThread'](_0x5c68cb)||_0x2276a2['addCommentThread']({'threadId':_0x5c68cb,'channelId':_0x5bdea4,'comments':_0x905218?_0x905218['map'](S):[],'context':_0x38314c,'attributes':_0x5c2393,'resolvedAt':_0x25b4cd,'resolvedBy':_0x4dbd9d,'isFromAdapter':!0x0});}),this['listenTo'](_0x4575fd,'commentThreadUpdated',(_0x45c64b,{commentThreadId:_0x385441,documentId:_0x11020b,context:_0xe72f3c,unlinkedAt:_0x418f6c,attributes:_0x4d8d83})=>{_0x2276a2['getCommentThread'](_0x385441)&&_0x2276a2['updateCommentThread']({'threadId':_0x385441,'channelId':_0x11020b,'context':_0xe72f3c,'unlinkedAt':_0x418f6c,'attributes':_0x4d8d83,'isFromAdapter':!0x0});}),this['listenTo'](_0x4575fd,'commentThreadResolved',(_0x1d6fc4,{commentThreadId:_0x4e0c9b,resolvedBy:_0x7ed9bc,resolvedAt:_0x377913})=>{const _0x4b0a9a=_0x2276a2['getCommentThread'](_0x4e0c9b);_0x4b0a9a&&_0x4b0a9a['resolve']({'resolvedBy':_0x7ed9bc,'resolvedAt':_0x377913,'isFromAdapter':!0x0});}),this['listenTo'](_0x4575fd,'commentThreadReopened',(_0xe91160,{commentThreadId:_0x2f3f90})=>{const _0x1a1db9=_0x2276a2['getCommentThread'](_0x2f3f90);_0x1a1db9&&_0x1a1db9['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x4575fd,'commentThreadRemoved',(_0x21ff40,{commentThreadId:_0x649ba9})=>{const _0x51af75=_0x2276a2['getCommentThread'](_0x649ba9);_0x51af75&&_0x51af75['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x4575fd,'commentAdded',(_0x246a16,_0x56fb8c)=>{const _0x555961=_0x56fb8c['commentThreadId'],_0x457743=_0x2276a2['getCommentThread'](_0x555961);_0x457743&&_0x457743['addComment']({...S(_0x56fb8c),'isFromAdapter':!0x0});}),this['listenTo'](_0x4575fd,'commentUpdated',(_0x3f8b5a,{commentThreadId:_0x449a26,commentId:_0x880128,content:_0x51bae9,attributes:_0x42c0bd})=>{const _0x53647e=_0x2276a2['getCommentThread'](_0x449a26);if(_0x53647e){const _0x2fc93c=_0x53647e['getComment'](_0x880128);_0x2fc93c&&_0x2fc93c['update']({'content':_0x51bae9,'attributes':_0x42c0bd,'isFromAdapter':!0x0});}}),this['listenTo'](_0x4575fd,'commentRemoved',(_0x2ffb0d,{commentThreadId:_0x47a192,commentId:_0x240965})=>{const _0x4150c0=_0x2276a2['getCommentThread'](_0x47a192);if(_0x4150c0){const _0x594cec=_0x4150c0['getComment'](_0x240965);_0x594cec&&_0x594cec['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x262725);}['destroy'](){if(this['context']instanceof _0x3b8260){const _0x11baf0=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x11baf0);}}['_terminateService'](_0xd1b2b5){if(!this['_services']['has'](_0xd1b2b5))throw new _0x47f125('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0xd1b2b5});this['_getService'](_0xd1b2b5)['disconnect'](),this['_services']['delete'](_0xd1b2b5);}async['reconnect'](){for(const _0x216019 of this['_services']['keys']())await this['_connectService'](_0x216019);if(this['context']instanceof _0x3b8260){const _0xb1dd94=this['context']['config']['get']('collaboration.channelId'),_0x3f763c=this['context']['plugins']['get'](i);_0x3f763c['unregister'](_0xb1dd94);const _0x371a3f=await this['_services']['get'](_0xb1dd94)['getConnectedSessions']();_0x3f763c['register'](_0xb1dd94,_0x371a3f);}}async['_connectService'](_0x2591a6){const {connection:_0x3bbf98}=this['context']['plugins']['get'](c),_0x102ec8=this['context']['plugins']['get']('CommentsRepository'),_0x3bf550=this['_services']['get'](_0x2591a6),_0x1ec28e=await _0x3bf550['connect'](_0x3bbf98);await this['_fetchMissingUsersForThreads'](_0x1ec28e);const _0x5d1e6a=new Set(Array['from'](_0x102ec8['getCommentThreads']({'channelId':_0x2591a6}),_0x17b722=>_0x17b722['id']));for(const _0x1e298f of _0x1ec28e)_0x1e298f['deletedAt']||_0x5d1e6a['delete'](_0x1e298f['commentThreadId']);for(const _0xe656ea of _0x5d1e6a)_0x102ec8['getCommentThread'](_0xe656ea)['remove']({'isFromAdapter':!0x0});for(const _0x444dc9 of _0x1ec28e){let _0x4ab537=_0x102ec8['getCommentThread'](_0x444dc9['commentThreadId']);const {commentThreadId:_0x2ff51f,context:_0x484376,attributes:_0x20a947,resolvedBy:_0x5336f1,resolvedAt:_0x43d4e0,unlinkedAt:_0x2df68b,deletedAt:_0x1c350d}=_0x444dc9;if(_0x1c350d)continue;_0x4ab537||(_0x4ab537=_0x102ec8['addCommentThread']({'channelId':_0x2591a6,'threadId':_0x2ff51f,'context':_0x484376,'attributes':_0x20a947||{},'resolvedBy':_0x5336f1,'resolvedAt':_0x43d4e0,'unlinkedAt':_0x2df68b,'isFromAdapter':!0x0}));const _0x3b9011=new Set(Array['from'](_0x4ab537['comments'],_0x5d2895=>_0x5d2895['id']));for(const _0x78b260 of _0x444dc9['comments'])_0x3b9011['delete'](_0x78b260['commentId']);for(const _0xa9486a of _0x3b9011)_0x4ab537['getComment'](_0xa9486a)['remove']({'isFromAdapter':!0x0});for(const _0x1e866e of _0x444dc9['comments']){const _0x593f33=_0x4ab537['getComment'](_0x1e866e['commentId']);_0x593f33?_0x593f33['content']!==_0x1e866e['content']&&_0x593f33['update']({'content':_0x1e866e['content'],'isFromAdapter':!0x0}):_0x4ab537['addComment'](Object['assign'](S(_0x1e866e),{'isFromAdapter':!0x0}));}}}['_getService'](_0x315188){if(!this['_services']['has'](_0x315188))throw new _0x47f125('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x315188});return this['_services']['get'](_0x315188);}async['_fetchMissingUsersForThreads'](_0x4c0ea5){const _0x3621ab=this['context']['plugins']['get'](_0x1e9797),{connection:_0x22c79d}=this['context']['plugins']['get'](c),_0x12fa90=new Set();for(const {resolvedBy:_0x30d2a6,comments:_0x241526}of _0x4c0ea5){_0x30d2a6&&!_0x3621ab['getUser'](_0x30d2a6)&&_0x12fa90['add'](_0x30d2a6);for(const {userId:_0x17191c}of _0x241526)_0x3621ab['getUser'](_0x17191c)||_0x12fa90['add'](_0x17191c);}if(0x0===_0x12fa90['size'])return;const _0x1259c=await lt['getMany'](_0x22c79d,Array['from'](_0x12fa90));for(const _0xd6a2c9 of _0x1259c)_0x3621ab['getUser'](_0xd6a2c9['id'])||_0x3621ab['addUser'](_0xd6a2c9);}}async function B(_0x1857a4){if('404'!==_0x1857a4['code'])throw _0x1857a4;}function dt(_0x3e8339){if((_0xd8a7a2=_0x3e8339)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0xd8a7a2['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0xd8a7a2['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0xd8a7a2;throw _0x3e8339;}function S(_0xc0adb1){return{'threadId':_0xc0adb1['commentThreadId'],'commentId':_0xc0adb1['commentId'],'content':_0xc0adb1['content'],'createdAt':_0xc0adb1['createdAt'],'authorId':_0xc0adb1['userId'],'attributes':_0xc0adb1['attributes']||{}};}class f extends _0x54be99{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
+
((()=>_0x4254e2)());['_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(_0x4b94a0){super(_0x4b94a0);const _0x1ea6e8=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x1ea6e8);}['init'](){const _0x30ebe3=this['editor']['plugins']['get'](c),_0x5a2039=this['editor']['plugins']['get']('TrackChangesEditing');return _0x5a2039['adapter']={'getSuggestion':async _0x45d81e=>{await this['_waitForServiceReady']();const _0x2e199c=await this['_trackChangesService']['get'](_0x45d81e)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x2e199c]),_0x2e199c;},'addSuggestion':async({id:_0x4d7846,type:_0x56ce6c,data:_0x50885d,originalSuggestionId:_0x5be14c,attributes:_0x51e2fd})=>{await this['_waitForServiceReady']();const _0x229b0c={'id':_0x4d7846,'type':_0x56ce6c,'data':_0x50885d,'originalSuggestionId':_0x5be14c,'attributes':_0x51e2fd},_0x281d27=await this['_trackChangesService']['add'](_0x4d7846,_0x56ce6c,_0x50885d,_0x5be14c,_0x51e2fd)['catch'](_0x44cf49=>{if(ut(_0x44cf49))return new Promise(_0x107b40=>{this['_bufferedRequests']['set'](_0x4d7846,{'resolve':_0x107b40,'suggestionData':_0x229b0c});});throw _0x44cf49;});return this['_bufferedRequests']['delete'](_0x4d7846),_0x281d27;},'updateSuggestion':async(_0x447bcf,_0x314e6a)=>{if(await this['_waitForServiceReady'](),'open'!==_0x314e6a['state'])return this['_trackChangesService']['update'](_0x447bcf,_0x314e6a)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x31edef,_0x3f7559)=>{_0x5a2039['hasSuggestion'](_0x3f7559['id'])&&(_0x5a2039['getSuggestion'](_0x3f7559['id'])['attributes']=_0x3f7559['attributes']);}),this['_trackChangesService']['connect'](_0x30ebe3['connection'])['then'](_0x561cd0=>(_0x30ebe3['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x561cd0)['then'](()=>{for(const _0x3b6e81 of _0x561cd0){_0x5a2039['addSuggestionData'](_0x3b6e81)['_saved']=!0x0;}})));}async['reconnect'](){const _0x1dacf9=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x1e36ad}=this['editor']['plugins']['get'](c),_0x1fb936=await this['_trackChangesService']['connect'](_0x1e36ad);await this['_fetchMissingUsersForThreads'](_0x1fb936);for(const {suggestionData:_0x79d649,resolve:_0x31b953}of this['_bufferedRequests']['values']()){let _0x18bd66=_0x1fb936['find'](_0x3f79bf=>_0x3f79bf['id']===_0x79d649['id']);_0x18bd66||(_0x18bd66=await this['_trackChangesService']['add'](_0x79d649['id'],_0x79d649['type'],_0x79d649['data'],_0x79d649['originalSuggestionId'])),_0x31b953(_0x18bd66);}for(const _0x4faa8d of _0x1fb936)_0x1dacf9['hasSuggestion'](_0x4faa8d['id'])||_0x1dacf9['addSuggestionData'](_0x4faa8d);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x2bb3f9=>{this['listenTo'](this['_trackChangesService'],'connected',_0x5be2ea=>{_0x5be2ea['off'](),_0x2bb3f9();});});}async['_fetchMissingUsersForThreads'](_0x5e6f83){const _0x5b9c34=this['editor']['plugins']['get'](_0x1e9797),{connection:_0x22994e}=this['editor']['plugins']['get'](c),_0x1e7661=new Set();for(const {authorId:_0x26459b}of _0x5e6f83)_0x5b9c34['getUser'](_0x26459b)||_0x1e7661['add'](_0x26459b);if(0x0===_0x1e7661['size'])return;const _0xf5f16e=await lt['getMany'](_0x22994e,Array['from'](_0x1e7661));for(const _0x2ff06d of _0xf5f16e)_0x5b9c34['getUser'](_0x2ff06d['id'])||_0x5b9c34['addUser'](_0x2ff06d);}}function R(_0x2e2cf2){if(ut(_0x2e2cf2))return new Promise(()=>{});throw _0x2e2cf2;}function ut(_0x1a5734){return _0x1a5734['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1a5734['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x54be99{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 _0x1a566e=this['editor']['plugins']['get'](c),_0x4fe285=this['editor']['plugins']['get']('CommentsEditing'),_0x23da0a=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x1a566e,'change:state',(_0x397765,_0x442c64,_0x1bd74b)=>{_0x4fe285['isThreadsLoadingPaused']='connected'!==_0x1bd74b;});}),this['listenTo'](_0x1a566e,'change:state',(_0x5aee5f,_0x25b80b,_0x47482d)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x47482d);}),_0x23da0a['_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 _0x54be99{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 _0x54be99{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
|
|
28
|
+
((()=>_0x304e9e)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x1e9797];}static get['pluginName'](){return'CloudServicesRevisionHistoryAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f0fa6){super(_0x1f0fa6);const _0x278463=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x278463);}async['init'](){const _0x1e0038=this['editor']['plugins']['get'](l),_0x2ca355=_0x1e0038['serverHistory'],_0xa1ed0=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x2ca355,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x1e0038['sessionId']});const _0x36eb35=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x20cd89=await _0x1f0bdd['isBundleUploaded'](_0xa1ed0['connection'],_0x36eb35);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x526585})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x526585)),'updateRevisions':async _0x45e002=>{await this['_waitForServiceReady']();const _0x2ab7f0=this['_revisionTracker']['currentRevision'];if(_0x20cd89&&0x1===_0x45e002['length']&&_0x45e002[0x0]['id']===_0x2ab7f0['id'])return _0x45e002;for(const _0x437569 of _0x45e002)_0x437569['id']===_0x2ab7f0['id']&&(_0x437569['isEmptyCurrent']=_0x437569['fromVersion']===_0x437569['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x45e002,this['_lastRequestId'])['then'](_0xd3ddaf=>(this['_lastRequestId']=_0xd3ddaf,_0x45e002))['catch'](_0x2cb0d6=>{if(U(_0x2cb0d6)||'400'===_0x2cb0d6['code']&&void 0x0!==_0x2cb0d6['data']['wrongRequestId']){for(const _0x35a33f of _0x45e002){!this['_revisionTracker']['repository']['getRevision'](_0x35a33f['id'])||this['_revisionTracker']['_bufferUpdate'](_0x35a33f['id'],_0x35a33f,!0x1);}if(U(_0x2cb0d6))throw _0x2cb0d6;return _0x45e002;}throw _0x2cb0d6;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x249624,{revisionsData:_0x482de2,requestId:_0x4bd68d})=>{Math['max'](..._0x482de2['map'](_0x3c0011=>_0x3c0011['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x482de2,_0x4bd68d);}):this['_handleRevisionsUpdate'](_0x482de2,_0x4bd68d);});const {revisions:_0x3dd6d1,requestId:_0x26dda6}=await this['_revisionHistoryService']['connect'](_0xa1ed0['connection']);_0xa1ed0['addToReconnectionStack'](this),this['_lastRequestId']=_0x26dda6,await this['_fetchMissingUsers'](_0x3dd6d1);for(const _0x5a3c61 of _0x3dd6d1)this['_revisionTracker']['addRevisionData'](_0x5a3c61);this['listenTo'](_0x1e0038,'change:_isConnected',(_0x222c20,_0x265e44,_0x121659)=>{_0x121659&&(this['_oldOffset']=_0x1e0038['_offset'],_0x222c20['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0xa1ed0,'state',_0x4b39ce=>_0x4b39ce===_0x347654['CONNECTED']);}async['reconnect'](){const _0x2f9ade=this['editor']['plugins']['get'](c),_0x207ec0=this['editor']['plugins']['get'](l),_0x22d938=async()=>{const _0x2c9dc9=this['_revisionTracker']['currentRevision'],_0x317a41=_0x2c9dc9['id'],_0x173f32=_0x317a41!==_0x207ec0['sessionId'];if(_0x173f32){const _0x296b59=_0x207ec0['_offset']-this['_oldOffset'],_0x2f57ec=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x2c9dc9['toVersion']+_0x296b59!==_0x2f57ec){const _0x39b2b3=_0x2c9dc9['fromVersion']+_0x296b59,_0xe44a40=this['editor']['plugins']['get'](_0x1e9797),_0x1e7fe1=this['_revisionTracker']['buildRevisionData']({'revision':_0x2c9dc9,'from':_0x39b2b3,'to':_0x2f57ec});_0x1e7fe1['id']=_0x2c9dc9['id'];const _0x26802d=_0x1e7fe1['authorsIds']['map'](_0x5b8638=>_0xe44a40['getUser'](_0x5b8638));_0x2c9dc9['_update']({..._0x1e7fe1,'authors':_0x26802d},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x2c9dc9['id'],_0x1e7fe1,!0x0);}this['_revisionTracker']['_startingVersion']=_0x2f57ec,(_0x2c9dc9['toVersion']===_0x2c9dc9['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x317a41)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x317a41),this['_revisionTracker']['_createCurrentRevision'](_0x2f57ec));}const {revisions:_0x424b62,requestId:_0x6506c1}=await this['_revisionHistoryService']['reconnect'](_0x2f9ade['connection'],this['_lastRequestId']);_0x173f32&&_0x424b62['length']>0x0?_0x207ec0['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x424b62),this['_handleRevisionsUpdate'](_0x424b62,_0x6506c1),this['_revisionTracker']['sendBufferedUpdates']());};return _0x207ec0['_isConnected']?_0x22d938():new Promise((_0x3c89aa,_0x582b06)=>{_0x207ec0['once']('change:_isConnected',()=>{_0x22d938()['then'](_0x3c89aa)['catch'](_0x582b06);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x442b9a=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x282735=>{_0x282735['off'](),_0x442b9a();});});}['_getLatestVersionFromServerOperations'](){const _0x4a0b3f=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x4214e9 of _0x4a0b3f)if('marker'!==_0x4214e9['type']||_0x4214e9['affectsData'])return _0x4214e9['baseVersion']+0x1;}['_getLatestVersion'](){const _0x2b1d3e=this['editor']['plugins']['get'](l);return new Promise(_0x3a616d=>{_0x2b1d3e['_isPendingUpdate']?_0x2b1d3e['once']('change:_isPendingUpdate',()=>{_0x3a616d(this['_getLatestVersionFromServerOperations']());}):_0x3a616d(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x596440,_0x59f29c){const _0x50d45e=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x59f29c;for(const _0x15b2b0 of _0x596440){const _0x25d30a=_0x50d45e['getRevision'](_0x15b2b0['id']);if(_0x25d30a){if((_0x15b2b0['fromVersion']||_0x15b2b0['toVersion'])&&(_0x15b2b0['diffData']=null),_0x25d30a===this['_revisionTracker']['currentRevision']){const _0xfa89c0=Math['max'](_0x25d30a['toVersion'],_0x15b2b0['toVersion']),_0x19cd8e=Math['max'](_0x25d30a['fromVersion'],_0x15b2b0['fromVersion']);let _0x4df160;_0x25d30a['toVersion']===_0x15b2b0['toVersion']&&_0x25d30a['fromVersion']===_0x15b2b0['fromVersion']?(_0x4df160=!0x0,this['_preventResendingRevisionData'](_0x15b2b0)):_0x15b2b0['toVersion']===_0xfa89c0&&_0x15b2b0['fromVersion']===_0x19cd8e?_0x4df160=!0x1:(_0x25d30a['toVersion']===_0xfa89c0&&_0x25d30a['fromVersion']===_0x19cd8e||this['_fixRevision']({'revision':_0x25d30a,'from':_0x19cd8e,'to':_0xfa89c0}),_0x4df160=!0x0),_0x4df160&&(delete _0x15b2b0['fromVersion'],delete _0x15b2b0['toVersion'],delete _0x15b2b0['diffData'],delete _0x15b2b0['createdAt'],delete _0x15b2b0['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x15b2b0),this['_preventResendingRevisionData'](_0x15b2b0);}else this['_revisionTracker']['addRevisionData'](_0x15b2b0);}const _0x169753=_0x50d45e['getRevisions']();_0x169753['reverse']();for(let _0x5394d8=0x0;_0x5394d8<_0x169753['length']-0x1;_0x5394d8++){const _0x49c156=_0x169753[_0x5394d8],_0x18e19b=_0x169753[_0x5394d8+0x1];if(_0x49c156['fromVersion']<_0x18e19b['toVersion']){const _0x131860=_0x18e19b['toVersion'],_0x5c043b=Math['max'](_0x131860,_0x49c156['toVersion']);this['_fixRevision']({'revision':_0x49c156,'from':_0x131860,'to':_0x5c043b});}}}['_fixRevision']({revision:_0x402339,from:_0x4c307f,to:_0x56a114}={}){const _0x5ba63e=this['editor']['plugins']['get'](_0x1e9797),_0x387c8b=this['_revisionTracker']['buildRevisionData']({'revision':_0x402339,'from':_0x4c307f,'to':_0x56a114});_0x387c8b['authors']=_0x387c8b['authorsIds']['map'](_0x1f59ce=>_0x5ba63e['getUser'](_0x1f59ce)),_0x402339['_update'](_0x387c8b);}['_preventResendingRevisionData'](_0xe28d32){const _0x2610eb={};_0x2610eb['id']=_0xe28d32['id'];for(const _0x3ebe7f of Object['keys'](_0xe28d32))'id'!==_0x3ebe7f&&(_0x2610eb[_0x3ebe7f]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x2610eb['id'],_0x2610eb,!0x0);}async['_fetchMissingUsers'](_0x4a4fdf){const _0x2cdd1d=this['editor']['plugins']['get'](_0x1e9797),{connection:_0x4acff3}=this['editor']['plugins']['get'](c),_0x15cd14=new Set();for(const _0x4fef51 of _0x4a4fdf){for(const _0x517e8b of _0x4fef51['authorsIds'])_0x18d023(_0x517e8b);_0x4fef51['creatorId']&&_0x18d023(_0x4fef51['creatorId']);}if(0x0===_0x15cd14['size'])return;const _0x4a6bab=await lt['getMany'](_0x4acff3,Array['from'](_0x15cd14));for(const _0x71da2f of _0x4a6bab)_0x2cdd1d['getUser'](_0x71da2f['id'])||_0x2cdd1d['addUser'](_0x71da2f);function _0x18d023(_0x2356db){_0x2cdd1d['getUser'](_0x2356db)||_0x15cd14['add'](_0x2356db);}}}function U(_0x47b59a){return _0x47b59a['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x47b59a['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x47b59a['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x54be99{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 _0x30ffbd{constructor(_0x4e9b99){super(_0x4e9b99);const _0x4cd327=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x4cd327['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x4cd327['to']('usersCount',_0xe77725=>Q(_0x4e9b99,'CONNECTED_USERS',_0xe77725))}]});}}class es extends _0x30ffbd{['items'];['keystrokes'];constructor(_0xb5cfe){super(_0xb5cfe);const _0x2eadf7=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x2eface(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x2eadf7['if']('hasPopup'),'aria-expanded':_0x2eadf7['to']('isExpanded',_0x27a9d2=>this['hasPopup']&&String(_0x27a9d2)),'aria-label':_0x2eadf7['to']('hasPopup',_0x802078=>Q(_0xb5cfe,_0x802078?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x2eadf7['to']('hasPopup',_0x49cfdf=>!!_0x49cfdf&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x2eadf7['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0xf4329d,_0x2caee8,_0x3270c8)=>{this['element']&&(_0x3270c8?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 _0x30ffbd{['counterView'];['inlineListView'];constructor(_0x237336){super(_0x237336);const _0x11cb0a=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x237336),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x26e4d5 of this['inlineListView']['items'])_0x26e4d5['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',_0x11cb0a['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x30ffbd{['listWrapperView'];constructor(_0xf36899,_0x3361a6){super(_0xf36899),this['listWrapperView']=new ft(_0xf36899,_0x3361a6),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':Q(_0xf36899,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class ft extends _0x551b2d{constructor(_0x247bac,_0x45c39f){super(_0x247bac);const _0x591d8a=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x45c39f?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x591d8a['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x591d8a['to']('role'),'aria-label':_0x591d8a['to']('ariaLabel'),'aria-labelledby':_0x591d8a['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x1d2af1['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x21ff5b=this['element'];_0x21ff5b&&(this['_isScrollable']=Math['max'](_0x21ff5b['scrollHeight'],_0x21ff5b['clientHeight'])>0.8*window['innerHeight']);}}class k extends et{['userView'];constructor(_0x305917,_0x1d32fb,_0x1965c6){super(_0x305917);const _0x46c670=this['bindTemplate'];this['userView']=new rt(_0x305917,_0x1d32fb);const _0x4d378f={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x1d32fb['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x1d32fb['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x1d32fb['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x1965c6&&(_0x4d378f['tag']='button',_0x4d378f['on']={'click':_0x46c670['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x4d378f);}['focus'](){this['element']['focus']();}}class y extends _0x30ffbd{['userView'];['markerView'];constructor(_0x326e6c,_0x24567a,_0x381b9b){super(_0x326e6c);const _0x5d1ec5=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new rt(_0x326e6c,_0x24567a),this['markerView']=new ct(_0x326e6c,_0x24567a);const _0x307436=new ot(_0x326e6c);_0x307436['template']['tag']='span',_0x307436['text']=_0x24567a['name'];const _0x1d6b3e={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x5d1ec5['to']('isFocusable',_0x325def=>!!_0x325def&&0x0),'aria-labelledby':_0x307436['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x5d1ec5['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x5d1ec5['to']('hasTooltip',_0x4a901b=>!_0x4a901b),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x307436]};_0x381b9b&&(_0x1d6b3e['tag']='button',_0x1d6b3e['on']={'click':_0x5d1ec5['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1d6b3e);}}class ct extends _0x30ffbd{constructor(_0x517f40,_0x5b4d96){super(_0x517f40),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x5b4d96['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0xf32368{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x4efdd3){super(_0x4efdd3),this['context']['config']['define']('presenceList',A);const _0x2a3347=_0x4efdd3['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x2a3347)throw new _0x47f125('presencelist-collapseat-invalid-format',this);if(_0x2a3347<0x1)throw new _0x47f125('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x2fe827(),this['balloonPanelView']=new _0x46174d(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x1eeade of this['_allConnectedUsers'])this['_handleUserAdd'](_0x1eeade);this['listenTo'](this['_allConnectedUsers'],'add',(_0x59d998,_0x3df005)=>{this['_handleUserAdd'](_0x3df005);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x12f0bf,_0x1afad3)=>{this['_handleUserRemove'](_0x1afad3);});}['_createView'](){const _0x5dcd9f=this['context'],_0x4d1bad=new L(this['context']['locale']),_0x39a32c=this['balloonPanelView'];if(!_0x5056da(_0x5dcd9f['config']['get']('presenceList.container')))throw new _0x47f125('presencelist-missing-container',this);return _0x4d1bad['counterView']['bind']('usersCount')['to'](this),_0x4d1bad['bind']('isCollapsed')['to'](this,'usersCount',_0xf1cf72=>{const {collapseAt:_0x38b930,displayMe:_0x51b6fa}=_0x5dcd9f['config']['get']('presenceList'),_0x44c248=_0xf1cf72>=_0x38b930;return _0x4d1bad['counterView']['isHidden']=!(0x1==_0xf1cf72&&_0x51b6fa||_0x44c248),_0x44c248||this['hideDropdown'](),_0x44c248;}),_0x4d1bad['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x773a76=>{const _0x417cd4=_0x5dcd9f['config']['get']('presenceList'),_0x2f4a13=new y(_0x5dcd9f['locale'],_0x773a76,!!_0x417cd4['onClick']);return _0x2f4a13['bind']('hasTooltip')['to'](_0x4d1bad,'isCollapsed',_0x5d02ad=>!_0x5d02ad),_0x2f4a13['bind']('isFocusable')['to'](_0x4d1bad,'isCollapsed',_0x408872=>!_0x408872),_0x417cd4['onClick']&&this['listenTo'](_0x2f4a13,'execute',()=>{this['view']['isCollapsed']||_0x417cd4['onClick'](_0x773a76,_0x2f4a13['element']);}),_0x2f4a13;}),this['listenTo'](_0x4d1bad['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x4d1bad['inlineListView']['keystrokes']['set']('Enter',(_0x538c45,_0x3cd847)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x3cd847());}),_0x4d1bad['render'](),_0x39a32c['render'](),_0x3df6cb({'emitter':_0x4d1bad,'activator':()=>_0x39a32c['isVisible'],'contextElements':[_0x39a32c['element'],_0x4d1bad['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x5dcd9f['config']['get']('presenceList.container')['appendChild'](_0x4d1bad['element']),this['_bodyCollection']=new _0x498766(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x4d1bad;}['_handleUserAdd'](_0x263e74){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x263e74['isMe'])return;const _0x2e68a8=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x2e68a8&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x28d7fd=_0x263e74['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x263e74,_0x28d7fd);}['_handleUserRemove'](_0x45f0bd){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x45f0bd['id'])&&(this['currentDisplayedUsers']['remove'](_0x45f0bd['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0xc6d352 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0xc6d352['id']))return void this['currentDisplayedUsers']['add'](_0xc6d352,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x5b809d=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x5b809d['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x42e87f}=this['presenceDropdownView'];_0x42e87f['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x119599=>{if(!_0x5b809d['displayMe']&&_0x119599['isMe'])return null;const _0x1d17c3=new k(this['context']['locale'],_0x119599,!!_0x5b809d['onClick']);return _0x5b809d['onClick']&&this['listenTo'](_0x1d17c3,'execute',()=>{_0x5b809d['onClick'](_0x119599,_0x1d17c3['element']);}),_0x1d17c3;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x42e87f['focus'](),_0x42e87f['checkIfScrollable']();const _0x1335c2=(_0x81a83a,_0x5c4c14)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x5c4c14();};_0x42e87f['keystrokes']['set']('Esc',_0x1335c2),_0x42e87f['keystrokes']['set']('Shift+Tab',_0x1335c2),_0x42e87f['keystrokes']['set']('Tab',(_0x27de17,_0x891c7f)=>{!function(_0x563abe){const _0x54e195=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x490521=>_0x490521+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0xe139f0=[...document['body']['querySelectorAll'](_0x54e195)]['filter'](_0x210366=>_0x210366===document['activeElement']||_0x210366['offsetWidth']+_0x210366['offsetHeight']>0x0)['sort']((_0x4f0a3e,_0x1188a9)=>(_0x4f0a3e['tabIndex']||0x0)-(_0x1188a9['tabIndex']||0x0)),_0x5e2602=_0xe139f0['indexOf'](_0x563abe),_0x39cbc5=_0xe139f0[(_0x5e2602+0x1)%_0xe139f0['length']];_0x39cbc5&&_0x39cbc5['focus']();}(this['view']['element']),this['hideDropdown'](),_0x891c7f();}),_0x42e87f['focusTracker']['add'](this['view']['element']),_0x42e87f['focusTracker']['on']('change:isFocused',(_0x254a71,_0xd3e311,_0x4fb5bd)=>{_0x4fb5bd||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 _0xf32368{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};
|
package/dist/translations/af.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export default{'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':
|
|
23
|
+
export default{'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':_0x2d37df=>0x1!=_0x2d37df}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x45cc41=>{const {af:{dictionary:_0x4d928b,getPluralForm:_0x3d5dab}}={'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':_0x2d91c2=>0x1!=_0x2d91c2}};_0x45cc41['af']||={'dictionary':{},'getPluralForm':null},_0x45cc41['af']['dictionary']=Object['assign'](_0x45cc41['af']['dictionary'],_0x4d928b),_0x45cc41['af']['getPluralForm']=_0x3d5dab;})(window['CKEDITOR_TRANSLATIONS']||={});
|