@ckeditor/ckeditor5-real-time-collaboration 43.3.0-alpha.1 → 43.3.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 +1 -1
- 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',_0x1ffaa5];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2982b3){super(_0x2982b3),this['set']('state',_0x19cece['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x578074);}['init'](){const _0x2cab6c=this['context'],_0x453178=_0x2cab6c['plugins']['get']('CloudServices'),_0x479332=_0x2cab6c['plugins']['get'](_0x1ffaa5);if(!_0x453178['token'])throw new _0x431d3a('websocketgateway-missing-token',this);if(!_0x453178['webSocketUrl'])throw new _0x431d3a('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'](_0x453178['token'],_0x453178['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x16c1cc=>{if(this['connection']=_0x16c1cc,this['bind']('state')['to'](_0x16c1cc,'state',this,'_isBrowserOffline',(_0x394676,_0x2757b7)=>('connected'!==_0x394676&&(this['_shouldPluginsReconnect']=!0x0),_0x2757b7||_0x394676!==_0x19cece['CONNECTED']?_0x19cece['DISCONNECTED']:this['state']==_0x19cece['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x19cece['CONNECTING']):_0x19cece['CONNECTED'])),this['connection']['on']('error',(_0x1f39be,_0x44c56d)=>{if('limitExceeded'!==_0x44c56d['code'])throw console['error'](_0x44c56d),new _0x431d3a('cloudservices-init',null,{'originalError':_0x44c56d});_0x479332['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'});}),!_0x16c1cc['me'])return new Promise(_0x228f94=>_0x16c1cc['on']('change:me',_0x228f94));})['catch'](_0x30bb3e=>{throw console['error'](_0x30bb3e),new _0x431d3a('cloudservices-init',null,{'originalError':_0x30bb3e});});}['addToReconnectionStack'](_0x153683){if('function'!=typeof _0x153683['reconnect'])throw new _0x431d3a('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x153683))throw new _0x431d3a('websocketgateway-plugin-already-registered',this,{'name':_0x153683['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x153683);}['removeFromReconnectionStack'](_0xda8309){this['_reconnectionStack']['delete'](_0xda8309);}['isInReconnectionStack'](_0x23cb6f){return this['_reconnectionStack']['has'](_0x23cb6f);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x488999=>_0x488999['reconnect']())))['then'](()=>this['state']=_0x19cece['CONNECTED'])['catch'](_0x428e0a=>{throw console['error'](_0x428e0a),new _0x431d3a('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x19cece['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x258669{['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,_0x3e55cf];}constructor(_0x1d73cf){super(_0x1d73cf),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x277f11(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x3e55cf);}['init'](){const _0x781958=this['context']['plugins']['get'](c);this['listenTo'](_0x781958,'change:state',(_0x6ad579,_0x41a213,_0x4d8444)=>{if('connected'!==_0x4d8444)this['channelSessions']['forEach'](_0x31ec84=>_0x31ec84['clear']()),this['channelConnectedUsers']['forEach'](_0x1d2c7d=>_0x1d2c7d['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x53e99e,_0x22376c]of this['_registeredSessions'])for(const _0x6d6e3e of _0x22376c)this['_handleSessionAdd'](_0x53e99e,_0x6d6e3e);}}),this['_createUser'](_0x781958['connection']['me'],!0x0);}['register'](_0x354733,_0x2e68a0){if(this['_registeredSessions']['has'](_0x354733))throw new _0x431d3a('sessions-register-already-registered',null,{'channelId':_0x354733});this['_registeredSessions']['set'](_0x354733,_0x2e68a0),this['channelSessions']['set'](_0x354733,new _0x277f11()),this['channelConnectedUsers']['set'](_0x354733,new _0x277f11()),this['listenTo'](_0x2e68a0,'add',(_0x455527,_0x2373a5)=>this['_handleSessionAdd'](_0x354733,_0x2373a5)),this['listenTo'](_0x2e68a0,'remove',(_0x2d8c19,_0x12b8ae)=>this['_handleSessionRemove'](_0x354733,_0x12b8ae));for(const _0x2f8705 of _0x2e68a0)this['_handleSessionAdd'](_0x354733,_0x2f8705);}['unregister'](_0x3598eb){if(!this['_registeredSessions']['has'](_0x3598eb))throw new _0x431d3a('sessions-unregister-not-exist',null,{'channelId':_0x3598eb});const _0x32c257=this['_registeredSessions']['get'](_0x3598eb);this['stopListening'](_0x32c257);for(const _0x3a0ae7 of _0x32c257)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x3598eb,_0x3a0ae7);this['_registeredSessions']['delete'](_0x3598eb),this['channelSessions']['delete'](_0x3598eb),this['channelConnectedUsers']['delete'](_0x3598eb);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x43ff67){for(const _0x876f27 of this['channelSessions']['values']())for(const _0x3a7d2e of _0x876f27)if(_0x3a7d2e['id']===_0x43ff67)return _0x3a7d2e['user'];}['getUserSessions'](_0x6f24a,_0xbdef3c){const _0x5cce96=_0xbdef3c?[this['channelSessions']['get'](_0xbdef3c)]:this['channelSessions']['values'](),_0x4507ad=new Set();for(const _0x5f3ba7 of _0x5cce96)for(const _0x37a8ea of _0x5f3ba7)_0x37a8ea['user']['id']===_0x6f24a['id']&&_0x4507ad['add'](_0x37a8ea['id']);return _0x4507ad;}['getUserRole'](_0x6766e6){for(const _0xf7cec5 of this['channelSessions']['values']())for(const _0x368fe7 of _0xf7cec5)if(_0x368fe7['user']===_0x6766e6)return _0x368fe7['role'];}['_handleSessionAdd'](_0x42c6f8,_0x59804b){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x2371ef=_0x59804b['user'],_0x35c683=this['_users']['getUser'](_0x2371ef['id'])||this['_createUser'](_0x2371ef),_0x343d4e=Object['assign']({},_0x59804b,{'user':_0x35c683});this['channelSessions']['get'](_0x42c6f8)['add'](_0x343d4e);const _0x1408ae=this['channelConnectedUsers']['get'](_0x42c6f8);_0x1408ae['has'](_0x35c683['id'])||_0x1408ae['add'](_0x35c683),this['allConnectedUsers']['has'](_0x35c683['id'])||this['allConnectedUsers']['add'](_0x35c683,_0x35c683['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x42c6f8,{'channelId':_0x42c6f8,'session':_0x343d4e});}['_handleSessionRemove'](_0x246327,_0xdc3ed4){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x268d46=this['channelConnectedUsers']['get'](_0x246327),_0x36857c=_0xdc3ed4['user'];_0x36857c['id']&&(this['channelSessions']['get'](_0x246327)['remove'](_0xdc3ed4['id']),_0x268d46['has'](_0x36857c['id'])&&!this['getUserSessions'](_0x36857c,_0x246327)['size']&&_0x268d46['remove'](_0x36857c['id']),this['allConnectedUsers']['get'](_0x36857c['id'])&&!this['getUserSessions'](_0x36857c)['size']&&this['allConnectedUsers']['remove'](_0x36857c['id']));}['_createUser'](_0x1ea3e0,_0x3c697f){const _0x3d47dd=this['_users']['addUser'](_0x1ea3e0);return _0x3c697f&&this['_users']['defineMe'](_0x1ea3e0['id']),_0x3d47dd['orderNumber']=this['_uniqueUsersCount']++,_0x3d47dd;}}class H extends _0x14c65f{['_domEmitter']=new(_0x578074())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x55f68f=this['editor'],_0x15927b=_0x55f68f['plugins']['get'](i);_0x55f68f['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x179b3d,{writer:_0x55db7f})=>function(_0x1b07dc,_0x4a0fef,_0x2c49ad,_0x404897){const _0x4feea2=_0x1b07dc['markerName']['split'](':')[0x2],_0x3d164a=_0x2c49ad['getUserBySessionId'](_0x4feea2);if(!_0x3d164a||_0x4feea2===_0x2c49ad['mySessionId'])return;if(!_0x404897['model']['schema']['checkChild'](_0x1b07dc['markerRange']['start'],'$text'))return;const _0x486203={'class':'ck-user__marker\x20'+_0x3d164a['color']['getMarkerClass'](),'data-name':_0x3d164a['name'],'data-session-id':_0x4feea2},_0x30b3e5=_0x404897['model']['markers']['get'](_0x1b07dc['markerName']),_0x234167=_0x30b3e5['getStart'](),_0x2b7919=_0x234167['nodeAfter'],_0x3ca443=_0x404897['model']['schema'];if(_0x2b7919&&_0x3ca443['isObject'](_0x2b7919)&&_0x3ca443['isInline'](_0x2b7919)&&!_0x404897['model']['markers']['get']('user:range:'+_0x4feea2)['getRange']()['isCollapsed'])return;const _0x48e38c=_0x234167['parent'];return _0x404897['model']['schema']['isLimit'](_0x48e38c)&&!_0x404897['model']['hasContent'](_0x48e38c)&&(_0x486203['contenteditable']=!0x1),function(_0x297b5d,_0x380d49,_0xfbcf8c){const _0x783d64=_0x297b5d['createUIElement']('span',_0x380d49);return _0x297b5d['setCustomProperty']('userPositionMarker',!0x0,_0x783d64),_0x783d64['render']=function(_0x1dc8ce){const _0x124e6c=this['toDomElement'](_0x1dc8ce);return _0x124e6c['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>'+_0xfbcf8c['name']+'</span>',_0x124e6c['addEventListener']('mouseenter',()=>{_0x124e6c['classList']['add']('ck-user__marker_hovered');}),_0x124e6c['addEventListener']('mouseleave',()=>{_0x124e6c['classList']['remove']('ck-user__marker_hovered');}),_0x124e6c;},_0x783d64['isSimilar']=function(_0x3c9204){return!(!this['getCustomProperty']('userPositionMarker')||!_0x3c9204['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x3c9204['getAttribute']('data-session-id'));},_0x783d64;}(_0x4a0fef,_0x486203,_0x3d164a);}(_0x179b3d,_0x55db7f,_0x15927b,_0x55f68f)}),_0x55f68f['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x3efaba=>function(_0x4da02e,_0x130c6e){const _0x20c344=_0x4da02e['markerName']['split'](':')[0x2];if(_0x20c344===_0x130c6e['mySessionId'])return null;const _0xc2cf37=_0x130c6e['getUserBySessionId'](_0x20c344);if(!_0xc2cf37)return{'id':_0x20c344,'classes':[]};return{'id':_0x20c344,'classes':['ck-user__selection',_0xc2cf37['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x20c344},'priority':0x7d0+_0xc2cf37['orderNumber']};}(_0x3efaba,_0x15927b)}),function(_0x39f3d3){const _0x3b847f=_0x39f3d3['model'],_0xd3f6d0=new Map(),_0x17c919=_0x39f3d3['plugins']['get'](i);_0x3b847f['markers']['on']('update:user:range',(_0x45eeae,_0x3c4f7c,_0x329b05,_0x5b04b6)=>{if(!_0x5b04b6&&_0xd3f6d0['get'](_0x3c4f7c['name']))return _0xd3f6d0['get'](_0x3c4f7c['name'])['detach'](),void _0xd3f6d0['delete'](_0x3c4f7c['name']);const _0x39e1ef=_0x3c4f7c['name']['split'](':')[0x2];if(_0x39e1ef===_0x17c919['mySessionId'])return;const _0x244fe1='user:position:'+_0x39e1ef;_0x3b847f['markers']['has'](_0x244fe1)&&_0x39f3d3['editing']['reconvertMarker'](_0x244fe1),_0x3c4f7c['on']('change:range',(_0x9e60e4,_0x3db2e7,_0x5bdfad)=>{if('$graveyard'!=_0x3db2e7['root']['rootName']&&'$graveyard'==_0x3c4f7c['getRange']()['root']['rootName']&&!_0xd3f6d0['has'](_0x3c4f7c['name'])){const _0x30f85c=_0x3b847f['schema']['getNearestSelectionRange'](_0x5bdfad['deletionPosition']);if(_0x30f85c){const _0x19beed=ht['fromRange'](_0x30f85c);_0xd3f6d0['set'](_0x3c4f7c['name'],_0x19beed),_0x19beed['on']('change:range',(_0x52cf55,_0x40d4ba,_0x573fe2)=>{if('$graveyard'==_0x19beed['root']['rootName']){const _0x1db166=_0x3b847f['schema']['getNearestSelectionRange'](_0x573fe2['deletionPosition']);_0x1db166?(_0x19beed['start']=_0x1db166['start'],_0x19beed['end']=_0x1db166['end']):(_0xd3f6d0['delete'](_0x3c4f7c['name']),_0x19beed['detach']());}});}}});}),_0x3b847f['document']['on']('change',()=>{_0xd3f6d0['size']>0x0&&_0x3b847f['enqueueChange']({'isUndoable':!0x1},_0x5ab255=>{for(const [_0x4ef154,_0x40e297]of _0xd3f6d0)'$graveyard'==_0x3b847f['markers']['get'](_0x4ef154)['getRange']()['root']['rootName']&&(re(_0x4ef154['split'](':')[0x2],_0x40e297['toRange'](),_0x3b847f,_0x5ab255),_0x40e297['detach']());_0xd3f6d0['clear']();});});}(_0x55f68f),this['_domEmitter']['listenTo'](_0x8e46b9['document'],'keydown',(_0x1da33e,{key:_0x332ef0})=>{'Escape'===_0x332ef0&&function(_0x509315){_0x509315['editing']['view']['change'](_0xb8733f=>{for(const _0x288531 of _0x509315['model']['markers']){if(!_0x288531['name']['startsWith']('user:position'))continue;const _0x1aeecc=_0x509315['editing']['mapper']['markerNameToElements'](_0x288531['name']);if(_0x1aeecc){for(const _0x5eeac2 of _0x1aeecc)_0xb8733f['removeClass']('ck-user__marker_hovered',_0x5eeac2);}}});}(_0x55f68f);},{'useCapture':!0x0});}['afterInit'](){const _0x5632dd=this['editor'],_0x1f2ecf=_0x5632dd['commands']['get']('undo');_0x1f2ecf&&_0x5632dd['model']['on']('applyOperation',(_0x3af047,_0x54a97a)=>{const _0x4edc15=_0x54a97a[0x0];if('marker'!=_0x4edc15['type']||!_0x4edc15['name']['startsWith']('user:'))return;const _0x25e4fd=_0x4edc15['batch'];_0x1f2ecf['_createdBatches']['has'](_0x25e4fd)&&(_0x4edc15['newRange']=_0x4edc15['oldRange']?_0x5632dd['model']['createRange'](_0x4edc15['oldRange']['start'],_0x4edc15['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x3018a2=this['editor'],_0xab1db7=_0x3018a2['model']['document'],_0x3011f0=_0x3018a2['plugins']['get'](i);_0x3018a2['model']['enqueueChange']({'isUndoable':!0x1},_0x31b7ac=>{const _0x266e4f='user:range:'+_0x3011f0['mySessionId'],_0x6d7eb7='user:position:'+_0x3011f0['mySessionId'],_0x2e3699=_0x3018a2['model']['markers']['has'](_0x266e4f);_0x3018a2['editing']['view']['hasDomSelection']?re(_0x3011f0['mySessionId'],_0xab1db7['selection']['getFirstRange'](),_0x3018a2['model'],_0x31b7ac):_0x2e3699&&(_0x31b7ac['removeMarker'](_0x266e4f),_0x31b7ac['removeMarker'](_0x6d7eb7));});}}function re(_0x1330a6,_0x1ff7bf,_0x4aeb3a,_0x498019){const _0xdf470='user:range:'+_0x1330a6,_0x4806b1='user:position:'+_0x1330a6,_0x32f7fe=_0x1ff7bf['getContainedElement']();let _0x587ff4=_0x1ff7bf['start'];_0x32f7fe&&_0x32f7fe['is']('element','tableCell')&&(_0x587ff4=function(_0x369105,_0x191211){for(const _0x528096 of _0x369105['getPositions']())if(_0x191211['schema']['checkChild'](_0x528096,'$text'))return _0x528096;}(_0x1ff7bf,_0x4aeb3a),_0x1ff7bf=_0x498019['createRange'](_0x587ff4));const _0x24750f=_0x498019['createRange'](_0x587ff4);_0x4aeb3a['markers']['has'](_0xdf470)?(_0x498019['updateMarker'](_0xdf470,{'range':_0x1ff7bf}),_0x498019['updateMarker'](_0x4806b1,{'range':_0x24750f})):(_0x498019['addMarker'](_0xdf470,{'range':_0x1ff7bf,'usingOperation':!0x0}),_0x498019['addMarker'](_0x4806b1,{'range':_0x24750f,'usingOperation':!0x0}));}function q(_0xc2c317,_0x56e681,_0x3129d4){const _0x50430a=_0xc2c317['t'],t=_0xc2c317['t'];switch(_0x56e681){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 _0x50430a({'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'},_0x3129d4);default:return'';}}let K=0x1;class l extends _0x14c65f{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
-
((()=>_0x129487)());['_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,_0x2e644d,_0x3e55cf,_0x1ffaa5];}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 _0x3de9e1=this['serverHistory']['getOperations']();for(let _0x24d5a4=_0x3de9e1['length']-0x1;_0x24d5a4>=0x0;_0x24d5a4--){const _0x387041=_0x3de9e1[_0x24d5a4];if(!this['_disconnectionOperations']['has'](_0x387041))return _0x387041['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x5a2dba){if(super(_0x5a2dba),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x191430(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x431d3a('collaboration-missing-channelid',this);const _0x1b522c=_0x5a2dba['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x1b522c,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x588187(),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 _0xdd7fee=this['editor'],_0x134edb=_0xdd7fee['plugins']['get'](_0x3e55cf),_0x585a3f=_0xdd7fee['plugins']['get'](c);this['listenTo'](_0x134edb,'getOperationAuthor',(_0x4bd9e1,_0x2e0040)=>{const _0x3e15b3=_0x2e0040[0x0];_0x3e15b3['_authorId']&&(_0x4bd9e1['return']=_0x134edb['getUser'](_0x3e15b3['_authorId']),_0x4bd9e1['stop']()),null===_0x3e15b3['_authorId']&&(_0x4bd9e1['return']=null,_0x4bd9e1['stop']());},{'priority':'high'}),this['listenTo'](_0xdd7fee['model']['document']['selection'],'change:range',(_0x5968b9,_0x4f7335)=>{_0x4f7335['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0xdd7fee['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0xdd7fee['model']['on']('applyOperation',(_0x20c296,_0x3fd1ed)=>{const _0x3b917c=_0x3fd1ed[0x0];_0x3b917c['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x3b917c),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x585a3f,'state',this,'_hasSynchronizationProblem',(_0xbd0ed1,_0x23002f)=>'connected'===_0xbd0ed1&&!_0x23002f),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0xdd7fee['disableReadOnlyMode']('rtc-offline'):_0xdd7fee['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0xdd7fee['disableReadOnlyMode']('rtc-offline'):_0xdd7fee['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x32a314=this['editor']['plugins']['get'](i),_0x401223=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x32a314['unregister'](this['_channelId']);const _0x10b6c8=await this['_service']['reconnect'](_0x401223['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x10b6c8)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x481466=await this['_service']['getConnectedSessions']();_0x32a314['register'](this['_channelId'],_0x481466),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x3a4d02){if(function(_0xcdb5d7){return'404'===_0xcdb5d7['code'];}(_0x3a4d02)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0xdaac93){return'409'===_0xdaac93['code'];}(_0x3a4d02)){const _0x24b2fd=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'](_0x24b2fd);}else{if(!(_0x3a4d02 instanceof J))throw _0x3a4d02;this['_handleReconnectionError']();}}}}['destroy'](){const _0x556b1c=this['editor']['plugins']['get'](c),_0x267c49=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x267c49['channelSessions']['has'](this['_channelId'])&&_0x267c49['unregister'](this['_channelId']),_0x556b1c['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x1ae8fa){if(this['sessionId']!==_0x1ae8fa['sessionId']&&this['_lastSyncedOperationId']!==_0x1ae8fa['lastOperationId'])throw new J();return this['sessionId']=_0x1ae8fa['sessionId'],this['_handleServerResponse']([],{..._0x1ae8fa,'wereChangesApplied':!0x1,'data':_0x1ae8fa['data']},'reconnect');}async['_connectService'](_0x4c5e08,_0x582df1=!0x1){const {connection:_0x298186}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x298186,this['_channelId'])['then'](_0x1e21bc=>this['_initSessionsHandling'](_0x1e21bc))['catch'](_0xaade6=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0xaade6);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x539e77,_0x300456)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x300456);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x3cba70=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x4c5e08);this['_isPendingUpdate']=!0x0;const _0x28e2dc=await this['_service']['connect'](_0x298186,this['_compressOperations'](_0x4c5e08),_0x3cba70);if(this['sessionId']=_0x28e2dc['sessionId'],_0x582df1){if(!_0x28e2dc['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x28e2dc['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x4c5e08,_0x28e2dc,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x28e2dc,_0x4c5e08);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x445b8c=this['editor']['plugins']['get'](i),_0xf94f43=this['editor']['plugins']['get'](H),_0x577de0=_0x445b8c['channelSessions']['get'](this['_channelId']);_0x577de0&&_0x577de0['length']>0x1?_0xf94f43['createUserMarkerOperations']():this['listenTo'](_0x445b8c,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x445b8c['channelSessions']['get'](this['_channelId'])['length']&&_0xf94f43['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x133dea,_0x5206a3,_0x2bcb3c,_0xf3e640){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x5206a3){const _0x11ecd6=this['_decompressOperations'](_0x2bcb3c,_0xf3e640);await this['_fetchMissingUsers'](_0x11ecd6),this['_handleExternalOperations'](_0x11ecd6,_0x5206a3,_0x2bcb3c['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x567d51}=this['editor'];let _0x5d82ec;try{_0x5d82ec=await this['_service']['getDocumentDetails']();}catch(_0x4f640a){const _0x2366fb=q(_0x567d51,'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'](_0x2366fb);}const _0xa7c44e=_0x5d82ec['currentDocumentSession']||_0x5d82ec['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0xa7c44e['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x46bed5=q(_0x567d51,'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'](_0x46bed5);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x4d38a5){const _0x19edbd=this['editor']['plugins']['get'](i);this['listenTo'](_0x19edbd,'sessionAdd:'+this['_channelId'],(_0x3211ec,{session:_0x3e7db0})=>{if(_0x3e7db0['id']===_0x19edbd['mySessionId']){_0x3211ec['off']();const _0x352937=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x5ebe65=_0x3e7db0['permissions'];_0x352937&&_0x352937['isEnabled']&&(_0x5ebe65=_0x5ebe65['filter'](_0xf972ea=>'document:write'!==_0xf972ea)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x5ebe65,this['_channelId']);}}),_0x19edbd['register'](this['_channelId'],_0x4d38a5);}['_initThrowingOnDataSet'](){const _0x4ad0e9=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x4bfd70)=>{if(!_0x4bfd70[_0x4bfd70['length']-0x1]['suppressErrorInCollaboration'])throw new _0x431d3a('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x4ad0e9['apply'](this['editor']['data'],_0x4bfd70);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x3bf850,[_0x1ec16d])=>{if(this['_document']['version'])throw new _0x431d3a('realtimecollaborationclient-init-document-already-initialized',this);_0x3bf850['stop'](),this['_setPendingAction']();const _0x3b8527=this['editor']['config']['get']('rootsAttributes'),_0x230480=this['_getOperationsFromInitData'](_0x1ec16d,_0x3b8527);0x0==_0x230480['length']&&_0x230480['push'](new _0x14929d(0x0)),_0x3bf850['return']=this['_connectService'](_0x230480)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x5ed427=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x5ed427))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x1ef690,[_0x58e183,_0x249d16])=>{_0x1ef690['stop']();const _0x1bdfc4=this['editor']['model']['document']['getRoot'](_0x58e183);if(!this['_knownRootNames']['has'](_0x58e183)){const _0x1883c8=_0x249d16&&_0x249d16['data']?_0x249d16['data']:'',_0x3019d6=_0x249d16&&_0x249d16['attributes']?_0x249d16['attributes']:{};await this['_loadRoot'](_0x58e183,_0x1883c8,_0x3019d6);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x1bdfc4['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x1bdfc4);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x4a29aa){const _0x5bbba8=this['editor']['plugins']['get'](_0x3e55cf),{connection:_0x556654}=this['editor']['plugins']['get'](c),_0x4ac25e=new Set();for(const _0x1c2a81 of _0x4a29aa){const _0x2e3bf1=_0x1c2a81['_authorId'];_0x2e3bf1&&!_0x5bbba8['getUser'](_0x2e3bf1)&&_0x4ac25e['add'](_0x2e3bf1);}if(0x0===_0x4ac25e['size'])return;const _0x3f1b82=await dt['getMany'](_0x556654,Array['from'](_0x4ac25e));for(const _0x1e5069 of _0x3f1b82)_0x5bbba8['getUser'](_0x1e5069['id'])||_0x5bbba8['addUser'](_0x1e5069);}['_getOperationsFromInitData'](_0x19ca49,_0x29ff85={}){const _0xe57a19=this['editor']['model'],_0x55bac2=[];let _0x411483=0x0;const _0xdb6303='string'==typeof _0x19ca49?{'main':_0x19ca49}:_0x19ca49;for(const _0x213f09 of Object['keys'](_0xdb6303)){if(!this['_document']['roots']['has'](_0x213f09))throw new _0x431d3a('realtimecollaborationclient-init-non-existent-root',this);const _0x291c2e=this['editor']['data']['parse'](_0xdb6303[_0x213f09]),_0x27a0c2=this['_document']['getRoot'](_0x213f09),_0x4aef0f=new _0x3a7198(_0xe57a19['createPositionAt'](_0x27a0c2,0x0),_0x291c2e,_0x411483++);_0x55bac2['push'](_0x4aef0f);for(const [_0x443efc,_0x106f5a]of _0x291c2e['markers']){const _0x211acd=_0xe57a19['createRange'](_0xe57a19['createPositionFromPath'](_0x27a0c2,_0x106f5a['start']['path']['slice']()),_0xe57a19['createPositionFromPath'](_0x27a0c2,_0x106f5a['end']['path']['slice']())),_0x105453=new _0x392277(_0x443efc,null,_0x211acd,_0xe57a19['markers'],!0x0,_0x411483++);_0x55bac2['push'](_0x105453);}}if(_0x29ff85)for(const [_0x240b12,_0xdaf888]of Object['entries'](_0x29ff85)){const _0x3863de=_0xe57a19['document']['getRoot'](_0x240b12);if(!_0x3863de)throw new _0x431d3a('multi-root-editor-root-attributes-no-root',null);for(const [_0x444bf9,_0x2fa36d]of Object['entries'](_0xdaf888))if(null!==_0x2fa36d){const _0x2eba5e=new _0x39937b(_0x3863de,_0x444bf9,null,_0x2fa36d,_0x411483++);_0x55bac2['push'](_0x2eba5e);}}return _0x55bac2;}async['_loadRoot'](_0x326bf2,_0x25512a,_0xaaaf95){this['_getOperationsFromInitData']({[_0x326bf2]:_0x25512a},{[_0x326bf2]:_0xaaaf95})['forEach']((_0x419916,_0x187394)=>{_0x419916['baseVersion']=this['_document']['version']+_0x187394,_0x419916['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x419916);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x51b004,_0x2a7686){let _0x260e65;this['_offset']=_0x51b004['offset'];const _0x47501a=_0x51b004['wereChangesApplied']&&!_0x51b004['initData'],_0x38edd3=_0x47501a?0x0:_0x51b004['data']['baseVersion'];if(_0x2a7686['forEach'](_0x503ade=>{_0x503ade['_isInit']=!0x0,_0x503ade['createdAt']=_0x51b004['sessionCreatedAt'],_0x503ade['_authorId']=null;}),_0x47501a)_0x260e65=_0x2a7686,this['_applyOperationsSet'](_0x260e65,_0x47501a);else{if(_0x51b004['initData']){const _0x48db11=this['_getOperationsFromInitData'](_0x51b004['initData']);this['_document']['history']['version']=-_0x48db11['length'],_0x48db11['forEach'](_0x3b778f=>{_0x3b778f['baseVersion']-=_0x48db11['length'],_0x3b778f['createdAt']=_0x51b004['sessionCreatedAt'],_0x3b778f['_isInit']=!0x0,_0x3b778f['_authorId']=null;}),this['_applyOperationsSet'](_0x48db11,!0x0),this['serverHistory']['version']=-_0x48db11['length']+this['_offset'],this['_updateServerHistory'](_0x48db11);}this['_document']['history']['version']=_0x38edd3,_0x260e65=this['_decompressOperations'](_0x51b004['data'],_0x51b004['metadata']),await this['_fetchMissingUsers'](_0x260e65),this['_applyOperationsSet'](_0x260e65,_0x47501a);}_0x51b004['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x260e65,_0x51b004['lastOperationId']),this['_lastSyncedOperationId']=_0x51b004['lastOperationId']),this['serverHistory']['version']=_0x38edd3+this['_offset'],this['_updateServerHistory'](_0x260e65),_0x2a7686['filter'](_0x2618b9=>{const _0x56b4d4=this['_getAffectedRoot'](_0x2618b9);return _0x56b4d4&&!this['_knownRootNames']['has'](_0x56b4d4);})['forEach']((_0x5d4846,_0x460081)=>{_0x5d4846['baseVersion']=this['_document']['version']+_0x460081,this['_saveOperationInBuffer'](_0x5d4846);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x24a201,_0x5e60ff){throw this['_isPendingUpdate']=!0x0,_0x5e60ff&&console['error'](_0x5e60ff),new _0x431d3a(_0x24a201,this['editor']);}['_saveOperationInBuffer'](_0x1cacbd){this['_knownOperations']['has'](_0x1cacbd)||(this['_knownOperations']['add'](_0x1cacbd),this['_bufferedOperations']['push'](_0x1cacbd),this['_pendingAction']||'marker'==_0x1cacbd['type']&&!_0x1cacbd['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x1708bc=!0x1){!_0x1708bc&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x176a63=>{_0x176a63&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x2ebfff=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x3e8f71){return _0x3e8f71['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x3e8f71['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x3e8f71['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x2ebfff))throw _0x2ebfff;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x3c73f1=>{this['on']('change:_isPendingUpdate',()=>{_0x3c73f1();});});}async['_sendBufferedOperations'](){const _0xeb7b2e=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0xeb7b2e['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x13e989=[...this['_bufferedOperations']];for(const _0x6dd9de of _0x13e989)_0x6dd9de['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x6dd9de);const _0x364a39=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x13e989),_0x2cb4f3=K++,_0x3e2eb8=this['_compressOperations'](_0x13e989),_0x456e26=await this['_service']['sendOperations'](_0x3e2eb8,_0x3e2eb8['baseVersion'],_0x364a39);try{return await this['_handleServerResponse'](_0x13e989,_0x456e26,_0x2cb4f3);}catch(_0x4879f8){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x4879f8);}}async['_handleServerResponse'](_0x306380,_0x524eda,_0x2b86a8){if('error'in _0x524eda)throw _0x524eda['error'];let _0x1dc4fb=!0x1;if(_0x524eda['wereChangesApplied']){_0x524eda['lastOperationId']&&(this['_lastSyncedOperationId']=_0x524eda['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0xd994e5=>!_0x306380['includes'](_0xd994e5));for(const _0x2716bd of _0x306380)_0x2716bd['createdAt']='lastOperationAcceptedAt'in _0x524eda&&_0x524eda['lastOperationAcceptedAt']||void 0x0;Q(_0x306380,_0x524eda['version']-_0x306380['length']),this['_updateServerHistory'](_0x306380);const _0x3eac6a=_0x306380['filter'](_0x2c5850=>{if(!_0x2c5850['_isInit'])return!0x1;const _0x5ca14f=this['_getAffectedRoot'](_0x2c5850);return _0x5ca14f&&!this['_knownRootNames']['has'](_0x5ca14f);});Q(_0x3eac6a,this['_document']['version']),this['_applyOperationsSet'](_0x3eac6a),_0x1dc4fb=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x18f54a=this['_decompressOperations'](_0x524eda['data'],_0x524eda['metadata'])['filter'](_0x35ee73=>_0x35ee73['baseVersion']>=this['_lastServerVersion']);_0x18f54a['forEach'](_0x36a693=>this['_addKnownRoot'](_0x36a693)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x33c092=>!_0x33c092['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x33c092))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x18f54a),_0x1dc4fb=this['_handleExternalOperations'](_0x18f54a,_0x524eda['version'],_0x524eda['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x1dc4fb?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x5952c5,_0x30f271,_0x420e20){try{const _0x9d73c8={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x336d93,operationsB:_0x280c16,originalOperations:_0x550553}=_0x85420e(_0x5952c5,this['_bufferedOperations'],_0x9d73c8);Q(_0x336d93,this['_document']['version']),Q(_0x280c16,_0x30f271);for(const _0x3ddcc0 of _0x336d93){const _0x4873d7=_0x550553['get'](_0x3ddcc0);_0x3ddcc0['_authorId']=_0x4873d7?_0x4873d7['_authorId']:null;}_0x420e20&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x5952c5,_0x420e20),this['_lastSyncedOperationId']=_0x420e20),this['_bufferedOperations']=[..._0x280c16],this['_applyOperationsSet'](_0x336d93),this['_updateServerHistory'](_0x5952c5);}catch(_0xe5c0a7){return console['error'](_0xe5c0a7),!0x1;}return!0x0;}['_applyOperationsSet'](_0x3306fd,_0x3ef3a6=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x52c2f4=>{for(const _0x529a4e of _0x3306fd)this['_knownOperations']['add'](_0x529a4e),this['_addKnownRoot'](_0x529a4e),_0x52c2f4['batch']['addOperation'](_0x529a4e),this['editor']['model']['applyOperation'](_0x529a4e);});}['_addKnownRoot'](_0x1fb2f7){const _0x3b3e63=this['_getAffectedRoot'](_0x1fb2f7);_0x3b3e63&&this['_knownRootNames']['add'](_0x3b3e63);}['_getAffectedRoot'](_0x5ec41b){let _0x5bec13,_0x904cc8;switch(_0x5ec41b['type']){case'insert':_0x5bec13=_0x5ec41b['position']['root'];break;case'marker':if(_0x904cc8=_0x5ec41b['newRange'],!_0x904cc8)return null;_0x5bec13=_0x904cc8['root'];break;case'addRootAttribute':_0x5bec13=_0x5ec41b['root'];break;case'addRoot':_0x5bec13=_0x5ec41b['affectedSelectable'];break;case'move':_0x5bec13=_0x5ec41b['targetPosition']['root'];break;default:return null;}return _0x5bec13['rootName'];}['_updateServerHistory'](_0x3fd66c){_0x3fd66c['forEach'](_0x2b6285=>{const _0x2533d2=_0x2b6285['clone']();_0x2533d2['_authorId']=_0x2b6285['_authorId'],_0x2533d2['_isInit']=!!_0x2b6285['_isInit'],_0x2533d2['createdAt']=_0x2b6285['createdAt'],_0x2533d2['baseVersion']+=this['_offset'],_0x2b6285['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x2533d2),this['serverHistory']['addOperation'](_0x2533d2);});}['_handleReconnectionError'](_0x52c88e){const _0x11eeb3=this['editor']['plugins']['get']('Notification'),_0xedfe07=this['editor']['locale'];_0x52c88e||(_0x52c88e=q(_0xedfe07,'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.')),_0x11eeb3['showWarning'](_0x52c88e,{'title':q(_0xedfe07,'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'](_0x2e644d)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x2e644d)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x11f62f){const _0x1dfa1d=_0x11f62f['map'](_0x39edca=>_0x39edca['toJSON']());return this['_compressor']['compress'](_0x1dfa1d);}['_decompressOperations'](_0x3636a8,_0xcf6d0d){return this['_compressor']['decompress'](_0x3636a8)['map']((_0xa4a93b,_0x2a8e1a)=>{const _0x252e27='init'==_0xcf6d0d[_0x2a8e1a]['type'];if('InsertOperation'==_0xa4a93b['__className']){const _0x39baee=_0xa4a93b['position']['root'];!this['_document']['getRoot'](_0x39baee)&&(this['_document']['createRoot']('$root',_0x39baee)['_isAttached']=!0x1);}const _0x59f32d=_0xf834c8['fromJSON'](_0xa4a93b,this['_document']);return _0x59f32d['wasUndone']=_0xa4a93b['wasUndone'],_0x59f32d['_isInit']=_0x252e27,_0x59f32d['_authorId']=_0x252e27?null:_0xcf6d0d[_0x2a8e1a]['userId'],_0x59f32d['_isDisconnection']='cs:removeUser'===_0xcf6d0d[_0x2a8e1a]['type'],_0x59f32d['createdAt']=_0xcf6d0d[_0x2a8e1a]['createdAt'],_0x59f32d;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x52f7c7=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x52f7c7&&_0x52f7c7['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x1f943e,_0x362bda){for(const _0x4369c5 of _0x1f943e)_0x4369c5['baseVersion']=_0x362bda++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x49c616){this['_ignoredOperations']=_0x49c616,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0xfc40d9){let _0xd7bd1=_0xfc40d9['length'];for(;_0xd7bd1--;){const _0x2669e2=_0xfc40d9[_0xd7bd1];if(!this['_ignoredOperations']['has'](_0x2669e2)){if(!this['_operationToId']['has'](_0x2669e2)){const _0x4afadf=_0x48be78()['slice'](0x1,0x12);this['_operationToId']['set'](_0x2669e2,_0x4afadf);}return this['_operationToId']['get'](_0x2669e2);}}}['setIdForTheLastOperation'](_0x1165e4,_0xc7bbbb){if(!_0xc7bbbb)return;let _0xa1c2af=_0x1165e4['length'];for(;_0xa1c2af--;){const _0x18e203=_0x1165e4[_0xa1c2af];this['_ignoredOperations']['has'](_0x18e203)||this['_operationToId']['set'](_0x18e203,_0xc7bbbb);}}}class n extends _0x14c65f{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x258669{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
-
((()=>_0x2bbf04)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x3e55cf];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x127d54){super(_0x127d54),this['_services']=new Map();}async['init'](){const _0x22d096=this['context'],_0xbf827=_0x22d096['plugins']['get']('CommentsRepository');if(_0x22d096['plugins']['get'](c)['addToReconnectionStack'](this),_0xbf827['adapter']={'addCommentThread':async({channelId:_0x901a15,threadId:_0x5ab19c,comments:_0x12741c,resolvedAt:_0x151ffc,resolvedBy:_0x1f1f06,context:_0x14f912,attributes:_0x208505})=>{const _0x253a3e=await this['_getService'](_0x901a15)['addCommentThread']({'commentThreadId':_0x5ab19c,'comments':_0x12741c['map'](_0x19cdef=>function(_0x5b73f7,_0x2bdc5a,_0x29f78b){return{'commentThreadId':_0x29f78b,'commentId':_0x5b73f7['commentId'],'userId':_0x5b73f7['authorId'],'content':_0x5b73f7['content'],'documentId':_0x2bdc5a,'createdAt':_0x5b73f7['createdAt'],'attributes':_0x5b73f7['attributes']||{}};}(_0x19cdef,_0x901a15,_0x5ab19c)),'resolvedAt':_0x151ffc,'resolvedBy':_0x1f1f06,'context':_0x14f912,'attributes':_0x208505})['catch'](ut);return{'threadId':_0x253a3e['commentThreadId'],'comments':_0x253a3e['comments']};},'getCommentThread':async({channelId:_0xef6c7c,threadId:_0x169539})=>{const _0x4cbc5d=await this['_getService'](_0xef6c7c)['getCommentThread'](_0x169539)['catch'](ut);return _0x4cbc5d['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x4cbc5d]),{'threadId':_0x4cbc5d['commentThreadId'],'comments':_0x4cbc5d['comments']['map'](b),'context':_0x4cbc5d['context'],'resolvedAt':_0x4cbc5d['resolvedAt'],'resolvedBy':_0x4cbc5d['resolvedBy'],'attributes':_0x4cbc5d['attributes']||{}});},'updateCommentThread':async({channelId:_0x4228cc,threadId:_0x4a901b,context:_0x470f40,unlinkedAt:_0x3bc7f1,attributes:_0x531500})=>this['_getService'](_0x4228cc)['updateCommentThread']({'commentThreadId':_0x4a901b,'context':_0x470f40,'attributes':_0x531500,'unlinkedAt':_0x3bc7f1})['catch'](y)['catch'](ut),'resolveCommentThread':async({channelId:_0x11ac10,threadId:_0x113ac0})=>{const _0x5284b5=await this['_getService'](_0x11ac10)['resolveCommentThread'](_0x113ac0)['catch'](y)['catch'](ut);return{'threadId':_0x5284b5['commentThreadId'],'resolvedAt':_0x5284b5['resolvedAt'],'resolvedBy':_0x5284b5['resolvedBy']};},'reopenCommentThread':async({channelId:_0x2c48d6,threadId:_0x51c0c8})=>this['_getService'](_0x2c48d6)['reopenCommentThread'](_0x51c0c8)['catch'](y)['catch'](ut),'removeCommentThread':({channelId:_0x2d6b81,threadId:_0x51dc7e})=>this['_getService'](_0x2d6b81)['removeCommentThread'](_0x51dc7e)['catch'](y)['catch'](ut),'addComment':({channelId:_0xb31ab1,threadId:_0x4ed71d,commentId:_0x11d2b8,content:_0x4f636d,attributes:_0x370b38})=>this['_getService'](_0xb31ab1)['addComment'](_0x4ed71d,_0x11d2b8,_0x4f636d,_0x370b38)['catch'](ut),'updateComment':({channelId:_0x1d628b,threadId:_0x1cb862,commentId:_0x5ea578,content:_0x3e7312,attributes:_0x31e66c})=>this['_getService'](_0x1d628b)['updateComment'](_0x1cb862,_0x5ea578,_0x3e7312,_0x31e66c)['catch'](y)['catch'](ut),'removeComment':({channelId:_0x211bff,threadId:_0x441272,commentId:_0x4c9d66})=>this['_getService'](_0x211bff)['removeComment'](_0x441272,_0x4c9d66)['catch'](y)['catch'](ut)},_0x22d096 instanceof _0x508a35){const _0x1e09c8=_0x22d096['config']['get']('collaboration.channelId'),_0x3d0e5e=_0x22d096['plugins']['get'](i);await this['_setUpService'](_0x1e09c8);const _0x1c46c7=await this['_services']['get'](_0x1e09c8)['getConnectedSessions']();this['listenTo'](_0x3d0e5e,'sessionAdd:'+_0x1e09c8,(_0x1f32d0,{session:_0x6a9ac4})=>{_0x6a9ac4['id']===_0x3d0e5e['mySessionId']&&(_0x1f32d0['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x6a9ac4['permissions'],_0x1e09c8));}),_0x3d0e5e['register'](_0x1e09c8,_0x1c46c7);}}async['_setUpService'](_0x153167){if(this['_services']['has'](_0x153167))throw new _0x431d3a('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x153167});const _0x603a32=this['context']['plugins']['get']('CommentsRepository'),_0x5878ab=new a['CommentsService'](_0x153167);this['_services']['set'](_0x153167,_0x5878ab),this['listenTo'](_0x5878ab,'commentThreadAdded',(_0x5104f7,_0x3c97a8)=>{const {commentThreadId:_0x1480b5,documentId:_0x1c937e,context:_0x556e86,attributes:_0x316c62,resolvedAt:_0x227c29,resolvedBy:_0x736832,comments:_0x524d83}=_0x3c97a8;_0x603a32['getCommentThread'](_0x1480b5)||_0x603a32['addCommentThread']({'threadId':_0x1480b5,'channelId':_0x1c937e,'comments':_0x524d83?_0x524d83['map'](b):[],'context':_0x556e86,'attributes':_0x316c62,'resolvedAt':_0x227c29,'resolvedBy':_0x736832,'isFromAdapter':!0x0});}),this['listenTo'](_0x5878ab,'commentThreadUpdated',(_0x32dd5d,{commentThreadId:_0x152172,documentId:_0x3b272f,context:_0x5ead29,unlinkedAt:_0x226d9b,attributes:_0x35db8f})=>{_0x603a32['getCommentThread'](_0x152172)&&_0x603a32['updateCommentThread']({'threadId':_0x152172,'channelId':_0x3b272f,'context':_0x5ead29,'unlinkedAt':_0x226d9b,'attributes':_0x35db8f,'isFromAdapter':!0x0});}),this['listenTo'](_0x5878ab,'commentThreadResolved',(_0x1b7a83,{commentThreadId:_0x1f69ad,resolvedBy:_0x192b42,resolvedAt:_0x4e2883})=>{const _0x1bef98=_0x603a32['getCommentThread'](_0x1f69ad);_0x1bef98&&_0x1bef98['resolve']({'resolvedBy':_0x192b42,'resolvedAt':_0x4e2883,'isFromAdapter':!0x0});}),this['listenTo'](_0x5878ab,'commentThreadReopened',(_0x4b9bf9,{commentThreadId:_0xf6f039})=>{const _0x3141ae=_0x603a32['getCommentThread'](_0xf6f039);_0x3141ae&&_0x3141ae['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x5878ab,'commentThreadRemoved',(_0x454f9d,{commentThreadId:_0x432954})=>{const _0x150f18=_0x603a32['getCommentThread'](_0x432954);_0x150f18&&_0x150f18['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x5878ab,'commentAdded',(_0x45cfd3,_0x102500)=>{const _0x4e48f2=_0x102500['commentThreadId'],_0x140a77=_0x603a32['getCommentThread'](_0x4e48f2);_0x140a77&&_0x140a77['addComment']({...b(_0x102500),'isFromAdapter':!0x0});}),this['listenTo'](_0x5878ab,'commentUpdated',(_0x540481,{commentThreadId:_0x4e09b6,commentId:_0x5166d1,content:_0x2cdfd3,attributes:_0x5820e2})=>{const _0x599075=_0x603a32['getCommentThread'](_0x4e09b6);if(_0x599075){const _0x3020a1=_0x599075['getComment'](_0x5166d1);_0x3020a1&&_0x3020a1['update']({'content':_0x2cdfd3,'attributes':_0x5820e2,'isFromAdapter':!0x0});}}),this['listenTo'](_0x5878ab,'commentRemoved',(_0x541948,{commentThreadId:_0x334784,commentId:_0x2de763})=>{const _0x6f424d=_0x603a32['getCommentThread'](_0x334784);if(_0x6f424d){const _0x126c0c=_0x6f424d['getComment'](_0x2de763);_0x126c0c&&_0x126c0c['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x153167);}['destroy'](){if(this['context']instanceof _0x508a35){const _0x24816b=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x24816b);}}['_terminateService'](_0x5b9d14){if(!this['_services']['has'](_0x5b9d14))throw new _0x431d3a('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x5b9d14});this['_getService'](_0x5b9d14)['disconnect'](),this['_services']['delete'](_0x5b9d14);}async['reconnect'](){for(const _0x54ae25 of this['_services']['keys']())await this['_connectService'](_0x54ae25);if(this['context']instanceof _0x508a35){const _0xf0898=this['context']['config']['get']('collaboration.channelId'),_0x520bfa=this['context']['plugins']['get'](i);_0x520bfa['unregister'](_0xf0898);const _0x2af661=await this['_services']['get'](_0xf0898)['getConnectedSessions']();_0x520bfa['register'](_0xf0898,_0x2af661);}}async['_connectService'](_0x58394d){const {connection:_0x4ccc97}=this['context']['plugins']['get'](c),_0x8a26e0=this['context']['plugins']['get']('CommentsRepository'),_0x105cbd=this['_services']['get'](_0x58394d),_0x379d69=await _0x105cbd['connect'](_0x4ccc97);await this['_fetchMissingUsersForThreads'](_0x379d69);const _0xb409b7=new Set(Array['from'](_0x8a26e0['getCommentThreads']({'channelId':_0x58394d}),_0x22df24=>_0x22df24['id']));for(const _0x10602a of _0x379d69)_0x10602a['deletedAt']||_0xb409b7['delete'](_0x10602a['commentThreadId']);for(const _0x1777bd of _0xb409b7)_0x8a26e0['getCommentThread'](_0x1777bd)['remove']({'isFromAdapter':!0x0});for(const _0x1e1801 of _0x379d69){let _0x3e0653=_0x8a26e0['getCommentThread'](_0x1e1801['commentThreadId']);const {commentThreadId:_0x566149,context:_0x5e3230,attributes:_0x108bba,resolvedBy:_0x2cf49a,resolvedAt:_0x5c2050,unlinkedAt:_0x2db89b,deletedAt:_0x334633}=_0x1e1801;if(_0x334633)continue;_0x3e0653||(_0x3e0653=_0x8a26e0['addCommentThread']({'channelId':_0x58394d,'threadId':_0x566149,'context':_0x5e3230,'attributes':_0x108bba||{},'resolvedBy':_0x2cf49a,'resolvedAt':_0x5c2050,'unlinkedAt':_0x2db89b,'isFromAdapter':!0x0}));const _0x3ba715=new Set(Array['from'](_0x3e0653['comments'],_0xca09bd=>_0xca09bd['id']));for(const _0x4a21fe of _0x1e1801['comments'])_0x3ba715['delete'](_0x4a21fe['commentId']);for(const _0x29a058 of _0x3ba715)_0x3e0653['getComment'](_0x29a058)['remove']({'isFromAdapter':!0x0});for(const _0x583a31 of _0x1e1801['comments']){const _0x1b1768=_0x3e0653['getComment'](_0x583a31['commentId']);_0x1b1768?_0x1b1768['content']!==_0x583a31['content']&&_0x1b1768['update']({'content':_0x583a31['content'],'isFromAdapter':!0x0}):_0x3e0653['addComment'](Object['assign'](b(_0x583a31),{'isFromAdapter':!0x0}));}}}['_getService'](_0xb01c86){if(!this['_services']['has'](_0xb01c86))throw new _0x431d3a('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0xb01c86});return this['_services']['get'](_0xb01c86);}async['_fetchMissingUsersForThreads'](_0x4789b2){const _0x11db99=this['context']['plugins']['get'](_0x3e55cf),{connection:_0x188a4b}=this['context']['plugins']['get'](c),_0x343756=new Set();for(const {resolvedBy:_0x1b8f07,comments:_0x52fda6}of _0x4789b2){_0x1b8f07&&!_0x11db99['getUser'](_0x1b8f07)&&_0x343756['add'](_0x1b8f07);for(const {userId:_0x5c76e2}of _0x52fda6)_0x11db99['getUser'](_0x5c76e2)||_0x343756['add'](_0x5c76e2);}if(0x0===_0x343756['size'])return;const _0x5e5d3f=await dt['getMany'](_0x188a4b,Array['from'](_0x343756));for(const _0x189310 of _0x5e5d3f)_0x11db99['getUser'](_0x189310['id'])||_0x11db99['addUser'](_0x189310);}}async function y(_0x2b8253){if('404'!==_0x2b8253['code'])throw _0x2b8253;}function ut(_0x167a60){if((_0xe3278e=_0x167a60)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0xe3278e['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0xe3278e['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0xe3278e;throw _0x167a60;}function b(_0x3d102a){return{'threadId':_0x3d102a['commentThreadId'],'commentId':_0x3d102a['commentId'],'content':_0x3d102a['content'],'createdAt':_0x3d102a['createdAt'],'authorId':_0x3d102a['userId'],'attributes':_0x3d102a['attributes']||{}};}class f extends _0x14c65f{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
-
((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(
|
|
28
|
-
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x3e55cf];}constructor(_0x27524a){super(_0x27524a);const _0x1512ed=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x1512ed);}async['init'](){const _0x28580e=this['editor']['plugins']['get'](l),_0x1063d1=_0x28580e['serverHistory'],_0x4b3115=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x1063d1,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x28580e['sessionId']});const _0x1aa909=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x4ed41d=await tt['isBundleUploaded'](_0x4b3115['connection'],_0x1aa909);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x27fee7})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x27fee7)),'updateRevisions':async _0x3c12da=>{await this['_waitForServiceReady']();const _0x29570f=this['_revisionTracker']['currentRevision'];if(_0x4ed41d&&0x1===_0x3c12da['length']&&_0x3c12da[0x0]['id']===_0x29570f['id'])return _0x3c12da;for(const _0x264165 of _0x3c12da)_0x264165['id']===_0x29570f['id']&&(_0x264165['isEmptyCurrent']=_0x264165['fromVersion']===_0x264165['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x3c12da,this['_lastRequestId'])['then'](_0x33f3ea=>(this['_lastRequestId']=_0x33f3ea,_0x3c12da))['catch'](_0x87eb36=>{if(st(_0x87eb36)||'400'===_0x87eb36['code']&&void 0x0!==_0x87eb36['data']['wrongRequestId']){for(const _0x34bb8c of _0x3c12da){!this['_revisionTracker']['repository']['getRevision'](_0x34bb8c['id'])||this['_revisionTracker']['_bufferUpdate'](_0x34bb8c['id'],_0x34bb8c,!0x1);}if(st(_0x87eb36))throw _0x87eb36;return _0x3c12da;}throw _0x87eb36;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x1e0bfb,{revisionsData:_0x15e334,requestId:_0x141376})=>{Math['max'](..._0x15e334['map'](_0x12a4af=>_0x12a4af['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x15e334,_0x141376);}):this['_handleRevisionsUpdate'](_0x15e334,_0x141376);});const {revisions:_0x5a6355,requestId:_0x145097}=await this['_revisionHistoryService']['connect'](_0x4b3115['connection']);_0x4b3115['addToReconnectionStack'](this),this['_lastRequestId']=_0x145097,await this['_fetchMissingUsers'](_0x5a6355);for(const _0x12acfb of _0x5a6355)this['_revisionTracker']['addRevisionData'](_0x12acfb);this['listenTo'](_0x28580e,'change:_isConnected',(_0x19e814,_0x111384,_0x43cd30)=>{_0x43cd30&&(this['_oldOffset']=_0x28580e['_offset'],_0x19e814['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x4b3115,'state',_0x2cb3ba=>_0x2cb3ba===_0x19cece['CONNECTED']);}async['reconnect'](){const _0x36f84d=this['editor']['plugins']['get'](c),_0x2e69c7=this['editor']['plugins']['get'](l),_0x3721b8=async()=>{const _0x2c7c30=this['_revisionTracker']['currentRevision'],_0x4f8734=_0x2c7c30['id'],_0x5056ff=_0x4f8734!==_0x2e69c7['sessionId'];if(_0x5056ff){const _0x4c3e5a=_0x2e69c7['_offset']-this['_oldOffset'],_0x1ab5c5=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x2c7c30['toVersion']+_0x4c3e5a!==_0x1ab5c5){const _0x2a4615=_0x2c7c30['fromVersion']+_0x4c3e5a,_0x469f1b=this['editor']['plugins']['get'](_0x3e55cf),_0x3b5efe=this['_revisionTracker']['buildRevisionData']({'revision':_0x2c7c30,'from':_0x2a4615,'to':_0x1ab5c5});_0x3b5efe['id']=_0x2c7c30['id'];const _0x2964b9=_0x3b5efe['authorsIds']['map'](_0x36379f=>_0x469f1b['getUser'](_0x36379f));_0x2c7c30['_update']({..._0x3b5efe,'authors':_0x2964b9},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x2c7c30['id'],_0x3b5efe,!0x0);}this['_revisionTracker']['_startingVersion']=_0x1ab5c5,(_0x2c7c30['toVersion']===_0x2c7c30['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x4f8734)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x4f8734),this['_revisionTracker']['_createCurrentRevision'](_0x1ab5c5));}const {revisions:_0xd6cc03,requestId:_0x41958e}=await this['_revisionHistoryService']['reconnect'](_0x36f84d['connection'],this['_lastRequestId']);_0x5056ff&&_0xd6cc03['length']>0x0?_0x2e69c7['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0xd6cc03),this['_handleRevisionsUpdate'](_0xd6cc03,_0x41958e),this['_revisionTracker']['sendBufferedUpdates']());};return _0x2e69c7['_isConnected']?_0x3721b8():new Promise((_0x5b0a85,_0x518c62)=>{_0x2e69c7['once']('change:_isConnected',()=>{_0x3721b8()['then'](_0x5b0a85)['catch'](_0x518c62);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x5b10a5=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x3793e6=>{_0x3793e6['off'](),_0x5b10a5();});});}['_getLatestVersionFromServerOperations'](){const _0x13f136=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x5ed44b of _0x13f136)if('marker'!==_0x5ed44b['type']||_0x5ed44b['affectsData'])return _0x5ed44b['baseVersion']+0x1;}['_getLatestVersion'](){const _0x4efe18=this['editor']['plugins']['get'](l);return new Promise(_0x59cb50=>{_0x4efe18['_isPendingUpdate']?_0x4efe18['once']('change:_isPendingUpdate',()=>{_0x59cb50(this['_getLatestVersionFromServerOperations']());}):_0x59cb50(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x2451ba,_0x4d8257){const _0x4d8d5b=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x4d8257;for(const _0x4e2b36 of _0x2451ba){const _0x3818c3=_0x4d8d5b['getRevision'](_0x4e2b36['id']);if(_0x3818c3){if((_0x4e2b36['fromVersion']||_0x4e2b36['toVersion'])&&(_0x4e2b36['diffData']=null),_0x3818c3===this['_revisionTracker']['currentRevision']){const _0x3ec6f6=Math['max'](_0x3818c3['toVersion'],_0x4e2b36['toVersion']),_0xe8e317=Math['max'](_0x3818c3['fromVersion'],_0x4e2b36['fromVersion']);let _0x412ec8;_0x3818c3['toVersion']===_0x4e2b36['toVersion']&&_0x3818c3['fromVersion']===_0x4e2b36['fromVersion']?(_0x412ec8=!0x0,this['_preventResendingRevisionData'](_0x4e2b36)):_0x4e2b36['toVersion']===_0x3ec6f6&&_0x4e2b36['fromVersion']===_0xe8e317?_0x412ec8=!0x1:(_0x3818c3['toVersion']===_0x3ec6f6&&_0x3818c3['fromVersion']===_0xe8e317||this['_fixRevision']({'revision':_0x3818c3,'from':_0xe8e317,'to':_0x3ec6f6}),_0x412ec8=!0x0),_0x412ec8&&(delete _0x4e2b36['fromVersion'],delete _0x4e2b36['toVersion'],delete _0x4e2b36['diffData'],delete _0x4e2b36['createdAt'],delete _0x4e2b36['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x4e2b36),this['_preventResendingRevisionData'](_0x4e2b36);}else this['_revisionTracker']['addRevisionData'](_0x4e2b36);}const _0x103781=_0x4d8d5b['getRevisions']();_0x103781['reverse']();for(let _0x10f41c=0x0;_0x10f41c<_0x103781['length']-0x1;_0x10f41c++){const _0x21d2eb=_0x103781[_0x10f41c],_0x377fb8=_0x103781[_0x10f41c+0x1];if(_0x21d2eb['fromVersion']<_0x377fb8['toVersion']){const _0x5db0aa=_0x377fb8['toVersion'],_0x190c30=Math['max'](_0x5db0aa,_0x21d2eb['toVersion']);this['_fixRevision']({'revision':_0x21d2eb,'from':_0x5db0aa,'to':_0x190c30});}}}['_fixRevision']({revision:_0x486f71,from:_0x421d8e,to:_0xd1f964}={}){const _0x5b00ae=this['editor']['plugins']['get'](_0x3e55cf),_0x405d98=this['_revisionTracker']['buildRevisionData']({'revision':_0x486f71,'from':_0x421d8e,'to':_0xd1f964});_0x405d98['authors']=_0x405d98['authorsIds']['map'](_0xfc02ee=>_0x5b00ae['getUser'](_0xfc02ee)),_0x486f71['_update'](_0x405d98);}['_preventResendingRevisionData'](_0x2f80f4){const _0x4e4a2f={};_0x4e4a2f['id']=_0x2f80f4['id'];for(const _0x19d3d4 of Object['keys'](_0x2f80f4))'id'!==_0x19d3d4&&(_0x4e4a2f[_0x19d3d4]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x4e4a2f['id'],_0x4e4a2f,!0x0);}async['_fetchMissingUsers'](_0x50d8b8){const _0x5e66fb=this['editor']['plugins']['get'](_0x3e55cf),{connection:_0x4a79fa}=this['editor']['plugins']['get'](c),_0x1cb752=new Set();for(const _0x2b3bc0 of _0x50d8b8){for(const _0x2324e1 of _0x2b3bc0['authorsIds'])_0x264ad6(_0x2324e1);_0x2b3bc0['creatorId']&&_0x264ad6(_0x2b3bc0['creatorId']);}if(0x0===_0x1cb752['size'])return;const _0x540d61=await dt['getMany'](_0x4a79fa,Array['from'](_0x1cb752));for(const _0x2a83df of _0x540d61)_0x5e66fb['getUser'](_0x2a83df['id'])||_0x5e66fb['addUser'](_0x2a83df);function _0x264ad6(_0x270499){_0x5e66fb['getUser'](_0x270499)||_0x1cb752['add'](_0x270499);}}}function st(_0x5e7a8e){return _0x5e7a8e['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x5e7a8e['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x5e7a8e['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x14c65f{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 _0x4259e0{constructor(_0x2122f8){super(_0x2122f8);const _0x2921ac=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x2921ac['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x2921ac['to']('usersCount',_0x7ed66a=>q(_0x2122f8,'CONNECTED_USERS',_0x7ed66a))}]});}}class es extends _0x4259e0{['items'];['keystrokes'];constructor(_0x1e7d19){super(_0x1e7d19);const _0x6ee142=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x180b3c(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x6ee142['if']('hasPopup'),'aria-expanded':_0x6ee142['to']('isExpanded',_0x5d2352=>this['hasPopup']&&String(_0x5d2352)),'aria-label':_0x6ee142['to']('hasPopup',_0x24b35a=>q(_0x1e7d19,_0x24b35a?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x6ee142['to']('hasPopup',_0x970459=>!!_0x970459&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x6ee142['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x3da5e6,_0x4af9ab,_0x354708)=>{this['element']&&(_0x354708?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 _ extends _0x4259e0{['counterView'];['inlineListView'];constructor(_0x22c3a8){super(_0x22c3a8);const _0x459776=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x22c3a8),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x240d57 of this['inlineListView']['items'])_0x240d57['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',_0x459776['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class M extends _0x4259e0{['listWrapperView'];constructor(_0x2f0b98,_0x102136){super(_0x2f0b98),this['listWrapperView']=new mt(_0x2f0b98,_0x102136),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x2f0b98,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x18c5d5{constructor(_0x12b219,_0x3c1bb6){super(_0x12b219);const _0x1c7384=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x3c1bb6?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x1c7384['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x1c7384['to']('role'),'aria-label':_0x1c7384['to']('ariaLabel'),'aria-labelledby':_0x1c7384['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x8e46b9['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x33dbb4=this['element'];_0x33dbb4&&(this['_isScrollable']=Math['max'](_0x33dbb4['scrollHeight'],_0x33dbb4['clientHeight'])>0.8*window['innerHeight']);}}class E extends rt{['userView'];constructor(_0x49d963,_0x7ad83a,_0x55b2b6){super(_0x49d963);const _0x49e188=this['bindTemplate'];this['userView']=new ct(_0x49d963,_0x7ad83a);const _0x8bcad7={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x7ad83a['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x7ad83a['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x7ad83a['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x55b2b6&&(_0x8bcad7['tag']='button',_0x8bcad7['on']={'click':_0x49e188['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x8bcad7);}['focus'](){this['element']['focus']();}}class T extends _0x4259e0{['userView'];['markerView'];constructor(_0x1f2526,_0x1b3140,_0x24e596){super(_0x1f2526);const _0x4e0225=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x1f2526,_0x1b3140),this['markerView']=new at(_0x1f2526,_0x1b3140);const _0x2f9b79=new ot(_0x1f2526);_0x2f9b79['template']['tag']='span',_0x2f9b79['text']=_0x1b3140['name'];const _0x4bbf84={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x4e0225['to']('isFocusable',_0x276b5a=>!!_0x276b5a&&0x0),'aria-labelledby':_0x2f9b79['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x4e0225['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x4e0225['to']('hasTooltip',_0x3cf6f6=>!_0x3cf6f6),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x2f9b79]};_0x24e596&&(_0x4bbf84['tag']='button',_0x4bbf84['on']={'click':_0x4e0225['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x4bbf84);}}class at extends _0x4259e0{constructor(_0x1487c6,_0x27a118){super(_0x1487c6),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x27a118['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const D={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x258669{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x2fe870){super(_0x2fe870),this['context']['config']['define']('presenceList',D);const _0x2a4970=_0x2fe870['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x2a4970)throw new _0x431d3a('presencelist-collapseat-invalid-format',this);if(_0x2a4970<0x1)throw new _0x431d3a('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x277f11(),this['balloonPanelView']=new _0x1350d3(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0xf050be of this['_allConnectedUsers'])this['_handleUserAdd'](_0xf050be);this['listenTo'](this['_allConnectedUsers'],'add',(_0x37428f,_0x61948)=>{this['_handleUserAdd'](_0x61948);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x3e616d,_0x473d0d)=>{this['_handleUserRemove'](_0x473d0d);});}['_createView'](){const _0x16450d=this['context'],_0x610c64=new _(this['context']['locale']),_0x311da7=this['balloonPanelView'];if(!_0x35dd05(_0x16450d['config']['get']('presenceList.container')))throw new _0x431d3a('presencelist-missing-container',this);return _0x610c64['counterView']['bind']('usersCount')['to'](this),_0x610c64['bind']('isCollapsed')['to'](this,'usersCount',_0x24ff76=>{const {collapseAt:_0x3dd86a,displayMe:_0x9aec0b}=_0x16450d['config']['get']('presenceList'),_0x5bdbff=_0x24ff76>=_0x3dd86a;return _0x610c64['counterView']['isHidden']=!(0x1==_0x24ff76&&_0x9aec0b||_0x5bdbff),_0x5bdbff||this['hideDropdown'](),_0x5bdbff;}),_0x610c64['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x581e76=>{const _0x30111f=_0x16450d['config']['get']('presenceList'),_0x3ee0b6=new T(_0x16450d['locale'],_0x581e76,!!_0x30111f['onClick']);return _0x3ee0b6['bind']('hasTooltip')['to'](_0x610c64,'isCollapsed',_0x59c256=>!_0x59c256),_0x3ee0b6['bind']('isFocusable')['to'](_0x610c64,'isCollapsed',_0x1653aa=>!_0x1653aa),_0x30111f['onClick']&&this['listenTo'](_0x3ee0b6,'execute',()=>{this['view']['isCollapsed']||_0x30111f['onClick'](_0x581e76,_0x3ee0b6['element']);}),_0x3ee0b6;}),this['listenTo'](_0x610c64['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x610c64['inlineListView']['keystrokes']['set']('Enter',(_0x179f92,_0x1ec5c9)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x1ec5c9());}),_0x610c64['render'](),_0x311da7['render'](),_0x3b0cbd({'emitter':_0x610c64,'activator':()=>_0x311da7['isVisible'],'contextElements':[_0x311da7['element'],_0x610c64['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x16450d['config']['get']('presenceList.container')['appendChild'](_0x610c64['element']),this['_bodyCollection']=new _0x348542(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x610c64;}['_handleUserAdd'](_0x464998){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x464998['isMe'])return;const _0x3d6bce=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x3d6bce&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x2898df=_0x464998['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x464998,_0x2898df);}['_handleUserRemove'](_0x2a33e9){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x2a33e9['id'])&&(this['currentDisplayedUsers']['remove'](_0x2a33e9['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x152b3c of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x152b3c['id']))return void this['currentDisplayedUsers']['add'](_0x152b3c,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x358ddf=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new M(this['context']['locale'],!!_0x358ddf['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x2571be}=this['presenceDropdownView'];_0x2571be['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x47ce11=>{if(!_0x358ddf['displayMe']&&_0x47ce11['isMe'])return null;const _0x217879=new E(this['context']['locale'],_0x47ce11,!!_0x358ddf['onClick']);return _0x358ddf['onClick']&&this['listenTo'](_0x217879,'execute',()=>{_0x358ddf['onClick'](_0x47ce11,_0x217879['element']);}),_0x217879;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x2571be['focus'](),_0x2571be['checkIfScrollable']();const _0x29d01c=(_0x3fecba,_0x1e8586)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x1e8586();};_0x2571be['keystrokes']['set']('Esc',_0x29d01c),_0x2571be['keystrokes']['set']('Shift+Tab',_0x29d01c),_0x2571be['keystrokes']['set']('Tab',(_0x27f4b3,_0x3ac86d)=>{!function(_0x5739e9){const _0x587275=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x546ca3=>_0x546ca3+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x4e7eea=[...document['body']['querySelectorAll'](_0x587275)]['filter'](_0xa77475=>_0xa77475===document['activeElement']||_0xa77475['offsetWidth']+_0xa77475['offsetHeight']>0x0)['sort']((_0x5181f9,_0x259503)=>(_0x5181f9['tabIndex']||0x0)-(_0x259503['tabIndex']||0x0)),_0x4e3bfe=_0x4e7eea['indexOf'](_0x5739e9),_0x309bdf=_0x4e7eea[(_0x4e3bfe+0x1)%_0x4e7eea['length']];_0x309bdf&&_0x309bdf['focus']();}(this['view']['element']),this['hideDropdown'](),_0x3ac86d();}),_0x2571be['focusTracker']['add'](this['view']['element']),_0x2571be['focusTracker']['on']('change:isFocused',(_0x598d15,_0x21409c,_0x4133a1)=>{_0x4133a1||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 _0x258669{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 _0x33a461,Plugin as _0xc45049,PendingActions as _0x54a0be,Context as _0x35bf49}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0xfc40d0,CKEditorError as _0x18dc38,Collection as _0x330773,global as _0x3ee391,version as nt,uid as _0xb2b188,KeystrokeHandler as _0x26df46}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0xedf1a5,View as _0x3d8c1a,ListView as _0xd3dc2c,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x4f7ecf,clickOutsideHandler as _0x39189a,BodyCollection as _0x361caf}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x57fa0d,NoOperation as _0x30677b,InsertOperation as _0x48cd8e,MarkerOperation as _0x1944c9,RootAttributeOperation as _0x5e1d8f,transformSets as _0x21a970,OperationFactory as _0x20d8ce}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as lt,WEB_SOCKET_GATEWAY_STATES as _0x36fb79,CollaborativeEditingService as _0x23bfeb,User as dt,CommentsService as _0x1abf4b,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x4e2011,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x5986db}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x19da4d}from'lodash-es';class c extends _0x33a461{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
|
|
24
|
+
((()=>lt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0xedf1a5];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e453a){super(_0x3e453a),this['set']('state',_0x36fb79['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0xfc40d0);}['init'](){const _0x29b8c2=this['context'],_0x27726e=_0x29b8c2['plugins']['get']('CloudServices'),_0x110955=_0x29b8c2['plugins']['get'](_0xedf1a5);if(!_0x27726e['token'])throw new _0x18dc38('websocketgateway-missing-token',this);if(!_0x27726e['webSocketUrl'])throw new _0x18dc38('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'](_0x27726e['token'],_0x27726e['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0xda812d=>{if(this['connection']=_0xda812d,this['bind']('state')['to'](_0xda812d,'state',this,'_isBrowserOffline',(_0x51e944,_0x5ec3b9)=>('connected'!==_0x51e944&&(this['_shouldPluginsReconnect']=!0x0),_0x5ec3b9||_0x51e944!==_0x36fb79['CONNECTED']?_0x36fb79['DISCONNECTED']:this['state']==_0x36fb79['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x36fb79['CONNECTING']):_0x36fb79['CONNECTED'])),this['connection']['on']('error',(_0x268710,_0x264238)=>{if('limitExceeded'!==_0x264238['code'])throw console['error'](_0x264238),new _0x18dc38('cloudservices-init',null,{'originalError':_0x264238});_0x110955['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'});}),!_0xda812d['me'])return new Promise(_0x1ec67e=>_0xda812d['on']('change:me',_0x1ec67e));})['catch'](_0x10447b=>{throw console['error'](_0x10447b),new _0x18dc38('cloudservices-init',null,{'originalError':_0x10447b});});}['addToReconnectionStack'](_0x33e40e){if('function'!=typeof _0x33e40e['reconnect'])throw new _0x18dc38('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x33e40e))throw new _0x18dc38('websocketgateway-plugin-already-registered',this,{'name':_0x33e40e['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x33e40e);}['removeFromReconnectionStack'](_0x4edd63){this['_reconnectionStack']['delete'](_0x4edd63);}['isInReconnectionStack'](_0x592879){return this['_reconnectionStack']['has'](_0x592879);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x5b93be=>_0x5b93be['reconnect']())))['then'](()=>this['state']=_0x36fb79['CONNECTED'])['catch'](_0x4eec8f=>{throw console['error'](_0x4eec8f),new _0x18dc38('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x36fb79['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x33a461{['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,_0x4e2011];}constructor(_0x133044){super(_0x133044),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x330773(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x4e2011);}['init'](){const _0x3ecbd4=this['context']['plugins']['get'](c);this['listenTo'](_0x3ecbd4,'change:state',(_0x2dd79d,_0x79b58b,_0x4b31ed)=>{if('connected'!==_0x4b31ed)this['channelSessions']['forEach'](_0x168571=>_0x168571['clear']()),this['channelConnectedUsers']['forEach'](_0x541759=>_0x541759['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x2008d1,_0x240073]of this['_registeredSessions'])for(const _0x2a2cdb of _0x240073)this['_handleSessionAdd'](_0x2008d1,_0x2a2cdb);}}),this['_createUser'](_0x3ecbd4['connection']['me'],!0x0);}['register'](_0x2c968b,_0x82bc1){if(this['_registeredSessions']['has'](_0x2c968b))throw new _0x18dc38('sessions-register-already-registered',null,{'channelId':_0x2c968b});this['_registeredSessions']['set'](_0x2c968b,_0x82bc1),this['channelSessions']['set'](_0x2c968b,new _0x330773()),this['channelConnectedUsers']['set'](_0x2c968b,new _0x330773()),this['listenTo'](_0x82bc1,'add',(_0x4c6244,_0x37d24d)=>this['_handleSessionAdd'](_0x2c968b,_0x37d24d)),this['listenTo'](_0x82bc1,'remove',(_0x39c1af,_0x3a7ef1)=>this['_handleSessionRemove'](_0x2c968b,_0x3a7ef1));for(const _0x59e344 of _0x82bc1)this['_handleSessionAdd'](_0x2c968b,_0x59e344);}['unregister'](_0x1a3cf6){if(!this['_registeredSessions']['has'](_0x1a3cf6))throw new _0x18dc38('sessions-unregister-not-exist',null,{'channelId':_0x1a3cf6});const _0x32f280=this['_registeredSessions']['get'](_0x1a3cf6);this['stopListening'](_0x32f280);for(const _0x1e3375 of _0x32f280)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x1a3cf6,_0x1e3375);this['_registeredSessions']['delete'](_0x1a3cf6),this['channelSessions']['delete'](_0x1a3cf6),this['channelConnectedUsers']['delete'](_0x1a3cf6);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x27a175){for(const _0x33229c of this['channelSessions']['values']())for(const _0x1a2677 of _0x33229c)if(_0x1a2677['id']===_0x27a175)return _0x1a2677['user'];}['getUserSessions'](_0x1fb158,_0x3f5ba2){const _0x46390f=_0x3f5ba2?[this['channelSessions']['get'](_0x3f5ba2)]:this['channelSessions']['values'](),_0x546a66=new Set();for(const _0x30416f of _0x46390f)for(const _0x53b33b of _0x30416f)_0x53b33b['user']['id']===_0x1fb158['id']&&_0x546a66['add'](_0x53b33b['id']);return _0x546a66;}['getUserRole'](_0x50a0c8){for(const _0x1fd289 of this['channelSessions']['values']())for(const _0x366adf of _0x1fd289)if(_0x366adf['user']===_0x50a0c8)return _0x366adf['role'];}['_handleSessionAdd'](_0x5025f2,_0x41bd90){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x5f4dc4=_0x41bd90['user'],_0x25fb28=this['_users']['getUser'](_0x5f4dc4['id'])||this['_createUser'](_0x5f4dc4),_0x1ed0bd=Object['assign']({},_0x41bd90,{'user':_0x25fb28});this['channelSessions']['get'](_0x5025f2)['add'](_0x1ed0bd);const _0x25401e=this['channelConnectedUsers']['get'](_0x5025f2);_0x25401e['has'](_0x25fb28['id'])||_0x25401e['add'](_0x25fb28),this['allConnectedUsers']['has'](_0x25fb28['id'])||this['allConnectedUsers']['add'](_0x25fb28,_0x25fb28['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x5025f2,{'channelId':_0x5025f2,'session':_0x1ed0bd});}['_handleSessionRemove'](_0x2cfce8,_0x42eae4){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x16da30=this['channelConnectedUsers']['get'](_0x2cfce8),_0x392c0e=_0x42eae4['user'];_0x392c0e['id']&&(this['channelSessions']['get'](_0x2cfce8)['remove'](_0x42eae4['id']),_0x16da30['has'](_0x392c0e['id'])&&!this['getUserSessions'](_0x392c0e,_0x2cfce8)['size']&&_0x16da30['remove'](_0x392c0e['id']),this['allConnectedUsers']['get'](_0x392c0e['id'])&&!this['getUserSessions'](_0x392c0e)['size']&&this['allConnectedUsers']['remove'](_0x392c0e['id']));}['_createUser'](_0x13c863,_0x17ff08){const _0xee5510=this['_users']['addUser'](_0x13c863);return _0x17ff08&&this['_users']['defineMe'](_0x13c863['id']),_0xee5510['orderNumber']=this['_uniqueUsersCount']++,_0xee5510;}}class H extends _0xc45049{['_domEmitter']=new(_0xfc40d0())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x5f4421=this['editor'],_0x5059c1=_0x5f4421['plugins']['get'](i);_0x5f4421['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x84b627,{writer:_0x1f270d})=>function(_0x19ab77,_0x4e37d4,_0x21dfee,_0x4f0d57){const _0x246ec2=_0x19ab77['markerName']['split'](':')[0x2],_0x4daeb1=_0x21dfee['getUserBySessionId'](_0x246ec2);if(!_0x4daeb1||_0x246ec2===_0x21dfee['mySessionId'])return;if(!_0x4f0d57['model']['schema']['checkChild'](_0x19ab77['markerRange']['start'],'$text'))return;const _0x400dd9={'class':'ck-user__marker\x20'+_0x4daeb1['color']['getMarkerClass'](),'data-name':_0x4daeb1['name'],'data-session-id':_0x246ec2},_0x5d563b=_0x4f0d57['model']['markers']['get'](_0x19ab77['markerName']),_0x1aac7f=_0x5d563b['getStart'](),_0x17db4c=_0x1aac7f['nodeAfter'],_0x461618=_0x4f0d57['model']['schema'];if(_0x17db4c&&_0x461618['isObject'](_0x17db4c)&&_0x461618['isInline'](_0x17db4c)&&!_0x4f0d57['model']['markers']['get']('user:range:'+_0x246ec2)['getRange']()['isCollapsed'])return;const _0x57d537=_0x1aac7f['parent'];return _0x4f0d57['model']['schema']['isLimit'](_0x57d537)&&!_0x4f0d57['model']['hasContent'](_0x57d537)&&(_0x400dd9['contenteditable']=!0x1),function(_0x36518f,_0x25d57f,_0x2b5408){const _0x1f65ec=_0x36518f['createUIElement']('span',_0x25d57f);return _0x36518f['setCustomProperty']('userPositionMarker',!0x0,_0x1f65ec),_0x1f65ec['render']=function(_0x56a3f9){const _0x273cc9=this['toDomElement'](_0x56a3f9);return _0x273cc9['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>'+_0x2b5408['name']+'</span>',_0x273cc9['addEventListener']('mouseenter',()=>{_0x273cc9['classList']['add']('ck-user__marker_hovered');}),_0x273cc9['addEventListener']('mouseleave',()=>{_0x273cc9['classList']['remove']('ck-user__marker_hovered');}),_0x273cc9;},_0x1f65ec['isSimilar']=function(_0x187862){return!(!this['getCustomProperty']('userPositionMarker')||!_0x187862['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x187862['getAttribute']('data-session-id'));},_0x1f65ec;}(_0x4e37d4,_0x400dd9,_0x4daeb1);}(_0x84b627,_0x1f270d,_0x5059c1,_0x5f4421)}),_0x5f4421['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x2b5ab0=>function(_0x23d7fd,_0x4fdc24){const _0x494f3e=_0x23d7fd['markerName']['split'](':')[0x2];if(_0x494f3e===_0x4fdc24['mySessionId'])return null;const _0x507699=_0x4fdc24['getUserBySessionId'](_0x494f3e);if(!_0x507699)return{'id':_0x494f3e,'classes':[]};return{'id':_0x494f3e,'classes':['ck-user__selection',_0x507699['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x494f3e},'priority':0x7d0+_0x507699['orderNumber']};}(_0x2b5ab0,_0x5059c1)}),function(_0x13317f){const _0x56959f=_0x13317f['model'],_0x4f4889=new Map(),_0x44cc98=_0x13317f['plugins']['get'](i);_0x56959f['markers']['on']('update:user:range',(_0x3ca40a,_0x36f268,_0x3c7b1f,_0x2c717d)=>{if(!_0x2c717d&&_0x4f4889['get'](_0x36f268['name']))return _0x4f4889['get'](_0x36f268['name'])['detach'](),void _0x4f4889['delete'](_0x36f268['name']);const _0x2f4f9e=_0x36f268['name']['split'](':')[0x2];if(_0x2f4f9e===_0x44cc98['mySessionId'])return;const _0x1892b9='user:position:'+_0x2f4f9e;_0x56959f['markers']['has'](_0x1892b9)&&_0x13317f['editing']['reconvertMarker'](_0x1892b9),_0x36f268['on']('change:range',(_0x421f50,_0x3980d4,_0x492eec)=>{if('$graveyard'!=_0x3980d4['root']['rootName']&&'$graveyard'==_0x36f268['getRange']()['root']['rootName']&&!_0x4f4889['has'](_0x36f268['name'])){const _0x1c8423=_0x56959f['schema']['getNearestSelectionRange'](_0x492eec['deletionPosition']);if(_0x1c8423){const _0x28d61e=ht['fromRange'](_0x1c8423);_0x4f4889['set'](_0x36f268['name'],_0x28d61e),_0x28d61e['on']('change:range',(_0xbbae6c,_0x23d4b2,_0x373da7)=>{if('$graveyard'==_0x28d61e['root']['rootName']){const _0x2500b0=_0x56959f['schema']['getNearestSelectionRange'](_0x373da7['deletionPosition']);_0x2500b0?(_0x28d61e['start']=_0x2500b0['start'],_0x28d61e['end']=_0x2500b0['end']):(_0x4f4889['delete'](_0x36f268['name']),_0x28d61e['detach']());}});}}});}),_0x56959f['document']['on']('change',()=>{_0x4f4889['size']>0x0&&_0x56959f['enqueueChange']({'isUndoable':!0x1},_0x223495=>{for(const [_0x3e0a3c,_0x30099b]of _0x4f4889)'$graveyard'==_0x56959f['markers']['get'](_0x3e0a3c)['getRange']()['root']['rootName']&&(re(_0x3e0a3c['split'](':')[0x2],_0x30099b['toRange'](),_0x56959f,_0x223495),_0x30099b['detach']());_0x4f4889['clear']();});});}(_0x5f4421),this['_domEmitter']['listenTo'](_0x3ee391['document'],'keydown',(_0x574a2f,{key:_0x30f4c7})=>{'Escape'===_0x30f4c7&&function(_0x4b836d){_0x4b836d['editing']['view']['change'](_0x34eeef=>{for(const _0x4ab896 of _0x4b836d['model']['markers']){if(!_0x4ab896['name']['startsWith']('user:position'))continue;const _0x29a135=_0x4b836d['editing']['mapper']['markerNameToElements'](_0x4ab896['name']);if(_0x29a135){for(const _0x316ee8 of _0x29a135)_0x34eeef['removeClass']('ck-user__marker_hovered',_0x316ee8);}}});}(_0x5f4421);},{'useCapture':!0x0});}['afterInit'](){const _0x7bf6d7=this['editor'],_0x4c59c7=_0x7bf6d7['commands']['get']('undo');_0x4c59c7&&_0x7bf6d7['model']['on']('applyOperation',(_0x12a84c,_0x3a94f2)=>{const _0x3e03f3=_0x3a94f2[0x0];if('marker'!=_0x3e03f3['type']||!_0x3e03f3['name']['startsWith']('user:'))return;const _0x29c2ba=_0x3e03f3['batch'];_0x4c59c7['_createdBatches']['has'](_0x29c2ba)&&(_0x3e03f3['newRange']=_0x3e03f3['oldRange']?_0x7bf6d7['model']['createRange'](_0x3e03f3['oldRange']['start'],_0x3e03f3['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x48cdbd=this['editor'],_0x5d010c=_0x48cdbd['model']['document'],_0x9ced84=_0x48cdbd['plugins']['get'](i);_0x48cdbd['model']['enqueueChange']({'isUndoable':!0x1},_0x1556c2=>{const _0x1f333a='user:range:'+_0x9ced84['mySessionId'],_0x2eacbd='user:position:'+_0x9ced84['mySessionId'],_0x4f41b7=_0x48cdbd['model']['markers']['has'](_0x1f333a);_0x48cdbd['editing']['view']['hasDomSelection']?re(_0x9ced84['mySessionId'],_0x5d010c['selection']['getFirstRange'](),_0x48cdbd['model'],_0x1556c2):_0x4f41b7&&(_0x1556c2['removeMarker'](_0x1f333a),_0x1556c2['removeMarker'](_0x2eacbd));});}}function re(_0x54283a,_0xd412f5,_0x570300,_0x48aa6b){const _0x3f5d8c='user:range:'+_0x54283a,_0x175085='user:position:'+_0x54283a,_0x553285=_0xd412f5['getContainedElement']();let _0x2c6960=_0xd412f5['start'];_0x553285&&_0x553285['is']('element','tableCell')&&(_0x2c6960=function(_0xf248cd,_0x3a9f3b){for(const _0x176860 of _0xf248cd['getPositions']())if(_0x3a9f3b['schema']['checkChild'](_0x176860,'$text'))return _0x176860;}(_0xd412f5,_0x570300),_0xd412f5=_0x48aa6b['createRange'](_0x2c6960));const _0x1b968f=_0x48aa6b['createRange'](_0x2c6960);_0x570300['markers']['has'](_0x3f5d8c)?(_0x48aa6b['updateMarker'](_0x3f5d8c,{'range':_0xd412f5}),_0x48aa6b['updateMarker'](_0x175085,{'range':_0x1b968f})):(_0x48aa6b['addMarker'](_0x3f5d8c,{'range':_0xd412f5,'usingOperation':!0x0}),_0x48aa6b['addMarker'](_0x175085,{'range':_0x1b968f,'usingOperation':!0x0}));}function q(_0x3ad5db,_0x12b05f,_0x5a8e73){const _0x11b5c2=_0x3ad5db['t'],t=_0x3ad5db['t'];switch(_0x12b05f){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 _0x11b5c2({'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'},_0x5a8e73);default:return'';}}let K=0x1;class l extends _0xc45049{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
+
((()=>_0x23bfeb)());['_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,_0x54a0be,_0x4e2011,_0xedf1a5];}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 _0x4d5bed=this['serverHistory']['getOperations']();for(let _0x218ed4=_0x4d5bed['length']-0x1;_0x218ed4>=0x0;_0x218ed4--){const _0x53825b=_0x4d5bed[_0x218ed4];if(!this['_disconnectionOperations']['has'](_0x53825b))return _0x53825b['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x3ed08d){if(super(_0x3ed08d),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x57fa0d(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x18dc38('collaboration-missing-channelid',this);const _0x267445=_0x3ed08d['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x267445,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x5986db(),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 _0x1b0285=this['editor'],_0x3acaa8=_0x1b0285['plugins']['get'](_0x4e2011),_0x2758c1=_0x1b0285['plugins']['get'](c);this['listenTo'](_0x3acaa8,'getOperationAuthor',(_0xdcd464,_0x48509b)=>{const _0x225419=_0x48509b[0x0];_0x225419['_authorId']&&(_0xdcd464['return']=_0x3acaa8['getUser'](_0x225419['_authorId']),_0xdcd464['stop']()),null===_0x225419['_authorId']&&(_0xdcd464['return']=null,_0xdcd464['stop']());},{'priority':'high'}),this['listenTo'](_0x1b0285['model']['document']['selection'],'change:range',(_0x15c5b6,_0x5b1cce)=>{_0x5b1cce['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x1b0285['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x1b0285['model']['on']('applyOperation',(_0x7fd6da,_0x499925)=>{const _0x359a60=_0x499925[0x0];_0x359a60['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x359a60),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x2758c1,'state',this,'_hasSynchronizationProblem',(_0xfdf427,_0x35d566)=>'connected'===_0xfdf427&&!_0x35d566),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x1b0285['disableReadOnlyMode']('rtc-offline'):_0x1b0285['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x1b0285['disableReadOnlyMode']('rtc-offline'):_0x1b0285['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x2527e7=this['editor']['plugins']['get'](i),_0x5abc66=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x2527e7['unregister'](this['_channelId']);const _0x5b8ffd=await this['_service']['reconnect'](_0x5abc66['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x5b8ffd)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x2e5b7a=await this['_service']['getConnectedSessions']();_0x2527e7['register'](this['_channelId'],_0x2e5b7a),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x154477){if(function(_0xf22baf){return'404'===_0xf22baf['code'];}(_0x154477)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x571716){return'409'===_0x571716['code'];}(_0x154477)){const _0x55d989=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'](_0x55d989);}else{if(!(_0x154477 instanceof J))throw _0x154477;this['_handleReconnectionError']();}}}}['destroy'](){const _0x478407=this['editor']['plugins']['get'](c),_0x605223=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x605223['channelSessions']['has'](this['_channelId'])&&_0x605223['unregister'](this['_channelId']),_0x478407['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x2ee9f6){if(this['sessionId']!==_0x2ee9f6['sessionId']&&this['_lastSyncedOperationId']!==_0x2ee9f6['lastOperationId'])throw new J();return this['sessionId']=_0x2ee9f6['sessionId'],this['_handleServerResponse']([],{..._0x2ee9f6,'wereChangesApplied':!0x1,'data':_0x2ee9f6['data']},'reconnect');}async['_connectService'](_0x2b449c,_0x29ea1f=!0x1){const {connection:_0xdcd12b}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0xdcd12b,this['_channelId'])['then'](_0x394187=>this['_initSessionsHandling'](_0x394187))['catch'](_0x14800d=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x14800d);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0xfe0bfb,_0x3f176f)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x3f176f);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x5a071e=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x2b449c);this['_isPendingUpdate']=!0x0;const _0x2dca34=await this['_service']['connect'](_0xdcd12b,this['_compressOperations'](_0x2b449c),_0x5a071e);if(this['sessionId']=_0x2dca34['sessionId'],_0x29ea1f){if(!_0x2dca34['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x2dca34['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x2b449c,_0x2dca34,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x2dca34,_0x2b449c);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x33f127=this['editor']['plugins']['get'](i),_0x16b4f8=this['editor']['plugins']['get'](H),_0x7af235=_0x33f127['channelSessions']['get'](this['_channelId']);_0x7af235&&_0x7af235['length']>0x1?_0x16b4f8['createUserMarkerOperations']():this['listenTo'](_0x33f127,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x33f127['channelSessions']['get'](this['_channelId'])['length']&&_0x16b4f8['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x1ae850,_0x5a5864,_0x5d2cf2,_0x1f3ab5){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x5a5864){const _0x4523ba=this['_decompressOperations'](_0x5d2cf2,_0x1f3ab5);await this['_fetchMissingUsers'](_0x4523ba),this['_handleExternalOperations'](_0x4523ba,_0x5a5864,_0x5d2cf2['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x140da0}=this['editor'];let _0x5d5692;try{_0x5d5692=await this['_service']['getDocumentDetails']();}catch(_0x41f3a7){const _0x2c654b=q(_0x140da0,'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'](_0x2c654b);}const _0x4dbbb2=_0x5d5692['currentDocumentSession']||_0x5d5692['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x4dbbb2['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x22c08f=q(_0x140da0,'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'](_0x22c08f);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x53a2aa){const _0x58acc2=this['editor']['plugins']['get'](i);this['listenTo'](_0x58acc2,'sessionAdd:'+this['_channelId'],(_0x3ab013,{session:_0x5c4ebe})=>{if(_0x5c4ebe['id']===_0x58acc2['mySessionId']){_0x3ab013['off']();const _0x534558=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0xee0c55=_0x5c4ebe['permissions'];_0x534558&&_0x534558['isEnabled']&&(_0xee0c55=_0xee0c55['filter'](_0x305f71=>'document:write'!==_0x305f71)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0xee0c55,this['_channelId']);}}),_0x58acc2['register'](this['_channelId'],_0x53a2aa);}['_initThrowingOnDataSet'](){const _0x385182=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x169d4d)=>{if(!_0x169d4d[_0x169d4d['length']-0x1]['suppressErrorInCollaboration'])throw new _0x18dc38('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x385182['apply'](this['editor']['data'],_0x169d4d);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x85df0a,[_0x8faeed])=>{if(this['_document']['version'])throw new _0x18dc38('realtimecollaborationclient-init-document-already-initialized',this);_0x85df0a['stop'](),this['_setPendingAction']();const _0x272a10=this['editor']['config']['get']('rootsAttributes'),_0x584216=this['_getOperationsFromInitData'](_0x8faeed,_0x272a10);0x0==_0x584216['length']&&_0x584216['push'](new _0x30677b(0x0)),_0x85df0a['return']=this['_connectService'](_0x584216)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x1ee37=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x1ee37))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x590a63,[_0x49de83,_0x354416])=>{_0x590a63['stop']();const _0x5d030e=this['editor']['model']['document']['getRoot'](_0x49de83);if(!this['_knownRootNames']['has'](_0x49de83)){const _0x49b023=_0x354416&&_0x354416['data']?_0x354416['data']:'',_0x281b01=_0x354416&&_0x354416['attributes']?_0x354416['attributes']:{};await this['_loadRoot'](_0x49de83,_0x49b023,_0x281b01);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x5d030e['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x5d030e);});},{'priority':'high'});}async['_fetchMissingUsers'](_0xcb935c){const _0x1d2b0f=this['editor']['plugins']['get'](_0x4e2011),{connection:_0x3ff18e}=this['editor']['plugins']['get'](c),_0x194276=new Set();for(const _0x2fa796 of _0xcb935c){const _0x984863=_0x2fa796['_authorId'];_0x984863&&!_0x1d2b0f['getUser'](_0x984863)&&_0x194276['add'](_0x984863);}if(0x0===_0x194276['size'])return;const _0x25cfc8=await dt['getMany'](_0x3ff18e,Array['from'](_0x194276));for(const _0x4b60f7 of _0x25cfc8)_0x1d2b0f['getUser'](_0x4b60f7['id'])||_0x1d2b0f['addUser'](_0x4b60f7);}['_getOperationsFromInitData'](_0x528c28,_0x5ded76={}){const _0x56cb41=this['editor']['model'],_0x3eccf5=[];let _0x1f4e0b=0x0;const _0x3891cf='string'==typeof _0x528c28?{'main':_0x528c28}:_0x528c28;for(const _0x352d53 of Object['keys'](_0x3891cf)){if(!this['_document']['roots']['has'](_0x352d53))throw new _0x18dc38('realtimecollaborationclient-init-non-existent-root',this);const _0x2d0ea8=this['editor']['data']['parse'](_0x3891cf[_0x352d53]),_0x4c0f0d=this['_document']['getRoot'](_0x352d53),_0x45b829=new _0x48cd8e(_0x56cb41['createPositionAt'](_0x4c0f0d,0x0),_0x2d0ea8,_0x1f4e0b++);_0x3eccf5['push'](_0x45b829);for(const [_0x293ab9,_0x19c60c]of _0x2d0ea8['markers']){const _0x585351=_0x56cb41['createRange'](_0x56cb41['createPositionFromPath'](_0x4c0f0d,_0x19c60c['start']['path']['slice']()),_0x56cb41['createPositionFromPath'](_0x4c0f0d,_0x19c60c['end']['path']['slice']())),_0x744f90=new _0x1944c9(_0x293ab9,null,_0x585351,_0x56cb41['markers'],!0x0,_0x1f4e0b++);_0x3eccf5['push'](_0x744f90);}}if(_0x5ded76)for(const [_0x3d2193,_0x13ef01]of Object['entries'](_0x5ded76)){const _0x38af56=_0x56cb41['document']['getRoot'](_0x3d2193);if(!_0x38af56)throw new _0x18dc38('multi-root-editor-root-attributes-no-root',null);for(const [_0x5c8871,_0x4a55da]of Object['entries'](_0x13ef01))if(null!==_0x4a55da){const _0x439057=new _0x5e1d8f(_0x38af56,_0x5c8871,null,_0x4a55da,_0x1f4e0b++);_0x3eccf5['push'](_0x439057);}}return _0x3eccf5;}async['_loadRoot'](_0x22edf0,_0x312798,_0x9b20b3){this['_getOperationsFromInitData']({[_0x22edf0]:_0x312798},{[_0x22edf0]:_0x9b20b3})['forEach']((_0x361082,_0x55e720)=>{_0x361082['baseVersion']=this['_document']['version']+_0x55e720,_0x361082['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x361082);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x4c68d0,_0x54234b){let _0x1141d7;this['_offset']=_0x4c68d0['offset'];const _0x1b10f5=_0x4c68d0['wereChangesApplied']&&!_0x4c68d0['initData'],_0x4edba5=_0x1b10f5?0x0:_0x4c68d0['data']['baseVersion'];if(_0x54234b['forEach'](_0x466ee1=>{_0x466ee1['_isInit']=!0x0,_0x466ee1['createdAt']=_0x4c68d0['sessionCreatedAt'],_0x466ee1['_authorId']=null;}),_0x1b10f5)_0x1141d7=_0x54234b,this['_applyOperationsSet'](_0x1141d7,_0x1b10f5);else{if(_0x4c68d0['initData']){const _0x11f4c8=this['_getOperationsFromInitData'](_0x4c68d0['initData']);this['_document']['history']['version']=-_0x11f4c8['length'],_0x11f4c8['forEach'](_0x393f04=>{_0x393f04['baseVersion']-=_0x11f4c8['length'],_0x393f04['createdAt']=_0x4c68d0['sessionCreatedAt'],_0x393f04['_isInit']=!0x0,_0x393f04['_authorId']=null;}),this['_applyOperationsSet'](_0x11f4c8,!0x0),this['serverHistory']['version']=-_0x11f4c8['length']+this['_offset'],this['_updateServerHistory'](_0x11f4c8);}this['_document']['history']['version']=_0x4edba5,_0x1141d7=this['_decompressOperations'](_0x4c68d0['data'],_0x4c68d0['metadata']),await this['_fetchMissingUsers'](_0x1141d7),this['_applyOperationsSet'](_0x1141d7,_0x1b10f5);}_0x4c68d0['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x1141d7,_0x4c68d0['lastOperationId']),this['_lastSyncedOperationId']=_0x4c68d0['lastOperationId']),this['serverHistory']['version']=_0x4edba5+this['_offset'],this['_updateServerHistory'](_0x1141d7),_0x54234b['filter'](_0x2bb17d=>{const _0x1ab67f=this['_getAffectedRoot'](_0x2bb17d);return _0x1ab67f&&!this['_knownRootNames']['has'](_0x1ab67f);})['forEach']((_0x1b7e6e,_0x263a63)=>{_0x1b7e6e['baseVersion']=this['_document']['version']+_0x263a63,this['_saveOperationInBuffer'](_0x1b7e6e);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x2c95be,_0x31a5ea){throw this['_isPendingUpdate']=!0x0,_0x31a5ea&&console['error'](_0x31a5ea),new _0x18dc38(_0x2c95be,this['editor']);}['_saveOperationInBuffer'](_0x1f7868){this['_knownOperations']['has'](_0x1f7868)||(this['_knownOperations']['add'](_0x1f7868),this['_bufferedOperations']['push'](_0x1f7868),this['_pendingAction']||'marker'==_0x1f7868['type']&&!_0x1f7868['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0xa5a062=!0x1){!_0xa5a062&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x3d892e=>{_0x3d892e&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0xa675bc=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x195e98){return _0x195e98['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x195e98['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x195e98['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0xa675bc))throw _0xa675bc;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x49ad3d=>{this['on']('change:_isPendingUpdate',()=>{_0x49ad3d();});});}async['_sendBufferedOperations'](){const _0x20e41f=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x20e41f['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x53ac06=[...this['_bufferedOperations']];for(const _0x181fcf of _0x53ac06)_0x181fcf['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x181fcf);const _0x40c073=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x53ac06),_0x190a0a=K++,_0x1f8497=this['_compressOperations'](_0x53ac06),_0x457879=await this['_service']['sendOperations'](_0x1f8497,_0x1f8497['baseVersion'],_0x40c073);try{return await this['_handleServerResponse'](_0x53ac06,_0x457879,_0x190a0a);}catch(_0x755f65){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x755f65);}}async['_handleServerResponse'](_0x4f5005,_0x2793ab,_0x5455e7){if('error'in _0x2793ab)throw _0x2793ab['error'];let _0x40d95f=!0x1;if(_0x2793ab['wereChangesApplied']){_0x2793ab['lastOperationId']&&(this['_lastSyncedOperationId']=_0x2793ab['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x305623=>!_0x4f5005['includes'](_0x305623));for(const _0xb9402a of _0x4f5005)_0xb9402a['createdAt']='lastOperationAcceptedAt'in _0x2793ab&&_0x2793ab['lastOperationAcceptedAt']||void 0x0;Q(_0x4f5005,_0x2793ab['version']-_0x4f5005['length']),this['_updateServerHistory'](_0x4f5005);const _0xbd5213=_0x4f5005['filter'](_0x5b1c93=>{if(!_0x5b1c93['_isInit'])return!0x1;const _0x4db620=this['_getAffectedRoot'](_0x5b1c93);return _0x4db620&&!this['_knownRootNames']['has'](_0x4db620);});Q(_0xbd5213,this['_document']['version']),this['_applyOperationsSet'](_0xbd5213),_0x40d95f=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x4045eb=this['_decompressOperations'](_0x2793ab['data'],_0x2793ab['metadata'])['filter'](_0x398c78=>_0x398c78['baseVersion']>=this['_lastServerVersion']);_0x4045eb['forEach'](_0x5bac63=>this['_addKnownRoot'](_0x5bac63)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x533b49=>!_0x533b49['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x533b49))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x4045eb),_0x40d95f=this['_handleExternalOperations'](_0x4045eb,_0x2793ab['version'],_0x2793ab['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x40d95f?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0xf8b4d0,_0x4165e5,_0x14745f){try{const _0x7d67d3={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x5b1ee0,operationsB:_0x467950,originalOperations:_0x30b42d}=_0x21a970(_0xf8b4d0,this['_bufferedOperations'],_0x7d67d3);Q(_0x5b1ee0,this['_document']['version']),Q(_0x467950,_0x4165e5);for(const _0x10d8e1 of _0x5b1ee0){const _0x583587=_0x30b42d['get'](_0x10d8e1);_0x10d8e1['_authorId']=_0x583587?_0x583587['_authorId']:null;}_0x14745f&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0xf8b4d0,_0x14745f),this['_lastSyncedOperationId']=_0x14745f),this['_bufferedOperations']=[..._0x467950],this['_applyOperationsSet'](_0x5b1ee0),this['_updateServerHistory'](_0xf8b4d0);}catch(_0x1797d1){return console['error'](_0x1797d1),!0x1;}return!0x0;}['_applyOperationsSet'](_0x4987eb,_0xc46b58=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x5c3918=>{for(const _0x22cb5c of _0x4987eb)this['_knownOperations']['add'](_0x22cb5c),this['_addKnownRoot'](_0x22cb5c),_0x5c3918['batch']['addOperation'](_0x22cb5c),this['editor']['model']['applyOperation'](_0x22cb5c);});}['_addKnownRoot'](_0x12e8d4){const _0x5dc05b=this['_getAffectedRoot'](_0x12e8d4);_0x5dc05b&&this['_knownRootNames']['add'](_0x5dc05b);}['_getAffectedRoot'](_0xec7dfa){let _0x32bf9a,_0x509081;switch(_0xec7dfa['type']){case'insert':_0x32bf9a=_0xec7dfa['position']['root'];break;case'marker':if(_0x509081=_0xec7dfa['newRange'],!_0x509081)return null;_0x32bf9a=_0x509081['root'];break;case'addRootAttribute':_0x32bf9a=_0xec7dfa['root'];break;case'addRoot':_0x32bf9a=_0xec7dfa['affectedSelectable'];break;case'move':_0x32bf9a=_0xec7dfa['targetPosition']['root'];break;default:return null;}return _0x32bf9a['rootName'];}['_updateServerHistory'](_0x977311){_0x977311['forEach'](_0x32a812=>{const _0xc76034=_0x32a812['clone']();_0xc76034['_authorId']=_0x32a812['_authorId'],_0xc76034['_isInit']=!!_0x32a812['_isInit'],_0xc76034['createdAt']=_0x32a812['createdAt'],_0xc76034['baseVersion']+=this['_offset'],_0x32a812['_isDisconnection']&&this['_disconnectionOperations']['add'](_0xc76034),this['serverHistory']['addOperation'](_0xc76034);});}['_handleReconnectionError'](_0x3ead13){const _0x42ae9d=this['editor']['plugins']['get']('Notification'),_0x1b8e41=this['editor']['locale'];_0x3ead13||(_0x3ead13=q(_0x1b8e41,'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.')),_0x42ae9d['showWarning'](_0x3ead13,{'title':q(_0x1b8e41,'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'](_0x54a0be)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x54a0be)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x24f6ff){const _0x8295d8=_0x24f6ff['map'](_0x5cc63e=>_0x5cc63e['toJSON']());return this['_compressor']['compress'](_0x8295d8);}['_decompressOperations'](_0x3ac9fc,_0x218a11){return this['_compressor']['decompress'](_0x3ac9fc)['map']((_0x4d5c68,_0x517bef)=>{const _0x9e43ca='init'==_0x218a11[_0x517bef]['type'];if('InsertOperation'==_0x4d5c68['__className']){const _0x29985e=_0x4d5c68['position']['root'];!this['_document']['getRoot'](_0x29985e)&&(this['_document']['createRoot']('$root',_0x29985e)['_isAttached']=!0x1);}const _0x181071=_0x20d8ce['fromJSON'](_0x4d5c68,this['_document']);return _0x181071['wasUndone']=_0x4d5c68['wasUndone'],_0x181071['_isInit']=_0x9e43ca,_0x181071['_authorId']=_0x9e43ca?null:_0x218a11[_0x517bef]['userId'],_0x181071['_isDisconnection']='cs:removeUser'===_0x218a11[_0x517bef]['type'],_0x181071['createdAt']=_0x218a11[_0x517bef]['createdAt'],_0x181071;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x199db6=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x199db6&&_0x199db6['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x1ca687,_0x2d7d86){for(const _0x58c24b of _0x1ca687)_0x58c24b['baseVersion']=_0x2d7d86++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x5e1575){this['_ignoredOperations']=_0x5e1575,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x54348f){let _0x91b5d9=_0x54348f['length'];for(;_0x91b5d9--;){const _0x139aae=_0x54348f[_0x91b5d9];if(!this['_ignoredOperations']['has'](_0x139aae)){if(!this['_operationToId']['has'](_0x139aae)){const _0x4a5e69=_0xb2b188()['slice'](0x1,0x12);this['_operationToId']['set'](_0x139aae,_0x4a5e69);}return this['_operationToId']['get'](_0x139aae);}}}['setIdForTheLastOperation'](_0x2906d3,_0x40c188){if(!_0x40c188)return;let _0x5966c2=_0x2906d3['length'];for(;_0x5966c2--;){const _0xa243c3=_0x2906d3[_0x5966c2];this['_ignoredOperations']['has'](_0xa243c3)||this['_operationToId']['set'](_0xa243c3,_0x40c188);}}}class n extends _0xc45049{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x33a461{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>_0x1abf4b)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x4e2011];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x181adb){super(_0x181adb),this['_services']=new Map();}async['init'](){const _0x5abc3f=this['context'],_0x256ace=_0x5abc3f['plugins']['get']('CommentsRepository');if(_0x5abc3f['plugins']['get'](c)['addToReconnectionStack'](this),_0x256ace['adapter']={'addCommentThread':async({channelId:_0x4839eb,threadId:_0x4ea0ae,comments:_0x43c9ce,resolvedAt:_0xc7510a,resolvedBy:_0x3482c7,context:_0x52f025,attributes:_0x58bc4d})=>{const _0x1a4843=await this['_getService'](_0x4839eb)['addCommentThread']({'commentThreadId':_0x4ea0ae,'comments':_0x43c9ce['map'](_0x1804ef=>function(_0x2f60fa,_0xff2986,_0x31778f){return{'commentThreadId':_0x31778f,'commentId':_0x2f60fa['commentId'],'userId':_0x2f60fa['authorId'],'content':_0x2f60fa['content'],'documentId':_0xff2986,'createdAt':_0x2f60fa['createdAt'],'attributes':_0x2f60fa['attributes']||{}};}(_0x1804ef,_0x4839eb,_0x4ea0ae)),'resolvedAt':_0xc7510a,'resolvedBy':_0x3482c7,'context':_0x52f025,'attributes':_0x58bc4d})['catch'](ut);return{'threadId':_0x1a4843['commentThreadId'],'comments':_0x1a4843['comments']};},'getCommentThread':async({channelId:_0x10bb44,threadId:_0x5ae95f})=>{const _0x484a31=await this['_getService'](_0x10bb44)['getCommentThread'](_0x5ae95f)['catch'](ut);return _0x484a31['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x484a31]),{'threadId':_0x484a31['commentThreadId'],'comments':_0x484a31['comments']['map'](S),'context':_0x484a31['context'],'resolvedAt':_0x484a31['resolvedAt'],'resolvedBy':_0x484a31['resolvedBy'],'attributes':_0x484a31['attributes']||{}});},'updateCommentThread':async({channelId:_0xae948c,threadId:_0x3c78c6,context:_0x424b39,unlinkedAt:_0x479537,attributes:_0x4ec705})=>this['_getService'](_0xae948c)['updateCommentThread']({'commentThreadId':_0x3c78c6,'context':_0x424b39,'attributes':_0x4ec705,'unlinkedAt':_0x479537})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0xc43c78,threadId:_0x74d9f})=>{const _0x2e464d=await this['_getService'](_0xc43c78)['resolveCommentThread'](_0x74d9f)['catch'](B)['catch'](ut);return{'threadId':_0x2e464d['commentThreadId'],'resolvedAt':_0x2e464d['resolvedAt'],'resolvedBy':_0x2e464d['resolvedBy']};},'reopenCommentThread':async({channelId:_0x28b825,threadId:_0x4e7997})=>this['_getService'](_0x28b825)['reopenCommentThread'](_0x4e7997)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x5e3708,threadId:_0x16f794})=>this['_getService'](_0x5e3708)['removeCommentThread'](_0x16f794)['catch'](B)['catch'](ut),'addComment':({channelId:_0x3372c6,threadId:_0x1b2b0c,commentId:_0x4e2ff8,content:_0x4861a6,attributes:_0x317245})=>this['_getService'](_0x3372c6)['addComment'](_0x1b2b0c,_0x4e2ff8,_0x4861a6,_0x317245)['catch'](ut),'updateComment':({channelId:_0x1a42b4,threadId:_0x42ff2d,commentId:_0x3772b9,content:_0x5ce863,attributes:_0x50888b})=>this['_getService'](_0x1a42b4)['updateComment'](_0x42ff2d,_0x3772b9,_0x5ce863,_0x50888b)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x5222cb,threadId:_0x5d0bb1,commentId:_0x52c08d})=>this['_getService'](_0x5222cb)['removeComment'](_0x5d0bb1,_0x52c08d)['catch'](B)['catch'](ut)},_0x5abc3f instanceof _0x35bf49){const _0x1e3524=_0x5abc3f['config']['get']('collaboration.channelId'),_0x355661=_0x5abc3f['plugins']['get'](i);await this['_setUpService'](_0x1e3524);const _0x568f35=await this['_services']['get'](_0x1e3524)['getConnectedSessions']();this['listenTo'](_0x355661,'sessionAdd:'+_0x1e3524,(_0x1323c2,{session:_0x262664})=>{_0x262664['id']===_0x355661['mySessionId']&&(_0x1323c2['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x262664['permissions'],_0x1e3524));}),_0x355661['register'](_0x1e3524,_0x568f35);}}async['_setUpService'](_0x18603c){if(this['_services']['has'](_0x18603c))throw new _0x18dc38('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x18603c});const _0x4f2d28=this['context']['plugins']['get']('CommentsRepository'),_0x1f1e09=new a['CommentsService'](_0x18603c);this['_services']['set'](_0x18603c,_0x1f1e09),this['listenTo'](_0x1f1e09,'commentThreadAdded',(_0xcfa20c,_0x1ed792)=>{const {commentThreadId:_0x251b61,documentId:_0x73b69b,context:_0x3b8d66,attributes:_0x12eab1,resolvedAt:_0x5dce68,resolvedBy:_0x508cf6,comments:_0x3d6cde}=_0x1ed792;_0x4f2d28['getCommentThread'](_0x251b61)||_0x4f2d28['addCommentThread']({'threadId':_0x251b61,'channelId':_0x73b69b,'comments':_0x3d6cde?_0x3d6cde['map'](S):[],'context':_0x3b8d66,'attributes':_0x12eab1,'resolvedAt':_0x5dce68,'resolvedBy':_0x508cf6,'isFromAdapter':!0x0});}),this['listenTo'](_0x1f1e09,'commentThreadUpdated',(_0x34e4c0,{commentThreadId:_0x3ea2ff,documentId:_0x2d2dbc,context:_0x3e5701,unlinkedAt:_0x5d0a97,attributes:_0x37a009})=>{_0x4f2d28['getCommentThread'](_0x3ea2ff)&&_0x4f2d28['updateCommentThread']({'threadId':_0x3ea2ff,'channelId':_0x2d2dbc,'context':_0x3e5701,'unlinkedAt':_0x5d0a97,'attributes':_0x37a009,'isFromAdapter':!0x0});}),this['listenTo'](_0x1f1e09,'commentThreadResolved',(_0x175c56,{commentThreadId:_0x1cc4f2,resolvedBy:_0x515312,resolvedAt:_0x47ac2b})=>{const _0x52378f=_0x4f2d28['getCommentThread'](_0x1cc4f2);_0x52378f&&_0x52378f['resolve']({'resolvedBy':_0x515312,'resolvedAt':_0x47ac2b,'isFromAdapter':!0x0});}),this['listenTo'](_0x1f1e09,'commentThreadReopened',(_0x1cab2b,{commentThreadId:_0x21323b})=>{const _0x5a6d59=_0x4f2d28['getCommentThread'](_0x21323b);_0x5a6d59&&_0x5a6d59['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x1f1e09,'commentThreadRemoved',(_0x465c5d,{commentThreadId:_0x3e28a7})=>{const _0x4bfe61=_0x4f2d28['getCommentThread'](_0x3e28a7);_0x4bfe61&&_0x4bfe61['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x1f1e09,'commentAdded',(_0x18b88a,_0x23abf4)=>{const _0x291d4d=_0x23abf4['commentThreadId'],_0x3bd3b5=_0x4f2d28['getCommentThread'](_0x291d4d);_0x3bd3b5&&_0x3bd3b5['addComment']({...S(_0x23abf4),'isFromAdapter':!0x0});}),this['listenTo'](_0x1f1e09,'commentUpdated',(_0x3ce047,{commentThreadId:_0xb5d5f3,commentId:_0x1461f0,content:_0x149a88,attributes:_0x345688})=>{const _0x162256=_0x4f2d28['getCommentThread'](_0xb5d5f3);if(_0x162256){const _0x123ba8=_0x162256['getComment'](_0x1461f0);_0x123ba8&&_0x123ba8['update']({'content':_0x149a88,'attributes':_0x345688,'isFromAdapter':!0x0});}}),this['listenTo'](_0x1f1e09,'commentRemoved',(_0x2e9a04,{commentThreadId:_0x54afa8,commentId:_0x4e8abf})=>{const _0x42e019=_0x4f2d28['getCommentThread'](_0x54afa8);if(_0x42e019){const _0x360dbe=_0x42e019['getComment'](_0x4e8abf);_0x360dbe&&_0x360dbe['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x18603c);}['destroy'](){if(this['context']instanceof _0x35bf49){const _0x484504=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x484504);}}['_terminateService'](_0x507bf3){if(!this['_services']['has'](_0x507bf3))throw new _0x18dc38('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x507bf3});this['_getService'](_0x507bf3)['disconnect'](),this['_services']['delete'](_0x507bf3);}async['reconnect'](){for(const _0x46d20e of this['_services']['keys']())await this['_connectService'](_0x46d20e);if(this['context']instanceof _0x35bf49){const _0x422d1b=this['context']['config']['get']('collaboration.channelId'),_0x86be32=this['context']['plugins']['get'](i);_0x86be32['unregister'](_0x422d1b);const _0x257c6f=await this['_services']['get'](_0x422d1b)['getConnectedSessions']();_0x86be32['register'](_0x422d1b,_0x257c6f);}}async['_connectService'](_0x25a849){const {connection:_0x55a1c4}=this['context']['plugins']['get'](c),_0x5a3b3d=this['context']['plugins']['get']('CommentsRepository'),_0x1d3c62=this['_services']['get'](_0x25a849),_0xe6fbba=await _0x1d3c62['connect'](_0x55a1c4);await this['_fetchMissingUsersForThreads'](_0xe6fbba);const _0x90d79d=new Set(Array['from'](_0x5a3b3d['getCommentThreads']({'channelId':_0x25a849}),_0x241153=>_0x241153['id']));for(const _0x4361bb of _0xe6fbba)_0x4361bb['deletedAt']||_0x90d79d['delete'](_0x4361bb['commentThreadId']);for(const _0xb03200 of _0x90d79d)_0x5a3b3d['getCommentThread'](_0xb03200)['remove']({'isFromAdapter':!0x0});for(const _0xb844cc of _0xe6fbba){let _0x18283e=_0x5a3b3d['getCommentThread'](_0xb844cc['commentThreadId']);const {commentThreadId:_0x3bb0fd,context:_0x1b004d,attributes:_0x43f964,resolvedBy:_0x1eb91d,resolvedAt:_0x5dae2b,unlinkedAt:_0x3197d0,deletedAt:_0x5e1a03}=_0xb844cc;if(_0x5e1a03)continue;_0x18283e||(_0x18283e=_0x5a3b3d['addCommentThread']({'channelId':_0x25a849,'threadId':_0x3bb0fd,'context':_0x1b004d,'attributes':_0x43f964||{},'resolvedBy':_0x1eb91d,'resolvedAt':_0x5dae2b,'unlinkedAt':_0x3197d0,'isFromAdapter':!0x0}));const _0xc34807=new Set(Array['from'](_0x18283e['comments'],_0x4ec709=>_0x4ec709['id']));for(const _0x36cf21 of _0xb844cc['comments'])_0xc34807['delete'](_0x36cf21['commentId']);for(const _0xf838b6 of _0xc34807)_0x18283e['getComment'](_0xf838b6)['remove']({'isFromAdapter':!0x0});for(const _0x495a57 of _0xb844cc['comments']){const _0x1206ed=_0x18283e['getComment'](_0x495a57['commentId']);_0x1206ed?_0x1206ed['content']!==_0x495a57['content']&&_0x1206ed['update']({'content':_0x495a57['content'],'isFromAdapter':!0x0}):_0x18283e['addComment'](Object['assign'](S(_0x495a57),{'isFromAdapter':!0x0}));}}}['_getService'](_0x50374d){if(!this['_services']['has'](_0x50374d))throw new _0x18dc38('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x50374d});return this['_services']['get'](_0x50374d);}async['_fetchMissingUsersForThreads'](_0x2f6515){const _0x565910=this['context']['plugins']['get'](_0x4e2011),{connection:_0x3735ad}=this['context']['plugins']['get'](c),_0x452a3d=new Set();for(const {resolvedBy:_0x476643,comments:_0x73150d}of _0x2f6515){_0x476643&&!_0x565910['getUser'](_0x476643)&&_0x452a3d['add'](_0x476643);for(const {userId:_0x49caca}of _0x73150d)_0x565910['getUser'](_0x49caca)||_0x452a3d['add'](_0x49caca);}if(0x0===_0x452a3d['size'])return;const _0x50efd7=await dt['getMany'](_0x3735ad,Array['from'](_0x452a3d));for(const _0xa46f86 of _0x50efd7)_0x565910['getUser'](_0xa46f86['id'])||_0x565910['addUser'](_0xa46f86);}}async function B(_0x46dcb8){if('404'!==_0x46dcb8['code'])throw _0x46dcb8;}function ut(_0x1036a3){if((_0x2d6c9c=_0x1036a3)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x2d6c9c['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2d6c9c['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x2d6c9c;throw _0x1036a3;}function S(_0xcd898e){return{'threadId':_0xcd898e['commentThreadId'],'commentId':_0xcd898e['commentId'],'content':_0xcd898e['content'],'createdAt':_0xcd898e['createdAt'],'authorId':_0xcd898e['userId'],'attributes':_0xcd898e['attributes']||{}};}class f extends _0xc45049{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
+
((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x1693ad){super(_0x1693ad);const _0x3df98e=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x3df98e);}['init'](){const _0x4da196=this['editor']['plugins']['get'](c),_0x1fc2e8=this['editor']['plugins']['get']('TrackChangesEditing');return _0x1fc2e8['adapter']={'getSuggestion':async _0x65e92f=>{await this['_waitForServiceReady']();const _0x439e92=await this['_trackChangesService']['get'](_0x65e92f)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x439e92]),_0x439e92;},'addSuggestion':async({id:_0x385858,type:_0x144a8c,data:_0x26cf67,originalSuggestionId:_0x4255f4,attributes:_0x3334bd})=>{await this['_waitForServiceReady']();const _0x3d2134={'id':_0x385858,'type':_0x144a8c,'data':_0x26cf67,'originalSuggestionId':_0x4255f4,'attributes':_0x3334bd},_0x15770d=await this['_trackChangesService']['add'](_0x385858,_0x144a8c,_0x26cf67,_0x4255f4,_0x3334bd)['catch'](_0x40b29e=>{if(ft(_0x40b29e))return new Promise(_0x209c02=>{this['_bufferedRequests']['set'](_0x385858,{'resolve':_0x209c02,'suggestionData':_0x3d2134});});throw _0x40b29e;});return this['_bufferedRequests']['delete'](_0x385858),_0x15770d;},'updateSuggestion':async(_0x3f6ba0,_0x4869cf)=>{if(await this['_waitForServiceReady'](),'open'!==_0x4869cf['state'])return this['_trackChangesService']['update'](_0x3f6ba0,_0x4869cf)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x5ade9a,_0x4f6ef4)=>{_0x1fc2e8['hasSuggestion'](_0x4f6ef4['id'])&&(_0x1fc2e8['getSuggestion'](_0x4f6ef4['id'])['attributes']=_0x4f6ef4['attributes']);}),this['_trackChangesService']['connect'](_0x4da196['connection'])['then'](_0x1b45f4=>(_0x4da196['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x1b45f4)['then'](()=>{for(const _0x67cfe5 of _0x1b45f4){_0x1fc2e8['addSuggestionData'](_0x67cfe5)['_saved']=!0x0;}})));}async['reconnect'](){const _0x1badb0=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x4a9852}=this['editor']['plugins']['get'](c),_0x20be69=await this['_trackChangesService']['connect'](_0x4a9852);await this['_fetchMissingUsersForThreads'](_0x20be69);for(const {suggestionData:_0x18e597,resolve:_0x33e61c}of this['_bufferedRequests']['values']()){let _0x2668be=_0x20be69['find'](_0x4fc79a=>_0x4fc79a['id']===_0x18e597['id']);_0x2668be||(_0x2668be=await this['_trackChangesService']['add'](_0x18e597['id'],_0x18e597['type'],_0x18e597['data'],_0x18e597['originalSuggestionId'])),_0x33e61c(_0x2668be);}for(const _0x2d4476 of _0x20be69)_0x1badb0['hasSuggestion'](_0x2d4476['id'])||_0x1badb0['addSuggestionData'](_0x2d4476);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x4fa6ff=>{this['listenTo'](this['_trackChangesService'],'connected',_0x465707=>{_0x465707['off'](),_0x4fa6ff();});});}async['_fetchMissingUsersForThreads'](_0x3c9f6d){const _0x49dce5=this['editor']['plugins']['get'](_0x4e2011),{connection:_0x51f598}=this['editor']['plugins']['get'](c),_0x1c60af=new Set();for(const {authorId:_0x181f93}of _0x3c9f6d)_0x49dce5['getUser'](_0x181f93)||_0x1c60af['add'](_0x181f93);if(0x0===_0x1c60af['size'])return;const _0x57a534=await dt['getMany'](_0x51f598,Array['from'](_0x1c60af));for(const _0x1cd359 of _0x57a534)_0x49dce5['getUser'](_0x1cd359['id'])||_0x49dce5['addUser'](_0x1cd359);}}function R(_0x2973bf){if(ft(_0x2973bf))return new Promise(()=>{});throw _0x2973bf;}function ft(_0x572811){return _0x572811['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x572811['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0xc45049{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 _0x4ab455=this['editor']['plugins']['get'](c),_0x24ea85=this['editor']['plugins']['get']('CommentsEditing'),_0xf41d9b=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x4ab455,'change:state',(_0x36dca6,_0x18256a,_0xf73f15)=>{_0x24ea85['isThreadsLoadingPaused']='connected'!==_0xf73f15;});}),this['listenTo'](_0x4ab455,'change:state',(_0x23576f,_0x374224,_0x191351)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x191351);}),_0xf41d9b['_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 _0xc45049{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 _0xc45049{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
|
|
28
|
+
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x4e2011];}constructor(_0x57f971){super(_0x57f971);const _0x38744d=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x38744d);}async['init'](){const _0x4607d6=this['editor']['plugins']['get'](l),_0x17727c=_0x4607d6['serverHistory'],_0x12dd2c=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x17727c,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x4607d6['sessionId']});const _0x3b9211=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x22e01d=await tt['isBundleUploaded'](_0x12dd2c['connection'],_0x3b9211);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x2ce5b9})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x2ce5b9)),'updateRevisions':async _0x33a36a=>{await this['_waitForServiceReady']();const _0x1fe72b=this['_revisionTracker']['currentRevision'];if(_0x22e01d&&0x1===_0x33a36a['length']&&_0x33a36a[0x0]['id']===_0x1fe72b['id'])return _0x33a36a;for(const _0x8584c4 of _0x33a36a)_0x8584c4['id']===_0x1fe72b['id']&&(_0x8584c4['isEmptyCurrent']=_0x8584c4['fromVersion']===_0x8584c4['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x33a36a,this['_lastRequestId'])['then'](_0x5cc2b1=>(this['_lastRequestId']=_0x5cc2b1,_0x33a36a))['catch'](_0x525db3=>{if(st(_0x525db3)||'400'===_0x525db3['code']&&void 0x0!==_0x525db3['data']['wrongRequestId']){for(const _0x5cb028 of _0x33a36a){!this['_revisionTracker']['repository']['getRevision'](_0x5cb028['id'])||this['_revisionTracker']['_bufferUpdate'](_0x5cb028['id'],_0x5cb028,!0x1);}if(st(_0x525db3))throw _0x525db3;return _0x33a36a;}throw _0x525db3;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x2a970d,{revisionsData:_0xcc9801,requestId:_0x562f71})=>{Math['max'](..._0xcc9801['map'](_0x3e7e86=>_0x3e7e86['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0xcc9801,_0x562f71);}):this['_handleRevisionsUpdate'](_0xcc9801,_0x562f71);});const {revisions:_0x255bac,requestId:_0x39e790}=await this['_revisionHistoryService']['connect'](_0x12dd2c['connection']);_0x12dd2c['addToReconnectionStack'](this),this['_lastRequestId']=_0x39e790,await this['_fetchMissingUsers'](_0x255bac);for(const _0x4dd985 of _0x255bac)this['_revisionTracker']['addRevisionData'](_0x4dd985);this['listenTo'](_0x4607d6,'change:_isConnected',(_0x361159,_0x5f2c02,_0x73eb2f)=>{_0x73eb2f&&(this['_oldOffset']=_0x4607d6['_offset'],_0x361159['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x12dd2c,'state',_0x84d216=>_0x84d216===_0x36fb79['CONNECTED']);}async['reconnect'](){const _0x599034=this['editor']['plugins']['get'](c),_0x558215=this['editor']['plugins']['get'](l),_0x5445b0=async()=>{const _0xc72af4=this['_revisionTracker']['currentRevision'],_0x1a6620=_0xc72af4['id'],_0x2ac24f=_0x1a6620!==_0x558215['sessionId'];if(_0x2ac24f){const _0x23e810=_0x558215['_offset']-this['_oldOffset'],_0x552927=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0xc72af4['toVersion']+_0x23e810!==_0x552927){const _0x3632ac=_0xc72af4['fromVersion']+_0x23e810,_0x33c2fa=this['editor']['plugins']['get'](_0x4e2011),_0x2a4675=this['_revisionTracker']['buildRevisionData']({'revision':_0xc72af4,'from':_0x3632ac,'to':_0x552927});_0x2a4675['id']=_0xc72af4['id'];const _0x54ef26=_0x2a4675['authorsIds']['map'](_0xdd07f2=>_0x33c2fa['getUser'](_0xdd07f2));_0xc72af4['_update']({..._0x2a4675,'authors':_0x54ef26},!0x0),this['_revisionTracker']['_bufferUpdate'](_0xc72af4['id'],_0x2a4675,!0x0);}this['_revisionTracker']['_startingVersion']=_0x552927,(_0xc72af4['toVersion']===_0xc72af4['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x1a6620)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x1a6620),this['_revisionTracker']['_createCurrentRevision'](_0x552927));}const {revisions:_0x108bfa,requestId:_0x5cb4bc}=await this['_revisionHistoryService']['reconnect'](_0x599034['connection'],this['_lastRequestId']);_0x2ac24f&&_0x108bfa['length']>0x0?_0x558215['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x108bfa),this['_handleRevisionsUpdate'](_0x108bfa,_0x5cb4bc),this['_revisionTracker']['sendBufferedUpdates']());};return _0x558215['_isConnected']?_0x5445b0():new Promise((_0x2cba9b,_0x3b48a8)=>{_0x558215['once']('change:_isConnected',()=>{_0x5445b0()['then'](_0x2cba9b)['catch'](_0x3b48a8);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x3fbf4d=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x1c01d6=>{_0x1c01d6['off'](),_0x3fbf4d();});});}['_getLatestVersionFromServerOperations'](){const _0x1c89fd=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x347da8 of _0x1c89fd)if('marker'!==_0x347da8['type']||_0x347da8['affectsData'])return _0x347da8['baseVersion']+0x1;}['_getLatestVersion'](){const _0x6caf30=this['editor']['plugins']['get'](l);return new Promise(_0x41d835=>{_0x6caf30['_isPendingUpdate']?_0x6caf30['once']('change:_isPendingUpdate',()=>{_0x41d835(this['_getLatestVersionFromServerOperations']());}):_0x41d835(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x4ae216,_0x58eebc){const _0x1c2ab4=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x58eebc;for(const _0x108c0a of _0x4ae216){const _0xaa015a=_0x1c2ab4['getRevision'](_0x108c0a['id']);if(_0xaa015a){if((_0x108c0a['fromVersion']||_0x108c0a['toVersion'])&&(_0x108c0a['diffData']=null),_0xaa015a===this['_revisionTracker']['currentRevision']){const _0x55e48e=Math['max'](_0xaa015a['toVersion'],_0x108c0a['toVersion']),_0x1b1dff=Math['max'](_0xaa015a['fromVersion'],_0x108c0a['fromVersion']);let _0x57c519;_0xaa015a['toVersion']===_0x108c0a['toVersion']&&_0xaa015a['fromVersion']===_0x108c0a['fromVersion']?(_0x57c519=!0x0,this['_preventResendingRevisionData'](_0x108c0a)):_0x108c0a['toVersion']===_0x55e48e&&_0x108c0a['fromVersion']===_0x1b1dff?_0x57c519=!0x1:(_0xaa015a['toVersion']===_0x55e48e&&_0xaa015a['fromVersion']===_0x1b1dff||this['_fixRevision']({'revision':_0xaa015a,'from':_0x1b1dff,'to':_0x55e48e}),_0x57c519=!0x0),_0x57c519&&(delete _0x108c0a['fromVersion'],delete _0x108c0a['toVersion'],delete _0x108c0a['diffData'],delete _0x108c0a['createdAt'],delete _0x108c0a['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x108c0a),this['_preventResendingRevisionData'](_0x108c0a);}else this['_revisionTracker']['addRevisionData'](_0x108c0a);}const _0x556d8e=_0x1c2ab4['getRevisions']();_0x556d8e['reverse']();for(let _0x234b97=0x0;_0x234b97<_0x556d8e['length']-0x1;_0x234b97++){const _0x1b713b=_0x556d8e[_0x234b97],_0x8a4cdf=_0x556d8e[_0x234b97+0x1];if(_0x1b713b['fromVersion']<_0x8a4cdf['toVersion']){const _0x3c450e=_0x8a4cdf['toVersion'],_0x1b50b5=Math['max'](_0x3c450e,_0x1b713b['toVersion']);this['_fixRevision']({'revision':_0x1b713b,'from':_0x3c450e,'to':_0x1b50b5});}}}['_fixRevision']({revision:_0x457a77,from:_0x40714d,to:_0x55baa7}={}){const _0x54525f=this['editor']['plugins']['get'](_0x4e2011),_0x1ff5b9=this['_revisionTracker']['buildRevisionData']({'revision':_0x457a77,'from':_0x40714d,'to':_0x55baa7});_0x1ff5b9['authors']=_0x1ff5b9['authorsIds']['map'](_0x4a6623=>_0x54525f['getUser'](_0x4a6623)),_0x457a77['_update'](_0x1ff5b9);}['_preventResendingRevisionData'](_0x417152){const _0x92b03e={};_0x92b03e['id']=_0x417152['id'];for(const _0x320932 of Object['keys'](_0x417152))'id'!==_0x320932&&(_0x92b03e[_0x320932]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x92b03e['id'],_0x92b03e,!0x0);}async['_fetchMissingUsers'](_0x7d7f0){const _0x57dbf8=this['editor']['plugins']['get'](_0x4e2011),{connection:_0x2958dd}=this['editor']['plugins']['get'](c),_0x131e01=new Set();for(const _0x11cc15 of _0x7d7f0){for(const _0x35ac84 of _0x11cc15['authorsIds'])_0x5a2a28(_0x35ac84);_0x11cc15['creatorId']&&_0x5a2a28(_0x11cc15['creatorId']);}if(0x0===_0x131e01['size'])return;const _0x5cde19=await dt['getMany'](_0x2958dd,Array['from'](_0x131e01));for(const _0x24b70f of _0x5cde19)_0x57dbf8['getUser'](_0x24b70f['id'])||_0x57dbf8['addUser'](_0x24b70f);function _0x5a2a28(_0x49749c){_0x57dbf8['getUser'](_0x49749c)||_0x131e01['add'](_0x49749c);}}}function st(_0x1bd15f){return _0x1bd15f['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x1bd15f['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1bd15f['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0xc45049{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 _0x3d8c1a{constructor(_0x5e30c5){super(_0x5e30c5);const _0x3e3269=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x3e3269['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x3e3269['to']('usersCount',_0x43115d=>q(_0x5e30c5,'CONNECTED_USERS',_0x43115d))}]});}}class es extends _0x3d8c1a{['items'];['keystrokes'];constructor(_0x4b06cc){super(_0x4b06cc);const _0x2c4cf6=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x26df46(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x2c4cf6['if']('hasPopup'),'aria-expanded':_0x2c4cf6['to']('isExpanded',_0x553252=>this['hasPopup']&&String(_0x553252)),'aria-label':_0x2c4cf6['to']('hasPopup',_0x6b38a5=>q(_0x4b06cc,_0x6b38a5?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x2c4cf6['to']('hasPopup',_0x52ea7a=>!!_0x52ea7a&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x2c4cf6['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x5c16db,_0x55d020,_0x36e3d7)=>{this['element']&&(_0x36e3d7?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 _0x3d8c1a{['counterView'];['inlineListView'];constructor(_0x5d28eb){super(_0x5d28eb);const _0x4940b6=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x5d28eb),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x58e3e0 of this['inlineListView']['items'])_0x58e3e0['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',_0x4940b6['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x3d8c1a{['listWrapperView'];constructor(_0x4a72b3,_0x1d4fa5){super(_0x4a72b3),this['listWrapperView']=new mt(_0x4a72b3,_0x1d4fa5),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x4a72b3,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0xd3dc2c{constructor(_0x2010eb,_0x163492){super(_0x2010eb);const _0x10de41=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x163492?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x10de41['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x10de41['to']('role'),'aria-label':_0x10de41['to']('ariaLabel'),'aria-labelledby':_0x10de41['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x3ee391['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x175daa=this['element'];_0x175daa&&(this['_isScrollable']=Math['max'](_0x175daa['scrollHeight'],_0x175daa['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0xcbd4ec,_0x5fbbba,_0x1bb3d4){super(_0xcbd4ec);const _0x75c18b=this['bindTemplate'];this['userView']=new ct(_0xcbd4ec,_0x5fbbba);const _0x3d70c0={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x5fbbba['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x5fbbba['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x5fbbba['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x1bb3d4&&(_0x3d70c0['tag']='button',_0x3d70c0['on']={'click':_0x75c18b['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x3d70c0);}['focus'](){this['element']['focus']();}}class y extends _0x3d8c1a{['userView'];['markerView'];constructor(_0x4ea6f0,_0x43351e,_0x273ebb){super(_0x4ea6f0);const _0x16e903=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x4ea6f0,_0x43351e),this['markerView']=new at(_0x4ea6f0,_0x43351e);const _0x155617=new ot(_0x4ea6f0);_0x155617['template']['tag']='span',_0x155617['text']=_0x43351e['name'];const _0x470005={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x16e903['to']('isFocusable',_0x43e6a9=>!!_0x43e6a9&&0x0),'aria-labelledby':_0x155617['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x16e903['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x16e903['to']('hasTooltip',_0x1394a2=>!_0x1394a2),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x155617]};_0x273ebb&&(_0x470005['tag']='button',_0x470005['on']={'click':_0x16e903['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x470005);}}class at extends _0x3d8c1a{constructor(_0x38f6e6,_0x1e6440){super(_0x38f6e6),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x1e6440['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x33a461{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0xbfdd8b){super(_0xbfdd8b),this['context']['config']['define']('presenceList',A);const _0x73a872=_0xbfdd8b['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x73a872)throw new _0x18dc38('presencelist-collapseat-invalid-format',this);if(_0x73a872<0x1)throw new _0x18dc38('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x330773(),this['balloonPanelView']=new _0x4f7ecf(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x1a852b of this['_allConnectedUsers'])this['_handleUserAdd'](_0x1a852b);this['listenTo'](this['_allConnectedUsers'],'add',(_0x37680d,_0x2021b3)=>{this['_handleUserAdd'](_0x2021b3);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x5ec23f,_0x3548b9)=>{this['_handleUserRemove'](_0x3548b9);});}['_createView'](){const _0x16b072=this['context'],_0x1b4781=new L(this['context']['locale']),_0x6cdd1b=this['balloonPanelView'];if(!_0x19da4d(_0x16b072['config']['get']('presenceList.container')))throw new _0x18dc38('presencelist-missing-container',this);return _0x1b4781['counterView']['bind']('usersCount')['to'](this),_0x1b4781['bind']('isCollapsed')['to'](this,'usersCount',_0x1ebdf4=>{const {collapseAt:_0x99f421,displayMe:_0x4a46ca}=_0x16b072['config']['get']('presenceList'),_0x30af4c=_0x1ebdf4>=_0x99f421;return _0x1b4781['counterView']['isHidden']=!(0x1==_0x1ebdf4&&_0x4a46ca||_0x30af4c),_0x30af4c||this['hideDropdown'](),_0x30af4c;}),_0x1b4781['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x4be3a5=>{const _0x506b6b=_0x16b072['config']['get']('presenceList'),_0x386af7=new y(_0x16b072['locale'],_0x4be3a5,!!_0x506b6b['onClick']);return _0x386af7['bind']('hasTooltip')['to'](_0x1b4781,'isCollapsed',_0x317995=>!_0x317995),_0x386af7['bind']('isFocusable')['to'](_0x1b4781,'isCollapsed',_0xd6b696=>!_0xd6b696),_0x506b6b['onClick']&&this['listenTo'](_0x386af7,'execute',()=>{this['view']['isCollapsed']||_0x506b6b['onClick'](_0x4be3a5,_0x386af7['element']);}),_0x386af7;}),this['listenTo'](_0x1b4781['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x1b4781['inlineListView']['keystrokes']['set']('Enter',(_0x326e11,_0x487f6c)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x487f6c());}),_0x1b4781['render'](),_0x6cdd1b['render'](),_0x39189a({'emitter':_0x1b4781,'activator':()=>_0x6cdd1b['isVisible'],'contextElements':[_0x6cdd1b['element'],_0x1b4781['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x16b072['config']['get']('presenceList.container')['appendChild'](_0x1b4781['element']),this['_bodyCollection']=new _0x361caf(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x1b4781;}['_handleUserAdd'](_0x504a90){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x504a90['isMe'])return;const _0x156f05=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x156f05&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x189ee7=_0x504a90['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x504a90,_0x189ee7);}['_handleUserRemove'](_0x3cbe67){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x3cbe67['id'])&&(this['currentDisplayedUsers']['remove'](_0x3cbe67['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x30c522 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x30c522['id']))return void this['currentDisplayedUsers']['add'](_0x30c522,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x1212fb=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x1212fb['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x19db89}=this['presenceDropdownView'];_0x19db89['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x543759=>{if(!_0x1212fb['displayMe']&&_0x543759['isMe'])return null;const _0x103d69=new k(this['context']['locale'],_0x543759,!!_0x1212fb['onClick']);return _0x1212fb['onClick']&&this['listenTo'](_0x103d69,'execute',()=>{_0x1212fb['onClick'](_0x543759,_0x103d69['element']);}),_0x103d69;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x19db89['focus'](),_0x19db89['checkIfScrollable']();const _0xf4f362=(_0x543593,_0x153275)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x153275();};_0x19db89['keystrokes']['set']('Esc',_0xf4f362),_0x19db89['keystrokes']['set']('Shift+Tab',_0xf4f362),_0x19db89['keystrokes']['set']('Tab',(_0x41ebd1,_0x3cc5e0)=>{!function(_0x3e7c6a){const _0xfe4a89=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x313329=>_0x313329+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x58cd76=[...document['body']['querySelectorAll'](_0xfe4a89)]['filter'](_0x1966a9=>_0x1966a9===document['activeElement']||_0x1966a9['offsetWidth']+_0x1966a9['offsetHeight']>0x0)['sort']((_0x370eff,_0x2d84ea)=>(_0x370eff['tabIndex']||0x0)-(_0x2d84ea['tabIndex']||0x0)),_0x2774fe=_0x58cd76['indexOf'](_0x3e7c6a),_0x8d401=_0x58cd76[(_0x2774fe+0x1)%_0x58cd76['length']];_0x8d401&&_0x8d401['focus']();}(this['view']['element']),this['hideDropdown'](),_0x3cc5e0();}),_0x19db89['focusTracker']['add'](this['view']['element']),_0x19db89['focusTracker']['on']('change:isFocused',(_0x111174,_0x5aa665,_0xc7f646)=>{_0xc7f646||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 _0x33a461{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':_0x189113=>0x1!=_0x189113}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x37ed30=>{const {af:{dictionary:_0x2dd1d7,getPluralForm:_0x54be8a}}={'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':_0x22e449=>0x1!=_0x22e449}};_0x37ed30['af']||={'dictionary':{},'getPluralForm':null},_0x37ed30['af']['dictionary']=Object['assign'](_0x37ed30['af']['dictionary'],_0x2dd1d7),_0x37ed30['af']['getPluralForm']=_0x54be8a;})(window['CKEDITOR_TRANSLATIONS']||={});
|