@ckeditor/ckeditor5-real-time-collaboration 43.1.0-alpha.8 → 43.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 _0x7b507,Plugin as _0x2ceca2,PendingActions as _0x401b44,Context as _0x1d0732}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x124502,CKEditorError as _0x1896a5,Collection as _0x4ad3b1,global as _0x3cbde8,version as nt,uid as _0x12ab9f,KeystrokeHandler as _0x390e01}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x5fbac1,View as _0x1934d2,ListView as _0x36c64c,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x13fe4a,clickOutsideHandler as _0x4c8cdb,BodyCollection as _0x245e2b}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x5da844,NoOperation as _0x47ff25,InsertOperation as _0x641871,MarkerOperation as _0x5cd881,RootAttributeOperation as _0x2dfe87,transformSets as _0x53c149,OperationFactory as _0x2572a5}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x188b29,CollaborativeEditingService as _0x5771a1,User as lt,CommentsService as _0xb57ee2,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x2b169a,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x32675f}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x1bdf55}from'lodash-es';class c extends _0x7b507{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
- ((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x5fbac1];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x1f0432){super(_0x1f0432),this['set']('state',_0x188b29['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x124502);}['init'](){const _0x15221c=this['context'],_0x21438e=_0x15221c['plugins']['get']('CloudServices'),_0x298746=_0x15221c['plugins']['get'](_0x5fbac1);if(!_0x21438e['token'])throw new _0x1896a5('websocketgateway-missing-token',this);if(!_0x21438e['webSocketUrl'])throw new _0x1896a5('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'](_0x21438e['token'],_0x21438e['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0xa87705=>{if(this['connection']=_0xa87705,this['bind']('state')['to'](_0xa87705,'state',this,'_isBrowserOffline',(_0x1c41ba,_0x273301)=>('connected'!==_0x1c41ba&&(this['_shouldPluginsReconnect']=!0x0),_0x273301||_0x1c41ba!==_0x188b29['CONNECTED']?_0x188b29['DISCONNECTED']:this['state']==_0x188b29['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x188b29['CONNECTING']):_0x188b29['CONNECTED'])),this['connection']['on']('error',(_0x379d14,_0x4a31a5)=>{if('limitExceeded'!==_0x4a31a5['code'])throw console['error'](_0x4a31a5),new _0x1896a5('cloudservices-init',null,{'originalError':_0x4a31a5});_0x298746['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'});}),!_0xa87705['me'])return new Promise(_0x25d490=>_0xa87705['on']('change:me',_0x25d490));})['catch'](_0x57a363=>{throw console['error'](_0x57a363),new _0x1896a5('cloudservices-init',null,{'originalError':_0x57a363});});}['addToReconnectionStack'](_0x2fe1f7){if('function'!=typeof _0x2fe1f7['reconnect'])throw new _0x1896a5('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x2fe1f7))throw new _0x1896a5('websocketgateway-plugin-already-registered',this,{'name':_0x2fe1f7['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x2fe1f7);}['removeFromReconnectionStack'](_0x3ff791){this['_reconnectionStack']['delete'](_0x3ff791);}['isInReconnectionStack'](_0x37fec8){return this['_reconnectionStack']['has'](_0x37fec8);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0xf30c8b=>_0xf30c8b['reconnect']())))['then'](()=>this['state']=_0x188b29['CONNECTED'])['catch'](_0x41327d=>{throw console['error'](_0x41327d),new _0x1896a5('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x188b29['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x7b507{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x2b169a];}constructor(_0x2a7cee){super(_0x2a7cee),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x4ad3b1(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x2b169a);}['init'](){const _0x4df5ee=this['context']['plugins']['get'](c);this['listenTo'](_0x4df5ee,'change:state',(_0x260e31,_0x284126,_0x4ebe07)=>{if('connected'!==_0x4ebe07)this['channelSessions']['forEach'](_0x3960bc=>_0x3960bc['clear']()),this['channelConnectedUsers']['forEach'](_0x2e5bf7=>_0x2e5bf7['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x2bb9e7,_0x3d2a6c]of this['_registeredSessions'])for(const _0x4caa89 of _0x3d2a6c)this['_handleSessionAdd'](_0x2bb9e7,_0x4caa89);}}),this['_createUser'](_0x4df5ee['connection']['me'],!0x0);}['register'](_0x3fca7f,_0x3a0c52){if(this['_registeredSessions']['has'](_0x3fca7f))throw new _0x1896a5('sessions-register-already-registered',null,{'channelId':_0x3fca7f});this['_registeredSessions']['set'](_0x3fca7f,_0x3a0c52),this['channelSessions']['set'](_0x3fca7f,new _0x4ad3b1()),this['channelConnectedUsers']['set'](_0x3fca7f,new _0x4ad3b1()),this['listenTo'](_0x3a0c52,'add',(_0x154637,_0x3a2bd5)=>this['_handleSessionAdd'](_0x3fca7f,_0x3a2bd5)),this['listenTo'](_0x3a0c52,'remove',(_0x112338,_0x2d32ee)=>this['_handleSessionRemove'](_0x3fca7f,_0x2d32ee));for(const _0xc75632 of _0x3a0c52)this['_handleSessionAdd'](_0x3fca7f,_0xc75632);}['unregister'](_0x27e0d5){if(!this['_registeredSessions']['has'](_0x27e0d5))throw new _0x1896a5('sessions-unregister-not-exist',null,{'channelId':_0x27e0d5});const _0x39ff8e=this['_registeredSessions']['get'](_0x27e0d5);this['stopListening'](_0x39ff8e);for(const _0x3ad45c of _0x39ff8e)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x27e0d5,_0x3ad45c);this['_registeredSessions']['delete'](_0x27e0d5),this['channelSessions']['delete'](_0x27e0d5),this['channelConnectedUsers']['delete'](_0x27e0d5);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x6de025){for(const _0x472bc8 of this['channelSessions']['values']())for(const _0x298c47 of _0x472bc8)if(_0x298c47['id']===_0x6de025)return _0x298c47['user'];}['getUserSessions'](_0x51d73b,_0x1691b3){const _0x524c81=_0x1691b3?[this['channelSessions']['get'](_0x1691b3)]:this['channelSessions']['values'](),_0x2c52f7=new Set();for(const _0x3bc650 of _0x524c81)for(const _0x1946b3 of _0x3bc650)_0x1946b3['user']['id']===_0x51d73b['id']&&_0x2c52f7['add'](_0x1946b3['id']);return _0x2c52f7;}['getUserRole'](_0x485c67){for(const _0x4da3e5 of this['channelSessions']['values']())for(const _0xaacacb of _0x4da3e5)if(_0xaacacb['user']===_0x485c67)return _0xaacacb['role'];}['_handleSessionAdd'](_0x48f4b9,_0x10be4d){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x1a2d2a=_0x10be4d['user'],_0x5e49be=this['_users']['getUser'](_0x1a2d2a['id'])||this['_createUser'](_0x1a2d2a),_0x27f21d=Object['assign']({},_0x10be4d,{'user':_0x5e49be});this['channelSessions']['get'](_0x48f4b9)['add'](_0x27f21d);const _0x17db43=this['channelConnectedUsers']['get'](_0x48f4b9);_0x17db43['has'](_0x5e49be['id'])||_0x17db43['add'](_0x5e49be),this['allConnectedUsers']['has'](_0x5e49be['id'])||this['allConnectedUsers']['add'](_0x5e49be,_0x5e49be['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x48f4b9,{'channelId':_0x48f4b9,'session':_0x27f21d});}['_handleSessionRemove'](_0x499f0b,_0x64c6e7){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x5d353d=this['channelConnectedUsers']['get'](_0x499f0b),_0x108281=_0x64c6e7['user'];_0x108281['id']&&(this['channelSessions']['get'](_0x499f0b)['remove'](_0x64c6e7['id']),_0x5d353d['has'](_0x108281['id'])&&!this['getUserSessions'](_0x108281,_0x499f0b)['size']&&_0x5d353d['remove'](_0x108281['id']),this['allConnectedUsers']['get'](_0x108281['id'])&&!this['getUserSessions'](_0x108281)['size']&&this['allConnectedUsers']['remove'](_0x108281['id']));}['_createUser'](_0x1f1649,_0x1fc23e){const _0xa405fe=this['_users']['addUser'](_0x1f1649);return _0x1fc23e&&this['_users']['defineMe'](_0x1f1649['id']),_0xa405fe['orderNumber']=this['_uniqueUsersCount']++,_0xa405fe;}}class H extends _0x2ceca2{['_domEmitter']=new(_0x124502())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x9a766b=this['editor'],_0x2e3250=_0x9a766b['plugins']['get'](r);_0x9a766b['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0xb58088,{writer:_0x443cd6})=>function(_0x308d00,_0x44984c,_0x330bae,_0x190ee5){const _0x59d020=_0x308d00['markerName']['split'](':')[0x2],_0x337216=_0x330bae['getUserBySessionId'](_0x59d020);if(!_0x337216||_0x59d020===_0x330bae['mySessionId'])return;if(!_0x190ee5['model']['schema']['checkChild'](_0x308d00['markerRange']['start'],'$text'))return;const _0x4bad55={'class':'ck-user__marker\x20'+_0x337216['color']['getMarkerClass'](),'data-name':_0x337216['name'],'data-session-id':_0x59d020},_0x5c2ba5=_0x190ee5['model']['markers']['get'](_0x308d00['markerName']),_0x3f636b=_0x5c2ba5['getStart'](),_0x3e00c1=_0x3f636b['nodeAfter'],_0x50e352=_0x190ee5['model']['schema'];if(_0x3e00c1&&_0x50e352['isObject'](_0x3e00c1)&&_0x50e352['isInline'](_0x3e00c1)&&!_0x190ee5['model']['markers']['get']('user:range:'+_0x59d020)['getRange']()['isCollapsed'])return;const _0x47ad69=_0x3f636b['parent'];return _0x190ee5['model']['schema']['isLimit'](_0x47ad69)&&!_0x190ee5['model']['hasContent'](_0x47ad69)&&(_0x4bad55['contenteditable']=!0x1),function(_0x497265,_0xd220f9,_0x317ce8){const _0x21243f=_0x497265['createUIElement']('span',_0xd220f9);return _0x497265['setCustomProperty']('userPositionMarker',!0x0,_0x21243f),_0x21243f['render']=function(_0x3f55f3){const _0x52ed3d=this['toDomElement'](_0x3f55f3);return _0x52ed3d['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>'+_0x317ce8['name']+'</span>⁠',_0x52ed3d['addEventListener']('mouseenter',()=>{_0x52ed3d['classList']['add']('ck-user__marker_hovered');}),_0x52ed3d['addEventListener']('mouseleave',()=>{_0x52ed3d['classList']['remove']('ck-user__marker_hovered');}),_0x52ed3d;},_0x21243f['isSimilar']=function(_0x2df957){return!(!this['getCustomProperty']('userPositionMarker')||!_0x2df957['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x2df957['getAttribute']('data-session-id'));},_0x21243f;}(_0x44984c,_0x4bad55,_0x337216);}(_0xb58088,_0x443cd6,_0x2e3250,_0x9a766b)}),_0x9a766b['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x18dc7b=>function(_0x55222a,_0x1a2fa6){const _0x16610e=_0x55222a['markerName']['split'](':')[0x2];if(_0x16610e===_0x1a2fa6['mySessionId'])return null;const _0x13360f=_0x1a2fa6['getUserBySessionId'](_0x16610e);if(!_0x13360f)return{'id':_0x16610e,'classes':[]};return{'id':_0x16610e,'classes':['ck-user__selection',_0x13360f['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x16610e},'priority':0x7d0+_0x13360f['orderNumber']};}(_0x18dc7b,_0x2e3250)}),function(_0x4f704b){const _0x209224=_0x4f704b['model'],_0x357d0e=new Map(),_0x3bec86=_0x4f704b['plugins']['get'](r);_0x209224['markers']['on']('update:user:range',(_0x27838f,_0x269f02,_0x1cf87f,_0x10ed2b)=>{if(!_0x10ed2b&&_0x357d0e['get'](_0x269f02['name']))return _0x357d0e['get'](_0x269f02['name'])['detach'](),void _0x357d0e['delete'](_0x269f02['name']);const _0xfac27f=_0x269f02['name']['split'](':')[0x2];if(_0xfac27f===_0x3bec86['mySessionId'])return;const _0x487f18='user:position:'+_0xfac27f;_0x209224['markers']['has'](_0x487f18)&&_0x4f704b['editing']['reconvertMarker'](_0x487f18),_0x269f02['on']('change:range',(_0x228f36,_0xf813ce,_0x3d582a)=>{if('$graveyard'!=_0xf813ce['root']['rootName']&&'$graveyard'==_0x269f02['getRange']()['root']['rootName']&&!_0x357d0e['has'](_0x269f02['name'])){const _0x1b614f=_0x209224['schema']['getNearestSelectionRange'](_0x3d582a['deletionPosition']);if(_0x1b614f){const _0x31bac9=ht['fromRange'](_0x1b614f);_0x357d0e['set'](_0x269f02['name'],_0x31bac9),_0x31bac9['on']('change:range',(_0xf89304,_0x19f625,_0x5df0e4)=>{if('$graveyard'==_0x31bac9['root']['rootName']){const _0x2c85f5=_0x209224['schema']['getNearestSelectionRange'](_0x5df0e4['deletionPosition']);_0x2c85f5?(_0x31bac9['start']=_0x2c85f5['start'],_0x31bac9['end']=_0x2c85f5['end']):(_0x357d0e['delete'](_0x269f02['name']),_0x31bac9['detach']());}});}}});}),_0x209224['document']['on']('change',()=>{_0x357d0e['size']>0x0&&_0x209224['enqueueChange']({'isUndoable':!0x1},_0x40ba63=>{for(const [_0xae5c05,_0x562795]of _0x357d0e)'$graveyard'==_0x209224['markers']['get'](_0xae5c05)['getRange']()['root']['rootName']&&(re(_0xae5c05['split'](':')[0x2],_0x562795['toRange'](),_0x209224,_0x40ba63),_0x562795['detach']());_0x357d0e['clear']();});});}(_0x9a766b),this['_domEmitter']['listenTo'](_0x3cbde8['document'],'keydown',(_0x10e219,{key:_0x4586b7})=>{'Escape'===_0x4586b7&&function(_0x1f9b87){_0x1f9b87['editing']['view']['change'](_0x4c8306=>{for(const _0x2d5163 of _0x1f9b87['model']['markers']){if(!_0x2d5163['name']['startsWith']('user:position'))continue;const _0x457917=_0x1f9b87['editing']['mapper']['markerNameToElements'](_0x2d5163['name']);if(_0x457917){for(const _0x309277 of _0x457917)_0x4c8306['removeClass']('ck-user__marker_hovered',_0x309277);}}});}(_0x9a766b);},{'useCapture':!0x0});}['afterInit'](){const _0x433be1=this['editor'],_0x395fae=_0x433be1['commands']['get']('undo');_0x395fae&&_0x433be1['model']['on']('applyOperation',(_0x47b92e,_0x9aca84)=>{const _0x211674=_0x9aca84[0x0];if('marker'!=_0x211674['type']||!_0x211674['name']['startsWith']('user:'))return;const _0x4c4214=_0x211674['batch'];_0x395fae['_createdBatches']['has'](_0x4c4214)&&(_0x211674['newRange']=_0x211674['oldRange']?_0x433be1['model']['createRange'](_0x211674['oldRange']['start'],_0x211674['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x15b55c=this['editor'],_0x5e029a=_0x15b55c['model']['document'],_0x3f10c2=_0x15b55c['plugins']['get'](r);_0x15b55c['model']['enqueueChange']({'isUndoable':!0x1},_0x2f1790=>{const _0x537023='user:range:'+_0x3f10c2['mySessionId'],_0x39ef2f='user:position:'+_0x3f10c2['mySessionId'],_0xbecc7e=_0x15b55c['model']['markers']['has'](_0x537023);_0x15b55c['editing']['view']['hasDomSelection']?re(_0x3f10c2['mySessionId'],_0x5e029a['selection']['getFirstRange'](),_0x15b55c['model'],_0x2f1790):_0xbecc7e&&(_0x2f1790['removeMarker'](_0x537023),_0x2f1790['removeMarker'](_0x39ef2f));});}}function re(_0x135c40,_0x4dd4a7,_0x5eda7a,_0x2a1c59){const _0x2ed804='user:range:'+_0x135c40,_0x51ee40='user:position:'+_0x135c40,_0x25135b=_0x4dd4a7['getContainedElement']();let _0x79923b=_0x4dd4a7['start'];_0x25135b&&_0x25135b['is']('element','tableCell')&&(_0x79923b=function(_0x16cb86,_0x3264f3){for(const _0x3b66e0 of _0x16cb86['getPositions']())if(_0x3264f3['schema']['checkChild'](_0x3b66e0,'$text'))return _0x3b66e0;}(_0x4dd4a7,_0x5eda7a),_0x4dd4a7=_0x2a1c59['createRange'](_0x79923b));const _0x28ae23=_0x2a1c59['createRange'](_0x79923b);_0x5eda7a['markers']['has'](_0x2ed804)?(_0x2a1c59['updateMarker'](_0x2ed804,{'range':_0x4dd4a7}),_0x2a1c59['updateMarker'](_0x51ee40,{'range':_0x28ae23})):(_0x2a1c59['addMarker'](_0x2ed804,{'range':_0x4dd4a7,'usingOperation':!0x0}),_0x2a1c59['addMarker'](_0x51ee40,{'range':_0x28ae23,'usingOperation':!0x0}));}function q(_0x4a1f4b,_0x183b74,_0x5effe9){const t=_0x4a1f4b['t'];switch(_0x183b74){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'},_0x5effe9);default:return'';}}let K=0x1;class l extends _0x2ceca2{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
- ((()=>_0x5771a1)());['_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,_0x401b44,_0x2b169a,_0x5fbac1];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x15b956=this['serverHistory']['getOperations']();for(let _0x395462=_0x15b956['length']-0x1;_0x395462>=0x0;_0x395462--){const _0x356a3f=_0x15b956[_0x395462];if(!this['_disconnectionOperations']['has'](_0x356a3f))return _0x356a3f['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x2496b9){if(super(_0x2496b9),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x5da844(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x1896a5('collaboration-missing-channelid',this);const _0x2b52f5=_0x2496b9['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x2b52f5,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x32675f(),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 _0x499157=this['editor'],_0x5a5dd3=_0x499157['plugins']['get'](_0x2b169a),_0x57949f=_0x499157['plugins']['get'](c);this['listenTo'](_0x5a5dd3,'getOperationAuthor',(_0x2c460f,_0xa12aa6)=>{const _0x1f1aa8=_0xa12aa6[0x0];_0x1f1aa8['_authorId']&&(_0x2c460f['return']=_0x5a5dd3['getUser'](_0x1f1aa8['_authorId']),_0x2c460f['stop']()),null===_0x1f1aa8['_authorId']&&(_0x2c460f['return']=null,_0x2c460f['stop']());},{'priority':'high'}),this['listenTo'](_0x499157['model']['document']['selection'],'change:range',(_0x3295e8,_0x5dae0b)=>{_0x5dae0b['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x499157['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x499157['model']['on']('applyOperation',(_0x467284,_0xf17ee2)=>{const _0x1f2cbc=_0xf17ee2[0x0];_0x1f2cbc['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x1f2cbc),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x57949f,'state',this,'_hasSynchronizationProblem',(_0x180883,_0x1cd787)=>'connected'===_0x180883&&!_0x1cd787),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x499157['disableReadOnlyMode']('rtc-offline'):_0x499157['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x499157['disableReadOnlyMode']('rtc-offline'):_0x499157['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x17aece=this['editor']['plugins']['get'](r),_0x443ffa=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x17aece['unregister'](this['_channelId']);const _0x533263=await this['_service']['reconnect'](_0x443ffa['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x533263)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x99864b=await this['_service']['getConnectedSessions']();_0x17aece['register'](this['_channelId'],_0x99864b),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x260342){if(function(_0x1ee95b){return'404'===_0x1ee95b['code'];}(_0x260342)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x5a1429){return'409'===_0x5a1429['code'];}(_0x260342)){const _0x36c7b5=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'](_0x36c7b5);}else{if(!(_0x260342 instanceof J))throw _0x260342;this['_handleReconnectionError']();}}}}['destroy'](){const _0x18ac7f=this['editor']['plugins']['get'](c),_0x32a6fd=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x32a6fd['channelSessions']['has'](this['_channelId'])&&_0x32a6fd['unregister'](this['_channelId']),_0x18ac7f['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x3a2418){if(this['sessionId']!==_0x3a2418['sessionId']&&this['_lastSyncedOperationId']!==_0x3a2418['lastOperationId'])throw new J();return this['sessionId']=_0x3a2418['sessionId'],this['_handleServerResponse']([],{..._0x3a2418,'wereChangesApplied':!0x1,'data':_0x3a2418['data']},'reconnect');}async['_connectService'](_0x4ceebe,_0x37d231=!0x1){const {connection:_0x2bc672}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x2bc672,this['_channelId'])['then'](_0x40f798=>this['_initSessionsHandling'](_0x40f798))['catch'](_0x1dc846=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x1dc846);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x371d1b,_0x4a14e0)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x4a14e0);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x439752=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x4ceebe);this['_isPendingUpdate']=!0x0;const _0x4e783d=await this['_service']['connect'](_0x2bc672,this['_compressOperations'](_0x4ceebe),_0x439752);if(this['sessionId']=_0x4e783d['sessionId'],_0x37d231){if(!_0x4e783d['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x4e783d['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x4ceebe,_0x4e783d,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x4e783d,_0x4ceebe);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x1e9b68=this['editor']['plugins']['get'](r),_0x3cdd73=this['editor']['plugins']['get'](H),_0x5b3fb9=_0x1e9b68['channelSessions']['get'](this['_channelId']);_0x5b3fb9&&_0x5b3fb9['length']>0x1?_0x3cdd73['createUserMarkerOperations']():this['listenTo'](_0x1e9b68,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x1e9b68['channelSessions']['get'](this['_channelId'])['length']&&_0x3cdd73['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x41d03b,_0x2f4b63,_0xecade4,_0x6d1bcd){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x2f4b63){const _0x3cfc74=this['_decompressOperations'](_0xecade4,_0x6d1bcd);await this['_fetchMissingUsers'](_0x3cfc74),this['_handleExternalOperations'](_0x3cfc74,_0x2f4b63,_0xecade4['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x326219}=this['editor'];let _0x4df71e;try{_0x4df71e=await this['_service']['getDocumentDetails']();}catch(_0x42d177){const _0x21505a=q(_0x326219,'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'](_0x21505a);}const _0x4bc32f=_0x4df71e['currentDocumentSession']||_0x4df71e['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x4bc32f['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x430ae4=q(_0x326219,'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'](_0x430ae4);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x5ea5ac){const _0x4bd413=this['editor']['plugins']['get'](r);this['listenTo'](_0x4bd413,'sessionAdd:'+this['_channelId'],(_0x199906,{session:_0x8778d0})=>{if(_0x8778d0['id']===_0x4bd413['mySessionId']){_0x199906['off']();const _0x424521=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x23935d=_0x8778d0['permissions'];_0x424521&&_0x424521['isEnabled']&&(_0x23935d=_0x23935d['filter'](_0x5e9f42=>'document:write'!==_0x5e9f42)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x23935d,this['_channelId']);}}),_0x4bd413['register'](this['_channelId'],_0x5ea5ac);}['_initThrowingOnDataSet'](){const _0xaeffac=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x43124d)=>{if(!_0x43124d[_0x43124d['length']-0x1]['suppressErrorInCollaboration'])throw new _0x1896a5('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0xaeffac['apply'](this['editor']['data'],_0x43124d);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x278087,[_0x11227c])=>{if(this['_document']['version'])throw new _0x1896a5('realtimecollaborationclient-init-document-already-initialized',this);_0x278087['stop'](),this['_setPendingAction']();const _0x28fbbc=this['editor']['config']['get']('rootsAttributes'),_0xb9c52=this['_getOperationsFromInitData'](_0x11227c,_0x28fbbc);0x0==_0xb9c52['length']&&_0xb9c52['push'](new _0x47ff25(0x0)),_0x278087['return']=this['_connectService'](_0xb9c52)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x3c257d=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x3c257d))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x251193,[_0x6bb53a,_0x5d19ce])=>{_0x251193['stop']();const _0x484c17=this['editor']['model']['document']['getRoot'](_0x6bb53a);if(!this['_knownRootNames']['has'](_0x6bb53a)){const _0x406332=_0x5d19ce&&_0x5d19ce['data']?_0x5d19ce['data']:'',_0x5a647d=_0x5d19ce&&_0x5d19ce['attributes']?_0x5d19ce['attributes']:{};await this['_loadRoot'](_0x6bb53a,_0x406332,_0x5a647d);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x484c17['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x484c17);});},{'priority':'high'});}async['_fetchMissingUsers'](_0xd43206){const _0x15426b=this['editor']['plugins']['get'](_0x2b169a),{connection:_0xf282ee}=this['editor']['plugins']['get'](c),_0x195ad6=new Set();for(const _0x30b5fb of _0xd43206){const _0x422273=_0x30b5fb['_authorId'];_0x422273&&!_0x15426b['getUser'](_0x422273)&&_0x195ad6['add'](_0x422273);}if(0x0===_0x195ad6['size'])return;const _0x17c2b8=await lt['getMany'](_0xf282ee,Array['from'](_0x195ad6));for(const _0x18344c of _0x17c2b8)_0x15426b['getUser'](_0x18344c['id'])||_0x15426b['addUser'](_0x18344c);}['_getOperationsFromInitData'](_0x30c0e4,_0x3be657={}){const _0x30f63a=this['editor']['model'],_0x2e985c=[];let _0x4fb847=0x0;const _0x40af93='string'==typeof _0x30c0e4?{'main':_0x30c0e4}:_0x30c0e4;for(const _0x57f478 of Object['keys'](_0x40af93)){if(!this['_document']['roots']['has'](_0x57f478))throw new _0x1896a5('realtimecollaborationclient-init-non-existent-root',this);const _0x51bc7d=this['editor']['data']['parse'](_0x40af93[_0x57f478]),_0x356552=this['_document']['getRoot'](_0x57f478),_0x2deba0=new _0x641871(_0x30f63a['createPositionAt'](_0x356552,0x0),_0x51bc7d,_0x4fb847++);_0x2e985c['push'](_0x2deba0);for(const [_0x528ff5,_0x50f3c7]of _0x51bc7d['markers']){const _0x20dc90=_0x30f63a['createRange'](_0x30f63a['createPositionFromPath'](_0x356552,_0x50f3c7['start']['path']['slice']()),_0x30f63a['createPositionFromPath'](_0x356552,_0x50f3c7['end']['path']['slice']())),_0x1aa1be=new _0x5cd881(_0x528ff5,null,_0x20dc90,_0x30f63a['markers'],!0x0,_0x4fb847++);_0x2e985c['push'](_0x1aa1be);}}if(_0x3be657)for(const [_0x1d66b8,_0x32e3ee]of Object['entries'](_0x3be657)){const _0x1a0279=_0x30f63a['document']['getRoot'](_0x1d66b8);if(!_0x1a0279)throw new _0x1896a5('multi-root-editor-root-attributes-no-root',null);for(const [_0x2d1b62,_0x8c422]of Object['entries'](_0x32e3ee))if(null!==_0x8c422){const _0x40846f=new _0x2dfe87(_0x1a0279,_0x2d1b62,null,_0x8c422,_0x4fb847++);_0x2e985c['push'](_0x40846f);}}return _0x2e985c;}async['_loadRoot'](_0x1b2f59,_0x14bf08,_0x313b75){this['_getOperationsFromInitData']({[_0x1b2f59]:_0x14bf08},{[_0x1b2f59]:_0x313b75})['forEach']((_0x451225,_0x19a9b6)=>{_0x451225['baseVersion']=this['_document']['version']+_0x19a9b6,_0x451225['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x451225);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x43deea,_0x5ef19b){let _0x218fd7;this['_offset']=_0x43deea['offset'];const _0x37ebc5=_0x43deea['wereChangesApplied']&&!_0x43deea['initData'],_0x19dd29=_0x37ebc5?0x0:_0x43deea['data']['baseVersion'];if(_0x5ef19b['forEach'](_0x4f4221=>{_0x4f4221['_isInit']=!0x0,_0x4f4221['createdAt']=_0x43deea['sessionCreatedAt'],_0x4f4221['_authorId']=null;}),_0x37ebc5)_0x218fd7=_0x5ef19b,this['_applyOperationsSet'](_0x218fd7,_0x37ebc5);else{if(_0x43deea['initData']){const _0x3e231e=this['_getOperationsFromInitData'](_0x43deea['initData']);this['_document']['history']['version']=-_0x3e231e['length'],_0x3e231e['forEach'](_0x5d6a62=>{_0x5d6a62['baseVersion']-=_0x3e231e['length'],_0x5d6a62['createdAt']=_0x43deea['sessionCreatedAt'],_0x5d6a62['_isInit']=!0x0,_0x5d6a62['_authorId']=null;}),this['_applyOperationsSet'](_0x3e231e,!0x0),this['serverHistory']['version']=-_0x3e231e['length']+this['_offset'],this['_updateServerHistory'](_0x3e231e);}this['_document']['history']['version']=_0x19dd29,_0x218fd7=this['_decompressOperations'](_0x43deea['data'],_0x43deea['metadata']),await this['_fetchMissingUsers'](_0x218fd7),this['_applyOperationsSet'](_0x218fd7,_0x37ebc5);}_0x43deea['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x218fd7,_0x43deea['lastOperationId']),this['_lastSyncedOperationId']=_0x43deea['lastOperationId']),this['serverHistory']['version']=_0x19dd29+this['_offset'],this['_updateServerHistory'](_0x218fd7),_0x5ef19b['filter'](_0x2bed19=>{const _0x13dc8a=this['_getAffectedRoot'](_0x2bed19);return _0x13dc8a&&!this['_knownRootNames']['has'](_0x13dc8a);})['forEach']((_0x46c76c,_0x8f7767)=>{_0x46c76c['baseVersion']=this['_document']['version']+_0x8f7767,this['_saveOperationInBuffer'](_0x46c76c);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x3f6fdb,_0x1ee128){throw this['_isPendingUpdate']=!0x0,_0x1ee128&&console['error'](_0x1ee128),new _0x1896a5(_0x3f6fdb,this['editor']);}['_saveOperationInBuffer'](_0x23063d){this['_knownOperations']['has'](_0x23063d)||(this['_knownOperations']['add'](_0x23063d),this['_bufferedOperations']['push'](_0x23063d),this['_pendingAction']||'marker'==_0x23063d['type']&&!_0x23063d['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x2996ee=!0x1){!_0x2996ee&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x2e9d85=>{_0x2e9d85&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x3be363=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x149536){return _0x149536['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x149536['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x149536['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x3be363))throw _0x3be363;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x53e178=>{this['on']('change:_isPendingUpdate',()=>{_0x53e178();});});}async['_sendBufferedOperations'](){const _0x9c34ff=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x9c34ff['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x3fbbae=[...this['_bufferedOperations']];for(const _0xda07fd of _0x3fbbae)_0xda07fd['wasUndone']=this['_document']['history']['isUndoneOperation'](_0xda07fd);const _0x1389d9=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x3fbbae),_0x521c90=K++,_0x173988=this['_compressOperations'](_0x3fbbae),_0x24ee1f=await this['_service']['sendOperations'](_0x173988,_0x173988['baseVersion'],_0x1389d9);try{return await this['_handleServerResponse'](_0x3fbbae,_0x24ee1f,_0x521c90);}catch(_0x1a3a42){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x1a3a42);}}async['_handleServerResponse'](_0x574475,_0xc44f6a,_0x2ec18a){if('error'in _0xc44f6a)throw _0xc44f6a['error'];let _0x56683d=!0x1;if(_0xc44f6a['wereChangesApplied']){_0xc44f6a['lastOperationId']&&(this['_lastSyncedOperationId']=_0xc44f6a['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x39badb=>!_0x574475['includes'](_0x39badb));for(const _0x811074 of _0x574475)_0x811074['createdAt']='lastOperationAcceptedAt'in _0xc44f6a&&_0xc44f6a['lastOperationAcceptedAt']||void 0x0;Q(_0x574475,_0xc44f6a['version']-_0x574475['length']),this['_updateServerHistory'](_0x574475);const _0x2926ff=_0x574475['filter'](_0x4341e1=>{if(!_0x4341e1['_isInit'])return!0x1;const _0x26dab8=this['_getAffectedRoot'](_0x4341e1);return _0x26dab8&&!this['_knownRootNames']['has'](_0x26dab8);});Q(_0x2926ff,this['_document']['version']),this['_applyOperationsSet'](_0x2926ff),_0x56683d=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x16a278=this['_decompressOperations'](_0xc44f6a['data'],_0xc44f6a['metadata'])['filter'](_0x16041e=>_0x16041e['baseVersion']>=this['_lastServerVersion']);_0x16a278['forEach'](_0x55ba09=>this['_addKnownRoot'](_0x55ba09)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x264281=>!_0x264281['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x264281))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x16a278),_0x56683d=this['_handleExternalOperations'](_0x16a278,_0xc44f6a['version'],_0xc44f6a['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x56683d?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x55d81f,_0x40a0a9,_0x1f923f){try{const _0x189bc9={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x36cf7b,operationsB:_0x2d5f5,originalOperations:_0x3793a1}=_0x53c149(_0x55d81f,this['_bufferedOperations'],_0x189bc9);Q(_0x36cf7b,this['_document']['version']),Q(_0x2d5f5,_0x40a0a9);for(const _0x3da8bc of _0x36cf7b){const _0x41752f=_0x3793a1['get'](_0x3da8bc);_0x3da8bc['_authorId']=_0x41752f?_0x41752f['_authorId']:null;}_0x1f923f&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x55d81f,_0x1f923f),this['_lastSyncedOperationId']=_0x1f923f),this['_bufferedOperations']=[..._0x2d5f5],this['_applyOperationsSet'](_0x36cf7b),this['_updateServerHistory'](_0x55d81f);}catch(_0x1345e4){return console['error'](_0x1345e4),!0x1;}return!0x0;}['_applyOperationsSet'](_0x3b7327,_0x324fdf=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x314eb5=>{for(const _0xe83a20 of _0x3b7327)this['_knownOperations']['add'](_0xe83a20),this['_addKnownRoot'](_0xe83a20),_0x314eb5['batch']['addOperation'](_0xe83a20),this['editor']['model']['applyOperation'](_0xe83a20);});}['_addKnownRoot'](_0x517595){const _0x2151a2=this['_getAffectedRoot'](_0x517595);_0x2151a2&&this['_knownRootNames']['add'](_0x2151a2);}['_getAffectedRoot'](_0x584b76){let _0x23557,_0x520079;switch(_0x584b76['type']){case'insert':_0x23557=_0x584b76['position']['root'];break;case'marker':if(_0x520079=_0x584b76['newRange'],!_0x520079)return null;_0x23557=_0x520079['root'];break;case'addRootAttribute':_0x23557=_0x584b76['root'];break;case'addRoot':_0x23557=_0x584b76['affectedSelectable'];break;case'move':_0x23557=_0x584b76['targetPosition']['root'];break;default:return null;}return _0x23557['rootName'];}['_updateServerHistory'](_0xbb588e){_0xbb588e['forEach'](_0x4110c9=>{const _0x40d3cb=_0x4110c9['clone']();_0x40d3cb['_authorId']=_0x4110c9['_authorId'],_0x40d3cb['_isInit']=!!_0x4110c9['_isInit'],_0x40d3cb['createdAt']=_0x4110c9['createdAt'],_0x40d3cb['baseVersion']+=this['_offset'],_0x4110c9['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x40d3cb),this['serverHistory']['addOperation'](_0x40d3cb);});}['_handleReconnectionError'](_0x403208){const _0x10d7aa=this['editor']['plugins']['get']('Notification'),_0x387252=this['editor']['locale'];_0x403208||(_0x403208=q(_0x387252,'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.')),_0x10d7aa['showWarning'](_0x403208,{'title':q(_0x387252,'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'](_0x401b44)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x401b44)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x39fd0f){const _0x6654ba=_0x39fd0f['map'](_0x245552=>_0x245552['toJSON']());return this['_compressor']['compress'](_0x6654ba);}['_decompressOperations'](_0xd5521,_0x26611a){return this['_compressor']['decompress'](_0xd5521)['map']((_0x588ed3,_0x106ef8)=>{const _0xa0eae1='init'==_0x26611a[_0x106ef8]['type'];if('InsertOperation'==_0x588ed3['__className']){const _0x565333=_0x588ed3['position']['root'];!this['_document']['getRoot'](_0x565333)&&(this['_document']['createRoot']('$root',_0x565333)['_isAttached']=!0x1);}const _0x5d2e93=_0x2572a5['fromJSON'](_0x588ed3,this['_document']);return _0x5d2e93['wasUndone']=_0x588ed3['wasUndone'],_0x5d2e93['_isInit']=_0xa0eae1,_0x5d2e93['_authorId']=_0xa0eae1?null:_0x26611a[_0x106ef8]['userId'],_0x5d2e93['_isDisconnection']='cs:removeUser'===_0x26611a[_0x106ef8]['type'],_0x5d2e93['createdAt']=_0x26611a[_0x106ef8]['createdAt'],_0x5d2e93;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x419b83=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x419b83&&_0x419b83['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x3ee41c,_0x5ee6ba){for(const _0x10f46e of _0x3ee41c)_0x10f46e['baseVersion']=_0x5ee6ba++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x1d0cad){this['_ignoredOperations']=_0x1d0cad,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x29fff9){let _0x4698e1=_0x29fff9['length'];for(;_0x4698e1--;){const _0x58ef2e=_0x29fff9[_0x4698e1];if(!this['_ignoredOperations']['has'](_0x58ef2e)){if(!this['_operationToId']['has'](_0x58ef2e)){const _0x353a5f=_0x12ab9f()['slice'](0x1,0x12);this['_operationToId']['set'](_0x58ef2e,_0x353a5f);}return this['_operationToId']['get'](_0x58ef2e);}}}['setIdForTheLastOperation'](_0x201d46,_0xc61681){if(!_0xc61681)return;let _0x285521=_0x201d46['length'];for(;_0x285521--;){const _0x370bcb=_0x201d46[_0x285521];this['_ignoredOperations']['has'](_0x370bcb)||this['_operationToId']['set'](_0x370bcb,_0xc61681);}}}class n extends _0x2ceca2{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x7b507{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
- ((()=>_0xb57ee2)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x2b169a];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x48d17e){super(_0x48d17e),this['_services']=new Map();}async['init'](){const _0x5ec582=this['context'],_0x45da07=_0x5ec582['plugins']['get']('CommentsRepository');if(_0x5ec582['plugins']['get'](c)['addToReconnectionStack'](this),_0x45da07['adapter']={'addCommentThread':async({channelId:_0x550e83,threadId:_0x16b499,comments:_0x27529d,resolvedAt:_0x4d8799,resolvedBy:_0xb1e560,context:_0x1f0d2f,attributes:_0x5ec843})=>{const _0x5966ed=await this['_getService'](_0x550e83)['addCommentThread']({'commentThreadId':_0x16b499,'comments':_0x27529d['map'](_0x398364=>function(_0x42d2d0,_0x562ee2,_0x5a768c){return{'commentThreadId':_0x5a768c,'commentId':_0x42d2d0['commentId'],'userId':_0x42d2d0['authorId'],'content':_0x42d2d0['content'],'documentId':_0x562ee2,'createdAt':_0x42d2d0['createdAt'],'attributes':_0x42d2d0['attributes']||{}};}(_0x398364,_0x550e83,_0x16b499)),'resolvedAt':_0x4d8799,'resolvedBy':_0xb1e560,'context':_0x1f0d2f,'attributes':_0x5ec843})['catch'](ut);return{'threadId':_0x5966ed['commentThreadId'],'comments':_0x5966ed['comments']};},'getCommentThread':async({channelId:_0x157354,threadId:_0x4a4e62})=>{const _0x43da98=await this['_getService'](_0x157354)['getCommentThread'](_0x4a4e62)['catch'](ut);return _0x43da98['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x43da98]),{'threadId':_0x43da98['commentThreadId'],'comments':_0x43da98['comments']['map'](S),'context':_0x43da98['context'],'resolvedAt':_0x43da98['resolvedAt'],'resolvedBy':_0x43da98['resolvedBy'],'attributes':_0x43da98['attributes']||{}});},'updateCommentThread':async({channelId:_0x2ea6ff,threadId:_0x488af2,context:_0xdb9458,unlinkedAt:_0x5a2ad3,attributes:_0x28416d})=>this['_getService'](_0x2ea6ff)['updateCommentThread']({'commentThreadId':_0x488af2,'context':_0xdb9458,'attributes':_0x28416d,'unlinkedAt':_0x5a2ad3})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x46b0f7,threadId:_0x30e797})=>{const _0x25c5de=await this['_getService'](_0x46b0f7)['resolveCommentThread'](_0x30e797)['catch'](B)['catch'](ut);return{'threadId':_0x25c5de['commentThreadId'],'resolvedAt':_0x25c5de['resolvedAt'],'resolvedBy':_0x25c5de['resolvedBy']};},'reopenCommentThread':async({channelId:_0x5d0c7c,threadId:_0x2ae66f})=>this['_getService'](_0x5d0c7c)['reopenCommentThread'](_0x2ae66f)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x1639a9,threadId:_0x438a7c})=>this['_getService'](_0x1639a9)['removeCommentThread'](_0x438a7c)['catch'](B)['catch'](ut),'addComment':({channelId:_0x2c22e6,threadId:_0x131360,commentId:_0x1019fa,content:_0x11097e,attributes:_0xc1363})=>this['_getService'](_0x2c22e6)['addComment'](_0x131360,_0x1019fa,_0x11097e,_0xc1363)['catch'](ut),'updateComment':({channelId:_0x2400f8,threadId:_0x306a86,commentId:_0x14472f,content:_0x5db7f6,attributes:_0x1d17fd})=>this['_getService'](_0x2400f8)['updateComment'](_0x306a86,_0x14472f,_0x5db7f6,_0x1d17fd)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x4eedd4,threadId:_0x5ed056,commentId:_0x178dd9})=>this['_getService'](_0x4eedd4)['removeComment'](_0x5ed056,_0x178dd9)['catch'](B)['catch'](ut)},_0x5ec582 instanceof _0x1d0732){const _0x527c80=_0x5ec582['config']['get']('collaboration.channelId'),_0x41b133=_0x5ec582['plugins']['get'](r);await this['_setUpService'](_0x527c80);const _0x3a0fb8=await this['_services']['get'](_0x527c80)['getConnectedSessions']();this['listenTo'](_0x41b133,'sessionAdd:'+_0x527c80,(_0x1f2b0a,{session:_0x39994c})=>{_0x39994c['id']===_0x41b133['mySessionId']&&(_0x1f2b0a['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x39994c['permissions'],_0x527c80));}),_0x41b133['register'](_0x527c80,_0x3a0fb8);}}async['_setUpService'](_0x3f1bf3){if(this['_services']['has'](_0x3f1bf3))throw new _0x1896a5('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x3f1bf3});const _0x3bb37f=this['context']['plugins']['get']('CommentsRepository'),_0x197330=new a['CommentsService'](_0x3f1bf3);this['_services']['set'](_0x3f1bf3,_0x197330),this['listenTo'](_0x197330,'commentThreadAdded',(_0x318d56,_0x23b0d8)=>{const {commentThreadId:_0x43c1b5,documentId:_0x7ce94f,context:_0x315e8d,attributes:_0x278ab1,resolvedAt:_0x35aa63,resolvedBy:_0xab8992,comments:_0x3dddeb}=_0x23b0d8;_0x3bb37f['getCommentThread'](_0x43c1b5)||_0x3bb37f['addCommentThread']({'threadId':_0x43c1b5,'channelId':_0x7ce94f,'comments':_0x3dddeb?_0x3dddeb['map'](S):[],'context':_0x315e8d,'attributes':_0x278ab1,'resolvedAt':_0x35aa63,'resolvedBy':_0xab8992,'isFromAdapter':!0x0});}),this['listenTo'](_0x197330,'commentThreadUpdated',(_0x5783cc,{commentThreadId:_0x53d6a1,documentId:_0x794127,context:_0x53f25c,unlinkedAt:_0x125414,attributes:_0x375ff3})=>{_0x3bb37f['getCommentThread'](_0x53d6a1)&&_0x3bb37f['updateCommentThread']({'threadId':_0x53d6a1,'channelId':_0x794127,'context':_0x53f25c,'unlinkedAt':_0x125414,'attributes':_0x375ff3,'isFromAdapter':!0x0});}),this['listenTo'](_0x197330,'commentThreadResolved',(_0x530211,{commentThreadId:_0x102b0b,resolvedBy:_0x55c7f8,resolvedAt:_0x56a507})=>{const _0x3715c1=_0x3bb37f['getCommentThread'](_0x102b0b);_0x3715c1&&_0x3715c1['resolve']({'resolvedBy':_0x55c7f8,'resolvedAt':_0x56a507,'isFromAdapter':!0x0});}),this['listenTo'](_0x197330,'commentThreadReopened',(_0x4f200f,{commentThreadId:_0x395f18})=>{const _0x5e2e2e=_0x3bb37f['getCommentThread'](_0x395f18);_0x5e2e2e&&_0x5e2e2e['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x197330,'commentThreadRemoved',(_0x1db732,{commentThreadId:_0x2259f8})=>{const _0x4046af=_0x3bb37f['getCommentThread'](_0x2259f8);_0x4046af&&_0x4046af['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x197330,'commentAdded',(_0x5006f8,_0x42bb52)=>{const _0x247495=_0x42bb52['commentThreadId'],_0x12ea4f=_0x3bb37f['getCommentThread'](_0x247495);_0x12ea4f&&_0x12ea4f['addComment']({...S(_0x42bb52),'isFromAdapter':!0x0});}),this['listenTo'](_0x197330,'commentUpdated',(_0x2c4d9b,{commentThreadId:_0x20d006,commentId:_0x4f0f5a,content:_0x7ecae,attributes:_0x5c4296})=>{const _0x5237cf=_0x3bb37f['getCommentThread'](_0x20d006);if(_0x5237cf){const _0x2a24f7=_0x5237cf['getComment'](_0x4f0f5a);_0x2a24f7&&_0x2a24f7['update']({'content':_0x7ecae,'attributes':_0x5c4296,'isFromAdapter':!0x0});}}),this['listenTo'](_0x197330,'commentRemoved',(_0x2dd85a,{commentThreadId:_0x3f698b,commentId:_0x4177fa})=>{const _0x2e1750=_0x3bb37f['getCommentThread'](_0x3f698b);if(_0x2e1750){const _0x187f9c=_0x2e1750['getComment'](_0x4177fa);_0x187f9c&&_0x187f9c['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x3f1bf3);}['destroy'](){if(this['context']instanceof _0x1d0732){const _0x5f5858=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x5f5858);}}['_terminateService'](_0x5da9f4){if(!this['_services']['has'](_0x5da9f4))throw new _0x1896a5('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x5da9f4});this['_getService'](_0x5da9f4)['disconnect'](),this['_services']['delete'](_0x5da9f4);}async['reconnect'](){for(const _0x53d12a of this['_services']['keys']())await this['_connectService'](_0x53d12a);if(this['context']instanceof _0x1d0732){const _0x161e7a=this['context']['config']['get']('collaboration.channelId'),_0x5650f9=this['context']['plugins']['get'](r);_0x5650f9['unregister'](_0x161e7a);const _0xd155c4=await this['_services']['get'](_0x161e7a)['getConnectedSessions']();_0x5650f9['register'](_0x161e7a,_0xd155c4);}}async['_connectService'](_0x2a4552){const {connection:_0x53335f}=this['context']['plugins']['get'](c),_0x1fbd56=this['context']['plugins']['get']('CommentsRepository'),_0x5372ce=this['_services']['get'](_0x2a4552),_0x41a768=await _0x5372ce['connect'](_0x53335f);await this['_fetchMissingUsersForThreads'](_0x41a768);const _0xedbdc5=new Set(Array['from'](_0x1fbd56['getCommentThreads']({'channelId':_0x2a4552}),_0x581eae=>_0x581eae['id']));for(const _0x3555a2 of _0x41a768)_0x3555a2['deletedAt']||_0xedbdc5['delete'](_0x3555a2['commentThreadId']);for(const _0x32cedc of _0xedbdc5)_0x1fbd56['getCommentThread'](_0x32cedc)['remove']({'isFromAdapter':!0x0});for(const _0x59b4ff of _0x41a768){let _0x24384a=_0x1fbd56['getCommentThread'](_0x59b4ff['commentThreadId']);const {commentThreadId:_0x96f99b,context:_0x449f4e,attributes:_0x3585de,resolvedBy:_0x3185dc,resolvedAt:_0x545f81,unlinkedAt:_0x582191,deletedAt:_0x4d8a89}=_0x59b4ff;if(_0x4d8a89)continue;_0x24384a||(_0x24384a=_0x1fbd56['addCommentThread']({'channelId':_0x2a4552,'threadId':_0x96f99b,'context':_0x449f4e,'attributes':_0x3585de||{},'resolvedBy':_0x3185dc,'resolvedAt':_0x545f81,'unlinkedAt':_0x582191,'isFromAdapter':!0x0}));const _0x30aafa=new Set(Array['from'](_0x24384a['comments'],_0x5baa0d=>_0x5baa0d['id']));for(const _0x3b5063 of _0x59b4ff['comments'])_0x30aafa['delete'](_0x3b5063['commentId']);for(const _0xa8e4c3 of _0x30aafa)_0x24384a['getComment'](_0xa8e4c3)['remove']({'isFromAdapter':!0x0});for(const _0x472b03 of _0x59b4ff['comments']){const _0x40a289=_0x24384a['getComment'](_0x472b03['commentId']);_0x40a289?_0x40a289['content']!==_0x472b03['content']&&_0x40a289['update']({'content':_0x472b03['content'],'isFromAdapter':!0x0}):_0x24384a['addComment'](Object['assign'](S(_0x472b03),{'isFromAdapter':!0x0}));}}}['_getService'](_0x304f3d){if(!this['_services']['has'](_0x304f3d))throw new _0x1896a5('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x304f3d});return this['_services']['get'](_0x304f3d);}async['_fetchMissingUsersForThreads'](_0x5971ef){const _0x326be6=this['context']['plugins']['get'](_0x2b169a),{connection:_0x54755e}=this['context']['plugins']['get'](c),_0x551d46=new Set();for(const {resolvedBy:_0xbdf567,comments:_0x4e15b4}of _0x5971ef){_0xbdf567&&!_0x326be6['getUser'](_0xbdf567)&&_0x551d46['add'](_0xbdf567);for(const {userId:_0x1cbba8}of _0x4e15b4)_0x326be6['getUser'](_0x1cbba8)||_0x551d46['add'](_0x1cbba8);}if(0x0===_0x551d46['size'])return;const _0x42a372=await lt['getMany'](_0x54755e,Array['from'](_0x551d46));for(const _0xf621cf of _0x42a372)_0x326be6['getUser'](_0xf621cf['id'])||_0x326be6['addUser'](_0xf621cf);}}async function B(_0x4c06d1){if('404'!==_0x4c06d1['code'])throw _0x4c06d1;}function ut(_0x57860c){if((_0x118077=_0x57860c)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x118077['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x118077['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x118077;throw _0x57860c;}function S(_0x928fa8){return{'threadId':_0x928fa8['commentThreadId'],'commentId':_0x928fa8['commentId'],'content':_0x928fa8['content'],'createdAt':_0x928fa8['createdAt'],'authorId':_0x928fa8['userId'],'attributes':_0x928fa8['attributes']||{}};}class g extends _0x2ceca2{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
- ((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0xae9446){super(_0xae9446);const _0xdf2cb1=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0xdf2cb1);}['init'](){const _0x176252=this['editor']['plugins']['get'](c),_0x4c0ced=this['editor']['plugins']['get']('TrackChangesEditing');return _0x4c0ced['adapter']={'getSuggestion':async _0x1f873a=>{await this['_waitForServiceReady']();const _0x2081e8=await this['_trackChangesService']['get'](_0x1f873a)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x2081e8]),_0x2081e8;},'addSuggestion':async({id:_0x5d5333,type:_0x2766f0,data:_0x49f2d8,originalSuggestionId:_0x4e33b1,attributes:_0x5e7dfa})=>{await this['_waitForServiceReady']();const _0x4c24d0={'id':_0x5d5333,'type':_0x2766f0,'data':_0x49f2d8,'originalSuggestionId':_0x4e33b1,'attributes':_0x5e7dfa},_0xa5453f=await this['_trackChangesService']['add'](_0x5d5333,_0x2766f0,_0x49f2d8,_0x4e33b1,_0x5e7dfa)['catch'](_0x523cca=>{if(ft(_0x523cca))return new Promise(_0x2aee9d=>{this['_bufferedRequests']['set'](_0x5d5333,{'resolve':_0x2aee9d,'suggestionData':_0x4c24d0});});throw _0x523cca;});return this['_bufferedRequests']['delete'](_0x5d5333),_0xa5453f;},'updateSuggestion':async(_0x3f0186,_0x1ebdd9)=>{if(await this['_waitForServiceReady'](),'open'!==_0x1ebdd9['state'])return this['_trackChangesService']['update'](_0x3f0186,_0x1ebdd9)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x232569,_0x3602db)=>{_0x4c0ced['hasSuggestion'](_0x3602db['id'])&&(_0x4c0ced['getSuggestion'](_0x3602db['id'])['attributes']=_0x3602db['attributes']);}),this['_trackChangesService']['connect'](_0x176252['connection'])['then'](_0x1445bc=>(_0x176252['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x1445bc)['then'](()=>{for(const _0x5d2f55 of _0x1445bc){_0x4c0ced['addSuggestionData'](_0x5d2f55)['_saved']=!0x0;}})));}async['reconnect'](){const _0x5a414c=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x4c8fe7}=this['editor']['plugins']['get'](c),_0x1d5827=await this['_trackChangesService']['connect'](_0x4c8fe7);await this['_fetchMissingUsersForThreads'](_0x1d5827);for(const {suggestionData:_0x17c6c1,resolve:_0x19d356}of this['_bufferedRequests']['values']()){let _0x28d289=_0x1d5827['find'](_0x1a3374=>_0x1a3374['id']===_0x17c6c1['id']);_0x28d289||(_0x28d289=await this['_trackChangesService']['add'](_0x17c6c1['id'],_0x17c6c1['type'],_0x17c6c1['data'],_0x17c6c1['originalSuggestionId'])),_0x19d356(_0x28d289);}for(const _0x2d7b4e of _0x1d5827)_0x5a414c['hasSuggestion'](_0x2d7b4e['id'])||_0x5a414c['addSuggestionData'](_0x2d7b4e);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x5fb011=>{this['listenTo'](this['_trackChangesService'],'connected',_0x4c87db=>{_0x4c87db['off'](),_0x5fb011();});});}async['_fetchMissingUsersForThreads'](_0x513e1c){const _0x265875=this['editor']['plugins']['get'](_0x2b169a),{connection:_0x353e67}=this['editor']['plugins']['get'](c),_0x1dd13d=new Set();for(const {authorId:_0xc45610}of _0x513e1c)_0x265875['getUser'](_0xc45610)||_0x1dd13d['add'](_0xc45610);if(0x0===_0x1dd13d['size'])return;const _0x15b97c=await lt['getMany'](_0x353e67,Array['from'](_0x1dd13d));for(const _0x205e42 of _0x15b97c)_0x265875['getUser'](_0x205e42['id'])||_0x265875['addUser'](_0x205e42);}}function R(_0x4ace9e){if(ft(_0x4ace9e))return new Promise(()=>{});throw _0x4ace9e;}function ft(_0x11e6a5){return _0x11e6a5['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x11e6a5['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x2ceca2{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x37c77c=this['editor']['plugins']['get'](c),_0x5c6028=this['editor']['plugins']['get']('CommentsEditing'),_0x36c304=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x37c77c,'change:state',(_0x497b85,_0xc6868c,_0x2ae61c)=>{_0x5c6028['isThreadsLoadingPaused']='connected'!==_0x2ae61c;});}),this['listenTo'](_0x37c77c,'change:state',(_0x47be55,_0x9742b8,_0x4891bf)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x4891bf);}),_0x36c304['_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 _0x2ceca2{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x2ceca2{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
- ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x2b169a];}constructor(_0x469cbc){super(_0x469cbc);const _0x812ad0=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x812ad0);}async['init'](){const _0x4beb3f=this['editor']['plugins']['get'](l),_0x2dd4e5=_0x4beb3f['serverHistory'],_0x585a80=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x2dd4e5,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x4beb3f['sessionId']});const _0x45aa71=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x56cdce=await tt['isBundleUploaded'](_0x585a80['connection'],_0x45aa71);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x3e7e51})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x3e7e51)),'updateRevisions':async _0x319093=>{await this['_waitForServiceReady']();const _0x1b90f4=this['_revisionTracker']['currentRevision'];if(_0x56cdce&&0x1===_0x319093['length']&&_0x319093[0x0]['id']===_0x1b90f4['id'])return _0x319093;for(const _0x21f0e6 of _0x319093)_0x21f0e6['id']===_0x1b90f4['id']&&(_0x21f0e6['isEmptyCurrent']=_0x21f0e6['fromVersion']===_0x21f0e6['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x319093,this['_lastRequestId'])['then'](_0x1f54df=>(this['_lastRequestId']=_0x1f54df,_0x319093))['catch'](_0x15095b=>{if(st(_0x15095b)||'400'===_0x15095b['code']&&void 0x0!==_0x15095b['data']['wrongRequestId']){for(const _0x18451d of _0x319093){!this['_revisionTracker']['repository']['getRevision'](_0x18451d['id'])||this['_revisionTracker']['_bufferUpdate'](_0x18451d['id'],_0x18451d,!0x1);}if(st(_0x15095b))throw _0x15095b;return _0x319093;}throw _0x15095b;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x118d34,{revisionsData:_0x3c7877,requestId:_0x10a54e})=>{Math['max'](..._0x3c7877['map'](_0x5da5e9=>_0x5da5e9['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x3c7877,_0x10a54e);}):this['_handleRevisionsUpdate'](_0x3c7877,_0x10a54e);});const {revisions:_0x11712e,requestId:_0x3773d4}=await this['_revisionHistoryService']['connect'](_0x585a80['connection']);_0x585a80['addToReconnectionStack'](this),this['_lastRequestId']=_0x3773d4,await this['_fetchMissingUsers'](_0x11712e);for(const _0x174c13 of _0x11712e)this['_revisionTracker']['addRevisionData'](_0x174c13);this['listenTo'](_0x4beb3f,'change:_isConnected',(_0xabf0aa,_0x3d4c31,_0x2fb12f)=>{_0x2fb12f&&(this['_oldOffset']=_0x4beb3f['_offset'],_0xabf0aa['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x585a80,'state',_0x1e5b96=>_0x1e5b96===_0x188b29['CONNECTED']);}async['reconnect'](){const _0x65cf67=this['editor']['plugins']['get'](c),_0x4884de=this['editor']['plugins']['get'](l),_0x10858=async()=>{const _0x29e84c=this['_revisionTracker']['currentRevision'],_0x42dc57=_0x29e84c['id'],_0x3ebb10=_0x42dc57!==_0x4884de['sessionId'];if(_0x3ebb10){const _0x445983=_0x4884de['_offset']-this['_oldOffset'],_0x47c3a2=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x29e84c['toVersion']+_0x445983!==_0x47c3a2){const _0x5163b1=_0x29e84c['fromVersion']+_0x445983,_0x4d64b2=this['editor']['plugins']['get'](_0x2b169a),_0x2cf78b=this['_revisionTracker']['buildRevisionData']({'revision':_0x29e84c,'from':_0x5163b1,'to':_0x47c3a2});_0x2cf78b['id']=_0x29e84c['id'];const _0x1f10a5=_0x2cf78b['authorsIds']['map'](_0x275fe4=>_0x4d64b2['getUser'](_0x275fe4));_0x29e84c['_update']({..._0x2cf78b,'authors':_0x1f10a5},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x29e84c['id'],_0x2cf78b,!0x0);}this['_revisionTracker']['_startingVersion']=_0x47c3a2,(_0x29e84c['toVersion']===_0x29e84c['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x42dc57)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x42dc57),this['_revisionTracker']['_createCurrentRevision'](_0x47c3a2));}const {revisions:_0x4409d0,requestId:_0xbd080c}=await this['_revisionHistoryService']['reconnect'](_0x65cf67['connection'],this['_lastRequestId']);_0x3ebb10&&_0x4409d0['length']>0x0?_0x4884de['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x4409d0),this['_handleRevisionsUpdate'](_0x4409d0,_0xbd080c),this['_revisionTracker']['sendBufferedUpdates']());};return _0x4884de['_isConnected']?_0x10858():new Promise((_0x920512,_0x18c798)=>{_0x4884de['once']('change:_isConnected',()=>{_0x10858()['then'](_0x920512)['catch'](_0x18c798);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x8848b5=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x40fb0d=>{_0x40fb0d['off'](),_0x8848b5();});});}['_getLatestVersionFromServerOperations'](){const _0x36729e=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x3056d1 of _0x36729e)if('marker'!==_0x3056d1['type']||_0x3056d1['affectsData'])return _0x3056d1['baseVersion']+0x1;}['_getLatestVersion'](){const _0x39ef87=this['editor']['plugins']['get'](l);return new Promise(_0x5b3c34=>{_0x39ef87['_isPendingUpdate']?_0x39ef87['once']('change:_isPendingUpdate',()=>{_0x5b3c34(this['_getLatestVersionFromServerOperations']());}):_0x5b3c34(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x33b68e,_0x19c99a){const _0x5b3fc0=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x19c99a;for(const _0x4de8ec of _0x33b68e){const _0x5f308b=_0x5b3fc0['getRevision'](_0x4de8ec['id']);if(_0x5f308b){if((_0x4de8ec['fromVersion']||_0x4de8ec['toVersion'])&&(_0x4de8ec['diffData']=null),_0x5f308b===this['_revisionTracker']['currentRevision']){const _0x377fc0=Math['max'](_0x5f308b['toVersion'],_0x4de8ec['toVersion']),_0x44d158=Math['max'](_0x5f308b['fromVersion'],_0x4de8ec['fromVersion']);let _0x59577b;_0x5f308b['toVersion']===_0x4de8ec['toVersion']&&_0x5f308b['fromVersion']===_0x4de8ec['fromVersion']?(_0x59577b=!0x0,this['_preventResendingRevisionData'](_0x4de8ec)):_0x4de8ec['toVersion']===_0x377fc0&&_0x4de8ec['fromVersion']===_0x44d158?_0x59577b=!0x1:(_0x5f308b['toVersion']===_0x377fc0&&_0x5f308b['fromVersion']===_0x44d158||this['_fixRevision']({'revision':_0x5f308b,'from':_0x44d158,'to':_0x377fc0}),_0x59577b=!0x0),_0x59577b&&(delete _0x4de8ec['fromVersion'],delete _0x4de8ec['toVersion'],delete _0x4de8ec['diffData'],delete _0x4de8ec['createdAt'],delete _0x4de8ec['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x4de8ec),this['_preventResendingRevisionData'](_0x4de8ec);}else this['_revisionTracker']['addRevisionData'](_0x4de8ec);}const _0x1dcfc1=_0x5b3fc0['getRevisions']();_0x1dcfc1['reverse']();for(let _0xcad894=0x0;_0xcad894<_0x1dcfc1['length']-0x1;_0xcad894++){const _0x518c41=_0x1dcfc1[_0xcad894],_0x585875=_0x1dcfc1[_0xcad894+0x1];if(_0x518c41['fromVersion']<_0x585875['toVersion']){const _0x2d0709=_0x585875['toVersion'],_0x18f848=Math['max'](_0x2d0709,_0x518c41['toVersion']);this['_fixRevision']({'revision':_0x518c41,'from':_0x2d0709,'to':_0x18f848});}}}['_fixRevision']({revision:_0x541809,from:_0x1687cf,to:_0x2d343d}={}){const _0x782891=this['editor']['plugins']['get'](_0x2b169a),_0x1c90fa=this['_revisionTracker']['buildRevisionData']({'revision':_0x541809,'from':_0x1687cf,'to':_0x2d343d});_0x1c90fa['authors']=_0x1c90fa['authorsIds']['map'](_0x3e5937=>_0x782891['getUser'](_0x3e5937)),_0x541809['_update'](_0x1c90fa);}['_preventResendingRevisionData'](_0x5f2cbf){const _0xad5aea={};_0xad5aea['id']=_0x5f2cbf['id'];for(const _0x12f2d9 of Object['keys'](_0x5f2cbf))'id'!==_0x12f2d9&&(_0xad5aea[_0x12f2d9]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0xad5aea['id'],_0xad5aea,!0x0);}async['_fetchMissingUsers'](_0x8d5789){const _0x4080ef=this['editor']['plugins']['get'](_0x2b169a),{connection:_0x1de269}=this['editor']['plugins']['get'](c),_0x371213=new Set();for(const _0x29388 of _0x8d5789){for(const _0x4af283 of _0x29388['authorsIds'])_0x3a040d(_0x4af283);_0x29388['creatorId']&&_0x3a040d(_0x29388['creatorId']);}if(0x0===_0x371213['size'])return;const _0x2a8043=await lt['getMany'](_0x1de269,Array['from'](_0x371213));for(const _0x3d8f32 of _0x2a8043)_0x4080ef['getUser'](_0x3d8f32['id'])||_0x4080ef['addUser'](_0x3d8f32);function _0x3a040d(_0x56742d){_0x4080ef['getUser'](_0x56742d)||_0x371213['add'](_0x56742d);}}}function st(_0x1c7ea7){return _0x1c7ea7['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x1c7ea7['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1c7ea7['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x2ceca2{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x1934d2{constructor(_0xe1473e){super(_0xe1473e);const _0x54ee50=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x54ee50['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x54ee50['to']('usersCount',_0x43e8a0=>q(_0xe1473e,'CONNECTED_USERS',_0x43e8a0))}]});}}class es extends _0x1934d2{['items'];['keystrokes'];constructor(_0x4d6cd5){super(_0x4d6cd5);const _0x2dae5f=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x390e01(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x2dae5f['if']('hasPopup'),'aria-expanded':_0x2dae5f['to']('isExpanded',_0x213576=>this['hasPopup']&&String(_0x213576)),'aria-label':_0x2dae5f['to']('hasPopup',_0x1c3822=>q(_0x4d6cd5,_0x1c3822?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x2dae5f['to']('hasPopup',_0x2ef983=>!!_0x2ef983&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x2dae5f['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x51a5d7,_0x427f3f,_0x42ecec)=>{this['element']&&(_0x42ecec?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 _0x1934d2{['counterView'];['inlineListView'];constructor(_0x449606){super(_0x449606);const _0x22b229=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x449606),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x19c88f of this['inlineListView']['items'])_0x19c88f['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',_0x22b229['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x1934d2{['listWrapperView'];constructor(_0x7cd129,_0x273a3c){super(_0x7cd129),this['listWrapperView']=new mt(_0x7cd129,_0x273a3c),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x7cd129,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x36c64c{constructor(_0x143f36,_0x2e79e5){super(_0x143f36);const _0x4cfa7a=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x2e79e5?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x4cfa7a['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x4cfa7a['to']('role'),'aria-label':_0x4cfa7a['to']('ariaLabel'),'aria-labelledby':_0x4cfa7a['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x3cbde8['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x37d900=this['element'];_0x37d900&&(this['_isScrollable']=Math['max'](_0x37d900['scrollHeight'],_0x37d900['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x4214eb,_0x82296b,_0x5be2bd){super(_0x4214eb);const _0x350b87=this['bindTemplate'];this['userView']=new ct(_0x4214eb,_0x82296b);const _0x1a6667={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x82296b['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x82296b['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x82296b['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x5be2bd&&(_0x1a6667['tag']='button',_0x1a6667['on']={'click':_0x350b87['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1a6667);}['focus'](){this['element']['focus']();}}class y extends _0x1934d2{['userView'];['markerView'];constructor(_0x11f877,_0x1bfac2,_0x3c43b5){super(_0x11f877);const _0x38b339=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x11f877,_0x1bfac2),this['markerView']=new at(_0x11f877,_0x1bfac2);const _0x35d2db=new ot(_0x11f877);_0x35d2db['template']['tag']='span',_0x35d2db['text']=_0x1bfac2['name'];const _0x17f38d={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x38b339['to']('isFocusable',_0x537cec=>!!_0x537cec&&0x0),'aria-labelledby':_0x35d2db['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x38b339['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x38b339['to']('hasTooltip',_0x59e949=>!_0x59e949),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x35d2db]};_0x3c43b5&&(_0x17f38d['tag']='button',_0x17f38d['on']={'click':_0x38b339['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x17f38d);}}class at extends _0x1934d2{constructor(_0x235c7f,_0x17fc15){super(_0x235c7f),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x17fc15['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x7b507{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x21de09){super(_0x21de09),this['context']['config']['define']('presenceList',A);const _0x95fc7=_0x21de09['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x95fc7)throw new _0x1896a5('presencelist-collapseat-invalid-format',this);if(_0x95fc7<0x1)throw new _0x1896a5('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x4ad3b1(),this['balloonPanelView']=new _0x13fe4a(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x11cb64 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x11cb64);this['listenTo'](this['_allConnectedUsers'],'add',(_0x53128e,_0x36bf92)=>{this['_handleUserAdd'](_0x36bf92);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x18949e,_0x43674a)=>{this['_handleUserRemove'](_0x43674a);});}['_createView'](){const _0x55ee9a=this['context'],_0x2607ec=new L(this['context']['locale']),_0xc33e8=this['balloonPanelView'];if(!_0x1bdf55(_0x55ee9a['config']['get']('presenceList.container')))throw new _0x1896a5('presencelist-missing-container',this);return _0x2607ec['counterView']['bind']('usersCount')['to'](this),_0x2607ec['bind']('isCollapsed')['to'](this,'usersCount',_0x547ca7=>{const {collapseAt:_0x3c2e1c,displayMe:_0x4b4d45}=_0x55ee9a['config']['get']('presenceList'),_0xf4f0ed=_0x547ca7>=_0x3c2e1c;return _0x2607ec['counterView']['isHidden']=!(0x1==_0x547ca7&&_0x4b4d45||_0xf4f0ed),_0xf4f0ed||this['hideDropdown'](),_0xf4f0ed;}),_0x2607ec['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x364ef1=>{const _0x12c881=_0x55ee9a['config']['get']('presenceList'),_0x1645c3=new y(_0x55ee9a['locale'],_0x364ef1,!!_0x12c881['onClick']);return _0x1645c3['bind']('hasTooltip')['to'](_0x2607ec,'isCollapsed',_0x1a39a1=>!_0x1a39a1),_0x1645c3['bind']('isFocusable')['to'](_0x2607ec,'isCollapsed',_0x353a19=>!_0x353a19),_0x12c881['onClick']&&this['listenTo'](_0x1645c3,'execute',()=>{this['view']['isCollapsed']||_0x12c881['onClick'](_0x364ef1,_0x1645c3['element']);}),_0x1645c3;}),this['listenTo'](_0x2607ec['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x2607ec['inlineListView']['keystrokes']['set']('Enter',(_0x473226,_0x28d7f4)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x28d7f4());}),_0x2607ec['render'](),_0xc33e8['render'](),_0x4c8cdb({'emitter':_0x2607ec,'activator':()=>_0xc33e8['isVisible'],'contextElements':[_0xc33e8['element'],_0x2607ec['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x55ee9a['config']['get']('presenceList.container')['appendChild'](_0x2607ec['element']),this['_bodyCollection']=new _0x245e2b(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x2607ec;}['_handleUserAdd'](_0x3ff90e){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x3ff90e['isMe'])return;const _0x5d582d=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x5d582d&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x467398=_0x3ff90e['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x3ff90e,_0x467398);}['_handleUserRemove'](_0x45fbdb){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x45fbdb['id'])&&(this['currentDisplayedUsers']['remove'](_0x45fbdb['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x8c856 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x8c856['id']))return void this['currentDisplayedUsers']['add'](_0x8c856,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x4abb2c=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x4abb2c['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x5516b0}=this['presenceDropdownView'];_0x5516b0['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x26efd3=>{if(!_0x4abb2c['displayMe']&&_0x26efd3['isMe'])return null;const _0x15f430=new k(this['context']['locale'],_0x26efd3,!!_0x4abb2c['onClick']);return _0x4abb2c['onClick']&&this['listenTo'](_0x15f430,'execute',()=>{_0x4abb2c['onClick'](_0x26efd3,_0x15f430['element']);}),_0x15f430;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x5516b0['focus'](),_0x5516b0['checkIfScrollable']();const _0x267394=(_0x26a908,_0x28f032)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x28f032();};_0x5516b0['keystrokes']['set']('Esc',_0x267394),_0x5516b0['keystrokes']['set']('Shift+Tab',_0x267394),_0x5516b0['keystrokes']['set']('Tab',(_0xfdfde0,_0x4dada6)=>{!function(_0x323b27){const _0x200e54=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x3f1992=>_0x3f1992+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x278e34=[...document['body']['querySelectorAll'](_0x200e54)]['filter'](_0xa90378=>_0xa90378===document['activeElement']||_0xa90378['offsetWidth']+_0xa90378['offsetHeight']>0x0)['sort']((_0x5d7bd2,_0x546c03)=>(_0x5d7bd2['tabIndex']||0x0)-(_0x546c03['tabIndex']||0x0)),_0x4cd83c=_0x278e34['indexOf'](_0x323b27),_0x48a588=_0x278e34[(_0x4cd83c+0x1)%_0x278e34['length']];_0x48a588&&_0x48a588['focus']();}(this['view']['element']),this['hideDropdown'](),_0x4dada6();}),_0x5516b0['focusTracker']['add'](this['view']['element']),_0x5516b0['focusTracker']['on']('change:isFocused',(_0x47864b,_0xc10840,_0x13ab9a)=>{_0x13ab9a||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 _0x7b507{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 _0x18fa55,Plugin as _0x376faf,PendingActions as _0x4f978d,Context as _0x23ad8d}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x4583ee,CKEditorError as _0x227598,Collection as _0x524897,global as _0x1420b4,version as ht,uid as _0x33d4d9,KeystrokeHandler as _0x2d38fb}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x4bd7ff,View as _0x32bc9a,ListView as _0x27fe99,ListItemView as ct,LabelView as pt,BalloonPanelView as _0x332647,clickOutsideHandler as _0x161e77,BodyCollection as _0x37367f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ut,History as _0x5ade24,NoOperation as _0x35c27f,InsertOperation as _0xcc2fc4,MarkerOperation as _0x318383,RootAttributeOperation as _0x2fcfce,transformSets as _0x20f488,OperationFactory as _0x1771b0}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as ft,WEB_SOCKET_GATEWAY_STATES as _0x34e6a4,CollaborativeEditingService as _0x25d67d,User as mt,CommentsService as tt,TrackChangesService as at,RevisionHistoryService as st,EditorService as it}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x4cfeb8,UserView as lt}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x386e3e}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x348b04}from'lodash-es';class c extends _0x18fa55{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
+ ((()=>ft)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x4bd7ff];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x5a12c2){super(_0x5a12c2),this['set']('state',_0x34e6a4['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x4583ee);}['init'](){const _0x3fc062=this['context'],_0x32c2b4=_0x3fc062['plugins']['get']('CloudServices'),_0x1f47a5=_0x3fc062['plugins']['get'](_0x4bd7ff);if(!_0x32c2b4['token'])throw new _0x227598('websocketgateway-missing-token',this);if(!_0x32c2b4['webSocketUrl'])throw new _0x227598('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'](_0x32c2b4['token'],_0x32c2b4['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x37b61c=>{if(this['connection']=_0x37b61c,this['bind']('state')['to'](_0x37b61c,'state',this,'_isBrowserOffline',(_0x19197b,_0x374e44)=>('connected'!==_0x19197b&&(this['_shouldPluginsReconnect']=!0x0),_0x374e44||_0x19197b!==_0x34e6a4['CONNECTED']?_0x34e6a4['DISCONNECTED']:this['state']==_0x34e6a4['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x34e6a4['CONNECTING']):_0x34e6a4['CONNECTED'])),this['connection']['on']('error',(_0x13be3e,_0x2eaa62)=>{if('limitExceeded'!==_0x2eaa62['code'])throw console['error'](_0x2eaa62),new _0x227598('cloudservices-init',null,{'originalError':_0x2eaa62});_0x1f47a5['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'});}),!_0x37b61c['me'])return new Promise(_0x3fd360=>_0x37b61c['on']('change:me',_0x3fd360));})['catch'](_0x41b3d3=>{throw console['error'](_0x41b3d3),new _0x227598('cloudservices-init',null,{'originalError':_0x41b3d3});});}['addToReconnectionStack'](_0x53b65b){if('function'!=typeof _0x53b65b['reconnect'])throw new _0x227598('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x53b65b))throw new _0x227598('websocketgateway-plugin-already-registered',this,{'name':_0x53b65b['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x53b65b);}['removeFromReconnectionStack'](_0x5cd342){this['_reconnectionStack']['delete'](_0x5cd342);}['isInReconnectionStack'](_0x1315da){return this['_reconnectionStack']['has'](_0x1315da);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0xd0b077=>_0xd0b077['reconnect']())))['then'](()=>this['state']=_0x34e6a4['CONNECTED'])['catch'](_0x1eac86=>{throw console['error'](_0x1eac86),new _0x227598('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x34e6a4['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x18fa55{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x4cfeb8];}constructor(_0x1c72cb){super(_0x1c72cb),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x524897(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x4cfeb8);}['init'](){const _0x2b48a4=this['context']['plugins']['get'](c);this['listenTo'](_0x2b48a4,'change:state',(_0x2f6f94,_0x2f52d1,_0x2ea072)=>{if('connected'!==_0x2ea072)this['channelSessions']['forEach'](_0x528371=>_0x528371['clear']()),this['channelConnectedUsers']['forEach'](_0x229b08=>_0x229b08['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x9740ff,_0x46d958]of this['_registeredSessions'])for(const _0x2c6e24 of _0x46d958)this['_handleSessionAdd'](_0x9740ff,_0x2c6e24);}}),this['_createUser'](_0x2b48a4['connection']['me'],!0x0);}['register'](_0x81ee1c,_0x346416){if(this['_registeredSessions']['has'](_0x81ee1c))throw new _0x227598('sessions-register-already-registered',null,{'channelId':_0x81ee1c});this['_registeredSessions']['set'](_0x81ee1c,_0x346416),this['channelSessions']['set'](_0x81ee1c,new _0x524897()),this['channelConnectedUsers']['set'](_0x81ee1c,new _0x524897()),this['listenTo'](_0x346416,'add',(_0xfbd8ac,_0x905619)=>this['_handleSessionAdd'](_0x81ee1c,_0x905619)),this['listenTo'](_0x346416,'remove',(_0x5a0d31,_0x5a6dee)=>this['_handleSessionRemove'](_0x81ee1c,_0x5a6dee));for(const _0x1ae34a of _0x346416)this['_handleSessionAdd'](_0x81ee1c,_0x1ae34a);}['unregister'](_0x1f7941){if(!this['_registeredSessions']['has'](_0x1f7941))throw new _0x227598('sessions-unregister-not-exist',null,{'channelId':_0x1f7941});const _0x314d90=this['_registeredSessions']['get'](_0x1f7941);this['stopListening'](_0x314d90);for(const _0x23b439 of _0x314d90)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x1f7941,_0x23b439);this['_registeredSessions']['delete'](_0x1f7941),this['channelSessions']['delete'](_0x1f7941),this['channelConnectedUsers']['delete'](_0x1f7941);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x4b639e){for(const _0x9ef5b4 of this['channelSessions']['values']())for(const _0x5cf6ec of _0x9ef5b4)if(_0x5cf6ec['id']===_0x4b639e)return _0x5cf6ec['user'];}['getUserSessions'](_0x284951,_0x384d4b){const _0x3b4bc6=_0x384d4b?[this['channelSessions']['get'](_0x384d4b)]:this['channelSessions']['values'](),_0x7868b=new Set();for(const _0x3151a8 of _0x3b4bc6)for(const _0x134eab of _0x3151a8)_0x134eab['user']['id']===_0x284951['id']&&_0x7868b['add'](_0x134eab['id']);return _0x7868b;}['getUserRole'](_0x535535){for(const _0x9d3d30 of this['channelSessions']['values']())for(const _0x576258 of _0x9d3d30)if(_0x576258['user']===_0x535535)return _0x576258['role'];}['_handleSessionAdd'](_0x317cfa,_0x5d3c52){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x150618=_0x5d3c52['user'],_0x4f3dc7=this['_users']['getUser'](_0x150618['id'])||this['_createUser'](_0x150618),_0x50ff80=Object['assign']({},_0x5d3c52,{'user':_0x4f3dc7});this['channelSessions']['get'](_0x317cfa)['add'](_0x50ff80);const _0x171e58=this['channelConnectedUsers']['get'](_0x317cfa);_0x171e58['has'](_0x4f3dc7['id'])||_0x171e58['add'](_0x4f3dc7),this['allConnectedUsers']['has'](_0x4f3dc7['id'])||this['allConnectedUsers']['add'](_0x4f3dc7,_0x4f3dc7['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x317cfa,{'channelId':_0x317cfa,'session':_0x50ff80});}['_handleSessionRemove'](_0x554924,_0x3493a4){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x5576d4=this['channelConnectedUsers']['get'](_0x554924),_0x2dfce2=_0x3493a4['user'];_0x2dfce2['id']&&(this['channelSessions']['get'](_0x554924)['remove'](_0x3493a4['id']),_0x5576d4['has'](_0x2dfce2['id'])&&!this['getUserSessions'](_0x2dfce2,_0x554924)['size']&&_0x5576d4['remove'](_0x2dfce2['id']),this['allConnectedUsers']['get'](_0x2dfce2['id'])&&!this['getUserSessions'](_0x2dfce2)['size']&&this['allConnectedUsers']['remove'](_0x2dfce2['id']));}['_createUser'](_0x284475,_0x50a08a){const _0xac9a0f=this['_users']['addUser'](_0x284475);return _0x50a08a&&this['_users']['defineMe'](_0x284475['id']),_0xac9a0f['orderNumber']=this['_uniqueUsersCount']++,_0xac9a0f;}}class E extends _0x376faf{['_domEmitter']=new(_0x4583ee())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x2481e2=this['editor'],_0x254c37=_0x2481e2['plugins']['get'](r);_0x2481e2['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x12c0fb,{writer:_0x199f76})=>function(_0x55b070,_0x339382,_0x46e127,_0x2f634b){const _0x398056=_0x55b070['markerName']['split'](':')[0x2],_0x287045=_0x46e127['getUserBySessionId'](_0x398056);if(!_0x287045||_0x398056===_0x46e127['mySessionId'])return;if(!_0x2f634b['model']['schema']['checkChild'](_0x55b070['markerRange']['start'],'$text'))return;const _0x1f6978={'class':'ck-user__marker\x20'+_0x287045['color']['getMarkerClass'](),'data-name':_0x287045['name'],'data-session-id':_0x398056},_0x455a2e=_0x2f634b['model']['markers']['get'](_0x55b070['markerName']),_0x3f0af8=_0x455a2e['getStart'](),_0x3dc81d=_0x3f0af8['nodeAfter'],_0x43f956=_0x2f634b['model']['schema'];if(_0x3dc81d&&_0x43f956['isObject'](_0x3dc81d)&&_0x43f956['isInline'](_0x3dc81d)&&!_0x2f634b['model']['markers']['get']('user:range:'+_0x398056)['getRange']()['isCollapsed'])return;const _0x462be0=_0x3f0af8['parent'];return _0x2f634b['model']['schema']['isLimit'](_0x462be0)&&!_0x2f634b['model']['hasContent'](_0x462be0)&&(_0x1f6978['contenteditable']=!0x1),function(_0x2ffe42,_0x176ef7,_0x552b07){const _0x45f354=_0x2ffe42['createUIElement']('span',_0x176ef7);return _0x2ffe42['setCustomProperty']('userPositionMarker',!0x0,_0x45f354),_0x45f354['render']=function(_0x357cb1){const _0x29a7f6=this['toDomElement'](_0x357cb1);return _0x29a7f6['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>'+_0x552b07['name']+'</span>⁠',_0x29a7f6['addEventListener']('mouseenter',()=>{_0x29a7f6['classList']['add']('ck-user__marker_hovered');}),_0x29a7f6['addEventListener']('mouseleave',()=>{_0x29a7f6['classList']['remove']('ck-user__marker_hovered');}),_0x29a7f6;},_0x45f354['isSimilar']=function(_0x2cfa1f){return!(!this['getCustomProperty']('userPositionMarker')||!_0x2cfa1f['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x2cfa1f['getAttribute']('data-session-id'));},_0x45f354;}(_0x339382,_0x1f6978,_0x287045);}(_0x12c0fb,_0x199f76,_0x254c37,_0x2481e2)}),_0x2481e2['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x121980=>function(_0x2f5041,_0x121ed5){const _0x2896fe=_0x2f5041['markerName']['split'](':')[0x2];if(_0x2896fe===_0x121ed5['mySessionId'])return null;const _0x38fa63=_0x121ed5['getUserBySessionId'](_0x2896fe);if(!_0x38fa63)return{'id':_0x2896fe,'classes':[]};return{'id':_0x2896fe,'classes':['ck-user__selection',_0x38fa63['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x2896fe},'priority':0x7d0+_0x38fa63['orderNumber']};}(_0x121980,_0x254c37)}),function(_0x62b6b1){const _0x424a9d=_0x62b6b1['model'],_0x331a38=new Map(),_0x51a6da=_0x62b6b1['plugins']['get'](r);_0x424a9d['markers']['on']('update:user:range',(_0x299b0a,_0x41206b,_0x2fc742,_0x54e355)=>{if(!_0x54e355&&_0x331a38['get'](_0x41206b['name']))return _0x331a38['get'](_0x41206b['name'])['detach'](),void _0x331a38['delete'](_0x41206b['name']);const _0x29da55=_0x41206b['name']['split'](':')[0x2];if(_0x29da55===_0x51a6da['mySessionId'])return;const _0x4249ac='user:position:'+_0x29da55;_0x424a9d['markers']['has'](_0x4249ac)&&_0x62b6b1['editing']['reconvertMarker'](_0x4249ac),_0x41206b['on']('change:range',(_0x3471ff,_0x4dc425,_0x2bcb94)=>{if('$graveyard'!=_0x4dc425['root']['rootName']&&'$graveyard'==_0x41206b['getRange']()['root']['rootName']&&!_0x331a38['has'](_0x41206b['name'])){const _0x5d809c=_0x424a9d['schema']['getNearestSelectionRange'](_0x2bcb94['deletionPosition']);if(_0x5d809c){const _0x511fc9=ut['fromRange'](_0x5d809c);_0x331a38['set'](_0x41206b['name'],_0x511fc9),_0x511fc9['on']('change:range',(_0x11123c,_0x3bdfb8,_0x3c9c38)=>{if('$graveyard'==_0x511fc9['root']['rootName']){const _0x46c7e6=_0x424a9d['schema']['getNearestSelectionRange'](_0x3c9c38['deletionPosition']);_0x46c7e6?(_0x511fc9['start']=_0x46c7e6['start'],_0x511fc9['end']=_0x46c7e6['end']):(_0x331a38['delete'](_0x41206b['name']),_0x511fc9['detach']());}});}}});}),_0x424a9d['document']['on']('change',()=>{_0x331a38['size']>0x0&&_0x424a9d['enqueueChange']({'isUndoable':!0x1},_0x14c3cb=>{for(const [_0x170003,_0x8c57a5]of _0x331a38)'$graveyard'==_0x424a9d['markers']['get'](_0x170003)['getRange']()['root']['rootName']&&(Q(_0x170003['split'](':')[0x2],_0x8c57a5['toRange'](),_0x424a9d,_0x14c3cb),_0x8c57a5['detach']());_0x331a38['clear']();});});}(_0x2481e2),this['_domEmitter']['listenTo'](_0x1420b4['document'],'keydown',(_0x3982c5,{key:_0x4a7903})=>{'Escape'===_0x4a7903&&function(_0x1a90c2){_0x1a90c2['editing']['view']['change'](_0x557e26=>{for(const _0x3d1596 of _0x1a90c2['model']['markers']){if(!_0x3d1596['name']['startsWith']('user:position'))continue;const _0x1f220e=_0x1a90c2['editing']['mapper']['markerNameToElements'](_0x3d1596['name']);if(_0x1f220e){for(const _0xcbd0de of _0x1f220e)_0x557e26['removeClass']('ck-user__marker_hovered',_0xcbd0de);}}});}(_0x2481e2);},{'useCapture':!0x0});}['afterInit'](){const _0x3b00e6=this['editor'],_0x496724=_0x3b00e6['commands']['get']('undo');_0x496724&&_0x3b00e6['model']['on']('applyOperation',(_0x78a030,_0x1c94b7)=>{const _0x5ea3a6=_0x1c94b7[0x0];if('marker'!=_0x5ea3a6['type']||!_0x5ea3a6['name']['startsWith']('user:'))return;const _0x58cd7c=_0x5ea3a6['batch'];_0x496724['_createdBatches']['has'](_0x58cd7c)&&(_0x5ea3a6['newRange']=_0x5ea3a6['oldRange']?_0x3b00e6['model']['createRange'](_0x5ea3a6['oldRange']['start'],_0x5ea3a6['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x419ff0=this['editor'],_0x3fa114=_0x419ff0['model']['document'],_0x492801=_0x419ff0['plugins']['get'](r);_0x419ff0['model']['enqueueChange']({'isUndoable':!0x1},_0x491003=>{const _0x548ad7='user:range:'+_0x492801['mySessionId'],_0x56f3db='user:position:'+_0x492801['mySessionId'],_0x10cb59=_0x419ff0['model']['markers']['has'](_0x548ad7);_0x419ff0['editing']['view']['hasDomSelection']?Q(_0x492801['mySessionId'],_0x3fa114['selection']['getFirstRange'](),_0x419ff0['model'],_0x491003):_0x10cb59&&(_0x491003['removeMarker'](_0x548ad7),_0x491003['removeMarker'](_0x56f3db));});}}function Q(_0x2acd98,_0x5224d4,_0x85cb56,_0x283355){const _0x41fe2c='user:range:'+_0x2acd98,_0x5027d3='user:position:'+_0x2acd98,_0xcbdd32=_0x5224d4['getContainedElement']();let _0xa50726=_0x5224d4['start'];_0xcbdd32&&_0xcbdd32['is']('element','tableCell')&&(_0xa50726=function(_0x17911c,_0xe8ebdc){for(const _0x21933d of _0x17911c['getPositions']())if(_0xe8ebdc['schema']['checkChild'](_0x21933d,'$text'))return _0x21933d;}(_0x5224d4,_0x85cb56),_0x5224d4=_0x283355['createRange'](_0xa50726));const _0x1ad8db=_0x283355['createRange'](_0xa50726);_0x85cb56['markers']['has'](_0x41fe2c)?(_0x283355['updateMarker'](_0x41fe2c,{'range':_0x5224d4}),_0x283355['updateMarker'](_0x5027d3,{'range':_0x1ad8db})):(_0x283355['addMarker'](_0x41fe2c,{'range':_0x5224d4,'usingOperation':!0x0}),_0x283355['addMarker'](_0x5027d3,{'range':_0x1ad8db,'usingOperation':!0x0}));}function B(_0x24e9d3,_0x387088,_0x5640ec){const t=_0x24e9d3['t'];switch(_0x387088){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'},_0x5640ec);default:return'';}}let F=0x1;class l extends _0x376faf{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
+ ((()=>_0x25d67d)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,E,_0x4f978d,_0x4cfeb8,_0x4bd7ff];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x556eb2=this['serverHistory']['getOperations']();for(let _0x4e240d=_0x556eb2['length']-0x1;_0x4e240d>=0x0;_0x4e240d--){const _0x30a7cf=_0x556eb2[_0x4e240d];if(!this['_disconnectionOperations']['has'](_0x30a7cf))return _0x30a7cf['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x3ade92){if(super(_0x3ade92),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x5ade24(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x227598('collaboration-missing-channelid',this);const _0x35b70b=_0x3ade92['config']['get']('cloudServices.bundleVersion')||ht;this['_service']=new l['CollaborativeEditingService'](_0x35b70b,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x386e3e(),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 G(this['_disconnectionOperations']);}['init'](){const _0x5b83d3=this['editor'],_0x40bfc3=_0x5b83d3['plugins']['get'](_0x4cfeb8),_0x171b16=_0x5b83d3['plugins']['get'](c);this['listenTo'](_0x40bfc3,'getOperationAuthor',(_0x1428c8,_0x392a5d)=>{const _0x30004d=_0x392a5d[0x0];_0x30004d['_authorId']&&(_0x1428c8['return']=_0x40bfc3['getUser'](_0x30004d['_authorId']),_0x1428c8['stop']()),null===_0x30004d['_authorId']&&(_0x1428c8['return']=null,_0x1428c8['stop']());},{'priority':'high'}),this['listenTo'](_0x5b83d3['model']['document']['selection'],'change:range',(_0x182967,_0x39a8c4)=>{_0x39a8c4['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x5b83d3['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x5b83d3['model']['on']('applyOperation',(_0x5b00ed,_0x599eef)=>{const _0x3e6f0a=_0x599eef[0x0];_0x3e6f0a['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x3e6f0a),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x171b16,'state',this,'_hasSynchronizationProblem',(_0x13c77c,_0x22f00)=>'connected'===_0x13c77c&&!_0x22f00),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x5b83d3['disableReadOnlyMode']('rtc-offline'):_0x5b83d3['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x5b83d3['disableReadOnlyMode']('rtc-offline'):_0x5b83d3['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x177d67=this['editor']['plugins']['get'](r),_0x553393=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x177d67['unregister'](this['_channelId']);const _0x270721=await this['_service']['reconnect'](_0x553393['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x270721)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x323d41=await this['_service']['getConnectedSessions']();_0x177d67['register'](this['_channelId'],_0x323d41),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x5ccda3){if(function(_0x1eca52){return'404'===_0x1eca52['code'];}(_0x5ccda3)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x49ea53){return'409'===_0x49ea53['code'];}(_0x5ccda3)){const _0x27dfc4=B(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'](_0x27dfc4);}else{if(!(_0x5ccda3 instanceof H))throw _0x5ccda3;this['_handleReconnectionError']();}}}}['destroy'](){const _0x33acdf=this['editor']['plugins']['get'](c),_0x2fde9b=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x2fde9b['channelSessions']['has'](this['_channelId'])&&_0x2fde9b['unregister'](this['_channelId']),_0x33acdf['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0xc01b74){if(this['sessionId']!==_0xc01b74['sessionId']&&this['_lastSyncedOperationId']!==_0xc01b74['lastOperationId'])throw new H();return this['sessionId']=_0xc01b74['sessionId'],this['_handleServerResponse']([],{..._0xc01b74,'wereChangesApplied':!0x1,'data':_0xc01b74['data']},'reconnect');}async['_connectService'](_0x4b9d0b,_0x29b74e=!0x1){const {connection:_0x2b3325}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x2b3325,this['_channelId'])['then'](_0x229c57=>this['_initSessionsHandling'](_0x229c57))['catch'](_0x18e58c=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x18e58c);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0xbdbcf7,_0x3d9982)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x3d9982);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x18106d=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x4b9d0b);this['_isPendingUpdate']=!0x0;const _0xac4b9c=await this['_service']['connect'](_0x2b3325,this['_compressOperations'](_0x4b9d0b),_0x18106d);if(this['sessionId']=_0xac4b9c['sessionId'],_0x29b74e){if(!_0xac4b9c['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0xac4b9c['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x4b9d0b,_0xac4b9c,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0xac4b9c,_0x4b9d0b);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x251917=this['editor']['plugins']['get'](r),_0x58dd6c=this['editor']['plugins']['get'](E),_0x6d780b=_0x251917['channelSessions']['get'](this['_channelId']);_0x6d780b&&_0x6d780b['length']>0x1?_0x58dd6c['createUserMarkerOperations']():this['listenTo'](_0x251917,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x251917['channelSessions']['get'](this['_channelId'])['length']&&_0x58dd6c['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x4d0ee1,_0x50a38f,_0x10c930,_0x172eb8){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x50a38f){const _0x3bd9d2=this['_decompressOperations'](_0x10c930,_0x172eb8);await this['_fetchMissingUsers'](_0x3bd9d2),this['_handleExternalOperations'](_0x3bd9d2,_0x50a38f,_0x10c930['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x3d1d71}=this['editor'];let _0x3dab01;try{_0x3dab01=await this['_service']['getDocumentDetails']();}catch(_0x371134){const _0x2c3e9d=B(_0x3d1d71,'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'](_0x2c3e9d);}const _0x4868c6=_0x3dab01['currentDocumentSession']||_0x3dab01['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x4868c6['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x59c7b4=B(_0x3d1d71,'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'](_0x59c7b4);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x7ca94b){const _0x3df927=this['editor']['plugins']['get'](r);this['listenTo'](_0x3df927,'sessionAdd:'+this['_channelId'],(_0x5c3025,{session:_0x11c2fa})=>{if(_0x11c2fa['id']===_0x3df927['mySessionId']){_0x5c3025['off']();const _0x23a0cd=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x53f4ee=_0x11c2fa['permissions'];_0x23a0cd&&_0x23a0cd['isEnabled']&&(_0x53f4ee=_0x53f4ee['filter'](_0x891850=>'document:write'!==_0x891850)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x53f4ee,this['_channelId']);}}),_0x3df927['register'](this['_channelId'],_0x7ca94b);}['_initThrowingOnDataSet'](){const _0x3d5569=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x335721)=>{if(!_0x335721[_0x335721['length']-0x1]['suppressErrorInCollaboration'])throw new _0x227598('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x3d5569['apply'](this['editor']['data'],_0x335721);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x38cd95,[_0x1a8a76])=>{if(this['_document']['version'])throw new _0x227598('realtimecollaborationclient-init-document-already-initialized',this);_0x38cd95['stop'](),this['_setPendingAction']();const _0x125477=this['editor']['config']['get']('rootsAttributes'),_0x197cd7=this['_getOperationsFromInitData'](_0x1a8a76,_0x125477);0x0==_0x197cd7['length']&&_0x197cd7['push'](new _0x35c27f(0x0)),_0x38cd95['return']=this['_connectService'](_0x197cd7)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x116dcb=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x116dcb))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x1a26aa,[_0x394670,_0x509821])=>{_0x1a26aa['stop']();const _0x3a7374=this['editor']['model']['document']['getRoot'](_0x394670);if(!this['_knownRootNames']['has'](_0x394670)){const _0x43d42a=_0x509821&&_0x509821['data']?_0x509821['data']:'',_0x22d2be=_0x509821&&_0x509821['attributes']?_0x509821['attributes']:{};await this['_loadRoot'](_0x394670,_0x43d42a,_0x22d2be);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x3a7374['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x3a7374);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x1424a2){const _0x3fd83f=this['editor']['plugins']['get'](_0x4cfeb8),{connection:_0x460810}=this['editor']['plugins']['get'](c),_0x340c49=new Set();for(const _0x93dd60 of _0x1424a2){const _0x5bfbef=_0x93dd60['_authorId'];_0x5bfbef&&!_0x3fd83f['getUser'](_0x5bfbef)&&_0x340c49['add'](_0x5bfbef);}if(0x0===_0x340c49['size'])return;const _0x4bc3a3=await mt['getMany'](_0x460810,Array['from'](_0x340c49));for(const _0x2d6a84 of _0x4bc3a3)_0x3fd83f['getUser'](_0x2d6a84['id'])||_0x3fd83f['addUser'](_0x2d6a84);}['_getOperationsFromInitData'](_0x2334db,_0x3f8232={}){const _0x4036b4=this['editor']['model'],_0x4f54a0=[];let _0x336a46=0x0;const _0x5abc1a='string'==typeof _0x2334db?{'main':_0x2334db}:_0x2334db;for(const _0x402a52 of Object['keys'](_0x5abc1a)){if(!this['_document']['roots']['has'](_0x402a52))throw new _0x227598('realtimecollaborationclient-init-non-existent-root',this);const _0x5b29c2=this['editor']['data']['parse'](_0x5abc1a[_0x402a52]),_0x1f69ad=this['_document']['getRoot'](_0x402a52),_0x5c2027=new _0xcc2fc4(_0x4036b4['createPositionAt'](_0x1f69ad,0x0),_0x5b29c2,_0x336a46++);_0x4f54a0['push'](_0x5c2027);for(const [_0x2db5c9,_0x2e12f0]of _0x5b29c2['markers']){const _0x3e8bfd=_0x4036b4['createRange'](_0x4036b4['createPositionFromPath'](_0x1f69ad,_0x2e12f0['start']['path']['slice']()),_0x4036b4['createPositionFromPath'](_0x1f69ad,_0x2e12f0['end']['path']['slice']())),_0x1c5d0d=new _0x318383(_0x2db5c9,null,_0x3e8bfd,_0x4036b4['markers'],!0x0,_0x336a46++);_0x4f54a0['push'](_0x1c5d0d);}}if(_0x3f8232)for(const [_0x1fc630,_0x292f91]of Object['entries'](_0x3f8232)){const _0x674ff8=_0x4036b4['document']['getRoot'](_0x1fc630);if(!_0x674ff8)throw new _0x227598('multi-root-editor-root-attributes-no-root',null);for(const [_0x23aa42,_0x4e047d]of Object['entries'](_0x292f91))if(null!==_0x4e047d){const _0x3f3104=new _0x2fcfce(_0x674ff8,_0x23aa42,null,_0x4e047d,_0x336a46++);_0x4f54a0['push'](_0x3f3104);}}return _0x4f54a0;}async['_loadRoot'](_0x407553,_0x510dba,_0x5a856d){this['_getOperationsFromInitData']({[_0x407553]:_0x510dba},{[_0x407553]:_0x5a856d})['forEach']((_0x234979,_0x76b0f2)=>{_0x234979['baseVersion']=this['_document']['version']+_0x76b0f2,_0x234979['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x234979);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x150885,_0x3a11ef){let _0x248b55;this['_offset']=_0x150885['offset'];const _0x1c0a96=_0x150885['wereChangesApplied']&&!_0x150885['initData'],_0x2076e4=_0x1c0a96?0x0:_0x150885['data']['baseVersion'];if(_0x3a11ef['forEach'](_0x3725b0=>{_0x3725b0['_isInit']=!0x0,_0x3725b0['createdAt']=_0x150885['sessionCreatedAt'],_0x3725b0['_authorId']=null;}),_0x1c0a96)_0x248b55=_0x3a11ef,this['_applyOperationsSet'](_0x248b55,_0x1c0a96);else{if(_0x150885['initData']){const _0x4755d3=this['_getOperationsFromInitData'](_0x150885['initData']);this['_document']['history']['version']=-_0x4755d3['length'],_0x4755d3['forEach'](_0x24eb47=>{_0x24eb47['baseVersion']-=_0x4755d3['length'],_0x24eb47['createdAt']=_0x150885['sessionCreatedAt'],_0x24eb47['_isInit']=!0x0,_0x24eb47['_authorId']=null;}),this['_applyOperationsSet'](_0x4755d3,!0x0),this['serverHistory']['version']=-_0x4755d3['length']+this['_offset'],this['_updateServerHistory'](_0x4755d3);}this['_document']['history']['version']=_0x2076e4,_0x248b55=this['_decompressOperations'](_0x150885['data'],_0x150885['metadata']),await this['_fetchMissingUsers'](_0x248b55),this['_applyOperationsSet'](_0x248b55,_0x1c0a96);}_0x150885['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x248b55,_0x150885['lastOperationId']),this['_lastSyncedOperationId']=_0x150885['lastOperationId']),this['serverHistory']['version']=_0x2076e4+this['_offset'],this['_updateServerHistory'](_0x248b55),_0x3a11ef['filter'](_0x5bf802=>{const _0x5e33f4=this['_getAffectedRoot'](_0x5bf802);return _0x5e33f4&&!this['_knownRootNames']['has'](_0x5e33f4);})['forEach']((_0x87a0,_0x216f32)=>{_0x87a0['baseVersion']=this['_document']['version']+_0x216f32,this['_saveOperationInBuffer'](_0x87a0);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x2fb283,_0xfe5221){throw this['_isPendingUpdate']=!0x0,_0xfe5221&&console['error'](_0xfe5221),new _0x227598(_0x2fb283,this['editor']);}['_saveOperationInBuffer'](_0x3cf4ae){this['_knownOperations']['has'](_0x3cf4ae)||(this['_knownOperations']['add'](_0x3cf4ae),this['_bufferedOperations']['push'](_0x3cf4ae),this['_pendingAction']||'marker'==_0x3cf4ae['type']&&!_0x3cf4ae['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x203dc4=!0x1){!_0x203dc4&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x1b1719=>{_0x1b1719&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0xeb5bc6=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x2c1e2b){return _0x2c1e2b['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2c1e2b['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x2c1e2b['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0xeb5bc6))throw _0xeb5bc6;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x1438e2=>{this['on']('change:_isPendingUpdate',()=>{_0x1438e2();});});}async['_sendBufferedOperations'](){const _0x5d318a=this['editor']['plugins']['get'](E);if(this['_shouldSendSelectionUpdate']()&&(_0x5d318a['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x4d35ec=[...this['_bufferedOperations']];for(const _0x4d5734 of _0x4d35ec)_0x4d5734['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x4d5734);const _0xe3e39a=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x4d35ec),_0x5b7896=F++,_0x222628=this['_compressOperations'](_0x4d35ec),_0x2e644a=await this['_service']['sendOperations'](_0x222628,_0x222628['baseVersion'],_0xe3e39a);try{return await this['_handleServerResponse'](_0x4d35ec,_0x2e644a,_0x5b7896);}catch(_0x1dbb5b){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x1dbb5b);}}async['_handleServerResponse'](_0x1af790,_0x5d8ee7,_0x4aaf88){if('error'in _0x5d8ee7)throw _0x5d8ee7['error'];let _0x371768=!0x1;if(_0x5d8ee7['wereChangesApplied']){_0x5d8ee7['lastOperationId']&&(this['_lastSyncedOperationId']=_0x5d8ee7['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x1d291f=>!_0x1af790['includes'](_0x1d291f));for(const _0x5ca39b of _0x1af790)_0x5ca39b['createdAt']='lastOperationAcceptedAt'in _0x5d8ee7&&_0x5d8ee7['lastOperationAcceptedAt']||void 0x0;q(_0x1af790,_0x5d8ee7['version']-_0x1af790['length']),this['_updateServerHistory'](_0x1af790);const _0x41b979=_0x1af790['filter'](_0xd43fd=>{if(!_0xd43fd['_isInit'])return!0x1;const _0x3bd6e5=this['_getAffectedRoot'](_0xd43fd);return _0x3bd6e5&&!this['_knownRootNames']['has'](_0x3bd6e5);});q(_0x41b979,this['_document']['version']),this['_applyOperationsSet'](_0x41b979),_0x371768=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x2ecaa4=this['_decompressOperations'](_0x5d8ee7['data'],_0x5d8ee7['metadata'])['filter'](_0x996ed3=>_0x996ed3['baseVersion']>=this['_lastServerVersion']);_0x2ecaa4['forEach'](_0x2f1fca=>this['_addKnownRoot'](_0x2f1fca)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x5affbb=>!_0x5affbb['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x5affbb))),this['_bufferedOperations']['length']&&q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x2ecaa4),_0x371768=this['_handleExternalOperations'](_0x2ecaa4,_0x5d8ee7['version'],_0x5d8ee7['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x371768?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x271259,_0x3dc754,_0xe0c394){try{const _0x2e9966={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x112c51,operationsB:_0x4e9993,originalOperations:_0x40ab3b}=_0x20f488(_0x271259,this['_bufferedOperations'],_0x2e9966);q(_0x112c51,this['_document']['version']),q(_0x4e9993,_0x3dc754);for(const _0x1b5488 of _0x112c51){const _0x4ed146=_0x40ab3b['get'](_0x1b5488);_0x1b5488['_authorId']=_0x4ed146?_0x4ed146['_authorId']:null;}_0xe0c394&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x271259,_0xe0c394),this['_lastSyncedOperationId']=_0xe0c394),this['_bufferedOperations']=[..._0x4e9993],this['_applyOperationsSet'](_0x112c51),this['_updateServerHistory'](_0x271259);}catch(_0x9f7e1e){return console['error'](_0x9f7e1e),!0x1;}return!0x0;}['_applyOperationsSet'](_0x7ef5ca,_0x253f1a=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x4057ac=>{for(const _0x513892 of _0x7ef5ca)this['_knownOperations']['add'](_0x513892),this['_addKnownRoot'](_0x513892),_0x4057ac['batch']['addOperation'](_0x513892),this['editor']['model']['applyOperation'](_0x513892);});}['_addKnownRoot'](_0x5ebfda){const _0x3a6a99=this['_getAffectedRoot'](_0x5ebfda);_0x3a6a99&&this['_knownRootNames']['add'](_0x3a6a99);}['_getAffectedRoot'](_0x2bd812){let _0x345f29,_0x1cb856;switch(_0x2bd812['type']){case'insert':_0x345f29=_0x2bd812['position']['root'];break;case'marker':if(_0x1cb856=_0x2bd812['newRange'],!_0x1cb856)return null;_0x345f29=_0x1cb856['root'];break;case'addRootAttribute':_0x345f29=_0x2bd812['root'];break;case'addRoot':_0x345f29=_0x2bd812['affectedSelectable'];break;case'move':_0x345f29=_0x2bd812['targetPosition']['root'];break;default:return null;}return _0x345f29['rootName'];}['_updateServerHistory'](_0x574e1c){_0x574e1c['forEach'](_0x5a9820=>{const _0x26dcd5=_0x5a9820['clone']();_0x26dcd5['_authorId']=_0x5a9820['_authorId'],_0x26dcd5['_isInit']=!!_0x5a9820['_isInit'],_0x26dcd5['createdAt']=_0x5a9820['createdAt'],_0x26dcd5['baseVersion']+=this['_offset'],_0x5a9820['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x26dcd5),this['serverHistory']['addOperation'](_0x26dcd5);});}['_handleReconnectionError'](_0x2ddc54){const _0x5bf66c=this['editor']['plugins']['get']('Notification'),_0x1fafe0=this['editor']['locale'];_0x2ddc54||(_0x2ddc54=B(_0x1fafe0,'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.')),_0x5bf66c['showWarning'](_0x2ddc54,{'title':B(_0x1fafe0,'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'](_0x4f978d)['add'](B(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x4f978d)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x4a6a11){const _0x4bf3a8=_0x4a6a11['map'](_0x46d129=>_0x46d129['toJSON']());return this['_compressor']['compress'](_0x4bf3a8);}['_decompressOperations'](_0x308e1f,_0x445bec){return this['_compressor']['decompress'](_0x308e1f)['map']((_0x84a9c9,_0x505850)=>{const _0x4e131c='init'==_0x445bec[_0x505850]['type'];if('InsertOperation'==_0x84a9c9['__className']){const _0x2504ad=_0x84a9c9['position']['root'];!this['_document']['getRoot'](_0x2504ad)&&(this['_document']['createRoot']('$root',_0x2504ad)['_isAttached']=!0x1);}const _0x520517=_0x1771b0['fromJSON'](_0x84a9c9,this['_document']);return _0x520517['wasUndone']=_0x84a9c9['wasUndone'],_0x520517['_isInit']=_0x4e131c,_0x520517['_authorId']=_0x4e131c?null:_0x445bec[_0x505850]['userId'],_0x520517['_isDisconnection']='cs:removeUser'===_0x445bec[_0x505850]['type'],_0x520517['createdAt']=_0x445bec[_0x505850]['createdAt'],_0x520517;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x2ad943=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x2ad943&&_0x2ad943['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class H extends Error{}function q(_0xf8a109,_0x141017){for(const _0x5bbebc of _0xf8a109)_0x5bbebc['baseVersion']=_0x141017++;}class G{['_ignoredOperations'];['_operationToId'];constructor(_0x244b9e){this['_ignoredOperations']=_0x244b9e,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x14c15d){let _0x6c7992=_0x14c15d['length'];for(;_0x6c7992--;){const _0x561e83=_0x14c15d[_0x6c7992];if(!this['_ignoredOperations']['has'](_0x561e83)){if(!this['_operationToId']['has'](_0x561e83)){const _0x3857f9=_0x33d4d9()['slice'](0x1,0x12);this['_operationToId']['set'](_0x561e83,_0x3857f9);}return this['_operationToId']['get'](_0x561e83);}}}['setIdForTheLastOperation'](_0x176295,_0x6cdf54){if(!_0x6cdf54)return;let _0x2145a1=_0x176295['length'];for(;_0x2145a1--;){const _0x4c9ab6=_0x176295[_0x2145a1];this['_ignoredOperations']['has'](_0x4c9ab6)||this['_operationToId']['set'](_0x4c9ab6,_0x6cdf54);}}}class n extends _0x376faf{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x18fa55{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
+ ((()=>tt)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x4cfeb8];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x34e7db){super(_0x34e7db),this['_services']=new Map();}async['init'](){const _0x4b6a53=this['context'],_0x51427e=_0x4b6a53['plugins']['get']('CommentsRepository');if(_0x4b6a53['plugins']['get'](c)['addToReconnectionStack'](this),_0x51427e['adapter']={'addCommentThread':async({channelId:_0x4ee5ec,threadId:_0x227a40,comments:_0x297bd8,resolvedAt:_0x447fb0,resolvedBy:_0x4228e9,context:_0x189af0,attributes:_0x50894a})=>{const _0x1bef0c=await this['_getService'](_0x4ee5ec)['addCommentThread']({'commentThreadId':_0x227a40,'comments':_0x297bd8['map'](_0x56ced5=>function(_0x42ddce,_0x18c869,_0x4b32f6){return{'commentThreadId':_0x4b32f6,'commentId':_0x42ddce['commentId'],'userId':_0x42ddce['authorId'],'content':_0x42ddce['content'],'documentId':_0x18c869,'createdAt':_0x42ddce['createdAt'],'attributes':_0x42ddce['attributes']||{}};}(_0x56ced5,_0x4ee5ec,_0x227a40)),'resolvedAt':_0x447fb0,'resolvedBy':_0x4228e9,'context':_0x189af0,'attributes':_0x50894a})['catch'](wt);return{'threadId':_0x1bef0c['commentThreadId'],'comments':_0x1bef0c['comments']};},'getCommentThread':async({channelId:_0x1839e1,threadId:_0x36dba4})=>{const _0x33e785=await this['_getService'](_0x1839e1)['getCommentThread'](_0x36dba4)['catch'](wt);return _0x33e785['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x33e785]),{'threadId':_0x33e785['commentThreadId'],'comments':_0x33e785['comments']['map'](nt),'context':_0x33e785['context'],'resolvedAt':_0x33e785['resolvedAt'],'resolvedBy':_0x33e785['resolvedBy'],'attributes':_0x33e785['attributes']||{}});},'updateCommentThread':async({channelId:_0x567a69,threadId:_0x117f75,context:_0x699c46,unlinkedAt:_0x2aae8d,attributes:_0x5b9bfc})=>this['_getService'](_0x567a69)['updateCommentThread']({'commentThreadId':_0x117f75,'context':_0x699c46,'attributes':_0x5b9bfc,'unlinkedAt':_0x2aae8d})['catch'](et)['catch'](wt),'resolveCommentThread':async({channelId:_0x32d764,threadId:_0x3b008c})=>{const _0x3a5c79=await this['_getService'](_0x32d764)['resolveCommentThread'](_0x3b008c)['catch'](et)['catch'](wt);return{'threadId':_0x3a5c79['commentThreadId'],'resolvedAt':_0x3a5c79['resolvedAt'],'resolvedBy':_0x3a5c79['resolvedBy']};},'reopenCommentThread':async({channelId:_0x406879,threadId:_0x178cb0})=>this['_getService'](_0x406879)['reopenCommentThread'](_0x178cb0)['catch'](et)['catch'](wt),'removeCommentThread':({channelId:_0x5ac1a5,threadId:_0x3c8bb9})=>this['_getService'](_0x5ac1a5)['removeCommentThread'](_0x3c8bb9)['catch'](et)['catch'](wt),'addComment':({channelId:_0x548088,threadId:_0x37347c,commentId:_0x5243f5,content:_0x31c7e7,attributes:_0x3b9fa6})=>this['_getService'](_0x548088)['addComment'](_0x37347c,_0x5243f5,_0x31c7e7,_0x3b9fa6)['catch'](wt),'updateComment':({channelId:_0x5d2b2f,threadId:_0x4a8bd0,commentId:_0x1b26d6,content:_0x42b170,attributes:_0x10eb7d})=>this['_getService'](_0x5d2b2f)['updateComment'](_0x4a8bd0,_0x1b26d6,_0x42b170,_0x10eb7d)['catch'](et)['catch'](wt),'removeComment':({channelId:_0x2e6358,threadId:_0x2f1b0c,commentId:_0x247f57})=>this['_getService'](_0x2e6358)['removeComment'](_0x2f1b0c,_0x247f57)['catch'](et)['catch'](wt)},_0x4b6a53 instanceof _0x23ad8d){const _0x3c92e6=_0x4b6a53['config']['get']('collaboration.channelId'),_0x14996e=_0x4b6a53['plugins']['get'](r);await this['_setUpService'](_0x3c92e6);const _0x44fa84=await this['_services']['get'](_0x3c92e6)['getConnectedSessions']();this['listenTo'](_0x14996e,'sessionAdd:'+_0x3c92e6,(_0x6f19a8,{session:_0x493d02})=>{_0x493d02['id']===_0x14996e['mySessionId']&&(_0x6f19a8['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x493d02['permissions'],_0x3c92e6));}),_0x14996e['register'](_0x3c92e6,_0x44fa84);}}async['_setUpService'](_0x2c4190){if(this['_services']['has'](_0x2c4190))throw new _0x227598('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x2c4190});const _0x1ae199=this['context']['plugins']['get']('CommentsRepository'),_0x27acbd=new a['CommentsService'](_0x2c4190);this['_services']['set'](_0x2c4190,_0x27acbd),this['listenTo'](_0x27acbd,'commentThreadAdded',(_0x54b9e9,_0xe0763a)=>{const {commentThreadId:_0x38bece,documentId:_0x248a36,context:_0x57bc07,attributes:_0x9eba71,resolvedAt:_0x17debe,resolvedBy:_0x58294c,comments:_0x198f9c}=_0xe0763a;_0x1ae199['getCommentThread'](_0x38bece)||_0x1ae199['addCommentThread']({'threadId':_0x38bece,'channelId':_0x248a36,'comments':_0x198f9c?_0x198f9c['map'](nt):[],'context':_0x57bc07,'attributes':_0x9eba71,'resolvedAt':_0x17debe,'resolvedBy':_0x58294c,'isFromAdapter':!0x0});}),this['listenTo'](_0x27acbd,'commentThreadUpdated',(_0x2b5447,{commentThreadId:_0x35a5d7,documentId:_0x169f54,context:_0x55103d,unlinkedAt:_0x1cce18,attributes:_0x470712})=>{_0x1ae199['getCommentThread'](_0x35a5d7)&&_0x1ae199['updateCommentThread']({'threadId':_0x35a5d7,'channelId':_0x169f54,'context':_0x55103d,'unlinkedAt':_0x1cce18,'attributes':_0x470712,'isFromAdapter':!0x0});}),this['listenTo'](_0x27acbd,'commentThreadResolved',(_0x180e26,{commentThreadId:_0x4996fe,resolvedBy:_0x34a949,resolvedAt:_0x35e8ee})=>{const _0x2e3426=_0x1ae199['getCommentThread'](_0x4996fe);_0x2e3426&&_0x2e3426['resolve']({'resolvedBy':_0x34a949,'resolvedAt':_0x35e8ee,'isFromAdapter':!0x0});}),this['listenTo'](_0x27acbd,'commentThreadReopened',(_0x3ed4d5,{commentThreadId:_0x5ec0cc})=>{const _0x1793f3=_0x1ae199['getCommentThread'](_0x5ec0cc);_0x1793f3&&_0x1793f3['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x27acbd,'commentThreadRemoved',(_0x400687,{commentThreadId:_0x38a584})=>{const _0x2e876c=_0x1ae199['getCommentThread'](_0x38a584);_0x2e876c&&_0x2e876c['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x27acbd,'commentAdded',(_0x4227e9,_0x40d1f0)=>{const _0x2c1a47=_0x40d1f0['commentThreadId'],_0x41c95c=_0x1ae199['getCommentThread'](_0x2c1a47);_0x41c95c&&_0x41c95c['addComment']({...nt(_0x40d1f0),'isFromAdapter':!0x0});}),this['listenTo'](_0x27acbd,'commentUpdated',(_0x52b919,{commentThreadId:_0x285427,commentId:_0x581a06,content:_0x1339cf,attributes:_0x5f1596})=>{const _0x2cbb11=_0x1ae199['getCommentThread'](_0x285427);if(_0x2cbb11){const _0x2fa4b4=_0x2cbb11['getComment'](_0x581a06);_0x2fa4b4&&_0x2fa4b4['update']({'content':_0x1339cf,'attributes':_0x5f1596,'isFromAdapter':!0x0});}}),this['listenTo'](_0x27acbd,'commentRemoved',(_0x595cd5,{commentThreadId:_0x513360,commentId:_0x1179c8})=>{const _0x6b249a=_0x1ae199['getCommentThread'](_0x513360);if(_0x6b249a){const _0x211ee2=_0x6b249a['getComment'](_0x1179c8);_0x211ee2&&_0x211ee2['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x2c4190);}['destroy'](){if(this['context']instanceof _0x23ad8d){const _0x351db5=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x351db5);}}['_terminateService'](_0x506ffa){if(!this['_services']['has'](_0x506ffa))throw new _0x227598('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x506ffa});this['_getService'](_0x506ffa)['disconnect'](),this['_services']['delete'](_0x506ffa);}async['reconnect'](){for(const _0x5d47bf of this['_services']['keys']())await this['_connectService'](_0x5d47bf);if(this['context']instanceof _0x23ad8d){const _0x4cd005=this['context']['config']['get']('collaboration.channelId'),_0x333762=this['context']['plugins']['get'](r);_0x333762['unregister'](_0x4cd005);const _0x5a129a=await this['_services']['get'](_0x4cd005)['getConnectedSessions']();_0x333762['register'](_0x4cd005,_0x5a129a);}}async['_connectService'](_0x170d62){const {connection:_0x5261f3}=this['context']['plugins']['get'](c),_0x5bb6b2=this['context']['plugins']['get']('CommentsRepository'),_0x37c6d1=this['_services']['get'](_0x170d62),_0x5d8da9=await _0x37c6d1['connect'](_0x5261f3);await this['_fetchMissingUsersForThreads'](_0x5d8da9);const _0x12592d=new Set(Array['from'](_0x5bb6b2['getCommentThreads']({'channelId':_0x170d62}),_0x13be4b=>_0x13be4b['id']));for(const _0x26828b of _0x5d8da9)_0x26828b['deletedAt']||_0x12592d['delete'](_0x26828b['commentThreadId']);for(const _0x1993e4 of _0x12592d)_0x5bb6b2['getCommentThread'](_0x1993e4)['remove']({'isFromAdapter':!0x0});for(const _0x3c8e6e of _0x5d8da9){let _0x3b9539=_0x5bb6b2['getCommentThread'](_0x3c8e6e['commentThreadId']);const {commentThreadId:_0x489851,context:_0x54b006,attributes:_0x4e8f32,resolvedBy:_0x8b8aa0,resolvedAt:_0x596964,unlinkedAt:_0x51f696,deletedAt:_0x2836e2}=_0x3c8e6e;if(_0x2836e2)continue;_0x3b9539||(_0x3b9539=_0x5bb6b2['addCommentThread']({'channelId':_0x170d62,'threadId':_0x489851,'context':_0x54b006,'attributes':_0x4e8f32||{},'resolvedBy':_0x8b8aa0,'resolvedAt':_0x596964,'unlinkedAt':_0x51f696,'isFromAdapter':!0x0}));const _0x22a33f=new Set(Array['from'](_0x3b9539['comments'],_0xae08a=>_0xae08a['id']));for(const _0x518d54 of _0x3c8e6e['comments'])_0x22a33f['delete'](_0x518d54['commentId']);for(const _0x331992 of _0x22a33f)_0x3b9539['getComment'](_0x331992)['remove']({'isFromAdapter':!0x0});for(const _0x74b47 of _0x3c8e6e['comments']){const _0x29743c=_0x3b9539['getComment'](_0x74b47['commentId']);_0x29743c?_0x29743c['content']!==_0x74b47['content']&&_0x29743c['update']({'content':_0x74b47['content'],'isFromAdapter':!0x0}):_0x3b9539['addComment'](Object['assign'](nt(_0x74b47),{'isFromAdapter':!0x0}));}}}['_getService'](_0x32b6ad){if(!this['_services']['has'](_0x32b6ad))throw new _0x227598('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x32b6ad});return this['_services']['get'](_0x32b6ad);}async['_fetchMissingUsersForThreads'](_0x1078cf){const _0x3c4e18=this['context']['plugins']['get'](_0x4cfeb8),{connection:_0x272c53}=this['context']['plugins']['get'](c),_0x3a393c=new Set();for(const {resolvedBy:_0x5f387a,comments:_0x335d3a}of _0x1078cf){_0x5f387a&&!_0x3c4e18['getUser'](_0x5f387a)&&_0x3a393c['add'](_0x5f387a);for(const {userId:_0x575de8}of _0x335d3a)_0x3c4e18['getUser'](_0x575de8)||_0x3a393c['add'](_0x575de8);}if(0x0===_0x3a393c['size'])return;const _0x38c8cb=await mt['getMany'](_0x272c53,Array['from'](_0x3a393c));for(const _0x2f4563 of _0x38c8cb)_0x3c4e18['getUser'](_0x2f4563['id'])||_0x3c4e18['addUser'](_0x2f4563);}}async function et(_0x327dd2){if('404'!==_0x327dd2['code'])throw _0x327dd2;}function wt(_0x1db815){if((_0x457822=_0x1db815)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x457822['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x457822['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x457822;throw _0x1db815;}function nt(_0x2675e9){return{'threadId':_0x2675e9['commentThreadId'],'commentId':_0x2675e9['commentId'],'content':_0x2675e9['content'],'createdAt':_0x2675e9['createdAt'],'authorId':_0x2675e9['userId'],'attributes':_0x2675e9['attributes']||{}};}class g extends _0x376faf{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
+ ((()=>at)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x48c614){super(_0x48c614);const _0x26aa0f=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x26aa0f);}['init'](){const _0x1d0828=this['editor']['plugins']['get'](c),_0x15dab7=this['editor']['plugins']['get']('TrackChangesEditing');return _0x15dab7['adapter']={'getSuggestion':async _0x5ab9ea=>{await this['_waitForServiceReady']();const _0x1b8899=await this['_trackChangesService']['get'](_0x5ab9ea)['catch'](ot);return await this['_fetchMissingUsersForThreads']([_0x1b8899]),_0x1b8899;},'addSuggestion':async({id:_0x426bea,type:_0x365cba,data:_0x546ec5,originalSuggestionId:_0x4df1d9,attributes:_0x573ca0})=>{await this['_waitForServiceReady']();const _0x53a8da={'id':_0x426bea,'type':_0x365cba,'data':_0x546ec5,'originalSuggestionId':_0x4df1d9,'attributes':_0x573ca0},_0x4a15bf=await this['_trackChangesService']['add'](_0x426bea,_0x365cba,_0x546ec5,_0x4df1d9,_0x573ca0)['catch'](_0x433498=>{if(gt(_0x433498))return new Promise(_0x43299d=>{this['_bufferedRequests']['set'](_0x426bea,{'resolve':_0x43299d,'suggestionData':_0x53a8da});});throw _0x433498;});return this['_bufferedRequests']['delete'](_0x426bea),_0x4a15bf;},'updateSuggestion':async(_0x5797f5,_0x29b5be)=>{if(await this['_waitForServiceReady'](),'open'!==_0x29b5be['state'])return this['_trackChangesService']['update'](_0x5797f5,_0x29b5be)['catch'](ot);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x3f027d,_0x43dd52)=>{_0x15dab7['hasSuggestion'](_0x43dd52['id'])&&(_0x15dab7['getSuggestion'](_0x43dd52['id'])['attributes']=_0x43dd52['attributes']);}),this['_trackChangesService']['connect'](_0x1d0828['connection'])['then'](_0x3b807e=>(_0x1d0828['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x3b807e)['then'](()=>{for(const _0x2b2e6c of _0x3b807e){_0x15dab7['addSuggestionData'](_0x2b2e6c)['_saved']=!0x0;}})));}async['reconnect'](){const _0x49d7c3=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x52232e}=this['editor']['plugins']['get'](c),_0x16dbda=await this['_trackChangesService']['connect'](_0x52232e);await this['_fetchMissingUsersForThreads'](_0x16dbda);for(const {suggestionData:_0xd2ffb6,resolve:_0x34a8d7}of this['_bufferedRequests']['values']()){let _0x439837=_0x16dbda['find'](_0x45c8a9=>_0x45c8a9['id']===_0xd2ffb6['id']);_0x439837||(_0x439837=await this['_trackChangesService']['add'](_0xd2ffb6['id'],_0xd2ffb6['type'],_0xd2ffb6['data'],_0xd2ffb6['originalSuggestionId'])),_0x34a8d7(_0x439837);}for(const _0x49cdcd of _0x16dbda)_0x49d7c3['hasSuggestion'](_0x49cdcd['id'])||_0x49d7c3['addSuggestionData'](_0x49cdcd);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x5a90d9=>{this['listenTo'](this['_trackChangesService'],'connected',_0x2602f3=>{_0x2602f3['off'](),_0x5a90d9();});});}async['_fetchMissingUsersForThreads'](_0x438ff8){const _0x17fe6a=this['editor']['plugins']['get'](_0x4cfeb8),{connection:_0x431932}=this['editor']['plugins']['get'](c),_0x512f73=new Set();for(const {authorId:_0x4dc7ba}of _0x438ff8)_0x17fe6a['getUser'](_0x4dc7ba)||_0x512f73['add'](_0x4dc7ba);if(0x0===_0x512f73['size'])return;const _0x47273a=await mt['getMany'](_0x431932,Array['from'](_0x512f73));for(const _0x2431cd of _0x47273a)_0x17fe6a['getUser'](_0x2431cd['id'])||_0x17fe6a['addUser'](_0x2431cd);}}function ot(_0x48e573){if(gt(_0x48e573))return new Promise(()=>{});throw _0x48e573;}function gt(_0x412ff5){return _0x412ff5['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x412ff5['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x376faf{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x533779=this['editor']['plugins']['get'](c),_0x496b9a=this['editor']['plugins']['get']('CommentsEditing'),_0x563f36=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x533779,'change:state',(_0x43b646,_0x5bac7c,_0x3bd38b)=>{_0x496b9a['isThreadsLoadingPaused']='connected'!==_0x3bd38b;});}),this['listenTo'](_0x533779,'change:state',(_0x6ab3f3,_0x5d9092,_0x148ba9)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x148ba9);}),_0x563f36['_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 _0x376faf{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x376faf{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
+ ((()=>st)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x4cfeb8];}constructor(_0x4dc208){super(_0x4dc208);const _0x4bb0b4=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x4bb0b4);}async['init'](){const _0x2cd421=this['editor']['plugins']['get'](l),_0x184ce5=_0x2cd421['serverHistory'],_0x4d134e=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x184ce5,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x2cd421['sessionId']});const _0x598eae=this['editor']['config']['get']('cloudServices.bundleVersion')||ht,_0xdcee39=await it['isBundleUploaded'](_0x4d134e['connection'],_0x598eae);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x317071})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x317071)),'updateRevisions':async _0x18d01b=>{await this['_waitForServiceReady']();const _0x3d502f=this['_revisionTracker']['currentRevision'];if(_0xdcee39&&0x1===_0x18d01b['length']&&_0x18d01b[0x0]['id']===_0x3d502f['id'])return _0x18d01b;for(const _0x49ef94 of _0x18d01b)_0x49ef94['id']===_0x3d502f['id']&&(_0x49ef94['isEmptyCurrent']=_0x49ef94['fromVersion']===_0x49ef94['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x18d01b,this['_lastRequestId'])['then'](_0x4a9ec3=>(this['_lastRequestId']=_0x4a9ec3,_0x18d01b))['catch'](_0x59ef2b=>{if(rt(_0x59ef2b)||'400'===_0x59ef2b['code']&&void 0x0!==_0x59ef2b['data']['wrongRequestId']){for(const _0x48eabb of _0x18d01b){!this['_revisionTracker']['repository']['getRevision'](_0x48eabb['id'])||this['_revisionTracker']['_bufferUpdate'](_0x48eabb['id'],_0x48eabb,!0x1);}if(rt(_0x59ef2b))throw _0x59ef2b;return _0x18d01b;}throw _0x59ef2b;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x3ba5f9,{revisionsData:_0xbcf3dc,requestId:_0x42f7b8})=>{Math['max'](..._0xbcf3dc['map'](_0x5ec05a=>_0x5ec05a['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0xbcf3dc,_0x42f7b8);}):this['_handleRevisionsUpdate'](_0xbcf3dc,_0x42f7b8);});const {revisions:_0x2db3ef,requestId:_0xfa8de4}=await this['_revisionHistoryService']['connect'](_0x4d134e['connection']);_0x4d134e['addToReconnectionStack'](this),this['_lastRequestId']=_0xfa8de4,await this['_fetchMissingUsers'](_0x2db3ef);for(const _0x54cc6a of _0x2db3ef)this['_revisionTracker']['addRevisionData'](_0x54cc6a);this['listenTo'](_0x2cd421,'change:_isConnected',(_0x46ed67,_0x36ca19,_0x466984)=>{_0x466984&&(this['_oldOffset']=_0x2cd421['_offset'],_0x46ed67['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x4d134e,'state',_0x28b186=>_0x28b186===_0x34e6a4['CONNECTED']);}async['reconnect'](){const _0x31eb2f=this['editor']['plugins']['get'](c),_0x4cb588=this['editor']['plugins']['get'](l),_0xf8993d=async()=>{const _0x268033=this['_revisionTracker']['currentRevision'],_0x145d7a=_0x268033['id'],_0x17f9b2=_0x145d7a!==_0x4cb588['sessionId'];if(_0x17f9b2){const _0x4d048d=_0x4cb588['_offset']-this['_oldOffset'],_0x16c16c=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x268033['toVersion']+_0x4d048d!==_0x16c16c){const _0x2f7006=_0x268033['fromVersion']+_0x4d048d,_0x22fd07=this['editor']['plugins']['get'](_0x4cfeb8),_0x2460b3=this['_revisionTracker']['buildRevisionData']({'revision':_0x268033,'from':_0x2f7006,'to':_0x16c16c});_0x2460b3['id']=_0x268033['id'];const _0x575391=_0x2460b3['authorsIds']['map'](_0x52aa52=>_0x22fd07['getUser'](_0x52aa52));_0x268033['_update']({..._0x2460b3,'authors':_0x575391},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x268033['id'],_0x2460b3,!0x0);}this['_revisionTracker']['_startingVersion']=_0x16c16c,(_0x268033['toVersion']===_0x268033['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x145d7a)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x145d7a),this['_revisionTracker']['_createCurrentRevision'](_0x16c16c));}const {revisions:_0x2e5f3a,requestId:_0x6c6c66}=await this['_revisionHistoryService']['reconnect'](_0x31eb2f['connection'],this['_lastRequestId']);_0x17f9b2&&_0x2e5f3a['length']>0x0?_0x4cb588['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x2e5f3a),this['_handleRevisionsUpdate'](_0x2e5f3a,_0x6c6c66),this['_revisionTracker']['sendBufferedUpdates']());};return _0x4cb588['_isConnected']?_0xf8993d():new Promise((_0xc3cf29,_0x2647d1)=>{_0x4cb588['once']('change:_isConnected',()=>{_0xf8993d()['then'](_0xc3cf29)['catch'](_0x2647d1);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x4ba9c4=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x2db16b=>{_0x2db16b['off'](),_0x4ba9c4();});});}['_getLatestVersionFromServerOperations'](){const _0x2ff770=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x2acfec of _0x2ff770)if('marker'!==_0x2acfec['type']||_0x2acfec['affectsData'])return _0x2acfec['baseVersion']+0x1;}['_getLatestVersion'](){const _0x1df283=this['editor']['plugins']['get'](l);return new Promise(_0x432332=>{_0x1df283['_isPendingUpdate']?_0x1df283['once']('change:_isPendingUpdate',()=>{_0x432332(this['_getLatestVersionFromServerOperations']());}):_0x432332(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x4d5940,_0x331a1f){const _0xf68020=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x331a1f;for(const _0x511711 of _0x4d5940){const _0x2113fd=_0xf68020['getRevision'](_0x511711['id']);if(_0x2113fd){if((_0x511711['fromVersion']||_0x511711['toVersion'])&&(_0x511711['diffData']=null),_0x2113fd===this['_revisionTracker']['currentRevision']){const _0x3fb6da=Math['max'](_0x2113fd['toVersion'],_0x511711['toVersion']),_0x16a2bd=Math['max'](_0x2113fd['fromVersion'],_0x511711['fromVersion']);let _0x29b81c;_0x2113fd['toVersion']===_0x511711['toVersion']&&_0x2113fd['fromVersion']===_0x511711['fromVersion']?(_0x29b81c=!0x0,this['_preventResendingRevisionData'](_0x511711)):_0x511711['toVersion']===_0x3fb6da&&_0x511711['fromVersion']===_0x16a2bd?_0x29b81c=!0x1:(_0x2113fd['toVersion']===_0x3fb6da&&_0x2113fd['fromVersion']===_0x16a2bd||this['_fixRevision']({'revision':_0x2113fd,'from':_0x16a2bd,'to':_0x3fb6da}),_0x29b81c=!0x0),_0x29b81c&&(delete _0x511711['fromVersion'],delete _0x511711['toVersion'],delete _0x511711['diffData'],delete _0x511711['createdAt'],delete _0x511711['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x511711),this['_preventResendingRevisionData'](_0x511711);}else this['_revisionTracker']['addRevisionData'](_0x511711);}const _0x4f4592=_0xf68020['getRevisions']();_0x4f4592['reverse']();for(let _0x36b529=0x0;_0x36b529<_0x4f4592['length']-0x1;_0x36b529++){const _0x105344=_0x4f4592[_0x36b529],_0x23903b=_0x4f4592[_0x36b529+0x1];if(_0x105344['fromVersion']<_0x23903b['toVersion']){const _0x442f2e=_0x23903b['toVersion'],_0x5a2d42=Math['max'](_0x442f2e,_0x105344['toVersion']);this['_fixRevision']({'revision':_0x105344,'from':_0x442f2e,'to':_0x5a2d42});}}}['_fixRevision']({revision:_0x14c44a,from:_0x16ec8b,to:_0x544d67}={}){const _0x48f211=this['editor']['plugins']['get'](_0x4cfeb8),_0x4bb566=this['_revisionTracker']['buildRevisionData']({'revision':_0x14c44a,'from':_0x16ec8b,'to':_0x544d67});_0x4bb566['authors']=_0x4bb566['authorsIds']['map'](_0x2c57d8=>_0x48f211['getUser'](_0x2c57d8)),_0x14c44a['_update'](_0x4bb566);}['_preventResendingRevisionData'](_0x4713f6){const _0x425fd4={};_0x425fd4['id']=_0x4713f6['id'];for(const _0x200214 of Object['keys'](_0x4713f6))'id'!==_0x200214&&(_0x425fd4[_0x200214]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x425fd4['id'],_0x425fd4,!0x0);}async['_fetchMissingUsers'](_0x2b9511){const _0x439bdd=this['editor']['plugins']['get'](_0x4cfeb8),{connection:_0x57c1b6}=this['editor']['plugins']['get'](c),_0x11b938=new Set();for(const _0x3adbaa of _0x2b9511){for(const _0x4d9324 of _0x3adbaa['authorsIds'])_0x22b621(_0x4d9324);_0x3adbaa['creatorId']&&_0x22b621(_0x3adbaa['creatorId']);}if(0x0===_0x11b938['size'])return;const _0x117506=await mt['getMany'](_0x57c1b6,Array['from'](_0x11b938));for(const _0x5d3aaf of _0x117506)_0x439bdd['getUser'](_0x5d3aaf['id'])||_0x439bdd['addUser'](_0x5d3aaf);function _0x22b621(_0x54fba3){_0x439bdd['getUser'](_0x54fba3)||_0x11b938['add'](_0x54fba3);}}}function rt(_0x27e7dc){return _0x27e7dc['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x27e7dc['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x27e7dc['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x376faf{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x32bc9a{constructor(_0x89c00b){super(_0x89c00b);const _0x5da0d8=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x5da0d8['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x5da0d8['to']('usersCount',_0x490310=>B(_0x89c00b,'CONNECTED_USERS',_0x490310))}]});}}class es extends _0x32bc9a{['items'];['keystrokes'];constructor(_0x2ca9af){super(_0x2ca9af);const _0x5bce8b=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x2d38fb(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x5bce8b['if']('hasPopup'),'aria-expanded':_0x5bce8b['to']('isExpanded',_0x382748=>this['hasPopup']&&String(_0x382748)),'aria-label':_0x5bce8b['to']('hasPopup',_0x5b88d1=>B(_0x2ca9af,_0x5b88d1?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x5bce8b['to']('hasPopup',_0x1ce2ed=>!!_0x1ce2ed&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x5bce8b['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x54a253,_0x4970ea,_0x42c382)=>{this['element']&&(_0x42c382?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 _0x32bc9a{['counterView'];['inlineListView'];constructor(_0x30aa31){super(_0x30aa31);const _0xe89b2e=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x30aa31),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x523637 of this['inlineListView']['items'])_0x523637['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',_0xe89b2e['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x32bc9a{['listWrapperView'];constructor(_0x4e9f97,_0x56f6c2){super(_0x4e9f97),this['listWrapperView']=new vt(_0x4e9f97,_0x56f6c2),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':B(_0x4e9f97,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class vt extends _0x27fe99{constructor(_0x1abaf4,_0x5e8ce9){super(_0x1abaf4);const _0x486ed9=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x5e8ce9?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x486ed9['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x486ed9['to']('role'),'aria-label':_0x486ed9['to']('ariaLabel'),'aria-labelledby':_0x486ed9['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x1420b4['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x1a5bd0=this['element'];_0x1a5bd0&&(this['_isScrollable']=Math['max'](_0x1a5bd0['scrollHeight'],_0x1a5bd0['clientHeight'])>0.8*window['innerHeight']);}}class k extends ct{['userView'];constructor(_0x2dde89,_0x4bf5a7,_0x2d2345){super(_0x2dde89);const _0x1572dd=this['bindTemplate'];this['userView']=new lt(_0x2dde89,_0x4bf5a7);const _0x70e15b={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x4bf5a7['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x4bf5a7['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x4bf5a7['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x2d2345&&(_0x70e15b['tag']='button',_0x70e15b['on']={'click':_0x1572dd['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x70e15b);}['focus'](){this['element']['focus']();}}class y extends _0x32bc9a{['userView'];['markerView'];constructor(_0x7961bc,_0x3b460b,_0x46b2c4){super(_0x7961bc);const _0x4f6ad5=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new lt(_0x7961bc,_0x3b460b),this['markerView']=new dt(_0x7961bc,_0x3b460b);const _0x4f5994=new pt(_0x7961bc);_0x4f5994['template']['tag']='span',_0x4f5994['text']=_0x3b460b['name'];const _0xac13d4={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x4f6ad5['to']('isFocusable',_0x228600=>!!_0x228600&&0x0),'aria-labelledby':_0x4f5994['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x4f6ad5['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x4f6ad5['to']('hasTooltip',_0x122fb0=>!_0x122fb0),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x4f5994]};_0x46b2c4&&(_0xac13d4['tag']='button',_0xac13d4['on']={'click':_0x4f6ad5['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0xac13d4);}}class dt extends _0x32bc9a{constructor(_0x4b5afc,_0x19a293){super(_0x4b5afc),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x19a293['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x18fa55{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x3881a1){super(_0x3881a1),this['context']['config']['define']('presenceList',A);const _0x495302=_0x3881a1['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x495302)throw new _0x227598('presencelist-collapseat-invalid-format',this);if(_0x495302<0x1)throw new _0x227598('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x524897(),this['balloonPanelView']=new _0x332647(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x26aa60 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x26aa60);this['listenTo'](this['_allConnectedUsers'],'add',(_0x8e62bd,_0x4b3767)=>{this['_handleUserAdd'](_0x4b3767);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x2899b8,_0x15c9db)=>{this['_handleUserRemove'](_0x15c9db);});}['_createView'](){const _0x33700d=this['context'],_0x232f36=new L(this['context']['locale']),_0x503ada=this['balloonPanelView'];if(!_0x348b04(_0x33700d['config']['get']('presenceList.container')))throw new _0x227598('presencelist-missing-container',this);return _0x232f36['counterView']['bind']('usersCount')['to'](this),_0x232f36['bind']('isCollapsed')['to'](this,'usersCount',_0x33fe66=>{const {collapseAt:_0x3b88d7,displayMe:_0x26d3b8}=_0x33700d['config']['get']('presenceList'),_0xdde116=_0x33fe66>=_0x3b88d7;return _0x232f36['counterView']['isHidden']=!(0x1==_0x33fe66&&_0x26d3b8||_0xdde116),_0xdde116||this['hideDropdown'](),_0xdde116;}),_0x232f36['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x251a15=>{const _0x12acb8=_0x33700d['config']['get']('presenceList'),_0x37d48a=new y(_0x33700d['locale'],_0x251a15,!!_0x12acb8['onClick']);return _0x37d48a['bind']('hasTooltip')['to'](_0x232f36,'isCollapsed',_0x46f4f3=>!_0x46f4f3),_0x37d48a['bind']('isFocusable')['to'](_0x232f36,'isCollapsed',_0x4e4b2b=>!_0x4e4b2b),_0x12acb8['onClick']&&this['listenTo'](_0x37d48a,'execute',()=>{this['view']['isCollapsed']||_0x12acb8['onClick'](_0x251a15,_0x37d48a['element']);}),_0x37d48a;}),this['listenTo'](_0x232f36['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x232f36['inlineListView']['keystrokes']['set']('Enter',(_0x11ef0f,_0x1ca7f5)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x1ca7f5());}),_0x232f36['render'](),_0x503ada['render'](),_0x161e77({'emitter':_0x232f36,'activator':()=>_0x503ada['isVisible'],'contextElements':[_0x503ada['element'],_0x232f36['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x33700d['config']['get']('presenceList.container')['appendChild'](_0x232f36['element']),this['_bodyCollection']=new _0x37367f(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x232f36;}['_handleUserAdd'](_0x2c95e3){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x2c95e3['isMe'])return;const _0x377180=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x377180&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x3dee08=_0x2c95e3['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x2c95e3,_0x3dee08);}['_handleUserRemove'](_0x5b55e6){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x5b55e6['id'])&&(this['currentDisplayedUsers']['remove'](_0x5b55e6['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x1a8538 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x1a8538['id']))return void this['currentDisplayedUsers']['add'](_0x1a8538,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x3259ce=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x3259ce['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x20fe2b}=this['presenceDropdownView'];_0x20fe2b['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x44cb3a=>{if(!_0x3259ce['displayMe']&&_0x44cb3a['isMe'])return null;const _0x2509be=new k(this['context']['locale'],_0x44cb3a,!!_0x3259ce['onClick']);return _0x3259ce['onClick']&&this['listenTo'](_0x2509be,'execute',()=>{_0x3259ce['onClick'](_0x44cb3a,_0x2509be['element']);}),_0x2509be;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x20fe2b['focus'](),_0x20fe2b['checkIfScrollable']();const _0x40b742=(_0x154efb,_0x245b12)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x245b12();};_0x20fe2b['keystrokes']['set']('Esc',_0x40b742),_0x20fe2b['keystrokes']['set']('Shift+Tab',_0x40b742),_0x20fe2b['keystrokes']['set']('Tab',(_0x2aef93,_0x2e6fa3)=>{!function(_0xfc2e1b){const _0x33bb23=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0xf8d951=>_0xf8d951+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x450f5d=[...document['body']['querySelectorAll'](_0x33bb23)]['filter'](_0x1fafce=>_0x1fafce===document['activeElement']||_0x1fafce['offsetWidth']+_0x1fafce['offsetHeight']>0x0)['sort']((_0x4a4e25,_0x518728)=>(_0x4a4e25['tabIndex']||0x0)-(_0x518728['tabIndex']||0x0)),_0x2d6ccd=_0x450f5d['indexOf'](_0xfc2e1b),_0x9e6fb0=_0x450f5d[(_0x2d6ccd+0x1)%_0x450f5d['length']];_0x9e6fb0&&_0x9e6fb0['focus']();}(this['view']['element']),this['hideDropdown'](),_0x2e6fa3();}),_0x20fe2b['focusTracker']['add'](this['view']['element']),_0x20fe2b['focusTracker']['on']('change:isFocused',(_0x45d980,_0x551523,_0x3abf8c)=>{_0x3abf8c||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 _0x18fa55{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':_0x3f14f=>0x0==_0x3f14f?0x0:0x1==_0x3f14f?0x1:0x2==_0x3f14f?0x2:_0x3f14f%0x64>=0x3&&_0x3f14f%0x64<=0xa?0x3:_0x3f14f%0x64>=0xb&&_0x3f14f%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':_0x1d7132=>0x0==_0x1d7132?0x0:0x1==_0x1d7132?0x1:0x2==_0x1d7132?0x2:_0x1d7132%0x64>=0x3&&_0x1d7132%0x64<=0xa?0x3:_0x1d7132%0x64>=0xb&&_0x1d7132%0x64<=0x63?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x8f1bdb=>{const {ar:{dictionary:_0x5b5cc6,getPluralForm:_0x1c607f}}={'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':_0x30a2c8=>0x0==_0x30a2c8?0x0:0x1==_0x30a2c8?0x1:0x2==_0x30a2c8?0x2:_0x30a2c8%0x64>=0x3&&_0x30a2c8%0x64<=0xa?0x3:_0x30a2c8%0x64>=0xb&&_0x30a2c8%0x64<=0x63?0x4:0x5}};_0x8f1bdb['ar']||={'dictionary':{},'getPluralForm':null},_0x8f1bdb['ar']['dictionary']=Object['assign'](_0x8f1bdb['ar']['dictionary'],_0x5b5cc6),_0x8f1bdb['ar']['getPluralForm']=_0x1c607f;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x472dce=>{const {ar:{dictionary:_0x424dbb,getPluralForm:_0x29ddac}}={'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':_0x1e2367=>0x0==_0x1e2367?0x0:0x1==_0x1e2367?0x1:0x2==_0x1e2367?0x2:_0x1e2367%0x64>=0x3&&_0x1e2367%0x64<=0xa?0x3:_0x1e2367%0x64>=0xb&&_0x1e2367%0x64<=0x63?0x4:0x5}};_0x472dce['ar']||={'dictionary':{},'getPluralForm':null},_0x472dce['ar']['dictionary']=Object['assign'](_0x472dce['ar']['dictionary'],_0x424dbb),_0x472dce['ar']['getPluralForm']=_0x29ddac;})(window['CKEDITOR_TRANSLATIONS']||={});