@ckeditor/ckeditor5-track-changes 33.0.0 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/build/track-changes.js +1 -1
- package/build/translations/az.js +1 -0
- package/build/translations/cs.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/id.js +1 -0
- package/build/translations/sk.js +1 -1
- package/lang/translations/az.po +387 -0
- package/lang/translations/cs.po +28 -28
- package/lang/translations/en-au.po +5 -5
- package/lang/translations/gl.po +3 -3
- package/lang/translations/hr.po +13 -13
- package/lang/translations/id.po +370 -0
- package/lang/translations/sk.po +57 -57
- package/package.json +3 -3
- package/src/commands/acceptallsuggestionscommand.js +1 -1
- package/src/commands/acceptselectedsuggestionscommand.js +1 -1
- package/src/commands/acceptsuggestioncommand.js +1 -1
- package/src/commands/discardallsuggestionscommand.js +1 -1
- package/src/commands/discardselectedsuggestionscommand.js +1 -1
- package/src/commands/discardsuggestioncommand.js +1 -1
- package/src/commands/trackchangescommand.js +1 -1
- package/src/integrations/alignment.js +1 -1
- package/src/integrations/basicstyles.js +1 -1
- package/src/integrations/blockquote.js +1 -1
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/comments.js +1 -1
- package/src/integrations/deletecommand.js +1 -1
- package/src/integrations/entercommand.js +1 -1
- package/src/integrations/font.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/highlight.js +1 -1
- package/src/integrations/horizontalline.js +1 -1
- package/src/integrations/image.js +1 -1
- package/src/integrations/indent.js +1 -1
- package/src/integrations/inputcommand.js +1 -1
- package/src/integrations/link.js +1 -1
- package/src/integrations/list.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/mention.js +1 -1
- package/src/integrations/pagebreak.js +1 -1
- package/src/integrations/paragraph.js +1 -1
- package/src/integrations/removeformat.js +1 -1
- package/src/integrations/restrictededitingmode.js +1 -1
- package/src/integrations/shiftentercommand.js +1 -1
- package/src/integrations/standardeditingmode.js +1 -1
- package/src/integrations/table.js +1 -1
- package/src/integrations/tableclipboard.js +1 -1
- package/src/integrations/tableheadings.js +1 -1
- package/src/integrations/tablemergesplit.js +1 -1
- package/src/integrations/title.js +1 -1
- package/src/integrations/undo.js +1 -1
- package/src/integrations/utils.js +1 -1
- package/src/suggestion.js +1 -1
- package/src/suggestiondescriptionfactory.js +1 -1
- package/src/trackchanges.js +1 -1
- package/src/trackchangesdata.js +1 -1
- package/src/trackchangesediting.js +1 -1
- package/src/trackchangesui.js +1 -1
- package/src/ui/suggestioncontroller.js +1 -1
- package/src/ui/view/basesuggestionthreadview.js +1 -1
- package/src/ui/view/suggestionthreadview.js +1 -1
- package/src/utils/getselectedsuggestions.js +1 -1
- package/src/utils/hashobject.js +1 -1
- package/src/utils/normalizedescription.js +1 -1
- package/src/utils/sortsuggestions.js +1 -1
- package/theme/integrations/horizontalline.css +0 -15
- package/theme/integrations/image.css +0 -55
- package/theme/integrations/mediaembed.css +0 -19
- package/theme/integrations/pagebreak.css +0 -15
- package/theme/integrations/table.css +0 -147
- package/theme/suggestion.css +0 -87
- package/theme/suggestionmarker.css +0 -161
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x31e4a5,PendingActions as _0x1a7bc1}from'ckeditor5/src/core';import{LiveRange as _0x5cdb}from'ckeditor5/src/engine';import{CKEditorError as _0x3a6ec5,uid as _0xd9a6f1,priorities as _0x2fbfb7,EmitterMixin as _0x16d268,mix as _0x5d0173}from'ckeditor5/src/utils';import{toWidget as _0xcbf382}from'ckeditor5/src/widget';import{Users as _0x518140}from'ckeditor5-collaboration/src/collaboration-core';import _0x432ef2 from'./commands/trackchangescommand';import _0x1f0bf4 from'./commands/acceptsuggestioncommand';import _0x53071d from'./commands/discardsuggestioncommand';import _0x240242 from'./commands/acceptallsuggestionscommand';import _0x40b5e6 from'./commands/acceptselectedsuggestionscommand';import _0x71b4e4 from'./commands/discardallsuggestionscommand';import _0x22cf8f from'./commands/discardselectedsuggestionscommand';import _0x11fe95 from'./suggestion';import _0x29a674 from'./suggestiondescriptionfactory';import'../theme/suggestion.css';import'../theme/suggestionmarker.css';import _0x3dceff from'./integrations/alignment';import _0x291702 from'./integrations/basicstyles';import _0x28b3fe from'./integrations/blockquote';import _0x271903 from'./integrations/codeblock';import _0x4e2d01 from'./integrations/comments';import _0x500745 from'./integrations/deletecommand';import _0x8ab3f5 from'./integrations/entercommand';import _0x5a7cb3 from'./integrations/font';import _0x2ba5a1 from'./integrations/heading';import _0x33c9af from'./integrations/highlight';import _0x1baad9 from'./integrations/horizontalline';import _0x547ccd from'./integrations/image';import _0x150002 from'./integrations/indent';import _0x452183 from'./integrations/inputcommand';import _0x2b1804 from'./integrations/link';import _0x35da6c from'./integrations/list';import _0x26ab64 from'./integrations/mediaembed';import _0x348abe from'./integrations/mention';import _0x16a12c from'./integrations/pagebreak';import tt from'./integrations/paragraph';import it from'./integrations/removeformat';import st from'./integrations/restrictededitingmode';import nt from'./integrations/shiftentercommand';import et from'./integrations/standardeditingmode';import ot from'./integrations/table';import rt from'./integrations/tablemergesplit';import at from'./integrations/tableheadings';import ct from'./integrations/tableclipboard';import ht from'./integrations/title';import ut from'./integrations/undo';import ft from'./utils/hashobject.js';export default class p extends _0x31e4a5{static get['requires'](){return['CommentsRepository',_0x518140,_0x1a7bc1,_0x3dceff,_0x291702,_0x28b3fe,_0x271903,_0x4e2d01,_0x500745,_0x8ab3f5,_0x5a7cb3,_0x2ba5a1,_0x33c9af,_0x1baad9,_0x547ccd,_0x150002,_0x452183,_0x2b1804,_0x35da6c,_0x26ab64,_0x348abe,_0x16a12c,tt,it,st,nt,et,ot,rt,at,ct,ht,ut];}static get['pluginName'](){return'TrackChangesEditing';}constructor(_0x21d8c6){function _0x5e4206(_0x25e45b){return _0x25e45b['map'](_0x57cf12=>String['fromCharCode'](_0x57cf12))['join']('');}super(_0x21d8c6),this['set']('activeMarkers',[]),this['on']('change:activeMarkers',(_0x861532,_0x401045,_0x4bef47,_0x3cf902)=>{this['_model']['change'](()=>{for(const _0x368353 of[..._0x3cf902,..._0x4bef47])this['_model']['markers']['has'](_0x368353)&&_0x21d8c6['editing']['reconvertMarker'](_0x368353);});}),this['_descriptionFactory']=new _0x29a674(this['editor']['model']['schema'],this['editor']['locale']),this['_adapter']=null,this['_suggestionFactory']=new gt(this['editor']),this['_suggestions']=new Map(),this['_commentsRepository']=_0x21d8c6['plugins']['get']('CommentsRepository'),this['_enabledCommands']=new Set(),this['_model']=this['editor']['model'],this['_suggestionState']=new WeakMap(),this['_isForcedDefaultExecutionBlock']=!0x1,this[_0x5e4206([0x5f,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x69,0x6f,0x6e])]=_0x5e4206([0x34,0x30,0x34,0x34,0x30,0x36,0x31,0x38]);}['init'](){const _0x2ccde8=this['editor'];_0x2ccde8['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':_0x44f237=>{const {id:_0x13274e,type:_0x45fb7d}=this['_splitMarkerName'](_0x44f237['markerName']),_0x2466a2=['ck-suggestion-marker','ck-suggestion-marker-'+_0x45fb7d];let _0x534524=0xbb8;return this['activeMarkers']['includes'](_0x44f237['markerName'])&&(_0x2466a2['push']('ck-suggestion-marker--active'),_0x534524=0xbc2),'deletion'==_0x45fb7d&&(_0x534524+=0x5),{'classes':_0x2466a2,'attributes':{'data-suggestion':_0x13274e},'priority':_0x534524};}}),_0x2ccde8['conversion']['for']('dataDowncast')['add'](_0x6e3d29=>{_0x6e3d29['on']('addMarker:suggestion',(_0x8aa05b,_0x514a34,_0x270186)=>{if(!_0x270186['options']['showSuggestionHighlights'])return;const _0x4d6ecf=_0x514a34['item'];if(!_0x4d6ecf)return;const _0x7fa20a=_0x270186['mapper']['toViewElement'](_0x4d6ecf);_0x2ccde8['model']['schema']['isObject'](_0x4d6ecf)&&_0x7fa20a&&!_0x7fa20a['getCustomProperty']('widget')&&_0x7fa20a['is']('containerElement')&&_0xcbf382(_0x7fa20a,_0x270186['writer']);},{'priority':'high'});}),_0x2ccde8['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x517e89,_0x1d7976)=>{if(!_0x1d7976['options']['showSuggestionHighlights'])return null;const {type:_0xb48810}=this['_splitMarkerName'](_0x517e89['markerName']);return{'classes':['ck-suggestion-marker','ck-suggestion-marker-'+_0xb48810],'priority':0xbb8};}});const _0x20d39b=({showActiveMarkers:_0x146056=!0x0}={})=>(_0x145951,_0x268d21,_0x378f78)=>{if(!_0x268d21['item'])return;if(_0x268d21['item']['is']('selection'))return void _0x378f78['consumable']['consume'](_0x268d21['item'],_0x145951['name']);const _0x100822=_0x378f78['mapper']['toViewElement'](_0x268d21['item']);if(!(_0x268d21['item']['is']('element')&&_0x2ccde8['model']['schema']['isBlock'](_0x268d21['item'])&&!_0x100822['getCustomProperty']('addHighlight')))return;const {id:_0x505d30}=this['_splitMarkerName'](_0x268d21['markerName']);_0x378f78['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0x100822),_0x378f78['writer']['setAttribute']('data-suggestion',_0x505d30,_0x100822),_0x378f78['mapper']['bindElementToMarker'](_0x100822,_0x268d21['markerName']),_0x146056&&(this['activeMarkers']['includes'](_0x268d21['markerName'])?_0x378f78['writer']['addClass']('ck-suggestion-marker--active',_0x100822):_0x378f78['writer']['removeClass']('ck-suggestion-marker--active',_0x100822));for(const _0x1e4c98 of _0x2ccde8['model']['createRangeIn'](_0x268d21['item'])['getItems']())_0x378f78['consumable']['consume'](_0x1e4c98,_0x145951['name']);_0x378f78['consumable']['consume'](_0x268d21['item'],_0x145951['name']);};_0x2ccde8['conversion']['for']('dataDowncast')['add'](_0x2943e9=>{_0x2943e9['on']('addMarker:suggestion:formatBlock',(_0x4647a3,_0x54259e,_0x24a220)=>{_0x24a220['options']['showSuggestionHighlights']&&_0x20d39b({'showActiveMarkers':!0x1})(_0x4647a3,_0x54259e,_0x24a220);},{'priority':'highest'});}),_0x2ccde8['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x1e368e,_0x181faa)=>_0x181faa['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0x1e368e['substr']('suggestion'['length']+0x1)}}),_0x2ccde8['conversion']['for']('upcast')['elementToElement']({'view':{'name':'suggestion','attribute':{'id':/^\w/,'suggestionType':/^\w/}},'model':(_0x41f62e,{writer:_0x18383a})=>{let _0x31daf9='suggestion:'+_0x41f62e['getAttribute']('suggestion-type')+':'+_0x41f62e['getAttribute']('id');return _0x41f62e['getAttribute']('marker-count')&&(_0x31daf9+=':'+_0x41f62e['getAttribute']('marker-count')),_0x18383a['createElement']('$marker',{'data-name':_0x31daf9});}}),_0x2ccde8['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion'}),_0x2ccde8['conversion']['for']('editingDowncast')['add'](_0x262bc0=>{_0x262bc0['on']('addMarker:suggestion:formatBlock',_0x20d39b(),{'priority':'high'});}),_0x2ccde8['conversion']['for']('editingDowncast')['add'](_0x3f7319=>{_0x3f7319['on']('removeMarker:suggestion:formatBlock',(_0x32bed8,_0x69a0f5,_0x335fe7)=>{const _0x23f62=_0x335fe7['mapper']['markerNameToElements'](_0x69a0f5['markerName']);if(_0x23f62)for(const _0x2a2c55 of _0x23f62)_0x2a2c55['getCustomProperty']('addHighlight')||(_0x335fe7['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x2a2c55),_0x335fe7['writer']['removeAttribute']('data-suggestion',_0x2a2c55),_0x335fe7['mapper']['unbindElementFromMarkerName'](_0x2a2c55,_0x69a0f5['markerName']));},{'priority':'high'});}),_0x2ccde8['model']['document']['registerPostFixer'](_0x2b4e72=>{let _0x10a7fc=!0x1;const _0xba03a4=Array['from'](_0x2ccde8['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x8c7df3,data:_0x1a304e}of _0xba03a4){const {group:_0x44b8ab,type:_0x432b75,id:_0x44456b}=this['_splitMarkerName'](_0x8c7df3);if('suggestion'!==_0x44b8ab)continue;const _0x402a36=this['_suggestions']['get'](_0x44456b);if(null!=_0x1a304e['newRange']){'formatInline'==_0x432b75&&(_0x10a7fc=_0x10a7fc||mt(_0x1a304e['newRange'],_0x8c7df3,_0x2b4e72,_0x2ccde8['model']['schema']));if(_0x1a304e['newRange']['isCollapsed']||'$graveyard'==_0x1a304e['newRange']['root']['rootName']||'formatBlock'==_0x432b75&&!kt(_0x1a304e['newRange'])||'deletion'==_0x432b75&&!(!dt(_0xad3994=_0x1a304e['newRange'])&&!function(_0x3c3785){return _0x3c3785['start']['parent']==_0x3c3785['end']['nodeBefore']&&_0x3c3785['start']['isAtEnd'];}(_0xad3994)))_0x2b4e72['removeMarker'](_0x8c7df3),_0x10a7fc=!0x0;else{if(!_0x402a36||!_0x402a36['isInContent'])continue;_0x10a7fc=!!this['_joinWithAdjacentSuggestions'](_0x402a36)||_0x10a7fc;}}}var _0xad3994;return _0x10a7fc;}),_0x2ccde8['model']['document']['registerPostFixer'](_0x25eba5=>{let _0x26fb0c=!0x1;for(const _0x3ad2c5 of _0x2ccde8['model']['document']['differ']['getChanges']()){if('insert'!=_0x3ad2c5['type'])continue;const _0x18ff50=_0x3ad2c5['position']['getShiftedBy'](_0x3ad2c5['length']);if(_0x18ff50['isAtEnd'])for(const _0x26211c of this['_suggestions']['values']()){if(_0x26211c['isMultiRange']||!_0x26211c['isInContent'])continue;if('formatBlock'!=_0x26211c['type'])continue;const _0x10319b=_0x26211c['getFirstRange']();if(_0x10319b['start']['parent']!=_0x10319b['end']['parent']&&_0x10319b['end']['isEqual'](_0x3ad2c5['position'])){const _0x443536=_0x2ccde8['model']['createRange'](_0x10319b['start'],_0x18ff50);_0x25eba5['updateMarker'](_0x26211c['getFirstMarker'](),{'range':_0x443536}),_0x26fb0c=!0x0;}}}return _0x26fb0c;}),_0x2ccde8['model']['markers']['on']('update:suggestion',(_0x5a9b26,_0x48cd6e,_0x916fde)=>{if(null==_0x916fde){const {id:_0x1e7e14}=this['_splitMarkerName'](_0x48cd6e['name']),_0x17beb3=this['_suggestions']['get'](_0x1e7e14);_0x17beb3&&_0x17beb3['addMarkerName'](_0x48cd6e['name']);}}),_0x2ccde8['model']['document']['on']('change:data',()=>{const _0x5e4733=Array['from'](_0x2ccde8['model']['document']['differ']['getChangedMarkers']());_0x5e4733['sort']((_0x264aa8,_0x20ea25)=>{const _0x2a9070=_0x264aa8['data']['oldRange'],_0x4fed45=_0x20ea25['data']['oldRange'];return null===_0x2a9070&&null===_0x4fed45?0x0:null===_0x2a9070&&null!==_0x4fed45?-0x1:null!==_0x2a9070&&null===_0x4fed45?0x1:_0x2a9070['start']['isBefore'](_0x4fed45['start'])?-0x1:0x1;});const _0x39e3c7=new Set();for(const {name:_0x153f12,data:_0x430fbd}of _0x5e4733){const {group:_0x5eaaa5,id:_0x12b6ff}=this['_splitMarkerName'](_0x153f12);if('suggestion'===_0x5eaaa5&&(null===_0x430fbd['oldRange']&&this['_handleNewSuggestionMarker'](_0x153f12),null===_0x430fbd['newRange'])){const _0x4cdb26=this['_suggestions']['get'](_0x12b6ff);_0x4cdb26['isInContent']?_0x39e3c7['add'](_0x4cdb26):this['_removeSuggestion'](_0x4cdb26);}}for(const {name:_0x1206d2,data:_0x2e44c6}of _0x5e4733){const {group:_0x1dd3b5,id:_0xc87538}=this['_splitMarkerName'](_0x1206d2);if('suggestion'!==_0x1dd3b5)continue;const _0x46e98f=this['_suggestions']['get'](_0xc87538);null!=_0x2e44c6['newRange']&&null!=_0x2e44c6['oldRange']&&(this['_refreshSuggestionsChain'](_0x46e98f),_0x39e3c7['add'](_0x46e98f['head']));}for(const _0x530b29 of _0x39e3c7)this['fire']('suggestionChanged',_0x530b29);_0x39e3c7['clear']();}),_0x2ccde8['model']['on']('applyOperation',(_0x2d4023,_0x47351f)=>{const _0x4372e3=_0x47351f[0x0];if(!this['_suggestions']['size'])return;if(!_0x4372e3['isDocumentOperation'])return;if(_0x4372e3['batch']['isUndo']||!_0x4372e3['batch']['isLocal'])return;let _0x257e84,_0x43afb0;switch(_0x4372e3['type']){case'insert':_0x257e84=_0x2ccde8['model']['createPositionAt'](_0x4372e3['position']),_0x43afb0=_0x257e84['getShiftedBy'](_0x4372e3['howMany']);break;case'split':_0x257e84=_0x2ccde8['model']['createPositionAt'](_0x4372e3['splitPosition']),_0x43afb0=_0x2ccde8['model']['createPositionAt'](_0x4372e3['moveTargetPosition']);break;case'move':_0x257e84=_0x2ccde8['model']['createPositionAt'](_0x4372e3['targetPosition']),_0x43afb0=_0x257e84['getShiftedBy'](_0x4372e3['howMany']);break;default:return;}const _0x821aaf=_0x2ccde8['model']['createRange'](_0x257e84,_0x43afb0);_0x2ccde8['model']['change'](()=>{for(const {suggestion:_0x47175d,meta:_0x52306e}of this['_findSuggestions'](_0x821aaf)){if(_0x47175d['isMultiRange'])continue;if('formatInline'==_0x47175d['type'])continue;const _0x37db70=_0x47175d['data']&&_0x47175d['data']['multipleBlocks'];('formatBlock'!=_0x47175d['type']||'split'==_0x4372e3['type']&&!_0x37db70)&&(_0x52306e['containsRangeInObject']||'insertion'==_0x47175d['type']&&_0x52306e['isOwn']||_0x47175d['getFirstRange']()['containsRange'](_0x821aaf)&&this['_breakSuggestionMarker'](_0x47175d,_0x257e84,_0x43afb0));}});},{'priority':'lowest'}),_0x2ccde8['model']['on']('deleteContent',(_0x5d84be,_0x3f3606)=>{const _0x54085f=_0x3f3606[0x0],_0x381313=_0x3f3606[0x1];if(_0x381313&&_0x381313['forceDefaultExecution'])return;if(this['_isForcedDefaultExecutionBlock'])return;if(!this['trackChangesCommand']['value'])return;if(_0x54085f['isCollapsed'])return;const _0xe8a5c5=_0x2ccde8['model']['schema'],{start:_0x1b00b5,end:_0x2c8200}=_0x54085f['getFirstRange'](),_0x174162=_0x1b00b5['nodeAfter']&&_0xe8a5c5['isObject'](_0x1b00b5['nodeAfter'])?null:_0xe8a5c5['getNearestSelectionRange'](_0x1b00b5,'forward'),_0x2b7ea7=_0x2c8200['nodeBefore']&&_0xe8a5c5['isObject'](_0x2c8200['nodeBefore'])?null:_0xe8a5c5['getNearestSelectionRange'](_0x2c8200,'backward'),_0x3af516=_0x2ccde8['model']['createRange'](_0x174162?_0x174162['start']:_0x1b00b5,_0x2b7ea7?_0x2b7ea7['end']:_0x2c8200);_0x2ccde8['model']['change'](_0x41afb1=>{this['markDeletion'](_0x3af516);const _0x402ffd=_0x2ccde8['model']['schema']['getNearestSelectionRange'](_0x3af516['start']);_0x54085f['is']('documentSelection')?_0x41afb1['setSelection'](_0x402ffd):_0x54085f['setTo'](_0x402ffd);}),_0x5d84be['stop']();},{'priority':_0x2fbfb7['normal']+0xa}),_0x2ccde8['model']['on']('insertContent',(_0x1c77d1,_0x320ccb)=>{const _0x7d28a3=_0x320ccb[_0x320ccb['length']-0x1];_0x7d28a3&&_0x7d28a3['forceDefaultExecution']||this['_isForcedDefaultExecutionBlock']||this['trackChangesCommand']['value']&&(_0x2ccde8['model']['change'](()=>{let _0x352932=_0x2ccde8['model']['insertContent'](_0x320ccb[0x0],_0x320ccb[0x1],_0x320ccb[0x2],_0x320ccb[0x3],{'forceDefaultExecution':!0x0});if(!_0x352932)return;_0x1c77d1['return']=_0x352932['clone']();const _0x5d3d51=_0x352932['end']['nodeBefore'],_0x53c66f=_0x2ccde8['model']['schema'];_0x5d3d51&&_0x53c66f['isBlock'](_0x5d3d51)&&!_0x53c66f['isObject'](_0x5d3d51)&&(_0x352932=_0x2ccde8['model']['createRange'](_0x352932['start'],_0x2ccde8['model']['createPositionAt'](_0x5d3d51,'end'))),this['markInsertion'](_0x352932);}),_0x1c77d1['stop']());},{'priority':'high'}),this['trackChangesCommand']=new _0x432ef2(_0x2ccde8,this['_enabledCommands']),this['editor']['commands']['add']('trackChanges',this['trackChangesCommand']),this['enableCommand']('trackChanges');const _0xc75fcf=new _0x1f0bf4(_0x2ccde8,this['_suggestions']);_0x2ccde8['commands']['add']('acceptSuggestion',_0xc75fcf),this['enableCommand']('acceptSuggestion');const _0x585426=new _0x53071d(_0x2ccde8,this['_suggestions']);_0x2ccde8['commands']['add']('discardSuggestion',_0x585426),this['enableCommand']('discardSuggestion'),_0x2ccde8['commands']['add']('acceptAllSuggestions',new _0x240242(_0x2ccde8,_0xc75fcf,this['_suggestions'])),this['enableCommand']('acceptAllSuggestions'),_0x2ccde8['commands']['add']('discardAllSuggestions',new _0x71b4e4(_0x2ccde8,_0x585426,this['_suggestions'])),this['enableCommand']('discardAllSuggestions'),_0x2ccde8['commands']['add']('acceptSelectedSuggestions',new _0x40b5e6(_0x2ccde8,_0xc75fcf,this['_suggestions'])),this['enableCommand']('acceptSelectedSuggestions'),_0x2ccde8['commands']['add']('discardSelectedSuggestions',new _0x22cf8f(_0x2ccde8,_0x585426,this['_suggestions'])),this['enableCommand']('discardSelectedSuggestions');const _0xc4bdba=_0x2ccde8['plugins']['get']('CommentsRepository');this['listenTo'](_0xc4bdba,'addComment',(_0x511596,{threadId:_0x2a37e4})=>{const _0x43c806=this['_suggestions']['get'](_0x2a37e4);_0x43c806&&_0x43c806['commentThread']&&0x1===_0x43c806['commentThread']['length']&&this['_updateSuggestionData'](_0x2a37e4,{'hasComments':!0x0});},{'priority':'low'}),this['listenTo'](_0xc4bdba,'removeComment',(_0x4e587a,{threadId:_0x32b5b9})=>{const _0x430a83=this['_suggestions']['get'](_0x32b5b9);_0x430a83&&_0x430a83['commentThread']&&!_0x430a83['commentThread']['length']&&this['_updateSuggestionData'](_0x32b5b9,{'hasComments':!0x1});},{'priority':'low'});}set['adapter'](_0x103cfe){if(this['_adapter'])throw new _0x3a6ec5('track-changes-adapter-already-set',this);this['_adapter']=_0x103cfe;}get['adapter'](){return this['_adapter'];}['getSuggestions']({skipNotAttached:_0x2f9225=!0x1,toJSON:_0x1c6012=!0x1}={}){const _0x3fb2e5=[];for(const _0x53546c of this['_suggestions']['values']())_0x2f9225&&!_0x53546c['isInContent']||_0x3fb2e5['push'](_0x53546c);return _0x1c6012?_0x3fb2e5['map'](_0x1c107f=>_0x1c107f['toJSON']()):_0x3fb2e5;}['getSuggestion'](_0x6a535d){const _0x2d54e4=this['_suggestions']['get'](_0x6a535d);if(!_0x2d54e4)throw new _0x3a6ec5('track-changes-suggestion-not-found',this);return _0x2d54e4;}['hasSuggestion'](_0x16edc2){return this['_suggestions']['has'](_0x16edc2);}['addSuggestionData'](_0x1e263b){const {id:_0x12b4ad,authorId:_0x2d8e29}=_0x1e263b,[_0x1ff4e9,_0x160e35]=_0x1e263b['type']['split'](':'),_0x46e1e5=this['_suggestions']['get'](_0x12b4ad)||this['_createSuggestion'](_0x1ff4e9,_0x160e35,_0x12b4ad,_0x2d8e29);switch(this['_addThreadToSuggestion'](_0x46e1e5),this['_checkSuggestionCorrectness'](_0x46e1e5,_0x1ff4e9,_0x160e35||null,_0x2d8e29),_0x46e1e5['createdAt']=_0x1e263b['createdAt'],_0x1e263b['data']&&(_0x46e1e5['data']=_0x1e263b['data']),_0x1e263b['attributes']&&(_0x46e1e5['attributes']=_0x1e263b['attributes']),this['_adapter']&&this['_adapter']['addSuggestion']||(_0x46e1e5['_saved']=!0x0),this['_suggestionState']['get'](_0x46e1e5)){case'notReady':this['_suggestionState']['set'](_0x46e1e5,'dataReady');break;case'markerReady':_0x46e1e5['isInContent']?(this['_suggestionState']['set'](_0x46e1e5,'ready'),this['fire']('suggestionLoaded',_0x46e1e5)):this['_suggestionState']['set'](_0x46e1e5,'removed');}return _0x46e1e5;}['acceptSuggestion'](_0x23ae3c){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0xd780a4 of _0x23ae3c['getAllAdjacentSuggestions']())_0xd780a4['accept']();});});}['discardSuggestion'](_0x45d821){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x28e8af of _0x45d821['getAllAdjacentSuggestions']())_0x28e8af['discard']();});});}['enableCommand'](_0x5e07f2,_0x35768b){const _0x1907b3=this['editor']['commands']['get'](_0x5e07f2);if(!_0x1907b3)throw new _0x3a6ec5('track-changes-command-not-found',this,{'commandName':_0x5e07f2});this['_enabledCommands']['add'](_0x1907b3),_0x35768b&&_0x1907b3['on']('execute',(_0x483cc3,_0x592c06)=>{this['trackChangesCommand']['value']&&(this['_isForcedDefaultExecutionBlock']||_0x592c06['length']>0x0&&_0x592c06[_0x592c06['length']-0x1]&&_0x592c06[_0x592c06['length']-0x1]['forceDefaultExecution']||(_0x35768b((..._0x436ae6)=>_0x1907b3['execute'](..._0x436ae6,{'forceDefaultExecution':!0x0}),..._0x592c06),_0x483cc3['stop']()));},{'priority':'high'});}['forceDefaultExecution'](_0x367aba){let _0x3076a4,_0xa54689;const _0x4f6b1d=this['_isForcedDefaultExecutionBlock'];this['_isForcedDefaultExecutionBlock']=!0x0;try{_0x3076a4=_0x367aba();}catch(_0x3fd3ad){_0xa54689=_0x3fd3ad;}return _0x4f6b1d||(this['_isForcedDefaultExecutionBlock']=!0x1),_0xa54689&&_0x3a6ec5['rethrowUnexpectedError'](_0xa54689,this),_0x3076a4;}['markInsertion'](_0xcf699b,_0x18b4f8=null,_0x4a58de={}){if(_0xcf699b['isCollapsed'])return null;const _0x371482=this['editor']['plugins']['get']('Users')['me'];for(const {suggestion:_0x5414df,meta:_0x33c00c}of this['_findSuggestions'](_0xcf699b,'insertion'))if(_0x33c00c['isOwn']){if(!_0x33c00c['isNextTo'])return _0x5414df;if(_0x18b4f8==_0x5414df['subType']){const _0x46e34e=_0x5414df['getFirstRange']();return _0x46e34e['start']['isEqual'](_0xcf699b['end'])?this['_setSuggestionRange'](_0x5414df,this['_model']['createRange'](_0xcf699b['start'],_0x46e34e['end'])):this['_setSuggestionRange'](_0x5414df,this['_model']['createRange'](_0x46e34e['start'],_0xcf699b['end'])),_0x5414df;}}const _0x239f50=_0xd9a6f1(),_0x298b0c=_0x371482['id'],_0x13a4ed=_0x18b4f8?'insertion:'+_0x18b4f8:'insertion',_0x459e90=this['_setSuggestionData']({'id':_0x239f50,'type':_0x13a4ed,'createdAt':new Date(),'authorId':_0x298b0c,'attributes':_0x4a58de});return this['_addSuggestionMarker'](_0x13a4ed,_0x239f50,_0x298b0c,_0xcf699b),_0x459e90;}['markMultiRangeInsertion'](_0xb6c7be,_0x3e3d88='multi',_0x4d5b84={}){const _0x539bb6=this['editor']['plugins']['get']('Users')['me'],_0x2e9eda=this['_suggestionFactory']['getSuggestionCallback']('insertion',_0x3e3d88,'join');for(const _0x28efe5 of this['getSuggestions']())if(_0x28efe5['author']['id']==_0x539bb6['id']&&'insertion'==_0x28efe5['type']&&_0x28efe5['subType']==_0x3e3d88&&(_0x2e9eda(_0x28efe5['getRanges'](),_0xb6c7be)||_0x2e9eda(_0xb6c7be,_0x28efe5['getRanges']()))){for(const _0x3679c8 of _0xb6c7be)_0x28efe5['addRange'](_0x3679c8);return _0x28efe5;}for(const _0x236148 of _0xb6c7be)for(const {suggestion:_0xaed298,meta:_0x43fc94}of this['_findSuggestions'](_0x236148,'insertion')){if(!_0x43fc94['isOwn'])continue;let _0x1a97fd=!0x0;for(const _0x4b2aa4 of _0xaed298['getRanges']())for(const _0x360794 of _0xb6c7be)if(!_0x4b2aa4['containsRange'](_0x360794)){_0x1a97fd=!0x1;break;}if(_0x1a97fd)return _0xaed298;}const _0xe9fee5=_0xd9a6f1(),_0x5b0d14=_0x539bb6['id'],_0x57bdd4='insertion:'+_0x3e3d88,_0x4b9967=this['_setSuggestionData']({'id':_0xe9fee5,'type':_0x57bdd4,'createdAt':new Date(),'authorId':_0x5b0d14,'attributes':_0x4d5b84});for(const _0x16233a of _0xb6c7be)this['_addSuggestionMarker'](_0x57bdd4,_0xe9fee5,_0x5b0d14,_0x16233a,_0x11fe95['getMultiRangeId']());return _0x4b9967;}['markInlineFormat'](_0x4d9d20,_0x3a9aa2,_0x6a7a51=null,_0x36cf5a={}){if(_0x6a7a51=_0x6a7a51||pt(_0x3a9aa2),_0x4d9d20['isCollapsed'])return;const _0x12f1a0=this['editor']['plugins']['get']('Users')['me'],_0x3d2ff3=[];for(const {suggestion:_0x12c788,meta:_0x358deb}of this['_findSuggestions'](_0x4d9d20,'insertion'))_0x358deb['isOwn']&&!_0x358deb['isInsideObject']&&_0x3d2ff3['push'](..._0x12c788['getRanges']());const _0x1e1960=function(_0x3a8da4,_0x5025c0){const _0x42320f=[];for(const _0x3e51f0 of _0x5025c0){const _0x39bbe5=_0x3a8da4['getIntersection'](_0x3e51f0);_0x39bbe5&&_0x42320f['push'](_0x39bbe5);}return _0x42320f;}(_0x4d9d20,_0x3d2ff3),_0x3746cd=function(_0x43465,_0x31deda){const _0x2d22ae=[_0x43465];for(const _0x44f80b of _0x31deda){let _0x27e797=0x0;for(;_0x27e797<_0x2d22ae['length'];){const _0x552fe4=_0x2d22ae[_0x27e797]['getDifference'](_0x44f80b);_0x2d22ae['splice'](_0x27e797,0x1,..._0x552fe4),_0x27e797+=_0x552fe4['length'];}}return _0x2d22ae;}(_0x4d9d20,_0x3d2ff3);_0x1e1960['length']&&this['_model']['change'](()=>{for(const _0x1d13a8 of _0x1e1960){const _0x3033c3=this['_suggestionFactory']['getSuggestionCallback']('formatInline',_0x6a7a51,'accept');this['forceDefaultExecution'](()=>_0x3033c3([_0x1d13a8],_0x3a9aa2,_0x36cf5a));}});for(const _0x449508 of _0x3746cd){let _0x46cf2d=null,_0x3e4eb7=_0x449508['start'],_0x3bd991=_0x449508['end'];for(const {suggestion:_0x5096e9,meta:_0x26ca16}of this['_findSuggestions'](_0x449508,'formatInline')){if(!_0x26ca16['isOwn'])continue;if(_0x5096e9['subType']!=_0x6a7a51)continue;const _0x3e4e72=_0x5096e9['getFirstRange']();if(_0x3e4e72['containsRange'](_0x449508,!0x0))return;_0x3e4eb7=_0x3e4eb7['isBefore'](_0x3e4e72['start'])?_0x3e4eb7:_0x3e4e72['start'],_0x3bd991=_0x3bd991['isAfter'](_0x3e4e72['end'])?_0x3bd991:_0x3e4e72['end'],_0x46cf2d?_0x3e4e72['start']['isBefore'](_0x46cf2d['getFirstRange']()['start'])?(_0x46cf2d['removeMarkers'](),_0x46cf2d=_0x5096e9):_0x5096e9['removeMarkers']():_0x46cf2d=_0x5096e9;}const _0x5a5199=this['_model']['createRange'](_0x3e4eb7,_0x3bd991);if(_0x46cf2d)this['_setSuggestionRange'](_0x46cf2d,_0x5a5199);else{const _0x4aebdd=_0xd9a6f1(),_0x356388=_0x12f1a0['id'];this['_setSuggestionData']({'id':_0x4aebdd,'type':'formatInline:'+_0x6a7a51,'data':_0x3a9aa2,'createdAt':new Date(),'authorId':_0x356388,'attributes':_0x36cf5a}),this['_addSuggestionMarker']('formatInline:'+_0x6a7a51,_0x4aebdd,_0x356388,_0x5a5199);}}}['markBlockFormat'](_0x4832a2,_0x26ab8e,_0x209b88=[],_0x42acf4=null,_0x7fdfc9={}){_0x26ab8e['formatGroupId']||(_0x26ab8e['formatGroupId']=_0x26ab8e['commandName']),_0x26ab8e['multipleBlocks']=_0x4832a2['is']('range'),_0x42acf4=_0x42acf4||pt(_0x26ab8e);const _0x50787c=_0x209b88['map'](_0xd90115=>wt(_0xd90115,this['_model'])),_0x15ef42=_0x4832a2['is']('range')?_0x4832a2:wt(_0x4832a2,this['_model']);_0x50787c['push'](_0x15ef42);let _0xa494bb=!0x0;for(const _0x1078aa of _0x50787c)if(!this['_rangeIsInLocalUserInsertion'](_0x1078aa)){_0xa494bb=!0x1;break;}if(_0xa494bb){const _0x399fc8=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x42acf4,'accept');return void this['forceDefaultExecution'](()=>_0x399fc8([_0x15ef42],_0x26ab8e,_0x7fdfc9));}let _0x3e3bbb=null,_0x4de924=_0x15ef42['start'],_0xe85155=_0x15ef42['end'];for(const {suggestion:_0x495c7e,meta:_0x4a997e}of this['_findSuggestions'](_0x15ef42,'formatBlock')){if(!_0x4a997e['isOwn']||_0x4a997e['isNextTo']||_0x4a997e['containsRangeInObject']||_0x4a997e['isInsideObject'])continue;if(_0x495c7e['data']['formatGroupId']!=_0x26ab8e['formatGroupId'])continue;const _0x221e47=_0x495c7e['getFirstRange']();if(_0x495c7e['subType']==_0x42acf4){if(_0x221e47['containsRange'](_0x15ef42,!0x0))return;_0x4de924=_0x4de924['isBefore'](_0x221e47['start'])?_0x4de924:_0x221e47['start'],_0xe85155=_0xe85155['isAfter'](_0x221e47['end'])?_0xe85155:_0x221e47['end'],_0x3e3bbb?_0x221e47['start']['isBefore'](_0x3e3bbb['getFirstRange']()['start'])?(_0x3e3bbb['removeMarkers'](),_0x3e3bbb=_0x495c7e):_0x495c7e['removeMarkers']():_0x3e3bbb=_0x495c7e;}else{const _0x494632=_0x15ef42['getIntersection'](_0x221e47);this['_cutOutSuggestionMarker'](_0x495c7e,_0x494632);}}const _0x1b67bc=this['editor']['plugins']['get']('Users')['me'],_0x6b1b8f=_0xd9a6f1(),_0x59879d=_0x1b67bc['id'];_0x3e3bbb?this['_setSuggestionRange'](_0x3e3bbb,this['_model']['createRange'](_0x4de924,_0xe85155)):(this['_setSuggestionData']({'id':_0x6b1b8f,'type':'formatBlock:'+_0x42acf4,'data':_0x26ab8e,'createdAt':new Date(),'authorId':_0x59879d,'attributes':_0x7fdfc9}),this['_addSuggestionMarker']('formatBlock:'+_0x42acf4,_0x6b1b8f,_0x59879d,this['_model']['createRange'](_0x4de924,_0xe85155)));}['markMultiRangeBlockFormat'](_0x347e3e,_0x50cdf6,_0x5d49cc=[],_0x2c5fb5=null,_0xe96a17={}){_0x50cdf6['formatGroupId']||(_0x50cdf6['formatGroupId']=_0x50cdf6['commandName']),_0x50cdf6['multipleBlocks']=!0x1,_0x2c5fb5=_0x2c5fb5||pt(_0x50cdf6);const _0x3b788c=_0x5d49cc['map'](_0x114263=>wt(_0x114263,this['_model'])),_0x491aee=_0x347e3e['map'](_0xf6960c=>wt(_0xf6960c,this['_model']));_0x3b788c['push'](..._0x491aee);let _0x1a30d4=!0x0;for(const _0x43876c of _0x3b788c)if(!this['_rangeIsInLocalUserInsertion'](_0x43876c)){_0x1a30d4=!0x1;break;}if(_0x1a30d4){const _0x3cee54=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x2c5fb5,'accept');return void this['forceDefaultExecution'](()=>_0x3cee54(_0x491aee,_0x50cdf6,_0xe96a17));}const _0x215d29=this['editor']['plugins']['get']('Users')['me'];for(const _0x1e91c4 of this['getSuggestions']()){if(_0x1e91c4['author']['id']!=_0x215d29['id'])continue;if('formatBlock'!=_0x1e91c4['type']||_0x1e91c4['data']['formatGroupId']!=_0x50cdf6['formatGroupId'])continue;const _0x495fb5=_0x1e91c4['subType']==_0x2c5fb5;for(let _0x3290c0=0x0;_0x3290c0<_0x491aee['length'];_0x3290c0++){const _0x115c0f=_0x491aee[_0x3290c0];for(const _0x3aa3b5 of _0x1e91c4['getMarkers']()){const _0x84804=_0x3aa3b5['getRange']();if(_0x115c0f['isEqual'](_0x84804)){_0x495fb5?(_0x491aee['splice'](_0x3290c0,0x1),_0x3290c0--):_0x1e91c4['removeMarker'](_0x3aa3b5['name']);break;}}}}if(0x0==_0x491aee['length'])return;const _0x5b47aa=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x2c5fb5,'join');for(const _0x1900b1 of this['getSuggestions']())if(_0x1900b1['author']['id']==_0x215d29['id']&&'formatBlock'==_0x1900b1['type']&&_0x1900b1['data']['formatGroupId']==_0x50cdf6['formatGroupId']&&_0x1900b1['subType']==_0x2c5fb5&&(_0x5b47aa(_0x1900b1['getRanges'](),_0x491aee)||_0x5b47aa(_0x491aee,_0x1900b1['getRanges']()))){for(const _0x4c1d48 of _0x491aee)_0x1900b1['addRange'](_0x4c1d48);return _0x1900b1;}const _0x312a02=_0xd9a6f1(),_0x4a2bfd=_0x215d29['id'],_0x5a53e2='formatBlock:'+_0x2c5fb5,_0x4eeca8=this['_setSuggestionData']({'id':_0x312a02,'type':_0x5a53e2,'data':_0x50cdf6,'createdAt':new Date(),'authorId':_0x4a2bfd,'attributes':_0xe96a17});for(const _0x5aa980 of _0x491aee)this['_addSuggestionMarker'](_0x5a53e2,_0x312a02,_0x4a2bfd,_0x5aa980,_0x11fe95['getMultiRangeId']());return _0x4eeca8;}['markDeletion'](_0x2c5f86,_0x242237=null,_0x1df399={}){if(_0x2c5f86['isCollapsed'])return null;const _0x1b2520=this['editor']['plugins']['get']('Users')['me'],_0xbfc867=new _0x5cdb(_0x2c5f86['start'],_0x2c5f86['end']);for(const {suggestion:_0x585ed8,meta:_0xef824d}of this['_findSuggestions'](_0xbfc867,'insertion'))if(_0xef824d['isOwn']&&!_0xef824d['isNextTo']){if(_0x585ed8['isMultiRange']){const _0x523bb2=_0x585ed8['getRanges']()['filter'](_0x1646d5=>'$graveyard'!=_0x1646d5['root']['rootName']);_0x523bb2['every'](_0x17b9ef=>_0xbfc867['containsRange'](_0x17b9ef,!0x0))&&_0x585ed8['discard']();if(_0x523bb2['some'](_0x42784d=>_0x42784d['containsRange'](_0xbfc867,!0x0))){const _0x3d73f2=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x242237,'accept');return this['forceDefaultExecution'](()=>_0x3d73f2([_0xbfc867],null,_0x1df399)),null;}}else{const _0x5a11f3=_0xbfc867['getIntersection'](_0x585ed8['getFirstRange']());_0x585ed8['_onDiscard']([_0x5a11f3],null,_0x1df399);}}if(_0xbfc867['detach'](),_0xbfc867['isCollapsed']||'$graveyard'==_0xbfc867['root']['rootName'])return null;let _0x2f9485=null,_0x123e5c=_0xbfc867['start'],_0x23f11a=_0xbfc867['end'];for(const {suggestion:_0xda4e99,meta:_0x81e3d3}of this['_findSuggestions'](_0xbfc867,'deletion'))if(_0x81e3d3['isOwn']){if(_0xda4e99['isMultiRange']){let _0x5154f4=!0x0;for(const _0x56232c of _0xda4e99['getRanges']()){if(_0x56232c['containsRange'](_0xbfc867,!0x0))return _0xda4e99;_0xbfc867['containsRange'](_0x56232c)||(_0x5154f4=!0x1);}_0x5154f4&&_0xda4e99['discard']();}else{const _0x101a7d=_0xda4e99['getFirstRange']();if(_0x101a7d['containsRange'](_0xbfc867,!0x0))return _0xda4e99;_0x123e5c=_0x123e5c['isBefore'](_0x101a7d['start'])?_0x123e5c:_0x101a7d['start'],_0x23f11a=_0x23f11a['isAfter'](_0x101a7d['end'])?_0x23f11a:_0x101a7d['end'],_0x2f9485?_0x101a7d['start']['isBefore'](_0x2f9485['getFirstRange']()['start'])?(_0x2f9485['removeMarkers'](),_0x2f9485=_0xda4e99):_0xda4e99['removeMarkers']():_0x2f9485=_0xda4e99;}}if(_0x2f9485)return this['_setSuggestionRange'](_0x2f9485,this['_model']['createRange'](_0x123e5c,_0x23f11a)),_0x2f9485;{const _0x36ed90=_0xd9a6f1(),_0x45008e=this['_model']['createRange'](_0x123e5c,_0x23f11a),_0x2829b6=_0x1b2520['id'],_0x4e33b4=_0x242237?'deletion:'+_0x242237:'deletion',_0x28e4df=this['_setSuggestionData']({'id':_0x36ed90,'type':_0x4e33b4,'createdAt':new Date(),'authorId':_0x2829b6,'attributes':_0x1df399});return this['_addSuggestionMarker'](_0x4e33b4,_0x36ed90,_0x2829b6,_0x45008e),_0x28e4df;}}['markMultiRangeDeletion'](_0x5111fd,_0x4ff38c='multi',_0x2f2a07={}){const _0x499294=this['editor']['plugins']['get']('Users')['me'],_0x166779=_0x5111fd['map'](_0x30a224=>new _0x5cdb(_0x30a224['start'],_0x30a224['end'])),_0x18e0c1=new Set();for(const _0x5b48c2 of _0x166779)for(const {suggestion:_0x179cc4,meta:_0x2f53bf}of this['_findSuggestions'](_0x5b48c2,'insertion'))_0x2f53bf['isOwn']&&!_0x2f53bf['isNextTo']&&_0x18e0c1['add'](_0x179cc4);for(const _0xdd3b23 of _0x18e0c1)if(_0xdd3b23['isMultiRange']){const _0x2f5967=_0xdd3b23['getRanges']();(!_0xdd3b23['attributes']||!_0xdd3b23['attributes']['skipNestingCheck'])&&(_0x2f5967['every'](_0x15622a=>_0x166779['some'](_0x1bf5db=>_0x1bf5db['containsRange'](_0x15622a,!0x0)))&&_0xdd3b23['discard']());if(_0x166779['every'](_0x2728d1=>_0x2f5967['some'](_0x2adac9=>_0x2adac9['containsRange'](_0x2728d1,!0x0)))){const _0x2fddda=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x4ff38c,'accept');return this['forceDefaultExecution'](()=>_0x2fddda(_0x5111fd,null,_0x2f2a07)),null;}}else{const _0x59557b=_0xdd3b23['getFirstRange']();_0x166779['some'](_0x4d83fe=>_0x4d83fe['containsRange'](_0x59557b,!0x0))&&_0xdd3b23['discard']();if(_0x166779['every'](_0x82b90e=>_0x59557b['containsRange'](_0x82b90e,!0x0))){const _0x1437f7=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x4ff38c,'accept');return this['forceDefaultExecution'](()=>_0x1437f7(_0x166779,null,_0x2f2a07)),null;}}const _0x13556c=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x4ff38c,'join');let _0x376213=null;for(const _0x1a2033 of this['getSuggestions']())if(_0x1a2033['author']['id']==_0x499294['id']&&_0x1a2033['isInContent']&&'deletion'==_0x1a2033['type']&&_0x1a2033['subType']==_0x4ff38c&&(_0x13556c(_0x1a2033['getRanges'](),_0x166779)||_0x13556c(_0x166779,_0x1a2033['getRanges']()))){if(_0x376213){if(_0x1a2033['commentThread']&&_0x1a2033['commentThread']['length'])continue;for(const _0xdf429e of _0x1a2033['getRanges']())_0x376213['isIntersectingWithRange'](_0xdf429e)||_0x376213['addRange'](_0xdf429e);_0x1a2033['removeMarkers']();}else{_0x376213=_0x1a2033;for(const _0x800231 of _0x166779)_0x1a2033['isIntersectingWithRange'](_0x800231)||_0x1a2033['addRange'](_0x800231);}}if(_0x376213)return _0x376213;_0x18e0c1['clear']();for(const _0x40eb15 of _0x166779)for(const {suggestion:_0x230ae0,meta:_0x1541fd}of this['_findSuggestions'](_0x40eb15,'deletion'))_0x1541fd['isOwn']&&_0x18e0c1['add'](_0x230ae0);for(const _0x4d3443 of _0x18e0c1){const _0x342d4c=_0x4d3443['getRanges']();if(!_0x2f2a07||!_0x2f2a07['skipNestingCheck']){if(_0x166779['every'](_0x428884=>_0x342d4c['some'](_0x236b33=>_0x236b33['containsRange'](_0x428884,!0x0))))return _0x4d3443;}(!_0x4d3443['attributes']||!_0x4d3443['attributes']['skipNestingCheck'])&&(_0x342d4c['every'](_0x4580aa=>_0x166779['some'](_0x4378e0=>_0x4378e0['containsRange'](_0x4580aa,!0x0)))&&_0x4d3443['discard']());}const _0x423862=_0xd9a6f1(),_0x12f715=_0x499294['id'],_0x68696b='deletion:'+_0x4ff38c,_0xee6078=this['_setSuggestionData']({'id':_0x423862,'type':_0x68696b,'createdAt':new Date(),'authorId':_0x12f715,'attributes':_0x2f2a07});for(const _0x315cf9 of _0x166779)_0x315cf9['detach'](),_0x315cf9['isCollapsed']||'$graveyard'==_0x315cf9['root']['rootName']||this['_addSuggestionMarker'](_0x68696b,_0x423862,_0x12f715,_0x315cf9,_0x11fe95['getMultiRangeId']());return _0xee6078;}['_setSuggestionRange'](_0x454701,_0x37817e){const _0x51a1d2=_0x454701['getFirstMarker']();this['_model']['change'](_0x5e4b7a=>{_0x5e4b7a['updateMarker'](_0x51a1d2,{'range':_0x37817e});});}['_addThreadToSuggestion'](_0xe765d6){const _0x30dbd6=_0xe765d6['id'],_0x51515e=this['editor']['config']['get']('collaboration.channelId');this['_commentsRepository']['hasCommentThread'](_0x30dbd6)||this['_commentsRepository']['addCommentThread']({'channelId':_0x51515e,'threadId':_0x30dbd6});const _0x537f4f=this['_commentsRepository']['getCommentThread'](_0x30dbd6);_0x537f4f['unbind']('isRemovable'),_0x537f4f['isRemovable']=!0x1,_0xe765d6['commentThread']=_0x537f4f;}['_checkSuggestionCorrectness'](_0x35efa5,_0x334d58,_0xa4e1d6,_0x5ac2a5){if(_0x35efa5['type']!=_0x334d58||_0x35efa5['subType']!=_0xa4e1d6||_0x35efa5['author']['id']!=_0x5ac2a5)throw this['editor']['isReadOnly']=!0x0,new _0x3a6ec5('track-changes-suggestion-data-mismatch',this);}['_cutOutSuggestionMarker'](_0x211b94,_0x422d21){const _0x1a34e3=_0x211b94['getFirstRange']();if(_0x422d21['isEqual'](_0x1a34e3))_0x211b94['removeMarkers']();else{if(_0x1a34e3['containsRange'](_0x422d21)){const _0x172191=this['_model']['createPositionAt'](_0x422d21['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x211b94,this['_model']['createRange'](_0x1a34e3['start'],_0x172191));const _0x24dfbe=_0xd9a6f1(),_0x34d76c=_0x211b94['author']['id'],_0x211bf7=_0x211b94['type']+':'+_0x211b94['subType'];this['_setSuggestionData']({'id':_0x24dfbe,'type':_0x211bf7,'createdAt':new Date(),'authorId':_0x34d76c,'data':_0x211b94['data'],'attributes':_0x211b94['attributes']});const _0x62aacd=this['_model']['createPositionAt'](_0x422d21['end']['parent'],'after'),_0x1de402=this['_model']['createRange'](_0x62aacd,_0x1a34e3['end']);this['_addSuggestionMarker'](_0x211bf7,_0x24dfbe,_0x34d76c,_0x1de402);}else{if(_0x1a34e3['containsPosition'](_0x422d21['start'])){const _0x51f3b3=this['_model']['createPositionAt'](_0x422d21['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x211b94,this['_model']['createRange'](_0x1a34e3['start'],_0x51f3b3));}else{const _0x1ec924=this['_model']['createPositionAt'](_0x422d21['end']['parent'],'after');this['_setSuggestionRange'](_0x211b94,this['_model']['createRange'](_0x1ec924,_0x1a34e3['end']));}}}}['_rangeIsInLocalUserInsertion'](_0x1b59e1){for(const {suggestion:_0x30934b,meta:_0x3c6b4f}of this['_findSuggestions'](_0x1b59e1,'insertion')){if(!_0x3c6b4f['isOwn'])continue;const _0x333efc=_0x30934b['getRanges']();for(const _0x421270 of _0x333efc)if(!_0x1b59e1['getDifference'](_0x421270)['length'])return!0x0;}return!0x1;}['_getAuthorFromId'](_0x1734d9){const _0x2d5baa=this['editor']['plugins']['get']('Users')['getUser'](_0x1734d9);if(!_0x2d5baa)throw new _0x3a6ec5('track-changes-user-not-found',this);return _0x2d5baa;}['_createSuggestion'](_0xe02d2,_0x142e7f,_0x279bf0,_0x16bc48){const _0x5b997b=this['_getAuthorFromId'](_0x16bc48),_0x5c0e73=this['_suggestionFactory']['buildSuggestion'](_0xe02d2,_0x142e7f,_0x279bf0,_0x5b997b,_0x525161=>this['_updateSuggestionData'](_0x279bf0,{'attributes':_0x525161}));return this['listenTo'](_0x5c0e73,'accept',()=>{this['_updateSuggestionData'](_0x279bf0,{'state':'accepted'});},{'priority':'high'}),this['listenTo'](_0x5c0e73,'discard',()=>{this['_updateSuggestionData'](_0x279bf0,{'state':'rejected'});},{'priority':'high'}),this['_suggestions']['set'](_0x279bf0,_0x5c0e73),this['_suggestionState']['set'](_0x5c0e73,'notReady'),_0x5c0e73;}['_splitMarkerName'](_0x545665){const _0x154b5d=_0x545665['split'](':');return{'group':_0x154b5d[0x0],'type':_0x154b5d[0x1],'subType':_0x154b5d['length']>=0x5?_0x154b5d[0x2]:null,'id':_0x154b5d['length']<0x5?_0x154b5d[0x2]:_0x154b5d[0x3],'authorId':_0x154b5d['length']<0x5?_0x154b5d[0x3]:_0x154b5d[0x4],'markerCount':0x6==_0x154b5d['length']?_0x154b5d[0x5]:null};}['_breakSuggestionMarker'](_0x308dde,_0xe35d28,_0x457da4){const _0x38021d=_0x308dde['getFirstRange'](),_0x180c71=_0x38021d['start'],_0x215032=_0x38021d['end'];this['_setSuggestionRange'](_0x308dde,this['_model']['createRange'](_0x180c71,_0xe35d28));const _0x5e49b3=_0xd9a6f1(),_0x235155=_0x308dde['author']['id'],_0x2e4589=_0x308dde['type']+(_0x308dde['subType']?':'+_0x308dde['subType']:'');this['_setSuggestionData']({'id':_0x5e49b3,'type':_0x2e4589,'createdAt':new Date(),'authorId':_0x235155,'originalSuggestionId':_0x308dde['id'],'data':_0x308dde['data']}),'formatBlock'==_0x308dde['type']&&(_0x457da4=this['_model']['createPositionBefore'](_0x457da4['parent'])),this['_addSuggestionMarker'](_0x2e4589,_0x5e49b3,_0x235155,this['_model']['createRange'](_0x457da4,_0x215032));}['_findSuggestions'](_0xa1e439,_0x987da3=null){const _0x5da698=[],_0x515fa6=this['_model']['schema'],_0x5af483=this['editor']['plugins']['get']('Users')['me'];for(const _0x40b6e4 of this['getSuggestions']())if(_0x40b6e4['isInContent']&&(!_0x987da3||_0x40b6e4['type']==_0x987da3))for(const _0x39cb33 of _0x40b6e4['getRanges']()){const _0x3286ab=_0xa1e439['start']['isEqual'](_0x39cb33['end'])||_0xa1e439['end']['isEqual'](_0x39cb33['start']);if(_0x3286ab||_0xa1e439['getIntersection'](_0x39cb33)){const _0x5688ee=_0xa1e439['containsRange'](_0x39cb33)&<(_0x515fa6,_0x39cb33['start'],_0xa1e439),_0x40a3f4=_0x39cb33['containsRange'](_0xa1e439)&<(_0x515fa6,_0xa1e439['start'],_0x39cb33);_0x5da698['push']({'suggestion':_0x40b6e4,'meta':{'isOwn':_0x5af483==_0x40b6e4['author'],'isNextTo':_0x3286ab,'isInsideObject':_0x5688ee,'containsRangeInObject':_0x40a3f4}});break;}}return _0x5da698;}['_addSuggestionMarker'](_0xc60fe7,_0x3a270f,_0x5c846f,_0x438aa9,_0x8952fc=null){this['_model']['change'](_0x256f86=>{let _0x38af61='suggestion:'+_0xc60fe7+':'+_0x3a270f+':'+_0x5c846f;_0x8952fc&&(_0x38af61=_0x38af61+':'+_0x8952fc),_0x256f86['addMarker'](_0x38af61,{'range':_0x438aa9,'usingOperation':!0x0,'affectsData':!0x0});});}['_removeSuggestion'](_0x3aaa2e){const _0x212b65=_0x3aaa2e['previous'],_0x1257e3=_0x3aaa2e['next'];_0x3aaa2e['previous']=null,null!=_0x212b65&&(_0x212b65['next']=null),_0x3aaa2e['next']=null,null!=_0x1257e3&&(_0x1257e3['previous']=null),'ready'==this['_suggestionState']['get'](_0x3aaa2e)&&(this['_suggestionState']['set'](_0x3aaa2e,'removed'),this['fire']('suggestionUnloaded',_0x3aaa2e,_0x212b65,_0x1257e3));}['_setSuggestionData'](_0x2eb81f){const _0x2bba74=_0x2eb81f['id'],_0x14e7e0=this['addSuggestionData'](_0x2eb81f);if(this['_adapter']&&this['_adapter']['addSuggestion']){const _0x2a27b4=this['editor']['plugins']['get']('PendingActions'),_0x3c043c=_0x14e7e0['hasComments'],_0x46a6b7=_0x14e7e0['subType']?_0x14e7e0['type']+':'+_0x14e7e0['subType']:_0x14e7e0['type'],t=this['editor']['locale']['t'],_0x465349=_0x2a27b4['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'})),_0x17a4ff={'id':_0x2bba74,'type':_0x46a6b7,'hasComments':_0x3c043c,'data':_0x2eb81f['data']||null,'originalSuggestionId':_0x2eb81f['originalSuggestionId']||null,'attributes':_0x14e7e0['attributes']};this['_adapter']['addSuggestion'](_0x17a4ff)['then'](_0x43d02d=>{_0x14e7e0['_saved']=!0x0,_0x2a27b4['remove'](_0x465349),_0x43d02d&&_0x43d02d['createdAt']&&(this['_suggestions']['get'](_0x2bba74)['createdAt']=_0x43d02d['createdAt']);});}return _0x14e7e0;}['_updateSuggestionData'](_0x2afc56,_0x505465){const _0x2c641f=this['editor']['plugins']['get']('PendingActions'),_0x37a0ca=this['_suggestions']['get'](_0x2afc56);if(this['_adapter']&&this['_adapter']['updateSuggestion']){if(_0x37a0ca['_saved']){const t=this['editor']['locale']['t'],_0x2c39a3=_0x2c641f['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));this['_adapter']['updateSuggestion'](_0x2afc56,_0x505465)['then'](()=>{_0x2c641f['remove'](_0x2c39a3);});}else _0x37a0ca['on']('change:_saved',()=>{this['_updateSuggestionData'](_0x2afc56,_0x505465);});}}['_getSuggestionData'](_0x3298d0){if(!this['_adapter']||!this['_adapter']['getSuggestion'])throw new _0x3a6ec5('track-changes-adapter-missing-getsuggestion',this);return this['_adapter']['getSuggestion'](_0x3298d0);}['_handleNewSuggestionMarker'](_0x1b2e41){const {id:_0x3c3810,type:_0x57abd3,subType:_0x4601aa,authorId:_0x91c5f2}=this['_splitMarkerName'](_0x1b2e41),_0x3dc213=this['_suggestions']['get'](_0x3c3810)||this['_createSuggestion'](_0x57abd3,_0x4601aa,_0x3c3810,_0x91c5f2);switch(this['_checkSuggestionCorrectness'](_0x3dc213,_0x57abd3,_0x4601aa,_0x91c5f2),this['_suggestionState']['get'](_0x3dc213)){case'notReady':this['_getSuggestionData'](_0x3c3810)['then'](_0x981d0e=>{let _0x25c39b=Promise['resolve']();_0x981d0e['hasComments']&&(_0x25c39b=this['_commentsRepository']['fetchCommentThread']({'channelId':this['editor']['config']['get']('collaboration.channelId'),'threadId':_0x3c3810})),_0x25c39b['then'](()=>{this['addSuggestionData'](_0x981d0e)['_saved']=!0x0;});}),this['_suggestionState']['set'](_0x3dc213,'markerReady');break;case'removed':this['_updateSuggestionData'](_0x3c3810,{'state':'open'});case'dataReady':this['_suggestionState']['set'](_0x3dc213,'ready'),this['fire']('suggestionLoaded',_0x3dc213);break;case'ready':this['fire']('suggestionChanged',_0x3dc213);}_0x3dc213['addMarkerName'](_0x1b2e41),this['_refreshSuggestionsChain'](_0x3dc213);}['_refreshSuggestionsChain'](_0x493643){if(_0x493643['isMultiRange'])return;let _0x474e7b=!0x0,_0x1dfad5=!0x0;for(const _0x338114 of this['getSuggestions']()){if(_0x338114['isMultiRange'])continue;if(_0x338114==_0x493643||!_0x338114['isInContent'])continue;if(_0x338114['author']['id']!=_0x493643['author']['id'])continue;const _0x22854f=this['_suggestionFactory']['getSuggestionCallback'](_0x493643['type'],_0x493643['subType'],'chain'),_0x14abac=this['_suggestionFactory']['getSuggestionCallback'](_0x338114['type'],_0x338114['subType'],'chain'),_0x4ef21c=_0x22854f(_0x493643,_0x338114),_0x335438=_0x14abac(_0x493643,_0x338114);_0x4ef21c&&_0x335438&&(_0x4ef21c[0x1]['commentThread']&&_0x4ef21c[0x1]['commentThread']['length']||(_0x4ef21c[0x0]['next']=_0x4ef21c[0x1],_0x4ef21c[0x1]['previous']=_0x4ef21c[0x0],_0x4ef21c[0x0]==_0x493643?_0x1dfad5=!0x1:_0x474e7b=!0x1));}_0x493643['previous']&&_0x474e7b&&(_0x493643['previous']['next']=null,_0x493643['previous']=null),_0x493643['next']&&_0x1dfad5&&(_0x493643['next']['previous']=null,_0x493643['next']=null);}['_joinWithAdjacentSuggestions'](_0x5b7ad0){for(const _0x4b8bf7 of this['_suggestions']['values']()){if(_0x4b8bf7==_0x5b7ad0||!_0x4b8bf7['isInContent'])continue;if(_0x4b8bf7['type']!=_0x5b7ad0['type']||_0x4b8bf7['author']['id']!=_0x5b7ad0['author']['id']||_0x4b8bf7['subType']!=_0x5b7ad0['subType'])continue;const _0x2550ab=this['_suggestionFactory']['getSuggestionCallback'](_0x5b7ad0['type'],_0x5b7ad0['subType'],'join');if(_0x2550ab(_0x4b8bf7['getRanges'](),_0x5b7ad0['getRanges']())){if(_0x5b7ad0['commentThread']&&_0x5b7ad0['commentThread']['length'])continue;return this['_joinSuggestions'](_0x4b8bf7,_0x5b7ad0),!0x0;}if(_0x2550ab(_0x5b7ad0['getRanges'](),_0x4b8bf7['getRanges']())){if(_0x4b8bf7['commentThread']&&_0x4b8bf7['commentThread']['length'])continue;return this['_joinSuggestions'](_0x5b7ad0,_0x4b8bf7),!0x0;}}return!0x1;}['_joinSuggestions'](_0x5da2ce,_0xbd5439){if(_0x5da2ce['isMultiRange'])for(const _0x1d5505 of _0xbd5439['getRanges']())_0x5da2ce['addRange'](_0x1d5505);else{const _0x5c4af0=_0xbd5439['getFirstRange']()['end'];this['_setSuggestionRange'](_0x5da2ce,this['_model']['createRange'](_0x5da2ce['getFirstRange']()['start'],_0x5c4af0));}_0xbd5439['removeMarkers']();}}_0x5d0173(p,_0x16d268);class gt{constructor(_0x29cbd6){this['_editor']=_0x29cbd6,this['_model']=_0x29cbd6['model'],this['_customCallbacks']=new Map(),this['_defaultCallbacks']=new Map(),this['_registerDefaultCallbacks']();}['buildSuggestion'](_0x2c131c,_0x25bec6,_0x10c8bd,_0x5c498f,_0x44736c){return new _0x11fe95(this['_model'],{'type':_0x2c131c,'subType':_0x25bec6,'id':_0x10c8bd,'author':_0x5c498f,'onAttributesChange':_0x44736c,'onAccept':(..._0x43ccaa)=>this['getSuggestionCallback'](_0x2c131c,_0x25bec6,'accept')(..._0x43ccaa),'onDiscard':(..._0x4b148b)=>this['getSuggestionCallback'](_0x2c131c,_0x25bec6,'discard')(..._0x4b148b)});}['registerCustomCallback'](_0x424c86,_0x858512,_0x310ad7,_0x7275fe){const _0x2c2991=_0x424c86+':'+_0x858512+':'+_0x310ad7;this['_customCallbacks']['set'](_0x2c2991,_0x7275fe);}['getSuggestionCallback'](_0x3cfa9c,_0x2e9dbc,_0x4990e2){const _0x44bdfa=_0x3cfa9c+':'+_0x2e9dbc+':'+_0x4990e2;return this['_customCallbacks']['get'](_0x44bdfa)||this['_defaultCallbacks']['get'](_0x3cfa9c+':'+_0x4990e2);}['_registerDefaultCallbacks'](){const _0x1927a8=()=>{},_0x2623b5=_0x25fbf3=>{_0x25fbf3['sort']((_0x46efc4,_0x34dabb)=>_0x46efc4['start']['isBefore'](_0x34dabb['start'])?0x1:-0x1),this['_model']['change'](_0x3f0fce=>{for(const _0x335369 of _0x25fbf3){let _0x4003a7;_0x4003a7=_0x335369['end']['isAtEnd']&&_0x335369['end']['parent']==_0x335369['start']['nodeAfter']?_0x3f0fce['createSelection'](_0x335369['start']['nodeAfter'],'on'):_0x3f0fce['createSelection'](_0x335369),this['_model']['deleteContent'](_0x4003a7,{'forceDefaultExecution':!0x0,'doNotAutoparagraph':!0x0});}});},_0x595a4b=(_0x5f5097,_0x430e4d)=>{this['_model']['change'](_0x3fce2f=>{const {commandName:_0x3654cb,commandParams:_0x376ee8=[]}=_0x430e4d,_0x95feba=_0x5f5097[0x0];if('$graveyard'==_0x95feba['root']['rootName'])return;const _0x5c2bbf=Array['from'](this['_model']['document']['selection']['getRanges']())['map'](_0x13405a=>_0x5cdb['fromRange'](_0x13405a));dt(_0x95feba)?_0x3fce2f['setSelection'](this['_model']['createRange'](_0x95feba['end'])):_0x3fce2f['setSelection'](_0x95feba);for(const _0x380816 of this['_editor']['commands']['commands']())_0x380816['refresh']();_0x376ee8['push']({'forceDefaultExecution':!0x0}),this['_editor']['execute'](_0x3654cb,..._0x376ee8);const _0xc207a8=_0x5c2bbf['filter'](_0x5f6dd0=>'$graveyard'!=_0x5f6dd0['root']['rootName']);_0xc207a8['length']>0x0&&_0x3fce2f['setSelection'](_0xc207a8);for(const _0x2078bd of _0x5c2bbf)_0x2078bd['detach']();});},_0x241fd4=(_0x45644b,_0x5b2456)=>0x1==_0x45644b['length']&&0x1==_0x5b2456['length']&&_0x45644b[0x0]['end']['isEqual'](_0x5b2456[0x0]['start']),_0x278314=(_0x3d516f,_0x1aac0b)=>yt(_0x3d516f,_0x1aac0b,this['_model'])?[_0x3d516f,_0x1aac0b]:yt(_0x1aac0b,_0x3d516f,this['_model'])?[_0x1aac0b,_0x3d516f]:null;this['_defaultCallbacks']['set']('insertion:accept',_0x1927a8),this['_defaultCallbacks']['set']('insertion:discard',_0x2623b5),this['_defaultCallbacks']['set']('insertion:join',_0x241fd4),this['_defaultCallbacks']['set']('insertion:chain',_0x278314),this['_defaultCallbacks']['set']('deletion:accept',_0x2623b5),this['_defaultCallbacks']['set']('deletion:discard',_0x1927a8),this['_defaultCallbacks']['set']('deletion:join',_0x241fd4),this['_defaultCallbacks']['set']('deletion:chain',_0x278314),this['_defaultCallbacks']['set']('formatInline:accept',_0x595a4b),this['_defaultCallbacks']['set']('formatInline:discard',_0x1927a8),this['_defaultCallbacks']['set']('formatInline:join',_0x241fd4),this['_defaultCallbacks']['set']('formatInline:chain',_0x1927a8),this['_defaultCallbacks']['set']('formatBlock:accept',_0x595a4b),this['_defaultCallbacks']['set']('formatBlock:discard',_0x1927a8),this['_defaultCallbacks']['set']('formatBlock:join',_0x241fd4),this['_defaultCallbacks']['set']('formatBlock:chain',_0x1927a8);}}function lt(_0x59f1ef,_0xd7bffb,_0x438b21){for(const _0x424500 of _0xd7bffb['parent']['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})){if(_0x424500['root']==_0x424500)return!0x1;if(!_0x438b21['containsItem'](_0x424500))return!0x1;if(_0x59f1ef['isObject'](_0x424500)||_0x59f1ef['isLimit'](_0x424500))return!0x0;}}function dt(_0xa677b9){return _0xa677b9['end']['parent']==_0xa677b9['start']['nodeAfter']&&_0xa677b9['end']['isAtStart'];}function mt(_0x185337,_0x367409,_0x22b55f,_0x4ba0e8){const _0x4969e6=_0x572aff=>!_0x572aff['item']['is']('textProxy')&&!_0x4ba0e8['isObject'](_0x572aff['item']),_0x3c8457=_0x185337['start']['getLastMatchingPosition'](_0x4969e6),_0x549587=_0x185337['end']['getLastMatchingPosition'](_0x4969e6,{'direction':'backward'});return(!_0x185337['start']['isEqual'](_0x3c8457)||!_0x185337['end']['isEqual'](_0x549587))&&(_0x3c8457['isBefore'](_0x549587)?_0x22b55f['updateMarker'](_0x367409,{'range':_0x22b55f['createRange'](_0x3c8457,_0x549587)}):_0x22b55f['removeMarker'](_0x367409),!0x0);}function pt(_0x1457a3){return ft(_0x1457a3);}function kt(_0x2f8c7c){const _0x57cf43=_0x2f8c7c['start']['nodeAfter'];return _0x57cf43&&_0x57cf43['is']('element');}function wt(_0x2f71f3,_0x34630e){const _0x49e2b2=_0x34630e['schema']['isObject'](_0x2f71f3)||_0x34630e['schema']['isSelectable'](_0x2f71f3);return _0x34630e['createRange'](_0x34630e['createPositionAt'](_0x2f71f3,'before'),_0x49e2b2?_0x34630e['createPositionAfter'](_0x2f71f3):_0x34630e['createPositionAt'](_0x2f71f3,'end'));}function yt(_0x2a9922,_0x2a16b8,_0x1d275e){const _0x3fc574=_0x2a9922['getFirstRange'](),_0x3bb58d=_0x2a16b8['getFirstRange']();if(_0x3fc574['end']['isEqual'](_0x3bb58d['start']))return!0x0;if(_0x2a9922['type']!=_0x2a16b8['type'])return!0x1;if(!_0x3fc574['end']['isTouching'](_0x3bb58d['start']))return!0x1;const _0xd57c0f=_0x1d275e['createRange'](_0x3fc574['end'],_0x3bb58d['start'])['getWalker']();for(const _0x59d7f9 of _0xd57c0f)if(['elementStart','elementEnd']['includes'](_0x59d7f9['type'])&&_0x1d275e['schema']['isLimit'](_0x59d7f9['item']))return!0x1;return!0x0;}
|
|
23
|
+
import{Plugin as _0x14c09d,PendingActions as _0x4f818a}from'ckeditor5/src/core';import{LiveRange as _0x31ce06}from'ckeditor5/src/engine';import{CKEditorError as _0x3af4d7,uid as _0x5bd5e5,priorities as _0x3a9017,EmitterMixin as _0x50e452,mix as _0x1aa60c}from'ckeditor5/src/utils';import{toWidget as _0xe7c3fd}from'ckeditor5/src/widget';import{Users as _0x2ad904}from'ckeditor5-collaboration/src/collaboration-core';import _0x16b873 from'./commands/trackchangescommand';import _0x59cb88 from'./commands/acceptsuggestioncommand';import _0x127336 from'./commands/discardsuggestioncommand';import _0x211d2b from'./commands/acceptallsuggestionscommand';import _0x36a34c from'./commands/acceptselectedsuggestionscommand';import _0x27c4a0 from'./commands/discardallsuggestionscommand';import _0x3132ce from'./commands/discardselectedsuggestionscommand';import _0xbeb2bd from'./suggestion';import _0xca1474 from'./suggestiondescriptionfactory';import _0x1df5d4 from'./integrations/alignment';import _0x274b63 from'./integrations/basicstyles';import _0xa7e484 from'./integrations/blockquote';import _0xd57dfa from'./integrations/codeblock';import _0x1b59bc from'./integrations/comments';import _0x507d00 from'./integrations/deletecommand';import _0x24b573 from'./integrations/entercommand';import _0x2af95d from'./integrations/font';import _0x28e121 from'./integrations/heading';import _0x3aef45 from'./integrations/highlight';import _0xf59e42 from'./integrations/horizontalline';import _0x5e6a0f from'./integrations/image';import _0x547f11 from'./integrations/indent';import _0x78178d from'./integrations/inputcommand';import _0x2016ea from'./integrations/link';import _0x59d97e from'./integrations/list';import _0x5df1d6 from'./integrations/mediaembed';import _0x419e48 from'./integrations/mention';import _0x261ffb from'./integrations/pagebreak';import tt from'./integrations/paragraph';import it from'./integrations/removeformat';import st from'./integrations/restrictededitingmode';import nt from'./integrations/shiftentercommand';import et from'./integrations/standardeditingmode';import ot from'./integrations/table';import rt from'./integrations/tablemergesplit';import at from'./integrations/tableheadings';import ct from'./integrations/tableclipboard';import ht from'./integrations/title';import ut from'./integrations/undo';import ft from'./utils/hashobject.js';export default class d extends _0x14c09d{static get['requires'](){return['CommentsRepository',_0x2ad904,_0x4f818a,_0x1df5d4,_0x274b63,_0xa7e484,_0xd57dfa,_0x1b59bc,_0x507d00,_0x24b573,_0x2af95d,_0x28e121,_0x3aef45,_0xf59e42,_0x5e6a0f,_0x547f11,_0x78178d,_0x2016ea,_0x59d97e,_0x5df1d6,_0x419e48,_0x261ffb,tt,it,st,nt,et,ot,rt,at,ct,ht,ut];}static get['pluginName'](){return'TrackChangesEditing';}constructor(_0x9af9b1){function _0x28bd63(_0x1da4fc){return _0x1da4fc['map'](_0x950164=>String['fromCharCode'](_0x950164))['join']('');}super(_0x9af9b1),this['set']('activeMarkers',[]),this['on']('change:activeMarkers',(_0x2f78f9,_0x1932f3,_0x3f2a45,_0x39e97b)=>{this['_model']['change'](()=>{for(const _0x4931c1 of[..._0x39e97b,..._0x3f2a45])this['_model']['markers']['has'](_0x4931c1)&&_0x9af9b1['editing']['reconvertMarker'](_0x4931c1);});}),this['_descriptionFactory']=new _0xca1474(this['editor']['model']['schema'],this['editor']['locale']),this['_adapter']=null,this['_suggestionFactory']=new gt(this['editor']),this['_suggestions']=new Map(),this['_commentsRepository']=_0x9af9b1['plugins']['get']('CommentsRepository'),this['_enabledCommands']=new Set(),this['_model']=this['editor']['model'],this['_suggestionState']=new WeakMap(),this['_isForcedDefaultExecutionBlock']=!0x1,this[_0x28bd63([0x5f,0x65,0x78,0x65,0x63,0x75,0x74,0x65,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x69,0x6f,0x6e])]=_0x28bd63([0x34,0x30,0x34,0x34,0x30,0x38,0x32,0x34]);}['init'](){const _0x27d9ed=this['editor'];_0x27d9ed['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion','view':_0x5de832=>{const {id:_0x7e2bde,type:_0x54f72a}=this['_splitMarkerName'](_0x5de832['markerName']),_0x3e8b20=['ck-suggestion-marker','ck-suggestion-marker-'+_0x54f72a];let _0x4bfd34=0xbb8;return this['activeMarkers']['includes'](_0x5de832['markerName'])&&(_0x3e8b20['push']('ck-suggestion-marker--active'),_0x4bfd34=0xbc2),'deletion'==_0x54f72a&&(_0x4bfd34+=0x5),{'classes':_0x3e8b20,'attributes':{'data-suggestion':_0x7e2bde},'priority':_0x4bfd34};}}),_0x27d9ed['conversion']['for']('dataDowncast')['add'](_0x312660=>{_0x312660['on']('addMarker:suggestion',(_0x22b2a9,_0x23f3c8,_0x14c0dd)=>{if(!_0x14c0dd['options']['showSuggestionHighlights'])return;const _0x5e477b=_0x23f3c8['item'];if(!_0x5e477b)return;const _0x3ccf63=_0x14c0dd['mapper']['toViewElement'](_0x5e477b);_0x27d9ed['model']['schema']['isObject'](_0x5e477b)&&_0x3ccf63&&!_0x3ccf63['getCustomProperty']('widget')&&_0x3ccf63['is']('containerElement')&&_0xe7c3fd(_0x3ccf63,_0x14c0dd['writer']);},{'priority':'high'});}),_0x27d9ed['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion','view':(_0x18b600,_0x3ca317)=>{if(!_0x3ca317['options']['showSuggestionHighlights'])return null;const {type:_0x580d9d}=this['_splitMarkerName'](_0x18b600['markerName']);return{'classes':['ck-suggestion-marker','ck-suggestion-marker-'+_0x580d9d],'priority':0xbb8};}});const _0x1d7a93=({showActiveMarkers:_0xcf9080=!0x0}={})=>(_0x44f794,_0xd15f62,_0x3d2a10)=>{if(!_0xd15f62['item'])return;if(_0xd15f62['item']['is']('selection'))return void _0x3d2a10['consumable']['consume'](_0xd15f62['item'],_0x44f794['name']);const _0x4b75a8=_0x3d2a10['mapper']['toViewElement'](_0xd15f62['item']);if(!(_0xd15f62['item']['is']('element')&&_0x27d9ed['model']['schema']['isBlock'](_0xd15f62['item'])&&!_0x4b75a8['getCustomProperty']('addHighlight')))return;const {id:_0xe547af}=this['_splitMarkerName'](_0xd15f62['markerName']);_0x3d2a10['writer']['addClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock'],_0x4b75a8),_0x3d2a10['writer']['setAttribute']('data-suggestion',_0xe547af,_0x4b75a8),_0x3d2a10['mapper']['bindElementToMarker'](_0x4b75a8,_0xd15f62['markerName']),_0xcf9080&&(this['activeMarkers']['includes'](_0xd15f62['markerName'])?_0x3d2a10['writer']['addClass']('ck-suggestion-marker--active',_0x4b75a8):_0x3d2a10['writer']['removeClass']('ck-suggestion-marker--active',_0x4b75a8));for(const _0x16f35f of _0x27d9ed['model']['createRangeIn'](_0xd15f62['item'])['getItems']())_0x3d2a10['consumable']['consume'](_0x16f35f,_0x44f794['name']);_0x3d2a10['consumable']['consume'](_0xd15f62['item'],_0x44f794['name']);};_0x27d9ed['conversion']['for']('dataDowncast')['add'](_0x4b2ebb=>{_0x4b2ebb['on']('addMarker:suggestion:formatBlock',(_0x1deabf,_0x94a72f,_0x34acf7)=>{_0x34acf7['options']['showSuggestionHighlights']&&_0x1d7a93({'showActiveMarkers':!0x1})(_0x1deabf,_0x94a72f,_0x34acf7);},{'priority':'highest'});}),_0x27d9ed['conversion']['for']('dataDowncast')['markerToData']({'model':'suggestion','view':(_0x3fd72e,_0x371e64)=>_0x371e64['options']['showSuggestionHighlights']?null:{'group':'suggestion','name':_0x3fd72e['substr']('suggestion'['length']+0x1)}}),_0x27d9ed['conversion']['for']('upcast')['elementToElement']({'view':{'name':'suggestion','attribute':{'id':/^\w/,'suggestionType':/^\w/}},'model':(_0x2c4604,{writer:_0x32fbbd})=>{let _0x47ee9e='suggestion:'+_0x2c4604['getAttribute']('suggestion-type')+':'+_0x2c4604['getAttribute']('id');return _0x2c4604['getAttribute']('marker-count')&&(_0x47ee9e+=':'+_0x2c4604['getAttribute']('marker-count')),_0x32fbbd['createElement']('$marker',{'data-name':_0x47ee9e});}}),_0x27d9ed['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion'}),_0x27d9ed['conversion']['for']('editingDowncast')['add'](_0x2461cb=>{_0x2461cb['on']('addMarker:suggestion:formatBlock',_0x1d7a93(),{'priority':'high'});}),_0x27d9ed['conversion']['for']('editingDowncast')['add'](_0x1b0422=>{_0x1b0422['on']('removeMarker:suggestion:formatBlock',(_0x27c232,_0x544501,_0x5e02e9)=>{const _0x449930=_0x5e02e9['mapper']['markerNameToElements'](_0x544501['markerName']);if(_0x449930)for(const _0x5f4dd1 of _0x449930)_0x5f4dd1['getCustomProperty']('addHighlight')||(_0x5e02e9['writer']['removeClass'](['ck-suggestion-marker','ck-suggestion-marker-formatBlock','ck-suggestion-marker--active'],_0x5f4dd1),_0x5e02e9['writer']['removeAttribute']('data-suggestion',_0x5f4dd1),_0x5e02e9['mapper']['unbindElementFromMarkerName'](_0x5f4dd1,_0x544501['markerName']));},{'priority':'high'});}),_0x27d9ed['model']['document']['registerPostFixer'](_0x2cb8a2=>{let _0xb3a186=!0x1;const _0x2460c2=Array['from'](_0x27d9ed['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x493d9d,data:_0x1a28ad}of _0x2460c2){const {group:_0x469ebf,type:_0x989201,id:_0x1b2cc0}=this['_splitMarkerName'](_0x493d9d);if('suggestion'!==_0x469ebf)continue;const _0xa39235=this['_suggestions']['get'](_0x1b2cc0);if(null!=_0x1a28ad['newRange']){'formatInline'==_0x989201&&(_0xb3a186=_0xb3a186||mt(_0x1a28ad['newRange'],_0x493d9d,_0x2cb8a2,_0x27d9ed['model']['schema']));if(_0x1a28ad['newRange']['isCollapsed']||'$graveyard'==_0x1a28ad['newRange']['root']['rootName']||'formatBlock'==_0x989201&&!kt(_0x1a28ad['newRange'])||'deletion'==_0x989201&&!(!dt(_0x546222=_0x1a28ad['newRange'])&&!function(_0x4471a3){return _0x4471a3['start']['parent']==_0x4471a3['end']['nodeBefore']&&_0x4471a3['start']['isAtEnd'];}(_0x546222)))_0x2cb8a2['removeMarker'](_0x493d9d),_0xb3a186=!0x0;else{if(!_0xa39235||!_0xa39235['isInContent'])continue;_0xb3a186=!!this['_joinWithAdjacentSuggestions'](_0xa39235)||_0xb3a186;}}}var _0x546222;return _0xb3a186;}),_0x27d9ed['model']['document']['registerPostFixer'](_0x4167ad=>{let _0x35d930=!0x1;for(const _0x95fee1 of _0x27d9ed['model']['document']['differ']['getChanges']()){if('insert'!=_0x95fee1['type'])continue;const _0x1fdcd0=_0x95fee1['position']['getShiftedBy'](_0x95fee1['length']);if(_0x1fdcd0['isAtEnd'])for(const _0x158920 of this['_suggestions']['values']()){if(_0x158920['isMultiRange']||!_0x158920['isInContent'])continue;if('formatBlock'!=_0x158920['type'])continue;const _0x511fbb=_0x158920['getFirstRange']();if(_0x511fbb['start']['parent']!=_0x511fbb['end']['parent']&&_0x511fbb['end']['isEqual'](_0x95fee1['position'])){const _0x26aefc=_0x27d9ed['model']['createRange'](_0x511fbb['start'],_0x1fdcd0);_0x4167ad['updateMarker'](_0x158920['getFirstMarker'](),{'range':_0x26aefc}),_0x35d930=!0x0;}}}return _0x35d930;}),_0x27d9ed['model']['markers']['on']('update:suggestion',(_0x35335d,_0x44ed2e,_0x18279d)=>{if(null==_0x18279d){const {id:_0x1d64d4}=this['_splitMarkerName'](_0x44ed2e['name']),_0x18672a=this['_suggestions']['get'](_0x1d64d4);_0x18672a&&_0x18672a['addMarkerName'](_0x44ed2e['name']);}}),_0x27d9ed['model']['document']['on']('change:data',()=>{const _0x51f23a=Array['from'](_0x27d9ed['model']['document']['differ']['getChangedMarkers']());_0x51f23a['sort']((_0x3893ef,_0x1fe697)=>{const _0x485166=_0x3893ef['data']['oldRange'],_0x286f6a=_0x1fe697['data']['oldRange'];return null===_0x485166&&null===_0x286f6a?0x0:null===_0x485166&&null!==_0x286f6a?-0x1:null!==_0x485166&&null===_0x286f6a?0x1:_0x485166['start']['isBefore'](_0x286f6a['start'])?-0x1:0x1;});const _0x470434=new Set();for(const {name:_0x2c4923,data:_0x5c7ab9}of _0x51f23a){const {group:_0xa176e9,id:_0x5207d7}=this['_splitMarkerName'](_0x2c4923);if('suggestion'===_0xa176e9&&(null===_0x5c7ab9['oldRange']&&this['_handleNewSuggestionMarker'](_0x2c4923),null===_0x5c7ab9['newRange'])){const _0x2639da=this['_suggestions']['get'](_0x5207d7);_0x2639da['isInContent']?_0x470434['add'](_0x2639da):this['_removeSuggestion'](_0x2639da);}}for(const {name:_0x19d4a3,data:_0x9d257e}of _0x51f23a){const {group:_0x2e9eb1,id:_0x318d05}=this['_splitMarkerName'](_0x19d4a3);if('suggestion'!==_0x2e9eb1)continue;const _0x1034af=this['_suggestions']['get'](_0x318d05);null!=_0x9d257e['newRange']&&null!=_0x9d257e['oldRange']&&(this['_refreshSuggestionsChain'](_0x1034af),_0x470434['add'](_0x1034af['head']));}for(const _0x42ce35 of _0x470434)this['fire']('suggestionChanged',_0x42ce35);_0x470434['clear']();}),_0x27d9ed['model']['on']('applyOperation',(_0x21e229,_0x3a3dbe)=>{const _0x44f352=_0x3a3dbe[0x0];if(!this['_suggestions']['size'])return;if(!_0x44f352['isDocumentOperation'])return;if(_0x44f352['batch']['isUndo']||!_0x44f352['batch']['isLocal'])return;let _0x267d44,_0x123281;switch(_0x44f352['type']){case'insert':_0x267d44=_0x27d9ed['model']['createPositionAt'](_0x44f352['position']),_0x123281=_0x267d44['getShiftedBy'](_0x44f352['howMany']);break;case'split':_0x267d44=_0x27d9ed['model']['createPositionAt'](_0x44f352['splitPosition']),_0x123281=_0x27d9ed['model']['createPositionAt'](_0x44f352['moveTargetPosition']);break;case'move':_0x267d44=_0x27d9ed['model']['createPositionAt'](_0x44f352['targetPosition']),_0x123281=_0x267d44['getShiftedBy'](_0x44f352['howMany']);break;default:return;}const _0x2040a4=_0x27d9ed['model']['createRange'](_0x267d44,_0x123281);_0x27d9ed['model']['change'](()=>{for(const {suggestion:_0x1bfaa6,meta:_0x4d97e1}of this['_findSuggestions'](_0x2040a4)){if(_0x1bfaa6['isMultiRange'])continue;if('formatInline'==_0x1bfaa6['type'])continue;const _0x3d1297=_0x1bfaa6['data']&&_0x1bfaa6['data']['multipleBlocks'];('formatBlock'!=_0x1bfaa6['type']||'split'==_0x44f352['type']&&!_0x3d1297)&&(_0x4d97e1['containsRangeInObject']||'insertion'==_0x1bfaa6['type']&&_0x4d97e1['isOwn']||_0x1bfaa6['getFirstRange']()['containsRange'](_0x2040a4)&&this['_breakSuggestionMarker'](_0x1bfaa6,_0x267d44,_0x123281));}});},{'priority':'lowest'}),_0x27d9ed['model']['on']('deleteContent',(_0x493640,_0x413341)=>{const _0x260aef=_0x413341[0x0],_0x5036ac=_0x413341[0x1];if(_0x5036ac&&_0x5036ac['forceDefaultExecution'])return;if(this['_isForcedDefaultExecutionBlock'])return;if(!this['trackChangesCommand']['value'])return;if(_0x260aef['isCollapsed'])return;const _0x3d8fd6=_0x27d9ed['model']['schema'],{start:_0x17908d,end:_0xd284ee}=_0x260aef['getFirstRange'](),_0x411c53=_0x17908d['nodeAfter']&&_0x3d8fd6['isObject'](_0x17908d['nodeAfter'])?null:_0x3d8fd6['getNearestSelectionRange'](_0x17908d,'forward'),_0x20c97e=_0xd284ee['nodeBefore']&&_0x3d8fd6['isObject'](_0xd284ee['nodeBefore'])?null:_0x3d8fd6['getNearestSelectionRange'](_0xd284ee,'backward'),_0x3390b6=_0x27d9ed['model']['createRange'](_0x411c53?_0x411c53['start']:_0x17908d,_0x20c97e?_0x20c97e['end']:_0xd284ee);_0x27d9ed['model']['change'](_0x280868=>{this['markDeletion'](_0x3390b6);const _0x42d365=_0x27d9ed['model']['schema']['getNearestSelectionRange'](_0x3390b6['start']);_0x260aef['is']('documentSelection')?_0x280868['setSelection'](_0x42d365):_0x260aef['setTo'](_0x42d365);}),_0x493640['stop']();},{'priority':_0x3a9017['normal']+0xa}),_0x27d9ed['model']['on']('insertContent',(_0x18d65f,_0x5a2aa9)=>{const _0x31573b=_0x5a2aa9[_0x5a2aa9['length']-0x1];_0x31573b&&_0x31573b['forceDefaultExecution']||this['_isForcedDefaultExecutionBlock']||this['trackChangesCommand']['value']&&(_0x27d9ed['model']['change'](()=>{let _0x2325ce=_0x27d9ed['model']['insertContent'](_0x5a2aa9[0x0],_0x5a2aa9[0x1],_0x5a2aa9[0x2],_0x5a2aa9[0x3],{'forceDefaultExecution':!0x0});if(!_0x2325ce)return;_0x18d65f['return']=_0x2325ce['clone']();const _0x326977=_0x2325ce['end']['nodeBefore'],_0x1f98b2=_0x27d9ed['model']['schema'];_0x326977&&_0x1f98b2['isBlock'](_0x326977)&&!_0x1f98b2['isObject'](_0x326977)&&(_0x2325ce=_0x27d9ed['model']['createRange'](_0x2325ce['start'],_0x27d9ed['model']['createPositionAt'](_0x326977,'end'))),this['markInsertion'](_0x2325ce);}),_0x18d65f['stop']());},{'priority':'high'}),this['trackChangesCommand']=new _0x16b873(_0x27d9ed,this['_enabledCommands']),this['editor']['commands']['add']('trackChanges',this['trackChangesCommand']),this['enableCommand']('trackChanges');const _0x285610=new _0x59cb88(_0x27d9ed,this['_suggestions']);_0x27d9ed['commands']['add']('acceptSuggestion',_0x285610),this['enableCommand']('acceptSuggestion');const _0x5a3431=new _0x127336(_0x27d9ed,this['_suggestions']);_0x27d9ed['commands']['add']('discardSuggestion',_0x5a3431),this['enableCommand']('discardSuggestion'),_0x27d9ed['commands']['add']('acceptAllSuggestions',new _0x211d2b(_0x27d9ed,_0x285610,this['_suggestions'])),this['enableCommand']('acceptAllSuggestions'),_0x27d9ed['commands']['add']('discardAllSuggestions',new _0x27c4a0(_0x27d9ed,_0x5a3431,this['_suggestions'])),this['enableCommand']('discardAllSuggestions'),_0x27d9ed['commands']['add']('acceptSelectedSuggestions',new _0x36a34c(_0x27d9ed,_0x285610,this['_suggestions'])),this['enableCommand']('acceptSelectedSuggestions'),_0x27d9ed['commands']['add']('discardSelectedSuggestions',new _0x3132ce(_0x27d9ed,_0x5a3431,this['_suggestions'])),this['enableCommand']('discardSelectedSuggestions');const _0x1ea0b6=_0x27d9ed['plugins']['get']('CommentsRepository');this['listenTo'](_0x1ea0b6,'addComment',(_0x48a700,{threadId:_0x401f29})=>{const _0x43118f=this['_suggestions']['get'](_0x401f29);_0x43118f&&_0x43118f['commentThread']&&0x1===_0x43118f['commentThread']['length']&&this['_updateSuggestionData'](_0x401f29,{'hasComments':!0x0});},{'priority':'low'}),this['listenTo'](_0x1ea0b6,'removeComment',(_0x3b2c9c,{threadId:_0xf4a985})=>{const _0x4e1732=this['_suggestions']['get'](_0xf4a985);_0x4e1732&&_0x4e1732['commentThread']&&!_0x4e1732['commentThread']['length']&&this['_updateSuggestionData'](_0xf4a985,{'hasComments':!0x1});},{'priority':'low'});}set['adapter'](_0x3139f8){if(this['_adapter'])throw new _0x3af4d7('track-changes-adapter-already-set',this);this['_adapter']=_0x3139f8;}get['adapter'](){return this['_adapter'];}['getSuggestions']({skipNotAttached:_0x5b5df5=!0x1,toJSON:_0x199065=!0x1}={}){const _0x34585e=[];for(const _0x1e2295 of this['_suggestions']['values']())_0x5b5df5&&!_0x1e2295['isInContent']||_0x34585e['push'](_0x1e2295);return _0x199065?_0x34585e['map'](_0x23ff55=>_0x23ff55['toJSON']()):_0x34585e;}['getSuggestion'](_0x28f75c){const _0x20c3b0=this['_suggestions']['get'](_0x28f75c);if(!_0x20c3b0)throw new _0x3af4d7('track-changes-suggestion-not-found',this);return _0x20c3b0;}['hasSuggestion'](_0x521616){return this['_suggestions']['has'](_0x521616);}['addSuggestionData'](_0x42cbc5){const {id:_0x508fc,authorId:_0x3a935d}=_0x42cbc5,[_0x1d3071,_0x25e552]=_0x42cbc5['type']['split'](':'),_0x4ce9da=this['_suggestions']['get'](_0x508fc)||this['_createSuggestion'](_0x1d3071,_0x25e552,_0x508fc,_0x3a935d);switch(this['_addThreadToSuggestion'](_0x4ce9da),this['_checkSuggestionCorrectness'](_0x4ce9da,_0x1d3071,_0x25e552||null,_0x3a935d),_0x4ce9da['createdAt']=_0x42cbc5['createdAt'],_0x42cbc5['data']&&(_0x4ce9da['data']=_0x42cbc5['data']),_0x42cbc5['attributes']&&(_0x4ce9da['attributes']=_0x42cbc5['attributes']),this['_adapter']&&this['_adapter']['addSuggestion']||(_0x4ce9da['_saved']=!0x0),this['_suggestionState']['get'](_0x4ce9da)){case'notReady':this['_suggestionState']['set'](_0x4ce9da,'dataReady');break;case'markerReady':_0x4ce9da['isInContent']?(this['_suggestionState']['set'](_0x4ce9da,'ready'),this['fire']('suggestionLoaded',_0x4ce9da)):this['_suggestionState']['set'](_0x4ce9da,'removed');}return _0x4ce9da;}['acceptSuggestion'](_0x35d2d1){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0x314b01 of _0x35d2d1['getAllAdjacentSuggestions']())_0x314b01['accept']();});});}['discardSuggestion'](_0x4f5625){this['forceDefaultExecution'](()=>{this['editor']['model']['change'](()=>{for(const _0xa93ac7 of _0x4f5625['getAllAdjacentSuggestions']())_0xa93ac7['discard']();});});}['enableCommand'](_0x159075,_0x3de1fe){const _0x3420c7=this['editor']['commands']['get'](_0x159075);if(!_0x3420c7)throw new _0x3af4d7('track-changes-command-not-found',this,{'commandName':_0x159075});this['_enabledCommands']['add'](_0x3420c7),_0x3de1fe&&_0x3420c7['on']('execute',(_0x1131c2,_0x5ba66f)=>{this['trackChangesCommand']['value']&&(this['_isForcedDefaultExecutionBlock']||_0x5ba66f['length']>0x0&&_0x5ba66f[_0x5ba66f['length']-0x1]&&_0x5ba66f[_0x5ba66f['length']-0x1]['forceDefaultExecution']||(_0x3de1fe((..._0x8b7ec6)=>_0x3420c7['execute'](..._0x8b7ec6,{'forceDefaultExecution':!0x0}),..._0x5ba66f),_0x1131c2['stop']()));},{'priority':'high'});}['forceDefaultExecution'](_0x131ca9){let _0x3427dc,_0x27f9ea;const _0x278fe4=this['_isForcedDefaultExecutionBlock'];this['_isForcedDefaultExecutionBlock']=!0x0;try{_0x3427dc=_0x131ca9();}catch(_0x2dfb7a){_0x27f9ea=_0x2dfb7a;}return _0x278fe4||(this['_isForcedDefaultExecutionBlock']=!0x1),_0x27f9ea&&_0x3af4d7['rethrowUnexpectedError'](_0x27f9ea,this),_0x3427dc;}['markInsertion'](_0xb1f315,_0x56499a=null,_0x3de86b={}){if(_0xb1f315['isCollapsed'])return null;const _0x47c906=this['editor']['plugins']['get']('Users')['me'];for(const {suggestion:_0x14ceee,meta:_0x21607a}of this['_findSuggestions'](_0xb1f315,'insertion'))if(_0x21607a['isOwn']){if(!_0x21607a['isNextTo'])return _0x14ceee;if(_0x56499a==_0x14ceee['subType']){const _0x912f83=_0x14ceee['getFirstRange']();return _0x912f83['start']['isEqual'](_0xb1f315['end'])?this['_setSuggestionRange'](_0x14ceee,this['_model']['createRange'](_0xb1f315['start'],_0x912f83['end'])):this['_setSuggestionRange'](_0x14ceee,this['_model']['createRange'](_0x912f83['start'],_0xb1f315['end'])),_0x14ceee;}}const _0x4fb6f6=_0x5bd5e5(),_0x8cd5d2=_0x47c906['id'],_0x224a05=_0x56499a?'insertion:'+_0x56499a:'insertion',_0x594c4f=this['_setSuggestionData']({'id':_0x4fb6f6,'type':_0x224a05,'createdAt':new Date(),'authorId':_0x8cd5d2,'attributes':_0x3de86b});return this['_addSuggestionMarker'](_0x224a05,_0x4fb6f6,_0x8cd5d2,_0xb1f315),_0x594c4f;}['markMultiRangeInsertion'](_0x2a966e,_0x2705e4='multi',_0x3a596f={}){const _0x5e83c5=this['editor']['plugins']['get']('Users')['me'],_0x517883=this['_suggestionFactory']['getSuggestionCallback']('insertion',_0x2705e4,'join');for(const _0x1aa7d8 of this['getSuggestions']())if(_0x1aa7d8['author']['id']==_0x5e83c5['id']&&'insertion'==_0x1aa7d8['type']&&_0x1aa7d8['subType']==_0x2705e4&&(_0x517883(_0x1aa7d8['getRanges'](),_0x2a966e)||_0x517883(_0x2a966e,_0x1aa7d8['getRanges']()))){for(const _0x5a2d65 of _0x2a966e)_0x1aa7d8['addRange'](_0x5a2d65);return _0x1aa7d8;}for(const _0x5c15a7 of _0x2a966e)for(const {suggestion:_0x533b76,meta:_0x1689ec}of this['_findSuggestions'](_0x5c15a7,'insertion')){if(!_0x1689ec['isOwn'])continue;let _0x5ad0f8=!0x0;for(const _0x16bdd1 of _0x533b76['getRanges']())for(const _0x3d1a6d of _0x2a966e)if(!_0x16bdd1['containsRange'](_0x3d1a6d)){_0x5ad0f8=!0x1;break;}if(_0x5ad0f8)return _0x533b76;}const _0x3fc35a=_0x5bd5e5(),_0x56ca40=_0x5e83c5['id'],_0x46ed2a='insertion:'+_0x2705e4,_0x3f152f=this['_setSuggestionData']({'id':_0x3fc35a,'type':_0x46ed2a,'createdAt':new Date(),'authorId':_0x56ca40,'attributes':_0x3a596f});for(const _0x33446e of _0x2a966e)this['_addSuggestionMarker'](_0x46ed2a,_0x3fc35a,_0x56ca40,_0x33446e,_0xbeb2bd['getMultiRangeId']());return _0x3f152f;}['markInlineFormat'](_0x574f1c,_0x1edb62,_0xa4ecca=null,_0x21710b={}){if(_0xa4ecca=_0xa4ecca||pt(_0x1edb62),_0x574f1c['isCollapsed'])return;const _0x14819d=this['editor']['plugins']['get']('Users')['me'],_0x1eb190=[];for(const {suggestion:_0x496148,meta:_0x3a698d}of this['_findSuggestions'](_0x574f1c,'insertion'))_0x3a698d['isOwn']&&!_0x3a698d['isInsideObject']&&_0x1eb190['push'](..._0x496148['getRanges']());const _0x220a96=function(_0x5c5452,_0x3010bc){const _0x56dad9=[];for(const _0x172042 of _0x3010bc){const _0xa7d340=_0x5c5452['getIntersection'](_0x172042);_0xa7d340&&_0x56dad9['push'](_0xa7d340);}return _0x56dad9;}(_0x574f1c,_0x1eb190),_0x3ae156=function(_0x2927a7,_0x1bc1ee){const _0x5d0c9a=[_0x2927a7];for(const _0x2714f4 of _0x1bc1ee){let _0x4adf33=0x0;for(;_0x4adf33<_0x5d0c9a['length'];){const _0x2f43c8=_0x5d0c9a[_0x4adf33]['getDifference'](_0x2714f4);_0x5d0c9a['splice'](_0x4adf33,0x1,..._0x2f43c8),_0x4adf33+=_0x2f43c8['length'];}}return _0x5d0c9a;}(_0x574f1c,_0x1eb190);_0x220a96['length']&&this['_model']['change'](()=>{for(const _0x236170 of _0x220a96){const _0x49d232=this['_suggestionFactory']['getSuggestionCallback']('formatInline',_0xa4ecca,'accept');this['forceDefaultExecution'](()=>_0x49d232([_0x236170],_0x1edb62,_0x21710b));}});for(const _0x4b3be5 of _0x3ae156){let _0xb158d6=null,_0x4aa448=_0x4b3be5['start'],_0x33c4f9=_0x4b3be5['end'];for(const {suggestion:_0x40e6da,meta:_0x3d2c31}of this['_findSuggestions'](_0x4b3be5,'formatInline')){if(!_0x3d2c31['isOwn'])continue;if(_0x40e6da['subType']!=_0xa4ecca)continue;const _0x2fca43=_0x40e6da['getFirstRange']();if(_0x2fca43['containsRange'](_0x4b3be5,!0x0))return;_0x4aa448=_0x4aa448['isBefore'](_0x2fca43['start'])?_0x4aa448:_0x2fca43['start'],_0x33c4f9=_0x33c4f9['isAfter'](_0x2fca43['end'])?_0x33c4f9:_0x2fca43['end'],_0xb158d6?_0x2fca43['start']['isBefore'](_0xb158d6['getFirstRange']()['start'])?(_0xb158d6['removeMarkers'](),_0xb158d6=_0x40e6da):_0x40e6da['removeMarkers']():_0xb158d6=_0x40e6da;}const _0x5d8f34=this['_model']['createRange'](_0x4aa448,_0x33c4f9);if(_0xb158d6)this['_setSuggestionRange'](_0xb158d6,_0x5d8f34);else{const _0x30ac39=_0x5bd5e5(),_0x4d11a9=_0x14819d['id'];this['_setSuggestionData']({'id':_0x30ac39,'type':'formatInline:'+_0xa4ecca,'data':_0x1edb62,'createdAt':new Date(),'authorId':_0x4d11a9,'attributes':_0x21710b}),this['_addSuggestionMarker']('formatInline:'+_0xa4ecca,_0x30ac39,_0x4d11a9,_0x5d8f34);}}}['markBlockFormat'](_0x5e26c9,_0x25b85b,_0x2243c6=[],_0x2d3292=null,_0x4255e1={}){_0x25b85b['formatGroupId']||(_0x25b85b['formatGroupId']=_0x25b85b['commandName']),_0x25b85b['multipleBlocks']=_0x5e26c9['is']('range'),_0x2d3292=_0x2d3292||pt(_0x25b85b);const _0x281f85=_0x2243c6['map'](_0x4272ee=>wt(_0x4272ee,this['_model'])),_0x18d908=_0x5e26c9['is']('range')?_0x5e26c9:wt(_0x5e26c9,this['_model']);_0x281f85['push'](_0x18d908);let _0x59bb2b=!0x0;for(const _0x61cc2c of _0x281f85)if(!this['_rangeIsInLocalUserInsertion'](_0x61cc2c)){_0x59bb2b=!0x1;break;}if(_0x59bb2b){const _0x427716=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x2d3292,'accept');return void this['forceDefaultExecution'](()=>_0x427716([_0x18d908],_0x25b85b,_0x4255e1));}let _0xf77f19=null,_0x242955=_0x18d908['start'],_0x1e0ce9=_0x18d908['end'];for(const {suggestion:_0x5ea50f,meta:_0x2a682e}of this['_findSuggestions'](_0x18d908,'formatBlock')){if(!_0x2a682e['isOwn']||_0x2a682e['isNextTo']||_0x2a682e['containsRangeInObject']||_0x2a682e['isInsideObject'])continue;if(_0x5ea50f['data']['formatGroupId']!=_0x25b85b['formatGroupId'])continue;const _0x384802=_0x5ea50f['getFirstRange']();if(_0x5ea50f['subType']==_0x2d3292){if(_0x384802['containsRange'](_0x18d908,!0x0))return;_0x242955=_0x242955['isBefore'](_0x384802['start'])?_0x242955:_0x384802['start'],_0x1e0ce9=_0x1e0ce9['isAfter'](_0x384802['end'])?_0x1e0ce9:_0x384802['end'],_0xf77f19?_0x384802['start']['isBefore'](_0xf77f19['getFirstRange']()['start'])?(_0xf77f19['removeMarkers'](),_0xf77f19=_0x5ea50f):_0x5ea50f['removeMarkers']():_0xf77f19=_0x5ea50f;}else{const _0x56b2ff=_0x18d908['getIntersection'](_0x384802);this['_cutOutSuggestionMarker'](_0x5ea50f,_0x56b2ff);}}const _0x4638b5=this['editor']['plugins']['get']('Users')['me'],_0xec0206=_0x5bd5e5(),_0x49d19b=_0x4638b5['id'];_0xf77f19?this['_setSuggestionRange'](_0xf77f19,this['_model']['createRange'](_0x242955,_0x1e0ce9)):(this['_setSuggestionData']({'id':_0xec0206,'type':'formatBlock:'+_0x2d3292,'data':_0x25b85b,'createdAt':new Date(),'authorId':_0x49d19b,'attributes':_0x4255e1}),this['_addSuggestionMarker']('formatBlock:'+_0x2d3292,_0xec0206,_0x49d19b,this['_model']['createRange'](_0x242955,_0x1e0ce9)));}['markMultiRangeBlockFormat'](_0x505a7f,_0x4b5b49,_0x5444c7=[],_0x4337a0=null,_0x1304ca={}){_0x4b5b49['formatGroupId']||(_0x4b5b49['formatGroupId']=_0x4b5b49['commandName']),_0x4b5b49['multipleBlocks']=!0x1,_0x4337a0=_0x4337a0||pt(_0x4b5b49);const _0x2d0183=_0x5444c7['map'](_0x561ec0=>wt(_0x561ec0,this['_model'])),_0x41f41d=_0x505a7f['map'](_0x446fb3=>wt(_0x446fb3,this['_model']));_0x2d0183['push'](..._0x41f41d);let _0x260173=!0x0;for(const _0x305b91 of _0x2d0183)if(!this['_rangeIsInLocalUserInsertion'](_0x305b91)){_0x260173=!0x1;break;}if(_0x260173){const _0x20fba7=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x4337a0,'accept');return void this['forceDefaultExecution'](()=>_0x20fba7(_0x41f41d,_0x4b5b49,_0x1304ca));}const _0x258a67=this['editor']['plugins']['get']('Users')['me'];for(const _0x18ba85 of this['getSuggestions']()){if(_0x18ba85['author']['id']!=_0x258a67['id'])continue;if('formatBlock'!=_0x18ba85['type']||_0x18ba85['data']['formatGroupId']!=_0x4b5b49['formatGroupId'])continue;const _0x2c15d5=_0x18ba85['subType']==_0x4337a0;for(let _0x13ff79=0x0;_0x13ff79<_0x41f41d['length'];_0x13ff79++){const _0x2227a9=_0x41f41d[_0x13ff79];for(const _0xfd19e0 of _0x18ba85['getMarkers']()){const _0x32e163=_0xfd19e0['getRange']();if(_0x2227a9['isEqual'](_0x32e163)){_0x2c15d5?(_0x41f41d['splice'](_0x13ff79,0x1),_0x13ff79--):_0x18ba85['removeMarker'](_0xfd19e0['name']);break;}}}}if(0x0==_0x41f41d['length'])return;const _0x3f5cf1=this['_suggestionFactory']['getSuggestionCallback']('formatBlock',_0x4337a0,'join');for(const _0x2577d4 of this['getSuggestions']())if(_0x2577d4['author']['id']==_0x258a67['id']&&'formatBlock'==_0x2577d4['type']&&_0x2577d4['data']['formatGroupId']==_0x4b5b49['formatGroupId']&&_0x2577d4['subType']==_0x4337a0&&(_0x3f5cf1(_0x2577d4['getRanges'](),_0x41f41d)||_0x3f5cf1(_0x41f41d,_0x2577d4['getRanges']()))){for(const _0x3f6101 of _0x41f41d)_0x2577d4['addRange'](_0x3f6101);return _0x2577d4;}const _0xac136b=_0x5bd5e5(),_0x15cd49=_0x258a67['id'],_0x499f6f='formatBlock:'+_0x4337a0,_0x4357d7=this['_setSuggestionData']({'id':_0xac136b,'type':_0x499f6f,'data':_0x4b5b49,'createdAt':new Date(),'authorId':_0x15cd49,'attributes':_0x1304ca});for(const _0x2a5405 of _0x41f41d)this['_addSuggestionMarker'](_0x499f6f,_0xac136b,_0x15cd49,_0x2a5405,_0xbeb2bd['getMultiRangeId']());return _0x4357d7;}['markDeletion'](_0x4244b7,_0x4b6f4a=null,_0x3a783e={}){if(_0x4244b7['isCollapsed'])return null;const _0x53e949=this['editor']['plugins']['get']('Users')['me'],_0x2f147e=new _0x31ce06(_0x4244b7['start'],_0x4244b7['end']);for(const {suggestion:_0x3e556b,meta:_0x30516b}of this['_findSuggestions'](_0x2f147e,'insertion'))if(_0x30516b['isOwn']&&!_0x30516b['isNextTo']){if(_0x3e556b['isMultiRange']){const _0x58239a=_0x3e556b['getRanges']()['filter'](_0x1fe050=>'$graveyard'!=_0x1fe050['root']['rootName']);_0x58239a['every'](_0xe619bb=>_0x2f147e['containsRange'](_0xe619bb,!0x0))&&_0x3e556b['discard']();if(_0x58239a['some'](_0x50057f=>_0x50057f['containsRange'](_0x2f147e,!0x0))){const _0x540f59=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x4b6f4a,'accept');return this['forceDefaultExecution'](()=>_0x540f59([_0x2f147e],null,_0x3a783e)),null;}}else{const _0x2b1ba7=_0x2f147e['getIntersection'](_0x3e556b['getFirstRange']());_0x3e556b['_onDiscard']([_0x2b1ba7],null,_0x3a783e);}}if(_0x2f147e['detach'](),_0x2f147e['isCollapsed']||'$graveyard'==_0x2f147e['root']['rootName'])return null;let _0x5c874c=null,_0x45fe25=_0x2f147e['start'],_0x1930a8=_0x2f147e['end'];for(const {suggestion:_0x200ee8,meta:_0x24eea4}of this['_findSuggestions'](_0x2f147e,'deletion'))if(_0x24eea4['isOwn']){if(_0x200ee8['isMultiRange']){let _0x1fea31=!0x0;for(const _0x1fdfd8 of _0x200ee8['getRanges']()){if(_0x1fdfd8['containsRange'](_0x2f147e,!0x0))return _0x200ee8;_0x2f147e['containsRange'](_0x1fdfd8)||(_0x1fea31=!0x1);}_0x1fea31&&_0x200ee8['discard']();}else{const _0x51ad67=_0x200ee8['getFirstRange']();if(_0x51ad67['containsRange'](_0x2f147e,!0x0))return _0x200ee8;_0x45fe25=_0x45fe25['isBefore'](_0x51ad67['start'])?_0x45fe25:_0x51ad67['start'],_0x1930a8=_0x1930a8['isAfter'](_0x51ad67['end'])?_0x1930a8:_0x51ad67['end'],_0x5c874c?_0x51ad67['start']['isBefore'](_0x5c874c['getFirstRange']()['start'])?(_0x5c874c['removeMarkers'](),_0x5c874c=_0x200ee8):_0x200ee8['removeMarkers']():_0x5c874c=_0x200ee8;}}if(_0x5c874c)return this['_setSuggestionRange'](_0x5c874c,this['_model']['createRange'](_0x45fe25,_0x1930a8)),_0x5c874c;{const _0x1e0816=_0x5bd5e5(),_0x1bd0fc=this['_model']['createRange'](_0x45fe25,_0x1930a8),_0x4e6e28=_0x53e949['id'],_0x14be4e=_0x4b6f4a?'deletion:'+_0x4b6f4a:'deletion',_0x1275ea=this['_setSuggestionData']({'id':_0x1e0816,'type':_0x14be4e,'createdAt':new Date(),'authorId':_0x4e6e28,'attributes':_0x3a783e});return this['_addSuggestionMarker'](_0x14be4e,_0x1e0816,_0x4e6e28,_0x1bd0fc),_0x1275ea;}}['markMultiRangeDeletion'](_0x2127f6,_0x5c6c52='multi',_0x37f01a={}){const _0xd1fbbf=this['editor']['plugins']['get']('Users')['me'],_0x4842c8=_0x2127f6['map'](_0x4e7dae=>new _0x31ce06(_0x4e7dae['start'],_0x4e7dae['end'])),_0x5270d2=new Set();for(const _0x17c47e of _0x4842c8)for(const {suggestion:_0x5a3bdc,meta:_0x1eadb6}of this['_findSuggestions'](_0x17c47e,'insertion'))_0x1eadb6['isOwn']&&!_0x1eadb6['isNextTo']&&_0x5270d2['add'](_0x5a3bdc);for(const _0x55f19c of _0x5270d2)if(_0x55f19c['isMultiRange']){const _0x5d831c=_0x55f19c['getRanges']();(!_0x55f19c['attributes']||!_0x55f19c['attributes']['skipNestingCheck'])&&(_0x5d831c['every'](_0x10ad66=>_0x4842c8['some'](_0x108ae6=>_0x108ae6['containsRange'](_0x10ad66,!0x0)))&&_0x55f19c['discard']());if(_0x4842c8['every'](_0x425e09=>_0x5d831c['some'](_0x3b4ad8=>_0x3b4ad8['containsRange'](_0x425e09,!0x0)))){const _0x32899d=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x5c6c52,'accept');return this['forceDefaultExecution'](()=>_0x32899d(_0x2127f6,null,_0x37f01a)),null;}}else{const _0x47d5ae=_0x55f19c['getFirstRange']();_0x4842c8['some'](_0x4d95d4=>_0x4d95d4['containsRange'](_0x47d5ae,!0x0))&&_0x55f19c['discard']();if(_0x4842c8['every'](_0x4c0ef9=>_0x47d5ae['containsRange'](_0x4c0ef9,!0x0))){const _0x294465=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x5c6c52,'accept');return this['forceDefaultExecution'](()=>_0x294465(_0x4842c8,null,_0x37f01a)),null;}}const _0x2c41a8=this['_suggestionFactory']['getSuggestionCallback']('deletion',_0x5c6c52,'join');let _0x2a58fc=null;for(const _0x4d3799 of this['getSuggestions']())if(_0x4d3799['author']['id']==_0xd1fbbf['id']&&_0x4d3799['isInContent']&&'deletion'==_0x4d3799['type']&&_0x4d3799['subType']==_0x5c6c52&&(_0x2c41a8(_0x4d3799['getRanges'](),_0x4842c8)||_0x2c41a8(_0x4842c8,_0x4d3799['getRanges']()))){if(_0x2a58fc){if(_0x4d3799['commentThread']&&_0x4d3799['commentThread']['length'])continue;for(const _0x59c0dd of _0x4d3799['getRanges']())_0x2a58fc['isIntersectingWithRange'](_0x59c0dd)||_0x2a58fc['addRange'](_0x59c0dd);_0x4d3799['removeMarkers']();}else{_0x2a58fc=_0x4d3799;for(const _0x100bc4 of _0x4842c8)_0x4d3799['isIntersectingWithRange'](_0x100bc4)||_0x4d3799['addRange'](_0x100bc4);}}if(_0x2a58fc)return _0x2a58fc;_0x5270d2['clear']();for(const _0x2ac1c8 of _0x4842c8)for(const {suggestion:_0x3e87c0,meta:_0x1d3102}of this['_findSuggestions'](_0x2ac1c8,'deletion'))_0x1d3102['isOwn']&&_0x5270d2['add'](_0x3e87c0);for(const _0x3afd8d of _0x5270d2){const _0x39449f=_0x3afd8d['getRanges']();if(!_0x37f01a||!_0x37f01a['skipNestingCheck']){if(_0x4842c8['every'](_0x3e919c=>_0x39449f['some'](_0x202686=>_0x202686['containsRange'](_0x3e919c,!0x0))))return _0x3afd8d;}(!_0x3afd8d['attributes']||!_0x3afd8d['attributes']['skipNestingCheck'])&&(_0x39449f['every'](_0x59fe36=>_0x4842c8['some'](_0x2f572e=>_0x2f572e['containsRange'](_0x59fe36,!0x0)))&&_0x3afd8d['discard']());}const _0x1c7dc3=_0x5bd5e5(),_0x3aa302=_0xd1fbbf['id'],_0x12a9d5='deletion:'+_0x5c6c52,_0x5a9d60=this['_setSuggestionData']({'id':_0x1c7dc3,'type':_0x12a9d5,'createdAt':new Date(),'authorId':_0x3aa302,'attributes':_0x37f01a});for(const _0x49e429 of _0x4842c8)_0x49e429['detach'](),_0x49e429['isCollapsed']||'$graveyard'==_0x49e429['root']['rootName']||this['_addSuggestionMarker'](_0x12a9d5,_0x1c7dc3,_0x3aa302,_0x49e429,_0xbeb2bd['getMultiRangeId']());return _0x5a9d60;}['_setSuggestionRange'](_0x143899,_0x46ab17){const _0x3a55bf=_0x143899['getFirstMarker']();this['_model']['change'](_0x72b55f=>{_0x72b55f['updateMarker'](_0x3a55bf,{'range':_0x46ab17});});}['_addThreadToSuggestion'](_0x141d83){const _0x4230cc=_0x141d83['id'],_0x37a2e1=this['editor']['config']['get']('collaboration.channelId');this['_commentsRepository']['hasCommentThread'](_0x4230cc)||this['_commentsRepository']['addCommentThread']({'channelId':_0x37a2e1,'threadId':_0x4230cc});const _0x4e6db7=this['_commentsRepository']['getCommentThread'](_0x4230cc);_0x4e6db7['unbind']('isRemovable'),_0x4e6db7['isRemovable']=!0x1,_0x141d83['commentThread']=_0x4e6db7;}['_checkSuggestionCorrectness'](_0x527bbc,_0x44d14e,_0x16a9d6,_0x20ba84){if(_0x527bbc['type']!=_0x44d14e||_0x527bbc['subType']!=_0x16a9d6||_0x527bbc['author']['id']!=_0x20ba84)throw this['editor']['enableReadOnlyMode']('track-changes-suggestion-data-mismatch'),new _0x3af4d7('track-changes-suggestion-data-mismatch',this);}['_cutOutSuggestionMarker'](_0x3c8f99,_0x3dce3c){const _0x2b80e7=_0x3c8f99['getFirstRange']();if(_0x3dce3c['isEqual'](_0x2b80e7))_0x3c8f99['removeMarkers']();else{if(_0x2b80e7['containsRange'](_0x3dce3c)){const _0x51b2a9=this['_model']['createPositionAt'](_0x3dce3c['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x3c8f99,this['_model']['createRange'](_0x2b80e7['start'],_0x51b2a9));const _0x402f2b=_0x5bd5e5(),_0x5b8fb1=_0x3c8f99['author']['id'],_0x1f805d=_0x3c8f99['type']+':'+_0x3c8f99['subType'];this['_setSuggestionData']({'id':_0x402f2b,'type':_0x1f805d,'createdAt':new Date(),'authorId':_0x5b8fb1,'data':_0x3c8f99['data'],'attributes':_0x3c8f99['attributes']});const _0x538eed=this['_model']['createPositionAt'](_0x3dce3c['end']['parent'],'after'),_0x400b26=this['_model']['createRange'](_0x538eed,_0x2b80e7['end']);this['_addSuggestionMarker'](_0x1f805d,_0x402f2b,_0x5b8fb1,_0x400b26);}else{if(_0x2b80e7['containsPosition'](_0x3dce3c['start'])){const _0x4fb0a2=this['_model']['createPositionAt'](_0x3dce3c['start']['nodeBefore'],'end');this['_setSuggestionRange'](_0x3c8f99,this['_model']['createRange'](_0x2b80e7['start'],_0x4fb0a2));}else{const _0x4d898b=this['_model']['createPositionAt'](_0x3dce3c['end']['parent'],'after');this['_setSuggestionRange'](_0x3c8f99,this['_model']['createRange'](_0x4d898b,_0x2b80e7['end']));}}}}['_rangeIsInLocalUserInsertion'](_0x11cf37){for(const {suggestion:_0x1877d8,meta:_0x817ca9}of this['_findSuggestions'](_0x11cf37,'insertion')){if(!_0x817ca9['isOwn'])continue;const _0x1fb500=_0x1877d8['getRanges']();for(const _0x51ad07 of _0x1fb500)if(!_0x11cf37['getDifference'](_0x51ad07)['length'])return!0x0;}return!0x1;}['_getAuthorFromId'](_0x4e7e6a){const _0x29b434=this['editor']['plugins']['get']('Users')['getUser'](_0x4e7e6a);if(!_0x29b434)throw new _0x3af4d7('track-changes-user-not-found',this);return _0x29b434;}['_createSuggestion'](_0x4139da,_0x5bb773,_0xdbf4df,_0x37f4e5){const _0x1fc061=this['_getAuthorFromId'](_0x37f4e5),_0x39906d=this['_suggestionFactory']['buildSuggestion'](_0x4139da,_0x5bb773,_0xdbf4df,_0x1fc061,_0x133bb1=>this['_updateSuggestionData'](_0xdbf4df,{'attributes':_0x133bb1}));return this['listenTo'](_0x39906d,'accept',()=>{this['_updateSuggestionData'](_0xdbf4df,{'state':'accepted'});},{'priority':'high'}),this['listenTo'](_0x39906d,'discard',()=>{this['_updateSuggestionData'](_0xdbf4df,{'state':'rejected'});},{'priority':'high'}),this['_suggestions']['set'](_0xdbf4df,_0x39906d),this['_suggestionState']['set'](_0x39906d,'notReady'),_0x39906d;}['_splitMarkerName'](_0x560fe5){const _0x547c58=_0x560fe5['split'](':');return{'group':_0x547c58[0x0],'type':_0x547c58[0x1],'subType':_0x547c58['length']>=0x5?_0x547c58[0x2]:null,'id':_0x547c58['length']<0x5?_0x547c58[0x2]:_0x547c58[0x3],'authorId':_0x547c58['length']<0x5?_0x547c58[0x3]:_0x547c58[0x4],'markerCount':0x6==_0x547c58['length']?_0x547c58[0x5]:null};}['_breakSuggestionMarker'](_0x32f8f9,_0x4b64c7,_0x4449fc){const _0x332c41=_0x32f8f9['getFirstRange'](),_0x1a6770=_0x332c41['start'],_0xed8e12=_0x332c41['end'];this['_setSuggestionRange'](_0x32f8f9,this['_model']['createRange'](_0x1a6770,_0x4b64c7));const _0x567272=_0x5bd5e5(),_0x37ff1b=_0x32f8f9['author']['id'],_0x37cd26=_0x32f8f9['type']+(_0x32f8f9['subType']?':'+_0x32f8f9['subType']:'');this['_setSuggestionData']({'id':_0x567272,'type':_0x37cd26,'createdAt':new Date(),'authorId':_0x37ff1b,'originalSuggestionId':_0x32f8f9['id'],'data':_0x32f8f9['data']}),'formatBlock'==_0x32f8f9['type']&&(_0x4449fc=this['_model']['createPositionBefore'](_0x4449fc['parent'])),this['_addSuggestionMarker'](_0x37cd26,_0x567272,_0x37ff1b,this['_model']['createRange'](_0x4449fc,_0xed8e12));}['_findSuggestions'](_0x279887,_0x127fde=null){const _0x148612=[],_0x1e8f28=this['_model']['schema'],_0x69d08d=this['editor']['plugins']['get']('Users')['me'];for(const _0x1fc996 of this['getSuggestions']())if(_0x1fc996['isInContent']&&(!_0x127fde||_0x1fc996['type']==_0x127fde))for(const _0x35dd16 of _0x1fc996['getRanges']()){const _0x26481d=_0x279887['start']['isEqual'](_0x35dd16['end'])||_0x279887['end']['isEqual'](_0x35dd16['start']);if(_0x26481d||_0x279887['getIntersection'](_0x35dd16)){const _0xa94a6b=_0x279887['containsRange'](_0x35dd16)&<(_0x1e8f28,_0x35dd16['start'],_0x279887),_0x2c6d7f=_0x35dd16['containsRange'](_0x279887)&<(_0x1e8f28,_0x279887['start'],_0x35dd16);_0x148612['push']({'suggestion':_0x1fc996,'meta':{'isOwn':_0x69d08d==_0x1fc996['author'],'isNextTo':_0x26481d,'isInsideObject':_0xa94a6b,'containsRangeInObject':_0x2c6d7f}});break;}}return _0x148612;}['_addSuggestionMarker'](_0x86c9f3,_0x5eb937,_0x3b08bd,_0x5085df,_0xe1b3cc=null){this['_model']['change'](_0x1c7eaa=>{let _0x2c9410='suggestion:'+_0x86c9f3+':'+_0x5eb937+':'+_0x3b08bd;_0xe1b3cc&&(_0x2c9410=_0x2c9410+':'+_0xe1b3cc),_0x1c7eaa['addMarker'](_0x2c9410,{'range':_0x5085df,'usingOperation':!0x0,'affectsData':!0x0});});}['_removeSuggestion'](_0x3cec4b){const _0x555972=_0x3cec4b['previous'],_0x3c5aa1=_0x3cec4b['next'];_0x3cec4b['previous']=null,null!=_0x555972&&(_0x555972['next']=null),_0x3cec4b['next']=null,null!=_0x3c5aa1&&(_0x3c5aa1['previous']=null),'ready'==this['_suggestionState']['get'](_0x3cec4b)&&(this['_suggestionState']['set'](_0x3cec4b,'removed'),this['fire']('suggestionUnloaded',_0x3cec4b,_0x555972,_0x3c5aa1));}['_setSuggestionData'](_0x25975b){const _0x542ed4=_0x25975b['id'],_0x21c6d1=this['addSuggestionData'](_0x25975b);if(this['_adapter']&&this['_adapter']['addSuggestion']){const _0x50ba78=this['editor']['plugins']['get']('PendingActions'),_0x1289a2=_0x21c6d1['hasComments'],_0x4d1a4c=_0x21c6d1['subType']?_0x21c6d1['type']+':'+_0x21c6d1['subType']:_0x21c6d1['type'],t=this['editor']['locale']['t'],_0x2c37df=_0x50ba78['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'})),_0x254710={'id':_0x542ed4,'type':_0x4d1a4c,'hasComments':_0x1289a2,'data':_0x25975b['data']||null,'originalSuggestionId':_0x25975b['originalSuggestionId']||null,'attributes':_0x21c6d1['attributes']};this['_adapter']['addSuggestion'](_0x254710)['then'](_0x5121b6=>{_0x21c6d1['_saved']=!0x0,_0x50ba78['remove'](_0x2c37df),_0x5121b6&&_0x5121b6['createdAt']&&(this['_suggestions']['get'](_0x542ed4)['createdAt']=_0x5121b6['createdAt']);});}return _0x21c6d1;}['_updateSuggestionData'](_0x2351c2,_0x23b59f){const _0x34eb39=this['editor']['plugins']['get']('PendingActions'),_0x56644c=this['_suggestions']['get'](_0x2351c2);if(this['_adapter']&&this['_adapter']['updateSuggestion']){if(_0x56644c['_saved']){const t=this['editor']['locale']['t'],_0x1482db=_0x34eb39['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));this['_adapter']['updateSuggestion'](_0x2351c2,_0x23b59f)['then'](()=>{_0x34eb39['remove'](_0x1482db);});}else _0x56644c['on']('change:_saved',()=>{this['_updateSuggestionData'](_0x2351c2,_0x23b59f);});}}['_getSuggestionData'](_0x4cbad8){if(!this['_adapter']||!this['_adapter']['getSuggestion'])throw new _0x3af4d7('track-changes-adapter-missing-getsuggestion',this);return this['_adapter']['getSuggestion'](_0x4cbad8);}['_handleNewSuggestionMarker'](_0x240389){const {id:_0x5c17fb,type:_0x19dfbf,subType:_0x1e041f,authorId:_0x8c6aba}=this['_splitMarkerName'](_0x240389),_0x2c778e=this['_suggestions']['get'](_0x5c17fb)||this['_createSuggestion'](_0x19dfbf,_0x1e041f,_0x5c17fb,_0x8c6aba);switch(this['_checkSuggestionCorrectness'](_0x2c778e,_0x19dfbf,_0x1e041f,_0x8c6aba),this['_suggestionState']['get'](_0x2c778e)){case'notReady':this['_getSuggestionData'](_0x5c17fb)['then'](_0x59b519=>{let _0x4ed2a9=Promise['resolve']();_0x59b519['hasComments']&&(_0x4ed2a9=this['_commentsRepository']['fetchCommentThread']({'channelId':this['editor']['config']['get']('collaboration.channelId'),'threadId':_0x5c17fb})),_0x4ed2a9['then'](()=>{this['addSuggestionData'](_0x59b519)['_saved']=!0x0;});}),this['_suggestionState']['set'](_0x2c778e,'markerReady');break;case'removed':this['_updateSuggestionData'](_0x5c17fb,{'state':'open'});case'dataReady':this['_suggestionState']['set'](_0x2c778e,'ready'),this['fire']('suggestionLoaded',_0x2c778e);break;case'ready':this['fire']('suggestionChanged',_0x2c778e);}_0x2c778e['addMarkerName'](_0x240389),this['_refreshSuggestionsChain'](_0x2c778e);}['_refreshSuggestionsChain'](_0x27fec4){if(_0x27fec4['isMultiRange'])return;let _0x2d8bdf=!0x0,_0x43fc97=!0x0;for(const _0x35325e of this['getSuggestions']()){if(_0x35325e['isMultiRange'])continue;if(_0x35325e==_0x27fec4||!_0x35325e['isInContent'])continue;if(_0x35325e['author']['id']!=_0x27fec4['author']['id'])continue;const _0x28a224=this['_suggestionFactory']['getSuggestionCallback'](_0x27fec4['type'],_0x27fec4['subType'],'chain'),_0xe28724=this['_suggestionFactory']['getSuggestionCallback'](_0x35325e['type'],_0x35325e['subType'],'chain'),_0x5c5505=_0x28a224(_0x27fec4,_0x35325e),_0x189474=_0xe28724(_0x27fec4,_0x35325e);_0x5c5505&&_0x189474&&(_0x5c5505[0x1]['commentThread']&&_0x5c5505[0x1]['commentThread']['length']||(_0x5c5505[0x0]['next']=_0x5c5505[0x1],_0x5c5505[0x1]['previous']=_0x5c5505[0x0],_0x5c5505[0x0]==_0x27fec4?_0x43fc97=!0x1:_0x2d8bdf=!0x1));}_0x27fec4['previous']&&_0x2d8bdf&&(_0x27fec4['previous']['next']=null,_0x27fec4['previous']=null),_0x27fec4['next']&&_0x43fc97&&(_0x27fec4['next']['previous']=null,_0x27fec4['next']=null);}['_joinWithAdjacentSuggestions'](_0x110553){for(const _0x422430 of this['_suggestions']['values']()){if(_0x422430==_0x110553||!_0x422430['isInContent'])continue;if(_0x422430['type']!=_0x110553['type']||_0x422430['author']['id']!=_0x110553['author']['id']||_0x422430['subType']!=_0x110553['subType'])continue;const _0x3da12a=this['_suggestionFactory']['getSuggestionCallback'](_0x110553['type'],_0x110553['subType'],'join');if(_0x3da12a(_0x422430['getRanges'](),_0x110553['getRanges']())){if(_0x110553['commentThread']&&_0x110553['commentThread']['length'])continue;return this['_joinSuggestions'](_0x422430,_0x110553),!0x0;}if(_0x3da12a(_0x110553['getRanges'](),_0x422430['getRanges']())){if(_0x422430['commentThread']&&_0x422430['commentThread']['length'])continue;return this['_joinSuggestions'](_0x110553,_0x422430),!0x0;}}return!0x1;}['_joinSuggestions'](_0xb203da,_0x46c9ce){if(_0xb203da['isMultiRange'])for(const _0xab860c of _0x46c9ce['getRanges']())_0xb203da['addRange'](_0xab860c);else{const _0x362089=_0x46c9ce['getFirstRange']()['end'];this['_setSuggestionRange'](_0xb203da,this['_model']['createRange'](_0xb203da['getFirstRange']()['start'],_0x362089));}_0x46c9ce['removeMarkers']();}}_0x1aa60c(d,_0x50e452);class gt{constructor(_0x612052){this['_editor']=_0x612052,this['_model']=_0x612052['model'],this['_customCallbacks']=new Map(),this['_defaultCallbacks']=new Map(),this['_registerDefaultCallbacks']();}['buildSuggestion'](_0x304fd5,_0x42241c,_0xbf8c17,_0x569098,_0x4f35a7){return new _0xbeb2bd(this['_model'],{'type':_0x304fd5,'subType':_0x42241c,'id':_0xbf8c17,'author':_0x569098,'onAttributesChange':_0x4f35a7,'onAccept':(..._0x43a293)=>this['getSuggestionCallback'](_0x304fd5,_0x42241c,'accept')(..._0x43a293),'onDiscard':(..._0x172fbb)=>this['getSuggestionCallback'](_0x304fd5,_0x42241c,'discard')(..._0x172fbb)});}['registerCustomCallback'](_0xec5a28,_0x5a8f81,_0xf17096,_0x462667){const _0x3436cf=_0xec5a28+':'+_0x5a8f81+':'+_0xf17096;this['_customCallbacks']['set'](_0x3436cf,_0x462667);}['getSuggestionCallback'](_0x496e7c,_0x562982,_0x468199){const _0x16de6b=_0x496e7c+':'+_0x562982+':'+_0x468199;return this['_customCallbacks']['get'](_0x16de6b)||this['_defaultCallbacks']['get'](_0x496e7c+':'+_0x468199);}['_registerDefaultCallbacks'](){const _0xd9dd=()=>{},_0x31ffe5=_0x1995b0=>{_0x1995b0['sort']((_0x536777,_0x26bee9)=>_0x536777['start']['isBefore'](_0x26bee9['start'])?0x1:-0x1),this['_model']['change'](_0x549050=>{for(const _0x44f2c9 of _0x1995b0){let _0xcb4574;_0xcb4574=_0x44f2c9['end']['isAtEnd']&&_0x44f2c9['end']['parent']==_0x44f2c9['start']['nodeAfter']?_0x549050['createSelection'](_0x44f2c9['start']['nodeAfter'],'on'):_0x549050['createSelection'](_0x44f2c9),this['_model']['deleteContent'](_0xcb4574,{'forceDefaultExecution':!0x0,'doNotAutoparagraph':!0x0});}});},_0x4cdf05=(_0x573cf5,_0x46eeb5)=>{this['_model']['change'](_0x54af97=>{const {commandName:_0x45c392,commandParams:_0x66ed2b=[]}=_0x46eeb5,_0x15bb1d=_0x573cf5[0x0];if('$graveyard'==_0x15bb1d['root']['rootName'])return;const _0x33dd8f=Array['from'](this['_model']['document']['selection']['getRanges']())['map'](_0x1a76e7=>_0x31ce06['fromRange'](_0x1a76e7));dt(_0x15bb1d)?_0x54af97['setSelection'](this['_model']['createRange'](_0x15bb1d['end'])):_0x54af97['setSelection'](_0x15bb1d);for(const _0x44cab7 of this['_editor']['commands']['commands']())_0x44cab7['refresh']();_0x66ed2b['push']({'forceDefaultExecution':!0x0}),this['_editor']['execute'](_0x45c392,..._0x66ed2b);const _0x45bf47=_0x33dd8f['filter'](_0x163587=>'$graveyard'!=_0x163587['root']['rootName']);_0x45bf47['length']>0x0&&_0x54af97['setSelection'](_0x45bf47);for(const _0x52cf37 of _0x33dd8f)_0x52cf37['detach']();});},_0xcce9c3=(_0x268bb4,_0xb7965f)=>0x1==_0x268bb4['length']&&0x1==_0xb7965f['length']&&_0x268bb4[0x0]['end']['isEqual'](_0xb7965f[0x0]['start']),_0x5a91f9=(_0x172cf8,_0x22d2db)=>yt(_0x172cf8,_0x22d2db,this['_model'])?[_0x172cf8,_0x22d2db]:yt(_0x22d2db,_0x172cf8,this['_model'])?[_0x22d2db,_0x172cf8]:null;this['_defaultCallbacks']['set']('insertion:accept',_0xd9dd),this['_defaultCallbacks']['set']('insertion:discard',_0x31ffe5),this['_defaultCallbacks']['set']('insertion:join',_0xcce9c3),this['_defaultCallbacks']['set']('insertion:chain',_0x5a91f9),this['_defaultCallbacks']['set']('deletion:accept',_0x31ffe5),this['_defaultCallbacks']['set']('deletion:discard',_0xd9dd),this['_defaultCallbacks']['set']('deletion:join',_0xcce9c3),this['_defaultCallbacks']['set']('deletion:chain',_0x5a91f9),this['_defaultCallbacks']['set']('formatInline:accept',_0x4cdf05),this['_defaultCallbacks']['set']('formatInline:discard',_0xd9dd),this['_defaultCallbacks']['set']('formatInline:join',_0xcce9c3),this['_defaultCallbacks']['set']('formatInline:chain',_0xd9dd),this['_defaultCallbacks']['set']('formatBlock:accept',_0x4cdf05),this['_defaultCallbacks']['set']('formatBlock:discard',_0xd9dd),this['_defaultCallbacks']['set']('formatBlock:join',_0xcce9c3),this['_defaultCallbacks']['set']('formatBlock:chain',_0xd9dd);}}function lt(_0x1e187b,_0x53f8c6,_0x3e5141){for(const _0x5b35e of _0x53f8c6['parent']['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})){if(_0x5b35e['root']==_0x5b35e)return!0x1;if(!_0x3e5141['containsItem'](_0x5b35e))return!0x1;if(_0x1e187b['isObject'](_0x5b35e)||_0x1e187b['isLimit'](_0x5b35e))return!0x0;}}function dt(_0x3a4dc7){return _0x3a4dc7['end']['parent']==_0x3a4dc7['start']['nodeAfter']&&_0x3a4dc7['end']['isAtStart'];}function mt(_0x1ca862,_0x92404a,_0x21217e,_0x536629){const _0x5e38b0=_0x1f7777=>!_0x1f7777['item']['is']('textProxy')&&!_0x536629['isObject'](_0x1f7777['item']),_0x5e73b6=_0x1ca862['start']['getLastMatchingPosition'](_0x5e38b0),_0x5cde55=_0x1ca862['end']['getLastMatchingPosition'](_0x5e38b0,{'direction':'backward'});return(!_0x1ca862['start']['isEqual'](_0x5e73b6)||!_0x1ca862['end']['isEqual'](_0x5cde55))&&(_0x5e73b6['isBefore'](_0x5cde55)?_0x21217e['updateMarker'](_0x92404a,{'range':_0x21217e['createRange'](_0x5e73b6,_0x5cde55)}):_0x21217e['removeMarker'](_0x92404a),!0x0);}function pt(_0x3cdda5){return ft(_0x3cdda5);}function kt(_0x4c82bc){const _0x5d4d51=_0x4c82bc['start']['nodeAfter'];return _0x5d4d51&&_0x5d4d51['is']('element');}function wt(_0x35ca2c,_0x55d5ce){const _0x1e2ba7=_0x55d5ce['schema']['isObject'](_0x35ca2c)||_0x55d5ce['schema']['isSelectable'](_0x35ca2c);return _0x55d5ce['createRange'](_0x55d5ce['createPositionAt'](_0x35ca2c,'before'),_0x1e2ba7?_0x55d5ce['createPositionAfter'](_0x35ca2c):_0x55d5ce['createPositionAt'](_0x35ca2c,'end'));}function yt(_0x13358c,_0x182ee1,_0x19129b){const _0x365631=_0x13358c['getFirstRange'](),_0x4a833=_0x182ee1['getFirstRange']();if(_0x365631['end']['isEqual'](_0x4a833['start']))return!0x0;if(_0x13358c['type']!=_0x182ee1['type'])return!0x1;if(!_0x365631['end']['isTouching'](_0x4a833['start']))return!0x1;const _0xa0b025=_0x19129b['createRange'](_0x365631['end'],_0x4a833['start'])['getWalker']();for(const _0x440670 of _0xa0b025)if(['elementStart','elementEnd']['includes'](_0x440670['type'])&&_0x19129b['schema']['isLimit'](_0x440670['item']))return!0x1;return!0x0;}
|
package/src/trackchangesui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x55ca1d}from'ckeditor5/src/core';import{Collection as Ct}from'ckeditor5/src/utils';import{Model as bt,SplitButtonView as Tt,createDropdown as At,addListToDropdown as xt}from'ckeditor5/src/ui';import{Users as _0x7113d2,getDateTimeFormatter as Et,getMarkerDomElement as St}from'ckeditor5-collaboration/src/collaboration-core';import _0x3d2550 from'./trackchangesediting';import vt from'./ui/suggestioncontroller';import Nt from'./ui/view/suggestionthreadview';import It from'../theme/icons/track-changes.svg';import{debounce as Dt}from'lodash-es';export default class m extends _0x55ca1d{static get['requires'](){return[_0x3d2550,_0x7113d2,'CommentsRepository','Annotations','EditorAnnotations'];}static get['pluginName'](){return'TrackChangesUI';}constructor(_0x21683c){super(_0x21683c),this['_suggestionToController']=new Map(),this['_viewToController']=new Map(),this['_debouncedHandlers']=new Map();const _0x1a95bb=this['editor']['config'];_0x1a95bb['define']('trackChanges.SuggestionThreadView',Nt),_0x1a95bb['define']('trackChanges.disableComments',!0x1),this['_disableComments']=_0x1a95bb['get']('trackChanges.disableComments');}['init'](){const _0x2420d4=this['editor'],_0x2beb6a=_0x2420d4['plugins']['get'](_0x3d2550),_0x1a5600=_0x2420d4['plugins']['get']('Annotations'),_0x15a4d3=_0x2420d4['plugins']['get']('EditorAnnotations'),_0x3b3a80=_0x2420d4['plugins']['get']('CommentsRepository');_0x2420d4['ui']['componentFactory']['add']('trackChanges',_0x1f8adc=>this['_createUIButton'](_0x1f8adc)),_0x15a4d3['addSourceCollector'](()=>{const _0x3e2be6=[];for(const [_0x4649d1,_0x21cd0e]of Array['from'](this['_suggestionToController'])){const _0x4a475f=_0x4649d1['getAllAdjacentSuggestions'](),_0x556173=[];for(const _0x3ba956 of _0x4a475f){if(!_0x3ba956['isInContent'])continue;if(_0x3ba956['isMultiRange']){_0x556173['push'](..._0x3ba956['getRanges']());continue;}const _0x49371f=_0x3ba956['getFirstRange']();if(_0x556173['length']>0x0){const _0xc5160e=_0x556173[0x0]['getJoined'](_0x49371f);if(_0xc5160e){_0x556173[0x0]=_0xc5160e;continue;}}_0x556173['push'](_0x49371f);}_0x3e2be6['push']([_0x21cd0e['view'],_0x556173]);}return _0x3e2be6;}),this['listenTo'](_0x2beb6a,'suggestionLoaded',(_0x2e21f7,_0x1bf71b)=>{let _0x4fe29a=!0x1;const _0x5848a0=Dt(_0x3863de=>{_0x4fe29a||_0x3863de?_0x4fe29a&&_0x3863de&&(this['_destroyController'](_0x1bf71b),_0x15a4d3['refreshSelectedViews'](),_0x4fe29a=!0x1):(this['_initializeController'](_0x1bf71b),_0x15a4d3['refreshSelectedViews'](),_0x4fe29a=!0x0);},0xa);this['_debouncedHandlers']['set'](_0x1bf71b,_0x5848a0),this['listenTo'](_0x1bf71b,'change:previous',(_0xf4cd6d,_0x2f749f,_0x55f398,_0x3d2a21)=>{_0x1bf71b['isInContent']&&(null==_0x55f398?(this['_updateController'](_0x3d2a21['head']),_0x5848a0(!0x1)):(this['_updateController'](_0x55f398['head']),_0x5848a0(!0x0)));}),null===_0x1bf71b['previous']?_0x5848a0(!0x1):this['_updateController'](_0x1bf71b['head']);}),this['listenTo'](_0x2beb6a,'suggestionUnloaded',(_0x1c6a63,_0x6e7bec,_0x4c6976)=>{this['stopListening'](_0x6e7bec,'change:previous'),this['_debouncedHandlers']['get'](_0x6e7bec)['cancel'](),this['_debouncedHandlers']['delete'](_0x6e7bec);const _0x528a4b=_0x4c6976?_0x4c6976['head']:_0x6e7bec,_0x5985a4=this['_suggestionToController']['get'](_0x528a4b);null!==_0x4c6976&&this['_updateController'](_0x528a4b),null===_0x4c6976&&_0x5985a4&&this['_destroyController'](_0x6e7bec);}),this['listenTo'](_0x2beb6a,'suggestionChanged',(_0x45f29f,_0xcb25e5)=>{this['_updateController'](_0xcb25e5);}),this['listenTo'](_0x1a5600,'change:activeAnnotations',(_0x127996,_0x6d60a3,_0x4296df)=>{const _0x2163fe=Array['from'](_0x4296df,_0x10249e=>_0x10249e['innerView'])['filter'](_0x394002=>this['_viewToController']['has'](_0x394002)),_0x2d661f=[];for(const _0x5caefc of _0x2163fe){const _0x3c7179=this['_viewToController']['get'](_0x5caefc)['model']['getAllAdjacentSuggestions']();_0x2d661f['push'](..._0x3c7179['reduce']((_0x5b87ee,_0x52486d)=>[..._0x5b87ee,..._0x52486d['getMarkerNames']()],[]));}_0x2beb6a['activeMarkers']=_0x2d661f;}),this['listenTo'](_0x3b3a80,'addComment',(_0xb1adea,{threadId:_0x25cfb0,isFromAdapter:_0x560c48})=>{if(_0x560c48||!_0x2beb6a['hasSuggestion'](_0x25cfb0))return;const _0x24c36a=_0x2beb6a['getSuggestion'](_0x25cfb0);this['_suggestionToController']['get'](_0x24c36a)['view']['focus']();},{'priority':'lowest'});}['_createUIButton'](_0x1e4d52){const _0x53e5ea=At(_0x1e4d52,Tt),_0x439127=this['editor']['commands']['get']('trackChanges'),{t:t}=this['editor'];_0x53e5ea['buttonView']['set']({'tooltip':t('Track\x20changes'),'label':t('Track\x20changes'),'icon':It}),_0x53e5ea['buttonView']['bind']('isOn')['to'](_0x439127,'value'),_0x53e5ea['buttonView']['on']('execute',()=>_0x439127['execute']());const _0x1e3dd9=new Ct(),_0x4a5394=[{'type':'switchbutton','model':{'withText':!0x0,'label':t('Track\x20changes'),'commandName':'trackChanges'}},{'type':'separator'},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20suggestions'),'commandName':'acceptAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20selected\x20suggestions'),'commandName':'acceptSelectedSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20suggestions'),'commandName':'discardAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20selected\x20suggestions'),'commandName':'discardSelectedSuggestions'}}];for(const _0x1291ea of _0x4a5394){const _0x45ddf4={'type':_0x1291ea['type']};if(_0x1291ea['model']){const _0x268c75=new bt(_0x1291ea['model']),_0x175984=this['editor']['commands']['get'](_0x268c75['commandName']);_0x268c75['bind']('isOn','isEnabled')['to'](_0x175984,'value','isEnabled'),_0x45ddf4['model']=_0x268c75;}_0x1e3dd9['add'](_0x45ddf4);}xt(_0x53e5ea,_0x1e3dd9);const _0x2757ac=_0x4a5394['filter'](_0x2408b1=>null!=_0x2408b1['model'])['map'](_0x27e9b2=>this['editor']['commands']['get'](_0x27e9b2['model']['commandName']));return _0x53e5ea['buttonView']['actionView']['unbind']('isEnabled'),_0x53e5ea['buttonView']['arrowView']['unbind']('isEnabled'),_0x53e5ea['buttonView']['actionView']['bind']('isEnabled')['to'](_0x439127,'isEnabled'),_0x53e5ea['buttonView']['arrowView']['bind']('isEnabled')['toMany'](_0x2757ac,'isEnabled',(..._0x8cc447)=>_0x8cc447['some'](_0x2b9399=>_0x2b9399)),_0x53e5ea['on']('execute',_0x458858=>this['editor']['execute'](_0x458858['source']['commandName'])),_0x53e5ea;}['_initializeController'](_0xdb0cd){const _0x315e7b=this['editor'],_0x27c82f=_0x315e7b['config'],_0x91d998=_0x315e7b['plugins']['get']('Annotations'),_0x3762a4=_0x315e7b['plugins']['get']('CommentsRepository'),_0x402e20=_0xdb0cd['getAllAdjacentSuggestions']()['filter'](_0x590ceb=>_0x590ceb['isInContent']),_0x1d128c=_0x315e7b['plugins']['get'](_0x7113d2)['me'],_0x64e3f9=_0x315e7b['commands']['get']('acceptSuggestion'),_0x229502=_0x315e7b['commands']['get']('discardSuggestion'),_0x385b0e=_0x27c82f['get']('trackChanges')['SuggestionThreadView'],{CommentsListView:_0x328863,CommentThreadInputView:_0x43f2f5}=_0x315e7b['plugins']['get']('CommentsUI'),_0x2217b0=new _0x385b0e(_0x315e7b['locale'],_0xdb0cd,_0x1d128c,{'disableComments':this['_disableComments'],'editorConfig':_0x27c82f['get']('comments.editorConfig'),'maxCommentsWhenCollapsed':_0x27c82f['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x27c82f['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x27c82f['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':Et(_0x27c82f['get']('locale')),'CommentView':_0x27c82f['get']('comments')['CommentView'],'CommentsListView':_0x328863,'CommentThreadInputView':_0x43f2f5}),_0x133b44=_0x3762a4['createCommentThreadController'](_0xdb0cd['commentThread'],_0x2217b0),_0x4b262f=new vt(_0xdb0cd,_0x2217b0,_0x64e3f9,_0x229502,_0x133b44);_0x2217b0['descriptionParts']=_0x315e7b['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['getDescriptions'](_0x402e20),this['_suggestionToController']['set'](_0xdb0cd,_0x4b262f),this['_viewToController']['set'](_0x2217b0,_0x4b262f);const _0xad6752=_0x91d998['createAnnotationView'](this['editor']['locale'],_0x2217b0);_0xad6752['bind']('isDirty')['to'](_0x2217b0,'isDirty'),_0xad6752['bind']('length')['to'](_0x2217b0),_0xad6752['bind']('type')['to'](_0x2217b0,'type',_0x297505=>'suggestion-'+_0x297505);const _0x4ebe8d=_0x91d998['createAnnotation']({'view':_0xad6752,'target':()=>{const _0xbb5e9a=_0x402e20[0x0]['getFirstMarker']();if(!_0xbb5e9a)return null;const _0x5955d3=_0xbb5e9a['getRange']()['getContainedElement']();return _0x5955d3&&!_0x315e7b['editing']['mapper']['toViewElement'](_0x5955d3)?null:St(_0x315e7b['editing'],_0xbb5e9a)||null;},'type':()=>'suggestion-'+_0x4b262f['view']['type']});_0x91d998['add'](_0x4ebe8d);const _0x444901=_0x315e7b['plugins']['get']('PendingActions');let _0x43c7b5;_0x2217b0['on']('change:isDirty',(_0x465b4a,_0x116877,_0x5cfcd9)=>{if(_0x5cfcd9){const t=this['editor']['locale']['t'];_0x43c7b5=_0x444901['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));}else _0x444901['remove'](_0x43c7b5),_0x43c7b5=null;});}['_destroyController'](_0x3a3be6){const _0x34c6b0=this['editor']['plugins']['get']('Annotations'),_0x2ba787=this['_suggestionToController']['get'](_0x3a3be6),_0x3ca7d0=_0x2ba787['view'],_0x4aba9a=_0x34c6b0['getByInnerView'](_0x3ca7d0);_0x4aba9a&&_0x34c6b0['remove'](_0x4aba9a),this['_suggestionToController']['delete'](_0x3a3be6),this['_viewToController']['delete'](_0x3ca7d0),_0x2ba787['destroy'](),_0x3ca7d0['destroy']();}['_updateController'](_0x1e1ec3){if(!_0x1e1ec3['isInContent']||!this['_suggestionToController']['has'](_0x1e1ec3))return;const _0x7849e1=this['editor']['plugins']['get']('TrackChangesEditing'),_0x1fa193=this['_suggestionToController']['get'](_0x1e1ec3),_0x3713b8=_0x1e1ec3['getAllAdjacentSuggestions']();_0x1fa193['view']['descriptionParts']=_0x7849e1['_descriptionFactory']['getDescriptions'](_0x3713b8);}['destroy'](){super['destroy']();for(const _0x236329 of this['_suggestionToController']['keys']())this['_destroyController'](_0x236329);for(const _0x5823ed of this['_debouncedHandlers']['values']())_0x5823ed['cancel']();this['_debouncedHandlers']['clear']();}}
|
|
23
|
+
import{Plugin as _0x5e89db}from'ckeditor5/src/core';import{Collection as Ct}from'ckeditor5/src/utils';import{Model as bt,SplitButtonView as Tt,createDropdown as At,addListToDropdown as xt}from'ckeditor5/src/ui';import{Users as _0x3b50b6,getDateTimeFormatter as Et,getMarkerDomElement as St}from'ckeditor5-collaboration/src/collaboration-core';import _0x3fab49 from'./trackchangesediting';import vt from'./ui/suggestioncontroller';import Nt from'./ui/view/suggestionthreadview';import It from'../theme/icons/track-changes.svg';import{debounce as Dt}from'lodash-es';export default class m extends _0x5e89db{static get['requires'](){return[_0x3fab49,_0x3b50b6,'CommentsRepository','Annotations','EditorAnnotations'];}static get['pluginName'](){return'TrackChangesUI';}constructor(_0x1228e6){super(_0x1228e6),this['_suggestionToController']=new Map(),this['_viewToController']=new Map(),this['_debouncedHandlers']=new Map();const _0x2f36bc=this['editor']['config'];_0x2f36bc['define']('trackChanges.SuggestionThreadView',Nt),_0x2f36bc['define']('trackChanges.disableComments',!0x1),this['_disableComments']=_0x2f36bc['get']('trackChanges.disableComments');}['init'](){const _0x2c8a14=this['editor'],_0x37fb78=_0x2c8a14['plugins']['get'](_0x3fab49),_0xea2eab=_0x2c8a14['plugins']['get']('Annotations'),_0xb6310b=_0x2c8a14['plugins']['get']('EditorAnnotations'),_0x5a27f3=_0x2c8a14['plugins']['get']('CommentsRepository');_0x2c8a14['ui']['componentFactory']['add']('trackChanges',_0x301877=>this['_createUIButton'](_0x301877)),_0xb6310b['addSourceCollector'](()=>{const _0x2bde2b=[];for(const [_0x292087,_0x1d68a0]of Array['from'](this['_suggestionToController'])){const _0x1d83e6=_0x292087['getAllAdjacentSuggestions'](),_0x127d60=[];for(const _0x3e0c3e of _0x1d83e6){if(!_0x3e0c3e['isInContent'])continue;if(_0x3e0c3e['isMultiRange']){_0x127d60['push'](..._0x3e0c3e['getRanges']());continue;}const _0xa30520=_0x3e0c3e['getFirstRange']();if(_0x127d60['length']>0x0){const _0xddc0af=_0x127d60[0x0]['getJoined'](_0xa30520);if(_0xddc0af){_0x127d60[0x0]=_0xddc0af;continue;}}_0x127d60['push'](_0xa30520);}_0x2bde2b['push']([_0x1d68a0['view'],_0x127d60]);}return _0x2bde2b;}),this['listenTo'](_0x37fb78,'suggestionLoaded',(_0x45bc41,_0x8ad039)=>{let _0x3cab0b=!0x1;const _0x420916=Dt(_0x2b5334=>{_0x3cab0b||_0x2b5334?_0x3cab0b&&_0x2b5334&&(this['_destroyController'](_0x8ad039),_0xb6310b['refreshSelectedViews'](),_0x3cab0b=!0x1):(this['_initializeController'](_0x8ad039),_0xb6310b['refreshSelectedViews'](),_0x3cab0b=!0x0);},0xa);this['_debouncedHandlers']['set'](_0x8ad039,_0x420916),this['listenTo'](_0x8ad039,'change:previous',(_0x32203c,_0x499b6d,_0x245565,_0x356454)=>{_0x8ad039['isInContent']&&(null==_0x245565?(this['_updateController'](_0x356454['head']),_0x420916(!0x1)):(this['_updateController'](_0x245565['head']),_0x420916(!0x0)));}),null===_0x8ad039['previous']?_0x420916(!0x1):this['_updateController'](_0x8ad039['head']);}),this['listenTo'](_0x37fb78,'suggestionUnloaded',(_0x27d8d4,_0x371a13,_0x5cdcbb)=>{this['stopListening'](_0x371a13,'change:previous'),this['_debouncedHandlers']['get'](_0x371a13)['cancel'](),this['_debouncedHandlers']['delete'](_0x371a13);const _0xe7c268=_0x5cdcbb?_0x5cdcbb['head']:_0x371a13,_0x1c2284=this['_suggestionToController']['get'](_0xe7c268);null!==_0x5cdcbb&&this['_updateController'](_0xe7c268),null===_0x5cdcbb&&_0x1c2284&&this['_destroyController'](_0x371a13);}),this['listenTo'](_0x37fb78,'suggestionChanged',(_0x1e68ab,_0x5dc833)=>{this['_updateController'](_0x5dc833);}),this['listenTo'](_0xea2eab,'change:activeAnnotations',(_0x403884,_0x1cf42f,_0x604904)=>{const _0x206fd9=Array['from'](_0x604904,_0x5c5a03=>_0x5c5a03['innerView'])['filter'](_0x26090f=>this['_viewToController']['has'](_0x26090f)),_0x4027b7=[];for(const _0x20ea47 of _0x206fd9){const _0x47d662=this['_viewToController']['get'](_0x20ea47)['model']['getAllAdjacentSuggestions']();_0x4027b7['push'](..._0x47d662['reduce']((_0x1d8853,_0x8c610)=>[..._0x1d8853,..._0x8c610['getMarkerNames']()],[]));}_0x37fb78['activeMarkers']=_0x4027b7;}),this['listenTo'](_0x5a27f3,'addComment',(_0x2726fd,{threadId:_0x4dd89c,isFromAdapter:_0x4b4219})=>{if(_0x4b4219||!_0x37fb78['hasSuggestion'](_0x4dd89c))return;const _0x2a5da1=_0x37fb78['getSuggestion'](_0x4dd89c);this['_suggestionToController']['get'](_0x2a5da1)['view']['focus']();},{'priority':'lowest'});}['_createUIButton'](_0x52ca0e){const _0x5e6349=At(_0x52ca0e,Tt),_0x255450=this['editor']['commands']['get']('trackChanges'),{t:t}=this['editor'];_0x5e6349['buttonView']['set']({'tooltip':t('Track\x20changes'),'label':t('Track\x20changes'),'icon':It}),_0x5e6349['buttonView']['bind']('isOn')['to'](_0x255450,'value'),_0x5e6349['buttonView']['on']('execute',()=>_0x255450['execute']());const _0x4c5a83=new Ct(),_0x56c198=[{'type':'switchbutton','model':{'withText':!0x0,'label':t('Track\x20changes'),'commandName':'trackChanges'}},{'type':'separator'},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20suggestions'),'commandName':'acceptAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Accept\x20all\x20selected\x20suggestions'),'commandName':'acceptSelectedSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20suggestions'),'commandName':'discardAllSuggestions'}},{'type':'button','model':{'withText':!0x0,'label':t('Discard\x20all\x20selected\x20suggestions'),'commandName':'discardSelectedSuggestions'}}];for(const _0x17d5c3 of _0x56c198){const _0x17655c={'type':_0x17d5c3['type']};if(_0x17d5c3['model']){const _0x3feae1=new bt(_0x17d5c3['model']),_0x4a301a=this['editor']['commands']['get'](_0x3feae1['commandName']);_0x3feae1['bind']('isOn','isEnabled')['to'](_0x4a301a,'value','isEnabled'),_0x17655c['model']=_0x3feae1;}_0x4c5a83['add'](_0x17655c);}xt(_0x5e6349,_0x4c5a83);const _0xcde064=_0x56c198['filter'](_0x5d0124=>null!=_0x5d0124['model'])['map'](_0x590b9b=>this['editor']['commands']['get'](_0x590b9b['model']['commandName']));return _0x5e6349['buttonView']['actionView']['unbind']('isEnabled'),_0x5e6349['buttonView']['arrowView']['unbind']('isEnabled'),_0x5e6349['buttonView']['actionView']['bind']('isEnabled')['to'](_0x255450,'isEnabled'),_0x5e6349['buttonView']['arrowView']['bind']('isEnabled')['toMany'](_0xcde064,'isEnabled',(..._0x3b1e32)=>_0x3b1e32['some'](_0x50a738=>_0x50a738)),_0x5e6349['on']('execute',_0x3822d9=>this['editor']['execute'](_0x3822d9['source']['commandName'])),_0x5e6349;}['_initializeController'](_0xca7a5e){const _0x383f48=this['editor'],_0x47f409=_0x383f48['config'],_0x729e09=_0x383f48['plugins']['get']('Annotations'),_0x3d8a11=_0x383f48['plugins']['get']('CommentsRepository'),_0x48f11f=_0xca7a5e['getAllAdjacentSuggestions']()['filter'](_0x4fc217=>_0x4fc217['isInContent']),_0x3ba3a7=_0x383f48['plugins']['get'](_0x3b50b6)['me'],_0x29dde8=_0x383f48['commands']['get']('acceptSuggestion'),_0x5c072f=_0x383f48['commands']['get']('discardSuggestion'),_0x51a8a5=_0x47f409['get']('trackChanges')['SuggestionThreadView'],{CommentsListView:_0x449d90,CommentThreadInputView:_0x5bc04f}=_0x383f48['plugins']['get']('CommentsUI'),_0x3c8824=new _0x51a8a5(_0x383f48['locale'],_0xca7a5e,_0x3ba3a7,{'disableComments':this['_disableComments'],'editorConfig':_0x47f409['get']('comments.editorConfig'),'maxCommentsWhenCollapsed':_0x47f409['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x47f409['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x47f409['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':Et(_0x47f409['get']('locale')),'CommentView':_0x47f409['get']('comments')['CommentView'],'CommentsListView':_0x449d90,'CommentThreadInputView':_0x5bc04f}),_0x26144f=_0x3d8a11['createCommentThreadController'](_0xca7a5e['commentThread'],_0x3c8824),_0x4538e1=new vt(_0xca7a5e,_0x3c8824,_0x29dde8,_0x5c072f,_0x26144f);_0x3c8824['descriptionParts']=_0x383f48['plugins']['get']('TrackChangesEditing')['_descriptionFactory']['getDescriptions'](_0x48f11f),this['_suggestionToController']['set'](_0xca7a5e,_0x4538e1),this['_viewToController']['set'](_0x3c8824,_0x4538e1);const _0x3c9481=_0x729e09['createAnnotationView'](this['editor']['locale'],_0x3c8824);_0x3c9481['bind']('isDirty')['to'](_0x3c8824,'isDirty'),_0x3c9481['bind']('length')['to'](_0x3c8824),_0x3c9481['bind']('type')['to'](_0x3c8824,'type',_0x58086b=>'suggestion-'+_0x58086b);const _0x8ae2db=_0x729e09['createAnnotation']({'view':_0x3c9481,'target':()=>{const _0x23411c=_0x48f11f[0x0]['getFirstMarker']();if(!_0x23411c)return null;const _0x281cb1=_0x23411c['getRange']()['getContainedElement']();return _0x281cb1&&!_0x383f48['editing']['mapper']['toViewElement'](_0x281cb1)?null:St(_0x383f48['editing'],_0x23411c)||null;},'type':()=>'suggestion-'+_0x4538e1['view']['type']});_0x729e09['add'](_0x8ae2db);const _0x32aebd=_0x383f48['plugins']['get']('PendingActions');let _0x29b347;_0x3c8824['on']('change:isDirty',(_0x285c58,_0xe34fd7,_0x327154)=>{if(_0x327154){const t=this['editor']['locale']['t'];_0x29b347=_0x32aebd['add'](t({'string':'Unsaved\x20change\x20in\x20suggestion.','id':'PENDING_ACTION_SUGGESTION'}));}else _0x32aebd['remove'](_0x29b347),_0x29b347=null;});}['_destroyController'](_0x346ccf){const _0x2842ff=this['editor']['plugins']['get']('Annotations'),_0x47f700=this['_suggestionToController']['get'](_0x346ccf),_0x5e15e9=_0x47f700['view'],_0x435c00=_0x2842ff['getByInnerView'](_0x5e15e9);_0x435c00&&_0x2842ff['remove'](_0x435c00),this['_suggestionToController']['delete'](_0x346ccf),this['_viewToController']['delete'](_0x5e15e9),_0x47f700['destroy'](),_0x5e15e9['destroy']();}['_updateController'](_0x2b130a){if(!_0x2b130a['isInContent']||!this['_suggestionToController']['has'](_0x2b130a))return;const _0xe9c78a=this['editor']['plugins']['get']('TrackChangesEditing'),_0x3e12e4=this['_suggestionToController']['get'](_0x2b130a),_0x5af5be=_0x2b130a['getAllAdjacentSuggestions']();_0x3e12e4['view']['descriptionParts']=_0xe9c78a['_descriptionFactory']['getDescriptions'](_0x5af5be);}['destroy'](){super['destroy']();for(const _0x5687ee of this['_suggestionToController']['keys']())this['_destroyController'](_0x5687ee);for(const _0x558e54 of this['_debouncedHandlers']['values']())_0x558e54['cancel']();this['_debouncedHandlers']['clear']();}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x56eb=['commentThreadController','_acceptCommand','destroy','discardSuggestion','model','unbind','view','execute','isEnabled','acceptSuggestion','_discardCommand','bind'];(function(_0x133ff1,_0x56ebdf){var _0x4bad82=function(_0x3f4b0c){while(--_0x3f4b0c){_0x133ff1['push'](_0x133ff1['shift']());}};_0x4bad82(++_0x56ebdf);}(_0x56eb,0xb4));var _0x4bad=function(_0x133ff1,_0x56ebdf){_0x133ff1=_0x133ff1-0x0;var _0x4bad82=_0x56eb[_0x133ff1];return _0x4bad82;};import{ObservableMixin as _0x7a13f0,mix as _0x4678c0}from'ckeditor5/src/utils';export default class vt{constructor(_0x16dd5f,_0x313b25,_0x700be6,_0x521258,_0x4299d7){this[_0x4bad('0x4')]=_0x16dd5f,this[_0x4bad('0x6')]=_0x313b25,this[_0x4bad('0x0')]=_0x4299d7,this[_0x4bad('0x1')]=_0x700be6,this['_discardCommand']=_0x521258,this[_0x4bad('0x6')][_0x4bad('0xb')](_0x4bad('0x8'))['to'](this[_0x4bad('0x1')]),this['listenTo'](_0x313b25,_0x4bad('0x9'),()=>this[_0x4bad('0x9')]()),this['listenTo'](_0x313b25,_0x4bad('0x3'),()=>this[_0x4bad('0x3')]());}[_0x4bad('0x9')](){this[_0x4bad('0x1')][_0x4bad('0x7')](this[_0x4bad('0x4')]['id']);}[_0x4bad('0x3')](){this[_0x4bad('0xa')][_0x4bad('0x7')](this[_0x4bad('0x4')]['id']);}[_0x4bad('0x2')](){this[_0x4bad('0x6')][_0x4bad('0x5')](_0x4bad('0x8')),this['stopListening'](),this[_0x4bad('0x0')][_0x4bad('0x2')]();}}_0x4678c0(vt,_0x7a13f0);
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x52ad=['showInput','addComment','fire','_createCommentThreadInputView','commentInputView','delegate','commentThreadInputView','bind','disableComments','commentThread','_createCommentViews','isEnabled','submit','editorConfig','destroy','removeComment','_localUser','focus','_config','set','value','element','isReadOnly','descriptionParts','isDirty','isActive','disabledSubmit','length','assign','commentsListView','createdAt','_model','locale'];(function(_0xe2be8d,_0x52ad71){const _0x331332=function(_0x216139){while(--_0x216139){_0xe2be8d['push'](_0xe2be8d['shift']());}};_0x331332(++_0x52ad71);}(_0x52ad,0x9f));const _0x3313=function(_0xe2be8d,_0x52ad71){_0xe2be8d=_0xe2be8d-0x0;let _0x331332=_0x52ad[_0xe2be8d];return _0x331332;};import{View as _0xb7e7f2}from'ckeditor5/src/ui';export default class Ht extends _0xb7e7f2{constructor(_0x32e8af,_0x3de91,_0x2f15fc,_0x13c9b2){super(_0x32e8af),this[_0x3313('0x2')]=null,this[_0x3313('0xc')]=null,this[_0x3313('0x19')](_0x3313('0x1f'),!0x1),this[_0x3313('0x19')](_0x3313('0x3'),_0x3de91[_0x3313('0x3')]),this[_0x3313('0xd')](_0x3313('0x3'))['to'](_0x3de91),this[_0x3313('0x19')](_0x3313('0x1d'),[]),this[_0x3313('0x19')](_0x3313('0x1e'),!0x1),this[_0x3313('0x19')](_0x3313('0x11'),!0x1),this[_0x3313('0x4')]=_0x3de91,this[_0x3313('0x16')]=_0x2f15fc,this[_0x3313('0x18')]=_0x13c9b2,_0x13c9b2[_0x3313('0xe')]?this['set']('length',0x1):this[_0x3313('0x10')]();}[_0x3313('0x17')](){this[_0x3313('0x1b')][_0x3313('0x17')]();}[_0x3313('0x14')](){this[_0x3313('0x1e')]=!0x1,this['commentsListView']&&this[_0x3313('0x2')][_0x3313('0x14')](),this[_0x3313('0xc')]&&this[_0x3313('0xc')][_0x3313('0x14')](),super[_0x3313('0x14')]();}[_0x3313('0x10')](){const {CommentsListView:_0x21ab12}=this[_0x3313('0x18')];this['commentsListView']=new _0x21ab12(this[_0x3313('0x5')],this[_0x3313('0x4')][_0x3313('0xf')],Object[_0x3313('0x1')]({'CommentView':this[_0x3313('0x18')]['CommentView']},this['_config'])),this[_0x3313('0x2')][_0x3313('0xb')]('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this[_0x3313('0x2')][_0x3313('0xd')](_0x3313('0x1f'))['to'](this),this['set'](_0x3313('0x0'),this['commentsListView']['length']+0x1),this['bind']('length')['to'](this['commentsListView'],_0x3313('0x0'),_0x104965=>_0x104965+0x1),this[_0x3313('0xc')]=this[_0x3313('0x9')](),this['on'](_0x3313('0x15'),()=>this[_0x3313('0x17')]()),this['bind'](_0x3313('0x1e'))['to'](this[_0x3313('0x2')],'hasDirtyComment',this[_0x3313('0xc')][_0x3313('0xa')],_0x3313('0x1a'),(_0x28a4d6,_0xd3de24)=>_0x28a4d6||!!_0xd3de24);}[_0x3313('0x9')](){const {CommentThreadInputView:_0x212e34}=this['_config'],_0x57c845=new _0x212e34(this[_0x3313('0x5')],this[_0x3313('0x16')],this[_0x3313('0x18')][_0x3313('0x13')]),_0x53ef2d=_0x57c845[_0x3313('0xa')];return _0x57c845[_0x3313('0xd')](_0x3313('0x6'))['to'](this,'isActive',this[_0x3313('0x4')][_0x3313('0xf')],_0x3313('0x1c'),_0x53ef2d,'value',(_0x23c7bb,_0x8fbef0,_0x37eb51)=>!!_0x37eb51||_0x23c7bb&&!_0x8fbef0),_0x53ef2d['on'](_0x3313('0x12'),(_0x960f1a,_0x4b6c5f)=>{this[_0x3313('0x8')](_0x3313('0x7'),_0x4b6c5f),_0x53ef2d['editor']['setData']('');}),_0x53ef2d['on']('cancel',()=>this[_0x3313('0x17')]()),_0x53ef2d[_0x3313('0xd')](_0x3313('0x20'))['to'](this['_model'][_0x3313('0xf')],_0x3313('0x1c')),_0x57c845;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import Ht from'./basesuggestionthreadview';import{ButtonView as Jt}from'ckeditor5/src/ui';import{icons as Kt}from'ckeditor5/src/core';import{trimHtml as Ut,UserView as Xt}from'ckeditor5-collaboration/src/collaboration-core';export default class Nt extends Ht{constructor(
|
|
23
|
+
import Ht from'./basesuggestionthreadview';import{ButtonView as Jt}from'ckeditor5/src/ui';import{icons as Kt}from'ckeditor5/src/core';import{trimHtml as Ut,UserView as Xt}from'ckeditor5-collaboration/src/collaboration-core';export default class Nt extends Ht{constructor(_0x19be61,_0x31a6ca,_0x15849d,_0x113d1b){super(_0x19be61,_0x31a6ca,_0x15849d,_0x113d1b);const {t:t}=_0x19be61;this['set']('type',''),this['bind']('type')['to'](this,'descriptionParts',_0x1a9dd8=>_0x1a9dd8&&_0x1a9dd8[0x0]?_0x1a9dd8[0x0]['type']:''),this['bind']('description')['to'](this,'descriptionParts',this,'isActive',(_0x22c71c,_0x46661e)=>{let _0x2787fd='';for(const _0x27e7bc of _0x22c71c)_0x2787fd+='<p>'+Yt(_0x27e7bc['content'],_0x27e7bc['color'])+'</p>';return _0x46661e?_0x2787fd:Ut(_0x2787fd,{'limit':0x8c});}),this['_descriptionElement']=null,this['acceptButton']=this['_createButton'](t('Accept\x20suggestion'),Kt['check'],'ck-suggestion--accept','acceptSuggestion'),this['discardButton']=this['_createButton'](t('Discard\x20suggestion'),Kt['cancel'],'ck-suggestion--discard','discardSuggestion'),this['userView']=new Xt(_0x19be61,this['_model']['author']),this['userView']['extendTemplate']({'attributes':{'class':['ck-suggestion__user','ck-annotation__user']}}),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x5bc5e9=this['bindTemplate'],_0x383de9={'tag':'div','attributes':{'class':['ck-suggestion-wrapper',_0x5bc5e9['if']('isActive','ck-suggestion-wrapper--active'),_0x5bc5e9['to']('type',_0x3ea1f5=>'ck-suggestion-'+_0x3ea1f5),this['_config']['disableComments']&&'ck-suggestion--disabled-comments'],'data-suggestion-id':this['_model']['id'],'data-thread-id':this['_model']['commentThread']['id'],'data-author-id':this['_model']['author']['id'],'tabindex':-0x1},'children':[{'tag':'div','attributes':{'class':['ck-suggestion','ck-annotation']},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-suggestion__main','ck-annotation__main']},'children':[{'tag':'div','attributes':{'class':['ck-suggestion__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-suggestion__info-name','ck-annotation__info-name']}},{'tag':'time','attributes':{'datetime':_0x5bc5e9['to']('createdAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x5bc5e9['to']('createdAt',_0x10df94=>this['_config']['formatDateTime'](_0x10df94))}]}]},{'tag':'div','attributes':{'class':['ck-suggestion__actions','ck-annotation__actions']},'children':[this['acceptButton'],this['discardButton']]},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']}}]}]}]};return this['commentsListView']&&this['commentThreadInputView']&&_0x383de9['children']['push'](this['commentsListView'],this['commentThreadInputView']),_0x383de9;}['render'](){super['render'](),this['_descriptionElement']=this['element']['querySelector']('.ck-annotation__content-wrapper'),this['_descriptionElement']['innerHTML']=this['description'],this['on']('change:description',(_0x4594d8,_0x1f1615,_0x571569)=>{this['_descriptionElement']['innerHTML']=_0x571569;});}['_createButton'](_0x12a0b0,_0x5d9be8,_0x1bf1c0,_0x8631de){const _0x3600e2=new Jt(this['locale']);return _0x3600e2['set']({'label':_0x12a0b0,'icon':_0x5d9be8,'tooltip':!0x0}),_0x3600e2['extendTemplate']({'attributes':{'class':_0x1bf1c0}}),_0x3600e2['on']('execute',()=>{this['fire'](_0x8631de,this['_model']['id']);}),_0x3600e2['bind']('isEnabled')['to'](this),_0x3600e2;}}function Yt(_0x3c1121,_0xaa85ba){let _0x3fe0dd='';return _0x3fe0dd+=_0x3c1121['split']('*')['map']((_0x41cfe8,_0x47d431)=>_0x47d431%0x2!=0x0?'<span\x20class=\x22ck-suggestion-type\x22>'+Zt(_0x41cfe8)+'</span>':Zt(_0x41cfe8))['join'](''),_0xaa85ba&&(_0x3fe0dd+='<span\x20class=\x22ck-suggestion-color\x22\x20style=\x22background-color:\x20'+_0xaa85ba['value']+'\x22\x20title=\x22'+_0xaa85ba['title']+'\x22></span>'),_0x3fe0dd;}function Zt(_0x3cef22){const _0x292b05=document['createElement']('span');return _0x292b05['innerText']=_0x3cef22,_0x292b05['innerHTML'];}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4e6a=['getRange','from','isTouching','start','isCollapsed','add','isIntersecting','isInContent','getRanges','end'];(function(_0x24651e,_0x4e6a1b){const _0x34470e=function(_0x2397ef){while(--_0x2397ef){_0x24651e['push'](_0x24651e['shift']());}};_0x34470e(++_0x4e6a1b);}(_0x4e6a,0xfd));const _0x3447=function(_0x24651e,_0x4e6a1b){_0x24651e=_0x24651e-0x0;let _0x34470e=_0x4e6a[_0x24651e];return _0x34470e;};export default function jt(_0x158ddb,_0x1581ec){const _0x36f9b5=Array[_0x3447('0x8')](_0x158ddb[_0x3447('0x5')]()),_0x4d4bc4=new Set();for(const _0x25d116 of _0x1581ec)if(_0x25d116[_0x3447('0x4')])for(const _0x289bc1 of _0x36f9b5)for(const _0x1f784f of _0x25d116['getMarkers']()){const _0x56d108=_0x1f784f[_0x3447('0x7')]();(_0x289bc1[_0x3447('0x3')](_0x56d108)||_0x158ddb[_0x3447('0x1')]&&!_0x25d116['isMultiRange']&&_0x25d116['next']&&_0x56d108[_0x3447('0x6')][_0x3447('0x9')](_0x289bc1[_0x3447('0x0')]))&&_0x4d4bc4[_0x3447('0x2')](_0x25d116);}return _0x4d4bc4;}
|
package/src/utils/hashobject.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4bf8=['number','isArray','charCodeAt','sort','sign','keys','object','toString','string','boolean'];(function(_0x1c768f,_0x4bf823){const _0x2c32cc=function(_0x57a956){while(--_0x57a956){_0x1c768f['push'](_0x1c768f['shift']());}};_0x2c32cc(++_0x4bf823);}(_0x4bf8,0xdb));const _0x2c32=function(_0x1c768f,_0x4bf823){_0x1c768f=_0x1c768f-0x0;let _0x2c32cc=_0x4bf8[_0x1c768f];return _0x2c32cc;};export default function ft(_0x354542){let _0x91715d=0x0,_0x4a531a=0x0;for(const _0x4a4790 of ye(_0x354542))_0x91715d=(_0x91715d<<0x5)-_0x91715d+_0x4a4790,_0x91715d&=_0x91715d,[_0x91715d,_0x4a531a]=[_0x4a531a,_0x91715d];return ue(_0x91715d)+ue(_0x4a531a);}function*fe(_0x35e387){_0x35e387?_0x2c32('0x0')==typeof _0x35e387?yield 0x1:Array[_0x2c32('0x2')](_0x35e387)?yield*function*(_0x5e640c){for(const _0x15ac89 of _0x5e640c)yield*fe(_0x15ac89);}(_0x35e387):_0x2c32('0x7')==typeof _0x35e387?yield*ye(_0x35e387):_0x2c32('0x9')==typeof _0x35e387?yield*de(_0x35e387):_0x2c32('0x1')==typeof _0x35e387&&(yield _0x35e387):yield 0x0;}function*ye(_0x11717b){if(yield ce('{'),_0x11717b){const _0xef8428=Object[_0x2c32('0x6')](_0x11717b)[_0x2c32('0x4')]();for(const _0x511021 of _0xef8428){yield*de(_0x511021),yield ce(':');const _0xb2480a=_0x11717b[_0x511021];yield*fe(_0xb2480a);}}yield ce('}');}function*de(_0x43a5f4){yield ce('\x22');for(const _0x2b4d30 of _0x43a5f4)yield ce(_0x2b4d30);yield ce('\x22');}function ce(_0xb3c291){return _0xb3c291[_0x2c32('0x3')](0x0);}function ue(_0x4d2b9e){return(_0x4d2b9e*=Math[_0x2c32('0x5')](_0x4d2b9e))[_0x2c32('0x8')](0x24);}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x414d=['content','replace','color','map','\x20[color\x20','value','isArray','type','join'];(function(_0x25598e,_0x414d0e){const _0x36d004=function(_0x8e6d3d){while(--_0x8e6d3d){_0x25598e['push'](_0x25598e['shift']());}};_0x36d004(++_0x414d0e);}(_0x414d,0x101));const _0x36d0=function(_0x25598e,_0x414d0e){_0x25598e=_0x25598e-0x0;let _0x36d004=_0x414d[_0x25598e];return _0x36d004;};export function normalizeDescription(_0x316439){return Array[_0x36d0('0x1')](_0x316439)||(_0x316439=[_0x316439]),_0x316439[_0x36d0('0x7')](_0x2f9466=>{const _0xf44d6a=_0x2f9466[_0x36d0('0x4')][_0x36d0('0x5')](/\*/g,''),_0x5666cb=_0x2f9466[_0x36d0('0x6')]?_0x36d0('0x8')+_0x2f9466[_0x36d0('0x6')][_0x36d0('0x0')]+']':'';return'['+_0x2f9466[_0x36d0('0x2')]+']\x20'+_0xf44d6a+_0x5666cb;})[_0x36d0('0x3')](';\x20');}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x3f40=['deletion','type'];(function(_0x272756,_0x3f40c0){var _0x4e147b=function(_0x4d046e){while(--_0x4d046e){_0x272756['push'](_0x272756['shift']());}};_0x4e147b(++_0x3f40c0);}(_0x3f40,0x108));var _0x4e14=function(_0x272756,_0x3f40c0){_0x272756=_0x272756-0x0;var _0x4e147b=_0x3f40[_0x272756];return _0x4e147b;};export default function ts(_0x4a521d){return _0x4a521d['sort']((_0x387af5,_0xd35f41)=>_0x4e14('0x0')==_0x387af5[_0x4e14('0x1')]&&_0x4e14('0x0')!=_0xd35f41[_0x4e14('0x1')]?-0x1:'deletion'!=_0x387af5[_0x4e14('0x1')]&&_0x4e14('0x0')==_0xd35f41['type']?0x1:0x0);}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.ck-content .ck-suggestion-marker-deletion.ck-widget.ck-horizontal-line {
|
|
2
|
-
background-color: var(--ck-color-suggestion-widget-deletion-background);
|
|
3
|
-
|
|
4
|
-
&.ck-suggestion-marker--active {
|
|
5
|
-
background-color: var(--ck-color-suggestion-widget-deletion-background-active);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.ck-content .ck-suggestion-marker-insertion.ck-widget.ck-horizontal-line {
|
|
10
|
-
background-color: var(--ck-color-suggestion-widget-insertion-background);
|
|
11
|
-
|
|
12
|
-
&.ck-suggestion-marker--active {
|
|
13
|
-
background-color: var(--ck-color-suggestion-widget-insertion-background-active);
|
|
14
|
-
}
|
|
15
|
-
}
|