@ckeditor/ckeditor5-real-time-collaboration 43.1.0-alpha.1 → 43.1.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/build/real-time-collaboration.js +1 -1
  2. package/dist/index.js +6 -6
  3. package/dist/translations/ar.js +1 -1
  4. package/dist/translations/ar.umd.js +1 -1
  5. package/dist/translations/bg.js +1 -1
  6. package/dist/translations/bg.umd.js +1 -1
  7. package/dist/translations/bn.js +1 -1
  8. package/dist/translations/bn.umd.js +1 -1
  9. package/dist/translations/ca.js +1 -1
  10. package/dist/translations/ca.umd.js +1 -1
  11. package/dist/translations/cs.js +1 -1
  12. package/dist/translations/cs.umd.js +1 -1
  13. package/dist/translations/da.js +1 -1
  14. package/dist/translations/da.umd.js +1 -1
  15. package/dist/translations/de-ch.js +1 -1
  16. package/dist/translations/de-ch.umd.js +1 -1
  17. package/dist/translations/de.js +1 -1
  18. package/dist/translations/de.umd.js +1 -1
  19. package/dist/translations/el.js +1 -1
  20. package/dist/translations/el.umd.js +1 -1
  21. package/dist/translations/en-au.js +1 -1
  22. package/dist/translations/en-au.umd.js +1 -1
  23. package/dist/translations/en.umd.js +1 -1
  24. package/dist/translations/es.js +1 -1
  25. package/dist/translations/es.umd.js +1 -1
  26. package/dist/translations/et.js +1 -1
  27. package/dist/translations/et.umd.js +1 -1
  28. package/dist/translations/fa.js +1 -1
  29. package/dist/translations/fa.umd.js +1 -1
  30. package/dist/translations/fi.js +1 -1
  31. package/dist/translations/fi.umd.js +1 -1
  32. package/dist/translations/fr.js +1 -1
  33. package/dist/translations/fr.umd.js +1 -1
  34. package/dist/translations/gl.js +1 -1
  35. package/dist/translations/gl.umd.js +1 -1
  36. package/dist/translations/he.js +1 -1
  37. package/dist/translations/he.umd.js +1 -1
  38. package/dist/translations/hi.js +1 -1
  39. package/dist/translations/hi.umd.js +1 -1
  40. package/dist/translations/hr.js +1 -1
  41. package/dist/translations/hr.umd.js +1 -1
  42. package/dist/translations/hu.js +1 -1
  43. package/dist/translations/hu.umd.js +1 -1
  44. package/dist/translations/id.js +1 -1
  45. package/dist/translations/id.umd.js +1 -1
  46. package/dist/translations/it.js +1 -1
  47. package/dist/translations/it.umd.js +1 -1
  48. package/dist/translations/ja.js +1 -1
  49. package/dist/translations/ja.umd.js +1 -1
  50. package/dist/translations/ko.js +1 -1
  51. package/dist/translations/ko.umd.js +1 -1
  52. package/dist/translations/lt.js +1 -1
  53. package/dist/translations/lt.umd.js +1 -1
  54. package/dist/translations/lv.js +1 -1
  55. package/dist/translations/lv.umd.js +1 -1
  56. package/dist/translations/ms.js +1 -1
  57. package/dist/translations/ms.umd.js +1 -1
  58. package/dist/translations/nl.js +1 -1
  59. package/dist/translations/nl.umd.js +1 -1
  60. package/dist/translations/no.js +1 -1
  61. package/dist/translations/no.umd.js +1 -1
  62. package/dist/translations/pl.js +1 -1
  63. package/dist/translations/pl.umd.js +1 -1
  64. package/dist/translations/pt-br.js +1 -1
  65. package/dist/translations/pt-br.umd.js +1 -1
  66. package/dist/translations/pt.js +1 -1
  67. package/dist/translations/pt.umd.js +1 -1
  68. package/dist/translations/ro.js +1 -1
  69. package/dist/translations/ro.umd.js +1 -1
  70. package/dist/translations/ru.js +1 -1
  71. package/dist/translations/ru.umd.js +1 -1
  72. package/dist/translations/sk.js +1 -1
  73. package/dist/translations/sk.umd.js +1 -1
  74. package/dist/translations/sr-latn.js +1 -1
  75. package/dist/translations/sr-latn.umd.js +1 -1
  76. package/dist/translations/sr.js +1 -1
  77. package/dist/translations/sr.umd.js +1 -1
  78. package/dist/translations/sv.js +1 -1
  79. package/dist/translations/sv.umd.js +1 -1
  80. package/dist/translations/th.js +1 -1
  81. package/dist/translations/th.umd.js +1 -1
  82. package/dist/translations/tk.js +1 -1
  83. package/dist/translations/tk.umd.js +1 -1
  84. package/dist/translations/tr.js +1 -1
  85. package/dist/translations/tr.umd.js +1 -1
  86. package/dist/translations/uk.js +1 -1
  87. package/dist/translations/uk.umd.js +1 -1
  88. package/dist/translations/vi.js +1 -1
  89. package/dist/translations/vi.umd.js +1 -1
  90. package/dist/translations/zh-cn.js +1 -1
  91. package/dist/translations/zh-cn.umd.js +1 -1
  92. package/dist/translations/zh.js +1 -1
  93. package/dist/translations/zh.umd.js +1 -1
  94. package/package.json +9 -9
  95. package/src/common-translations.js +1 -1
  96. package/src/index.js +1 -1
  97. package/src/presencelist/presencelistui.js +1 -1
  98. package/src/presencelist/view/presencecounterview.js +1 -1
  99. package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
  100. package/src/presencelist/view/presencedropdownlistview.js +1 -1
  101. package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
  102. package/src/presencelist/view/presenceinlinelistview.js +1 -1
  103. package/src/presencelist/view/presencelistview.js +1 -1
  104. package/src/presencelist.js +1 -1
  105. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
  106. package/src/realtimecollaborativecomments.js +1 -1
  107. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
  108. package/src/realtimecollaborativeediting/sessions.js +1 -1
  109. package/src/realtimecollaborativeediting/usermarkers.js +1 -1
  110. package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
  111. package/src/realtimecollaborativeediting.js +1 -1
  112. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
  113. package/src/realtimecollaborativerevisionhistory.js +1 -1
  114. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
  115. 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 _0x3b6d3b,Plugin as _0x614839,PendingActions as _0x4833cd,Context as _0x404775}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x3a4d0a,CKEditorError as _0xe38d4d,Collection as _0x55b8d7,global as _0x1e8603,version as nt,uid as _0x12fe26,KeystrokeHandler as _0x3a3582}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x3a388b,View as _0x475f4b,ListView as _0x2c56d7,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x3bd4c7,clickOutsideHandler as _0x24f9cd,BodyCollection as _0x517c28}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x317041,NoOperation as _0x17b006,InsertOperation as _0x2a656c,MarkerOperation as _0x7f4e9d,RootAttributeOperation as _0x49fc61,transformSets as _0x441f91,OperationFactory as _0x1da843}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x1e1daf,CollaborativeEditingService as _0x48267b,User as lt,CommentsService as _0x50a9ea,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x2d8d29,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x5d2f73}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x5be7ed}from'lodash-es';class c extends _0x3b6d3b{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
- ((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x3a388b];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x3bccf0){super(_0x3bccf0),this['set']('state',_0x1e1daf['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x3a4d0a);}['init'](){const _0x5b92b2=this['context'],_0x21e8dc=_0x5b92b2['plugins']['get']('CloudServices'),_0x58ebfa=_0x5b92b2['plugins']['get'](_0x3a388b);if(!_0x21e8dc['token'])throw new _0xe38d4d('websocketgateway-missing-token',this);if(!_0x21e8dc['webSocketUrl'])throw new _0xe38d4d('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'](_0x21e8dc['token'],_0x21e8dc['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x32c53=>{if(this['connection']=_0x32c53,this['bind']('state')['to'](_0x32c53,'state',this,'_isBrowserOffline',(_0x1dda6c,_0x2437cb)=>('connected'!==_0x1dda6c&&(this['_shouldPluginsReconnect']=!0x0),_0x2437cb||_0x1dda6c!==_0x1e1daf['CONNECTED']?_0x1e1daf['DISCONNECTED']:this['state']==_0x1e1daf['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x1e1daf['CONNECTING']):_0x1e1daf['CONNECTED'])),this['connection']['on']('error',(_0x905fdb,_0x91e46c)=>{if('limitExceeded'!==_0x91e46c['code'])throw console['error'](_0x91e46c),new _0xe38d4d('cloudservices-init',null,{'originalError':_0x91e46c});_0x58ebfa['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'});}),!_0x32c53['me'])return new Promise(_0x163b3c=>_0x32c53['on']('change:me',_0x163b3c));})['catch'](_0x49b95e=>{throw console['error'](_0x49b95e),new _0xe38d4d('cloudservices-init',null,{'originalError':_0x49b95e});});}['addToReconnectionStack'](_0x17b242){if('function'!=typeof _0x17b242['reconnect'])throw new _0xe38d4d('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x17b242))throw new _0xe38d4d('websocketgateway-plugin-already-registered',this,{'name':_0x17b242['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x17b242);}['removeFromReconnectionStack'](_0x30d43a){this['_reconnectionStack']['delete'](_0x30d43a);}['isInReconnectionStack'](_0x26649c){return this['_reconnectionStack']['has'](_0x26649c);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x1e2496=>_0x1e2496['reconnect']())))['then'](()=>this['state']=_0x1e1daf['CONNECTED'])['catch'](_0x54e90f=>{throw console['error'](_0x54e90f),new _0xe38d4d('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x1e1daf['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x3b6d3b{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x2d8d29];}constructor(_0x378f3f){super(_0x378f3f),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x55b8d7(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x2d8d29);}['init'](){const _0x3ac992=this['context']['plugins']['get'](c);this['listenTo'](_0x3ac992,'change:state',(_0xc46791,_0xb27959,_0x22e44b)=>{if('connected'!==_0x22e44b)this['channelSessions']['forEach'](_0x302826=>_0x302826['clear']()),this['channelConnectedUsers']['forEach'](_0x5bb08e=>_0x5bb08e['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x5bc4df,_0x54810f]of this['_registeredSessions'])for(const _0x548d7c of _0x54810f)this['_handleSessionAdd'](_0x5bc4df,_0x548d7c);}}),this['_createUser'](_0x3ac992['connection']['me'],!0x0);}['register'](_0x1ca2a1,_0x3de4c3){if(this['_registeredSessions']['has'](_0x1ca2a1))throw new _0xe38d4d('sessions-register-already-registered',null,{'channelId':_0x1ca2a1});this['_registeredSessions']['set'](_0x1ca2a1,_0x3de4c3),this['channelSessions']['set'](_0x1ca2a1,new _0x55b8d7()),this['channelConnectedUsers']['set'](_0x1ca2a1,new _0x55b8d7()),this['listenTo'](_0x3de4c3,'add',(_0x3387d0,_0x5bb3cc)=>this['_handleSessionAdd'](_0x1ca2a1,_0x5bb3cc)),this['listenTo'](_0x3de4c3,'remove',(_0xe3330f,_0x1795d7)=>this['_handleSessionRemove'](_0x1ca2a1,_0x1795d7));for(const _0x42c7d2 of _0x3de4c3)this['_handleSessionAdd'](_0x1ca2a1,_0x42c7d2);}['unregister'](_0x4b4d47){if(!this['_registeredSessions']['has'](_0x4b4d47))throw new _0xe38d4d('sessions-unregister-not-exist',null,{'channelId':_0x4b4d47});const _0x415368=this['_registeredSessions']['get'](_0x4b4d47);this['stopListening'](_0x415368);for(const _0x37f75d of _0x415368)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x4b4d47,_0x37f75d);this['_registeredSessions']['delete'](_0x4b4d47),this['channelSessions']['delete'](_0x4b4d47),this['channelConnectedUsers']['delete'](_0x4b4d47);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x38f89e){for(const _0x205030 of this['channelSessions']['values']())for(const _0x47b06c of _0x205030)if(_0x47b06c['id']===_0x38f89e)return _0x47b06c['user'];}['getUserSessions'](_0x15d51f,_0x5c95d4){const _0xfa5602=_0x5c95d4?[this['channelSessions']['get'](_0x5c95d4)]:this['channelSessions']['values'](),_0x254547=new Set();for(const _0x1622df of _0xfa5602)for(const _0x5673f0 of _0x1622df)_0x5673f0['user']['id']===_0x15d51f['id']&&_0x254547['add'](_0x5673f0['id']);return _0x254547;}['getUserRole'](_0x407f86){for(const _0x46b55e of this['channelSessions']['values']())for(const _0x17f729 of _0x46b55e)if(_0x17f729['user']===_0x407f86)return _0x17f729['role'];}['_handleSessionAdd'](_0x3a3b51,_0x4fcd27){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x531d89=_0x4fcd27['user'],_0x56a8f3=this['_users']['getUser'](_0x531d89['id'])||this['_createUser'](_0x531d89),_0x4ff5be=Object['assign']({},_0x4fcd27,{'user':_0x56a8f3});this['channelSessions']['get'](_0x3a3b51)['add'](_0x4ff5be);const _0x2e952e=this['channelConnectedUsers']['get'](_0x3a3b51);_0x2e952e['has'](_0x56a8f3['id'])||_0x2e952e['add'](_0x56a8f3),this['allConnectedUsers']['has'](_0x56a8f3['id'])||this['allConnectedUsers']['add'](_0x56a8f3,_0x56a8f3['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x3a3b51,{'channelId':_0x3a3b51,'session':_0x4ff5be});}['_handleSessionRemove'](_0x2f7d18,_0x3d3fdb){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x3961d6=this['channelConnectedUsers']['get'](_0x2f7d18),_0x24766b=_0x3d3fdb['user'];_0x24766b['id']&&(this['channelSessions']['get'](_0x2f7d18)['remove'](_0x3d3fdb['id']),_0x3961d6['has'](_0x24766b['id'])&&!this['getUserSessions'](_0x24766b,_0x2f7d18)['size']&&_0x3961d6['remove'](_0x24766b['id']),this['allConnectedUsers']['get'](_0x24766b['id'])&&!this['getUserSessions'](_0x24766b)['size']&&this['allConnectedUsers']['remove'](_0x24766b['id']));}['_createUser'](_0x23abb2,_0xf25d49){const _0x40d4d2=this['_users']['addUser'](_0x23abb2);return _0xf25d49&&this['_users']['defineMe'](_0x23abb2['id']),_0x40d4d2['orderNumber']=this['_uniqueUsersCount']++,_0x40d4d2;}}class H extends _0x614839{['_domEmitter']=new(_0x3a4d0a())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x4ec4c6=this['editor'],_0x2d32d1=_0x4ec4c6['plugins']['get'](r);_0x4ec4c6['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x19c35a,{writer:_0x156655})=>function(_0x45d8be,_0x414eed,_0x22892d,_0x2f8d64){const _0x5df6cd=_0x45d8be['markerName']['split'](':')[0x2],_0x5e8acf=_0x22892d['getUserBySessionId'](_0x5df6cd);if(!_0x5e8acf||_0x5df6cd===_0x22892d['mySessionId'])return;if(!_0x2f8d64['model']['schema']['checkChild'](_0x45d8be['markerRange']['start'],'$text'))return;const _0x1d6299={'class':'ck-user__marker\x20'+_0x5e8acf['color']['getMarkerClass'](),'data-name':_0x5e8acf['name'],'data-session-id':_0x5df6cd},_0xd61c4f=_0x2f8d64['model']['markers']['get'](_0x45d8be['markerName']),_0x2d9a04=_0xd61c4f['getStart'](),_0x1e775d=_0x2d9a04['nodeAfter'],_0x3cbea3=_0x2f8d64['model']['schema'];if(_0x1e775d&&_0x3cbea3['isObject'](_0x1e775d)&&_0x3cbea3['isInline'](_0x1e775d)&&!_0x2f8d64['model']['markers']['get']('user:range:'+_0x5df6cd)['getRange']()['isCollapsed'])return;const _0x4d8e23=_0x2d9a04['parent'];return _0x2f8d64['model']['schema']['isLimit'](_0x4d8e23)&&!_0x2f8d64['model']['hasContent'](_0x4d8e23)&&(_0x1d6299['contenteditable']=!0x1),function(_0x42825f,_0x31d7d6,_0x32dc95){const _0x9f2678=_0x42825f['createUIElement']('span',_0x31d7d6);return _0x42825f['setCustomProperty']('userPositionMarker',!0x0,_0x9f2678),_0x9f2678['render']=function(_0xb244d2){const _0x36e2ca=this['toDomElement'](_0xb244d2);return _0x36e2ca['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>'+_0x32dc95['name']+'</span>⁠',_0x36e2ca['addEventListener']('mouseenter',()=>{_0x36e2ca['classList']['add']('ck-user__marker_hovered');}),_0x36e2ca['addEventListener']('mouseleave',()=>{_0x36e2ca['classList']['remove']('ck-user__marker_hovered');}),_0x36e2ca;},_0x9f2678['isSimilar']=function(_0x4784dc){return!(!this['getCustomProperty']('userPositionMarker')||!_0x4784dc['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x4784dc['getAttribute']('data-session-id'));},_0x9f2678;}(_0x414eed,_0x1d6299,_0x5e8acf);}(_0x19c35a,_0x156655,_0x2d32d1,_0x4ec4c6)}),_0x4ec4c6['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x4f8885=>function(_0x493f52,_0x41ef78){const _0x2368ed=_0x493f52['markerName']['split'](':')[0x2];if(_0x2368ed===_0x41ef78['mySessionId'])return null;const _0x36fb2e=_0x41ef78['getUserBySessionId'](_0x2368ed);if(!_0x36fb2e)return{'id':_0x2368ed,'classes':[]};return{'id':_0x2368ed,'classes':['ck-user__selection',_0x36fb2e['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x2368ed},'priority':0x7d0+_0x36fb2e['orderNumber']};}(_0x4f8885,_0x2d32d1)}),function(_0x59a975){const _0x3ea8f0=_0x59a975['model'],_0x5d5f5d=new Map(),_0xee9f06=_0x59a975['plugins']['get'](r);_0x3ea8f0['markers']['on']('update:user:range',(_0x14dab3,_0x281f28,_0xbcbb0d,_0x101718)=>{if(!_0x101718&&_0x5d5f5d['get'](_0x281f28['name']))return _0x5d5f5d['get'](_0x281f28['name'])['detach'](),void _0x5d5f5d['delete'](_0x281f28['name']);const _0x9631e9=_0x281f28['name']['split'](':')[0x2];if(_0x9631e9===_0xee9f06['mySessionId'])return;const _0x4ee9f4='user:position:'+_0x9631e9;_0x3ea8f0['markers']['has'](_0x4ee9f4)&&_0x59a975['editing']['reconvertMarker'](_0x4ee9f4),_0x281f28['on']('change:range',(_0x318fcf,_0x820a01,_0x148bac)=>{if('$graveyard'!=_0x820a01['root']['rootName']&&'$graveyard'==_0x281f28['getRange']()['root']['rootName']&&!_0x5d5f5d['has'](_0x281f28['name'])){const _0x1b90e5=_0x3ea8f0['schema']['getNearestSelectionRange'](_0x148bac['deletionPosition']);if(_0x1b90e5){const _0x22a257=ht['fromRange'](_0x1b90e5);_0x5d5f5d['set'](_0x281f28['name'],_0x22a257),_0x22a257['on']('change:range',(_0x454c02,_0x28009d,_0xbb6886)=>{if('$graveyard'==_0x22a257['root']['rootName']){const _0x36fa86=_0x3ea8f0['schema']['getNearestSelectionRange'](_0xbb6886['deletionPosition']);_0x36fa86?(_0x22a257['start']=_0x36fa86['start'],_0x22a257['end']=_0x36fa86['end']):(_0x5d5f5d['delete'](_0x281f28['name']),_0x22a257['detach']());}});}}});}),_0x3ea8f0['document']['on']('change',()=>{_0x5d5f5d['size']>0x0&&_0x3ea8f0['enqueueChange']({'isUndoable':!0x1},_0x23e6bc=>{for(const [_0x5cf0c1,_0x47cc3c]of _0x5d5f5d)'$graveyard'==_0x3ea8f0['markers']['get'](_0x5cf0c1)['getRange']()['root']['rootName']&&(re(_0x5cf0c1['split'](':')[0x2],_0x47cc3c['toRange'](),_0x3ea8f0,_0x23e6bc),_0x47cc3c['detach']());_0x5d5f5d['clear']();});});}(_0x4ec4c6),this['_domEmitter']['listenTo'](_0x1e8603['document'],'keydown',(_0x35d1e6,{key:_0x28a73a})=>{'Escape'===_0x28a73a&&function(_0x449051){_0x449051['editing']['view']['change'](_0x31e4cd=>{for(const _0x5e1839 of _0x449051['model']['markers']){if(!_0x5e1839['name']['startsWith']('user:position'))continue;const _0xa77543=_0x449051['editing']['mapper']['markerNameToElements'](_0x5e1839['name']);if(_0xa77543){for(const _0x2d6d4e of _0xa77543)_0x31e4cd['removeClass']('ck-user__marker_hovered',_0x2d6d4e);}}});}(_0x4ec4c6);},{'useCapture':!0x0});}['afterInit'](){const _0xad7e0e=this['editor'],_0x186fed=_0xad7e0e['commands']['get']('undo');_0x186fed&&_0xad7e0e['model']['on']('applyOperation',(_0x56394a,_0x446409)=>{const _0xa00edf=_0x446409[0x0];if('marker'!=_0xa00edf['type']||!_0xa00edf['name']['startsWith']('user:'))return;const _0x471027=_0xa00edf['batch'];_0x186fed['_createdBatches']['has'](_0x471027)&&(_0xa00edf['newRange']=_0xa00edf['oldRange']?_0xad7e0e['model']['createRange'](_0xa00edf['oldRange']['start'],_0xa00edf['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x51313f=this['editor'],_0x14dabf=_0x51313f['model']['document'],_0x3ec3ce=_0x51313f['plugins']['get'](r);_0x51313f['model']['enqueueChange']({'isUndoable':!0x1},_0xfe79d0=>{const _0x339e45='user:range:'+_0x3ec3ce['mySessionId'],_0x220460='user:position:'+_0x3ec3ce['mySessionId'],_0x40e70f=_0x51313f['model']['markers']['has'](_0x339e45);_0x51313f['editing']['view']['hasDomSelection']?re(_0x3ec3ce['mySessionId'],_0x14dabf['selection']['getFirstRange'](),_0x51313f['model'],_0xfe79d0):_0x40e70f&&(_0xfe79d0['removeMarker'](_0x339e45),_0xfe79d0['removeMarker'](_0x220460));});}}function re(_0x767744,_0x490de8,_0x483f39,_0x43e367){const _0x2324fa='user:range:'+_0x767744,_0x93cc3a='user:position:'+_0x767744,_0x589c13=_0x490de8['getContainedElement']();let _0x1d4dc3=_0x490de8['start'];_0x589c13&&_0x589c13['is']('element','tableCell')&&(_0x1d4dc3=function(_0xef41c9,_0x52955d){for(const _0x180f8a of _0xef41c9['getPositions']())if(_0x52955d['schema']['checkChild'](_0x180f8a,'$text'))return _0x180f8a;}(_0x490de8,_0x483f39),_0x490de8=_0x43e367['createRange'](_0x1d4dc3));const _0x33bb7b=_0x43e367['createRange'](_0x1d4dc3);_0x483f39['markers']['has'](_0x2324fa)?(_0x43e367['updateMarker'](_0x2324fa,{'range':_0x490de8}),_0x43e367['updateMarker'](_0x93cc3a,{'range':_0x33bb7b})):(_0x43e367['addMarker'](_0x2324fa,{'range':_0x490de8,'usingOperation':!0x0}),_0x43e367['addMarker'](_0x93cc3a,{'range':_0x33bb7b,'usingOperation':!0x0}));}function q(_0x8b7963,_0x338fee,_0x44850b){const t=_0x8b7963['t'];switch(_0x338fee){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 t({'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'},_0x44850b);default:return'';}}let K=0x1;class l extends _0x614839{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
- ((()=>_0x48267b)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,H,_0x4833cd,_0x2d8d29,_0x3a388b];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x160941=this['serverHistory']['getOperations']();for(let _0x104cc7=_0x160941['length']-0x1;_0x104cc7>=0x0;_0x104cc7--){const _0x21e36f=_0x160941[_0x104cc7];if(!this['_disconnectionOperations']['has'](_0x21e36f))return _0x21e36f['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x2c413c){if(super(_0x2c413c),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x317041(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0xe38d4d('collaboration-missing-channelid',this);const _0x7e7abc=_0x2c413c['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x7e7abc,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x5d2f73(),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 _0x4531f9=this['editor'],_0xe6939=_0x4531f9['plugins']['get'](_0x2d8d29),_0x4f811f=_0x4531f9['plugins']['get'](c);this['listenTo'](_0xe6939,'getOperationAuthor',(_0x338cad,_0x14a79a)=>{const _0xca15dc=_0x14a79a[0x0];_0xca15dc['_authorId']&&(_0x338cad['return']=_0xe6939['getUser'](_0xca15dc['_authorId']),_0x338cad['stop']()),null===_0xca15dc['_authorId']&&(_0x338cad['return']=null,_0x338cad['stop']());},{'priority':'high'}),this['listenTo'](_0x4531f9['model']['document']['selection'],'change:range',(_0x4e7e0c,_0x172355)=>{_0x172355['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x4531f9['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x4531f9['model']['on']('applyOperation',(_0x7f050e,_0xc18f5)=>{const _0x5a8e1a=_0xc18f5[0x0];_0x5a8e1a['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x5a8e1a),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x4f811f,'state',this,'_hasSynchronizationProblem',(_0x41987d,_0x4c4599)=>'connected'===_0x41987d&&!_0x4c4599),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x4531f9['disableReadOnlyMode']('rtc-offline'):_0x4531f9['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x4531f9['disableReadOnlyMode']('rtc-offline'):_0x4531f9['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x26656f=this['editor']['plugins']['get'](r),_0x1ac197=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x26656f['unregister'](this['_channelId']);const _0x200345=await this['_service']['reconnect'](_0x1ac197['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x200345)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x595047=await this['_service']['getConnectedSessions']();_0x26656f['register'](this['_channelId'],_0x595047),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x15fa63){if(function(_0x30e863){return'404'===_0x30e863['code'];}(_0x15fa63)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x125d7d){return'409'===_0x125d7d['code'];}(_0x15fa63)){const _0x319650=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'](_0x319650);}else{if(!(_0x15fa63 instanceof J))throw _0x15fa63;this['_handleReconnectionError']();}}}}['destroy'](){const _0x540dc0=this['editor']['plugins']['get'](c),_0x35a8ef=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x35a8ef['channelSessions']['has'](this['_channelId'])&&_0x35a8ef['unregister'](this['_channelId']),_0x540dc0['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x7d9ee6){if(this['sessionId']!==_0x7d9ee6['sessionId']&&this['_lastSyncedOperationId']!==_0x7d9ee6['lastOperationId'])throw new J();return this['sessionId']=_0x7d9ee6['sessionId'],this['_handleServerResponse']([],{..._0x7d9ee6,'wereChangesApplied':!0x1,'data':_0x7d9ee6['data']},'reconnect');}async['_connectService'](_0x50a30d,_0x14c127=!0x1){const {connection:_0x3e1b41}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x3e1b41,this['_channelId'])['then'](_0x24c27c=>this['_initSessionsHandling'](_0x24c27c))['catch'](_0x196a14=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x196a14);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x336768,_0x2ab252)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x2ab252);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x2051be=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x50a30d);this['_isPendingUpdate']=!0x0;const _0xd5c8be=await this['_service']['connect'](_0x3e1b41,this['_compressOperations'](_0x50a30d),_0x2051be);if(this['sessionId']=_0xd5c8be['sessionId'],_0x14c127){if(!_0xd5c8be['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0xd5c8be['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x50a30d,_0xd5c8be,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0xd5c8be,_0x50a30d);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x17101a=this['editor']['plugins']['get'](r),_0x386bb1=this['editor']['plugins']['get'](H),_0x18686c=_0x17101a['channelSessions']['get'](this['_channelId']);_0x18686c&&_0x18686c['length']>0x1?_0x386bb1['createUserMarkerOperations']():this['listenTo'](_0x17101a,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x17101a['channelSessions']['get'](this['_channelId'])['length']&&_0x386bb1['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x4cbf32,_0x12112c,_0x25ab1c,_0x1f7b1f){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x12112c){const _0x4c5d87=this['_decompressOperations'](_0x25ab1c,_0x1f7b1f);await this['_fetchMissingUsers'](_0x4c5d87),this['_handleExternalOperations'](_0x4c5d87,_0x12112c,_0x25ab1c['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x335940}=this['editor'];let _0x5fd9c0;try{_0x5fd9c0=await this['_service']['getDocumentDetails']();}catch(_0x2b165b){const _0xa99d6a=q(_0x335940,'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'](_0xa99d6a);}const _0x4aa35d=_0x5fd9c0['currentDocumentSession']||_0x5fd9c0['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x4aa35d['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x40a75c=q(_0x335940,'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'](_0x40a75c);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x58a450){const _0x478fc2=this['editor']['plugins']['get'](r);this['listenTo'](_0x478fc2,'sessionAdd:'+this['_channelId'],(_0x178bb7,{session:_0x364b23})=>{if(_0x364b23['id']===_0x478fc2['mySessionId']){_0x178bb7['off']();const _0x28e535=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x4a6f31=_0x364b23['permissions'];_0x28e535&&_0x28e535['isEnabled']&&(_0x4a6f31=_0x4a6f31['filter'](_0x53919e=>'document:write'!==_0x53919e)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x4a6f31,this['_channelId']);}}),_0x478fc2['register'](this['_channelId'],_0x58a450);}['_initThrowingOnDataSet'](){const _0x2a0414=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x1631da)=>{if(!_0x1631da[_0x1631da['length']-0x1]['suppressErrorInCollaboration'])throw new _0xe38d4d('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x2a0414['apply'](this['editor']['data'],_0x1631da);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x4c4bae,[_0x2ca099])=>{if(this['_document']['version'])throw new _0xe38d4d('realtimecollaborationclient-init-document-already-initialized',this);_0x4c4bae['stop'](),this['_setPendingAction']();const _0x28e036=this['editor']['config']['get']('rootsAttributes'),_0x5cea44=this['_getOperationsFromInitData'](_0x2ca099,_0x28e036);0x0==_0x5cea44['length']&&_0x5cea44['push'](new _0x17b006(0x0)),_0x4c4bae['return']=this['_connectService'](_0x5cea44)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x4a081f=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x4a081f))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x346568,[_0x49f8cc,_0x27f996])=>{_0x346568['stop']();const _0x55809a=this['editor']['model']['document']['getRoot'](_0x49f8cc);if(!this['_knownRootNames']['has'](_0x49f8cc)){const _0xa57bdf=_0x27f996&&_0x27f996['data']?_0x27f996['data']:'',_0xdcb5ab=_0x27f996&&_0x27f996['attributes']?_0x27f996['attributes']:{};await this['_loadRoot'](_0x49f8cc,_0xa57bdf,_0xdcb5ab);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x55809a['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x55809a);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x1fb8f1){const _0x5dbb79=this['editor']['plugins']['get'](_0x2d8d29),{connection:_0xc03574}=this['editor']['plugins']['get'](c),_0x43529c=new Set();for(const _0x2cd2cb of _0x1fb8f1){const _0x45b726=_0x2cd2cb['_authorId'];_0x45b726&&!_0x5dbb79['getUser'](_0x45b726)&&_0x43529c['add'](_0x45b726);}if(0x0===_0x43529c['size'])return;const _0x1e1ade=await lt['getMany'](_0xc03574,Array['from'](_0x43529c));for(const _0x34ab25 of _0x1e1ade)_0x5dbb79['getUser'](_0x34ab25['id'])||_0x5dbb79['addUser'](_0x34ab25);}['_getOperationsFromInitData'](_0x158006,_0x217ca2={}){const _0x5dd366=this['editor']['model'],_0x537f98=[];let _0x3b0e75=0x0;const _0x4bc7a4='string'==typeof _0x158006?{'main':_0x158006}:_0x158006;for(const _0x823057 of Object['keys'](_0x4bc7a4)){if(!this['_document']['roots']['has'](_0x823057))throw new _0xe38d4d('realtimecollaborationclient-init-non-existent-root',this);const _0x1772cb=this['editor']['data']['parse'](_0x4bc7a4[_0x823057]),_0xbb122d=this['_document']['getRoot'](_0x823057),_0x668cd=new _0x2a656c(_0x5dd366['createPositionAt'](_0xbb122d,0x0),_0x1772cb,_0x3b0e75++);_0x537f98['push'](_0x668cd);for(const [_0x1da26f,_0x1860d8]of _0x1772cb['markers']){const _0x336edc=_0x5dd366['createRange'](_0x5dd366['createPositionFromPath'](_0xbb122d,_0x1860d8['start']['path']['slice']()),_0x5dd366['createPositionFromPath'](_0xbb122d,_0x1860d8['end']['path']['slice']())),_0x185ba1=new _0x7f4e9d(_0x1da26f,null,_0x336edc,_0x5dd366['markers'],!0x0,_0x3b0e75++);_0x537f98['push'](_0x185ba1);}}if(_0x217ca2)for(const [_0xbd74db,_0x3df11f]of Object['entries'](_0x217ca2)){const _0x36d37e=_0x5dd366['document']['getRoot'](_0xbd74db);if(!_0x36d37e)throw new _0xe38d4d('multi-root-editor-root-attributes-no-root',null);for(const [_0x4dba1d,_0x336541]of Object['entries'](_0x3df11f))if(null!==_0x336541){const _0x49b445=new _0x49fc61(_0x36d37e,_0x4dba1d,null,_0x336541,_0x3b0e75++);_0x537f98['push'](_0x49b445);}}return _0x537f98;}async['_loadRoot'](_0x283413,_0x337bb8,_0x5c3c9f){this['_getOperationsFromInitData']({[_0x283413]:_0x337bb8},{[_0x283413]:_0x5c3c9f})['forEach']((_0xd20a33,_0x2c08b7)=>{_0xd20a33['baseVersion']=this['_document']['version']+_0x2c08b7,_0xd20a33['_isInit']=!0x0,this['_saveOperationInBuffer'](_0xd20a33);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x284672,_0xfbdbca){let _0x502ec4;this['_offset']=_0x284672['offset'];const _0xbf4902=_0x284672['wereChangesApplied']&&!_0x284672['initData'],_0x1b0596=_0xbf4902?0x0:_0x284672['data']['baseVersion'];if(_0xfbdbca['forEach'](_0x2f9332=>{_0x2f9332['_isInit']=!0x0,_0x2f9332['createdAt']=_0x284672['sessionCreatedAt'],_0x2f9332['_authorId']=null;}),_0xbf4902)_0x502ec4=_0xfbdbca,this['_applyOperationsSet'](_0x502ec4,_0xbf4902);else{if(_0x284672['initData']){const _0x417147=this['_getOperationsFromInitData'](_0x284672['initData']);this['_document']['history']['version']=-_0x417147['length'],_0x417147['forEach'](_0x167a65=>{_0x167a65['baseVersion']-=_0x417147['length'],_0x167a65['createdAt']=_0x284672['sessionCreatedAt'],_0x167a65['_isInit']=!0x0,_0x167a65['_authorId']=null;}),this['_applyOperationsSet'](_0x417147,!0x0),this['serverHistory']['version']=-_0x417147['length']+this['_offset'],this['_updateServerHistory'](_0x417147);}this['_document']['history']['version']=_0x1b0596,_0x502ec4=this['_decompressOperations'](_0x284672['data'],_0x284672['metadata']),await this['_fetchMissingUsers'](_0x502ec4),this['_applyOperationsSet'](_0x502ec4,_0xbf4902);}_0x284672['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x502ec4,_0x284672['lastOperationId']),this['_lastSyncedOperationId']=_0x284672['lastOperationId']),this['serverHistory']['version']=_0x1b0596+this['_offset'],this['_updateServerHistory'](_0x502ec4),_0xfbdbca['filter'](_0x3241c8=>{const _0x3cd3a2=this['_getAffectedRoot'](_0x3241c8);return _0x3cd3a2&&!this['_knownRootNames']['has'](_0x3cd3a2);})['forEach']((_0xe1d332,_0x1d8dc1)=>{_0xe1d332['baseVersion']=this['_document']['version']+_0x1d8dc1,this['_saveOperationInBuffer'](_0xe1d332);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x4caedd,_0xdd0e4c){throw this['_isPendingUpdate']=!0x0,_0xdd0e4c&&console['error'](_0xdd0e4c),new _0xe38d4d(_0x4caedd,this['editor']);}['_saveOperationInBuffer'](_0x3c2e99){this['_knownOperations']['has'](_0x3c2e99)||(this['_knownOperations']['add'](_0x3c2e99),this['_bufferedOperations']['push'](_0x3c2e99),this['_pendingAction']||'marker'==_0x3c2e99['type']&&!_0x3c2e99['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x7eca82=!0x1){!_0x7eca82&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x210fd3=>{_0x210fd3&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x3eea74=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x352769){return _0x352769['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x352769['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x352769['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x3eea74))throw _0x3eea74;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x13c792=>{this['on']('change:_isPendingUpdate',()=>{_0x13c792();});});}async['_sendBufferedOperations'](){const _0x1fc685=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x1fc685['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x6f4cad=[...this['_bufferedOperations']];for(const _0x3a85ea of _0x6f4cad)_0x3a85ea['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x3a85ea);const _0x1064d7=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x6f4cad),_0x1061b1=K++,_0x485b82=this['_compressOperations'](_0x6f4cad),_0x3bb8c1=await this['_service']['sendOperations'](_0x485b82,_0x485b82['baseVersion'],_0x1064d7);try{return await this['_handleServerResponse'](_0x6f4cad,_0x3bb8c1,_0x1061b1);}catch(_0xb9e86c){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0xb9e86c);}}async['_handleServerResponse'](_0x685879,_0x6a0937,_0x16dcba){if('error'in _0x6a0937)throw _0x6a0937['error'];let _0x27980f=!0x1;if(_0x6a0937['wereChangesApplied']){_0x6a0937['lastOperationId']&&(this['_lastSyncedOperationId']=_0x6a0937['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x27236b=>!_0x685879['includes'](_0x27236b));for(const _0x464a12 of _0x685879)_0x464a12['createdAt']='lastOperationAcceptedAt'in _0x6a0937&&_0x6a0937['lastOperationAcceptedAt']||void 0x0;Q(_0x685879,_0x6a0937['version']-_0x685879['length']),this['_updateServerHistory'](_0x685879);const _0x1e5023=_0x685879['filter'](_0x34a2de=>{if(!_0x34a2de['_isInit'])return!0x1;const _0x18bc78=this['_getAffectedRoot'](_0x34a2de);return _0x18bc78&&!this['_knownRootNames']['has'](_0x18bc78);});Q(_0x1e5023,this['_document']['version']),this['_applyOperationsSet'](_0x1e5023),_0x27980f=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x48ae5e=this['_decompressOperations'](_0x6a0937['data'],_0x6a0937['metadata'])['filter'](_0x10a61f=>_0x10a61f['baseVersion']>=this['_lastServerVersion']);_0x48ae5e['forEach'](_0x220143=>this['_addKnownRoot'](_0x220143)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x54ef95=>!_0x54ef95['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x54ef95))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x48ae5e),_0x27980f=this['_handleExternalOperations'](_0x48ae5e,_0x6a0937['version'],_0x6a0937['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x27980f?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x15b0a6,_0x15f813,_0x4b0641){try{const _0x5cebfc={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x192f89,operationsB:_0x340bbe,originalOperations:_0x11f9a0}=_0x441f91(_0x15b0a6,this['_bufferedOperations'],_0x5cebfc);Q(_0x192f89,this['_document']['version']),Q(_0x340bbe,_0x15f813);for(const _0x2f2f47 of _0x192f89){const _0x3c00c5=_0x11f9a0['get'](_0x2f2f47);_0x2f2f47['_authorId']=_0x3c00c5?_0x3c00c5['_authorId']:null;}_0x4b0641&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x15b0a6,_0x4b0641),this['_lastSyncedOperationId']=_0x4b0641),this['_bufferedOperations']=[..._0x340bbe],this['_applyOperationsSet'](_0x192f89),this['_updateServerHistory'](_0x15b0a6);}catch(_0x5aeb7b){return console['error'](_0x5aeb7b),!0x1;}return!0x0;}['_applyOperationsSet'](_0x3b1a23,_0x4844fd=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x3b2f54=>{for(const _0x2397a4 of _0x3b1a23)this['_knownOperations']['add'](_0x2397a4),this['_addKnownRoot'](_0x2397a4),_0x3b2f54['batch']['addOperation'](_0x2397a4),this['editor']['model']['applyOperation'](_0x2397a4);});}['_addKnownRoot'](_0x3b760){const _0x55ddd7=this['_getAffectedRoot'](_0x3b760);_0x55ddd7&&this['_knownRootNames']['add'](_0x55ddd7);}['_getAffectedRoot'](_0x151ac7){let _0x16faa0,_0x342a57;switch(_0x151ac7['type']){case'insert':_0x16faa0=_0x151ac7['position']['root'];break;case'marker':if(_0x342a57=_0x151ac7['newRange'],!_0x342a57)return null;_0x16faa0=_0x342a57['root'];break;case'addRootAttribute':_0x16faa0=_0x151ac7['root'];break;case'addRoot':_0x16faa0=_0x151ac7['affectedSelectable'];break;case'move':_0x16faa0=_0x151ac7['targetPosition']['root'];break;default:return null;}return _0x16faa0['rootName'];}['_updateServerHistory'](_0x275b73){_0x275b73['forEach'](_0x13287d=>{const _0x34b877=_0x13287d['clone']();_0x34b877['_authorId']=_0x13287d['_authorId'],_0x34b877['_isInit']=!!_0x13287d['_isInit'],_0x34b877['createdAt']=_0x13287d['createdAt'],_0x34b877['baseVersion']+=this['_offset'],_0x13287d['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x34b877),this['serverHistory']['addOperation'](_0x34b877);});}['_handleReconnectionError'](_0x290194){const _0x3fd978=this['editor']['plugins']['get']('Notification'),_0x22cde6=this['editor']['locale'];_0x290194||(_0x290194=q(_0x22cde6,'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.')),_0x3fd978['showWarning'](_0x290194,{'title':q(_0x22cde6,'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'](_0x4833cd)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x4833cd)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x1564f2){const _0x2ea639=_0x1564f2['map'](_0x2c5545=>_0x2c5545['toJSON']());return this['_compressor']['compress'](_0x2ea639);}['_decompressOperations'](_0x4eb102,_0x587090){return this['_compressor']['decompress'](_0x4eb102)['map']((_0x1d87fd,_0x506e9b)=>{const _0x5bcc4d='init'==_0x587090[_0x506e9b]['type'];if('InsertOperation'==_0x1d87fd['__className']){const _0x229b8e=_0x1d87fd['position']['root'];!this['_document']['getRoot'](_0x229b8e)&&(this['_document']['createRoot']('$root',_0x229b8e)['_isAttached']=!0x1);}const _0x58202e=_0x1da843['fromJSON'](_0x1d87fd,this['_document']);return _0x58202e['wasUndone']=_0x1d87fd['wasUndone'],_0x58202e['_isInit']=_0x5bcc4d,_0x58202e['_authorId']=_0x5bcc4d?null:_0x587090[_0x506e9b]['userId'],_0x58202e['_isDisconnection']='cs:removeUser'===_0x587090[_0x506e9b]['type'],_0x58202e['createdAt']=_0x587090[_0x506e9b]['createdAt'],_0x58202e;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x22c67b=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x22c67b&&_0x22c67b['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x50d74c,_0x25bf02){for(const _0x349edf of _0x50d74c)_0x349edf['baseVersion']=_0x25bf02++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x317908){this['_ignoredOperations']=_0x317908,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x1df81b){let _0x5d0234=_0x1df81b['length'];for(;_0x5d0234--;){const _0x27366b=_0x1df81b[_0x5d0234];if(!this['_ignoredOperations']['has'](_0x27366b)){if(!this['_operationToId']['has'](_0x27366b)){const _0x29d23b=_0x12fe26()['slice'](0x1,0x12);this['_operationToId']['set'](_0x27366b,_0x29d23b);}return this['_operationToId']['get'](_0x27366b);}}}['setIdForTheLastOperation'](_0x1b9149,_0x8faa88){if(!_0x8faa88)return;let _0x5a5644=_0x1b9149['length'];for(;_0x5a5644--;){const _0x589f89=_0x1b9149[_0x5a5644];this['_ignoredOperations']['has'](_0x589f89)||this['_operationToId']['set'](_0x589f89,_0x8faa88);}}}class n extends _0x614839{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x3b6d3b{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
- ((()=>_0x50a9ea)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x2d8d29];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x2fa2f5){super(_0x2fa2f5),this['_services']=new Map();}async['init'](){const _0x2bdb0d=this['context'],_0x54b264=_0x2bdb0d['plugins']['get']('CommentsRepository');if(_0x2bdb0d['plugins']['get'](c)['addToReconnectionStack'](this),_0x54b264['adapter']={'addCommentThread':async({channelId:_0x22dad7,threadId:_0x4ebb7a,comments:_0x38422b,resolvedAt:_0x43f149,resolvedBy:_0x2036fe,context:_0x1a51ae,attributes:_0x9dd96})=>{const _0x19f504=await this['_getService'](_0x22dad7)['addCommentThread']({'commentThreadId':_0x4ebb7a,'comments':_0x38422b['map'](_0x5295ed=>function(_0x4efd8b,_0x114641,_0x5ec317){return{'commentThreadId':_0x5ec317,'commentId':_0x4efd8b['commentId'],'userId':_0x4efd8b['authorId'],'content':_0x4efd8b['content'],'documentId':_0x114641,'createdAt':_0x4efd8b['createdAt'],'attributes':_0x4efd8b['attributes']||{}};}(_0x5295ed,_0x22dad7,_0x4ebb7a)),'resolvedAt':_0x43f149,'resolvedBy':_0x2036fe,'context':_0x1a51ae,'attributes':_0x9dd96})['catch'](ut);return{'threadId':_0x19f504['commentThreadId'],'comments':_0x19f504['comments']};},'getCommentThread':async({channelId:_0x3c20b1,threadId:_0x5a5cb4})=>{const _0x136228=await this['_getService'](_0x3c20b1)['getCommentThread'](_0x5a5cb4)['catch'](ut);return _0x136228['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x136228]),{'threadId':_0x136228['commentThreadId'],'comments':_0x136228['comments']['map'](S),'context':_0x136228['context'],'resolvedAt':_0x136228['resolvedAt'],'resolvedBy':_0x136228['resolvedBy'],'attributes':_0x136228['attributes']||{}});},'updateCommentThread':async({channelId:_0x21ab7f,threadId:_0x5278ff,context:_0x2cbb39,unlinkedAt:_0xa5e221,attributes:_0x246524})=>this['_getService'](_0x21ab7f)['updateCommentThread']({'commentThreadId':_0x5278ff,'context':_0x2cbb39,'attributes':_0x246524,'unlinkedAt':_0xa5e221})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x1e067e,threadId:_0x2befd5})=>{const _0x4ade0c=await this['_getService'](_0x1e067e)['resolveCommentThread'](_0x2befd5)['catch'](B)['catch'](ut);return{'threadId':_0x4ade0c['commentThreadId'],'resolvedAt':_0x4ade0c['resolvedAt'],'resolvedBy':_0x4ade0c['resolvedBy']};},'reopenCommentThread':async({channelId:_0x140576,threadId:_0x8fef91})=>this['_getService'](_0x140576)['reopenCommentThread'](_0x8fef91)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x3e1bfb,threadId:_0x180b71})=>this['_getService'](_0x3e1bfb)['removeCommentThread'](_0x180b71)['catch'](B)['catch'](ut),'addComment':({channelId:_0x339524,threadId:_0x1c0396,commentId:_0x21f7d7,content:_0x2f4719,attributes:_0x586ed7})=>this['_getService'](_0x339524)['addComment'](_0x1c0396,_0x21f7d7,_0x2f4719,_0x586ed7)['catch'](ut),'updateComment':({channelId:_0x2d9986,threadId:_0x3b0710,commentId:_0x25e75c,content:_0x3828c3,attributes:_0x403a15})=>this['_getService'](_0x2d9986)['updateComment'](_0x3b0710,_0x25e75c,_0x3828c3,_0x403a15)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x2fd0b2,threadId:_0x1ba8bc,commentId:_0x509919})=>this['_getService'](_0x2fd0b2)['removeComment'](_0x1ba8bc,_0x509919)['catch'](B)['catch'](ut)},_0x2bdb0d instanceof _0x404775){const _0x2e9ffe=_0x2bdb0d['config']['get']('collaboration.channelId'),_0x20f4ab=_0x2bdb0d['plugins']['get'](r);await this['_setUpService'](_0x2e9ffe);const _0x2e578f=await this['_services']['get'](_0x2e9ffe)['getConnectedSessions']();this['listenTo'](_0x20f4ab,'sessionAdd:'+_0x2e9ffe,(_0x480ac4,{session:_0x14cadf})=>{_0x14cadf['id']===_0x20f4ab['mySessionId']&&(_0x480ac4['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x14cadf['permissions'],_0x2e9ffe));}),_0x20f4ab['register'](_0x2e9ffe,_0x2e578f);}}async['_setUpService'](_0x292299){if(this['_services']['has'](_0x292299))throw new _0xe38d4d('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x292299});const _0x40f3c6=this['context']['plugins']['get']('CommentsRepository'),_0x2fceeb=new a['CommentsService'](_0x292299);this['_services']['set'](_0x292299,_0x2fceeb),this['listenTo'](_0x2fceeb,'commentThreadAdded',(_0x645f3,_0x13d451)=>{const {commentThreadId:_0x1c1a9b,documentId:_0x4e6fc5,context:_0x191eb5,attributes:_0x5761ce,resolvedAt:_0x26f437,resolvedBy:_0x3ca0d8,comments:_0x33bd88}=_0x13d451;_0x40f3c6['getCommentThread'](_0x1c1a9b)||_0x40f3c6['addCommentThread']({'threadId':_0x1c1a9b,'channelId':_0x4e6fc5,'comments':_0x33bd88?_0x33bd88['map'](S):[],'context':_0x191eb5,'attributes':_0x5761ce,'resolvedAt':_0x26f437,'resolvedBy':_0x3ca0d8,'isFromAdapter':!0x0});}),this['listenTo'](_0x2fceeb,'commentThreadUpdated',(_0x1c0600,{commentThreadId:_0x1dd4f5,documentId:_0x5a8155,context:_0x585d6a,unlinkedAt:_0x2eadae,attributes:_0x50fbcb})=>{_0x40f3c6['getCommentThread'](_0x1dd4f5)&&_0x40f3c6['updateCommentThread']({'threadId':_0x1dd4f5,'channelId':_0x5a8155,'context':_0x585d6a,'unlinkedAt':_0x2eadae,'attributes':_0x50fbcb,'isFromAdapter':!0x0});}),this['listenTo'](_0x2fceeb,'commentThreadResolved',(_0x2e5d64,{commentThreadId:_0x111ec3,resolvedBy:_0x3339cf,resolvedAt:_0x7433d8})=>{const _0x124985=_0x40f3c6['getCommentThread'](_0x111ec3);_0x124985&&_0x124985['resolve']({'resolvedBy':_0x3339cf,'resolvedAt':_0x7433d8,'isFromAdapter':!0x0});}),this['listenTo'](_0x2fceeb,'commentThreadReopened',(_0x175f0a,{commentThreadId:_0x2b61b7})=>{const _0x2eb10c=_0x40f3c6['getCommentThread'](_0x2b61b7);_0x2eb10c&&_0x2eb10c['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x2fceeb,'commentThreadRemoved',(_0x4390c4,{commentThreadId:_0x46e18f})=>{const _0x268593=_0x40f3c6['getCommentThread'](_0x46e18f);_0x268593&&_0x268593['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x2fceeb,'commentAdded',(_0x29fc17,_0x51ec99)=>{const _0x291c29=_0x51ec99['commentThreadId'],_0x1dfd49=_0x40f3c6['getCommentThread'](_0x291c29);_0x1dfd49&&_0x1dfd49['addComment']({...S(_0x51ec99),'isFromAdapter':!0x0});}),this['listenTo'](_0x2fceeb,'commentUpdated',(_0x43d672,{commentThreadId:_0x29b8a8,commentId:_0x2e47c8,content:_0xae9626,attributes:_0x1adb33})=>{const _0xc0e252=_0x40f3c6['getCommentThread'](_0x29b8a8);if(_0xc0e252){const _0x20832d=_0xc0e252['getComment'](_0x2e47c8);_0x20832d&&_0x20832d['update']({'content':_0xae9626,'attributes':_0x1adb33,'isFromAdapter':!0x0});}}),this['listenTo'](_0x2fceeb,'commentRemoved',(_0x371c38,{commentThreadId:_0x96b881,commentId:_0x4d4ee3})=>{const _0x221f58=_0x40f3c6['getCommentThread'](_0x96b881);if(_0x221f58){const _0x1e4b98=_0x221f58['getComment'](_0x4d4ee3);_0x1e4b98&&_0x1e4b98['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x292299);}['destroy'](){if(this['context']instanceof _0x404775){const _0x5cabdb=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x5cabdb);}}['_terminateService'](_0x497e71){if(!this['_services']['has'](_0x497e71))throw new _0xe38d4d('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x497e71});this['_getService'](_0x497e71)['disconnect'](),this['_services']['delete'](_0x497e71);}async['reconnect'](){for(const _0x5f0b2d of this['_services']['keys']())await this['_connectService'](_0x5f0b2d);if(this['context']instanceof _0x404775){const _0x52767a=this['context']['config']['get']('collaboration.channelId'),_0x4809f6=this['context']['plugins']['get'](r);_0x4809f6['unregister'](_0x52767a);const _0x481482=await this['_services']['get'](_0x52767a)['getConnectedSessions']();_0x4809f6['register'](_0x52767a,_0x481482);}}async['_connectService'](_0x377f51){const {connection:_0x31a6ae}=this['context']['plugins']['get'](c),_0x57e34c=this['context']['plugins']['get']('CommentsRepository'),_0x207558=this['_services']['get'](_0x377f51),_0x270066=await _0x207558['connect'](_0x31a6ae);await this['_fetchMissingUsersForThreads'](_0x270066);const _0xc453fb=new Set(Array['from'](_0x57e34c['getCommentThreads']({'channelId':_0x377f51}),_0x190b64=>_0x190b64['id']));for(const _0x330c47 of _0x270066)_0x330c47['deletedAt']||_0xc453fb['delete'](_0x330c47['commentThreadId']);for(const _0x5d8925 of _0xc453fb)_0x57e34c['getCommentThread'](_0x5d8925)['remove']({'isFromAdapter':!0x0});for(const _0x5cb301 of _0x270066){let _0x106d9e=_0x57e34c['getCommentThread'](_0x5cb301['commentThreadId']);const {commentThreadId:_0x2631e0,context:_0x596bac,attributes:_0x1dfafa,resolvedBy:_0x1a67ef,resolvedAt:_0x5d67dc,unlinkedAt:_0x79138a,deletedAt:_0x28db10}=_0x5cb301;if(_0x28db10)continue;_0x106d9e||(_0x106d9e=_0x57e34c['addCommentThread']({'channelId':_0x377f51,'threadId':_0x2631e0,'context':_0x596bac,'attributes':_0x1dfafa||{},'resolvedBy':_0x1a67ef,'resolvedAt':_0x5d67dc,'unlinkedAt':_0x79138a,'isFromAdapter':!0x0}));const _0x3606e7=new Set(Array['from'](_0x106d9e['comments'],_0x3cafa2=>_0x3cafa2['id']));for(const _0x5dbb2 of _0x5cb301['comments'])_0x3606e7['delete'](_0x5dbb2['commentId']);for(const _0x52ceb0 of _0x3606e7)_0x106d9e['getComment'](_0x52ceb0)['remove']({'isFromAdapter':!0x0});for(const _0x3ed2dc of _0x5cb301['comments']){const _0x5c400c=_0x106d9e['getComment'](_0x3ed2dc['commentId']);_0x5c400c?_0x5c400c['content']!==_0x3ed2dc['content']&&_0x5c400c['update']({'content':_0x3ed2dc['content'],'isFromAdapter':!0x0}):_0x106d9e['addComment'](Object['assign'](S(_0x3ed2dc),{'isFromAdapter':!0x0}));}}}['_getService'](_0x10d2e9){if(!this['_services']['has'](_0x10d2e9))throw new _0xe38d4d('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x10d2e9});return this['_services']['get'](_0x10d2e9);}async['_fetchMissingUsersForThreads'](_0x43fc53){const _0xc5e96a=this['context']['plugins']['get'](_0x2d8d29),{connection:_0x30e741}=this['context']['plugins']['get'](c),_0x2193fe=new Set();for(const {resolvedBy:_0x4c3e5a,comments:_0x5cb1aa}of _0x43fc53){_0x4c3e5a&&!_0xc5e96a['getUser'](_0x4c3e5a)&&_0x2193fe['add'](_0x4c3e5a);for(const {userId:_0x406a8f}of _0x5cb1aa)_0xc5e96a['getUser'](_0x406a8f)||_0x2193fe['add'](_0x406a8f);}if(0x0===_0x2193fe['size'])return;const _0x5274b4=await lt['getMany'](_0x30e741,Array['from'](_0x2193fe));for(const _0x1c2446 of _0x5274b4)_0xc5e96a['getUser'](_0x1c2446['id'])||_0xc5e96a['addUser'](_0x1c2446);}}async function B(_0x2c1fb0){if('404'!==_0x2c1fb0['code'])throw _0x2c1fb0;}function ut(_0x25a351){if((_0x84a786=_0x25a351)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x84a786['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x84a786['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x84a786;throw _0x25a351;}function S(_0x7ef85e){return{'threadId':_0x7ef85e['commentThreadId'],'commentId':_0x7ef85e['commentId'],'content':_0x7ef85e['content'],'createdAt':_0x7ef85e['createdAt'],'authorId':_0x7ef85e['userId'],'attributes':_0x7ef85e['attributes']||{}};}class g extends _0x614839{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
- ((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x242026){super(_0x242026);const _0x108051=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x108051);}['init'](){const _0x4a735d=this['editor']['plugins']['get'](c),_0x435dfd=this['editor']['plugins']['get']('TrackChangesEditing');return _0x435dfd['adapter']={'getSuggestion':async _0x3d7f31=>{await this['_waitForServiceReady']();const _0x5ef040=await this['_trackChangesService']['get'](_0x3d7f31)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x5ef040]),_0x5ef040;},'addSuggestion':async({id:_0x54669d,type:_0x24ad85,data:_0x250a4c,originalSuggestionId:_0x4f4e37,attributes:_0x59a118})=>{await this['_waitForServiceReady']();const _0x2e475a={'id':_0x54669d,'type':_0x24ad85,'data':_0x250a4c,'originalSuggestionId':_0x4f4e37,'attributes':_0x59a118},_0xf8fc91=await this['_trackChangesService']['add'](_0x54669d,_0x24ad85,_0x250a4c,_0x4f4e37,_0x59a118)['catch'](_0x2316a7=>{if(ft(_0x2316a7))return new Promise(_0x854b64=>{this['_bufferedRequests']['set'](_0x54669d,{'resolve':_0x854b64,'suggestionData':_0x2e475a});});throw _0x2316a7;});return this['_bufferedRequests']['delete'](_0x54669d),_0xf8fc91;},'updateSuggestion':async(_0x568d5e,_0x4df245)=>{if(await this['_waitForServiceReady'](),'open'!==_0x4df245['state'])return this['_trackChangesService']['update'](_0x568d5e,_0x4df245)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x2f4be8,_0x1ec430)=>{_0x435dfd['hasSuggestion'](_0x1ec430['id'])&&(_0x435dfd['getSuggestion'](_0x1ec430['id'])['attributes']=_0x1ec430['attributes']);}),this['_trackChangesService']['connect'](_0x4a735d['connection'])['then'](_0x347342=>(_0x4a735d['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x347342)['then'](()=>{for(const _0xbaebe0 of _0x347342){_0x435dfd['addSuggestionData'](_0xbaebe0)['_saved']=!0x0;}})));}async['reconnect'](){const _0x2ed28d=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0xaea899}=this['editor']['plugins']['get'](c),_0x14efb9=await this['_trackChangesService']['connect'](_0xaea899);await this['_fetchMissingUsersForThreads'](_0x14efb9);for(const {suggestionData:_0x43d091,resolve:_0x4c615b}of this['_bufferedRequests']['values']()){let _0x55e792=_0x14efb9['find'](_0x2c9196=>_0x2c9196['id']===_0x43d091['id']);_0x55e792||(_0x55e792=await this['_trackChangesService']['add'](_0x43d091['id'],_0x43d091['type'],_0x43d091['data'],_0x43d091['originalSuggestionId'])),_0x4c615b(_0x55e792);}for(const _0x3e0dd7 of _0x14efb9)_0x2ed28d['hasSuggestion'](_0x3e0dd7['id'])||_0x2ed28d['addSuggestionData'](_0x3e0dd7);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x2fb640=>{this['listenTo'](this['_trackChangesService'],'connected',_0x2e1bec=>{_0x2e1bec['off'](),_0x2fb640();});});}async['_fetchMissingUsersForThreads'](_0x543ae0){const _0x2aae00=this['editor']['plugins']['get'](_0x2d8d29),{connection:_0x5b31d9}=this['editor']['plugins']['get'](c),_0x2da016=new Set();for(const {authorId:_0x58fb32}of _0x543ae0)_0x2aae00['getUser'](_0x58fb32)||_0x2da016['add'](_0x58fb32);if(0x0===_0x2da016['size'])return;const _0x56edc8=await lt['getMany'](_0x5b31d9,Array['from'](_0x2da016));for(const _0x3f8a40 of _0x56edc8)_0x2aae00['getUser'](_0x3f8a40['id'])||_0x2aae00['addUser'](_0x3f8a40);}}function R(_0x3e1ac5){if(ft(_0x3e1ac5))return new Promise(()=>{});throw _0x3e1ac5;}function ft(_0x1deb4d){return _0x1deb4d['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1deb4d['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x614839{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x16221b=this['editor']['plugins']['get'](c),_0x1bf6d4=this['editor']['plugins']['get']('CommentsEditing'),_0xc8d479=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x16221b,'change:state',(_0x9dcead,_0x43cf73,_0x115175)=>{_0x1bf6d4['isThreadsLoadingPaused']='connected'!==_0x115175;});}),this['listenTo'](_0x16221b,'change:state',(_0x119d2c,_0x5d6a42,_0x41b6da)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x41b6da);}),_0xc8d479['_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 _0x614839{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x614839{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
- ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x2d8d29];}constructor(_0x400e9c){super(_0x400e9c);const _0x2d5a0b=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x2d5a0b);}async['init'](){const _0x2c2045=this['editor']['plugins']['get'](l),_0x1c755e=_0x2c2045['serverHistory'],_0x4d0cfd=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x1c755e,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x2c2045['sessionId']});const _0x59c998=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x23bad5=await tt['isBundleUploaded'](_0x4d0cfd['connection'],_0x59c998);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x1ba8c8})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x1ba8c8)),'updateRevisions':async _0x29bfa0=>{await this['_waitForServiceReady']();const _0x16a7ba=this['_revisionTracker']['currentRevision'];if(_0x23bad5&&0x1===_0x29bfa0['length']&&_0x29bfa0[0x0]['id']===_0x16a7ba['id'])return _0x29bfa0;for(const _0x4ac6de of _0x29bfa0)_0x4ac6de['id']===_0x16a7ba['id']&&(_0x4ac6de['isEmptyCurrent']=_0x4ac6de['fromVersion']===_0x4ac6de['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x29bfa0,this['_lastRequestId'])['then'](_0x4e7d48=>(this['_lastRequestId']=_0x4e7d48,_0x29bfa0))['catch'](_0x128f99=>{if(st(_0x128f99)||'400'===_0x128f99['code']&&void 0x0!==_0x128f99['data']['wrongRequestId']){for(const _0x46116c of _0x29bfa0){!this['_revisionTracker']['repository']['getRevision'](_0x46116c['id'])||this['_revisionTracker']['_bufferUpdate'](_0x46116c['id'],_0x46116c,!0x1);}if(st(_0x128f99))throw _0x128f99;return _0x29bfa0;}throw _0x128f99;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x3a454c,{revisionsData:_0x406cf4,requestId:_0xd4d6e7})=>{Math['max'](..._0x406cf4['map'](_0x355b4f=>_0x355b4f['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x406cf4,_0xd4d6e7);}):this['_handleRevisionsUpdate'](_0x406cf4,_0xd4d6e7);});const {revisions:_0x56ddda,requestId:_0x510b27}=await this['_revisionHistoryService']['connect'](_0x4d0cfd['connection']);_0x4d0cfd['addToReconnectionStack'](this),this['_lastRequestId']=_0x510b27,await this['_fetchMissingUsers'](_0x56ddda);for(const _0x3a06ae of _0x56ddda)this['_revisionTracker']['addRevisionData'](_0x3a06ae);this['listenTo'](_0x2c2045,'change:_isConnected',(_0x2e5229,_0x3512a4,_0x84a0d8)=>{_0x84a0d8&&(this['_oldOffset']=_0x2c2045['_offset'],_0x2e5229['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x4d0cfd,'state',_0x1d8a1c=>_0x1d8a1c===_0x1e1daf['CONNECTED']);}async['reconnect'](){const _0x2660b5=this['editor']['plugins']['get'](c),_0x134a72=this['editor']['plugins']['get'](l),_0x389fdf=async()=>{const _0x187f09=this['_revisionTracker']['currentRevision'],_0x31112b=_0x187f09['id'],_0x2ef4b9=_0x31112b!==_0x134a72['sessionId'];if(_0x2ef4b9){const _0x781fe0=_0x134a72['_offset']-this['_oldOffset'],_0x374539=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x187f09['toVersion']+_0x781fe0!==_0x374539){const _0x8c1440=_0x187f09['fromVersion']+_0x781fe0,_0xc8c4c6=this['editor']['plugins']['get'](_0x2d8d29),_0x3ae5f9=this['_revisionTracker']['buildRevisionData']({'revision':_0x187f09,'from':_0x8c1440,'to':_0x374539});_0x3ae5f9['id']=_0x187f09['id'];const _0x3b3eb1=_0x3ae5f9['authorsIds']['map'](_0x3f002d=>_0xc8c4c6['getUser'](_0x3f002d));_0x187f09['_update']({..._0x3ae5f9,'authors':_0x3b3eb1},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x187f09['id'],_0x3ae5f9,!0x0);}this['_revisionTracker']['_startingVersion']=_0x374539,(_0x187f09['toVersion']===_0x187f09['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x31112b)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x31112b),this['_revisionTracker']['_createCurrentRevision'](_0x374539));}const {revisions:_0x35d982,requestId:_0x81c00b}=await this['_revisionHistoryService']['reconnect'](_0x2660b5['connection'],this['_lastRequestId']);_0x2ef4b9&&_0x35d982['length']>0x0?_0x134a72['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x35d982),this['_handleRevisionsUpdate'](_0x35d982,_0x81c00b),this['_revisionTracker']['sendBufferedUpdates']());};return _0x134a72['_isConnected']?_0x389fdf():new Promise((_0x4cb2ff,_0x13ab96)=>{_0x134a72['once']('change:_isConnected',()=>{_0x389fdf()['then'](_0x4cb2ff)['catch'](_0x13ab96);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0xf66057=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x482cf5=>{_0x482cf5['off'](),_0xf66057();});});}['_getLatestVersionFromServerOperations'](){const _0x2168e1=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x145dba of _0x2168e1)if('marker'!==_0x145dba['type']||_0x145dba['affectsData'])return _0x145dba['baseVersion']+0x1;}['_getLatestVersion'](){const _0x334cdd=this['editor']['plugins']['get'](l);return new Promise(_0x48a00b=>{_0x334cdd['_isPendingUpdate']?_0x334cdd['once']('change:_isPendingUpdate',()=>{_0x48a00b(this['_getLatestVersionFromServerOperations']());}):_0x48a00b(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x1ae9f9,_0x212053){const _0x516181=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x212053;for(const _0x5de134 of _0x1ae9f9){const _0x2139c3=_0x516181['getRevision'](_0x5de134['id']);if(_0x2139c3){if((_0x5de134['fromVersion']||_0x5de134['toVersion'])&&(_0x5de134['diffData']=null),_0x2139c3===this['_revisionTracker']['currentRevision']){const _0x181af5=Math['max'](_0x2139c3['toVersion'],_0x5de134['toVersion']),_0x5d1bcd=Math['max'](_0x2139c3['fromVersion'],_0x5de134['fromVersion']);let _0x2c8fa0;_0x2139c3['toVersion']===_0x5de134['toVersion']&&_0x2139c3['fromVersion']===_0x5de134['fromVersion']?(_0x2c8fa0=!0x0,this['_preventResendingRevisionData'](_0x5de134)):_0x5de134['toVersion']===_0x181af5&&_0x5de134['fromVersion']===_0x5d1bcd?_0x2c8fa0=!0x1:(_0x2139c3['toVersion']===_0x181af5&&_0x2139c3['fromVersion']===_0x5d1bcd||this['_fixRevision']({'revision':_0x2139c3,'from':_0x5d1bcd,'to':_0x181af5}),_0x2c8fa0=!0x0),_0x2c8fa0&&(delete _0x5de134['fromVersion'],delete _0x5de134['toVersion'],delete _0x5de134['diffData'],delete _0x5de134['createdAt'],delete _0x5de134['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x5de134),this['_preventResendingRevisionData'](_0x5de134);}else this['_revisionTracker']['addRevisionData'](_0x5de134);}const _0x47d116=_0x516181['getRevisions']();_0x47d116['reverse']();for(let _0x35859a=0x0;_0x35859a<_0x47d116['length']-0x1;_0x35859a++){const _0x1bdae3=_0x47d116[_0x35859a],_0x2b0366=_0x47d116[_0x35859a+0x1];if(_0x1bdae3['fromVersion']<_0x2b0366['toVersion']){const _0x5a5841=_0x2b0366['toVersion'],_0x5614df=Math['max'](_0x5a5841,_0x1bdae3['toVersion']);this['_fixRevision']({'revision':_0x1bdae3,'from':_0x5a5841,'to':_0x5614df});}}}['_fixRevision']({revision:_0x2d4d04,from:_0x4066a1,to:_0x4876b8}={}){const _0x573da9=this['editor']['plugins']['get'](_0x2d8d29),_0x30aedc=this['_revisionTracker']['buildRevisionData']({'revision':_0x2d4d04,'from':_0x4066a1,'to':_0x4876b8});_0x30aedc['authors']=_0x30aedc['authorsIds']['map'](_0x48a52e=>_0x573da9['getUser'](_0x48a52e)),_0x2d4d04['_update'](_0x30aedc);}['_preventResendingRevisionData'](_0x2822bf){const _0x180a23={};_0x180a23['id']=_0x2822bf['id'];for(const _0x5a5264 of Object['keys'](_0x2822bf))'id'!==_0x5a5264&&(_0x180a23[_0x5a5264]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x180a23['id'],_0x180a23,!0x0);}async['_fetchMissingUsers'](_0x5455a9){const _0x2058bb=this['editor']['plugins']['get'](_0x2d8d29),{connection:_0x24cbd9}=this['editor']['plugins']['get'](c),_0x491a9f=new Set();for(const _0x3a5550 of _0x5455a9){for(const _0x34f17a of _0x3a5550['authorsIds'])_0x3fdf96(_0x34f17a);_0x3a5550['creatorId']&&_0x3fdf96(_0x3a5550['creatorId']);}if(0x0===_0x491a9f['size'])return;const _0x5406ab=await lt['getMany'](_0x24cbd9,Array['from'](_0x491a9f));for(const _0x130611 of _0x5406ab)_0x2058bb['getUser'](_0x130611['id'])||_0x2058bb['addUser'](_0x130611);function _0x3fdf96(_0x5610e2){_0x2058bb['getUser'](_0x5610e2)||_0x491a9f['add'](_0x5610e2);}}}function st(_0x446f0a){return _0x446f0a['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x446f0a['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x446f0a['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x614839{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x475f4b{constructor(_0x2e6415){super(_0x2e6415);const _0x53a9d1=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x53a9d1['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x53a9d1['to']('usersCount',_0x56c4c5=>q(_0x2e6415,'CONNECTED_USERS',_0x56c4c5))}]});}}class es extends _0x475f4b{['items'];['keystrokes'];constructor(_0xa424ca){super(_0xa424ca);const _0x28897f=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x3a3582(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x28897f['if']('hasPopup'),'aria-expanded':_0x28897f['to']('isExpanded',_0x1f7bdd=>this['hasPopup']&&String(_0x1f7bdd)),'aria-label':_0x28897f['to']('hasPopup',_0xc0c7b5=>q(_0xa424ca,_0xc0c7b5?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x28897f['to']('hasPopup',_0x3e7d73=>!!_0x3e7d73&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x28897f['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x2f8ae0,_0x11b059,_0x35c14f)=>{this['element']&&(_0x35c14f?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 _0x475f4b{['counterView'];['inlineListView'];constructor(_0x68c112){super(_0x68c112);const _0x52a2f9=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x68c112),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x95f0b7 of this['inlineListView']['items'])_0x95f0b7['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',_0x52a2f9['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x475f4b{['listWrapperView'];constructor(_0x484353,_0x1fdc1c){super(_0x484353),this['listWrapperView']=new mt(_0x484353,_0x1fdc1c),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x484353,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x2c56d7{constructor(_0xc110f5,_0x3f6ae1){super(_0xc110f5);const _0x52dbae=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x3f6ae1?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x52dbae['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x52dbae['to']('role'),'aria-label':_0x52dbae['to']('ariaLabel'),'aria-labelledby':_0x52dbae['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x1e8603['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x1efd31=this['element'];_0x1efd31&&(this['_isScrollable']=Math['max'](_0x1efd31['scrollHeight'],_0x1efd31['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x185e09,_0x5a5687,_0x3fb2c8){super(_0x185e09);const _0x186794=this['bindTemplate'];this['userView']=new ct(_0x185e09,_0x5a5687);const _0x317bb0={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x5a5687['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x5a5687['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x5a5687['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x3fb2c8&&(_0x317bb0['tag']='button',_0x317bb0['on']={'click':_0x186794['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x317bb0);}['focus'](){this['element']['focus']();}}class y extends _0x475f4b{['userView'];['markerView'];constructor(_0x2bdf6b,_0x2f3741,_0xb369cf){super(_0x2bdf6b);const _0x4f35d9=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x2bdf6b,_0x2f3741),this['markerView']=new at(_0x2bdf6b,_0x2f3741);const _0x5051ba=new ot(_0x2bdf6b);_0x5051ba['template']['tag']='span',_0x5051ba['text']=_0x2f3741['name'];const _0x210450={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x4f35d9['to']('isFocusable',_0x401658=>!!_0x401658&&0x0),'aria-labelledby':_0x5051ba['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x4f35d9['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x4f35d9['to']('hasTooltip',_0x2bd6e3=>!_0x2bd6e3),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x5051ba]};_0xb369cf&&(_0x210450['tag']='button',_0x210450['on']={'click':_0x4f35d9['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x210450);}}class at extends _0x475f4b{constructor(_0x17ae77,_0x104c2d){super(_0x17ae77),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x104c2d['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x3b6d3b{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x1d2204){super(_0x1d2204),this['context']['config']['define']('presenceList',A);const _0x18dee7=_0x1d2204['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x18dee7)throw new _0xe38d4d('presencelist-collapseat-invalid-format',this);if(_0x18dee7<0x1)throw new _0xe38d4d('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x55b8d7(),this['balloonPanelView']=new _0x3bd4c7(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x1473ea of this['_allConnectedUsers'])this['_handleUserAdd'](_0x1473ea);this['listenTo'](this['_allConnectedUsers'],'add',(_0x368b7c,_0x2c2a2b)=>{this['_handleUserAdd'](_0x2c2a2b);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x2562c6,_0x428ecb)=>{this['_handleUserRemove'](_0x428ecb);});}['_createView'](){const _0x2060a3=this['context'],_0x176844=new L(this['context']['locale']),_0x1e857a=this['balloonPanelView'];if(!_0x5be7ed(_0x2060a3['config']['get']('presenceList.container')))throw new _0xe38d4d('presencelist-missing-container',this);return _0x176844['counterView']['bind']('usersCount')['to'](this),_0x176844['bind']('isCollapsed')['to'](this,'usersCount',_0x315c3e=>{const {collapseAt:_0x28e3cc,displayMe:_0x1eb371}=_0x2060a3['config']['get']('presenceList'),_0x16ebc5=_0x315c3e>=_0x28e3cc;return _0x176844['counterView']['isHidden']=!(0x1==_0x315c3e&&_0x1eb371||_0x16ebc5),_0x16ebc5||this['hideDropdown'](),_0x16ebc5;}),_0x176844['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0xc50c10=>{const _0x283544=_0x2060a3['config']['get']('presenceList'),_0x2047ef=new y(_0x2060a3['locale'],_0xc50c10,!!_0x283544['onClick']);return _0x2047ef['bind']('hasTooltip')['to'](_0x176844,'isCollapsed',_0x51e88a=>!_0x51e88a),_0x2047ef['bind']('isFocusable')['to'](_0x176844,'isCollapsed',_0x2a1357=>!_0x2a1357),_0x283544['onClick']&&this['listenTo'](_0x2047ef,'execute',()=>{this['view']['isCollapsed']||_0x283544['onClick'](_0xc50c10,_0x2047ef['element']);}),_0x2047ef;}),this['listenTo'](_0x176844['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x176844['inlineListView']['keystrokes']['set']('Enter',(_0x49c236,_0xb4ad29)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0xb4ad29());}),_0x176844['render'](),_0x1e857a['render'](),_0x24f9cd({'emitter':_0x176844,'activator':()=>_0x1e857a['isVisible'],'contextElements':[_0x1e857a['element'],_0x176844['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x2060a3['config']['get']('presenceList.container')['appendChild'](_0x176844['element']),this['_bodyCollection']=new _0x517c28(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x176844;}['_handleUserAdd'](_0x377209){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x377209['isMe'])return;const _0x3b6380=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x3b6380&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x3e3061=_0x377209['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x377209,_0x3e3061);}['_handleUserRemove'](_0x2528de){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x2528de['id'])&&(this['currentDisplayedUsers']['remove'](_0x2528de['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x2c4f6b of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x2c4f6b['id']))return void this['currentDisplayedUsers']['add'](_0x2c4f6b,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x427175=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x427175['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x81f5d2}=this['presenceDropdownView'];_0x81f5d2['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x362b17=>{if(!_0x427175['displayMe']&&_0x362b17['isMe'])return null;const _0x28089d=new k(this['context']['locale'],_0x362b17,!!_0x427175['onClick']);return _0x427175['onClick']&&this['listenTo'](_0x28089d,'execute',()=>{_0x427175['onClick'](_0x362b17,_0x28089d['element']);}),_0x28089d;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x81f5d2['focus'](),_0x81f5d2['checkIfScrollable']();const _0x340cfe=(_0x2dff18,_0x23a380)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x23a380();};_0x81f5d2['keystrokes']['set']('Esc',_0x340cfe),_0x81f5d2['keystrokes']['set']('Shift+Tab',_0x340cfe),_0x81f5d2['keystrokes']['set']('Tab',(_0x564d4c,_0x12f414)=>{!function(_0x4103eb){const _0x17cdab=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x5283ec=>_0x5283ec+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x9a6e14=[...document['body']['querySelectorAll'](_0x17cdab)]['filter'](_0x513dd2=>_0x513dd2===document['activeElement']||_0x513dd2['offsetWidth']+_0x513dd2['offsetHeight']>0x0)['sort']((_0x38616a,_0x217f49)=>(_0x38616a['tabIndex']||0x0)-(_0x217f49['tabIndex']||0x0)),_0x31dc0a=_0x9a6e14['indexOf'](_0x4103eb),_0x5646d0=_0x9a6e14[(_0x31dc0a+0x1)%_0x9a6e14['length']];_0x5646d0&&_0x5646d0['focus']();}(this['view']['element']),this['hideDropdown'](),_0x12f414();}),_0x81f5d2['focusTracker']['add'](this['view']['element']),_0x81f5d2['focusTracker']['on']('change:isFocused',(_0x54540f,_0x395f58,_0x3aecc8)=>{_0x3aecc8||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 i extends _0x3b6d3b{static get['requires'](){return[r,s];}static get['pluginName'](){return'PresenceList';}}export{a as CloudServicesCommentsAdapter,v as CloudServicesRevisionHistoryAdapter,g as CloudServicesTrackChangesAdapter,i as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,d as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
23
+ import{ContextPlugin as _0x4094f3,Plugin as _0x399b4e,PendingActions as _0xa6ab4c,Context as _0x4095d1}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x1f8cb4,CKEditorError as _0x33d818,Collection as _0xd9e3ba,global as _0x4b223b,version as nt,uid as _0x2ca2cd,KeystrokeHandler as _0x160ad3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x38a67c,View as _0x2bd5ae,ListView as _0x28698d,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x780661,clickOutsideHandler as _0x1fb300,BodyCollection as _0x4c3f79}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x3e5ffd,NoOperation as _0x4f120b,InsertOperation as _0x5c872f,MarkerOperation as _0x8d7b39,RootAttributeOperation as _0x51d1ab,transformSets as _0x1f44c9,OperationFactory as _0x224f52}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x297bec,CollaborativeEditingService as _0x3e3ba6,User as lt,CommentsService as _0x17ad15,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x3006d7,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x4b3c4b}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x56cf79}from'lodash-es';class c extends _0x4094f3{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
+ ((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x38a67c];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x238590){super(_0x238590),this['set']('state',_0x297bec['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x1f8cb4);}['init'](){const _0xbef334=this['context'],_0x3830bf=_0xbef334['plugins']['get']('CloudServices'),_0x4b5d61=_0xbef334['plugins']['get'](_0x38a67c);if(!_0x3830bf['token'])throw new _0x33d818('websocketgateway-missing-token',this);if(!_0x3830bf['webSocketUrl'])throw new _0x33d818('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'](_0x3830bf['token'],_0x3830bf['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x4ddbac=>{if(this['connection']=_0x4ddbac,this['bind']('state')['to'](_0x4ddbac,'state',this,'_isBrowserOffline',(_0x2ba073,_0x44d05a)=>('connected'!==_0x2ba073&&(this['_shouldPluginsReconnect']=!0x0),_0x44d05a||_0x2ba073!==_0x297bec['CONNECTED']?_0x297bec['DISCONNECTED']:this['state']==_0x297bec['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x297bec['CONNECTING']):_0x297bec['CONNECTED'])),this['connection']['on']('error',(_0x213d27,_0x5755cc)=>{if('limitExceeded'!==_0x5755cc['code'])throw console['error'](_0x5755cc),new _0x33d818('cloudservices-init',null,{'originalError':_0x5755cc});_0x4b5d61['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'});}),!_0x4ddbac['me'])return new Promise(_0x5d1fd2=>_0x4ddbac['on']('change:me',_0x5d1fd2));})['catch'](_0x5615d2=>{throw console['error'](_0x5615d2),new _0x33d818('cloudservices-init',null,{'originalError':_0x5615d2});});}['addToReconnectionStack'](_0xf3f70b){if('function'!=typeof _0xf3f70b['reconnect'])throw new _0x33d818('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0xf3f70b))throw new _0x33d818('websocketgateway-plugin-already-registered',this,{'name':_0xf3f70b['constructor']['pluginName']});this['_reconnectionStack']['add'](_0xf3f70b);}['removeFromReconnectionStack'](_0x7023af){this['_reconnectionStack']['delete'](_0x7023af);}['isInReconnectionStack'](_0x2e1d18){return this['_reconnectionStack']['has'](_0x2e1d18);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x502393=>_0x502393['reconnect']())))['then'](()=>this['state']=_0x297bec['CONNECTED'])['catch'](_0x4c6ddb=>{throw console['error'](_0x4c6ddb),new _0x33d818('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x297bec['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x4094f3{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x3006d7];}constructor(_0x11adc7){super(_0x11adc7),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0xd9e3ba(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x3006d7);}['init'](){const _0x40b0da=this['context']['plugins']['get'](c);this['listenTo'](_0x40b0da,'change:state',(_0x5e6979,_0x311be8,_0xfbc231)=>{if('connected'!==_0xfbc231)this['channelSessions']['forEach'](_0x5ca393=>_0x5ca393['clear']()),this['channelConnectedUsers']['forEach'](_0x5a2911=>_0x5a2911['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x52bbfc,_0x15273a]of this['_registeredSessions'])for(const _0xc45bfb of _0x15273a)this['_handleSessionAdd'](_0x52bbfc,_0xc45bfb);}}),this['_createUser'](_0x40b0da['connection']['me'],!0x0);}['register'](_0x57a9e9,_0x53d3f9){if(this['_registeredSessions']['has'](_0x57a9e9))throw new _0x33d818('sessions-register-already-registered',null,{'channelId':_0x57a9e9});this['_registeredSessions']['set'](_0x57a9e9,_0x53d3f9),this['channelSessions']['set'](_0x57a9e9,new _0xd9e3ba()),this['channelConnectedUsers']['set'](_0x57a9e9,new _0xd9e3ba()),this['listenTo'](_0x53d3f9,'add',(_0x2aa1f5,_0x2c4f5d)=>this['_handleSessionAdd'](_0x57a9e9,_0x2c4f5d)),this['listenTo'](_0x53d3f9,'remove',(_0xce1200,_0x7261d2)=>this['_handleSessionRemove'](_0x57a9e9,_0x7261d2));for(const _0x39520e of _0x53d3f9)this['_handleSessionAdd'](_0x57a9e9,_0x39520e);}['unregister'](_0x4894d6){if(!this['_registeredSessions']['has'](_0x4894d6))throw new _0x33d818('sessions-unregister-not-exist',null,{'channelId':_0x4894d6});const _0x28d8a5=this['_registeredSessions']['get'](_0x4894d6);this['stopListening'](_0x28d8a5);for(const _0x42fa5e of _0x28d8a5)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x4894d6,_0x42fa5e);this['_registeredSessions']['delete'](_0x4894d6),this['channelSessions']['delete'](_0x4894d6),this['channelConnectedUsers']['delete'](_0x4894d6);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x142c8c){for(const _0x408c1b of this['channelSessions']['values']())for(const _0x28077a of _0x408c1b)if(_0x28077a['id']===_0x142c8c)return _0x28077a['user'];}['getUserSessions'](_0x4d7cba,_0x4923a8){const _0x323034=_0x4923a8?[this['channelSessions']['get'](_0x4923a8)]:this['channelSessions']['values'](),_0x59f1bc=new Set();for(const _0x3b088f of _0x323034)for(const _0x1bbf6d of _0x3b088f)_0x1bbf6d['user']['id']===_0x4d7cba['id']&&_0x59f1bc['add'](_0x1bbf6d['id']);return _0x59f1bc;}['getUserRole'](_0x2225ac){for(const _0x39838c of this['channelSessions']['values']())for(const _0x20c997 of _0x39838c)if(_0x20c997['user']===_0x2225ac)return _0x20c997['role'];}['_handleSessionAdd'](_0x178d83,_0x403d68){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x59032=_0x403d68['user'],_0x40596b=this['_users']['getUser'](_0x59032['id'])||this['_createUser'](_0x59032),_0x108ac3=Object['assign']({},_0x403d68,{'user':_0x40596b});this['channelSessions']['get'](_0x178d83)['add'](_0x108ac3);const _0x133913=this['channelConnectedUsers']['get'](_0x178d83);_0x133913['has'](_0x40596b['id'])||_0x133913['add'](_0x40596b),this['allConnectedUsers']['has'](_0x40596b['id'])||this['allConnectedUsers']['add'](_0x40596b,_0x40596b['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x178d83,{'channelId':_0x178d83,'session':_0x108ac3});}['_handleSessionRemove'](_0x36f152,_0xa090ec){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x44c67d=this['channelConnectedUsers']['get'](_0x36f152),_0x54be40=_0xa090ec['user'];_0x54be40['id']&&(this['channelSessions']['get'](_0x36f152)['remove'](_0xa090ec['id']),_0x44c67d['has'](_0x54be40['id'])&&!this['getUserSessions'](_0x54be40,_0x36f152)['size']&&_0x44c67d['remove'](_0x54be40['id']),this['allConnectedUsers']['get'](_0x54be40['id'])&&!this['getUserSessions'](_0x54be40)['size']&&this['allConnectedUsers']['remove'](_0x54be40['id']));}['_createUser'](_0x61635a,_0x332603){const _0x4dc8a3=this['_users']['addUser'](_0x61635a);return _0x332603&&this['_users']['defineMe'](_0x61635a['id']),_0x4dc8a3['orderNumber']=this['_uniqueUsersCount']++,_0x4dc8a3;}}class H extends _0x399b4e{['_domEmitter']=new(_0x1f8cb4())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x1b2d2f=this['editor'],_0x2d7073=_0x1b2d2f['plugins']['get'](r);_0x1b2d2f['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x29d023,{writer:_0x107901})=>function(_0x51ec0a,_0x4ebf34,_0x2fe6d7,_0x3cb918){const _0x501ee1=_0x51ec0a['markerName']['split'](':')[0x2],_0xff51c0=_0x2fe6d7['getUserBySessionId'](_0x501ee1);if(!_0xff51c0||_0x501ee1===_0x2fe6d7['mySessionId'])return;if(!_0x3cb918['model']['schema']['checkChild'](_0x51ec0a['markerRange']['start'],'$text'))return;const _0x3f97e6={'class':'ck-user__marker\x20'+_0xff51c0['color']['getMarkerClass'](),'data-name':_0xff51c0['name'],'data-session-id':_0x501ee1},_0xc85ac7=_0x3cb918['model']['markers']['get'](_0x51ec0a['markerName']),_0x331217=_0xc85ac7['getStart'](),_0x317194=_0x331217['nodeAfter'],_0x227b83=_0x3cb918['model']['schema'];if(_0x317194&&_0x227b83['isObject'](_0x317194)&&_0x227b83['isInline'](_0x317194)&&!_0x3cb918['model']['markers']['get']('user:range:'+_0x501ee1)['getRange']()['isCollapsed'])return;const _0x42dab9=_0x331217['parent'];return _0x3cb918['model']['schema']['isLimit'](_0x42dab9)&&!_0x3cb918['model']['hasContent'](_0x42dab9)&&(_0x3f97e6['contenteditable']=!0x1),function(_0x154b0f,_0x41ce19,_0x4f4fbc){const _0x1ef44a=_0x154b0f['createUIElement']('span',_0x41ce19);return _0x154b0f['setCustomProperty']('userPositionMarker',!0x0,_0x1ef44a),_0x1ef44a['render']=function(_0x458996){const _0x53450d=this['toDomElement'](_0x458996);return _0x53450d['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>'+_0x4f4fbc['name']+'</span>⁠',_0x53450d['addEventListener']('mouseenter',()=>{_0x53450d['classList']['add']('ck-user__marker_hovered');}),_0x53450d['addEventListener']('mouseleave',()=>{_0x53450d['classList']['remove']('ck-user__marker_hovered');}),_0x53450d;},_0x1ef44a['isSimilar']=function(_0x5719cf){return!(!this['getCustomProperty']('userPositionMarker')||!_0x5719cf['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x5719cf['getAttribute']('data-session-id'));},_0x1ef44a;}(_0x4ebf34,_0x3f97e6,_0xff51c0);}(_0x29d023,_0x107901,_0x2d7073,_0x1b2d2f)}),_0x1b2d2f['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x442d07=>function(_0x5b1330,_0x207131){const _0x35fe37=_0x5b1330['markerName']['split'](':')[0x2];if(_0x35fe37===_0x207131['mySessionId'])return null;const _0x18f144=_0x207131['getUserBySessionId'](_0x35fe37);if(!_0x18f144)return{'id':_0x35fe37,'classes':[]};return{'id':_0x35fe37,'classes':['ck-user__selection',_0x18f144['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x35fe37},'priority':0x7d0+_0x18f144['orderNumber']};}(_0x442d07,_0x2d7073)}),function(_0x2ecab0){const _0x5db2ea=_0x2ecab0['model'],_0x22bcff=new Map(),_0x2d7153=_0x2ecab0['plugins']['get'](r);_0x5db2ea['markers']['on']('update:user:range',(_0x9abc4f,_0x1095ec,_0x410406,_0x47711d)=>{if(!_0x47711d&&_0x22bcff['get'](_0x1095ec['name']))return _0x22bcff['get'](_0x1095ec['name'])['detach'](),void _0x22bcff['delete'](_0x1095ec['name']);const _0x510b7b=_0x1095ec['name']['split'](':')[0x2];if(_0x510b7b===_0x2d7153['mySessionId'])return;const _0x4a002a='user:position:'+_0x510b7b;_0x5db2ea['markers']['has'](_0x4a002a)&&_0x2ecab0['editing']['reconvertMarker'](_0x4a002a),_0x1095ec['on']('change:range',(_0x9d7968,_0x5b6fd2,_0x254c66)=>{if('$graveyard'!=_0x5b6fd2['root']['rootName']&&'$graveyard'==_0x1095ec['getRange']()['root']['rootName']&&!_0x22bcff['has'](_0x1095ec['name'])){const _0xb8aa8e=_0x5db2ea['schema']['getNearestSelectionRange'](_0x254c66['deletionPosition']);if(_0xb8aa8e){const _0x508ce5=ht['fromRange'](_0xb8aa8e);_0x22bcff['set'](_0x1095ec['name'],_0x508ce5),_0x508ce5['on']('change:range',(_0x43d7df,_0x3d430c,_0x559daa)=>{if('$graveyard'==_0x508ce5['root']['rootName']){const _0x27b346=_0x5db2ea['schema']['getNearestSelectionRange'](_0x559daa['deletionPosition']);_0x27b346?(_0x508ce5['start']=_0x27b346['start'],_0x508ce5['end']=_0x27b346['end']):(_0x22bcff['delete'](_0x1095ec['name']),_0x508ce5['detach']());}});}}});}),_0x5db2ea['document']['on']('change',()=>{_0x22bcff['size']>0x0&&_0x5db2ea['enqueueChange']({'isUndoable':!0x1},_0x2b203d=>{for(const [_0x537601,_0x33112e]of _0x22bcff)'$graveyard'==_0x5db2ea['markers']['get'](_0x537601)['getRange']()['root']['rootName']&&(re(_0x537601['split'](':')[0x2],_0x33112e['toRange'](),_0x5db2ea,_0x2b203d),_0x33112e['detach']());_0x22bcff['clear']();});});}(_0x1b2d2f),this['_domEmitter']['listenTo'](_0x4b223b['document'],'keydown',(_0xf8f45a,{key:_0x3cbc70})=>{'Escape'===_0x3cbc70&&function(_0x588d6a){_0x588d6a['editing']['view']['change'](_0x5a3f79=>{for(const _0x567861 of _0x588d6a['model']['markers']){if(!_0x567861['name']['startsWith']('user:position'))continue;const _0x5d7bec=_0x588d6a['editing']['mapper']['markerNameToElements'](_0x567861['name']);if(_0x5d7bec){for(const _0xae5343 of _0x5d7bec)_0x5a3f79['removeClass']('ck-user__marker_hovered',_0xae5343);}}});}(_0x1b2d2f);},{'useCapture':!0x0});}['afterInit'](){const _0x22feea=this['editor'],_0x1a182d=_0x22feea['commands']['get']('undo');_0x1a182d&&_0x22feea['model']['on']('applyOperation',(_0x430995,_0x17384c)=>{const _0x22fd05=_0x17384c[0x0];if('marker'!=_0x22fd05['type']||!_0x22fd05['name']['startsWith']('user:'))return;const _0x54668d=_0x22fd05['batch'];_0x1a182d['_createdBatches']['has'](_0x54668d)&&(_0x22fd05['newRange']=_0x22fd05['oldRange']?_0x22feea['model']['createRange'](_0x22fd05['oldRange']['start'],_0x22fd05['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x5a20ac=this['editor'],_0x507d9e=_0x5a20ac['model']['document'],_0x4c28a1=_0x5a20ac['plugins']['get'](r);_0x5a20ac['model']['enqueueChange']({'isUndoable':!0x1},_0x50c7ac=>{const _0x46ff4f='user:range:'+_0x4c28a1['mySessionId'],_0x1ebfe6='user:position:'+_0x4c28a1['mySessionId'],_0x3a5e88=_0x5a20ac['model']['markers']['has'](_0x46ff4f);_0x5a20ac['editing']['view']['hasDomSelection']?re(_0x4c28a1['mySessionId'],_0x507d9e['selection']['getFirstRange'](),_0x5a20ac['model'],_0x50c7ac):_0x3a5e88&&(_0x50c7ac['removeMarker'](_0x46ff4f),_0x50c7ac['removeMarker'](_0x1ebfe6));});}}function re(_0x5b2427,_0x3eaf22,_0x5e5b44,_0x3c61ac){const _0x19f661='user:range:'+_0x5b2427,_0x41f78c='user:position:'+_0x5b2427,_0x45c285=_0x3eaf22['getContainedElement']();let _0x3e4b92=_0x3eaf22['start'];_0x45c285&&_0x45c285['is']('element','tableCell')&&(_0x3e4b92=function(_0x400b11,_0x33b4b4){for(const _0xeb9b7b of _0x400b11['getPositions']())if(_0x33b4b4['schema']['checkChild'](_0xeb9b7b,'$text'))return _0xeb9b7b;}(_0x3eaf22,_0x5e5b44),_0x3eaf22=_0x3c61ac['createRange'](_0x3e4b92));const _0x157ac6=_0x3c61ac['createRange'](_0x3e4b92);_0x5e5b44['markers']['has'](_0x19f661)?(_0x3c61ac['updateMarker'](_0x19f661,{'range':_0x3eaf22}),_0x3c61ac['updateMarker'](_0x41f78c,{'range':_0x157ac6})):(_0x3c61ac['addMarker'](_0x19f661,{'range':_0x3eaf22,'usingOperation':!0x0}),_0x3c61ac['addMarker'](_0x41f78c,{'range':_0x157ac6,'usingOperation':!0x0}));}function q(_0x57ef4d,_0x416f54,_0x5b9221){const t=_0x57ef4d['t'];switch(_0x416f54){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 t({'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'},_0x5b9221);default:return'';}}let K=0x1;class l extends _0x399b4e{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
+ ((()=>_0x3e3ba6)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,H,_0xa6ab4c,_0x3006d7,_0x38a67c];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x132eea=this['serverHistory']['getOperations']();for(let _0x3127c2=_0x132eea['length']-0x1;_0x3127c2>=0x0;_0x3127c2--){const _0x3bb22b=_0x132eea[_0x3127c2];if(!this['_disconnectionOperations']['has'](_0x3bb22b))return _0x3bb22b['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x29e3e4){if(super(_0x29e3e4),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x3e5ffd(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x33d818('collaboration-missing-channelid',this);const _0x21e00f=_0x29e3e4['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x21e00f,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x4b3c4b(),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 _0x27a14d=this['editor'],_0x2c2182=_0x27a14d['plugins']['get'](_0x3006d7),_0xdf23b0=_0x27a14d['plugins']['get'](c);this['listenTo'](_0x2c2182,'getOperationAuthor',(_0x5ebcb4,_0x96e8cb)=>{const _0x2d7fb1=_0x96e8cb[0x0];_0x2d7fb1['_authorId']&&(_0x5ebcb4['return']=_0x2c2182['getUser'](_0x2d7fb1['_authorId']),_0x5ebcb4['stop']()),null===_0x2d7fb1['_authorId']&&(_0x5ebcb4['return']=null,_0x5ebcb4['stop']());},{'priority':'high'}),this['listenTo'](_0x27a14d['model']['document']['selection'],'change:range',(_0x1a7cb9,_0x3355e2)=>{_0x3355e2['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x27a14d['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x27a14d['model']['on']('applyOperation',(_0x501964,_0x1b06b7)=>{const _0x55993e=_0x1b06b7[0x0];_0x55993e['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x55993e),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0xdf23b0,'state',this,'_hasSynchronizationProblem',(_0xc8a211,_0x1673d6)=>'connected'===_0xc8a211&&!_0x1673d6),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x27a14d['disableReadOnlyMode']('rtc-offline'):_0x27a14d['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x27a14d['disableReadOnlyMode']('rtc-offline'):_0x27a14d['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x109bdc=this['editor']['plugins']['get'](r),_0x32648c=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x109bdc['unregister'](this['_channelId']);const _0x318762=await this['_service']['reconnect'](_0x32648c['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x318762)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x5e6ff3=await this['_service']['getConnectedSessions']();_0x109bdc['register'](this['_channelId'],_0x5e6ff3),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x34ccb2){if(function(_0x48815f){return'404'===_0x48815f['code'];}(_0x34ccb2)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x28cc07){return'409'===_0x28cc07['code'];}(_0x34ccb2)){const _0x5bcc86=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'](_0x5bcc86);}else{if(!(_0x34ccb2 instanceof J))throw _0x34ccb2;this['_handleReconnectionError']();}}}}['destroy'](){const _0x534837=this['editor']['plugins']['get'](c),_0x4acd34=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x4acd34['channelSessions']['has'](this['_channelId'])&&_0x4acd34['unregister'](this['_channelId']),_0x534837['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x46ccce){if(this['sessionId']!==_0x46ccce['sessionId']&&this['_lastSyncedOperationId']!==_0x46ccce['lastOperationId'])throw new J();return this['sessionId']=_0x46ccce['sessionId'],this['_handleServerResponse']([],{..._0x46ccce,'wereChangesApplied':!0x1,'data':_0x46ccce['data']},'reconnect');}async['_connectService'](_0x45fc9b,_0x570cca=!0x1){const {connection:_0x2b1bf5}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x2b1bf5,this['_channelId'])['then'](_0x26d1ec=>this['_initSessionsHandling'](_0x26d1ec))['catch'](_0xf411e0=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0xf411e0);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x5d9b89,_0x5e40b4)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x5e40b4);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x446dea=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x45fc9b);this['_isPendingUpdate']=!0x0;const _0x68d456=await this['_service']['connect'](_0x2b1bf5,this['_compressOperations'](_0x45fc9b),_0x446dea);if(this['sessionId']=_0x68d456['sessionId'],_0x570cca){if(!_0x68d456['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x68d456['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x45fc9b,_0x68d456,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x68d456,_0x45fc9b);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x40ce9e=this['editor']['plugins']['get'](r),_0x49b952=this['editor']['plugins']['get'](H),_0x5e98ac=_0x40ce9e['channelSessions']['get'](this['_channelId']);_0x5e98ac&&_0x5e98ac['length']>0x1?_0x49b952['createUserMarkerOperations']():this['listenTo'](_0x40ce9e,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x40ce9e['channelSessions']['get'](this['_channelId'])['length']&&_0x49b952['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x330da5,_0x166a42,_0x1beca1,_0xb97254){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x166a42){const _0x1e269b=this['_decompressOperations'](_0x1beca1,_0xb97254);await this['_fetchMissingUsers'](_0x1e269b),this['_handleExternalOperations'](_0x1e269b,_0x166a42,_0x1beca1['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x22cd66}=this['editor'];let _0x2433f5;try{_0x2433f5=await this['_service']['getDocumentDetails']();}catch(_0x3e70be){const _0x12aace=q(_0x22cd66,'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'](_0x12aace);}const _0x1656bd=_0x2433f5['currentDocumentSession']||_0x2433f5['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x1656bd['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x2399fe=q(_0x22cd66,'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'](_0x2399fe);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x53930e){const _0x4f3353=this['editor']['plugins']['get'](r);this['listenTo'](_0x4f3353,'sessionAdd:'+this['_channelId'],(_0x5da9ab,{session:_0x502c78})=>{if(_0x502c78['id']===_0x4f3353['mySessionId']){_0x5da9ab['off']();const _0x1bae99=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x3d51a8=_0x502c78['permissions'];_0x1bae99&&_0x1bae99['isEnabled']&&(_0x3d51a8=_0x3d51a8['filter'](_0x5c5a33=>'document:write'!==_0x5c5a33)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x3d51a8,this['_channelId']);}}),_0x4f3353['register'](this['_channelId'],_0x53930e);}['_initThrowingOnDataSet'](){const _0x1d5359=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x46cf2b)=>{if(!_0x46cf2b[_0x46cf2b['length']-0x1]['suppressErrorInCollaboration'])throw new _0x33d818('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x1d5359['apply'](this['editor']['data'],_0x46cf2b);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x1e5e2e,[_0x35b827])=>{if(this['_document']['version'])throw new _0x33d818('realtimecollaborationclient-init-document-already-initialized',this);_0x1e5e2e['stop'](),this['_setPendingAction']();const _0x34ba0c=this['editor']['config']['get']('rootsAttributes'),_0x23ee96=this['_getOperationsFromInitData'](_0x35b827,_0x34ba0c);0x0==_0x23ee96['length']&&_0x23ee96['push'](new _0x4f120b(0x0)),_0x1e5e2e['return']=this['_connectService'](_0x23ee96)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x4749f5=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x4749f5))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x570641,[_0x2f80ba,_0x297b80])=>{_0x570641['stop']();const _0x343c3b=this['editor']['model']['document']['getRoot'](_0x2f80ba);if(!this['_knownRootNames']['has'](_0x2f80ba)){const _0x320892=_0x297b80&&_0x297b80['data']?_0x297b80['data']:'',_0x4fd86e=_0x297b80&&_0x297b80['attributes']?_0x297b80['attributes']:{};await this['_loadRoot'](_0x2f80ba,_0x320892,_0x4fd86e);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x343c3b['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x343c3b);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x19408f){const _0x513269=this['editor']['plugins']['get'](_0x3006d7),{connection:_0x1eddf9}=this['editor']['plugins']['get'](c),_0x189343=new Set();for(const _0x474ef6 of _0x19408f){const _0x38eb88=_0x474ef6['_authorId'];_0x38eb88&&!_0x513269['getUser'](_0x38eb88)&&_0x189343['add'](_0x38eb88);}if(0x0===_0x189343['size'])return;const _0x2e1198=await lt['getMany'](_0x1eddf9,Array['from'](_0x189343));for(const _0x254d8c of _0x2e1198)_0x513269['getUser'](_0x254d8c['id'])||_0x513269['addUser'](_0x254d8c);}['_getOperationsFromInitData'](_0x4fbe90,_0x5a42f9={}){const _0x1bb934=this['editor']['model'],_0x1622ca=[];let _0x46766e=0x0;const _0x568d4b='string'==typeof _0x4fbe90?{'main':_0x4fbe90}:_0x4fbe90;for(const _0xaf280b of Object['keys'](_0x568d4b)){if(!this['_document']['roots']['has'](_0xaf280b))throw new _0x33d818('realtimecollaborationclient-init-non-existent-root',this);const _0x41b99e=this['editor']['data']['parse'](_0x568d4b[_0xaf280b]),_0x23162b=this['_document']['getRoot'](_0xaf280b),_0xdc560b=new _0x5c872f(_0x1bb934['createPositionAt'](_0x23162b,0x0),_0x41b99e,_0x46766e++);_0x1622ca['push'](_0xdc560b);for(const [_0x24b3a9,_0x49a0b5]of _0x41b99e['markers']){const _0x445b59=_0x1bb934['createRange'](_0x1bb934['createPositionFromPath'](_0x23162b,_0x49a0b5['start']['path']['slice']()),_0x1bb934['createPositionFromPath'](_0x23162b,_0x49a0b5['end']['path']['slice']())),_0xe8b063=new _0x8d7b39(_0x24b3a9,null,_0x445b59,_0x1bb934['markers'],!0x0,_0x46766e++);_0x1622ca['push'](_0xe8b063);}}if(_0x5a42f9)for(const [_0x3d2412,_0x2633f1]of Object['entries'](_0x5a42f9)){const _0x1962b6=_0x1bb934['document']['getRoot'](_0x3d2412);if(!_0x1962b6)throw new _0x33d818('multi-root-editor-root-attributes-no-root',null);for(const [_0x592f28,_0x4df79e]of Object['entries'](_0x2633f1))if(null!==_0x4df79e){const _0x3f089b=new _0x51d1ab(_0x1962b6,_0x592f28,null,_0x4df79e,_0x46766e++);_0x1622ca['push'](_0x3f089b);}}return _0x1622ca;}async['_loadRoot'](_0x281bfd,_0x2c8c8e,_0x77abfe){this['_getOperationsFromInitData']({[_0x281bfd]:_0x2c8c8e},{[_0x281bfd]:_0x77abfe})['forEach']((_0x4d5290,_0x5ed96d)=>{_0x4d5290['baseVersion']=this['_document']['version']+_0x5ed96d,_0x4d5290['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x4d5290);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x57432b,_0x13ff9b){let _0x299e64;this['_offset']=_0x57432b['offset'];const _0x5ea8ea=_0x57432b['wereChangesApplied']&&!_0x57432b['initData'],_0x728eb9=_0x5ea8ea?0x0:_0x57432b['data']['baseVersion'];if(_0x13ff9b['forEach'](_0x2e54ec=>{_0x2e54ec['_isInit']=!0x0,_0x2e54ec['createdAt']=_0x57432b['sessionCreatedAt'],_0x2e54ec['_authorId']=null;}),_0x5ea8ea)_0x299e64=_0x13ff9b,this['_applyOperationsSet'](_0x299e64,_0x5ea8ea);else{if(_0x57432b['initData']){const _0x216244=this['_getOperationsFromInitData'](_0x57432b['initData']);this['_document']['history']['version']=-_0x216244['length'],_0x216244['forEach'](_0xc5fa98=>{_0xc5fa98['baseVersion']-=_0x216244['length'],_0xc5fa98['createdAt']=_0x57432b['sessionCreatedAt'],_0xc5fa98['_isInit']=!0x0,_0xc5fa98['_authorId']=null;}),this['_applyOperationsSet'](_0x216244,!0x0),this['serverHistory']['version']=-_0x216244['length']+this['_offset'],this['_updateServerHistory'](_0x216244);}this['_document']['history']['version']=_0x728eb9,_0x299e64=this['_decompressOperations'](_0x57432b['data'],_0x57432b['metadata']),await this['_fetchMissingUsers'](_0x299e64),this['_applyOperationsSet'](_0x299e64,_0x5ea8ea);}_0x57432b['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x299e64,_0x57432b['lastOperationId']),this['_lastSyncedOperationId']=_0x57432b['lastOperationId']),this['serverHistory']['version']=_0x728eb9+this['_offset'],this['_updateServerHistory'](_0x299e64),_0x13ff9b['filter'](_0x2c144c=>{const _0x210187=this['_getAffectedRoot'](_0x2c144c);return _0x210187&&!this['_knownRootNames']['has'](_0x210187);})['forEach']((_0x3e5bf7,_0x120b59)=>{_0x3e5bf7['baseVersion']=this['_document']['version']+_0x120b59,this['_saveOperationInBuffer'](_0x3e5bf7);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x4afba4,_0x145b1c){throw this['_isPendingUpdate']=!0x0,_0x145b1c&&console['error'](_0x145b1c),new _0x33d818(_0x4afba4,this['editor']);}['_saveOperationInBuffer'](_0xab3936){this['_knownOperations']['has'](_0xab3936)||(this['_knownOperations']['add'](_0xab3936),this['_bufferedOperations']['push'](_0xab3936),this['_pendingAction']||'marker'==_0xab3936['type']&&!_0xab3936['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x298ec0=!0x1){!_0x298ec0&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x54dd85=>{_0x54dd85&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x4f62da=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x28dfaa){return _0x28dfaa['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x28dfaa['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x28dfaa['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x4f62da))throw _0x4f62da;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x442a4d=>{this['on']('change:_isPendingUpdate',()=>{_0x442a4d();});});}async['_sendBufferedOperations'](){const _0x4111ef=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x4111ef['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x1adc6e=[...this['_bufferedOperations']];for(const _0x5a236d of _0x1adc6e)_0x5a236d['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x5a236d);const _0x3a7a04=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x1adc6e),_0x37959a=K++,_0x131742=this['_compressOperations'](_0x1adc6e),_0x2935cb=await this['_service']['sendOperations'](_0x131742,_0x131742['baseVersion'],_0x3a7a04);try{return await this['_handleServerResponse'](_0x1adc6e,_0x2935cb,_0x37959a);}catch(_0x37bb29){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x37bb29);}}async['_handleServerResponse'](_0x20965a,_0x1ab977,_0x4751f5){if('error'in _0x1ab977)throw _0x1ab977['error'];let _0x16e4f5=!0x1;if(_0x1ab977['wereChangesApplied']){_0x1ab977['lastOperationId']&&(this['_lastSyncedOperationId']=_0x1ab977['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0xfe2542=>!_0x20965a['includes'](_0xfe2542));for(const _0xf169b4 of _0x20965a)_0xf169b4['createdAt']='lastOperationAcceptedAt'in _0x1ab977&&_0x1ab977['lastOperationAcceptedAt']||void 0x0;Q(_0x20965a,_0x1ab977['version']-_0x20965a['length']),this['_updateServerHistory'](_0x20965a);const _0x5c714a=_0x20965a['filter'](_0x267796=>{if(!_0x267796['_isInit'])return!0x1;const _0x1d955a=this['_getAffectedRoot'](_0x267796);return _0x1d955a&&!this['_knownRootNames']['has'](_0x1d955a);});Q(_0x5c714a,this['_document']['version']),this['_applyOperationsSet'](_0x5c714a),_0x16e4f5=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x1111cb=this['_decompressOperations'](_0x1ab977['data'],_0x1ab977['metadata'])['filter'](_0x1f2bb4=>_0x1f2bb4['baseVersion']>=this['_lastServerVersion']);_0x1111cb['forEach'](_0x421409=>this['_addKnownRoot'](_0x421409)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x564c52=>!_0x564c52['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x564c52))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x1111cb),_0x16e4f5=this['_handleExternalOperations'](_0x1111cb,_0x1ab977['version'],_0x1ab977['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x16e4f5?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x435b90,_0x1bac2e,_0x22165f){try{const _0x35f138={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0xede89e,operationsB:_0x5473eb,originalOperations:_0xde89b}=_0x1f44c9(_0x435b90,this['_bufferedOperations'],_0x35f138);Q(_0xede89e,this['_document']['version']),Q(_0x5473eb,_0x1bac2e);for(const _0x17c522 of _0xede89e){const _0x3a1513=_0xde89b['get'](_0x17c522);_0x17c522['_authorId']=_0x3a1513?_0x3a1513['_authorId']:null;}_0x22165f&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x435b90,_0x22165f),this['_lastSyncedOperationId']=_0x22165f),this['_bufferedOperations']=[..._0x5473eb],this['_applyOperationsSet'](_0xede89e),this['_updateServerHistory'](_0x435b90);}catch(_0x5650cf){return console['error'](_0x5650cf),!0x1;}return!0x0;}['_applyOperationsSet'](_0xcefd3b,_0x1274d8=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x142bd0=>{for(const _0xd75a67 of _0xcefd3b)this['_knownOperations']['add'](_0xd75a67),this['_addKnownRoot'](_0xd75a67),_0x142bd0['batch']['addOperation'](_0xd75a67),this['editor']['model']['applyOperation'](_0xd75a67);});}['_addKnownRoot'](_0x5c42f2){const _0x5c4ca1=this['_getAffectedRoot'](_0x5c42f2);_0x5c4ca1&&this['_knownRootNames']['add'](_0x5c4ca1);}['_getAffectedRoot'](_0x4e9479){let _0x3bfb83,_0xff9c6d;switch(_0x4e9479['type']){case'insert':_0x3bfb83=_0x4e9479['position']['root'];break;case'marker':if(_0xff9c6d=_0x4e9479['newRange'],!_0xff9c6d)return null;_0x3bfb83=_0xff9c6d['root'];break;case'addRootAttribute':_0x3bfb83=_0x4e9479['root'];break;case'addRoot':_0x3bfb83=_0x4e9479['affectedSelectable'];break;case'move':_0x3bfb83=_0x4e9479['targetPosition']['root'];break;default:return null;}return _0x3bfb83['rootName'];}['_updateServerHistory'](_0x45ce4f){_0x45ce4f['forEach'](_0x4dab73=>{const _0x14e4d6=_0x4dab73['clone']();_0x14e4d6['_authorId']=_0x4dab73['_authorId'],_0x14e4d6['_isInit']=!!_0x4dab73['_isInit'],_0x14e4d6['createdAt']=_0x4dab73['createdAt'],_0x14e4d6['baseVersion']+=this['_offset'],_0x4dab73['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x14e4d6),this['serverHistory']['addOperation'](_0x14e4d6);});}['_handleReconnectionError'](_0x5d6c82){const _0x41ed29=this['editor']['plugins']['get']('Notification'),_0x3f82e9=this['editor']['locale'];_0x5d6c82||(_0x5d6c82=q(_0x3f82e9,'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.')),_0x41ed29['showWarning'](_0x5d6c82,{'title':q(_0x3f82e9,'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'](_0xa6ab4c)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0xa6ab4c)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x11e7a3){const _0x338c18=_0x11e7a3['map'](_0x1fa51e=>_0x1fa51e['toJSON']());return this['_compressor']['compress'](_0x338c18);}['_decompressOperations'](_0x530be5,_0x2404fa){return this['_compressor']['decompress'](_0x530be5)['map']((_0x6f5585,_0x4c2956)=>{const _0x14844b='init'==_0x2404fa[_0x4c2956]['type'];if('InsertOperation'==_0x6f5585['__className']){const _0x253357=_0x6f5585['position']['root'];!this['_document']['getRoot'](_0x253357)&&(this['_document']['createRoot']('$root',_0x253357)['_isAttached']=!0x1);}const _0x45d214=_0x224f52['fromJSON'](_0x6f5585,this['_document']);return _0x45d214['wasUndone']=_0x6f5585['wasUndone'],_0x45d214['_isInit']=_0x14844b,_0x45d214['_authorId']=_0x14844b?null:_0x2404fa[_0x4c2956]['userId'],_0x45d214['_isDisconnection']='cs:removeUser'===_0x2404fa[_0x4c2956]['type'],_0x45d214['createdAt']=_0x2404fa[_0x4c2956]['createdAt'],_0x45d214;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x107aec=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x107aec&&_0x107aec['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x2b8e3a,_0x867694){for(const _0x3d3cf5 of _0x2b8e3a)_0x3d3cf5['baseVersion']=_0x867694++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x321c8a){this['_ignoredOperations']=_0x321c8a,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x344b43){let _0x3e843c=_0x344b43['length'];for(;_0x3e843c--;){const _0x2c8285=_0x344b43[_0x3e843c];if(!this['_ignoredOperations']['has'](_0x2c8285)){if(!this['_operationToId']['has'](_0x2c8285)){const _0x29f334=_0x2ca2cd()['slice'](0x1,0x12);this['_operationToId']['set'](_0x2c8285,_0x29f334);}return this['_operationToId']['get'](_0x2c8285);}}}['setIdForTheLastOperation'](_0x241445,_0x7dba71){if(!_0x7dba71)return;let _0xdf9d35=_0x241445['length'];for(;_0xdf9d35--;){const _0x243145=_0x241445[_0xdf9d35];this['_ignoredOperations']['has'](_0x243145)||this['_operationToId']['set'](_0x243145,_0x7dba71);}}}class n extends _0x399b4e{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x4094f3{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
+ ((()=>_0x17ad15)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x3006d7];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x10dbd5){super(_0x10dbd5),this['_services']=new Map();}async['init'](){const _0x874813=this['context'],_0x5431e5=_0x874813['plugins']['get']('CommentsRepository');if(_0x874813['plugins']['get'](c)['addToReconnectionStack'](this),_0x5431e5['adapter']={'addCommentThread':async({channelId:_0x17c48e,threadId:_0x2c5dbe,comments:_0x2f9dfa,resolvedAt:_0x1a8b03,resolvedBy:_0x16aa8e,context:_0x3e0acf,attributes:_0x51f353})=>{const _0x4befa4=await this['_getService'](_0x17c48e)['addCommentThread']({'commentThreadId':_0x2c5dbe,'comments':_0x2f9dfa['map'](_0x4fe9f1=>function(_0x3afe92,_0x4b499a,_0xe2b349){return{'commentThreadId':_0xe2b349,'commentId':_0x3afe92['commentId'],'userId':_0x3afe92['authorId'],'content':_0x3afe92['content'],'documentId':_0x4b499a,'createdAt':_0x3afe92['createdAt'],'attributes':_0x3afe92['attributes']||{}};}(_0x4fe9f1,_0x17c48e,_0x2c5dbe)),'resolvedAt':_0x1a8b03,'resolvedBy':_0x16aa8e,'context':_0x3e0acf,'attributes':_0x51f353})['catch'](ut);return{'threadId':_0x4befa4['commentThreadId'],'comments':_0x4befa4['comments']};},'getCommentThread':async({channelId:_0x421925,threadId:_0x245b08})=>{const _0x2425fa=await this['_getService'](_0x421925)['getCommentThread'](_0x245b08)['catch'](ut);return _0x2425fa['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x2425fa]),{'threadId':_0x2425fa['commentThreadId'],'comments':_0x2425fa['comments']['map'](S),'context':_0x2425fa['context'],'resolvedAt':_0x2425fa['resolvedAt'],'resolvedBy':_0x2425fa['resolvedBy'],'attributes':_0x2425fa['attributes']||{}});},'updateCommentThread':async({channelId:_0x5b4c83,threadId:_0x3294d7,context:_0x100d23,unlinkedAt:_0x298a16,attributes:_0x53d771})=>this['_getService'](_0x5b4c83)['updateCommentThread']({'commentThreadId':_0x3294d7,'context':_0x100d23,'attributes':_0x53d771,'unlinkedAt':_0x298a16})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x3105f5,threadId:_0x1279a7})=>{const _0x509c8b=await this['_getService'](_0x3105f5)['resolveCommentThread'](_0x1279a7)['catch'](B)['catch'](ut);return{'threadId':_0x509c8b['commentThreadId'],'resolvedAt':_0x509c8b['resolvedAt'],'resolvedBy':_0x509c8b['resolvedBy']};},'reopenCommentThread':async({channelId:_0x216d12,threadId:_0x493e02})=>this['_getService'](_0x216d12)['reopenCommentThread'](_0x493e02)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x5580d9,threadId:_0x325ee4})=>this['_getService'](_0x5580d9)['removeCommentThread'](_0x325ee4)['catch'](B)['catch'](ut),'addComment':({channelId:_0x2fc092,threadId:_0x2f6142,commentId:_0x195464,content:_0x2ed45e,attributes:_0xd4d47d})=>this['_getService'](_0x2fc092)['addComment'](_0x2f6142,_0x195464,_0x2ed45e,_0xd4d47d)['catch'](ut),'updateComment':({channelId:_0x180b0a,threadId:_0x124615,commentId:_0xbfe516,content:_0x4f9a07,attributes:_0x5f2a0a})=>this['_getService'](_0x180b0a)['updateComment'](_0x124615,_0xbfe516,_0x4f9a07,_0x5f2a0a)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x3638a9,threadId:_0x12d6db,commentId:_0x53a06a})=>this['_getService'](_0x3638a9)['removeComment'](_0x12d6db,_0x53a06a)['catch'](B)['catch'](ut)},_0x874813 instanceof _0x4095d1){const _0x199eac=_0x874813['config']['get']('collaboration.channelId'),_0x22feaf=_0x874813['plugins']['get'](r);await this['_setUpService'](_0x199eac);const _0x40e587=await this['_services']['get'](_0x199eac)['getConnectedSessions']();this['listenTo'](_0x22feaf,'sessionAdd:'+_0x199eac,(_0x7f8670,{session:_0x285977})=>{_0x285977['id']===_0x22feaf['mySessionId']&&(_0x7f8670['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x285977['permissions'],_0x199eac));}),_0x22feaf['register'](_0x199eac,_0x40e587);}}async['_setUpService'](_0x361105){if(this['_services']['has'](_0x361105))throw new _0x33d818('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x361105});const _0x1673ce=this['context']['plugins']['get']('CommentsRepository'),_0x316f41=new a['CommentsService'](_0x361105);this['_services']['set'](_0x361105,_0x316f41),this['listenTo'](_0x316f41,'commentThreadAdded',(_0x862167,_0x5b3269)=>{const {commentThreadId:_0x491b6d,documentId:_0x21fa9a,context:_0x35203f,attributes:_0x59a546,resolvedAt:_0x2ca8b2,resolvedBy:_0x10ded2,comments:_0x30bcac}=_0x5b3269;_0x1673ce['getCommentThread'](_0x491b6d)||_0x1673ce['addCommentThread']({'threadId':_0x491b6d,'channelId':_0x21fa9a,'comments':_0x30bcac?_0x30bcac['map'](S):[],'context':_0x35203f,'attributes':_0x59a546,'resolvedAt':_0x2ca8b2,'resolvedBy':_0x10ded2,'isFromAdapter':!0x0});}),this['listenTo'](_0x316f41,'commentThreadUpdated',(_0x590d76,{commentThreadId:_0x1b0671,documentId:_0x170519,context:_0x4f806f,unlinkedAt:_0x28d7cf,attributes:_0x2e9736})=>{_0x1673ce['getCommentThread'](_0x1b0671)&&_0x1673ce['updateCommentThread']({'threadId':_0x1b0671,'channelId':_0x170519,'context':_0x4f806f,'unlinkedAt':_0x28d7cf,'attributes':_0x2e9736,'isFromAdapter':!0x0});}),this['listenTo'](_0x316f41,'commentThreadResolved',(_0x1a3f1f,{commentThreadId:_0x4733c3,resolvedBy:_0x16ba42,resolvedAt:_0x2b206c})=>{const _0x4884aa=_0x1673ce['getCommentThread'](_0x4733c3);_0x4884aa&&_0x4884aa['resolve']({'resolvedBy':_0x16ba42,'resolvedAt':_0x2b206c,'isFromAdapter':!0x0});}),this['listenTo'](_0x316f41,'commentThreadReopened',(_0x51ce25,{commentThreadId:_0x5328c6})=>{const _0x2c10ac=_0x1673ce['getCommentThread'](_0x5328c6);_0x2c10ac&&_0x2c10ac['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x316f41,'commentThreadRemoved',(_0x7a50d,{commentThreadId:_0x58dec9})=>{const _0x2cbc89=_0x1673ce['getCommentThread'](_0x58dec9);_0x2cbc89&&_0x2cbc89['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x316f41,'commentAdded',(_0x5a48a9,_0x23cf1b)=>{const _0x53b22d=_0x23cf1b['commentThreadId'],_0x427277=_0x1673ce['getCommentThread'](_0x53b22d);_0x427277&&_0x427277['addComment']({...S(_0x23cf1b),'isFromAdapter':!0x0});}),this['listenTo'](_0x316f41,'commentUpdated',(_0xc60a7b,{commentThreadId:_0x1e085c,commentId:_0x164c44,content:_0x510fce,attributes:_0x10e50f})=>{const _0x5c6f46=_0x1673ce['getCommentThread'](_0x1e085c);if(_0x5c6f46){const _0x1a3dc0=_0x5c6f46['getComment'](_0x164c44);_0x1a3dc0&&_0x1a3dc0['update']({'content':_0x510fce,'attributes':_0x10e50f,'isFromAdapter':!0x0});}}),this['listenTo'](_0x316f41,'commentRemoved',(_0x3d02b9,{commentThreadId:_0x61aa41,commentId:_0x1b371f})=>{const _0x57fdb2=_0x1673ce['getCommentThread'](_0x61aa41);if(_0x57fdb2){const _0x5ea8e1=_0x57fdb2['getComment'](_0x1b371f);_0x5ea8e1&&_0x5ea8e1['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x361105);}['destroy'](){if(this['context']instanceof _0x4095d1){const _0x5dc524=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x5dc524);}}['_terminateService'](_0x59c294){if(!this['_services']['has'](_0x59c294))throw new _0x33d818('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x59c294});this['_getService'](_0x59c294)['disconnect'](),this['_services']['delete'](_0x59c294);}async['reconnect'](){for(const _0x3f2f29 of this['_services']['keys']())await this['_connectService'](_0x3f2f29);if(this['context']instanceof _0x4095d1){const _0xcf2789=this['context']['config']['get']('collaboration.channelId'),_0x164a3a=this['context']['plugins']['get'](r);_0x164a3a['unregister'](_0xcf2789);const _0x27df46=await this['_services']['get'](_0xcf2789)['getConnectedSessions']();_0x164a3a['register'](_0xcf2789,_0x27df46);}}async['_connectService'](_0x402157){const {connection:_0x403343}=this['context']['plugins']['get'](c),_0xe2c927=this['context']['plugins']['get']('CommentsRepository'),_0x3ae176=this['_services']['get'](_0x402157),_0x16893e=await _0x3ae176['connect'](_0x403343);await this['_fetchMissingUsersForThreads'](_0x16893e);const _0xad6e5f=new Set(Array['from'](_0xe2c927['getCommentThreads']({'channelId':_0x402157}),_0x1a58d4=>_0x1a58d4['id']));for(const _0x4968e5 of _0x16893e)_0x4968e5['deletedAt']||_0xad6e5f['delete'](_0x4968e5['commentThreadId']);for(const _0x3fda1b of _0xad6e5f)_0xe2c927['getCommentThread'](_0x3fda1b)['remove']({'isFromAdapter':!0x0});for(const _0x196749 of _0x16893e){let _0x207156=_0xe2c927['getCommentThread'](_0x196749['commentThreadId']);const {commentThreadId:_0x3e71af,context:_0x279e8d,attributes:_0x3575e7,resolvedBy:_0x27f5a6,resolvedAt:_0x3d2067,unlinkedAt:_0x2bf5bd,deletedAt:_0x49bff2}=_0x196749;if(_0x49bff2)continue;_0x207156||(_0x207156=_0xe2c927['addCommentThread']({'channelId':_0x402157,'threadId':_0x3e71af,'context':_0x279e8d,'attributes':_0x3575e7||{},'resolvedBy':_0x27f5a6,'resolvedAt':_0x3d2067,'unlinkedAt':_0x2bf5bd,'isFromAdapter':!0x0}));const _0x1cc8d3=new Set(Array['from'](_0x207156['comments'],_0x3c6545=>_0x3c6545['id']));for(const _0x405472 of _0x196749['comments'])_0x1cc8d3['delete'](_0x405472['commentId']);for(const _0x231252 of _0x1cc8d3)_0x207156['getComment'](_0x231252)['remove']({'isFromAdapter':!0x0});for(const _0x4b3f03 of _0x196749['comments']){const _0x538107=_0x207156['getComment'](_0x4b3f03['commentId']);_0x538107?_0x538107['content']!==_0x4b3f03['content']&&_0x538107['update']({'content':_0x4b3f03['content'],'isFromAdapter':!0x0}):_0x207156['addComment'](Object['assign'](S(_0x4b3f03),{'isFromAdapter':!0x0}));}}}['_getService'](_0x273dfe){if(!this['_services']['has'](_0x273dfe))throw new _0x33d818('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x273dfe});return this['_services']['get'](_0x273dfe);}async['_fetchMissingUsersForThreads'](_0x2bc53e){const _0x16ae52=this['context']['plugins']['get'](_0x3006d7),{connection:_0x2f9f6a}=this['context']['plugins']['get'](c),_0x502ce8=new Set();for(const {resolvedBy:_0x144f0a,comments:_0x4c0562}of _0x2bc53e){_0x144f0a&&!_0x16ae52['getUser'](_0x144f0a)&&_0x502ce8['add'](_0x144f0a);for(const {userId:_0x4feeeb}of _0x4c0562)_0x16ae52['getUser'](_0x4feeeb)||_0x502ce8['add'](_0x4feeeb);}if(0x0===_0x502ce8['size'])return;const _0x3d29ec=await lt['getMany'](_0x2f9f6a,Array['from'](_0x502ce8));for(const _0x3db18f of _0x3d29ec)_0x16ae52['getUser'](_0x3db18f['id'])||_0x16ae52['addUser'](_0x3db18f);}}async function B(_0x24bc1d){if('404'!==_0x24bc1d['code'])throw _0x24bc1d;}function ut(_0x8f598e){if((_0x3c59f8=_0x8f598e)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x3c59f8['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x3c59f8['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x3c59f8;throw _0x8f598e;}function S(_0x333970){return{'threadId':_0x333970['commentThreadId'],'commentId':_0x333970['commentId'],'content':_0x333970['content'],'createdAt':_0x333970['createdAt'],'authorId':_0x333970['userId'],'attributes':_0x333970['attributes']||{}};}class g extends _0x399b4e{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
+ ((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x562ad3){super(_0x562ad3);const _0x5b6285=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x5b6285);}['init'](){const _0x2a3a99=this['editor']['plugins']['get'](c),_0x4bd6ed=this['editor']['plugins']['get']('TrackChangesEditing');return _0x4bd6ed['adapter']={'getSuggestion':async _0x5d3963=>{await this['_waitForServiceReady']();const _0x3da9ac=await this['_trackChangesService']['get'](_0x5d3963)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x3da9ac]),_0x3da9ac;},'addSuggestion':async({id:_0x2d30dc,type:_0x17b9e1,data:_0x3962d2,originalSuggestionId:_0x1e459b,attributes:_0x150616})=>{await this['_waitForServiceReady']();const _0x1d217e={'id':_0x2d30dc,'type':_0x17b9e1,'data':_0x3962d2,'originalSuggestionId':_0x1e459b,'attributes':_0x150616},_0x6dabfb=await this['_trackChangesService']['add'](_0x2d30dc,_0x17b9e1,_0x3962d2,_0x1e459b,_0x150616)['catch'](_0xf50d2=>{if(ft(_0xf50d2))return new Promise(_0x330d09=>{this['_bufferedRequests']['set'](_0x2d30dc,{'resolve':_0x330d09,'suggestionData':_0x1d217e});});throw _0xf50d2;});return this['_bufferedRequests']['delete'](_0x2d30dc),_0x6dabfb;},'updateSuggestion':async(_0x2369a8,_0x355a81)=>{if(await this['_waitForServiceReady'](),'open'!==_0x355a81['state'])return this['_trackChangesService']['update'](_0x2369a8,_0x355a81)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x2061f7,_0x3a26f8)=>{_0x4bd6ed['hasSuggestion'](_0x3a26f8['id'])&&(_0x4bd6ed['getSuggestion'](_0x3a26f8['id'])['attributes']=_0x3a26f8['attributes']);}),this['_trackChangesService']['connect'](_0x2a3a99['connection'])['then'](_0x4362d8=>(_0x2a3a99['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x4362d8)['then'](()=>{for(const _0x4cfc5d of _0x4362d8){_0x4bd6ed['addSuggestionData'](_0x4cfc5d)['_saved']=!0x0;}})));}async['reconnect'](){const _0x47bf03=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x40a86a}=this['editor']['plugins']['get'](c),_0x3be276=await this['_trackChangesService']['connect'](_0x40a86a);await this['_fetchMissingUsersForThreads'](_0x3be276);for(const {suggestionData:_0x38510b,resolve:_0x1be4cd}of this['_bufferedRequests']['values']()){let _0x2c6253=_0x3be276['find'](_0x4b905a=>_0x4b905a['id']===_0x38510b['id']);_0x2c6253||(_0x2c6253=await this['_trackChangesService']['add'](_0x38510b['id'],_0x38510b['type'],_0x38510b['data'],_0x38510b['originalSuggestionId'])),_0x1be4cd(_0x2c6253);}for(const _0x257eaf of _0x3be276)_0x47bf03['hasSuggestion'](_0x257eaf['id'])||_0x47bf03['addSuggestionData'](_0x257eaf);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x3fc3fa=>{this['listenTo'](this['_trackChangesService'],'connected',_0x3ffeff=>{_0x3ffeff['off'](),_0x3fc3fa();});});}async['_fetchMissingUsersForThreads'](_0x23a02c){const _0x375a47=this['editor']['plugins']['get'](_0x3006d7),{connection:_0x4e9e1e}=this['editor']['plugins']['get'](c),_0x5049fa=new Set();for(const {authorId:_0x1eae3c}of _0x23a02c)_0x375a47['getUser'](_0x1eae3c)||_0x5049fa['add'](_0x1eae3c);if(0x0===_0x5049fa['size'])return;const _0x273e80=await lt['getMany'](_0x4e9e1e,Array['from'](_0x5049fa));for(const _0x5d2d86 of _0x273e80)_0x375a47['getUser'](_0x5d2d86['id'])||_0x375a47['addUser'](_0x5d2d86);}}function R(_0x99c34d){if(ft(_0x99c34d))return new Promise(()=>{});throw _0x99c34d;}function ft(_0x42acd2){return _0x42acd2['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x42acd2['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x399b4e{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x1d3807=this['editor']['plugins']['get'](c),_0x170a38=this['editor']['plugins']['get']('CommentsEditing'),_0x496b6d=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x1d3807,'change:state',(_0x283904,_0x419230,_0x1b23d6)=>{_0x170a38['isThreadsLoadingPaused']='connected'!==_0x1b23d6;});}),this['listenTo'](_0x1d3807,'change:state',(_0x2a6268,_0x8c7bc9,_0x433f1a)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x433f1a);}),_0x496b6d['_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 _0x399b4e{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x399b4e{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
+ ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x3006d7];}constructor(_0x41a24e){super(_0x41a24e);const _0x5f8b76=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x5f8b76);}async['init'](){const _0x211cc4=this['editor']['plugins']['get'](l),_0x3a60ca=_0x211cc4['serverHistory'],_0x4eec15=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x3a60ca,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x211cc4['sessionId']});const _0xcfa064=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x31f5c2=await tt['isBundleUploaded'](_0x4eec15['connection'],_0xcfa064);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0xfe6c78})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0xfe6c78)),'updateRevisions':async _0x53963a=>{await this['_waitForServiceReady']();const _0x199b5a=this['_revisionTracker']['currentRevision'];if(_0x31f5c2&&0x1===_0x53963a['length']&&_0x53963a[0x0]['id']===_0x199b5a['id'])return _0x53963a;for(const _0x2360fb of _0x53963a)_0x2360fb['id']===_0x199b5a['id']&&(_0x2360fb['isEmptyCurrent']=_0x2360fb['fromVersion']===_0x2360fb['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x53963a,this['_lastRequestId'])['then'](_0x13dd35=>(this['_lastRequestId']=_0x13dd35,_0x53963a))['catch'](_0x488b84=>{if(st(_0x488b84)||'400'===_0x488b84['code']&&void 0x0!==_0x488b84['data']['wrongRequestId']){for(const _0x55abf5 of _0x53963a){!this['_revisionTracker']['repository']['getRevision'](_0x55abf5['id'])||this['_revisionTracker']['_bufferUpdate'](_0x55abf5['id'],_0x55abf5,!0x1);}if(st(_0x488b84))throw _0x488b84;return _0x53963a;}throw _0x488b84;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x5a7060,{revisionsData:_0xac3f8b,requestId:_0x34e7f2})=>{Math['max'](..._0xac3f8b['map'](_0x2a0b64=>_0x2a0b64['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0xac3f8b,_0x34e7f2);}):this['_handleRevisionsUpdate'](_0xac3f8b,_0x34e7f2);});const {revisions:_0x373d2d,requestId:_0x1a58c8}=await this['_revisionHistoryService']['connect'](_0x4eec15['connection']);_0x4eec15['addToReconnectionStack'](this),this['_lastRequestId']=_0x1a58c8,await this['_fetchMissingUsers'](_0x373d2d);for(const _0x2f8894 of _0x373d2d)this['_revisionTracker']['addRevisionData'](_0x2f8894);this['listenTo'](_0x211cc4,'change:_isConnected',(_0x3c3783,_0x5d57a9,_0x3dd93a)=>{_0x3dd93a&&(this['_oldOffset']=_0x211cc4['_offset'],_0x3c3783['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x4eec15,'state',_0x1f41e2=>_0x1f41e2===_0x297bec['CONNECTED']);}async['reconnect'](){const _0x31be8b=this['editor']['plugins']['get'](c),_0x35e048=this['editor']['plugins']['get'](l),_0x380250=async()=>{const _0x20c250=this['_revisionTracker']['currentRevision'],_0xb8da99=_0x20c250['id'],_0x28be51=_0xb8da99!==_0x35e048['sessionId'];if(_0x28be51){const _0x3fab01=_0x35e048['_offset']-this['_oldOffset'],_0x1b1b41=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x20c250['toVersion']+_0x3fab01!==_0x1b1b41){const _0x3f0963=_0x20c250['fromVersion']+_0x3fab01,_0x2ba417=this['editor']['plugins']['get'](_0x3006d7),_0x1927c6=this['_revisionTracker']['buildRevisionData']({'revision':_0x20c250,'from':_0x3f0963,'to':_0x1b1b41});_0x1927c6['id']=_0x20c250['id'];const _0x290f24=_0x1927c6['authorsIds']['map'](_0x247348=>_0x2ba417['getUser'](_0x247348));_0x20c250['_update']({..._0x1927c6,'authors':_0x290f24},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x20c250['id'],_0x1927c6,!0x0);}this['_revisionTracker']['_startingVersion']=_0x1b1b41,(_0x20c250['toVersion']===_0x20c250['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0xb8da99)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0xb8da99),this['_revisionTracker']['_createCurrentRevision'](_0x1b1b41));}const {revisions:_0x311a92,requestId:_0x3b7de0}=await this['_revisionHistoryService']['reconnect'](_0x31be8b['connection'],this['_lastRequestId']);_0x28be51&&_0x311a92['length']>0x0?_0x35e048['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x311a92),this['_handleRevisionsUpdate'](_0x311a92,_0x3b7de0),this['_revisionTracker']['sendBufferedUpdates']());};return _0x35e048['_isConnected']?_0x380250():new Promise((_0x205995,_0x27c74a)=>{_0x35e048['once']('change:_isConnected',()=>{_0x380250()['then'](_0x205995)['catch'](_0x27c74a);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0xfcfce1=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x12afbc=>{_0x12afbc['off'](),_0xfcfce1();});});}['_getLatestVersionFromServerOperations'](){const _0x50a20c=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0xf110b9 of _0x50a20c)if('marker'!==_0xf110b9['type']||_0xf110b9['affectsData'])return _0xf110b9['baseVersion']+0x1;}['_getLatestVersion'](){const _0x1f49c5=this['editor']['plugins']['get'](l);return new Promise(_0x2e12b2=>{_0x1f49c5['_isPendingUpdate']?_0x1f49c5['once']('change:_isPendingUpdate',()=>{_0x2e12b2(this['_getLatestVersionFromServerOperations']());}):_0x2e12b2(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x1813a9,_0x2eb632){const _0x1447d8=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x2eb632;for(const _0x3d0dc1 of _0x1813a9){const _0xd4e596=_0x1447d8['getRevision'](_0x3d0dc1['id']);if(_0xd4e596){if((_0x3d0dc1['fromVersion']||_0x3d0dc1['toVersion'])&&(_0x3d0dc1['diffData']=null),_0xd4e596===this['_revisionTracker']['currentRevision']){const _0x411213=Math['max'](_0xd4e596['toVersion'],_0x3d0dc1['toVersion']),_0x56390e=Math['max'](_0xd4e596['fromVersion'],_0x3d0dc1['fromVersion']);let _0x465887;_0xd4e596['toVersion']===_0x3d0dc1['toVersion']&&_0xd4e596['fromVersion']===_0x3d0dc1['fromVersion']?(_0x465887=!0x0,this['_preventResendingRevisionData'](_0x3d0dc1)):_0x3d0dc1['toVersion']===_0x411213&&_0x3d0dc1['fromVersion']===_0x56390e?_0x465887=!0x1:(_0xd4e596['toVersion']===_0x411213&&_0xd4e596['fromVersion']===_0x56390e||this['_fixRevision']({'revision':_0xd4e596,'from':_0x56390e,'to':_0x411213}),_0x465887=!0x0),_0x465887&&(delete _0x3d0dc1['fromVersion'],delete _0x3d0dc1['toVersion'],delete _0x3d0dc1['diffData'],delete _0x3d0dc1['createdAt'],delete _0x3d0dc1['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x3d0dc1),this['_preventResendingRevisionData'](_0x3d0dc1);}else this['_revisionTracker']['addRevisionData'](_0x3d0dc1);}const _0x29e88e=_0x1447d8['getRevisions']();_0x29e88e['reverse']();for(let _0x37d23b=0x0;_0x37d23b<_0x29e88e['length']-0x1;_0x37d23b++){const _0x8f6966=_0x29e88e[_0x37d23b],_0x412bbf=_0x29e88e[_0x37d23b+0x1];if(_0x8f6966['fromVersion']<_0x412bbf['toVersion']){const _0x4d9957=_0x412bbf['toVersion'],_0x22e419=Math['max'](_0x4d9957,_0x8f6966['toVersion']);this['_fixRevision']({'revision':_0x8f6966,'from':_0x4d9957,'to':_0x22e419});}}}['_fixRevision']({revision:_0x4e8a74,from:_0x1a97be,to:_0x570cb4}={}){const _0x1dbd6a=this['editor']['plugins']['get'](_0x3006d7),_0x40fbd7=this['_revisionTracker']['buildRevisionData']({'revision':_0x4e8a74,'from':_0x1a97be,'to':_0x570cb4});_0x40fbd7['authors']=_0x40fbd7['authorsIds']['map'](_0x367a11=>_0x1dbd6a['getUser'](_0x367a11)),_0x4e8a74['_update'](_0x40fbd7);}['_preventResendingRevisionData'](_0x6cea0e){const _0x463e9a={};_0x463e9a['id']=_0x6cea0e['id'];for(const _0x453f99 of Object['keys'](_0x6cea0e))'id'!==_0x453f99&&(_0x463e9a[_0x453f99]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x463e9a['id'],_0x463e9a,!0x0);}async['_fetchMissingUsers'](_0x1f81a1){const _0x320428=this['editor']['plugins']['get'](_0x3006d7),{connection:_0x107446}=this['editor']['plugins']['get'](c),_0x557cff=new Set();for(const _0x28c2fa of _0x1f81a1){for(const _0x1ab480 of _0x28c2fa['authorsIds'])_0x2dc5ca(_0x1ab480);_0x28c2fa['creatorId']&&_0x2dc5ca(_0x28c2fa['creatorId']);}if(0x0===_0x557cff['size'])return;const _0x215ce1=await lt['getMany'](_0x107446,Array['from'](_0x557cff));for(const _0x580ef6 of _0x215ce1)_0x320428['getUser'](_0x580ef6['id'])||_0x320428['addUser'](_0x580ef6);function _0x2dc5ca(_0x4f5ea8){_0x320428['getUser'](_0x4f5ea8)||_0x557cff['add'](_0x4f5ea8);}}}function st(_0x21aeae){return _0x21aeae['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x21aeae['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x21aeae['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x399b4e{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x2bd5ae{constructor(_0x46a405){super(_0x46a405);const _0x3cd77d=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x3cd77d['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x3cd77d['to']('usersCount',_0x27c319=>q(_0x46a405,'CONNECTED_USERS',_0x27c319))}]});}}class es extends _0x2bd5ae{['items'];['keystrokes'];constructor(_0x1055e8){super(_0x1055e8);const _0x44e8b6=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x160ad3(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x44e8b6['if']('hasPopup'),'aria-expanded':_0x44e8b6['to']('isExpanded',_0x213a38=>this['hasPopup']&&String(_0x213a38)),'aria-label':_0x44e8b6['to']('hasPopup',_0x3e8ed4=>q(_0x1055e8,_0x3e8ed4?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x44e8b6['to']('hasPopup',_0x3d1fd0=>!!_0x3d1fd0&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x44e8b6['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x1510e3,_0x3a7b9c,_0x4540e2)=>{this['element']&&(_0x4540e2?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 _0x2bd5ae{['counterView'];['inlineListView'];constructor(_0x578ff2){super(_0x578ff2);const _0x13920b=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x578ff2),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x2f115b of this['inlineListView']['items'])_0x2f115b['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',_0x13920b['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x2bd5ae{['listWrapperView'];constructor(_0xaa7408,_0x49641b){super(_0xaa7408),this['listWrapperView']=new mt(_0xaa7408,_0x49641b),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0xaa7408,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x28698d{constructor(_0xe12d90,_0x41b410){super(_0xe12d90);const _0x3c24f5=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x41b410?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x3c24f5['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x3c24f5['to']('role'),'aria-label':_0x3c24f5['to']('ariaLabel'),'aria-labelledby':_0x3c24f5['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x4b223b['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x4bbac0=this['element'];_0x4bbac0&&(this['_isScrollable']=Math['max'](_0x4bbac0['scrollHeight'],_0x4bbac0['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x217a9c,_0x26e748,_0x336a50){super(_0x217a9c);const _0x15cd67=this['bindTemplate'];this['userView']=new ct(_0x217a9c,_0x26e748);const _0x538465={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x26e748['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x26e748['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x26e748['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x336a50&&(_0x538465['tag']='button',_0x538465['on']={'click':_0x15cd67['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x538465);}['focus'](){this['element']['focus']();}}class y extends _0x2bd5ae{['userView'];['markerView'];constructor(_0x1f1b71,_0x1b7553,_0x17c120){super(_0x1f1b71);const _0x35e94e=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x1f1b71,_0x1b7553),this['markerView']=new at(_0x1f1b71,_0x1b7553);const _0x374dff=new ot(_0x1f1b71);_0x374dff['template']['tag']='span',_0x374dff['text']=_0x1b7553['name'];const _0x152dbb={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x35e94e['to']('isFocusable',_0x45fbca=>!!_0x45fbca&&0x0),'aria-labelledby':_0x374dff['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x35e94e['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x35e94e['to']('hasTooltip',_0x212fe6=>!_0x212fe6),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x374dff]};_0x17c120&&(_0x152dbb['tag']='button',_0x152dbb['on']={'click':_0x35e94e['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x152dbb);}}class at extends _0x2bd5ae{constructor(_0x4262ec,_0x3ec93e){super(_0x4262ec),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x3ec93e['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x4094f3{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x583196){super(_0x583196),this['context']['config']['define']('presenceList',A);const _0x1a32a7=_0x583196['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x1a32a7)throw new _0x33d818('presencelist-collapseat-invalid-format',this);if(_0x1a32a7<0x1)throw new _0x33d818('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0xd9e3ba(),this['balloonPanelView']=new _0x780661(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x532041 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x532041);this['listenTo'](this['_allConnectedUsers'],'add',(_0x165a22,_0x58cb8e)=>{this['_handleUserAdd'](_0x58cb8e);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x5442f0,_0x2c9835)=>{this['_handleUserRemove'](_0x2c9835);});}['_createView'](){const _0x20082e=this['context'],_0x28f255=new L(this['context']['locale']),_0x2aa48e=this['balloonPanelView'];if(!_0x56cf79(_0x20082e['config']['get']('presenceList.container')))throw new _0x33d818('presencelist-missing-container',this);return _0x28f255['counterView']['bind']('usersCount')['to'](this),_0x28f255['bind']('isCollapsed')['to'](this,'usersCount',_0x3e6ef6=>{const {collapseAt:_0x5dca8d,displayMe:_0x3a95d3}=_0x20082e['config']['get']('presenceList'),_0x421544=_0x3e6ef6>=_0x5dca8d;return _0x28f255['counterView']['isHidden']=!(0x1==_0x3e6ef6&&_0x3a95d3||_0x421544),_0x421544||this['hideDropdown'](),_0x421544;}),_0x28f255['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x531a29=>{const _0x5447e4=_0x20082e['config']['get']('presenceList'),_0x20b8bf=new y(_0x20082e['locale'],_0x531a29,!!_0x5447e4['onClick']);return _0x20b8bf['bind']('hasTooltip')['to'](_0x28f255,'isCollapsed',_0x38f75b=>!_0x38f75b),_0x20b8bf['bind']('isFocusable')['to'](_0x28f255,'isCollapsed',_0x220b86=>!_0x220b86),_0x5447e4['onClick']&&this['listenTo'](_0x20b8bf,'execute',()=>{this['view']['isCollapsed']||_0x5447e4['onClick'](_0x531a29,_0x20b8bf['element']);}),_0x20b8bf;}),this['listenTo'](_0x28f255['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x28f255['inlineListView']['keystrokes']['set']('Enter',(_0x2a0a49,_0x5488d7)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x5488d7());}),_0x28f255['render'](),_0x2aa48e['render'](),_0x1fb300({'emitter':_0x28f255,'activator':()=>_0x2aa48e['isVisible'],'contextElements':[_0x2aa48e['element'],_0x28f255['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x20082e['config']['get']('presenceList.container')['appendChild'](_0x28f255['element']),this['_bodyCollection']=new _0x4c3f79(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x28f255;}['_handleUserAdd'](_0x5055f7){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x5055f7['isMe'])return;const _0x4b8458=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x4b8458&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0xd3d37e=_0x5055f7['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x5055f7,_0xd3d37e);}['_handleUserRemove'](_0x26a307){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x26a307['id'])&&(this['currentDisplayedUsers']['remove'](_0x26a307['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x143079 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x143079['id']))return void this['currentDisplayedUsers']['add'](_0x143079,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x18b4df=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x18b4df['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x172dbb}=this['presenceDropdownView'];_0x172dbb['items']['bindTo'](this['_allConnectedUsers'])['using'](_0xc2a9bd=>{if(!_0x18b4df['displayMe']&&_0xc2a9bd['isMe'])return null;const _0x505623=new k(this['context']['locale'],_0xc2a9bd,!!_0x18b4df['onClick']);return _0x18b4df['onClick']&&this['listenTo'](_0x505623,'execute',()=>{_0x18b4df['onClick'](_0xc2a9bd,_0x505623['element']);}),_0x505623;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x172dbb['focus'](),_0x172dbb['checkIfScrollable']();const _0xe316af=(_0x4c8a1c,_0x25ce8f)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x25ce8f();};_0x172dbb['keystrokes']['set']('Esc',_0xe316af),_0x172dbb['keystrokes']['set']('Shift+Tab',_0xe316af),_0x172dbb['keystrokes']['set']('Tab',(_0x4bfb18,_0x4eb532)=>{!function(_0x2ae9a5){const _0x13e13d=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x528c44=>_0x528c44+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x3867ed=[...document['body']['querySelectorAll'](_0x13e13d)]['filter'](_0x16e50b=>_0x16e50b===document['activeElement']||_0x16e50b['offsetWidth']+_0x16e50b['offsetHeight']>0x0)['sort']((_0x1223ac,_0x5e0a1e)=>(_0x1223ac['tabIndex']||0x0)-(_0x5e0a1e['tabIndex']||0x0)),_0xaad997=_0x3867ed['indexOf'](_0x2ae9a5),_0x28193e=_0x3867ed[(_0xaad997+0x1)%_0x3867ed['length']];_0x28193e&&_0x28193e['focus']();}(this['view']['element']),this['hideDropdown'](),_0x4eb532();}),_0x172dbb['focusTracker']['add'](this['view']['element']),_0x172dbb['focusTracker']['on']('change:isFocused',(_0x4c3019,_0x49a93a,_0x53191b)=>{_0x53191b||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 i extends _0x4094f3{static get['requires'](){return[r,s];}static get['pluginName'](){return'PresenceList';}}export{a as CloudServicesCommentsAdapter,v as CloudServicesRevisionHistoryAdapter,g as CloudServicesTrackChangesAdapter,i as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,d as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x4799ec=>0x0==_0x4799ec?0x0:0x1==_0x4799ec?0x1:0x2==_0x4799ec?0x2:_0x4799ec%0x64>=0x3&&_0x4799ec%0x64<=0xa?0x3:_0x4799ec%0x64>=0xb&&_0x4799ec%0x64<=0x63?0x4:0x5}};
23
+ export default{'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0xf4df1a=>0x0==_0xf4df1a?0x0:0x1==_0xf4df1a?0x1:0x2==_0xf4df1a?0x2:_0xf4df1a%0x64>=0x3&&_0xf4df1a%0x64<=0xa?0x3:_0xf4df1a%0x64>=0xb&&_0xf4df1a%0x64<=0x63?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x41beeb=>{const {ar:{dictionary:_0x23df65,getPluralForm:_0x4012d3}}={'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x1ca7c8=>0x0==_0x1ca7c8?0x0:0x1==_0x1ca7c8?0x1:0x2==_0x1ca7c8?0x2:_0x1ca7c8%0x64>=0x3&&_0x1ca7c8%0x64<=0xa?0x3:_0x1ca7c8%0x64>=0xb&&_0x1ca7c8%0x64<=0x63?0x4:0x5}};_0x41beeb['ar']||={'dictionary':{},'getPluralForm':null},_0x41beeb['ar']['dictionary']=Object['assign'](_0x41beeb['ar']['dictionary'],_0x23df65),_0x41beeb['ar']['getPluralForm']=_0x4012d3;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x294230=>{const {ar:{dictionary:_0x209128,getPluralForm:_0xd6671d}}={'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x1d76e7=>0x0==_0x1d76e7?0x0:0x1==_0x1d76e7?0x1:0x2==_0x1d76e7?0x2:_0x1d76e7%0x64>=0x3&&_0x1d76e7%0x64<=0xa?0x3:_0x1d76e7%0x64>=0xb&&_0x1d76e7%0x64<=0x63?0x4:0x5}};_0x294230['ar']||={'dictionary':{},'getPluralForm':null},_0x294230['ar']['dictionary']=Object['assign'](_0x294230['ar']['dictionary'],_0x209128),_0x294230['ar']['getPluralForm']=_0xd6671d;})(window['CKEDITOR_TRANSLATIONS']||={});