@ckeditor/ckeditor5-comments 46.0.1-alpha.11 → 46.0.1-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/package.json +18 -18
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x4315dd={}){function _0x347e76(_0x3150c5){return _0x3150c5['map'](_0x58d0d0=>String['fromCharCode'](_0x58d0d0))['join']('');}(_0x4315dd=Object['assign']({},_0x4315dd))['plugins']||(_0x4315dd['plugins']=Rt['defaultPlugins']),super(_0x4315dd),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x347e76([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x347e76([0x76,0x69,0x65,0x77])][_0x347e76([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x347e76([0x61,0x75,0x74,0x6f]),this[_0x347e76([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x347e76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x347e76([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x347e76([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x347e76([0x6f,0x6b])});}['create'](){const _0x154050=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x154050))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xa0d664=>{const _0x3ed495=this['model']['document']['getRoot'](),_0xc8a2f9=_0x3ed495&&_0x3ed495['getChild'](_0x3ed495['childCount']-0x1);_0xa0d664['setSelection'](_0xc8a2f9,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x47f8a1=this['editing']['view'],_0x373cc1=_0x47f8a1['document']['getRoot'](),_0x287348=_0x373cc1['getChild'](0x0);_0x373cc1['childCount']>0x1||!_0x287348||'p'!=_0x287348['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x47f8a1,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x287348['placeholder']=this['placeholder']),St({'view':_0x47f8a1,'element':_0x287348,'keepOnFocus':!0x0}),this['placeholderElement']=_0x287348);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x56e579,_0x579230={}){super(_0x56e579),this['editor']=null,this['_editorConfig']=_0x579230,this['set']('value',_0x579230['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x56e579,'Reply...')),this['set']('submitLabel',N(_0x56e579,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x19913b(),this['focusCycler']=new _0x7bfb99({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x2d1fd7,_0x578778)=>{this['cancelButtonView']['fire']('execute'),_0x578778();}),this['keystrokes']['set']('Ctrl+Enter',(_0x481a66,_0x394ec9)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x394ec9());}),this['on']('submit',(_0x18c919,_0x37ada8)=>{_0x37ada8['length']>0xfde8?(alert(N(_0x56e579,'TOO_LONG_COMMENT_ALERT',[_0x37ada8['length'],0xfde8])),_0x18c919['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4e8c5c=this['editor'];this['element']['insertBefore'](_0x4e8c5c['ui']['element'],this['element']['firstChild']),_0x4e8c5c['model']['document']['on']('change',()=>this['value']=_0x4e8c5c['getData']()),_0x4e8c5c['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4e8c5c['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1886bc){-0x1===_0x1886bc?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x209b1a}=this,_0x28264b=new _0x3c4ac3(_0x209b1a);return _0x28264b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x28264b['withText']=!0x0,_0x28264b['bind']('label')['to'](this,'submitLabel'),_0x28264b['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x28264b['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2c857a,_0x5a89fa)=>!_0x5a89fa&&!!_0x2c857a['trim']()),_0x28264b;}['_createCancelButton'](){const {locale:_0x222455}=this,_0x3c8893=new _0x3c4ac3(_0x222455);return _0x3c8893['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3c8893['label']=N(_0x222455,'Cancel'),_0x3c8893['withText']=!0x0,_0x3c8893['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3c8893;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x165f44=>{this['focusTracker']['add'](_0x165f44['element']);}),this['focusables']['on']('change',(_0x3819e6,_0x5bcfd2)=>{for(const _0x4d6942 of Array['from'](_0x5bcfd2['added'])['reverse']())this['focusTracker']['add'](_0x4d6942['element']);});}}class ie extends kt{constructor(_0x5d21f3,_0x3f69aa,_0x260ad9){super(_0x5d21f3),this['commentInputView']=new os(_0x5d21f3,_0x260ad9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4703a5,_0x471a3c)=>_0x4703a5||!!_0x471a3c),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x3be5f0(_0x5d21f3,_0x3f69aa),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x483b9b){this['commentInputView']['focus'](_0x483b9b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2deb1e,_0x1cf6a9)=>{const {submitButtonView:_0x54c060,cancelButtonView:_0x42f1df,editor:_0x3462dc}=this['commentInputView'];[_0x54c060['element'],_0x42f1df['element'],_0x3462dc?_0x3462dc['editing']['view']['getDomRoot']():null]['filter'](_0xf9fbce=>_0xf9fbce)['some'](_0x2221fa=>_0x2221fa['contains'](_0x1cf6a9['target']))||(this['focus'](),_0x1cf6a9['preventDefault']());});}}class rs extends kt{constructor(_0x4f23cf){super(_0x4f23cf);const _0x4259c5=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4259c5['to']('count',_0x5840dd=>N(_0x4f23cf,'NUMBER_OF_COMMENTS',_0x5840dd))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x127335,_0x44c68d,_0x20b30a){super(_0x127335);const _0x546257=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x44c68d['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x44c68d,this['_config']=_0x20b30a,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x19913b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x7bfb99({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3a29e4=>this['commentViews']['map'](_0x3d4cb4=>_0x3d4cb4['element'])['includes'](_0x3a29e4['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x127335),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xf400a3=>_0xf400a3-this['_config']['maxCommentsWhenCollapsed']);for(const _0xe79666 of _0x44c68d['comments'])this['_handleNewCommentModel'](_0xe79666);this['_handleInfoComment'](),this['listenTo'](_0x44c68d['comments'],'add',(_0x270877,_0x8cec45)=>{const _0x3aff8d=this['_calculatePosition'](_0x8cec45);this['length']++,this['_handleNewCommentModel'](_0x8cec45,_0x3aff8d),this['refreshVisibleViews']();}),this['listenTo'](_0x44c68d['comments'],'remove',(_0x47c6a0,_0x4cfe4e)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4cfe4e),this['refreshVisibleViews']();}),this['listenTo'](_0x44c68d,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x44c68d,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x546257['if']('length','ck-hidden',_0x59e9c1=>!_0x59e9c1)],'aria-label':N(_0x127335,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x2ad449){-0x1===_0x2ad449?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2531d8 of this['commentViews'])_0x2531d8['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x136f70,_0x449985){const _0x4cadcd=new this['_config']['CommentView'](this['locale'],_0x136f70,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4cadcd['viewUid']=_0x136f70['id'],_0x4cadcd['delegate']('removeComment')['to'](this),_0x4cadcd['delegate']('updateComment')['to'](this),_0x4cadcd['delegate']('resolveCommentThread')['to'](this),_0x4cadcd['delegate']('editorReady')['to'](this),_0x4cadcd['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4cadcd,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4cadcd,_0x449985);}['_calculatePosition'](_0x83780d){const _0x151af7=this['_model']['_findOptimalIndex'](_0x83780d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x83780d['authoredAt']?_0x151af7-0x1:_0x151af7:_0x151af7-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2646da={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x2646da,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2646da));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xa419f3){const _0x31f0f4=this['commentViews']['remove'](_0xa419f3['id']);this['stopListening'](_0x31f0f4),_0x31f0f4['isEditMode']&&this['_updateHasDirtyComment'](),_0x31f0f4['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5da521=>_0x5da521['isEditMode']);}['_rearrangeCollapse'](){const _0x586b07=function(_0x9e51b6){const _0x513052=new _0x2a8245();for(const _0xe741c2 of _0x9e51b6)_0x513052['add'](_0xe741c2);return _0x513052;}(this['commentViews']),_0x3c1c6c=this['_collapsedCommentsView']['count'];for(let _0x1bc6d3=0x1;_0x1bc6d3<=_0x3c1c6c;_0x1bc6d3++)_0x586b07['remove'](0x1);for(const _0x25e15c of _0x586b07)_0x25e15c['collapse']();_0x3c1c6c>0x0&&_0x586b07['add'](this['_collapsedCommentsView'],0x1),ns(_0x334924(Array['from'](this['visibleViews']),Array['from'](_0x586b07)),this['visibleViews'],_0x586b07);}['_rearrangeExpand'](){ns(_0x334924(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5193f5 of this['visibleViews'])_0x5193f5['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4f22e0=>{this['focusTracker']['add'](_0x4f22e0['element']),this['keystrokes']['listenTo'](_0x4f22e0['element']);}),this['commentViews']['on']('change',(_0x3b8ee0,_0x197a68)=>{for(const _0x5b1332 of _0x197a68['removed'])this['focusTracker']['remove'](_0x5b1332['element']),this['keystrokes']['stopListening'](_0x5b1332['element']);for(const _0xa22e3e of Array['from'](_0x197a68['added'])['reverse']())this['focusTracker']['add'](_0xa22e3e['element']),this['keystrokes']['listenTo'](_0xa22e3e['element']);});}}function ns(_0x424f59,_0x11190b,_0x186c22){let _0x215aef=0x0;for(const _0x489733 of _0x424f59)switch(_0x489733){case'insert':_0x11190b['add'](_0x186c22['get'](_0x215aef),_0x215aef),_0x215aef++;break;case'delete':_0x11190b['remove'](_0x215aef);break;case'equal':_0x215aef++;}}class oe extends kt{constructor(_0x51903f){super(_0x51903f);const _0x2461a0=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2461a0['to']('contextValue',_0x9fb5f7=>N(_0x51903f,'THREAD_CONTEXT_LABEL',_0x9fb5f7)),'tabindex':-0x1},'children':[{'text':_0x2461a0['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x24aec4,_0x54748b){super(_0x24aec4);const _0x429b77=this['bindTemplate'];this['_model']=_0x54748b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x19913b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x7bfb99({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x52481f=>!!_0x52481f),this['bind']('contextValue')['to'](this['_model'],'context',_0x3afd4f=>_0x3afd4f&&_0x3afd4f['value']?this['_trimContextValue'](_0x3afd4f['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x429b77['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x1715ca=new _0x3c4ac3(this['locale']);return _0x1715ca['label']=N(this['locale'],'Reopen'),_0x1715ca['tooltip']=N(this['locale'],'Reopen'),_0x1715ca['icon']=_0x23f74c,_0x1715ca['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2fa785=>!_0x2fa785),_0x1715ca['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x32bd0b,_0x374b1c)=>_0x32bd0b&&_0x374b1c),_0x1715ca['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1715ca;}['_trimContextValue'](_0x23379f){if(_0x23379f['length']<0x96)return _0x23379f;const _0x388965=_0x23379f['lastIndexOf']('\x20',0x93);return _0x23379f['substring'](0x0,_0x388965>-0x1?_0x388965:0x93)+'...';}['_attachContextActions'](){const _0x2597e8=this['element']['querySelector']('.ck-context'),_0x27c38d=_0x2597e8['querySelector']('.ck-context__value');this['listenTo'](_0x2597e8,'mouseenter',()=>{_0x27c38d['offsetWidth']<_0x27c38d['scrollWidth']&&_0x2597e8['classList']['add']('overlay');}),this['listenTo'](_0x2597e8,'mouseleave',()=>{_0x2597e8['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x46c93 of this['focusables'])this['focusTracker']['add'](_0x46c93['element']),this['keystrokes']['listenTo'](_0x46c93['element']);}['_createContextView'](){const _0x178047=new oe(this['locale']);return _0x178047['bind']('contextValue')['to'](this),_0x178047;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x43e697,_0x41a787,_0x2db3c7,_0x382431){super(_0x43e697),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x41a787,this['_localUser']=_0x2db3c7,this['_config']=_0x382431,this['commentThreadHeaderView']=new Yt(_0x43e697,_0x41a787),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x43e697,N(_0x43e697,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x43e697,_0x41a787,Object['assign']({'CommentView':this['_config']['CommentView']},_0x382431)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x37bbb8,_0x5c557a)=>_0x37bbb8||!!_0x5c557a),this['bind']('isUnlinked')['to'](_0x41a787,'unlinkedAt',_0x23cc22=>!!_0x23cc22),this['bind']('ariaLabel')['to'](this,'length',_0x561784=>{const _0x5b61f1=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x561784,_0x5b61f1]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x19913b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x7bfb99({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xde034b=>_0xde034b['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x5c843a=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x19413a=_0x5c843a['commentInputView'];return _0x5c843a['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x19413a,'value',(_0x11560f,_0x53a41d,_0xdbc059,_0x508c89,_0x5ba9e4)=>!!_0x5ba9e4||!!_0x508c89&&_0xdbc059&&!_0x53a41d||_0x11560f&&_0xdbc059&&!_0x53a41d),_0x19413a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x34b641,_0x2f1127,_0x1a88c1)=>{let _0x1c15a4;return _0x1c15a4=_0x1a88c1&&_0x2f1127?'Reply\x20to\x20reopen\x20discussion...':_0x34b641?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x1c15a4);}),_0x19413a['bind']('submitLabel')['to'](this,'length',_0xe65446=>N(this['locale'],_0xe65446?'Reply':'Comment')),_0x19413a['on']('submit',(_0x32a640,_0x1c2676)=>{this['fire']('addComment',_0x1c2676),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x19413a['on']('cancel',()=>{this['focus']();}),_0x19413a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x19413a['on']('cancel',_0x4ee972=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4ee972['stop']());}),this['on']('change:isActive',(_0x3753a7,_0x1f47b5,_0x2a8cf5)=>{_0x2a8cf5||this['length']||_0x19413a['value']||this['fire']('removeCommentThread');}),_0x5c843a;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x2f7441(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x379c36,target:_0x459357,type:_0x1c7bd2,isVisible:_0x5ed618=!0x0}){super(),this['view']=_0x379c36,this['view']['element']||this['view']['render'](),this['_type']=_0x1c7bd2,this['_target']=_0x459357,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2a8245([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4fe7ee,_0x56dbae)=>{this['view']['focusTracker']['add'](_0x56dbae);}),this['focusableElements']['on']('remove',(_0x11c5bc,_0x4a1270)=>{this['view']['focusTracker']['remove'](_0x4a1270);}),this['set']('isVisible',_0x5ed618);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3388e0=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3388e0),_0x3388e0;}get['targetRect'](){const _0x38b9f1=this['target'];if(null===_0x38b9f1)return null;if(_0x38b9f1 instanceof _0x3fbc4e)return _0x38b9f1;const _0x1209f3=_0x38b9f1['filter'](_0x4de2ca=>function(_0x5053fe){const _0x31fd98=_0x5053fe['offsetParent'];if(_0x31fd98)return!0x0;const _0x5a7558=_0x5053fe['getClientRects']()['item'](0x0);return!!_0x5a7558;}(_0x4de2ca));return 0x0===_0x1209f3['length']?null:new _0x3fbc4e(_0x1209f3[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x30ee53){this['view']['isActive']=_0x30ee53,this['view']['mainView']['isActive']=_0x30ee53;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xfdbe9c){if(!(null===_0xfdbe9c||_0xfdbe9c instanceof _0x3fbc4e||Array['isArray'](_0xfdbe9c)&&_0xfdbe9c['every'](_0x41e58f=>fi(_0x41e58f))))throw new _0x2e6f8f('annotation-invalid-target',null,{'target':_0xfdbe9c});}['_getNormalizedTarget'](){const _0x2101d9='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x2101d9)?[_0x2101d9]:_0x2101d9;}}function fi(_0xb37bda){return null!==_0xb37bda&&'object'==typeof _0xb37bda&&'nodeType'in _0xb37bda&&0x1===_0xb37bda['nodeType'];}class S extends _0x2a8245{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3ebd06=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x19913b(),this['_focusTracker']['on']('change:isFocused',(_0x155df6,_0x52c8d2,_0x5a3a90)=>{_0x5a3a90||this['fire']('blur');});for(const _0x49663b of _0x3ebd06)this['add'](_0x49663b);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xdd3961){if(this['has'](_0xdd3961))throw new _0x2e6f8f('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xdd3961['innerView'],_0xdd3961),this['_viewToAnnotation']['set'](_0xdd3961['view'],_0xdd3961);for(const _0x4d7062 of _0xdd3961['focusableElements'])this['_focusTracker']['add'](_0x4d7062);this['listenTo'](_0xdd3961['focusableElements'],'add',(_0xc13dc5,_0x3af9cc)=>{this['_focusTracker']['add'](_0x3af9cc);}),this['listenTo'](_0xdd3961['focusableElements'],'remove',(_0x4d90c7,_0x3a7138)=>{this['_focusTracker']['remove'](_0x3a7138);}),this['listenTo'](_0xdd3961['view']['focusTracker'],'change:isFocused',(_0x7dcc1f,_0xcbea1e,_0x4a8abb)=>{_0x4a8abb&&this['fire']('focus',_0xdd3961);}),_0xdd3961['updateTargetRect']();const _0xfbfdd3=this['_getOrderInContent'](_0xdd3961['view']['targetRect']);return super['add'](_0xdd3961,_0xfbfdd3);}['remove'](_0xed1a7d){if(!this['has'](_0xed1a7d))throw new _0x2e6f8f('annotationcollection-not-existing-item',null);this['stopListening'](_0xed1a7d['view']['focusTracker']),this['stopListening'](_0xed1a7d['focusableElements']);for(const _0x4d8d93 of _0xed1a7d['focusableElements'])this['_focusTracker']['remove'](_0x4d8d93);return this['_viewToAnnotation']['delete'](_0xed1a7d['view']),this['_innerViewToAnnotation']['delete'](_0xed1a7d['innerView']),super['remove'](_0xed1a7d);}['getByInnerView'](_0x31c0f6){return this['_innerViewToAnnotation']['get'](_0x31c0f6);}['getByView'](_0x19da9f){return this['_viewToAnnotation']['get'](_0x19da9f);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x16bc63 of this)_0x16bc63['updateTargetRect']();this['_sort']();}['_sort'](){const _0x5e7a2a=Array['from'](this)['sort']((_0x456c12,_0x4eddde)=>w(_0x456c12['view']['targetRect'],_0x4eddde['view']['targetRect']));for(let _0x3770d3=_0x5e7a2a['length']-0x1;_0x3770d3>0x0;_0x3770d3--){const _0x1e8e1e=_0x5e7a2a[_0x3770d3];_0x3770d3!==this['getIndex'](_0x1e8e1e)&&(this['remove'](_0x1e8e1e),this['add'](_0x1e8e1e));}}['_getOrderInContent'](_0x167685){let _0x2bc353=0x0;if(!_0x167685)return this['length'];for(const _0x219505 of this){const _0x3ebe42=_0x219505['view']['targetRect'];if(_0x3ebe42){if(w(_0x167685,_0x3ebe42)<0x0)return _0x2bc353;_0x2bc353++;}}return _0x2bc353;}}function v({source:_0x5cf0e4,target:_0x3e7858,filter:_0x2b4a8f}){for(const _0x8916e6 of _0x5cf0e4)_0x2b4a8f(_0x8916e6)&&_0x3e7858['add'](_0x8916e6);_0x3e7858['listenTo'](_0x5cf0e4,'add',(_0x28bcb8,_0xe60868)=>{_0x2b4a8f(_0xe60868)&&_0x3e7858['add'](_0xe60868);}),_0x3e7858['listenTo'](_0x5cf0e4,'remove',(_0x346e39,_0x208f4b)=>{_0x3e7858['has'](_0x208f4b)&&_0x3e7858['remove'](_0x208f4b);});}function w(_0x2e49a7,_0xcd13c6){if(null===_0x2e49a7&&null===_0xcd13c6)return 0x0;if(null===_0x2e49a7)return-0x1;if(null===_0xcd13c6)return 0x1;const _0x54329d=_0x2e49a7['top']-_0xcd13c6['top'];return 0x0==_0x54329d?_0x2e49a7['left']-_0xcd13c6['left']:_0x54329d;}class y extends _0x2228db{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x163f48){if(super(_0x163f48),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x163f48 instanceof _0x74e6ba){const _0x2d971b=_0x163f48['locale'];_0x163f48['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x2d971b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x2d971b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x2d971b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x2d971b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x2d971b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x2d971b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x2d971b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2144cb){this['collection']['add'](_0x2144cb);}['remove'](_0x22ed17){this['collection']['remove'](_0x22ed17),_0x22ed17['destroy']();}['refreshVisibility'](){for(const _0x422218 of this['collection'])_0x422218['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x32b724){return this['collection']['getByInnerView'](_0x32b724);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x16565c of this['collection'])_0x16565c['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x29897b){this['fire']('_activateAnnotation',_0x29897b);}['createAnnotation'](_0x17c1ec){return new T(_0x17c1ec);}['createAnnotationView'](_0x7bf4f6,_0x9808df){return new E(_0x7bf4f6,_0x9808df);}['_addActiveAnnotation'](_0x25f920){const _0x581995=new Set(this['activeAnnotations']);_0x581995['add'](_0x25f920),this['activeAnnotations']=_0x581995;}['_removeActiveAnnotation'](_0x156c75){const _0x2e85b2=new Set(this['activeAnnotations']);_0x2e85b2['delete'](_0x156c75),this['activeAnnotations']=_0x2e85b2;}['_bindAnnotationsToVisibleAnnotations'](){const _0xc12bce=this['collection'],_0x9d7908=this['_visibleAnnotations'];function _0x56fd56(_0x34188d){const _0x4149f6=_0x34188d['source'];_0x4149f6['isVisible']&&!_0x9d7908['has'](_0x4149f6)?_0x9d7908['add'](_0x4149f6):!_0x4149f6['isVisible']&&_0x9d7908['has'](_0x4149f6)&&_0x9d7908['remove'](_0x4149f6),_0x4149f6['view']['focusTracker']['remove'](_0x4149f6['view']['element']),_0x4149f6['view']['focusTracker']['add'](_0x4149f6['view']['element']);}this['listenTo'](_0xc12bce,'add',(_0x410ae1,_0x3855c8)=>{_0x3855c8['isVisible']&&_0x9d7908['add'](_0x3855c8),this['listenTo'](_0x3855c8,'change:isVisible',_0x56fd56);}),this['listenTo'](_0xc12bce,'remove',(_0x21c20b,_0x4166b7)=>{_0x9d7908['has'](_0x4166b7)&&_0x9d7908['remove'](_0x4166b7),this['stopListening'](_0x4166b7,'change:isVisible',_0x56fd56);});}['_setupEnterAnnotationKeystroke'](){const _0x5744a8=_0x5cc570=>{_0x5cc570['on']('ready',()=>{_0x5cc570['keystrokes']['set'](_0x4ddf4f,(_0x31d67c,_0x2083c5)=>{const _0x2097f8=_0x4dfbcc(this['activeAnnotations']['values']());_0x2097f8&&(_0x2097f8['view']['focus'](),_0x2083c5());});});};this['context']instanceof _0x74e6ba?_0x5744a8(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x30b874,_0x53a79c)=>{_0x5744a8(_0x53a79c);});}['_setupEscapeAnnotationHandling'](){const _0x2a9c18=_0x24c33a=>{const _0x3519e7=_0x24c33a['source'],_0x1ed572=[];let _0x313c92;if(Array['isArray'](_0x3519e7['target'])){_0x313c92=_0x3519e7['target'][0x0],this['context']instanceof _0x74e6ba?_0x1ed572['push'](this['context']):this['context']['editors']&&_0x1ed572['push'](...this['context']['editors']);for(const _0x397cbf of _0x1ed572)for(const _0x35c87f of _0x397cbf['editing']['view']['domRoots']['values']())if(_0x35c87f['contains'](_0x313c92))return void _0x397cbf['editing']['view']['focus']();_0x313c92['focus']();}};this['listenTo'](this['collection'],'add',(_0x342612,_0x31877d)=>{this['listenTo'](_0x31877d,'escape',_0x2a9c18,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x459451,_0x237508)=>{this['stopListening'](_0x237508,'escape',_0x2a9c18);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2228db{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f6094){super(_0x2f6094),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x580000=this['context']['config'];_0x580000['define']('comments.maxCommentsWhenCollapsed',0x2),_0x580000['define']('comments.maxThreadTotalWeight',0x1f4),_0x580000['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x580000['define']('comments.CommentThreadView',gt),_0x580000['define']('comments.CommentView',Tt),_0x580000['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x217a0a=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2c43ed,_0x164ba8)=>this['_addCommentThread'](_0x164ba8)),this['on']('submitCommentThread',(_0x59c2e3,_0x5980fb)=>this['_submitCommentThread'](_0x5980fb)),this['on']('resolveCommentThread',(_0x5e602f,_0x47e127)=>this['_resolveCommentThread'](_0x47e127)),this['on']('resolveCommentThread',(_0x4c93b2,_0x49a4ee)=>this['_updateActiveAnnotation'](_0x49a4ee),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x141eca,_0x12a5b8)=>this['_reopenCommentThread'](_0x12a5b8)),this['on']('reopenCommentThread',(_0x4afc7c,_0x29d1c8)=>this['_updateActiveAnnotation'](_0x29d1c8),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x167922,_0x2efdf7)=>this['_removeCommentThread'](_0x2efdf7)),this['on']('updateCommentThread',(_0x38474d,_0x3c4a6a)=>this['_updateCommentThread'](_0x3c4a6a)),this['on']('updateCommentThread',(_0x204d47,_0x280f8f)=>this['_updateActiveAnnotation'](_0x280f8f),{'priority':'lowest'}),this['on']('addComment',(_0xfeb222,_0x5be59e)=>this['_addComment'](_0x5be59e)),this['on']('updateComment',(_0x5b442a,_0x4ecab7)=>this['_updateComment'](_0x4ecab7)),this['on']('removeComment',(_0x5f3ddd,_0x24a2e0)=>this['_removeComment'](_0x24a2e0)),this['on']('addComment',(_0x2b5204,{threadId:_0x1abb7d,isFromAdapter:_0xfac848})=>{if(_0xfac848)return;const _0xf358ab=this['getCommentThread'](_0x1abb7d),_0x33e281=_0xf358ab&&this['_threadToController']['get'](_0xf358ab);_0x33e281&&_0x33e281['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x217a0a,'change:activeAnnotations',(_0xf301c7,_0x5af6af,_0x2398f1)=>{const _0x20569d=Array['from'](_0x2398f1)['map'](_0x4626b5=>this['_viewToController']['get'](_0x4626b5['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x20569d?_0x20569d['model']:null;});}set['adapter'](_0x51a67b){if(this['_adapter'])throw new _0x2e6f8f('commentsrepository-adapter-already-set');this['_adapter']=_0x51a67b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2063b6=_t,threadId:_0x5656b0=_0x2388d3(),comments:_0x3d3baf=[],unlinkedAt:_0x3737bc=null,resolvedAt:_0x113b35=null,resolvedBy:_0x1c7b6f=null,target:_0x5b6933=null,context:_0x445a4d=null,attributes:_0x49fb63={},isResolvable:_0x3049e1=!0x0,isSubmitted:_0x362e75=!0x1,isFromAdapter:_0x1b5869=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x2063b6),{'channelId':_0x2063b6,'threadId':_0x5656b0,'comments':_0x3d3baf,'unlinkedAt':_0x3737bc,'resolvedAt':_0x113b35,'resolvedBy':_0x1c7b6f,'target':_0x5b6933,'context':_0x445a4d,'attributes':_0x49fb63,'isFromAdapter':_0x1b5869,'isResolvable':_0x3049e1,'isSubmitted':_0x362e75}),this['getCommentThread'](_0x5656b0);}['openNewCommentThread']({channelId:_0x29c7c9=_t,threadId:_0x5d07d5=_0x2388d3(),target:_0x20a21a,context:_0x58c33d=null,isResolvable:_0x4f4ce6=!0x0}){if(this['_readOnlyChannels']['has'](_0x29c7c9)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x20a21a)throw new _0x2e6f8f('commentsrepository-missing-target');const _0xc153b6=this['addCommentThread']({'channelId':_0x29c7c9,'threadId':_0x5d07d5,'target':_0x20a21a,'context':_0x58c33d,'isResolvable':_0x4f4ce6});if(!_0xc153b6)return null;const _0x3c98b0=this['_threadToController']['get'](_0xc153b6),_0x2b22eb=_0x3c98b0['view']['commentThreadInputView']['commentInputView'],_0x306fe9=this['context']['plugins']['get'](y),_0x2202b6=_0x306fe9['getByInnerView'](_0x3c98b0['view']);return _0x306fe9['activate'](_0x2202b6),_0x2b22eb['once']('editorReady',()=>_0x2b22eb['focus']()),_0xc153b6;}['hasCommentThread'](_0x435373){if('string'!=typeof _0x435373)throw new _0x2e6f8f('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x435373);}['updateCommentThread']({channelId:_0x50c285=_t,threadId:_0xf9184e,context:_0x442628,unlinkedAt:_0xcd1a37,attributes:_0x4179ec,isFromAdapter:_0x10c4b8=!0x1}){return this['fire'](Nt('updateCommentThread',_0x50c285),{'channelId':_0x50c285,'threadId':_0xf9184e,'context':_0x442628,'unlinkedAt':_0xcd1a37,'attributes':_0x4179ec,'isFromAdapter':_0x10c4b8}),this['getCommentThread'](_0xf9184e);}['getCommentThread'](_0x18fcb3){if('string'!=typeof _0x18fcb3)throw new _0x2e6f8f('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x18fcb3);}['fetchCommentThread']({channelId:_0x50c03a,threadId:_0x4c919c}={}){const _0x5d9369=this['getCommentThread'](_0x4c919c);if(_0x5d9369)return Promise['resolve'](_0x5d9369);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2e6f8f('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x50c03a,'threadId':_0x4c919c})['then'](_0x3c9795=>this['hasCommentThread'](_0x4c919c)?this['getCommentThread'](_0x4c919c):_0x3c9795?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x50c03a},_0x3c9795)):void 0x0)['catch'](_0x568634=>{throw console['error'](_0x568634),new _0x2e6f8f('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4b3e59,skipNotAttached:_0x35981a=!0x1,skipEmpty:_0x1682e2=!0x1,toJSON:_0x281d9e=!0x1}={}){const _0x33ad7d=[];for(const _0x959a1f of this['_threads']['values']())_0x4b3e59&&_0x959a1f['channelId']!==_0x4b3e59||_0x35981a&&!_0x959a1f['isAttached']||_0x1682e2&&0x0===_0x959a1f['length']||_0x33ad7d['push'](_0x959a1f);return _0x281d9e?_0x33ad7d['map'](_0xe9e23=>_0xe9e23['toJSON']()):_0x33ad7d;}['getAnnotationForCommentThread'](_0x42b34a){const _0xa081f0=this['_threadToController']['get'](_0x42b34a);if(!_0xa081f0)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0xa081f0['view'])||null;}['getCommentThreadForAnnotation'](_0x533537){const _0x22e196=this['_viewToController']['get'](_0x533537['innerView']);return _0x22e196?_0x22e196['model']:null;}['setActiveCommentThread'](_0x4b02e5){const _0x36697a=this['context']['plugins']['get'](y);if(!_0x4b02e5)return void(this['activeCommentThread']&&_0x36697a['deactivateAll']());const _0x350d4e=this['getCommentThread'](_0x4b02e5);if(!_0x350d4e)throw new _0x2e6f8f('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4b02e5});if(!this['_threadToController']['has'](_0x350d4e))throw new _0x2e6f8f('commentsrepository-active-not-attached',null,{'threadId':_0x4b02e5});const _0x4ffcbc=_0x36697a['getByInnerView'](this['_threadToController']['get'](_0x350d4e)['view']);_0x36697a['activate'](_0x4ffcbc);}['switchReadOnly'](_0x33b539,_0x387d27){_0x33b539?this['_readOnlyChannels']['add'](_0x387d27):this['_readOnlyChannels']['delete'](_0x387d27),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x33fc3f){return this['_readOnlyChannels']['has'](_0x33fc3f)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x35d8c0,_0x5c4967){return new vt(_0x35d8c0,_0x5c4967);}['setPermissions'](_0xad6efe,_0x9754dd=_t){this['_permissions']['set'](_0x9754dd,_0xad6efe),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2399c4=_t){return this['_permissions']['has'](_0x2399c4)?this['_permissions']['get'](_0x2399c4):bt;}['_addCommentThread']({channelId:_0x14709e,threadId:_0x1583bb,comments:_0x111653,unlinkedAt:_0x16b923,resolvedAt:_0x31ebd3,resolvedBy:_0xba6b7a,target:_0x177031,context:_0x620bc8,attributes:_0x191ca8,isFromAdapter:_0x4451b4,isResolvable:_0x36cd7b,isSubmitted:_0x38310b}){if('string'!=typeof _0x1583bb)throw new _0x2e6f8f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1583bb});if(this['hasCommentThread'](_0x1583bb))throw new _0x2e6f8f('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1583bb});const _0x64cdfd=new pi(this,{'channelId':_0x14709e,'id':_0x1583bb,'context':_0x620bc8,'attributes':_0x191ca8,'unlinkedAt':_0x16b923,'resolvedAt':_0x31ebd3,'resolvedBy':_0xba6b7a?this['context']['plugins']['get'](it)['getUser'](_0xba6b7a):null,'isResolvable':_0x36cd7b,'isSubmitted':_0x38310b||_0x4451b4});this['_threads']['set'](_0x1583bb,_0x64cdfd);for(const _0x4536c7 of _0x111653)_0x64cdfd['_add'](this['_createNewComment']({'threadId':_0x1583bb,..._0x4536c7}));return _0x177031&&_0x64cdfd['attachTo'](_0x177031),_0x4451b4||!_0x64cdfd['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x14709e,'threadId':_0x1583bb});}['_submitCommentThread']({channelId:_0x111a51,threadId:_0x4f636a}){if(!this['hasCommentThread'](_0x4f636a))throw new _0x2e6f8f('commentsrepository-missing-comment-thread',this);const _0x5159cf=this['getCommentThread'](_0x4f636a);if(_0x5159cf['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4b98e1,comments:_0x4e0c5e,resolvedAt:_0x3a5f23,resolvedBy:_0x56f025,context:_0x90e2c9,attributes:_0x4e2a7b}=_0x5159cf,_0x34b143=this['context']['plugins']['get']('PendingActions'),_0x3fcecf=_0x34b143['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x111a51,'threadId':_0x4b98e1,'comments':_0x4e0c5e['map'](_0x253fc3=>_0x253fc3['toJSON']()),'resolvedAt':_0x3a5f23,'resolvedBy':_0x56f025?_0x56f025['id']:_0x56f025,'context':_0x90e2c9,'attributes':_0x4e2a7b})['then'](({comments:_0x4a8a5d})=>{_0x34b143['remove'](_0x3fcecf);for(const _0x5bff2d of _0x4a8a5d)this['_updateComment']({'channelId':_0x111a51,'threadId':_0x4f636a,'commentId':_0x5bff2d['commentId'],'createdAt':_0x5bff2d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x235a83=>{throw console['error'](_0x235a83),new _0x2e6f8f('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x416f23,target:_0x3e2706}){const _0x4634e=this['getCommentThread'](_0x416f23);if(!_0x4634e)throw new _0x2e6f8f('commentsrepository-attach-missing-comment-thread',this);const _0x3e7269=this['context']['plugins']['get']('PendingActions'),_0x517323=this['context']['plugins']['get'](y),_0x3ebabd=this['_createCommentThreadView'](_0x4634e),_0x425138=new vt(_0x4634e,_0x3ebabd);let _0x5789d7=null;_0x3ebabd['on']('change:isDirty',(_0x48dd8a,_0x4f5cdd,_0x4172e0)=>{_0x4172e0?_0x5789d7=_0x3e7269['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5789d7&&(_0x3e7269['remove'](_0x5789d7),_0x5789d7=null);}),this['_threadToController']['set'](_0x4634e,_0x425138),this['_viewToController']['set'](_0x3ebabd,_0x425138);const _0x3dc0a3=new E(this['context']['locale'],_0x3ebabd);_0x3dc0a3['bind']('length')['to'](_0x3ebabd),_0x3dc0a3['bind']('isDirty')['to'](_0x3ebabd,'isDirty',_0x3ebabd,'length',(_0x8e923a,_0x2c2274)=>_0x8e923a||!_0x2c2274),_0x3dc0a3['bind']('isActive')['to'](_0x3ebabd),_0x3dc0a3['type']='comment';const _0x4c7da8=new T({'view':_0x3dc0a3,'target':_0x3e2706,'type':'comment','isVisible':!_0x4634e['archivedAt']&&!!('function'==typeof _0x3e2706?_0x3e2706():_0x3e2706)});return _0x3ebabd['on']('escape',()=>{_0x4c7da8['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3ebabd,_0x4c7da8),_0x517323['add'](_0x4c7da8),_0x4c7da8;}['_bindAnnotationToEditors'](_0xf0f272,_0x5b56a6){this['listenTo'](_0xf0f272,'editorReady',(_0x133be8,_0x119bfc)=>{const _0x560a3e=_0x119bfc['ui']['view']['body']['bodyCollectionContainer'];_0x5b56a6['focusableElements']['add'](_0x560a3e),this['context']instanceof _0x74e6ba&&this['context']['ui']['focusTracker']['add'](_0x560a3e);},{'priority':'highest'}),this['listenTo'](_0xf0f272,'editorDestroyed',(_0x239554,_0x338213)=>{const _0x179494=_0x338213['ui']['view']['body']['bodyCollectionContainer'];_0x5b56a6['focusableElements']['has'](_0x179494)&&_0x5b56a6['focusableElements']['remove'](_0x179494),this['context']instanceof _0x74e6ba&&this['context']['ui']['focusTracker']['remove'](_0x179494);});}['_unbindEditors'](_0x463ee5){this['stopListening'](_0x463ee5,'editorReady'),this['stopListening'](_0x463ee5,'editorDestroyed');}['_createCommentThreadView'](_0x36a39c){const _0x1fc30e=this['context']['plugins']['get'](it),{config:_0x23cb62,locale:_0x6e8d47}=this['context'],_0xf8ccc6=pt(_0x23cb62['get']('locale'),_0x6e8d47);return new(0x0,(_0x23cb62['get']('comments'))['CommentThreadView'])(_0x6e8d47,_0x36a39c,_0x1fc30e['me'],{'editorConfig':{..._0x23cb62['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x23cb62['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x23cb62['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x23cb62['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x23cb62['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xf8ccc6,'CommentView':_0x23cb62['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x29b360,channelId:_0x42c4eb,resolvedAt:_0x114622,resolvedBy:_0x15ca86,isFromAdapter:_0x503ed8}){if(!this['hasCommentThread'](_0x29b360))throw new _0x2e6f8f('commentsrepository-missing-comment-thread',null,{'threadId':_0x29b360});const _0x49feec=this['getCommentThread'](_0x29b360);if(_0x49feec['isResolved'])throw new _0x2e6f8f('commentsrepository-resolved-comment-thread',null,{'threadId':_0x29b360});const _0x9018f0=this['context']['plugins']['get'](it);if(_0x49feec['resolvedBy']=_0x9018f0['getUser'](_0x15ca86),_0x49feec['resolvedAt']=_0x114622,_0x503ed8||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x385e69=this['context']['plugins']['get']('PendingActions'),_0x2b4f69=_0x385e69['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x42c4eb,'threadId':_0x29b360})['then'](({resolvedAt:_0x5ced5e,resolvedBy:_0xbeb7b4})=>{_0x385e69['remove'](_0x2b4f69),_0x49feec['resolvedBy']['id']!==_0xbeb7b4&&(_0x49feec['resolvedBy']=_0x9018f0['getUser'](_0xbeb7b4)),_0x49feec['resolvedAt']=_0x5ced5e;})['catch'](_0x2faad0=>{throw console['error'](_0x2faad0),new _0x2e6f8f('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2e5149,channelId:_0x574417,isFromAdapter:_0x475b6e}){if(!this['hasCommentThread'](_0x2e5149))throw new _0x2e6f8f('commentsrepository-missing-comment-thread',null,{'threadId':_0x2e5149});const _0x46b781=this['getCommentThread'](_0x2e5149);if(!_0x46b781['isResolved'])throw new _0x2e6f8f('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2e5149});if(_0x46b781['resolvedBy']=null,_0x46b781['resolvedAt']=null,_0x475b6e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3b1c40=this['context']['plugins']['get']('PendingActions'),_0xb88f83=_0x3b1c40['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x574417,'threadId':_0x2e5149})['then'](()=>_0x3b1c40['remove'](_0xb88f83))['catch'](_0x91cd6e=>{throw console['error'](_0x91cd6e),new _0x2e6f8f('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x49f204,isFromAdapter:_0x330e35}){const _0x3fb527=this['getCommentThread'](_0x49f204);if(!_0x3fb527)throw new _0x2e6f8f('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x49f204),this['_threads']['delete'](_0x49f204),!_0x3fb527['isSubmitted']||_0x330e35||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1b2821=this['context']['plugins']['get']('PendingActions'),{channelId:_0x417af2}=_0x3fb527,_0x39573c=_0x1b2821['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x417af2,'threadId':_0x49f204})['then'](()=>_0x1b2821['remove'](_0x39573c))['catch'](_0x341fb8=>{throw console['error'](_0x341fb8),new _0x2e6f8f('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4d56d0,unlinkedAt:_0x4d839c,context:_0x2a7341,attributes:_0x38a92a,isFromAdapter:_0x55f244}){if('string'!=typeof _0x4d56d0)throw new _0x2e6f8f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4d56d0});if(!this['hasCommentThread'](_0x4d56d0))throw new _0x2e6f8f('commentsrepository-missing-comment-thread',null,{'threadId':_0x4d56d0});const _0x6c5797=this['getCommentThread'](_0x4d56d0);let _0x3c4a7a=!0x1;if(void 0x0!==_0x2a7341&&_0x6c5797['context']!==_0x2a7341&&(_0x6c5797['context']=_0x2a7341,_0x3c4a7a=!0x0),void 0x0!==_0x4d839c&&_0x6c5797['unlinkedAt']!==_0x4d839c&&(_0x6c5797['unlinkedAt']=_0x4d839c,_0x3c4a7a=!0x0),_0x38a92a&&!At(_0x38a92a,_0x6c5797['attributes'])&&(_0x6c5797['attributes']=_0x38a92a,_0x3c4a7a=!0x0),!_0x3c4a7a)return Promise['resolve']();if(!_0x6c5797['isSubmitted']||_0x55f244||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2264ed=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5276e6}=_0x6c5797,_0x102400=_0x2264ed['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5276e6,'threadId':_0x4d56d0,'context':_0x2a7341,'unlinkedAt':_0x4d839c,'attributes':_0x38a92a})['then'](()=>_0x2264ed['remove'](_0x102400))['catch'](_0x469c36=>{throw console['error'](_0x469c36),new _0x2e6f8f('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x31feae){const _0x4489d4=this['context']['plugins']['get'](y),_0x4a3a23=this['getCommentThread'](_0x31feae);if(_0x4a3a23['_isAttached']=!0x1,this['_threadToController']['has'](_0x4a3a23)){const _0x32cd10=this['_threadToController']['get'](_0x4a3a23),_0x301dbe=_0x32cd10['view'],_0x4ee05e=_0x4489d4['getByInnerView'](_0x301dbe);this['_threadToController']['delete'](_0x4a3a23),this['_viewToController']['delete'](_0x301dbe),_0x4ee05e&&_0x4489d4['remove'](_0x4ee05e),_0x32cd10['destroy'](),_0x301dbe['destroy']()['then'](()=>{this['_unbindEditors'](_0x301dbe);});}}['_updateActiveAnnotation']({threadId:_0x5628fa,resolvedAt:_0x14f0a9,unlinkedAt:_0x484335}){const _0x443d25=!!_0x14f0a9,_0x1cb9aa=this['context']['plugins']['get'](y),_0x35a974=this['getCommentThread'](_0x5628fa);if(this['_threadToController']['has'](_0x35a974)){const _0x46916c=this['_threadToController']['get'](_0x35a974)['view'],_0xb3d785=_0x1cb9aa['getByInnerView'](_0x46916c);_0xb3d785&&(_0x443d25&&_0x1cb9aa['_removeActiveAnnotation'](_0xb3d785),_0x484335?_0xb3d785['isVisible']=!0x1:_0xb3d785['refreshVisibility']());}}['_getExternalAuthor'](_0x41124f){const _0x1aadbe=this['context']['plugins']['get'](it),_0x9f0563=It('external:'+_0x41124f),_0x116c1a=_0x1aadbe['getUser'](_0x9f0563);return _0x116c1a||_0x1aadbe['addUser']({'id':_0x9f0563,'name':_0x41124f});}['_createNewComment']({threadId:_0x1815b0,commentId:_0x54ed88=_0x2388d3(),content:_0x9dde95,authorId:_0x826325,createdAt:_0x4048c8,attributes:_0x110f5f}){if('string'!=typeof _0x54ed88)throw new _0x2e6f8f('commentsrepository-invalid-commentid');if('string'!=typeof _0x826325)throw new _0x2e6f8f('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x9dde95||!_0x9dde95['trim']())throw new _0x2e6f8f('commentsrepository-invalid-comment-content');const _0x10a2e0=this['context']['plugins']['get'](it)['getUser'](_0x826325);if(!_0x10a2e0)throw new _0x2e6f8f('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x826325});let _0x4adf45=null,_0x3eb132=_0x4048c8;return _0x110f5f?.['@external']&&(_0x4adf45=this['_getExternalAuthor'](_0x110f5f['@external']['authorName']),_0x3eb132=new Date(_0x110f5f['@external']['createdAt'])),new wi(this,{'threadId':_0x1815b0,'id':_0x54ed88,'author':_0x4adf45||_0x10a2e0,'creator':_0x10a2e0,'content':_0x9dde95,'createdAt':_0x4048c8,'authoredAt':_0x3eb132,'attributes':_0x110f5f});}['_addComment'](_0x1da4eb){let {threadId:_0x137710,content:_0x182919,attributes:_0x5214dd,isFromAdapter:_0x40c52b}=_0x1da4eb;const _0x23198c=this['getCommentThread'](_0x1da4eb['threadId']);if(!_0x23198c)throw new _0x2e6f8f('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xd726cd=this['_createNewComment'](_0x1da4eb),{id:_0x411d26}=_0xd726cd;if(_0x23198c['_add'](_0xd726cd),_0x40c52b||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x23198c['isSubmitted'])return Promise['resolve']();const _0x1bb58a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5d3323}=_0x23198c,_0x55f1a8=_0x1bb58a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5214dd||(_0x5214dd={}),this['adapter']['addComment']({'channelId':_0x5d3323,'threadId':_0x137710,'commentId':_0x411d26,'content':_0x182919,'attributes':_0x5214dd})['then'](_0x678a73=>{_0x1bb58a['remove'](_0x55f1a8),_0x678a73&&this['_updateComment']({'channelId':_0x5d3323,'threadId':_0x137710,'commentId':_0x411d26,'createdAt':_0x678a73['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x17d69e=>{throw console['error'](_0x17d69e),new _0x2e6f8f('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x16f14b,commentId:_0x5ba669,content:_0x3edd23,createdAt:_0x29be55,attributes:_0x444275,isFromAdapter:_0x22fa23}){if(void 0x0!==_0x3edd23&&('string'!=typeof _0x3edd23||!_0x3edd23['trim']()['length']))throw new _0x2e6f8f('commentsrepository-update-comment-invalid-content');const _0x1182ad=this['getCommentThread'](_0x16f14b),_0x785633=_0x1182ad['getComment'](_0x5ba669);if(!_0x785633)throw new _0x2e6f8f('commentsrepository-update-missing-comment',this);let _0x2ce331=!0x1;if(_0x3edd23&&_0x3edd23!==_0x785633['content']&&(_0x785633['isEditable']||_0x22fa23)&&(_0x785633['content']=_0x3edd23,_0x2ce331=!0x0),_0x29be55&&_0x29be55!==_0x785633['createdAt']&&(_0x785633['createdAt']=_0x29be55,_0x785633['attributes']&&_0x785633['attributes']['@external']||(_0x785633['authoredAt']=_0x29be55),_0x2ce331=!0x0),_0x444275&&!At(_0x444275,_0x785633['attributes'])&&(_0x785633['attributes']=_0x444275,_0x2ce331=!0x0),!_0x2ce331)return Promise['resolve']();if(_0x1182ad['fire']('commentUpdated'),_0x22fa23||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x558d69=this['context']['plugins']['get']('PendingActions'),{channelId:_0x96bc44}=this['getCommentThread'](_0x785633['threadId']),_0xab0332=_0x558d69['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x96bc44,'threadId':_0x16f14b,'commentId':_0x5ba669,'content':_0x3edd23,'attributes':_0x444275})['then'](()=>_0x558d69['remove'](_0xab0332))['catch'](_0x14e0ca=>{throw console['error'](_0x14e0ca),new _0x2e6f8f('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x40f74e,commentId:_0x53c77e,isFromAdapter:_0x15df4e}){const _0x4a754a=this['getCommentThread'](_0x40f74e),_0x5b457d=_0x4a754a['getComment'](_0x53c77e);if(!_0x5b457d)throw new _0x2e6f8f('commentsrepository-remove-missing-comment',this);if(_0x4a754a['_remove'](_0x5b457d),_0x15df4e||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4fb2c1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x50068c}=_0x4a754a,_0x587969=_0x4fb2c1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x50068c,'threadId':_0x40f74e,'commentId':_0x53c77e})['then'](()=>_0x4fb2c1['remove'](_0x587969))['catch'](_0xed74ef=>{throw console['error'](_0xed74ef),new _0x2e6f8f('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x2f7441(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1bc3ae,_0x228c62){super();const _0x38a5b2=_0x1bc3ae['context']['plugins']['get'](it)['me'],_0x5cdba0=_0x1bc3ae['getCommentThread'](_0x228c62['threadId']),_0x339305=0x0===_0x5cdba0['comments']['length'],_0x535d2c=_0x38a5b2===_0x228c62['author'];this['id']=_0x228c62['id'],this['threadId']=_0x228c62['threadId'],this['author']=_0x228c62['author'],this['creator']=_0x228c62['creator'],this['isExternal']=Boolean(_0x228c62['attributes']&&_0x228c62['attributes']['@external']),this['set']('content',_0x228c62['content']),this['createdAt']=_0x228c62['createdAt']||new Date(),this['set']('authoredAt',_0x228c62['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5cdba0,'resolvedAt'),this['set']('attributes',_0x228c62['attributes']||{}),this['bind']('isEditable')['to'](_0x1bc3ae,'_permissions',()=>{const _0xf6326a=_0x1bc3ae['getPermissions'](_0x5cdba0['channelId'])['write'],_0x20e579=_0x1bc3ae['getPermissions'](_0x5cdba0['channelId'])['modifyAll'];return _0x535d2c&&_0xf6326a||!_0x535d2c&&_0x20e579;}),this['bind']('isRemovable')['to'](_0x5cdba0,'isRemovable',_0x1bc3ae,'_permissions',_0x9f2867=>{const _0x2935e7=_0x1bc3ae['getPermissions'](_0x5cdba0['channelId'])['write'],_0x20929c=_0x1bc3ae['getPermissions'](_0x5cdba0['channelId'])['modifyAll'];return _0x535d2c&&_0x2935e7||_0x9f2867&&_0x339305||!_0x535d2c&&_0x20929c&&!_0x339305;}),this['bind']('isReadOnly')['to'](_0x5cdba0,'isReadOnly'),this['_repository']=_0x1bc3ae;}get['weight'](){return Math['max'](function(_0x5b9fce){const _0x5bb85c=document['createElement']('div');return _0x5bb85c['innerHTML']=_0x5b9fce,_0x5bb85c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x34aadb){const {threadId:_0x511557,id:_0x6c0a99}=this;if(!this['_repository']['hasCommentThread'](_0x511557))throw new _0x2e6f8f('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x43a0e9}=this['_repository']['getCommentThread'](_0x511557);this['_repository']['fire'](Nt('updateComment',_0x43a0e9,_0x511557),{'channelId':_0x43a0e9,'threadId':_0x511557,'commentId':_0x6c0a99,..._0x34aadb});}['setAttribute'](_0x1fc197,_0x3f6947){const _0xbaa232=wt(this['attributes']);yt(_0xbaa232,_0x1fc197,_0x3f6947),this['update']({'attributes':_0xbaa232});}['removeAttribute'](_0x4ec170){const _0xc7c60=wt(this['attributes']);Ct(_0xc7c60,_0x4ec170),this['update']({'attributes':_0xc7c60});}['remove'](_0x34074b={}){if(!_0x34074b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x689a42,id:_0x5e9539}=this;if(!this['_repository']['hasCommentThread'](_0x689a42))throw new _0x2e6f8f('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x25ebd2}=this['_repository']['getCommentThread'](_0x689a42);this['_repository']['fire'](Nt('removeComment',_0x25ebd2,_0x689a42),{'channelId':_0x25ebd2,'threadId':_0x689a42,'commentId':_0x5e9539,..._0x34074b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x105475,..._0x1c5e1b){for(const _0x352ddf of _0x1c5e1b)void 0x0!==_0x352ddf&&(_0x105475+=':'+String(_0x352ddf));return _0x105475;}class ot extends _0x164c61{constructor(_0x5a0fc4){super(_0x5a0fc4),this['set']('hasContent',!0x1);}['refresh'](){const _0x24bb07=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x364255 of _0x24bb07['getRanges']())if(this['_hasContent'](_0x364255))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5064b7=_0x2388d3(),ranges:_0xecfe57,comment:_0x7c4fa8}={}){const _0x15eb1c=this['editor']['model'],_0x4d9036=_0xecfe57??Array['from'](_0x15eb1c['document']['selection']['getRanges']()),_0x5c6439=[];for(const _0x193f9a of _0x4d9036)this['_hasContent'](_0x193f9a)&&_0x5c6439['push'](this['_trimToContent'](_0x193f9a));if(!_0x5c6439['length'])throw new _0x2e6f8f('addcommentthreadcommand-incorrect-ranges',null);_0x7c4fa8&&this['_createCommentThread'](_0x5064b7,_0x7c4fa8),this['_createMarkersFromRanges'](_0x5064b7,_0x5c6439,!!_0x7c4fa8);}['_createMarkersFromRanges'](_0x455ad0,_0x2330e8,_0x1b1ec0){this['editor']['model']['change'](_0x3ac4bd=>{for(const _0x3d137b of _0x2330e8){const _0x31fc54=_0x2388d3()['substr'](0x1,0x5),_0x2016e='comment:'+_0x455ad0+':'+_0x31fc54;_0x3ac4bd['addMarker'](_0x2016e,{'range':_0x3d137b,'usingOperation':_0x1b1ec0,'affectsData':_0x1b1ec0});}});}['_createCommentThread'](_0x113ee0,_0x2c7118){const _0x218300=this['editor']['plugins']['get']('CommentsRepository'),_0x3102de=this['editor']['config']['get']('collaboration.channelId'),_0x31ecd8=this['editor']['plugins']['get']('Users')['me'];if(!_0x31ecd8)throw new _0x2e6f8f('addcommentthreadcommand-user-not-found',null);_0x218300['addCommentThread']({'threadId':_0x113ee0,'channelId':_0x3102de,'comments':[{'authorId':_0x31ecd8['id'],'content':_0x2c7118,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3a3908){for(const _0x413310 of _0x3a3908['getItems']())if(this['_itemIsContent'](_0x413310))return!0x0;return!0x1;}['_itemIsContent'](_0x4aa5e8){return _0x4aa5e8['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4aa5e8)&&!_0x4aa5e8['is']('element','tableCell');}['_trimToContent'](_0x375212){const _0xcb8b46=_0x86f866=>!this['_itemIsContent'](_0x86f866['item']),_0x23c51b=_0x375212['start']['getLastMatchingPosition'](_0xcb8b46),_0x5d4cce=_0x375212['end']['getLastMatchingPosition'](_0xcb8b46,{'direction':'backward'});return this['editor']['model']['createRange'](_0x23c51b,_0x5d4cce);}}class b extends _0x41aca7{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10c84f){super(_0x10c84f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1bcc99=this['editor'],_0x2d034b=_0x1bcc99['model']['document']['selection'],_0x5a63f3=_0x49b0b7(()=>this['refreshSelectedViews'](),0xa);_0x2d034b['on']('change:range',(_0x14e17d,_0x2d2364)=>{_0x2d2364['directChange']&&(_0x5a63f3['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1bcc99['editing']['view']['document'],'change:isFocused',(_0x30c886,_0x595a4e,_0x327999)=>{_0x327999&&_0x5a63f3();}),this['listenTo'](_0x1bcc99['ui']['focusTracker'],'change:isFocused',(_0x7a0a5,_0x459cd9,_0x28bf53)=>{_0x28bf53||this['fire']('blur',{'isAnnotationTracked':_0x1f4231=>this['_editorAnnotationsData']['has'](_0x1f4231['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3bd57a){if(this['_editorAnnotations']['has'](_0x3bd57a['view']))return;this['_editorAnnotations']['add'](_0x3bd57a['view']),this['editor']['ui']['focusTracker']['add'](_0x3bd57a['view']['element']);const _0x2b1919=this['editor']['plugins']['get'](y);this['listenTo'](_0x2b1919['collection'],'remove',(_0xcf22a0,_0x47644b)=>{this['editor']['ui']['focusTracker']['remove'](_0x47644b['view']['element']),this['_editorAnnotations']['delete'](_0x47644b['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4c53e2){if('function'!=typeof _0x4c53e2)throw new _0x2e6f8f('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4c53e2);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x575846,annotations:_0x3fe532}){const _0x3dd8b1=[],_0x52da32=this['editor']['model']['document']['selection'],_0x5f43d0=Array['from'](_0x52da32['getRanges']());for(const [_0x4a7781,_0x59dccc]of this['_editorAnnotationsData']){const _0x25c4a2=_0x3abf21(_0x59dccc),_0x2eace3=_0x3fe532['getByInnerView'](_0x4a7781);_0x25c4a2&&_0x2eace3&&_0x3dd8b1['push']({'annotation':_0x2eace3,'range':_0x25c4a2});}function _0x3abf21(_0x331cce){for(const _0x653715 of _0x331cce)for(const _0x3a8738 of _0x5f43d0)if(_0x653715['containsRange'](_0x3a8738,!_0x52da32['isCollapsed']))return _0x653715;return null;}return _0x3dd8b1['sort']((_0xd67d1e,_0x50adcb)=>{const _0x219fc0=_0xd67d1e['range'],_0x72b8e=_0x50adcb['range'];if(!_0x219fc0['isEqual'](_0x72b8e)){if(_0x219fc0['containsRange'](_0x72b8e,!0x0))return 0x1;if(_0x72b8e['containsRange'](_0x219fc0,!0x0))return-0x1;}return _0xd67d1e['annotation']==_0x575846?-0x1:_0x50adcb['annotation']==_0x575846?0x1:0x0;})['map'](_0x3a91c7=>_0x3a91c7['annotation']);}get['_editorAnnotationsData'](){const _0x3aa83a=new Map();for(const _0x1b9333 of Array['from'](this['_dataCollectors']))for(const [_0x26e1ff,_0x4be67e]of _0x1b9333())_0x3aa83a['set'](_0x26e1ff,_0x4be67e);return _0x3aa83a;}}class st extends _0x41aca7{['afterInit'](){const _0x26ccce=this['editor'];if(!_0x26ccce['plugins']['has']('RestrictedEditingModeEditing'))return;_0x26ccce['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x41aca7{constructor(_0x476684){super(_0x476684),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2c1e77=this['editor'],_0x213524=_0x2c1e77['commands']['get']('importWord'),_0x2f5b78=_0x2c1e77['plugins']['get'](it);_0x213524&&(_0x213524['on']('execute',(_0x5120df,[,_0x3aedd7])=>{_0x3aedd7['collaboration_features']={'comments':!0x0,'user_id':_0x2f5b78['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x213524,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x321a06,_0x1f19d3){const {comment_threads:_0x1ce19c}=_0x1f19d3;_0x1ce19c&&_0x1ce19c['forEach'](({thread_id:_0x37df72,comments:_0x524764,is_resolved:_0x5d6490})=>{const _0x2184af=new Date(),_0x5e5ff4=_0x524764['map'](({author:_0x4adebd,content:_0x5658ed,created_at:_0x1f63a9})=>({'content':_0x5658ed,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2184af,'attributes':{'@external':{'authorName':_0x4adebd,'createdAt':_0x1f63a9?new Date(_0x1f63a9):new Date(),'source':'importWord'}}})),_0xc87345=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xc87345,'threadId':_0x37df72,'comments':_0x5e5ff4,'resolvedAt':_0x5d6490?_0x2184af:null});});}}class at extends _0x41aca7{constructor(_0x461bd6){super(_0x461bd6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5e4007=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5e4007,'contentInsertion',(_0x44a3d5,_0x55b6b6)=>this['_removeMarkersWithoutThreads'](_0x55b6b6['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x225334){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x225334;const _0x3ebf4c=this['editor']['plugins']['get']('CommentsRepository');for(const _0xd75493 of _0x225334['keys']()){const [_0x3b4246,_0x2f84a9]=_0xd75493['split'](':');'comment'!=_0x3b4246||_0x3ebf4c['hasCommentThread'](_0x2f84a9)||_0x225334['delete'](_0xd75493);}return _0x225334;}['_registerMarkerInClipboardPipeline'](){const _0x50cf17=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1a6c4c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1a6c4c&&_0x50cf17['_registerMarkerToCopy']('comment',_0x1a6c4c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x10ea41){switch(_0x10ea41){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x48db6c){const _0x27c2c9=_0x48db6c['split'](':');return{'group':_0x27c2c9[0x0],'id':_0x27c2c9[0x1],'part':_0x27c2c9[0x2]};}class ut extends _0x41aca7{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x550566,_0x3a4f7a)=>{if(!_0x3a4f7a['options']['showCommentHighlights'])return null;if(_0x3a4f7a['options']['ignoreResolvedComments']){const {id:_0x540d8c}=ft(_0x550566['markerName']),_0x34b300=this['editor']['plugins']['get'](o);if(_0x34b300['getCommentThread'](_0x540d8c)?.['isResolved']&&_0x550566['item'])return _0x3a4f7a['consumable']['consume'](_0x550566['item'],'addMarker:'+_0x550566['markerName']),_0x3a4f7a['consumable']['consume'](_0x550566['item'],'removeMarker:'+_0x550566['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x31100f=>{_0x31100f['on']('addMarker:comment',(_0x316e3b,_0x25c908,_0x5bc82d)=>{if(!_0x5bc82d['options']['showCommentHighlights'])return;const _0x23176d=_0x25c908['item'];if(!_0x23176d)return;const _0x49eadd=_0x5bc82d['mapper']['toViewElement'](_0x23176d);this['editor']['model']['schema']['isObject'](_0x23176d)&&_0x49eadd&&!_0x49eadd['getCustomProperty']('widget')&&_0x49eadd['is']('containerElement')&&_0x54dc86(_0x49eadd,_0x5bc82d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x21d2e1,{writer:_0x5d084b,options:_0x589cc9})=>{if(!_0x589cc9['showCommentHighlights'])return null;const _0x522040=_0x5d084b['createContainerElement']('div'),_0x3f1906=_0x5d084b['createEmptyElement']('hr');return _0x5d084b['addClass']('ck-horizontal-line',_0x522040),_0x5d084b['insert'](_0x5d084b['createPositionAt'](_0x522040,0x0),_0x3f1906),_0x522040;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x54f390,{writer:_0x60ecaa,options:_0x245133})=>{if(!_0x245133['showCommentHighlights'])return null;const _0x2ef52e=_0x60ecaa['createContainerElement']('span'),_0x4925af=_0x60ecaa['createEmptyElement']('img');return _0x60ecaa['addClass']('image-inline',_0x2ef52e),_0x60ecaa['insert'](_0x60ecaa['createPositionAt'](_0x2ef52e,0x0),_0x4925af),_0x2ef52e;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1b2cfe,{writer:_0x3cc0b6,options:_0x591039})=>{if(_0x591039['showCommentHighlights'])return _0x3cc0b6['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2a6251,_0x3541c4,_0x39b64b)=>{_0x39b64b['options']['showCommentHighlights']&&_0x2a6251['stop']();},{'priority':'high'});}}class r extends _0x41aca7{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5babc0){super(_0x5babc0),this['set']('isThreadsLoadingPaused',!0x0),_0x5babc0['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5d5e53,_0x199b84,_0x540a61,_0x4a6b70)=>{const _0x2ef206=_0x5babc0['plugins']['get'](o),_0x5a7dc3=_0x540a61?ft(_0x540a61)['id']:null;_0x5babc0['model']['change'](()=>{if(_0x5a7dc3){const _0x5d6dd3=this['getAllMarkersForId'](_0x5a7dc3);for(const _0x46a209 of _0x5d6dd3)_0x5babc0['editing']['reconvertMarker'](_0x46a209);}if(_0x4a6b70){const {id:_0xd98974}=ft(_0x4a6b70),_0x39faf6=_0x2ef206['getCommentThread'](_0xd98974);if(_0x39faf6&&_0x39faf6['unlinkedAt'])return;if(_0x39faf6&&!_0x39faf6['isAttached'])return;const _0x9b42a4=this['getAllMarkersForId'](_0xd98974);for(const _0x13e4ff of _0x9b42a4)_0x5babc0['editing']['reconvertMarker'](_0x13e4ff);}}),_0x5a7dc3&&this['scrollToThreadMarker'](_0x5a7dc3);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x141ccf=this['editor'],_0x43a146=_0x141ccf['plugins']['get'](o),_0xc20b4e=_0x141ccf['config']['get']('collaboration.channelId'),_0x2efe1a=_0x43a146['getCommentThreads']()['filter'](_0x5a3d03=>_0x5a3d03['channelId']!==_0xc20b4e);_0x141ccf['commands']['add']('addCommentThread',new ot(_0x141ccf)),this['listenTo'](_0x141ccf,'change:isReadOnly',(_0x56feb9,_0x2a09b9,_0x2e3d39)=>{_0x43a146['switchReadOnly'](_0x2e3d39,_0x141ccf['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x43a146,dt('addCommentThread',_0xc20b4e),(_0x46406b,{threadId:_0x5c4778})=>{const _0xd64171=this['editor']['plugins']['get'](o)['getCommentThread'](_0x5c4778);_0xd64171?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5c4778);}),this['listenTo'](_0x43a146,dt('removeCommentThread',_0xc20b4e),(_0x1fae0f,{threadId:_0x561cc7})=>{_0x141ccf['model']['enqueueChange']({'isUndoable':!0x1},_0x411f56=>{const _0x27f017=this['getAllMarkersForId'](_0x561cc7);for(const _0x22c121 of _0x27f017)_0x411f56['removeMarker'](_0x22c121);});}),this['listenTo'](_0x43a146,dt('resolveCommentThread',_0xc20b4e),(_0xb04747,{threadId:_0x1fe134})=>{(this['_reconvertMarkers'](_0x1fe134),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1fe134)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x43a146,dt('reopenCommentThread',_0xc20b4e),(_0x5e2977,{threadId:_0x391642})=>{this['_reconvertMarkers'](_0x391642);},{'priority':'low'}),this['listenTo'](_0x43a146,dt('addComment',_0xc20b4e),(_0x20aeb5,{threadId:_0x547613,isFromAdapter:_0x47cf7b})=>{const _0x1f6266=this['getAllMarkersForId'](_0x547613);if(_0x47cf7b||0x0==_0x1f6266['length']||!_0x43a146['hasCommentThread'](_0x547613))return;0x1===_0x43a146['getCommentThread'](_0x547613)['length']&&_0x141ccf['model']['enqueueChange']({'isUndoable':!0x1},_0x856bb4=>{for(const _0x35fd80 of _0x1f6266)_0x856bb4['updateMarker'](_0x35fd80,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x2efe1a);}['afterInit'](){!async function(_0xf59ddc){const _0x4d1eab=_0x4ee43f([0x63,0x34,0x4d,0x31,0x57,0x52,0x68,0x36,0x75,0x41,0x43,0x4f,0x6d,0x35,0x55,0x54,0x49,0x4b,0x46,0x39,0x37,0x74,0x45,0x59,0x4c,0x48,0x66,0x51,0x78,0x5a,0x7a,0x6c,0x50,0x6b,0x4e,0x56,0x38,0x6e,0x70,0x6a,0x44,0x72,0x62,0x47,0x4a,0x65,0x77,0x71,0x73,0x76,0x61,0x58,0x79,0x67,0x69,0x64,0x53,0x32,0x33,0x42,0x30,0x6f]),_0xe0d733=0x3852b933,_0x1d9bb5=0x3855d6d3^_0xe0d733,_0x32fda1=window[_0x4ee43f([0x44,0x61,0x74,0x65])][_0x4ee43f([0x6e,0x6f,0x77])](),_0x30a814=_0xf59ddc[_0x4ee43f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x452262=new window[(_0x4ee43f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2db9a9=>{_0x30a814[_0x4ee43f([0x6f,0x6e,0x63,0x65])](_0x4ee43f([0x72,0x65,0x61,0x64,0x79]),_0x2db9a9);}),_0x4f4847={[_0x4ee43f([0x6b,0x74,0x79])]:_0x4ee43f([0x45,0x43]),[_0x4ee43f([0x75,0x73,0x65])]:_0x4ee43f([0x73,0x69,0x67]),[_0x4ee43f([0x63,0x72,0x76])]:_0x4ee43f([0x50,0x2d,0x32,0x35,0x36]),[_0x4ee43f([0x78])]:_0x4ee43f([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x4ee43f([0x79])]:_0x4ee43f([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x4ee43f([0x61,0x6c,0x67])]:_0x4ee43f([0x45,0x53,0x32,0x35,0x36])},_0x391cc4=_0x30a814[_0x4ee43f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4ee43f([0x67,0x65,0x74])](_0x4ee43f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x479458(){let _0x18186d,_0xf4ae74=null,_0x841866=null;try{if(_0x391cc4==_0x4ee43f([0x47,0x50,0x4c]))return _0x4ee43f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x18186d=_0x27c61f(),!_0x18186d)return _0x4ee43f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x18186d[_0x4ee43f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x841866=_0x55752e(_0x18186d[_0x4ee43f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x18186d[_0x4ee43f([0x6a,0x74,0x69])])),await _0x599a1a()?_0x2122ac()?_0x39bab5()?_0x4ee43f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x8a7d89()?(_0x18186d[_0x4ee43f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ee43f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xf4ae74=_0xba1435(_0x4ee43f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x18186d[_0x4ee43f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ee43f([0x74,0x72,0x69,0x61,0x6c])&&(_0xf4ae74=_0xba1435(_0x4ee43f([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x242524()):_0x4ee43f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4ee43f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4ee43f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4ee43f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x39bab5(){const _0x43fb90=[_0x4ee43f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4ee43f([0x74,0x72,0x69,0x61,0x6c])][_0x4ee43f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18186d[_0x4ee43f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x32fda1/0x3e8:0xe10*_0x1d9bb5;return _0x18186d[_0x4ee43f([0x65,0x78,0x70])]<_0x43fb90;}function _0x2122ac(){const _0x21bbd9=_0x18186d[_0x4ee43f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x21bbd9)return!0x1;if(_0x21bbd9[_0x4ee43f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee43f([0x2a])))return!0x0;if(_0x21bbd9[_0x4ee43f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee43f([0x43,0x4d,0x54])))return!0x0;if(_0x21bbd9[_0x4ee43f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee43f([0x52,0x43,0x4d,0x54]))){if(_0x48725e())return!0x0;if(_0x3cee5d()||_0x1bd447())return!0x0;}return!0x1;}function _0x8a7d89(){const _0x4c3ecb=_0x18186d[_0x4ee43f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4c3ecb||0x0==_0x4c3ecb[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x38a0b4}=new URL(window[_0x4ee43f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4c3ecb[_0x4ee43f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38a0b4))return!0x0;const _0x201b8c=_0x38a0b4[_0x4ee43f([0x73,0x70,0x6c,0x69,0x74])](_0x4ee43f([0x2e]));return _0x4c3ecb[_0x4ee43f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e8731=>_0x1e8731[_0x4ee43f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee43f([0x2a])))[_0x4ee43f([0x6d,0x61,0x70])](_0x3ec9ef=>_0x3ec9ef[_0x4ee43f([0x73,0x70,0x6c,0x69,0x74])](_0x4ee43f([0x2e])))[_0x4ee43f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e799c=>_0x1e799c[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x201b8c[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4ee43f([0x6d,0x61,0x70])](_0x5540b7=>Array(_0x201b8c[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5540b7[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4ee43f([0x66,0x69,0x6c,0x6c])](_0x5540b7[0x0]===_0x4ee43f([0x2a])?_0x4ee43f([0x2a]):'')[_0x4ee43f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5540b7))[_0x4ee43f([0x73,0x6f,0x6d,0x65])](_0x28d015=>_0x201b8c[_0x4ee43f([0x65,0x76,0x65,0x72,0x79])]((_0x348916,_0x23ed55)=>_0x28d015[_0x23ed55]===_0x348916||_0x28d015[_0x23ed55]===_0x4ee43f([0x2a])));}function _0x242524(){return _0xf4ae74&&_0x841866?new window[(_0x4ee43f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2860dc,_0x3cc6be)=>{_0xf4ae74[_0x4ee43f([0x74,0x68,0x65,0x6e])](_0x2860dc,_0x3cc6be),_0x841866[_0x4ee43f([0x74,0x68,0x65,0x6e])](_0x381c26=>{_0x381c26!=_0x4ee43f([0x56,0x61,0x6c,0x69,0x64])&&_0x2860dc(_0x381c26);},_0x3cc6be);}):_0xf4ae74||_0x841866||_0x4ee43f([0x56,0x61,0x6c,0x69,0x64]);}}function _0x55752e(_0x2b539c,_0x275983){return new window[(_0x4ee43f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1260d3=>{if(_0x241b85())return _0x1260d3(_0x4ee43f([0x56,0x61,0x6c,0x69,0x64]));_0x46dc35(),_0x30a814[_0x4ee43f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4ee43f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x6318c0=!0x1;const _0x55b063=_0x2388d3();function _0x1eb6a6(_0x23650e){return!!_0x23650e&&(typeof _0x23650e===_0x4ee43f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x23650e===_0x4ee43f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x23650e[_0x4ee43f([0x74,0x68,0x65,0x6e])]===_0x4ee43f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x23650e[_0x4ee43f([0x63,0x61,0x74,0x63,0x68])]===_0x4ee43f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xbd5608(_0x2cb2d4){_0x52120f(_0x2cb2d4)[_0x4ee43f([0x74,0x68,0x65,0x6e])](_0x447dc1=>{if(!_0x447dc1||_0x447dc1[_0x4ee43f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4ee43f([0x6f,0x6b]))return _0x4ee43f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4d315c(_0x620ca5(_0x55b063+_0x275983))!=_0x447dc1[_0x4ee43f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4ee43f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4ee43f([0x56,0x61,0x6c,0x69,0x64]);})[_0x4ee43f([0x74,0x68,0x65,0x6e])](_0x3a4e2d=>(_0x29a795(),_0x3a4e2d),()=>{const _0x5e2e72=_0x34cb3b();return null==_0x5e2e72?(_0x29a795(),_0x4ee43f([0x56,0x61,0x6c,0x69,0x64])):_0x4ee43f(_0x32fda1-_0x5e2e72>(0x1c5e3d33^_0xe0d733)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4ee43f([0x74,0x68,0x65,0x6e])](_0x1260d3)[_0x4ee43f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1260d3(_0x4ee43f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x65816a=0x386457b3^_0xe0d733;function _0x29a795(){const _0x4428da=_0x4ee43f([0x6c,0x6c,0x63,0x74,0x2d])+_0x4d315c(_0x620ca5(_0x2b539c)),_0x3e9402=_0x33aa94(_0x4d315c(window[_0x4ee43f([0x4d,0x61,0x74,0x68])][_0x4ee43f([0x63,0x65,0x69,0x6c])](_0x32fda1/_0x65816a)));window[_0x4ee43f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ee43f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4428da,_0x3e9402);}function _0x34cb3b(){const _0x20cea6=_0x4ee43f([0x6c,0x6c,0x63,0x74,0x2d])+_0x4d315c(_0x620ca5(_0x2b539c)),_0x3f651d=window[_0x4ee43f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ee43f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x20cea6);return _0x3f651d?window[_0x4ee43f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33aa94(_0x3f651d),0x10)*_0x65816a:null;}function _0x52120f(_0x52c159){return new window[(_0x4ee43f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57bd89,_0x63d07a)=>{_0x52c159[_0x4ee43f([0x74,0x68,0x65,0x6e])](_0x57bd89,_0x63d07a),window[_0x4ee43f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x63d07a,0x38536df3^_0xe0d733);});}}_0x30a814[_0x4ee43f([0x6f,0x6e])](_0x4ee43f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x280259,_0x47c07e)=>{if(_0x47c07e[0x0]!=_0x2b539c)return _0x1260d3(_0x4ee43f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x47c07e[0x1]={..._0x47c07e[0x1],[_0x4ee43f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x55b063};},{[_0x4ee43f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ee43f([0x68,0x69,0x67,0x68])}),_0x30a814[_0x4ee43f([0x6f,0x6e])](_0x4ee43f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x382a43=>{_0x1eb6a6(_0x382a43[_0x4ee43f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x6318c0=!0x0,_0xbd5608(_0x382a43[_0x4ee43f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4ee43f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ee43f([0x6c,0x6f,0x77])}),_0x452262[_0x4ee43f([0x74,0x68,0x65,0x6e])](()=>{_0x6318c0||_0x1260d3(_0x4ee43f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x241b85(){return _0x30a814[_0x4ee43f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ee43f([0x76,0x69,0x65,0x77])][_0x4ee43f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4ee43f([0x61,0x75,0x74,0x6f]);}function _0x46dc35(){_0x30a814[_0x4ee43f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ee43f([0x76,0x69,0x65,0x77])][_0x4ee43f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4ee43f([0x61,0x75,0x74,0x6f]);}}function _0xba1435(_0x57549a){const _0x529e0d=[new window[(_0x4ee43f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x213543=>setTimeout(_0x213543,0x385b87ff^_0xe0d733)),_0x452262[_0x4ee43f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4ee43f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x485fdc=>{let _0x42af6a=0x0;_0x30a814[_0x4ee43f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ee43f([0x6f,0x6e])](_0x4ee43f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3b617b,_0x5b6307)=>{_0x5b6307[0x0][_0x4ee43f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x42af6a++,_0x42af6a==(0x3852b8cb^_0xe0d733)&&(_0x485fdc(),_0x3b617b[_0x4ee43f([0x6f,0x66,0x66])]());});}))];return window[_0x4ee43f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4ee43f([0x72,0x61,0x63,0x65])](_0x529e0d)[_0x4ee43f([0x74,0x68,0x65,0x6e])](()=>_0x57549a);}async function _0x5bcdf6(){await _0x452262,_0x30a814[_0x4ee43f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ee43f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x54a0d6,_0x30a814[_0x4ee43f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ee43f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x54a0d6,_0x30a814[_0x4ee43f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4ee43f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x48725e(){return _0x1a294e(_0x4ee43f([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x118aac(_0x4ee43f([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4ee43f([0x73,0x74,0x61,0x74,0x65])]==_0x4ee43f([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3cee5d(){return _0x1a294e(_0x4ee43f([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x1bd447(){return _0x1a294e(_0x4ee43f([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4dfc93(_0x11af88){const _0x249a15=_0x380e34();_0x30a814[_0x249a15]=_0x4ee43f([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x11af88,_0x11af88!=_0x4ee43f([0x56,0x61,0x6c,0x69,0x64])&&_0x5bcdf6();}function _0x380e34(){const _0x389406=window[_0x4ee43f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4ee43f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4ee43f([0x6e,0x6f,0x77])]())[_0x4ee43f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4ee43f([0x2e]),'');let _0x113f08=_0x4ee43f([0x63]);for(let _0x401eae=0x0;_0x401eae<_0x389406[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x401eae+=0x2){let _0x3ab284=window[_0x4ee43f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x389406[_0x4ee43f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x401eae,_0x401eae+0x2));_0x3ab284>=_0x4d1eab[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3ab284-=_0x4d1eab[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x113f08+=_0x4d1eab[_0x3ab284];}return _0x113f08;}function _0x27c61f(){const _0x27b625=_0x391cc4[_0x4ee43f([0x73,0x70,0x6c,0x69,0x74])](_0x4ee43f([0x2e]));if(0x3!=_0x27b625[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x128b4b(_0x27b625[0x1]);function _0x128b4b(_0x1b725b){const _0x4b7ca4=_0x35d233(_0x1b725b);return _0x4b7ca4&&_0x412ec8()?_0x4b7ca4:null;function _0x412ec8(){const _0x2762ba=_0x4b7ca4[_0x4ee43f([0x6a,0x74,0x69])],_0x59c474=window[_0x4ee43f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2762ba[_0x4ee43f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2762ba[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2cdbef={..._0x4b7ca4,[_0x4ee43f([0x6a,0x74,0x69])]:_0x2762ba[_0x4ee43f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2762ba[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2cdbef[_0x4ee43f([0x76,0x63])],_0x620ca5(_0x2cdbef)==_0x59c474;}}}async function _0x599a1a(){let _0x1950af=!0x0;try{const _0x337311=_0x391cc4[_0x4ee43f([0x73,0x70,0x6c,0x69,0x74])](_0x4ee43f([0x2e])),[_0x114eaf,_0x2f4bfc,_0x92e105]=_0x337311;return _0x5d012c(_0x114eaf),await _0x4a9a2b(_0x114eaf,_0x2f4bfc,_0x92e105),_0x1950af;}catch{return!0x1;}function _0x5d012c(_0x1487a2){const _0xd49e8e=_0x35d233(_0x1487a2);_0xd49e8e&&_0xd49e8e[_0x4ee43f([0x61,0x6c,0x67])]==_0x4ee43f([0x45,0x53,0x32,0x35,0x36])||(_0x1950af=!0x1);}async function _0x4a9a2b(_0x574211,_0x592727,_0x172fbe){const _0x5de3ac=window[_0x4ee43f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4ee43f([0x66,0x72,0x6f,0x6d])](_0x2e4411(_0x172fbe),_0x332836=>_0x332836[_0x4ee43f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x220303=new window[(_0x4ee43f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4ee43f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x574211+_0x4ee43f([0x2e])+_0x592727),_0x9cd898=window[_0x4ee43f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4ee43f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x9cd898)return;const _0x2dd61f=await _0x9cd898[_0x4ee43f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4ee43f([0x6a,0x77,0x6b]),_0x4f4847,{[_0x4ee43f([0x6e,0x61,0x6d,0x65])]:_0x4ee43f([0x45,0x43,0x44,0x53,0x41]),[_0x4ee43f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4ee43f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4ee43f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x9cd898[_0x4ee43f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4ee43f([0x6e,0x61,0x6d,0x65])]:_0x4ee43f([0x45,0x43,0x44,0x53,0x41]),[_0x4ee43f([0x68,0x61,0x73,0x68])]:{[_0x4ee43f([0x6e,0x61,0x6d,0x65])]:_0x4ee43f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2dd61f,_0x5de3ac,_0x220303)||(_0x1950af=!0x1);}}function _0x35d233(_0x3505c3){return _0x3505c3[_0x4ee43f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4ee43f([0x65,0x79]))?JSON[_0x4ee43f([0x70,0x61,0x72,0x73,0x65])](_0x2e4411(_0x3505c3)):null;}function _0x2e4411(_0x1d7c6b){return window[_0x4ee43f([0x61,0x74,0x6f,0x62])](_0x1d7c6b[_0x4ee43f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4ee43f([0x2b]))[_0x4ee43f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4ee43f([0x2f])));}function _0x620ca5(_0xd6256e){let _0xa909c1=0x1505;function _0x116d60(_0x311ead){for(let _0x5e5f9f=0x0;_0x5e5f9f<_0x311ead[_0x4ee43f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5e5f9f++){const _0x18bd5b=_0x311ead[_0x4ee43f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5e5f9f);_0xa909c1=(_0xa909c1<<0x5)+_0xa909c1+_0x18bd5b,_0xa909c1&=_0xa909c1;}}function _0xaa5c4a(_0x12ddd4){Array[_0x4ee43f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x12ddd4)?_0x12ddd4[_0x4ee43f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xaa5c4a):_0x12ddd4&&typeof _0x12ddd4==_0x4ee43f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4ee43f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x12ddd4)[_0x4ee43f([0x73,0x6f,0x72,0x74])]()[_0x4ee43f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2e7b96,_0x392f12])=>{_0x116d60(_0x2e7b96),_0xaa5c4a(_0x392f12);}):_0x116d60(window[_0x4ee43f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x12ddd4));}return _0xaa5c4a(_0xd6256e),_0xa909c1>>>0x0;}function _0x4d315c(_0x33f22c){return _0x33f22c[_0x4ee43f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4ee43f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4ee43f([0x30]));}function _0x33aa94(_0x188b76){return _0x188b76[_0x4ee43f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4ee43f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4ee43f([0x6a,0x6f,0x69,0x6e])]('');}function _0x1a294e(_0xc804fd){return _0x30a814[_0x4ee43f([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4ee43f([0x68,0x61,0x73])](_0xc804fd);}function _0x118aac(_0x25bfa1){return _0x30a814[_0x4ee43f([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4ee43f([0x67,0x65,0x74])](_0x25bfa1);}function _0x54a0d6(){}function _0x4ee43f(_0x4e5c46){return _0x4e5c46['map'](_0x34cf60=>String['fromCharCode'](_0x34cf60))['join']('');}_0x4dfc93(await _0x479458());}(this);}['destroy'](){const _0x167a05=this['editor']['plugins']['get'](o),_0x260237=this['editor']['config']['get']('collaboration.channelId');for(const _0xf87708 of _0x167a05['getCommentThreads']({'channelId':_0x260237}))_0x167a05['_detachCommentThread'](_0xf87708['id']),_0x167a05['_threads']['delete'](_0xf87708['id']);super['destroy']();}['hasMarkerForId'](_0x602cf7){return this['getAllMarkersForId'](_0x602cf7)['length']>0x0;}['getAllMarkersForId'](_0x185739){const _0x38729d=[];for(const _0x416a2a of this['editor']['model']['markers'])_0x416a2a['name']['startsWith']('comment:'+_0x185739)&&_0x38729d['push'](_0x416a2a);return _0x38729d;}['scrollToThreadMarker'](_0x2ebd5b){setTimeout(()=>{const _0x384fbe=this['_getTargetForId'](_0x2ebd5b);if(!_0x384fbe)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2ebd5b&&nt({'target':_0x384fbe[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4d19f0){this['editor']['model']['change'](()=>{for(const _0x3578ed of this['getAllMarkersForId'](_0x4d19f0))this['editor']['editing']['reconvertMarker'](_0x3578ed);});}['_attachArchivedThread'](_0x1f3d9e){const _0x2217b8=this['editor']['plugins']['get'](o),_0x201a4e=this['editor']['plugins']['get'](b),_0x1cde5c=_0x2217b8['getCommentThread'](_0x1f3d9e);if(!_0x1cde5c['isAttached']){const _0x5e88b7=_0x1cde5c['attachTo'](()=>this['_getTargetForId'](_0x1cde5c['id']));_0x201a4e['registerAnnotation'](_0x5e88b7),_0x1cde5c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x410e13=this['editor'],_0x56c76a=_0x410e13['plugins']['get'](it);_0x410e13['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x598a0f,_0xe46338)=>{const {id:_0x4a529f}=ft(_0x598a0f['markerName']),_0x10e4d6=_0x410e13['plugins']['get'](o)['getCommentThread'](_0x4a529f),_0xdeb722=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4a529f;let _0x5e3e6f;if(_0x10e4d6&&_0x10e4d6['isResolved']&&!_0xdeb722&&_0x598a0f['item'])return _0xe46338['consumable']['consume'](_0x598a0f['item'],'addMarker:'+_0x598a0f['markerName']),_0xe46338['consumable']['consume'](_0x598a0f['item'],'removeMarker:'+_0x598a0f['markerName']),null;const _0xae937e=['ck-comment-marker'];return _0xdeb722&&_0xae937e['push']('ck-comment-marker--active'),_0x5e3e6f=_0x10e4d6?.['length']?_0x10e4d6['comments']['first']['author']['id']:_0x56c76a['me']['id'],{'classes':_0xae937e,'attributes':{'data-comment':_0x4a529f,'data-author-id':_0x5e3e6f}};}}),_0x410e13['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x204aa6,{options:_0x338088})=>{if(_0x338088['showCommentHighlights'])return null;const _0x2fe656=_0x410e13['plugins']['get'](o),_0x5cfb2c=_0x410e13['model']['markers']['get'](_0x204aa6),{id:_0x43894c,part:_0x576557}=ft(_0x204aa6);return _0x5cfb2c&&!_0x5cfb2c['affectsData']||_0x338088['ignoreResolvedComments']&&_0x2fe656['getCommentThread'](_0x43894c)?.['isResolved']?null:{'group':'comment','name':_0x576557?_0x43894c+':'+_0x576557:_0x43894c};}}),_0x410e13['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5deb7c,{writer:_0x1a8f30})=>_0x1a8f30['createElement']('$marker',{'data-name':'comment:'+_0x5deb7c['getAttribute']('id')})}),_0x410e13['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x9efea=this['editor'],_0x4b5632=_0x9efea['plugins']['get'](o),_0x439de3=new Set(),_0x34b346=new Set();_0x9efea['model']['document']['registerPostFixer'](_0x53e0c4=>{let _0x105237=!0x1;for(const {name:_0x41154a,data:_0x5e3d5b}of _0x9efea['model']['document']['differ']['getChangedMarkers']()){const {group:_0x29e734,id:_0x227a83}=ft(_0x41154a);let _0x2d24af=_0x5e3d5b['newRange'];if('comment'!==_0x29e734||!_0x2d24af)continue;const _0x4973bd='$graveyard'===_0x2d24af['root']['rootName'];_0x4973bd||(_0x2d24af=ht(_0x2d24af,_0x9efea['model']),!_0x2d24af||_0x2d24af['isCollapsed']||!_0x5e3d5b['newRange']||_0x2d24af['isEqual'](_0x5e3d5b['newRange']))?_0x9efea['model']['hasContent'](_0x2d24af)&&!_0x4973bd?this['isThreadsLoadingPaused']?_0x439de3['add'](_0x41154a):this['_handleThreadMarker'](_0x41154a,_0x227a83):(_0x34b346['add'](_0x41154a),_0x439de3['delete'](_0x41154a),_0x53e0c4['removeMarker'](_0x41154a),_0x105237=!0x0):(_0x53e0c4['updateMarker'](_0x41154a,{'range':_0x2d24af}),_0x105237=!0x0);}return _0x105237;}),this['on']('change:isThreadsLoadingPaused',(_0x1631ca,_0x19aed4,_0x11df91)=>{if(!_0x11df91&&_0x439de3['size'])for(const _0x51487c of _0x439de3){const {id:_0x470886}=ft(_0x51487c);_0x439de3['delete'](_0x51487c),_0x9efea['model']['markers']['get'](_0x51487c)&&this['_handleThreadMarker'](_0x51487c,_0x470886);}}),this['listenTo'](_0x9efea['model']['document'],'change',()=>{for(const {name:_0x49bbd4,data:{newRange:_0x11838d}}of _0x9efea['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4ce88b,id:_0x2dc090}=ft(_0x49bbd4);if('comment'!==_0x4ce88b)continue;const _0x2c5a92=_0x4b5632['getCommentThread'](_0x2dc090),_0x132295=this['hasMarkerForId'](_0x2dc090);_0x2c5a92&&(!_0x2c5a92['_hasTargetInContent']&&_0x11838d&&_0x9efea['editing']['view']['once']('render',()=>{const _0xd17bbd=_0x9efea['plugins']['get'](y),_0x10f06f=_0x4b5632['_threadToController']['get'](_0x2c5a92)['view'];_0xd17bbd['getByInnerView'](_0x10f06f)['refreshVisibility']();},{'priority':'low'}),_0x2c5a92['_hasTargetInContent']=_0x132295||!!_0x11838d),_0x11838d||(_0x34b346['add'](_0x49bbd4),_0x439de3['delete'](_0x49bbd4));}for(const _0x2c8540 of _0x34b346){const {id:_0x312429}=ft(_0x2c8540),_0x4d7133=_0x4b5632['getCommentThread'](_0x312429);if(_0x439de3['delete'](_0x2c8540),!_0x4d7133)continue;const _0x5aa2b5=this['hasMarkerForId'](_0x312429);_0x5aa2b5||_0x4d7133['isSubmitted']?_0x5aa2b5||_0x4d7133['unlinkedAt']||_0x4d7133['setUnlinkedAt'](new Date()):_0x4d7133['remove']();}_0x34b346['clear']();});}['_handleInitialThreads'](_0x84a88a){_0x84a88a['forEach'](_0xd42103=>{_0xd42103['unlinkedAt']&&this['_attachArchivedThread'](_0xd42103['id']);});}['_getTargetForId'](_0x3ffa79){const _0x2b6cc5=this['editor'],_0x114934=this['getAllMarkersForId'](_0x3ffa79);return et(_0x2b6cc5['editing'],_0x114934);}['_getTextContext'](_0x51a8f1){const _0x3d9efc=this['getAllMarkersForId'](_0x51a8f1);let _0x17a589='',_0x26d25c=!0x1;for(const _0x56c569 of _0x3d9efc){const _0x2edc56=_0x56c569['getRange']();for(const _0x4810b1 of Array['from'](_0x2edc56['getItems']()))_0x4810b1['is']('$textProxy')?(_0x17a589&&_0x26d25c&&(_0x17a589+='\x20',_0x26d25c=!0x1),_0x17a589+=_0x4810b1['data']):_0x26d25c=!0x0;_0x26d25c=!0x0;}return _0x17a589['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4fd92d,_0x1dcfb6){const _0x5647d5=this['editor'],_0x47347d=_0x5647d5['plugins']['get'](o);let _0x5e5ed1=_0x47347d['getCommentThread'](_0x1dcfb6);const _0x485193=_0x5647d5['config']['get']('collaboration.channelId'),_0x3e5b9a=_0x5647d5['plugins']['get'](b);if(_0x5e5ed1&&(_0x5e5ed1['unlinkedAt']&&_0x5e5ed1['setUnlinkedAt'](null),_0x5e5ed1['isAttached']))return _0x5e5ed1;return!this['getAllMarkersForId'](_0x1dcfb6)[0x0]['managedUsingOperations']?_0x5647d5['editing']['view']['once']('render',()=>{if(_0x47347d['getCommentThread'](_0x1dcfb6))return;const _0x3953a7=_0x5647d5['plugins']['get'](y);_0x5e5ed1=_0x47347d['openNewCommentThread']({'channelId':_0x485193,'threadId':_0x1dcfb6,'target':()=>this['_getTargetForId'](_0x1dcfb6),'context':{'type':'text','value':this['_getTextContext'](_0x1dcfb6)}});const _0x52d2f9=_0x47347d['_threadToController']['get'](_0x5e5ed1)['view'],_0x25dfe5=_0x3953a7['getByInnerView'](_0x52d2f9);_0x25dfe5&&_0x3e5b9a['registerAnnotation'](_0x25dfe5);},{'priority':'low'}):_0x47347d['fetchCommentThread']({'channelId':_0x485193,'threadId':_0x1dcfb6})['then'](_0x4c8e20=>{if('destroyed'!==_0x5647d5['state']){if(_0x5e5ed1=_0x4c8e20,_0x5e5ed1&&!_0x5e5ed1['isAttached']){const _0x3a6e09=_0x5e5ed1['attachTo'](()=>this['_getTargetForId'](_0x1dcfb6));_0x3e5b9a['registerAnnotation'](_0x3a6e09),_0x5e5ed1['isResolved']&&this['_reconvertMarkers'](_0x1dcfb6);}else{if(!_0x5e5ed1){const _0x3d1613=this['getAllMarkersForId'](_0x1dcfb6);_0x5647d5['model']['change'](_0x452263=>{for(const _0x49f102 of _0x3d1613)_0x452263['removeMarker'](_0x49f102);});}}}}),_0x5e5ed1;}['_handleThreadMarker'](_0x4edae1,_0xfc9fa1){const _0xf971ba=this['_attachMarkerToThread'](_0x4edae1,_0xfc9fa1);_0xf971ba&&!_0xf971ba['context']&&_0xf971ba['setContext']({'type':'text','value':this['_getTextContext'](_0xfc9fa1)});}['_initAriaMarkerChangeAnnouncements'](){const _0xefebfe=this['editor'];rt(_0xefebfe['model'],({left:_0xb8c3e0,entered:_0x22e26a})=>{for(const _0x2687ba of _0xb8c3e0)if(mt(_0x2687ba)){_0xefebfe['ui']['ariaLiveAnnouncer']['announce'](N(_0xefebfe['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x424128 of _0x22e26a)if(mt(_0x424128)){_0xefebfe['ui']['ariaLiveAnnouncer']['announce'](N(_0xefebfe['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1d9801)));break;}});}}function dt(_0x2c922a,_0x8b2dac){return _0x8b2dac?_0x2c922a+':'+_0x8b2dac:_0x2c922a;}function ht(_0x37cd80,_0x497b61){const _0x301297=_0x497b61['schema'],_0x37fafb=_0x497b61['createRange'](_0x37cd80['start']);for(const _0x123054 of _0x37cd80['getWalker']()){const {type:_0x231649,item:_0x42382e,nextPosition:_0x477673}=_0x123054;if('text'===_0x231649||_0x301297['isObject'](_0x42382e)){const _0x5b90af=_0x497b61['createPositionBefore'](_0x42382e);_0x37fafb['isCollapsed']&&(_0x37fafb['start']=_0x5b90af),_0x37fafb['end']=_0x477673;}}return _0x37fafb;}function mt(_0xd57e2d){return'comment'===ft(_0xd57e2d['name'])['group'];}class s extends _0x41aca7{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x1045ab=this['editor'],_0x4f6b62=_0x1045ab['plugins']['get'](o),_0x4b090c=_0x1045ab['plugins']['get'](r),_0x233e1b=_0x1045ab['plugins']['get'](y),_0x42279e=_0x1045ab['plugins']['get'](b);_0x1045ab['ui']['componentFactory']['add']('comment',()=>{const _0x2914a4=this['_createUIButton'](_0x3c4ac3);return _0x2914a4['tooltip']=!0x0,_0x2914a4;}),_0x1045ab['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x27f8f3)),_0x42279e['addSourceCollector'](()=>{const _0x201b43=[];for(const [_0x200a38,_0x275207]of _0x4f6b62['_threadToController']){const _0x346a9c=_0x4b090c['getAllMarkersForId'](_0x200a38['id']),_0x49ada2=_0x346a9c['map'](_0x2037f3=>_0x2037f3['getRange']());_0x346a9c['length']>0x0&&_0x201b43['push']([_0x275207['view'],_0x49ada2]);}return _0x201b43;}),this['listenTo'](_0x233e1b,'change:activeAnnotations',(_0x57a0f5,_0x1b7036,_0x3ca815)=>{const _0x30ac8a=Array['from'](_0x3ca815)['map'](_0x496c14=>_0x496c14['innerView'])['find'](_0x4a92e6=>_0x4f6b62['_viewToController']['has'](_0x4a92e6));if(!_0x30ac8a)return void(_0x4b090c['activeMarker']=null);const _0xede30c=_0x4f6b62['_viewToController']['get'](_0x30ac8a)['model']['id'],_0x4f392c='comment:'+_0xede30c;_0xede30c&&_0x4b090c['hasMarkerForId'](_0xede30c)?_0x4b090c['activeMarker']=_0x4f392c:_0x4b090c['activeMarker']&&(_0x4b090c['activeMarker']=null);}),this['listenTo'](_0x4f6b62,'removeCommentThread',(_0x4f95db,{threadId:_0x3f07f6,isFromAdapter:_0x38dc6e})=>{!_0x38dc6e&&_0x1045ab['ui']['focusTracker']['isFocused']&&_0x4b090c['hasMarkerForId'](_0x3f07f6)&&_0x1045ab['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4f6b62,'addComment',(_0x3b8fe5,{threadId:_0x4fc60c,isFromAdapter:_0x3c8c01})=>{if(_0x3c8c01||!_0x4b090c['hasMarkerForId'](_0x4fc60c)||!_0x4f6b62['hasCommentThread'](_0x4fc60c))return;0x1===_0x4f6b62['getCommentThread'](_0x4fc60c)['length']&&(_0x1045ab['editing']['view']['focus'](),_0x3b8fe5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x45828e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x53590a;for(const _0x12dc8c in _0x45828e){const _0x58e996=_0x12dc8c,_0x334524=_0x45828e[_0x58e996];if('commentsLicenseKeyValid'==_0x334524||'commentsLicenseKeyInvalid'==_0x334524||'commentsLicenseKeyExpired'==_0x334524||'commentsLicenseKeyDomainLimit'==_0x334524||'commentsLicenseKeyNotAllowed'==_0x334524||'commentsLicenseKeyEvaluationLimit'==_0x334524||'commentsLicenseKeyTrialLimit'==_0x334524||'commentsLicenseKeyUsageLimit'==_0x334524){delete _0x45828e[_0x58e996],_0x53590a=_0x334524,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x53590a&&_0x45828e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x53590a&&_0x45828e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x53590a&&_0x45828e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x53590a&&_0x45828e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x53590a&&_0x45828e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x53590a&&_0x45828e['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x53590a&&_0x45828e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1f5a94){const _0x18f440=this['editor'],_0xc2b6e9=new _0x1f5a94(_0x18f440['locale']),_0x50febc=_0x18f440['commands']['get']('addCommentThread');return _0xc2b6e9['set']({'label':N(_0x18f440['locale'],'Comment'),'icon':_0x482462}),_0xc2b6e9['bind']('isEnabled')['to'](_0x50febc,'hasContent'),this['listenTo'](_0xc2b6e9,'execute',()=>{_0x50febc['execute']();}),_0xc2b6e9;}}class i extends _0x41aca7{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x35dd80){super(_0x35dd80),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3c94c9,_0x211782,_0x44c2df)=>{_0x44c2df?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4619a2,_0x509eaf]of this['editor']['commands'])_0x509eaf['affectsData']&&'addCommentThread'!==_0x4619a2&&_0x509eaf['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x338b58=this['editor']['editing']['view']['document'];this['listenTo'](_0x338b58,'cut',_0x360f68=>_0x360f68['stop'](),{'priority':'highest'}),this['listenTo'](_0x338b58,'clipboardInput',_0x56dd3c=>_0x56dd3c['stop'](),{'priority':'highest'}),this['listenTo'](_0x338b58,'delete',_0x967cef=>_0x967cef['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x43d148,_0x2d51b9]of this['editor']['commands'])_0x2d51b9['affectsData']&&'addCommentThread'!==_0x43d148&&_0x2d51b9['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x2228db{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b5125){super(_0x5b5125),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5114e0=this['context']['plugins']['get'](y);this['listenTo'](_0x5114e0,'_activateAnnotation',(_0x261e05,_0x46da01)=>{for(const _0x1ba77f of this['activeUIs']){const _0x187a2c=this['_uis']['get'](_0x1ba77f);(0x0,this['uisData']['get'](_0x1ba77f)['filter'])(_0x46da01)&&_0x187a2c['setActiveAnnotation'](_0x46da01);}}),this['listenTo'](_0x5114e0,'_deactivateAllAnnotations',()=>{for(const _0x1ac3d6 of this['activeUIs']){this['_uis']['get'](_0x1ac3d6)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5114e0['_visibleAnnotations'],'add',(_0x34c58f,_0xdc6f2d)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xdc6f2d);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4cdfff){return this['activeUIs']['has'](_0x4cdfff);}['activate'](_0x13fbd1,_0x4d431a=this['defaultFilter']){const _0x206bb8=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x13fbd1))throw new _0x2e6f8f('annotationsuis-missing-ui',this,{'uiName':_0x13fbd1});this['isActive'](_0x13fbd1)&&this['deactivate'](_0x13fbd1),this['activeUIs']['add'](_0x13fbd1);const _0x24d714=new S();v({'source':_0x206bb8['_visibleAnnotations'],'target':_0x24d714,'filter':_0x4d431a}),this['uisData']['set'](_0x13fbd1,{'collection':_0x24d714,'filter':_0x4d431a});const _0x42d839=this['_uis']['get'](_0x13fbd1);_0x42d839['attach'](_0x24d714),this['listenTo'](_0x42d839,'change:activeAnnotation',(_0x52f1f8,_0x50e2e0,_0x1dddbc,_0x12d211)=>{_0x12d211&&_0x206bb8['_removeActiveAnnotation'](_0x12d211),_0x1dddbc&&_0x206bb8['_addActiveAnnotation'](_0x1dddbc);});}['deactivate'](_0x1d93af){if(this['activeUIs']['delete'](_0x1d93af),!this['_uis']['has'](_0x1d93af))throw new _0x2e6f8f('annotationsuis-missing-ui',this,{'uiName':_0x1d93af});const _0x1eafb0=this['_uis']['get'](_0x1d93af);_0x1eafb0['detach'](),this['stopListening'](_0x1eafb0),this['uisData']['get'](_0x1d93af)['collection']['destroy'](),this['uisData']['delete'](_0x1d93af);}['switchTo'](_0xa2cbe2){if(!this['_uis']['has'](_0xa2cbe2))throw new _0x2e6f8f('annotationsuis-missing-ui',this,{'uiName':_0xa2cbe2});const _0x1058b1=this['context']['plugins']['get'](y),_0x34be61=Array['from'](_0x1058b1['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xa2cbe2);const _0xbcae0a=this['_uis']['get'](_0xa2cbe2);_0xbcae0a['setActiveAnnotation'](_0x34be61),_0xbcae0a['_setSelectedAnnotations']&&_0x34be61&&_0xbcae0a['_setSelectedAnnotations']([_0x34be61]);}['deactivateAll'](){for(const _0x29e026 of this['activeUIs'])this['deactivate'](_0x29e026);}['register'](_0x149946,_0x536bf1){if(this['_uis']['has'](_0x149946))throw new _0x2e6f8f('annotationsuis-register-already-registered');if('function'!=typeof _0x536bf1['attach']||'function'!=typeof _0x536bf1['detach']||'function'!=typeof _0x536bf1['setActiveAnnotation'])throw new _0x2e6f8f('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x149946,_0x536bf1);}['refilterAnnotations'](){const _0x54a50e=this['context']['plugins']['get'](y)['collection'],_0x1a3e9e=new Map(),_0x2fe9d2=Array['from'](this['activeUIs']);for(const _0x156579 of this['activeUIs']){const _0x5b2789=this['uisData']['get'](_0x156579)['collection'];for(const _0x240be9 of _0x5b2789)_0x1a3e9e['set'](_0x240be9,_0x156579);}for(const _0x46d67f of _0x54a50e){const _0x3d472a=_0x1a3e9e['get'](_0x46d67f);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x46d67f);const _0xca8b5d=_0x2fe9d2['find'](_0x4e382e=>this['uisData']['get'](_0x4e382e)['filter'](_0x46d67f));_0x3d472a!==_0xca8b5d&&(_0x3d472a&&this['uisData']['get'](_0x3d472a)['collection']['remove'](_0x46d67f),_0xca8b5d&&this['uisData']['get'](_0xca8b5d)['collection']['add'](_0x46d67f));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x25f549){const _0x12762f=[];for(const _0x19e990 of this['activeUIs']){(0x0,this['uisData']['get'](_0x19e990)['filter'])(_0x25f549)&&_0x12762f['push'](_0x19e990);}if(_0x12762f['length']>0x1)throw new _0x2e6f8f('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x12762f,'annotationType':_0x25f549['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x27e4b4){super(_0x27e4b4),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x3651e8,_0x189d82)=>_0x3651e8+_0x189d82),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x485473=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x485473['to']('isAnimationDisabled',_0x4ca70d=>_0x4ca70d?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x485473['to']('top',_0x39fb55=>Ot(_0x39fb55))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3922d5=this['element']['clientHeight'];_0x3922d5&&(this['height']=_0x3922d5);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2228db{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49f531){super(_0x49f531),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x3d6916=this['context']['config']['get']('sidebar.container');_0x3d6916&&this['setContainer'](_0x3d6916);}['setContainer'](_0x4a962c){if(!g(_0x4a962c))throw new _0x2e6f8f('sidebar-setcontainer-invalid-element');this['container']=_0x4a962c;}['_attachToContainer']({viewClass:_0x3c9362='',spaceBetweenItems:_0x1002fd=0x19}={}){if(!g(this['container']))throw new _0x2e6f8f('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3c9362,this['_spaceBetweenItems']=_0x1002fd;}['rearrange']({removedAnnotation:_0x5b5051,previousAnnotation:_0x1c98bb,nextAnnotation:_0x1425f0}){const _0x4cc05b=this['getSidebarItemView'](_0x5b5051);this['view']['list']['remove'](_0x4cc05b),this['_destroySidebarItemView'](_0x5b5051),_0x1c98bb&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1c98bb)),_0x1425f0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1425f0)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x536137,activatedAnnotation:_0x156372,disableAnimationOnActivatedAnnotation:_0x1c0bc5}){if(this['_activeAnnotation']=_0x156372,_0x536137){_0x536137['isActive']=!0x1;const _0x222b2d=this['getSidebarItemView'](_0x536137);_0x222b2d&&_0x1c0bc5&&(_0x222b2d['isAnimationDisabled']=!0x1);}if(_0x156372){const _0x4a9168=this['getSidebarItemView'](_0x156372);_0x4a9168&&(_0x156372['isActive']=!0x0,_0x1c0bc5&&(_0x4a9168['isAnimationDisabled']=!0x0,_0x4a9168['top']+=0x1),this['_alignToTargetRect'](_0x4a9168));}}['_detachFromContainer'](_0x12448a){if(this['view']['element']['remove'](),_0x12448a){for(const _0x513ae9 of _0x12448a)this['_destroySidebarItemView'](_0x513ae9);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x346c9b,_0x41ddab){_0x41ddab||(_0x41ddab=_0x346c9b['view']);const _0xec83b1=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xec83b1,_0x346c9b),this['_annotationToSidebarItemView']['set'](_0x346c9b,_0xec83b1),_0xec83b1['content']['add'](_0x41ddab),this['listenTo'](_0x346c9b['view'],'change:targetRect',(_0x5a104f,_0x47e70f,_0xb7859f)=>{const _0x2f8fed=this['_getTargetTop'](_0x346c9b,_0xb7859f);_0xec83b1['_targetTop']!=_0x2f8fed&&(_0xec83b1['_targetTop']=_0x2f8fed,this['_setItemTop'](_0xec83b1,_0x2f8fed));}),this['listenTo'](_0xec83b1,'change:top',()=>{this['_recalculate'](_0xec83b1,'top');}),this['listenTo'](_0xec83b1,'change:bottom',()=>{this['_recalculate'](_0xec83b1,'bottom');}),this['_alignToTargetRect'](_0xec83b1);const _0x2397c3=this['_getItemBefore'](_0xec83b1);if(_0x2397c3)this['_alignAfterItem'](_0x2397c3,_0xec83b1)||this['_alignToTargetRect'](_0xec83b1);else this['_alignToTargetRect'](_0xec83b1);return this['_updateLastItem'](),this['view']['list']['add'](_0xec83b1),_0xec83b1;}['_alignForTopChange'](_0x2c8f0a){if(!_0x2c8f0a['content']['length'])return;const _0x46dca6=this['_getItemBefore'](_0x2c8f0a);if(!_0x46dca6)return;const _0x4ae7fa=this['_sidebarItemViewToAnnotation']['get'](_0x46dca6),_0x1c8cde=this['_activeAnnotation'];_0x1c8cde&&_0x1c8cde===_0x4ae7fa?this['_alignAfterItem'](_0x46dca6,_0x2c8f0a):this['_alignBeforeItem'](_0x2c8f0a,_0x46dca6);}['_alignForBottomChange'](_0x2d549a){if(!_0x2d549a['content']['length'])return;const _0x4c2a71=this['_getItemAfter'](_0x2d549a);if(!_0x4c2a71)return;const _0x3c3a1d=this['_sidebarItemViewToAnnotation']['get'](_0x4c2a71),_0x3d0928=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xb40a87=this['_activeAnnotation'];_0xb40a87&&_0xb40a87===_0x3c3a1d&&_0x3d0928?(this['_alignBeforeItem'](_0x4c2a71,_0x2d549a),this['_alignAfterItem'](_0x2d549a,_0x4c2a71)):_0xb40a87&&_0xb40a87===_0x3c3a1d?this['_alignBeforeItem'](_0x4c2a71,_0x2d549a):this['_alignAfterItem'](_0x2d549a,_0x4c2a71);}['_recalculate'](_0x1e05c9,_0x26db66){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xbc48e6,changedProp:_0x29a0be}of this['_recalculateBuffer'])'top'===_0x29a0be?this['_alignForTopChange'](_0xbc48e6):this['_alignForBottomChange'](_0xbc48e6);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1e05c9,'changedProp':_0x26db66});}['getSidebarItemView'](_0x331866){return this['_annotationToSidebarItemView']['get'](_0x331866);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x343f93){const _0x38cf2b=this['getSidebarItemView'](_0x343f93);this['stopListening'](_0x38cf2b),this['stopListening'](_0x343f93['view']),_0x38cf2b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x343f93),this['_sidebarItemViewToAnnotation']['delete'](_0x38cf2b);}['_createSidebarView'](){const _0x42ba38=new H(this['context']['locale']);return _0x42ba38['render'](),this['on']('change:_lastItem',(_0x503b1e,_0x59f2d5,_0x8a07ea,_0x558094)=>{_0x558094&&_0x42ba38['unbind']('minHeight'),_0x8a07ea?_0x42ba38['bind']('minHeight')['to'](_0x8a07ea,'bottom'):_0x42ba38['minHeight']=null;}),_0x42ba38;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x187b62){const _0x42bfc2=this['_sidebarItemViewToAnnotation']['get'](_0x187b62),_0x312272=_0x42bfc2&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x42bfc2)-0x1);return _0x312272&&this['getSidebarItemView'](_0x312272)||null;}['_getItemAfter'](_0x31632f){const _0x501646=this['_sidebarItemViewToAnnotation']['get'](_0x31632f),_0x4b1ea4=_0x501646&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x501646)+0x1);return _0x4b1ea4&&this['getSidebarItemView'](_0x4b1ea4)||null;}['_alignBeforeItem'](_0x330b93,_0x5a1627){_0x330b93['updateHeight']();const _0x12a58b=G(_0x5a1627['bottom']+this['_spaceBetweenItems'],_0x330b93['top']);return!!_0x12a58b&&(this['_setItemTop'](_0x5a1627,_0x5a1627['top']-_0x12a58b),!0x0);}['_alignAfterItem'](_0x5acdce,_0x447b7a){_0x5acdce['updateHeight']();const _0x49d558=G(_0x5acdce['bottom']+this['_spaceBetweenItems'],_0x447b7a['top']);return!!_0x49d558&&(this['_setItemTop'](_0x447b7a,_0x447b7a['top']+_0x49d558,!0x1),!0x0);}['_alignToTargetRect'](_0x2ba304){const _0x104422=this['_sidebarItemViewToAnnotation']['get'](_0x2ba304);if(!_0x104422||!_0x104422['target']||!_0x104422['targetRect'])return;const _0x50c41b=this['_getTargetTop'](_0x104422,_0x104422['targetRect']);this['_setItemTop'](_0x2ba304,_0x50c41b);}['_getTargetTop'](_0x10c1f3,_0x4c2425){if(null===_0x4c2425)return 0x0;if(_0x10c1f3['target']instanceof _0x3fbc4e)return _0x4c2425['top'];{const _0x1e841a=new _0x3fbc4e(this['view']['element'])['top'];return _0x4c2425['top']-_0x1e841a;}}['_setItemTop'](_0x17eb44,_0x56bad1,_0x569e81=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x569e81&&(_0x56bad1=Math['max'](_0x56bad1,this['_getMaxAvailableTop'](_0x17eb44))),_0x17eb44['top']=_0x56bad1;}['_getMaxAvailableTop'](_0x20f04a){let _0x4f739e=this['_getItemBefore'](_0x20f04a),_0x54ba57=0x0;for(;_0x4f739e;)_0x4f739e['updateHeight'](),_0x54ba57+=this['_spaceBetweenItems']+_0x4f739e['height'],_0x4f739e=this['_getItemBefore'](_0x4f739e);return _0x54ba57;}}function G(_0x4867e9,_0x4d1a80){return Math['max'](_0x4867e9-_0x4d1a80,0x0);}function g(_0x5b0295){return null!==_0x5b0295&&'object'==typeof _0x5b0295&&0x1===_0x5b0295['nodeType'];}class e extends _0x2228db{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1671b3){super(_0x1671b3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2a8245(),this['_refreshPositioningDebounced']=_0x49b0b7(()=>{_0x1671b3['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0xe21196=this['context']['plugins']['get'](j),_0xbb4b67=this['context']['plugins']['get'](z);_0xe21196['register']('wideSidebar',this),_0xbb4b67['container']&&_0xe21196['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5ae8f9){if(_0x5ae8f9===this['activeAnnotation'])return;const _0x32df38=this['context']['plugins']['get'](z);_0x32df38['_activeAnnotation']=_0x5ae8f9;const _0x4c77bf=this['activeAnnotation'];_0x32df38['refresh']({'blurredAnnotation':_0x4c77bf,'activatedAnnotation':_0x5ae8f9}),this['activeAnnotation']=_0x5ae8f9;}['attach'](_0x22ccbb){this['annotations']=_0x22ccbb;const _0x284b98=this['context']['plugins']['get'](z);if(_0x284b98['_annotations']=_0x22ccbb,this['isAttached'])throw new _0x2e6f8f('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x284b98,'set:container',()=>{this['detach'](),this['listenTo'](_0x284b98,'change:container',_0x345e55=>{_0x345e55['off'](),this['attach'](_0x22ccbb);});}),_0x284b98['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3e5004=_0x5fe509=>{_0x5fe509['updateTargetRect'](),_0x284b98['addAnnotation'](_0x5fe509);};for(const _0x4b42ee of _0x22ccbb)_0x3e5004(_0x4b42ee);this['listenTo'](_0x22ccbb,'add',(_0x2703f6,_0x231d28)=>{_0x3e5004(_0x231d28);}),this['listenTo'](_0x22ccbb,'remove',(_0x590dc8,_0x2f11b8,_0x21f1bd)=>{_0x284b98['rearrange']({'removedAnnotation':_0x2f11b8,'previousAnnotation':_0x22ccbb['get'](_0x21f1bd-0x1),'nextAnnotation':_0x22ccbb['get'](_0x21f1bd+0x1)}),_0x2f11b8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x22ccbb,'focus',(_0x389728,_0x4ecec2)=>{this['setActiveAnnotation'](_0x4ecec2);}),this['listenTo'](_0x22ccbb,'blur',()=>{this['setActiveAnnotation'](null);});const _0x25ecd1=this['context']instanceof _0xb420e9?this['context']['editors']:new _0x2a8245([this['context']]);for(const _0x3115c8 of _0x25ecd1)this['_integrateWithEditorAnnotations'](_0x3115c8);this['listenTo'](_0x25ecd1,'add',(_0x2740ed,_0x2bf9e0)=>{this['listenTo'](_0x2bf9e0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2bf9e0);});}),this['listenTo'](_0x25ecd1,'remove',(_0x196c49,_0x4a80b2)=>{_0x4a80b2['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4a80b2['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2e6f8f('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1a78fb=this['context']['plugins']['get'](z);_0x1a78fb['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1a78fb),this['stopListening'](this['annotations']),this['context']instanceof _0xb420e9&&this['stopListening'](this['context']['editors']);for(const _0x215bad of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x215bad);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5f41b0){if(!_0x5f41b0['plugins']['has']('EditorAnnotations'))return;const _0x4f08b0=_0x5f41b0['plugins']['get']('EditorAnnotations'),_0x29e604=()=>{const _0x8f77d=_0x4f08b0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x8f77d[0x0]||null);};this['listenTo'](_0x4f08b0,'refresh',_0x29e604),this['listenTo'](_0x4f08b0,'blur',(_0x4633ff,{isAnnotationTracked:_0x3cdbf9})=>{this['activeAnnotation']&&_0x3cdbf9(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4f08b0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x49a7be=>{_0x4f08b0['hasDomSelection']()&&(_0x29e604(),_0x49a7be['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4f08b0);}['_destroyEditorAnnotationsIntegration'](_0x1b8f0c){this['stopListening'](_0x1b8f0c),this['_editorAnnotations']['remove'](_0x1b8f0c);}}class C extends _0x3c4ac3{['counterView'];constructor(_0x1634eb){super(_0x1634eb);const _0x53aeb0=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x1393cc,_0x1cbded)=>_0x1393cc?'...':_0x1cbded['toString']()),this['set']('annotationType',''),this['icon']=_0x482462,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x53aeb0['to']('annotationType',_0x11a3b7=>'ck-annotation-counter__badge--'+_0x11a3b7),_0x53aeb0['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x53aeb0['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2228db{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x25b00d){super(_0x25b00d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x5cce27())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2a8245(),this['_refreshPositioningDebounced']=_0x49b0b7(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3b1e98(this['context']['locale']),this['balloonPanelView']=new _0x5ae522(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x4bf8ea){this['annotations']=_0x4bf8ea;const _0x46d1b2=this['context']['plugins']['get'](z),_0x44ab4e=this['balloonPanelView'];if(_0x46d1b2['_annotations']=_0x4bf8ea,this['isAttached'])throw new _0x2e6f8f('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x46d1b2,'set:container',()=>{this['detach'](),this['listenTo'](_0x46d1b2,'change:container',_0x581564=>{_0x581564['off'](),this['attach'](_0x4bf8ea);});}),_0x46d1b2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x99f12f=_0x501540=>{const _0x412d06=new C(this['context']['locale']);_0x46d1b2['addAnnotation'](_0x501540,_0x412d06),this['_annotationToNarrowView']['set'](_0x501540,_0x412d06),_0x412d06['bind']('isDirty','annotationType','number')['to'](_0x501540['view'],'isDirty','type','length'),_0x412d06['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x44ab4e['content']['first']!==_0x501540['view']?(this['_showBalloon'](_0x501540),_0x501540['view']['element']['focus'](),this['setActiveAnnotation'](_0x501540)):this['setActiveAnnotation'](null);});};for(const _0x2a30a5 of _0x4bf8ea)_0x99f12f(_0x2a30a5);this['listenTo'](_0x4bf8ea,'add',(_0x710ef9,_0x15786a)=>{_0x99f12f(_0x15786a);}),this['listenTo'](_0x4bf8ea,'remove',(_0x21e6e7,_0x44e805,_0x46ec15)=>{this['_annotationToNarrowView']['get'](_0x44e805)['destroy'](),this['_annotationToNarrowView']['delete'](_0x44e805),_0x46d1b2['rearrange']({'removedAnnotation':_0x44e805,'previousAnnotation':_0x4bf8ea['get'](_0x46ec15-0x1),'nextAnnotation':_0x4bf8ea['get'](_0x46ec15+0x1)}),_0x44e805===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4bf8ea,'focus',(_0x4068d7,_0x4ce917)=>{this['setActiveAnnotation'](_0x4ce917);}),this['listenTo'](_0x4bf8ea,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1791c1,_0x463188)=>{_0x463188['keyCode']===_0x3fe5b7['esc']&&_0x44ab4e['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x44ab4e['content']['first']),this['_hideBalloon'](),_0x463188['stopPropagation'](),_0x463188['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3faa67,_0x4d2dc1)=>{const _0x277da5=_0x4d2dc1['target'];_0x44ab4e['isVisible']&&_0x44ab4e['element']['contains'](_0x277da5)||_0x46d1b2['view']['element']['contains'](_0x277da5)||_0x3faa67['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3d0990=>_0x3d0990['contains'](_0x277da5))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x370793=this['context']instanceof _0xb420e9?this['context']['editors']:new _0x2a8245([this['context']]);for(const _0x3efc9a of _0x370793)this['_integrateWithEditorAnnotations'](_0x3efc9a);this['listenTo'](_0x370793,'add',(_0x25b71a,_0x55a7ce)=>{this['listenTo'](_0x55a7ce,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x55a7ce);});}),this['listenTo'](_0x370793,'remove',(_0x19e713,_0x59f1f7)=>{_0x59f1f7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x59f1f7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1b3e26){if(_0x1b3e26===this['activeAnnotation'])return;const _0x3cdd8e=this['context']['plugins']['get'](z);if(_0x3cdd8e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1b3e26,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1b3e26)_0x3cdd8e['getSidebarItemView'](_0x1b3e26)?this['_showBalloon'](_0x1b3e26):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x1b3e26;}['detach'](){if(!this['isAttached'])throw new _0x2e6f8f('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x26306e=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x36544e=>_0x36544e['destroy']()),this['_annotationToNarrowView']['clear'](),_0x26306e['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xb420e9&&this['stopListening'](this['context']['editors']);for(const _0x3e2758 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3e2758);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x37eed5){if(!_0x37eed5['plugins']['has']('EditorAnnotations'))return;const _0x3db97b=_0x37eed5['plugins']['get']('EditorAnnotations'),_0x1adef5=this['context']['plugins']['get'](z),_0x57c8b5=this['annotations'],_0x579e91=this['balloonPanelView'],_0x262abe=()=>{const _0x4918d4=_0x3db97b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4918d4),this['setActiveAnnotation'](_0x4918d4[0x0]||null);};this['listenTo'](_0x3db97b,'refresh',_0x262abe),this['listenTo'](_0x3db97b,'blur',(_0x2eb4e8,{isAnnotationTracked:_0x9c063b})=>{this['activeAnnotation']&&_0x9c063b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3db97b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x57c8b5,'blur',_0x5d275b=>{_0x3db97b['hasDomSelection']()&&_0x5d275b['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x122397,_0xc9bd61)=>{const _0x4ca4ca=_0xc9bd61['target'];_0x579e91['isVisible']&&_0x579e91['element']['contains'](_0x4ca4ca)||_0x1adef5['view']['element']['contains'](_0x4ca4ca)||this['activeAnnotation']&&_0x3db97b['hasDomSelection']()&&(_0x262abe(),_0x122397['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3db97b);}['_destroyEditorAnnotationsIntegration'](_0x2e2bcc){_0x2e2bcc&&(this['stopListening'](_0x2e2bcc),this['_editorAnnotations']['remove'](_0x2e2bcc));}['_setSelectedAnnotations'](_0x17f5b8){for(const _0x3c1ffb of this['_selectedAnnotations'])_0x17f5b8['includes'](_0x3c1ffb)||this['_manuallyClosedAnnotationViews']['delete'](_0x3c1ffb['view']);this['_selectedAnnotations']=_0x17f5b8;}['_refreshPositioning'](){const _0x6b3b8d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x6b3b8d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2a9f51){if(this['_manuallyClosedAnnotationViews']['has'](_0x2a9f51['view']))return;const _0x3d964f=this['balloonPanelView']['content']['first'];_0x3d964f!==_0x2a9f51['view']?(_0x3d964f&&this['_detachListeners'](_0x3d964f),this['_attachListeners'](_0x2a9f51['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2a9f51['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2182a6=this['balloonPanelView']['content']['first'],_0x11f6c6=_0x2182a6&&this['annotations']['getByView'](_0x2182a6);if(!_0x11f6c6||!this['_annotationToNarrowView']['has'](_0x11f6c6))return;const _0x335f01=this['_annotationToNarrowView']['get'](_0x11f6c6)['element'],_0x2186b8=(function(){const _0x4dd8c4=_0x5ae522['defaultPositions'];return[_0x4dd8c4['southArrowNorthEast'],_0x4dd8c4['northArrowSouthEast'],_0x4dd8c4['southArrowNorth'],_0x4dd8c4['northArrowSouth'],_0x4dd8c4['southArrowNorthWest'],_0x4dd8c4['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x335f01,'positions':_0x2186b8});}['_hideBalloon'](){const _0x36981f=this['balloonPanelView'],_0x598581=_0x36981f['content']['first'];_0x598581&&(this['_detachListeners'](_0x598581),_0x36981f['unpin'](),_0x36981f['content']['clear']());}['_attachListeners'](_0x4bddbf){this['listenTo'](_0x4bddbf,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4bddbf,'Esc',(_0x5f0d32,_0x45e49a)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4bddbf),this['_hideBalloon'](),_0x45e49a();});}['_detachListeners'](_0x10b6a1){this['stopListening'](_0x10b6a1);}}class c extends _0x41aca7{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x300697,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x213cf1){super(_0x213cf1),_0x213cf1['editing']['view']['addObserver'](_0x2b71be),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x213cf1['plugins']['get'](_0x300697),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x180d0c=this['editor']['plugins']['get'](j);_0x180d0c['context']===this['editor']&&(_0x180d0c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x36a04f,_0x2a8cc4)=>{const _0x5d76d4=this['_balloon'];if(this['isAttached']&&_0x5d76d4['visibleView']){const _0x2ac1e4=this['annotations']['getByView'](_0x5d76d4['visibleView']);_0x2ac1e4&&this['_closeAnnotation'](_0x2ac1e4),_0x2a8cc4();}}));}['afterInit'](){const _0x3c151a=this['editor']['plugins']['get'](j);_0x3c151a['context']===this['editor']&&(_0x3c151a['hasActive']()||_0x3c151a['switchTo']('inline'));}['setActiveAnnotation'](_0x1cc925){_0x1cc925!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1cc925&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1cc925)&&this['_addAnnotationToBalloon'](_0x1cc925,!0x0),_0x1cc925['isActive']=!0x0),_0x1cc925||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1cc925);}['attach'](_0x29174f){this['annotations']=_0x29174f;const _0xb2ca41=this['editor']['plugins']['get'](j),_0x23066f=this['_balloon'];if(this['isAttached'])throw new _0x2e6f8f('inlineannotations-attach-already-attached',this);if(_0xb2ca41['context']!==this['editor'])throw new _0x2e6f8f('inlineannotations-not-allowed-with-context',this);const _0x52596f=this['editor']['plugins']['get'](b);this['listenTo'](_0x52596f,'refresh',()=>{const _0x58f50c=_0x52596f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x346c4e,_0x47e905;!this['_forceRefresh']&&(_0x346c4e=_0x58f50c,_0x47e905=this['_selectedAnnotations'],_0x346c4e['length']===_0x47e905['length']&&_0x346c4e['every'](_0x4969c0=>_0x47e905['includes'](_0x4969c0)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x58f50c),this['setActiveAnnotation'](_0x58f50c[0x0]||null));}),this['listenTo'](_0x52596f,'blur',(_0x11d196,{isAnnotationTracked:_0x524f4e})=>{this['activeAnnotation']&&_0x524f4e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1a8f96,_0x37def5,_0x116af9)=>{_0x116af9||this['setActiveAnnotation'](null);}),this['listenTo'](_0x29174f,'remove',(_0x44b2e0,_0x58e578)=>{this['_removeAnnotationFromBalloon'](_0x58e578),_0x58e578===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x23066f,'change:visibleView',(_0x3312a5,_0x1cbc8e,_0x49f27a,_0x18c564)=>{_0x18c564&&this['stopListening'](_0x18c564);const _0x294272=_0x29174f['getByView'](_0x49f27a);_0x49f27a&&_0x294272&&(this['listenTo'](_0x49f27a,'change:height',()=>{_0x23066f['updatePosition']();}),this['listenTo'](_0x49f27a,'Esc',()=>{this['_closeAnnotation'](_0x294272),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x294272&&this['setActiveAnnotation'](_0x294272));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x23066f['visibleView']&&(_0x29174f['getByView'](_0x23066f['visibleView'])&&_0x23066f['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x2e6f8f('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x52a444 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x52a444);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x16e912){for(const _0x1215db of this['_selectedAnnotations'])_0x16e912['includes'](_0x1215db)||this['_manuallyClosed']['delete'](_0x1215db);for(const _0x2bd44f of this['annotations'])_0x16e912['includes'](_0x2bd44f)||this['_removeAnnotationFromBalloon'](_0x2bd44f);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1dd0fd of _0x16e912)this['_addAnnotationToBalloon'](_0x1dd0fd);}this['_selectedAnnotations']=_0x16e912;}['_addAnnotationToBalloon'](_0x4acb15,_0x1ee029=!0x1){this['_manuallyClosed']['has'](_0x4acb15)||(this['_addedAnnotations']['has'](_0x4acb15)||this['_balloon']['hasView'](_0x4acb15['view'])||(this['_addedAnnotations']['add'](_0x4acb15),this['_balloon']['add']({'stackId':_0x4acb15['view']['id'],'view':_0x4acb15['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4acb15)}})),_0x1ee029&&this['_balloon']['showStack'](_0x4acb15['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2fefe4){const _0x1f8330=_0x2fefe4['target'],_0x2e2300=this['editor']['editing']['view'],_0x486243=_0x2e2300['document']['selection']['getFirstRange'](),_0xb6235b=_0x2e2300['domConverter']['viewRangeToDom'](_0x486243);if(_0xb6235b['collapse'](!0x0),_0x1f8330){if(_0x1f8330 instanceof _0x3fbc4e)return _0x1f8330;let _0x19c965=[];for(const _0x53bf0d of _0x1f8330)_0x19c965['push'](...F(_0x53bf0d['getClientRects']()));_0x19c965=function(_0x258605){const _0x48f0e2=[];let _0x2974e9=_0x258605[0x0];for(let _0x231bed=0x1;_0x231bed<_0x258605['length'];_0x231bed++)P(_0x2974e9,_0x258605[_0x231bed])?_0x2974e9['width']+=_0x258605[_0x231bed]['width']:(_0x48f0e2['push'](_0x2974e9),_0x2974e9=_0x258605[_0x231bed]);return _0x48f0e2['push'](_0x2974e9),_0x48f0e2;}(_0x19c965);const _0x353eb9=_0xb6235b['getBoundingClientRect']();return _0x19c965['find'](_0x176c20=>_0x176c20['top']<=_0x353eb9['top']&&_0x176c20['bottom']>=_0x353eb9['bottom']&&_0x176c20['left']<=_0x353eb9['left']&&_0x176c20['right']>=_0x353eb9['right'])||_0x19c965[0x0];}return _0x2fefe4['targetRect']||_0xb6235b;}['_removeAnnotationFromBalloon'](_0x4278cc){this['_addedAnnotations']['has'](_0x4278cc)&&this['_balloon']['hasView'](_0x4278cc['view'])&&(this['_addedAnnotations']['delete'](_0x4278cc),this['_balloon']['remove'](_0x4278cc['view']));}['_closeAnnotation'](_0x4327f4){this['_manuallyClosed']['add'](_0x4327f4),this['_removeAnnotationFromBalloon'](_0x4327f4);}}function F(_0xb3316e){return Array['from'](_0xb3316e)['map'](DOMRect['fromRect']);}function P(_0x3156e1,_0x4737ba){return _0x3156e1['top']===_0x4737ba['top']&&_0x3156e1['bottom']===_0x4737ba['bottom']&&_0x3156e1['right']===_0x4737ba['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4cf704,_0x5cac8e){super(_0x4cf704),this['set']('isEmpty',!_0x5cac8e['length']),this['focusTracker']=new _0x19913b(),this['_annotationViews']=_0x5cac8e,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x7bfb99({'focusables':_0x5cac8e,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5cac8e,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5cac8e,'remove',(_0x13a545,_0x88bcd1)=>{_0x88bcd1['isActive']&&this['focus'](),_0x5cac8e['length']||(this['isEmpty']=!0x0);});const _0x5576c0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x4cf704,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5cac8e},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5576c0['if']('isEmpty','ck-hidden',_0x26f27c=>!_0x26f27c)]},'children':[{'text':N(_0x4cf704,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x514783 of this['_annotationViews'])this['focusTracker']['add'](_0x514783['element']);this['_annotationViews']['on']('change',(_0xbae1bb,{added:_0x445a37,removed:_0x49dea5})=>{for(const _0x5a792d of _0x445a37)this['focusTracker']['add'](_0x5a792d['element']);for(const _0x4275a5 of _0x49dea5)this['focusTracker']['remove'](_0x4275a5['element']);});}}class p extends _0x2228db{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x42b085){super(_0x42b085),this['archivedThreads']=new _0x2a8245();}['init'](){const _0x1a5411=this['context'],_0x29d562=_0x1a5411['plugins']['get'](o),_0x6a89ce=_0x1a5411['plugins']['get'](y);this['listenTo'](_0x29d562,'addCommentThread',(_0x330650,{threadId:_0x211c70})=>{const _0x149596=_0x29d562['getCommentThread'](_0x211c70);_0x149596['archivedAt']&&this['archivedThreads']['add'](_0x149596,this['_calculatePosition'](_0x149596['archivedAt'])),this['listenTo'](_0x149596,'change:archivedAt',(_0x5c122a,_0x4ac44f,_0x5bb6fc)=>{_0x5bb6fc?this['archivedThreads']['has'](_0x149596)||this['archivedThreads']['add'](_0x149596,this['_calculatePosition'](_0x149596['archivedAt'])):this['archivedThreads']['has'](_0x149596)&&this['archivedThreads']['remove'](_0x149596);});}),this['listenTo'](_0x29d562,'removeCommentThread',(_0x59810e,{threadId:_0x4fbbfd})=>{const _0x34bbca=_0x29d562['getCommentThread'](_0x4fbbfd);this['stopListening'](_0x34bbca),this['archivedThreads']['has'](_0x34bbca)&&this['archivedThreads']['remove'](_0x34bbca);},{'priority':'highest'}),this['listenTo'](_0x6a89ce['collection'],'focus',(_0x2b7477,_0x9f40ab)=>{_0x9f40ab['isVisible']||(_0x9f40ab['isActive']=!0x0,_0x6a89ce['activate'](_0x9f40ab));});}['_calculatePosition'](_0x22c321){const _0x44208d=[...this['archivedThreads']]['findIndex'](_0x418018=>_0x418018['archivedAt']<_0x22c321);return _0x44208d>-0x1?_0x44208d:this['archivedThreads']['length'];}}class a extends _0x41aca7{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x4c9c9e];}constructor(_0x4e82ed){super(_0x4e82ed),this['annotationViews']=new _0x5e227b(),this['_pendingThreads']=[];}['init'](){const _0x6a355f=this['editor'],_0xd3c448=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x6a355f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3c4ac3,!0x0)),_0x6a355f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2d84d9=this['_createCommentsArchiveButton'](_0x27f8f3);return _0x2d84d9['set']({'role':'menuitemcheckbox'}),_0x2d84d9;});const _0x362957=_0x6a355f['plugins']['get'](p),_0x283e8e=_0x6a355f['plugins']['get']('Annotations'),_0xa9e51e=_0x6a355f['plugins']['get']('CommentsRepository');_0x362957['archivedThreads']['forEach'](_0x4e0cf2=>{this['_handleNewThread'](_0x4e0cf2);}),this['listenTo'](_0x362957['archivedThreads'],'add',(_0x430af9,_0x208475)=>{this['_handleNewThread'](_0x208475);}),this['listenTo'](_0x283e8e['collection'],'add',(_0x1b6be5,_0x8c9fa4)=>{const _0x54a684=this['_pendingThreads']['find'](_0x1cc9b2=>{const _0x10961e=_0xa9e51e['_threadToController']['get'](_0x1cc9b2);return _0x10961e&&_0x8c9fa4['innerView']===_0x10961e['view'];});if(_0x54a684){const _0x1dd7d2=this['_calculatePosition'](_0x54a684['archivedAt']);this['annotationViews']['add'](_0x8c9fa4['view'],_0x1dd7d2),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x54a684),0x1);}}),this['listenTo'](_0x362957['archivedThreads'],'remove',(_0x337fd7,_0x1af30f)=>{const _0x509307=_0x6a355f['config']['get']('collaboration.channelId');if(!_0x509307||_0x1af30f['channelId']===_0x509307){if(this['_pendingThreads']['includes'](_0x1af30f))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1af30f),0x1);else{const _0x354733=_0xa9e51e['_threadToController']['get'](_0x1af30f),_0x23019e=_0x283e8e['getByInnerView'](_0x354733['view']);this['annotationViews']['remove'](_0x23019e['view']),this['stopListening'](_0x23019e['focusableElements']);}}}),this['listenTo'](_0x283e8e['collection'],'add',(_0x4e830e,_0x5007b6)=>{this['listenTo'](_0x5007b6,'escape',_0xd3c448);}),this['listenTo'](_0x283e8e['collection'],'remove',(_0x252b79,_0x1eb96e)=>{this['stopListening'](_0x1eb96e,'escape',_0xd3c448);});}['_handleNewThread'](_0x33bb9a){const _0x34704b=this['editor']['plugins']['get']('CommentsRepository'),_0x2ea861=this['editor']['plugins']['get']('Annotations'),_0x314fc0=this['editor']['config']['get']('collaboration.channelId');if(!_0x314fc0||_0x33bb9a['channelId']===_0x314fc0){const _0x2dc6bd=_0x34704b['_threadToController']['get'](_0x33bb9a);if(!_0x2dc6bd)return void this['_pendingThreads']['push'](_0x33bb9a);const _0x529c00=this['_calculatePosition'](_0x33bb9a['archivedAt']),_0x6419f4=_0x2ea861['getByInnerView'](_0x2dc6bd['view']);_0x6419f4['isVisible']&&_0x2ea861['_visibleAnnotations']['remove'](_0x6419f4),this['annotationViews']['add'](_0x6419f4['view'],_0x529c00);}}['_calculatePosition'](_0x362247){const _0x128ac7=this['editor']['config']['get']('collaboration.channelId'),_0x432948=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0xfc74a1=>_0xfc74a1['channelId']===_0x128ac7)['findIndex'](_0x569c65=>_0x569c65['archivedAt']<_0x362247);return _0x432948<0x0||_0x432948>this['annotationViews']['length']?this['annotationViews']['length']:_0x432948-0x1;}['_toggleDialog'](){const _0x36a56f=this['editor'],_0x20c41a=_0x36a56f['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x36a56f['locale'],this['annotationViews'])),'commentsArchive'===_0x20c41a['id']?_0x20c41a['hide']():_0x20c41a['show']({'id':'commentsArchive','title':N(_0x36a56f['locale'],'COMMENTS_ARCHIVE'),'icon':_0x37db05,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2b4a03['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1b017b,_0x56af73=!0x1){const _0x5bcbf2=this['editor']['locale'],_0x1fb88f=this['editor']['plugins']['get']('Dialog'),_0xd9c7b9=new _0x1b017b(_0x5bcbf2);return _0xd9c7b9['bind']('isEnabled')['to'](this,'isEnabled'),_0xd9c7b9['bind']('isOn')['to'](_0x1fb88f,'id',_0x2058f1=>'commentsArchive'===_0x2058f1),_0xd9c7b9['set']({'label':N(_0x5bcbf2,'COMMENTS_ARCHIVE'),'icon':_0x37db05,'isToggleable':!0x0}),_0x56af73&&(_0xd9c7b9['tooltip']=!0x0),this['listenTo'](_0xd9c7b9,'execute',()=>this['_toggleDialog']()),_0xd9c7b9;}['_hideDialogOnAnnotationEscape']=_0x4bb102=>{const _0x5db3aa=_0x4bb102['source'];if(!this['annotationViews']['has'](_0x5db3aa['view']))return;const _0x4875be=this['editor']['plugins']['get']('Dialog');_0x4875be['isOpen']&&'commentsArchive'===_0x4875be['id']&&(_0x4875be['hide'](),_0x4bb102['stop']());};}class gi extends _0x41aca7{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x1961e5,ContextPlugin as _0x388a6f,PendingActions as pt,Command as _0x406027,Plugin as _0x35651a,Context as _0x3a3651}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3538ec,uid as _0x3b880e,KeystrokeHandler as jt,FocusTracker as _0x43d57e,diff as _0x152196,Collection as _0x504ada,Rect as _0x3dcdfa,CKEditorError as _0x274fd1,first as _0x3292fb,priorities as Wt,scrollViewportToShowTarget as ot,getEnvKeystrokeText as nt,toUnit as Dt,DomEmitterMixin as _0x3fda0f,keyCodes as _0x50541b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3e6b0c,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x2c520f,trimHtml as _0x180eda,LateFocusDropdownButtonView as _0xbda48,Users as st,getDateTimeFormatter as It,hashObject as wt,getAllMarkersDomElementsSorted as it,surroundingMarkersDetector as et,FOCUS_ANNOTATION_KEYSTROKE as _0x3be90e}from'ckeditor5-collaboration/dist/index.js';import{throttle as _0x378124,isEqual as yt,cloneDeep as At,set as Ct,unset as vt,debounce as _0x12b399}from'es-toolkit/compat';import{IconUndo as _0x476701,IconCheck as _0x2a6e37,IconPencil as _0x4dc30,IconRemoveComment as _0x1ad19b,IconThreeVerticalDots as _0x384224,IconAddComment as _0x14f2f4,IconCommentsArchive as _0x37f55e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x5a7382,ButtonView as _0x13fccc,ViewCollection as _0x31ebb9,createDropdown as _0x1a0755,ListView as _0x3737d5,focusChildOnDropdownOpen as _0x2e355f,ListItemView as _0x53e8ec,MenuBarMenuListItemButtonView as _0x339fd3,BodyCollection as _0x308b40,BalloonPanelView as _0x1d2c37,ContextualBalloon as _0x2e5f1d,Dialog as _0x3c85b0,DialogViewPosition as _0x4c44fd}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0xbea9b9}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x258aa7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x976562}from'@ckeditor/ckeditor5-widget/dist/index.js';class gt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3538ec(){['model'];['view'];constructor(_0x4e0548,_0x320a7d){super(),this['model']=_0x4e0548,this['model']['_isAttached']=!0x0,this['view']=_0x320a7d,this['listenTo'](_0x320a7d,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x320a7d,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x320a7d,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x320a7d,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x320a7d,'addComment',(_0x3f05d1,_0x366b55)=>this['addComment'](_0x366b55)),this['listenTo'](_0x320a7d,'updateComment',(_0x54ddf0,_0x2a3f86,_0x9bd238)=>this['updateComment'](_0x2a3f86,_0x9bd238)),this['listenTo'](_0x320a7d,'removeComment',(_0x3ce61b,_0x5dafe9)=>this['removeComment'](_0x5dafe9));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x2246c8){this['model']['addComment']({'content':_0x2246c8,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3cf2fb,_0x2d1687){this['model']['getComment'](_0x3cf2fb)['update']({'content':_0x2d1687});}['removeComment'](_0x324877){this['model']['getComment'](_0x324877)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x1a9765,_0x3a6d19,_0x313af5){const t=_0x1a9765['t'];switch(_0x3a6d19){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x313af5);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x313af5);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x313af5);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x313af5);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x313af5);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x313af5);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x313af5);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x313af5);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0xb317a4,_0x41b49a){super(_0xb317a4);const _0x1f0902=_0x3b880e();this['main']=this['createCollection'](),this['editable']=new $t(_0xb317a4,_0x41b49a,void 0x0,{'label':()=>N(_0xb317a4,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xb317a4['uiLanguageDirection'],'lang':_0xb317a4['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1f0902},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Ut{['view'];constructor(_0x406fd7){super(_0x406fd7),this['view']=new Vt(_0x406fd7['locale'],_0x406fd7['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1b2d1a=this['editor']['editing']['view'],_0x3473d6=this['view']['editable'],_0xb4ba04=_0x1b2d1a['document']['getRoot']();_0x3473d6['name']=_0xb4ba04['rootName'],this['view']['render']();const _0x56cafc=_0x3473d6['element'];this['setEditableElement'](_0x3473d6['name'],_0x56cafc),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1b2d1a['attachDomRoot'](_0x56cafc),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3538ec(_0x1961e5){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x1c6cfc={}){function _0x59de9d(_0x5b11a6){return _0x5b11a6['map'](_0x3ccaae=>String['fromCharCode'](_0x3ccaae))['join']('');}(_0x1c6cfc=Object['assign']({},_0x1c6cfc))['plugins']||(_0x1c6cfc['plugins']=Rt['defaultPlugins']),super(_0x1c6cfc),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x59de9d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59de9d([0x76,0x69,0x65,0x77])][_0x59de9d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x59de9d([0x61,0x75,0x74,0x6f]),this[_0x59de9d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x59de9d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x59de9d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x59de9d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x59de9d([0x6f,0x6b])});}['create'](){const _0x584393=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x584393))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x372514=>{const _0x1d6259=this['model']['document']['getRoot'](),_0xc991b7=_0x1d6259&&_0x1d6259['getChild'](_0x1d6259['childCount']-0x1);_0x372514['setSelection'](_0xc991b7,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1a33f6=this['editing']['view'],_0x588e0e=_0x1a33f6['document']['getRoot'](),_0x291873=_0x588e0e['getChild'](0x0);_0x588e0e['childCount']>0x1||!_0x291873||'p'!=_0x291873['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x1a33f6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x291873['placeholder']=this['placeholder']),Ft({'view':_0x1a33f6,'element':_0x291873,'keepOnFocus':!0x0}),this['placeholderElement']=_0x291873);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x56eea7,_0x1f7b97={}){super(_0x56eea7),this['editor']=null,this['_editorConfig']=_0x1f7b97,this['set']('value',_0x1f7b97['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x56eea7,'Reply...')),this['set']('submitLabel',N(_0x56eea7,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x43d57e(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x4106dc,_0x3a4424)=>{this['cancelButtonView']['fire']('execute'),_0x3a4424();}),this['keystrokes']['set']('Ctrl+Enter',(_0x51af32,_0x3d946c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3d946c());}),this['on']('submit',(_0x3863eb,_0x5f034e)=>{_0x5f034e['length']>0xfde8?(alert(N(_0x56eea7,'TOO_LONG_COMMENT_ALERT',[_0x5f034e['length'],0xfde8])),_0x3863eb['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xf039e7=this['editor'];this['element']['insertBefore'](_0xf039e7['ui']['element'],this['element']['firstChild']),_0xf039e7['model']['document']['on']('change',()=>this['value']=_0xf039e7['getData']()),_0xf039e7['bind']('placeholder')['to'](this),this['focusables']['add'](_0xf039e7['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3cb71b){-0x1===_0x3cb71b?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x2c53cb}=this,_0x2248fd=new _0x13fccc(_0x2c53cb);return _0x2248fd['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2248fd['withText']=!0x0,_0x2248fd['bind']('label')['to'](this,'submitLabel'),_0x2248fd['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2248fd['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5ae149,_0x187a8a)=>!_0x187a8a&&!!_0x5ae149['trim']()),_0x2248fd;}['_createCancelButton'](){const {locale:_0x53b520}=this,_0x1ee4d9=new _0x13fccc(_0x53b520);return _0x1ee4d9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1ee4d9['label']=N(_0x53b520,'Cancel'),_0x1ee4d9['withText']=!0x0,_0x1ee4d9['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1ee4d9;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3735ee=>{this['focusTracker']['add'](_0x3735ee['element']);}),this['focusables']['on']('change',(_0x381599,_0x564afe)=>{for(const _0x545d9b of Array['from'](_0x564afe['added'])['reverse']())this['focusTracker']['add'](_0x545d9b['element']);});}}class ie extends kt{constructor(_0x31d2cd,_0xda2624,_0x3dfe55){super(_0x31d2cd),this['commentInputView']=new os(_0x31d2cd,_0x3dfe55),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5015d3,_0xd7935e)=>_0x5015d3||!!_0xd7935e),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x3e6b0c(_0x31d2cd,_0xda2624),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x10992a){this['commentInputView']['focus'](_0x10992a);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5e394e,_0x40fb36)=>{const {submitButtonView:_0x2d6b98,cancelButtonView:_0x17ae5f,editor:_0x2f9157}=this['commentInputView'];[_0x2d6b98['element'],_0x17ae5f['element'],_0x2f9157?_0x2f9157['editing']['view']['getDomRoot']():null]['filter'](_0x1ed4a0=>_0x1ed4a0)['some'](_0x423f15=>_0x423f15['contains'](_0x40fb36['target']))||(this['focus'](),_0x40fb36['preventDefault']());});}}class rs extends kt{constructor(_0x171632){super(_0x171632);const _0xcc923f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xcc923f['to']('count',_0x211d0c=>N(_0x171632,'NUMBER_OF_COMMENTS',_0x211d0c))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x37da3f,_0xb5fe56,_0x3ecc17){super(_0x37da3f);const _0x4fb83f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xb5fe56['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xb5fe56,this['_config']=_0x3ecc17,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x21bd3b=>this['commentViews']['map'](_0x3544d6=>_0x3544d6['element'])['includes'](_0x21bd3b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x37da3f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3d2419=>_0x3d2419-this['_config']['maxCommentsWhenCollapsed']);for(const _0x49f632 of _0xb5fe56['comments'])this['_handleNewCommentModel'](_0x49f632);this['_handleInfoComment'](),this['listenTo'](_0xb5fe56['comments'],'add',(_0x1d4a2d,_0x52f9bd)=>{const _0x4dab03=this['_calculatePosition'](_0x52f9bd);this['length']++,this['_handleNewCommentModel'](_0x52f9bd,_0x4dab03),this['refreshVisibleViews']();}),this['listenTo'](_0xb5fe56['comments'],'remove',(_0x40b752,_0xa336b6)=>{this['length']--,this['_handleRemoveCommentModel'](_0xa336b6),this['refreshVisibleViews']();}),this['listenTo'](_0xb5fe56,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xb5fe56,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x4fb83f['if']('length','ck-hidden',_0x3fb2ba=>!_0x3fb2ba)],'aria-label':N(_0x37da3f,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x3e0a45){-0x1===_0x3e0a45?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x67c59 of this['commentViews'])_0x67c59['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1bdc58,_0x5e4c3c){const _0x237581=new this['_config']['CommentView'](this['locale'],_0x1bdc58,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x237581['viewUid']=_0x1bdc58['id'],_0x237581['delegate']('removeComment')['to'](this),_0x237581['delegate']('updateComment')['to'](this),_0x237581['delegate']('resolveCommentThread')['to'](this),_0x237581['delegate']('editorReady')['to'](this),_0x237581['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x237581,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x237581,_0x5e4c3c);}['_calculatePosition'](_0x3dd37){const _0x171078=this['_model']['_findOptimalIndex'](_0x3dd37);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3dd37['authoredAt']?_0x171078-0x1:_0x171078:_0x171078-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3b3161={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3b3161,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3b3161));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x295990){const _0x45d3bd=this['commentViews']['remove'](_0x295990['id']);this['stopListening'](_0x45d3bd),_0x45d3bd['isEditMode']&&this['_updateHasDirtyComment'](),_0x45d3bd['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x20b578=>_0x20b578['isEditMode']);}['_rearrangeCollapse'](){const _0x2a098d=function(_0x469b9a){const _0x14beee=new _0x504ada();for(const _0xa482e2 of _0x469b9a)_0x14beee['add'](_0xa482e2);return _0x14beee;}(this['commentViews']),_0x25f789=this['_collapsedCommentsView']['count'];for(let _0x4ed2b2=0x1;_0x4ed2b2<=_0x25f789;_0x4ed2b2++)_0x2a098d['remove'](0x1);for(const _0x290bd1 of _0x2a098d)_0x290bd1['collapse']();_0x25f789>0x0&&_0x2a098d['add'](this['_collapsedCommentsView'],0x1),ns(_0x152196(Array['from'](this['visibleViews']),Array['from'](_0x2a098d)),this['visibleViews'],_0x2a098d);}['_rearrangeExpand'](){ns(_0x152196(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x18fdfd of this['visibleViews'])_0x18fdfd['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1f7e28=>{this['focusTracker']['add'](_0x1f7e28['element']),this['keystrokes']['listenTo'](_0x1f7e28['element']);}),this['commentViews']['on']('change',(_0x1fcadc,_0x2549b0)=>{for(const _0x38fae6 of _0x2549b0['removed'])this['focusTracker']['remove'](_0x38fae6['element']),this['keystrokes']['stopListening'](_0x38fae6['element']);for(const _0x336e24 of Array['from'](_0x2549b0['added'])['reverse']())this['focusTracker']['add'](_0x336e24['element']),this['keystrokes']['listenTo'](_0x336e24['element']);});}}function ns(_0x28760c,_0x52acda,_0x31ed3e){let _0x9028d5=0x0;for(const _0x171d19 of _0x28760c)switch(_0x171d19){case'insert':_0x52acda['add'](_0x31ed3e['get'](_0x9028d5),_0x9028d5),_0x9028d5++;break;case'delete':_0x52acda['remove'](_0x9028d5);break;case'equal':_0x9028d5++;}}class oe extends kt{constructor(_0x77339e){super(_0x77339e);const _0x83d5e2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x83d5e2['to']('contextValue',_0x12a9a5=>N(_0x77339e,'THREAD_CONTEXT_LABEL',_0x12a9a5)),'tabindex':-0x1},'children':[{'text':_0x83d5e2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x974bd5,_0x435022){super(_0x974bd5);const _0x2ce67d=this['bindTemplate'];this['_model']=_0x435022,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1b6811=>!!_0x1b6811),this['bind']('contextValue')['to'](this['_model'],'context',_0x166e21=>_0x166e21&&_0x166e21['value']?this['_trimContextValue'](_0x166e21['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x2ce67d['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x149713=new _0x13fccc(this['locale']);return _0x149713['label']=N(this['locale'],'Reopen'),_0x149713['tooltip']=N(this['locale'],'Reopen'),_0x149713['icon']=_0x476701,_0x149713['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2206ac=>!_0x2206ac),_0x149713['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x317512,_0x305aad)=>_0x317512&&_0x305aad),_0x149713['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x149713;}['_trimContextValue'](_0x272266){if(_0x272266['length']<0x96)return _0x272266;const _0x40710a=_0x272266['lastIndexOf']('\x20',0x93);return _0x272266['substring'](0x0,_0x40710a>-0x1?_0x40710a:0x93)+'...';}['_attachContextActions'](){const _0x391708=this['element']['querySelector']('.ck-context'),_0x1d371a=_0x391708['querySelector']('.ck-context__value');this['listenTo'](_0x391708,'mouseenter',()=>{_0x1d371a['offsetWidth']<_0x1d371a['scrollWidth']&&_0x391708['classList']['add']('overlay');}),this['listenTo'](_0x391708,'mouseleave',()=>{_0x391708['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x26939a of this['focusables'])this['focusTracker']['add'](_0x26939a['element']),this['keystrokes']['listenTo'](_0x26939a['element']);}['_createContextView'](){const _0x9c0ac3=new oe(this['locale']);return _0x9c0ac3['bind']('contextValue')['to'](this),_0x9c0ac3;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2f2ca6,_0x54cbaf,_0x5b3711,_0x1dc481){super(_0x2f2ca6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x54cbaf,this['_localUser']=_0x5b3711,this['_config']=_0x1dc481,this['commentThreadHeaderView']=new Yt(_0x2f2ca6,_0x54cbaf),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x2f2ca6,N(_0x2f2ca6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2f2ca6,_0x54cbaf,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1dc481)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x237886,_0x31a02b)=>_0x237886||!!_0x31a02b),this['bind']('isUnlinked')['to'](_0x54cbaf,'unlinkedAt',_0x5ccbd4=>!!_0x5ccbd4),this['bind']('ariaLabel')['to'](this,'length',_0x167772=>{const _0x4db465=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x167772,_0x4db465]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5adb86=>_0x5adb86['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2e8f25=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x37867f=_0x2e8f25['commentInputView'];return _0x2e8f25['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x37867f,'value',(_0x5de711,_0x160d86,_0x4cecb7,_0x7da004,_0x3027a7)=>!!_0x3027a7||!!_0x7da004&&_0x4cecb7&&!_0x160d86||_0x5de711&&_0x4cecb7&&!_0x160d86),_0x37867f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x335974,_0x724c9e,_0x441e45)=>{let _0x289fb7;return _0x289fb7=_0x441e45&&_0x724c9e?'Reply\x20to\x20reopen\x20discussion...':_0x335974?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x289fb7);}),_0x37867f['bind']('submitLabel')['to'](this,'length',_0x449184=>N(this['locale'],_0x449184?'Reply':'Comment')),_0x37867f['on']('submit',(_0xc01dfc,_0x559d18)=>{this['fire']('addComment',_0x559d18),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x37867f['on']('cancel',()=>{this['focus']();}),_0x37867f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x37867f['on']('cancel',_0x5c37be=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5c37be['stop']());}),this['on']('change:isActive',(_0x3df9a2,_0xf28ea0,_0x2608be)=>{_0x2608be||this['length']||_0x37867f['value']||this['fire']('removeCommentThread');}),_0x2e8f25;}}class Tt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xd63abc,_0x26053f,_0x5caca0,_0x396502){super(_0xd63abc,_0x26053f,_0x5caca0,_0x396502),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xd63abc,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x298bcb,_0xf5c4c,_0x295389)=>{_0x295389||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x495ad9,_0x3be33e,_0x1b1d95)=>{_0x1b1d95&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2f161d=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2f161d['if']('isActive','ck-thread--active'),_0x2f161d['if']('isUnlinked','ck-thread--unlinked'),_0x2f161d['if']('isConfirm','ck-thread--remove-confirmation'),_0x2f161d['to']('actionIndicator',_0x343d9b=>_0x343d9b?'ck-thread--'+_0x343d9b:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2f161d['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0xc2da7c of this['commentsListView']['commentViews'])_0xc2da7c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5ceefe}=this,_0x216c24=this['commentsListView']['commentViews']['get'](0x0);_0x216c24===this['_boundFirstCommentView']||_0x216c24['isSystemComment']||(this['_boundFirstCommentView']=_0x216c24,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x216c24,'actionIndicator',_0x94e8d1=>'remove'===_0x94e8d1?'remove':null),_0x216c24['placeholder']=N(_0x5ceefe,'Write\x20a\x20comment...'),_0x216c24['removeButton']['on']('execute',_0x480e05=>{_0x480e05['stop'](),this['showConfirm'](N(_0x5ceefe,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x216c24['focus']();}),_0x216c24['actionBar']['add'](this['resolveButton'],0x0),_0x216c24['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x38e8aa=new _0x2c520f(this['locale']);return _0x38e8aa['label']=N(this['locale'],'Resolve'),_0x38e8aa['tooltip']=N(this['locale'],'Resolve'),_0x38e8aa['icon']=_0x2a6e37,_0x38e8aa['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x38e8aa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x318f76=>!_0x318f76),_0x38e8aa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x524c17,_0x392787)=>_0x524c17&&!_0x392787),_0x38e8aa['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x38e8aa;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0xf067e8){super(_0xf067e8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x724ee0,_0x2ee50a,_0x2f18f7)=>{this['element']['innerHTML']=_0x2f18f7;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x488f9d,_0x48162a,_0x465839){super(_0x488f9d),this['_model']=_0x48162a,this['_config']=_0x465839,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x48162a,'content',_0x48162a,'authoredAt',(_0x2ee7d5,_0x31d6b0)=>N(_0x488f9d,'COMMENT_ARIA_LABEL',[_0x48162a['author']['name'],_0x465839['formatDateTime'](_0x31d6b0),new DOMParser()['parseFromString'](_0x2ee7d5,'text/html')['body']['textContent'],_0x48162a['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x488f9d,N(_0x488f9d,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x31ebb9(),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x62d6b5=>_0x62d6b5['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x21ded5=new es(this['locale']);return _0x21ded5['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x573e8b,_0x5acc78)=>_0x5acc78?_0x180eda(_0x573e8b,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x573e8b),_0x21ded5;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5eef90=new os(this['locale'],this['_config']['editorConfig']);return _0x5eef90['value']=this['_model']['content'],_0x5eef90['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5eef90['submitLabel']=N(this['locale'],'Save'),_0x5eef90['on']('submit',(_0x532d8,_0x216d72)=>{this['fire']('updateComment',this['_model']['id'],_0x216d72),this['switchToDisplayMode'](),this['focus']();}),_0x5eef90['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5eef90['once']('editorReady',()=>{_0x5eef90['focus']();}),_0x5eef90['createEditor'](),_0x5eef90['delegate']('editorReady')['to'](this),_0x5eef90['delegate']('editorDestroyed')['to'](this),_0x5eef90;}['_setupKeyboardNavigation'](){const _0x1d105c=this['element'];this['keystrokes']['listenTo'](_0x1d105c);for(const _0x12f226 of this['focusables'])this['focusTracker']['add'](_0x12f226['element']),this['keystrokes']['listenTo'](_0x12f226['element']);this['focusables']['on']('change',(_0x6ec879,_0x5ccdf7)=>{for(const _0x78c727 of _0x5ccdf7['removed'])this['focusTracker']['remove'](_0x78c727['element']),this['keystrokes']['stopListening'](_0x78c727['element']);for(const _0x3e3d2e of _0x5ccdf7['added'])this['focusTracker']['add'](_0x3e3d2e['element']),this['keystrokes']['listenTo'](_0x3e3d2e['element']);}),this['keystrokes']['set']('enter',(_0x51a643,_0x3bb9f2)=>{_0x1d105c===_0x51a643['target']&&(this['focusCycler']['focusFirst'](),_0x3bb9f2());}),this['keystrokes']['set']('esc',(_0x97b76f,_0x3ee34e)=>{_0x1d105c!==_0x97b76f['target']&&(this['focus'](),_0x3ee34e());});}}class _t extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x1f77b5,_0x491330,_0x528877){super(_0x1f77b5,_0x491330,_0x528877),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x1f77b5,'Reply...')),this['bind']('authoredAt')['to'](_0x491330),this['bind']('resolvedAt')['to'](_0x491330),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x3e6b0c(_0x1f77b5,_0x491330['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x491330,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1d6333=this['bindTemplate'],_0x4f576c=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x1d6333['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1d6333['to']('authoredAt',_0x28445e=>this['_config']['formatDateTime'](_0x28445e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1d6333['if']('isEditMode','ck-comment__actions--hidden'),_0x1d6333['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x4f576c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x1d6333['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x1d6333['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1d6333['if']('isEditMode','ck-comment--edit'),_0x1d6333['if']('isSystemComment','ck-comment--info'),_0x1d6333['to']('actionIndicator',_0x66de32=>_0x66de32?'ck-comment--'+_0x66de32:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x4f576c}]}]};}['_createEditButton'](){const _0xaef185=new _0x13fccc(this['locale']);return _0xaef185['label']=N(this['locale'],'Edit'),_0xaef185['icon']=_0x4dc30,_0xaef185['withText']=!0x0,_0xaef185['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xaef185['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x34007f=>!_0x34007f),_0xaef185['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xaef185['on']('execute',()=>this['switchToEditMode']()),_0xaef185;}['_createRemoveButton'](){const _0x15c5aa=new _0x13fccc(this['locale']);return _0x15c5aa['label']=N(this['locale'],'Remove'),_0x15c5aa['icon']=_0x1ad19b,_0x15c5aa['withText']=!0x0,_0x15c5aa['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x15c5aa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x525c28=>!_0x525c28),_0x15c5aa['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x15c5aa['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x15c5aa;}['_createDropdown'](){const _0x5a1a91=_0x1a0755(this['locale'],_0xbda48),_0x1f6fce=_0x5a1a91['panelView']['children'],_0x5e9352=new _0x3737d5(this['locale']),_0x2862e0=_0x5a1a91['bindTemplate'];_0x2e355f(_0x5a1a91,()=>this['items']['find'](_0x27ee21=>_0x27ee21['isVisible'])),_0x5a1a91['extendTemplate']({'attributes':{'class':[_0x2862e0['if']('isVisible','ck-hidden',_0x1f1246=>!_0x1f1246)]}});const _0x49b25b=(_0x23b3ba,_0x5b2720=-0x1)=>{const _0xafc193=new _0x53e8ec(this['locale']);_0xafc193['children']['add'](_0x23b3ba);const _0x44f84b=_0x5b2720>-0x1?_0x5b2720:_0x5e9352['items']['length'];_0x5e9352['items']['add'](_0xafc193,_0x44f84b);const _0x4e2276=Array['from'](this['items']);_0x5a1a91['unbind']('isEnabled','isVisible'),_0x5a1a91['bind']('isEnabled')['toMany'](_0x4e2276,'isEnabled',(..._0x28ed14)=>_0x28ed14['some'](_0x234b7a=>_0x234b7a)),_0x5a1a91['bind']('isVisible')['toMany'](_0x4e2276,'isVisible',(..._0x4451d0)=>_0x4451d0['some'](_0x769f7=>_0x769f7));};_0x5a1a91['panelPosition']='sw',_0x5a1a91['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x384224});for(const _0x5ddccc of this['items'])_0x49b25b(_0x5ddccc);return _0x1f6fce['add'](_0x5e9352),_0x5a1a91['listenTo'](this['items'],'add',(_0x1f1c47,_0x968980,_0x416ed9)=>{_0x49b25b(_0x968980,_0x416ed9);}),_0x5a1a91['listenTo'](this['items'],'remove',(_0xe451c6,_0x21d935,_0x3421c8)=>{_0x5e9352['items']['remove'](_0x3421c8);}),_0x5a1a91;}['_attachActions'](_0x29c022,_0x2b92f4){const _0x2bbfb0=_0x29c022&&_0x29c022['element'];_0x2bbfb0&&(this['listenTo'](_0x2bbfb0,'mouseenter',()=>this['actionIndicator']=_0x2b92f4),this['listenTo'](_0x2bbfb0,'focus',()=>this['actionIndicator']=_0x2b92f4),this['listenTo'](_0x2bbfb0,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2bbfb0,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x30eeed=super['_createCommentInputView']();return _0x30eeed['bind']('placeholder')['to'](this),_0x30eeed;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Et(_0x26b94d){const _0xdd31d2=_0x378124(_0x26b94d,0x1e),_0x4ab3e1=new MutationObserver(_0x4516a4=>{for(const _0x3b9102 of _0x4516a4)('attributes'==_0x3b9102['type']&&'class'==_0x3b9102['attributeName']||'childList'==_0x3b9102['type']||'characterData'==_0x3b9102['type'])&&_0xdd31d2();});return{'attach'(_0x3da89d){_0x4ab3e1['observe'](_0x3da89d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4ab3e1['disconnect'](),_0xdd31d2['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x291033,_0x4b4f59){super(_0x291033),this['id']=_0x3b880e(),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x176de0,_0x305977)=>this['fire']('Esc',_0x305977)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Et(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4b4f59),this['mainView']=_0x4b4f59;const _0x257b80=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x257b80['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0xf326b8=this['element']['clientHeight'];_0xf326b8&&(this['height']=_0xf326b8);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3538ec(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3a262a,target:_0x2dd17c,type:_0x227279,isVisible:_0xa1117=!0x0}){super(),this['view']=_0x3a262a,this['view']['element']||this['view']['render'](),this['_type']=_0x227279,this['_target']=_0x2dd17c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x504ada([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x41a0fa,_0x5389f8)=>{this['view']['focusTracker']['add'](_0x5389f8);}),this['focusableElements']['on']('remove',(_0x20a265,_0x32002d)=>{this['view']['focusTracker']['remove'](_0x32002d);}),this['set']('isVisible',_0xa1117);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x274c6c=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x274c6c),_0x274c6c;}get['targetRect'](){const _0x4572eb=this['target'];if(null===_0x4572eb)return null;if(_0x4572eb instanceof _0x3dcdfa)return _0x4572eb;const _0x379b88=_0x4572eb['filter'](_0x147a4a=>function(_0x409300){const _0x244971=_0x409300['offsetParent'];if(_0x244971)return!0x0;const _0x530245=_0x409300['getClientRects']()['item'](0x0);return!!_0x530245;}(_0x147a4a));return 0x0===_0x379b88['length']?null:new _0x3dcdfa(_0x379b88[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x277f8e){this['view']['isActive']=_0x277f8e,this['view']['mainView']['isActive']=_0x277f8e;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x60f062){if(!(null===_0x60f062||_0x60f062 instanceof _0x3dcdfa||Array['isArray'](_0x60f062)&&_0x60f062['every'](_0x47f634=>fi(_0x47f634))))throw new _0x274fd1('annotation-invalid-target',null,{'target':_0x60f062});}['_getNormalizedTarget'](){const _0x3dc7f5='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x3dc7f5)?[_0x3dc7f5]:_0x3dc7f5;}}function fi(_0x25b629){return null!==_0x25b629&&'object'==typeof _0x25b629&&'nodeType'in _0x25b629&&0x1===_0x25b629['nodeType'];}class S extends _0x504ada{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x594d65=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x43d57e(),this['_focusTracker']['on']('change:isFocused',(_0x1d70de,_0x2727e2,_0x2ff482)=>{_0x2ff482||this['fire']('blur');});for(const _0x457145 of _0x594d65)this['add'](_0x457145);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x324126){if(this['has'](_0x324126))throw new _0x274fd1('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x324126['innerView'],_0x324126),this['_viewToAnnotation']['set'](_0x324126['view'],_0x324126);for(const _0x373271 of _0x324126['focusableElements'])this['_focusTracker']['add'](_0x373271);this['listenTo'](_0x324126['focusableElements'],'add',(_0x329033,_0x50510d)=>{this['_focusTracker']['add'](_0x50510d);}),this['listenTo'](_0x324126['focusableElements'],'remove',(_0x50695b,_0x3f7431)=>{this['_focusTracker']['remove'](_0x3f7431);}),this['listenTo'](_0x324126['view']['focusTracker'],'change:isFocused',(_0xb87467,_0x842c84,_0x295610)=>{_0x295610&&this['fire']('focus',_0x324126);}),_0x324126['updateTargetRect']();const _0x58e6a9=this['_getOrderInContent'](_0x324126['view']['targetRect']);return super['add'](_0x324126,_0x58e6a9);}['remove'](_0x87dd61){if(!this['has'](_0x87dd61))throw new _0x274fd1('annotationcollection-not-existing-item',null);this['stopListening'](_0x87dd61['view']['focusTracker']),this['stopListening'](_0x87dd61['focusableElements']);for(const _0x3653c5 of _0x87dd61['focusableElements'])this['_focusTracker']['remove'](_0x3653c5);return this['_viewToAnnotation']['delete'](_0x87dd61['view']),this['_innerViewToAnnotation']['delete'](_0x87dd61['innerView']),super['remove'](_0x87dd61);}['getByInnerView'](_0x4eeb34){return this['_innerViewToAnnotation']['get'](_0x4eeb34);}['getByView'](_0x4c0430){return this['_viewToAnnotation']['get'](_0x4c0430);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3c10f0 of this)_0x3c10f0['updateTargetRect']();this['_sort']();}['_sort'](){const _0xcc06ed=Array['from'](this)['sort']((_0xb8ccd9,_0x53e459)=>w(_0xb8ccd9['view']['targetRect'],_0x53e459['view']['targetRect']));for(let _0x3f747c=_0xcc06ed['length']-0x1;_0x3f747c>0x0;_0x3f747c--){const _0x5a88cf=_0xcc06ed[_0x3f747c];_0x3f747c!==this['getIndex'](_0x5a88cf)&&(this['remove'](_0x5a88cf),this['add'](_0x5a88cf));}}['_getOrderInContent'](_0x3effa3){let _0x348986=0x0;if(!_0x3effa3)return this['length'];for(const _0x34ba6c of this){const _0x291512=_0x34ba6c['view']['targetRect'];if(_0x291512){if(w(_0x3effa3,_0x291512)<0x0)return _0x348986;_0x348986++;}}return _0x348986;}}function v({source:_0x4e3ab4,target:_0x531b59,filter:_0x1c7599}){for(const _0x4e6228 of _0x4e3ab4)_0x1c7599(_0x4e6228)&&_0x531b59['add'](_0x4e6228);_0x531b59['listenTo'](_0x4e3ab4,'add',(_0xbfde8f,_0x4d2bf6)=>{_0x1c7599(_0x4d2bf6)&&_0x531b59['add'](_0x4d2bf6);}),_0x531b59['listenTo'](_0x4e3ab4,'remove',(_0x449aa5,_0x16ed83)=>{_0x531b59['has'](_0x16ed83)&&_0x531b59['remove'](_0x16ed83);});}function w(_0x3b72a0,_0x882466){if(null===_0x3b72a0&&null===_0x882466)return 0x0;if(null===_0x3b72a0)return-0x1;if(null===_0x882466)return 0x1;const _0x1e88fb=_0x3b72a0['top']-_0x882466['top'];return 0x0==_0x1e88fb?_0x3b72a0['left']-_0x882466['left']:_0x1e88fb;}class y extends _0x388a6f{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52edd6){if(super(_0x52edd6),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x52edd6 instanceof _0x1961e5){const _0x287bc3=_0x52edd6['locale'];_0x52edd6['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x51eb9c){this['collection']['add'](_0x51eb9c);}['remove'](_0x306991){this['collection']['remove'](_0x306991),_0x306991['destroy']();}['refreshVisibility'](){for(const _0x435f2a of this['collection'])_0x435f2a['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x46c386){return this['collection']['getByInnerView'](_0x46c386);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5245b3 of this['collection'])_0x5245b3['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3b321e){this['fire']('_activateAnnotation',_0x3b321e);}['createAnnotation'](_0x1a104d){return new T(_0x1a104d);}['createAnnotationView'](_0x430d34,_0x58f5c6){return new E(_0x430d34,_0x58f5c6);}['_addActiveAnnotation'](_0x390e08){const _0x17ee57=new Set(this['activeAnnotations']);_0x17ee57['add'](_0x390e08),this['activeAnnotations']=_0x17ee57;}['_removeActiveAnnotation'](_0x290f94){const _0x1ad4f3=new Set(this['activeAnnotations']);_0x1ad4f3['delete'](_0x290f94),this['activeAnnotations']=_0x1ad4f3;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4ea5aa=this['collection'],_0x3c997d=this['_visibleAnnotations'];function _0x3f37d4(_0x253faa){const _0x264dc5=_0x253faa['source'];_0x264dc5['isVisible']&&!_0x3c997d['has'](_0x264dc5)?_0x3c997d['add'](_0x264dc5):!_0x264dc5['isVisible']&&_0x3c997d['has'](_0x264dc5)&&_0x3c997d['remove'](_0x264dc5),_0x264dc5['view']['focusTracker']['remove'](_0x264dc5['view']['element']),_0x264dc5['view']['focusTracker']['add'](_0x264dc5['view']['element']);}this['listenTo'](_0x4ea5aa,'add',(_0x534df1,_0x4b0229)=>{_0x4b0229['isVisible']&&_0x3c997d['add'](_0x4b0229),this['listenTo'](_0x4b0229,'change:isVisible',_0x3f37d4);}),this['listenTo'](_0x4ea5aa,'remove',(_0x49c18d,_0x4a1a68)=>{_0x3c997d['has'](_0x4a1a68)&&_0x3c997d['remove'](_0x4a1a68),this['stopListening'](_0x4a1a68,'change:isVisible',_0x3f37d4);});}['_setupEnterAnnotationKeystroke'](){const _0x4aa855=_0xb36d9d=>{_0xb36d9d['on']('ready',()=>{_0xb36d9d['keystrokes']['set'](_0x258aa7,(_0x41cc99,_0x1dfc75)=>{const _0x3c5db9=_0x3292fb(this['activeAnnotations']['values']());_0x3c5db9&&(_0x3c5db9['view']['focus'](),_0x1dfc75());});});};this['context']instanceof _0x1961e5?_0x4aa855(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xabcaf8,_0x227965)=>{_0x4aa855(_0x227965);});}['_setupEscapeAnnotationHandling'](){const _0x137099=_0x540a2e=>{const _0x5bd156=_0x540a2e['source'],_0x2a7ee9=[];let _0x277ef9;if(Array['isArray'](_0x5bd156['target'])){_0x277ef9=_0x5bd156['target'][0x0],this['context']instanceof _0x1961e5?_0x2a7ee9['push'](this['context']):this['context']['editors']&&_0x2a7ee9['push'](...this['context']['editors']);for(const _0x331135 of _0x2a7ee9)for(const _0x164f6c of _0x331135['editing']['view']['domRoots']['values']())if(_0x164f6c['contains'](_0x277ef9))return void _0x331135['editing']['view']['focus']();_0x277ef9['focus']();}};this['listenTo'](this['collection'],'add',(_0x311d4a,_0x55abd9)=>{this['listenTo'](_0x55abd9,'escape',_0x137099,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2f5e8a,_0x4c8ea9)=>{this['stopListening'](_0x4c8ea9,'escape',_0x137099);});}}const bt=Symbol('noChannel'),Nt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x388a6f{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,pt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x209bc7){super(_0x209bc7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5e865e=this['context']['config'];_0x5e865e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5e865e['define']('comments.maxThreadTotalWeight',0x1f4),_0x5e865e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5e865e['define']('comments.CommentThreadView',Tt),_0x5e865e['define']('comments.CommentView',_t),_0x5e865e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5315ab=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xe4b159,_0x3f767c)=>this['_addCommentThread'](_0x3f767c)),this['on']('submitCommentThread',(_0x4ab146,_0x49293e)=>this['_submitCommentThread'](_0x49293e)),this['on']('resolveCommentThread',(_0x33cd42,_0x5f0325)=>this['_resolveCommentThread'](_0x5f0325)),this['on']('resolveCommentThread',(_0x51d4e7,_0x38c7b5)=>this['_updateActiveAnnotation'](_0x38c7b5),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x362bb4,_0x5382e4)=>this['_reopenCommentThread'](_0x5382e4)),this['on']('reopenCommentThread',(_0x676d0f,_0x7a4779)=>this['_updateActiveAnnotation'](_0x7a4779),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5ed8e7,_0x5909f3)=>this['_removeCommentThread'](_0x5909f3)),this['on']('updateCommentThread',(_0x3f9eb7,_0x4d13f4)=>this['_updateCommentThread'](_0x4d13f4)),this['on']('updateCommentThread',(_0x5ed8f1,_0x306a8f)=>this['_updateActiveAnnotation'](_0x306a8f),{'priority':'lowest'}),this['on']('addComment',(_0x44d7d6,_0x121eb1)=>this['_addComment'](_0x121eb1)),this['on']('updateComment',(_0x46dd74,_0x160196)=>this['_updateComment'](_0x160196)),this['on']('removeComment',(_0x2b2c03,_0x2f7c47)=>this['_removeComment'](_0x2f7c47)),this['on']('addComment',(_0x503c59,{threadId:_0x5d46fa,isFromAdapter:_0x26af0e})=>{if(_0x26af0e)return;const _0x5a81c7=this['getCommentThread'](_0x5d46fa),_0x389b50=_0x5a81c7&&this['_threadToController']['get'](_0x5a81c7);_0x389b50&&_0x389b50['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5315ab,'change:activeAnnotations',(_0x48a95d,_0x4013ae,_0x5d9a03)=>{const _0x3c7a1f=Array['from'](_0x5d9a03)['map'](_0x11f12a=>this['_viewToController']['get'](_0x11f12a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3c7a1f?_0x3c7a1f['model']:null;});}set['adapter'](_0x4a9237){if(this['_adapter'])throw new _0x274fd1('commentsrepository-adapter-already-set');this['_adapter']=_0x4a9237;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2243ef=bt,threadId:_0x1beee7=_0x3b880e(),comments:_0x2d2a0f=[],unlinkedAt:_0x126a48=null,resolvedAt:_0x52d27c=null,resolvedBy:_0x251138=null,target:_0x548a4a=null,context:_0xfff122=null,attributes:_0x263be8={},isResolvable:_0xedbf24=!0x0,isSubmitted:_0x1e1565=!0x1,isFromAdapter:_0x50503e=!0x1}={}){return this['fire'](xt('addCommentThread',_0x2243ef),{'channelId':_0x2243ef,'threadId':_0x1beee7,'comments':_0x2d2a0f,'unlinkedAt':_0x126a48,'resolvedAt':_0x52d27c,'resolvedBy':_0x251138,'target':_0x548a4a,'context':_0xfff122,'attributes':_0x263be8,'isFromAdapter':_0x50503e,'isResolvable':_0xedbf24,'isSubmitted':_0x1e1565}),this['getCommentThread'](_0x1beee7);}['openNewCommentThread']({channelId:_0x49f218=bt,threadId:_0x5ee0e2=_0x3b880e(),target:_0x4421e6,context:_0x55b487=null,isResolvable:_0x5e18c8=!0x0}){if(this['_readOnlyChannels']['has'](_0x49f218)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4421e6)throw new _0x274fd1('commentsrepository-missing-target');const _0x1b9cb5=this['addCommentThread']({'channelId':_0x49f218,'threadId':_0x5ee0e2,'target':_0x4421e6,'context':_0x55b487,'isResolvable':_0x5e18c8});if(!_0x1b9cb5)return null;const _0x651ee3=this['_threadToController']['get'](_0x1b9cb5),_0x2273ec=_0x651ee3['view']['commentThreadInputView']['commentInputView'],_0x1ce22b=this['context']['plugins']['get'](y),_0x372324=_0x1ce22b['getByInnerView'](_0x651ee3['view']);return _0x1ce22b['activate'](_0x372324),_0x2273ec['once']('editorReady',()=>_0x2273ec['focus']()),_0x1b9cb5;}['hasCommentThread'](_0x1c4bb3){if('string'!=typeof _0x1c4bb3)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1c4bb3);}['updateCommentThread']({channelId:_0x4ea232=bt,threadId:_0x3ee8a4,context:_0x19e8d1,unlinkedAt:_0xba49ca,attributes:_0x176edc,isFromAdapter:_0x5e8615=!0x1}){return this['fire'](xt('updateCommentThread',_0x4ea232),{'channelId':_0x4ea232,'threadId':_0x3ee8a4,'context':_0x19e8d1,'unlinkedAt':_0xba49ca,'attributes':_0x176edc,'isFromAdapter':_0x5e8615}),this['getCommentThread'](_0x3ee8a4);}['getCommentThread'](_0x603aad){if('string'!=typeof _0x603aad)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x603aad);}['fetchCommentThread']({channelId:_0x332692,threadId:_0x5dea16}={}){const _0x2fe73c=this['getCommentThread'](_0x5dea16);if(_0x2fe73c)return Promise['resolve'](_0x2fe73c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x274fd1('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x332692,'threadId':_0x5dea16})['then'](_0x490632=>this['hasCommentThread'](_0x5dea16)?this['getCommentThread'](_0x5dea16):_0x490632?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x332692},_0x490632)):void 0x0)['catch'](_0x3d2ec1=>{throw console['error'](_0x3d2ec1),new _0x274fd1('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x42947b,skipNotAttached:_0x56f7e3=!0x1,skipEmpty:_0x22fb5a=!0x1,toJSON:_0x994181=!0x1}={}){const _0x3acc81=[];for(const _0x529aad of this['_threads']['values']())_0x42947b&&_0x529aad['channelId']!==_0x42947b||_0x56f7e3&&!_0x529aad['isAttached']||_0x22fb5a&&0x0===_0x529aad['length']||_0x3acc81['push'](_0x529aad);return _0x994181?_0x3acc81['map'](_0x2dceca=>_0x2dceca['toJSON']()):_0x3acc81;}['getAnnotationForCommentThread'](_0x59c778){const _0x1623ef=this['_threadToController']['get'](_0x59c778);if(!_0x1623ef)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1623ef['view'])||null;}['getCommentThreadForAnnotation'](_0x3404e9){const _0x18e417=this['_viewToController']['get'](_0x3404e9['innerView']);return _0x18e417?_0x18e417['model']:null;}['setActiveCommentThread'](_0x5f1da5){const _0x42c3cd=this['context']['plugins']['get'](y);if(!_0x5f1da5)return void(this['activeCommentThread']&&_0x42c3cd['deactivateAll']());const _0x526130=this['getCommentThread'](_0x5f1da5);if(!_0x526130)throw new _0x274fd1('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5f1da5});if(!this['_threadToController']['has'](_0x526130))throw new _0x274fd1('commentsrepository-active-not-attached',null,{'threadId':_0x5f1da5});const _0x51fbf3=_0x42c3cd['getByInnerView'](this['_threadToController']['get'](_0x526130)['view']);_0x42c3cd['activate'](_0x51fbf3);}['switchReadOnly'](_0x492294,_0x2510e4){_0x492294?this['_readOnlyChannels']['add'](_0x2510e4):this['_readOnlyChannels']['delete'](_0x2510e4),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x43da71){return this['_readOnlyChannels']['has'](_0x43da71)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2527d1,_0xf291f0){return new gt(_0x2527d1,_0xf291f0);}['setPermissions'](_0x23bc48,_0xc2de48=bt){this['_permissions']['set'](_0xc2de48,_0x23bc48),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5d91a0=bt){return this['_permissions']['has'](_0x5d91a0)?this['_permissions']['get'](_0x5d91a0):Nt;}['_addCommentThread']({channelId:_0x1f0a80,threadId:_0x210660,comments:_0x136c36,unlinkedAt:_0x21771e,resolvedAt:_0x18a09f,resolvedBy:_0x43b5a1,target:_0x4eaf5b,context:_0x512e8d,attributes:_0x1b5a64,isFromAdapter:_0x2f90ae,isResolvable:_0xe244c9,isSubmitted:_0x1ec0a2}){if('string'!=typeof _0x210660)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x210660});if(this['hasCommentThread'](_0x210660))throw new _0x274fd1('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x210660});const _0xf1ac9a=new pi(this,{'channelId':_0x1f0a80,'id':_0x210660,'context':_0x512e8d,'attributes':_0x1b5a64,'unlinkedAt':_0x21771e,'resolvedAt':_0x18a09f,'resolvedBy':_0x43b5a1?this['context']['plugins']['get'](st)['getUser'](_0x43b5a1):null,'isResolvable':_0xe244c9,'isSubmitted':_0x1ec0a2||_0x2f90ae});this['_threads']['set'](_0x210660,_0xf1ac9a);for(const _0x3bf860 of _0x136c36)_0xf1ac9a['_add'](this['_createNewComment']({'threadId':_0x210660,..._0x3bf860}));return _0x4eaf5b&&_0xf1ac9a['attachTo'](_0x4eaf5b),_0x2f90ae||!_0xf1ac9a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1f0a80,'threadId':_0x210660});}['_submitCommentThread']({channelId:_0x44551f,threadId:_0x4bd4cd}){if(!this['hasCommentThread'](_0x4bd4cd))throw new _0x274fd1('commentsrepository-missing-comment-thread',this);const _0x8340af=this['getCommentThread'](_0x4bd4cd);if(_0x8340af['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x16b55e,comments:_0x1a9f00,resolvedAt:_0x13e11a,resolvedBy:_0x43cce4,context:_0x188ec7,attributes:_0x48000e}=_0x8340af,_0x46ba16=this['context']['plugins']['get']('PendingActions'),_0x414b61=_0x46ba16['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x44551f,'threadId':_0x16b55e,'comments':_0x1a9f00['map'](_0x282118=>_0x282118['toJSON']()),'resolvedAt':_0x13e11a,'resolvedBy':_0x43cce4?_0x43cce4['id']:_0x43cce4,'context':_0x188ec7,'attributes':_0x48000e})['then'](({comments:_0x462a31})=>{_0x46ba16['remove'](_0x414b61);for(const _0x943d85 of _0x462a31)this['_updateComment']({'channelId':_0x44551f,'threadId':_0x4bd4cd,'commentId':_0x943d85['commentId'],'createdAt':_0x943d85['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x34de38=>{throw console['error'](_0x34de38),new _0x274fd1('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x969f78,target:_0x39a548}){const _0x5719b4=this['getCommentThread'](_0x969f78);if(!_0x5719b4)throw new _0x274fd1('commentsrepository-attach-missing-comment-thread',this);const _0x30f090=this['context']['plugins']['get']('PendingActions'),_0x48f48d=this['context']['plugins']['get'](y),_0x451997=this['_createCommentThreadView'](_0x5719b4),_0x404b6b=new gt(_0x5719b4,_0x451997);let _0x217bbf=null;_0x451997['on']('change:isDirty',(_0xb21d43,_0xdb479e,_0x30db22)=>{_0x30db22?_0x217bbf=_0x30f090['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x217bbf&&(_0x30f090['remove'](_0x217bbf),_0x217bbf=null);}),this['_threadToController']['set'](_0x5719b4,_0x404b6b),this['_viewToController']['set'](_0x451997,_0x404b6b);const _0x4122a6=new E(this['context']['locale'],_0x451997);_0x4122a6['bind']('length')['to'](_0x451997),_0x4122a6['bind']('isDirty')['to'](_0x451997,'isDirty',_0x451997,'length',(_0x23ed63,_0x235e66)=>_0x23ed63||!_0x235e66),_0x4122a6['bind']('isActive')['to'](_0x451997),_0x4122a6['type']='comment';const _0x295f8a=new T({'view':_0x4122a6,'target':_0x39a548,'type':'comment','isVisible':!_0x5719b4['archivedAt']&&!!('function'==typeof _0x39a548?_0x39a548():_0x39a548)});return _0x451997['on']('escape',()=>{_0x295f8a['fire']('escape');}),this['_bindAnnotationToEditors'](_0x451997,_0x295f8a),_0x48f48d['add'](_0x295f8a),_0x295f8a;}['_bindAnnotationToEditors'](_0x1f20da,_0x5478a7){this['listenTo'](_0x1f20da,'editorReady',(_0x21c564,_0x44c4da)=>{const _0x54b20f=_0x44c4da['ui']['view']['body']['bodyCollectionContainer'];_0x5478a7['focusableElements']['add'](_0x54b20f),this['context']instanceof _0x1961e5&&this['context']['ui']['focusTracker']['add'](_0x54b20f);},{'priority':'highest'}),this['listenTo'](_0x1f20da,'editorDestroyed',(_0x133679,_0x371d85)=>{const _0x1336e9=_0x371d85['ui']['view']['body']['bodyCollectionContainer'];_0x5478a7['focusableElements']['has'](_0x1336e9)&&_0x5478a7['focusableElements']['remove'](_0x1336e9),this['context']instanceof _0x1961e5&&this['context']['ui']['focusTracker']['remove'](_0x1336e9);});}['_unbindEditors'](_0x8810ef){this['stopListening'](_0x8810ef,'editorReady'),this['stopListening'](_0x8810ef,'editorDestroyed');}['_createCommentThreadView'](_0x492467){const _0x489339=this['context']['plugins']['get'](st),{config:_0x375e03,locale:_0x2cf684}=this['context'],_0x1fdc78=It(_0x375e03['get']('locale'),_0x2cf684);return new(0x0,(_0x375e03['get']('comments'))['CommentThreadView'])(_0x2cf684,_0x492467,_0x489339['me'],{'editorConfig':{..._0x375e03['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x375e03['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x375e03['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x375e03['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x375e03['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1fdc78,'CommentView':_0x375e03['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x427518,channelId:_0x1679c8,resolvedAt:_0x4e20e3,resolvedBy:_0x4e5515,isFromAdapter:_0x422c3a}){if(!this['hasCommentThread'](_0x427518))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x427518});const _0x4670e1=this['getCommentThread'](_0x427518);if(_0x4670e1['isResolved'])throw new _0x274fd1('commentsrepository-resolved-comment-thread',null,{'threadId':_0x427518});const _0x4d71b4=this['context']['plugins']['get'](st);if(_0x4670e1['resolvedBy']=_0x4d71b4['getUser'](_0x4e5515),_0x4670e1['resolvedAt']=_0x4e20e3,_0x422c3a||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x141ee6=this['context']['plugins']['get']('PendingActions'),_0x60249e=_0x141ee6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1679c8,'threadId':_0x427518})['then'](({resolvedAt:_0x11a9e2,resolvedBy:_0x39a156})=>{_0x141ee6['remove'](_0x60249e),_0x4670e1['resolvedBy']['id']!==_0x39a156&&(_0x4670e1['resolvedBy']=_0x4d71b4['getUser'](_0x39a156)),_0x4670e1['resolvedAt']=_0x11a9e2;})['catch'](_0x4ba815=>{throw console['error'](_0x4ba815),new _0x274fd1('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1d7b29,channelId:_0x3929f6,isFromAdapter:_0x4a2189}){if(!this['hasCommentThread'](_0x1d7b29))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d7b29});const _0x178239=this['getCommentThread'](_0x1d7b29);if(!_0x178239['isResolved'])throw new _0x274fd1('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1d7b29});if(_0x178239['resolvedBy']=null,_0x178239['resolvedAt']=null,_0x4a2189||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xc7ab59=this['context']['plugins']['get']('PendingActions'),_0x453881=_0xc7ab59['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3929f6,'threadId':_0x1d7b29})['then'](()=>_0xc7ab59['remove'](_0x453881))['catch'](_0x1f6608=>{throw console['error'](_0x1f6608),new _0x274fd1('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4db91d,isFromAdapter:_0x297702}){const _0x13acfc=this['getCommentThread'](_0x4db91d);if(!_0x13acfc)throw new _0x274fd1('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4db91d),this['_threads']['delete'](_0x4db91d),!_0x13acfc['isSubmitted']||_0x297702||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xbc51a3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23fa65}=_0x13acfc,_0x5db7a1=_0xbc51a3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x23fa65,'threadId':_0x4db91d})['then'](()=>_0xbc51a3['remove'](_0x5db7a1))['catch'](_0x79b303=>{throw console['error'](_0x79b303),new _0x274fd1('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x25cc24,unlinkedAt:_0x5cfe50,context:_0x2934b8,attributes:_0x28c5ca,isFromAdapter:_0x19c8fd}){if('string'!=typeof _0x25cc24)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x25cc24});if(!this['hasCommentThread'](_0x25cc24))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x25cc24});const _0x20a0e7=this['getCommentThread'](_0x25cc24);let _0x16a2e8=!0x1;if(void 0x0!==_0x2934b8&&_0x20a0e7['context']!==_0x2934b8&&(_0x20a0e7['context']=_0x2934b8,_0x16a2e8=!0x0),void 0x0!==_0x5cfe50&&_0x20a0e7['unlinkedAt']!==_0x5cfe50&&(_0x20a0e7['unlinkedAt']=_0x5cfe50,_0x16a2e8=!0x0),_0x28c5ca&&!yt(_0x28c5ca,_0x20a0e7['attributes'])&&(_0x20a0e7['attributes']=_0x28c5ca,_0x16a2e8=!0x0),!_0x16a2e8)return Promise['resolve']();if(!_0x20a0e7['isSubmitted']||_0x19c8fd||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x44ca48=this['context']['plugins']['get']('PendingActions'),{channelId:_0xf3833f}=_0x20a0e7,_0x4a4996=_0x44ca48['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xf3833f,'threadId':_0x25cc24,'context':_0x2934b8,'unlinkedAt':_0x5cfe50,'attributes':_0x28c5ca})['then'](()=>_0x44ca48['remove'](_0x4a4996))['catch'](_0x581872=>{throw console['error'](_0x581872),new _0x274fd1('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x29eded){const _0x307a6b=this['context']['plugins']['get'](y),_0x4576c2=this['getCommentThread'](_0x29eded);if(_0x4576c2['_isAttached']=!0x1,this['_threadToController']['has'](_0x4576c2)){const _0x3ebc48=this['_threadToController']['get'](_0x4576c2),_0x923687=_0x3ebc48['view'],_0x15eaa8=_0x307a6b['getByInnerView'](_0x923687);this['_threadToController']['delete'](_0x4576c2),this['_viewToController']['delete'](_0x923687),_0x15eaa8&&_0x307a6b['remove'](_0x15eaa8),_0x3ebc48['destroy'](),_0x923687['destroy']()['then'](()=>{this['_unbindEditors'](_0x923687);});}}['_updateActiveAnnotation']({threadId:_0x12a453,resolvedAt:_0x303d07,unlinkedAt:_0x2dcf2d}){const _0x2a6c34=!!_0x303d07,_0x9080ff=this['context']['plugins']['get'](y),_0x5309ee=this['getCommentThread'](_0x12a453);if(this['_threadToController']['has'](_0x5309ee)){const _0x52cb41=this['_threadToController']['get'](_0x5309ee)['view'],_0x2b5731=_0x9080ff['getByInnerView'](_0x52cb41);_0x2b5731&&(_0x2a6c34&&_0x9080ff['_removeActiveAnnotation'](_0x2b5731),_0x2dcf2d?_0x2b5731['isVisible']=!0x1:_0x2b5731['refreshVisibility']());}}['_getExternalAuthor'](_0x537b6f){const _0x18c452=this['context']['plugins']['get'](st),_0x308ccf=wt('external:'+_0x537b6f),_0x8aec43=_0x18c452['getUser'](_0x308ccf);return _0x8aec43||_0x18c452['addUser']({'id':_0x308ccf,'name':_0x537b6f});}['_createNewComment']({threadId:_0x351faa,commentId:_0x384f7b=_0x3b880e(),content:_0x5d303e,authorId:_0x1962a8,createdAt:_0x492044,attributes:_0x8ce13d}){if('string'!=typeof _0x384f7b)throw new _0x274fd1('commentsrepository-invalid-commentid');if('string'!=typeof _0x1962a8)throw new _0x274fd1('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5d303e||!_0x5d303e['trim']())throw new _0x274fd1('commentsrepository-invalid-comment-content');const _0x3f68d1=this['context']['plugins']['get'](st)['getUser'](_0x1962a8);if(!_0x3f68d1)throw new _0x274fd1('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1962a8});let _0x1ed260=null,_0x554657=_0x492044;return _0x8ce13d?.['@external']&&(_0x1ed260=this['_getExternalAuthor'](_0x8ce13d['@external']['authorName']),_0x554657=new Date(_0x8ce13d['@external']['createdAt'])),new wi(this,{'threadId':_0x351faa,'id':_0x384f7b,'author':_0x1ed260||_0x3f68d1,'creator':_0x3f68d1,'content':_0x5d303e,'createdAt':_0x492044,'authoredAt':_0x554657,'attributes':_0x8ce13d});}['_addComment'](_0x395ca1){let {threadId:_0x27338c,content:_0x379860,attributes:_0x32ad6b,isFromAdapter:_0x4a99c7}=_0x395ca1;const _0x527f65=this['getCommentThread'](_0x395ca1['threadId']);if(!_0x527f65)throw new _0x274fd1('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4f7a71=this['_createNewComment'](_0x395ca1),{id:_0x1ae04c}=_0x4f7a71;if(_0x527f65['_add'](_0x4f7a71),_0x4a99c7||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x527f65['isSubmitted'])return Promise['resolve']();const _0x26e614=this['context']['plugins']['get']('PendingActions'),{channelId:_0xaed131}=_0x527f65,_0x506a84=_0x26e614['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x32ad6b||(_0x32ad6b={}),this['adapter']['addComment']({'channelId':_0xaed131,'threadId':_0x27338c,'commentId':_0x1ae04c,'content':_0x379860,'attributes':_0x32ad6b})['then'](_0x4dce0a=>{_0x26e614['remove'](_0x506a84),_0x4dce0a&&this['_updateComment']({'channelId':_0xaed131,'threadId':_0x27338c,'commentId':_0x1ae04c,'createdAt':_0x4dce0a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x296976=>{throw console['error'](_0x296976),new _0x274fd1('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3d7e5a,commentId:_0x433d15,content:_0x319c31,createdAt:_0x27eee7,attributes:_0x2e89d5,isFromAdapter:_0x2b9baa}){if(void 0x0!==_0x319c31&&('string'!=typeof _0x319c31||!_0x319c31['trim']()['length']))throw new _0x274fd1('commentsrepository-update-comment-invalid-content');const _0x37880a=this['getCommentThread'](_0x3d7e5a),_0x5d63e9=_0x37880a['getComment'](_0x433d15);if(!_0x5d63e9)throw new _0x274fd1('commentsrepository-update-missing-comment',this);let _0x5d0203=!0x1;if(_0x319c31&&_0x319c31!==_0x5d63e9['content']&&(_0x5d63e9['isEditable']||_0x2b9baa)&&(_0x5d63e9['content']=_0x319c31,_0x5d0203=!0x0),_0x27eee7&&_0x27eee7!==_0x5d63e9['createdAt']&&(_0x5d63e9['createdAt']=_0x27eee7,_0x5d63e9['attributes']&&_0x5d63e9['attributes']['@external']||(_0x5d63e9['authoredAt']=_0x27eee7),_0x5d0203=!0x0),_0x2e89d5&&!yt(_0x2e89d5,_0x5d63e9['attributes'])&&(_0x5d63e9['attributes']=_0x2e89d5,_0x5d0203=!0x0),!_0x5d0203)return Promise['resolve']();if(_0x37880a['fire']('commentUpdated'),_0x2b9baa||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xd498d8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5d1cd0}=this['getCommentThread'](_0x5d63e9['threadId']),_0x49e1de=_0xd498d8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5d1cd0,'threadId':_0x3d7e5a,'commentId':_0x433d15,'content':_0x319c31,'attributes':_0x2e89d5})['then'](()=>_0xd498d8['remove'](_0x49e1de))['catch'](_0x345feb=>{throw console['error'](_0x345feb),new _0x274fd1('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xf3eab6,commentId:_0x57b6bc,isFromAdapter:_0xc8952f}){const _0x348ee7=this['getCommentThread'](_0xf3eab6),_0x37ae44=_0x348ee7['getComment'](_0x57b6bc);if(!_0x37ae44)throw new _0x274fd1('commentsrepository-remove-missing-comment',this);if(_0x348ee7['_remove'](_0x37ae44),_0xc8952f||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x32862a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x35634b}=_0x348ee7,_0x500bd2=_0x32862a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x35634b,'threadId':_0xf3eab6,'commentId':_0x57b6bc})['then'](()=>_0x32862a['remove'](_0x500bd2))['catch'](_0x1a4165=>{throw console['error'](_0x1a4165),new _0x274fd1('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3538ec(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5c9f27,_0x55beb0){super();const _0x12dca8=_0x55beb0['isResolvable'];this['channelId']=_0x55beb0['channelId'],this['id']=_0x55beb0['id'],this['comments']=new _0x504ada(),this['_repository']=_0x5c9f27,this['_isAttached']=!0x1,this['_isSubmitted']=_0x55beb0['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5c9f27,'_permissions',_0x5c9f27,'_readOnlyChannels',()=>_0x5c9f27['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5c9f27,'_permissions',()=>_0x5c9f27['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5c9f27,'_permissions',()=>{const _0x35ca1a=_0x5c9f27['getPermissions'](this['channelId']);return _0x35ca1a['write']||_0x35ca1a['admin'];}),this['bind']('isResolvable')['to'](_0x5c9f27,'_permissions',()=>_0x12dca8&&_0x5c9f27['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x55beb0['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xb7af55,_0x37c013)=>_0xb7af55?_0x37c013?_0xb7af55<_0x37c013?_0xb7af55:_0x37c013:_0xb7af55:_0x37c013),this['set']('unlinkedAt',_0x55beb0['unlinkedAt']||null),this['set']('resolvedAt',_0x55beb0['resolvedAt']||null),this['set']('resolvedBy',_0x55beb0['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x33d9a8=>!!_0x33d9a8),this['set']('attributes',_0x55beb0['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3b67a7,_0x1826df)=>_0x3b67a7+_0x1826df['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2618b4,id:_0x5790ff}=this;this['_repository']['fire'](xt('submitCommentThread',_0x2618b4),{'channelId':_0x2618b4,'threadId':_0x5790ff});}['setUnlinkedAt'](_0x2e155e){this['_update']({'unlinkedAt':_0x2e155e});}['resolve']({resolvedAt:_0x294587=new Date(),resolvedBy:_0x57d9b1=null,isFromAdapter:_0x3f12f5=!0x1}={}){const _0x39ae0b=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x67b10b,id:_0x4dc3cb}=this;this['_repository']['fire'](xt('resolveCommentThread',_0x67b10b),{'channelId':_0x67b10b,'threadId':_0x4dc3cb,'resolvedAt':_0x294587,'resolvedBy':_0x57d9b1||_0x39ae0b['id'],'isFromAdapter':_0x3f12f5});}['reopen']({isFromAdapter:_0x430741=!0x1}={}){const {channelId:_0x289696,id:_0x5bb820}=this;this['_repository']['fire'](xt('reopenCommentThread',_0x289696),{'channelId':_0x289696,'threadId':_0x5bb820,'isFromAdapter':_0x430741});}['setContext'](_0x170491){this['context']||this['_update']({'context':_0x170491});}['setAttribute'](_0x4312cb,_0x2e9709){const _0x1ba3bb=At(this['attributes']);Ct(_0x1ba3bb,_0x4312cb,_0x2e9709),this['_update']({'attributes':_0x1ba3bb});}['removeAttribute'](_0x2f53e0){const _0x2e7644=At(this['attributes']);vt(_0x2e7644,_0x2f53e0),this['_update']({'attributes':_0x2e7644});}['remove']({isFromAdapter:_0x35eb4d=!0x1}={}){const {channelId:_0x25d061,id:_0xf3d81a}=this;this['_repository']['fire'](xt('removeCommentThread',_0x25d061),{'channelId':_0x25d061,'threadId':_0xf3d81a,'isFromAdapter':_0x35eb4d});}['attachTo'](_0x37d4c1){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x37d4c1});}['addComment'](_0xc5e775){const {channelId:_0x15aa01,id:_0x5c2ac5}=this;this['_repository']['fire'](xt('addComment',_0x15aa01,_0x5c2ac5),Object['assign']({'channelId':_0x15aa01,'threadId':_0x5c2ac5},_0xc5e775));}['getComment'](_0x132c07){if('string'!=typeof _0x132c07)throw new _0x274fd1('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x132c07});return this['comments']['get'](_0x132c07);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x44afee=>_0x44afee['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3689cb){return this['listenTo'](_0x3689cb,'change:authoredAt',()=>{const _0x1dbb5a=this['_findOptimalIndex'](_0x3689cb),_0xa0636c=this['comments'];_0x1dbb5a-0x1!=_0xa0636c['getIndex'](_0x3689cb)&&_0x1dbb5a+0x1!=_0xa0636c['getIndex'](_0x3689cb)&&(this['_remove'](_0x3689cb),this['_add'](_0x3689cb));}),this['comments']['add'](_0x3689cb,this['_findOptimalIndex'](_0x3689cb));}['_update'](_0x583379){const {channelId:_0x52c736,id:_0x3f2298}=this;this['_repository']['fire'](xt('updateCommentThread',_0x52c736),{..._0x583379,'channelId':_0x52c736,'threadId':_0x3f2298});}['_remove'](_0x51a4fa){return this['stopListening'](_0x51a4fa),_0x51a4fa['destroy'](),this['comments']['remove'](_0x51a4fa);}['_findOptimalIndex'](_0x580382){const _0x444c69=this['comments']['find'](_0x48254b=>new Date(_0x48254b['authoredAt'])['getTime']()>new Date(_0x580382['authoredAt'])['getTime']());return _0x444c69?this['comments']['getIndex'](_0x444c69):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3538ec(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2609f8,_0x936c52){super();const _0x123c42=_0x2609f8['context']['plugins']['get'](st)['me'],_0x335071=_0x2609f8['getCommentThread'](_0x936c52['threadId']),_0x45f291=0x0===_0x335071['comments']['length'],_0x5e238e=_0x123c42===_0x936c52['author'];this['id']=_0x936c52['id'],this['threadId']=_0x936c52['threadId'],this['author']=_0x936c52['author'],this['creator']=_0x936c52['creator'],this['isExternal']=Boolean(_0x936c52['attributes']&&_0x936c52['attributes']['@external']),this['set']('content',_0x936c52['content']),this['createdAt']=_0x936c52['createdAt']||new Date(),this['set']('authoredAt',_0x936c52['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x335071,'resolvedAt'),this['set']('attributes',_0x936c52['attributes']||{}),this['bind']('isEditable')['to'](_0x2609f8,'_permissions',()=>{const _0x529aea=_0x2609f8['getPermissions'](_0x335071['channelId'])['write'],_0x121628=_0x2609f8['getPermissions'](_0x335071['channelId'])['modifyAll'];return _0x5e238e&&_0x529aea||!_0x5e238e&&_0x121628;}),this['bind']('isRemovable')['to'](_0x335071,'isRemovable',_0x2609f8,'_permissions',_0x364da1=>{const _0x54d9d4=_0x2609f8['getPermissions'](_0x335071['channelId'])['write'],_0x21319e=_0x2609f8['getPermissions'](_0x335071['channelId'])['modifyAll'];return _0x5e238e&&_0x54d9d4||_0x364da1&&_0x45f291||!_0x5e238e&&_0x21319e&&!_0x45f291;}),this['bind']('isReadOnly')['to'](_0x335071,'isReadOnly'),this['_repository']=_0x2609f8;}get['weight'](){return Math['max'](function(_0x35d740){const _0x128ef8=document['createElement']('div');return _0x128ef8['innerHTML']=_0x35d740,_0x128ef8['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1b0b0b){const {threadId:_0x32d3df,id:_0x53eea0}=this;if(!this['_repository']['hasCommentThread'](_0x32d3df))throw new _0x274fd1('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4ac6d3}=this['_repository']['getCommentThread'](_0x32d3df);this['_repository']['fire'](xt('updateComment',_0x4ac6d3,_0x32d3df),{'channelId':_0x4ac6d3,'threadId':_0x32d3df,'commentId':_0x53eea0,..._0x1b0b0b});}['setAttribute'](_0x1648d0,_0x31cafd){const _0x4f4dbe=At(this['attributes']);Ct(_0x4f4dbe,_0x1648d0,_0x31cafd),this['update']({'attributes':_0x4f4dbe});}['removeAttribute'](_0x2c3a94){const _0x446f9d=At(this['attributes']);vt(_0x446f9d,_0x2c3a94),this['update']({'attributes':_0x446f9d});}['remove'](_0x5e8416={}){if(!_0x5e8416['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x242d78,id:_0x268fa0}=this;if(!this['_repository']['hasCommentThread'](_0x242d78))throw new _0x274fd1('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x35f610}=this['_repository']['getCommentThread'](_0x242d78);this['_repository']['fire'](xt('removeComment',_0x35f610,_0x242d78),{'channelId':_0x35f610,'threadId':_0x242d78,'commentId':_0x268fa0,..._0x5e8416});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x192832,..._0x5ec929){for(const _0x17a8e1 of _0x5ec929)void 0x0!==_0x17a8e1&&(_0x192832+=':'+String(_0x17a8e1));return _0x192832;}class rt extends _0x406027{constructor(_0xd5f856){super(_0xd5f856),this['set']('hasContent',!0x1);}['refresh'](){const _0x3b6648=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5426fe of _0x3b6648['getRanges']())if(this['_hasContent'](_0x5426fe))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x351581=_0x3b880e(),ranges:_0x17ce6f,comment:_0x4d386b}={}){const _0x1f4e3e=this['editor']['model'],_0x323f42=_0x17ce6f??Array['from'](_0x1f4e3e['document']['selection']['getRanges']()),_0x1dbdb1=[];for(const _0x44e9d3 of _0x323f42)this['_hasContent'](_0x44e9d3)&&_0x1dbdb1['push'](this['_trimToContent'](_0x44e9d3));if(!_0x1dbdb1['length'])throw new _0x274fd1('addcommentthreadcommand-incorrect-ranges',null);_0x4d386b&&this['_createCommentThread'](_0x351581,_0x4d386b),this['_createMarkersFromRanges'](_0x351581,_0x1dbdb1,!!_0x4d386b);}['_createMarkersFromRanges'](_0x4117f6,_0x443fe1,_0x5d720a){this['editor']['model']['change'](_0x51db30=>{for(const _0x32b6ed of _0x443fe1){const _0xb0dc6c=_0x3b880e()['substr'](0x1,0x5),_0x2dc69b='comment:'+_0x4117f6+':'+_0xb0dc6c;_0x51db30['addMarker'](_0x2dc69b,{'range':_0x32b6ed,'usingOperation':_0x5d720a,'affectsData':_0x5d720a});}});}['_createCommentThread'](_0x351010,_0x381654){const _0x16bd46=this['editor']['plugins']['get']('CommentsRepository'),_0x57ed09=this['editor']['config']['get']('collaboration.channelId'),_0x66929e=this['editor']['plugins']['get']('Users')['me'];if(!_0x66929e)throw new _0x274fd1('addcommentthreadcommand-user-not-found',null);_0x16bd46['addCommentThread']({'threadId':_0x351010,'channelId':_0x57ed09,'comments':[{'authorId':_0x66929e['id'],'content':_0x381654,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x31b3bf){for(const _0x25241a of _0x31b3bf['getItems']())if(this['_itemIsContent'](_0x25241a))return!0x0;return!0x1;}['_itemIsContent'](_0x1f3943){return _0x1f3943['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1f3943)&&!_0x1f3943['is']('element','tableCell');}['_trimToContent'](_0x41e642){const _0x58591e=_0x21c956=>!this['_itemIsContent'](_0x21c956['item']),_0xa54c61=_0x41e642['start']['getLastMatchingPosition'](_0x58591e),_0x260909=_0x41e642['end']['getLastMatchingPosition'](_0x58591e,{'direction':'backward'});return this['editor']['model']['createRange'](_0xa54c61,_0x260909);}}class b extends _0x35651a{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbf3c5e){super(_0xbf3c5e),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x35abdc=this['editor'],_0x121596=_0x35abdc['model']['document']['selection'],_0x4fe9ee=_0x12b399(()=>this['refreshSelectedViews'](),0xa);_0x121596['on']('change:range',(_0x32892f,_0x54d8ea)=>{_0x54d8ea['directChange']&&(_0x4fe9ee['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x35abdc['editing']['view']['document'],'change:isFocused',(_0x2c6e88,_0x4d0677,_0x5f9bfa)=>{_0x5f9bfa&&_0x4fe9ee();}),this['listenTo'](_0x35abdc['ui']['focusTracker'],'change:isFocused',(_0x225487,_0x230c34,_0x35ad96)=>{_0x35ad96||this['fire']('blur',{'isAnnotationTracked':_0x313e2d=>this['_editorAnnotationsData']['has'](_0x313e2d['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1a8fb9){if(this['_editorAnnotations']['has'](_0x1a8fb9['view']))return;this['_editorAnnotations']['add'](_0x1a8fb9['view']),this['editor']['ui']['focusTracker']['add'](_0x1a8fb9['view']['element']);const _0x535da8=this['editor']['plugins']['get'](y);this['listenTo'](_0x535da8['collection'],'remove',(_0xa9a6a6,_0x59ab9d)=>{this['editor']['ui']['focusTracker']['remove'](_0x59ab9d['view']['element']),this['_editorAnnotations']['delete'](_0x59ab9d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2d885e){if('function'!=typeof _0x2d885e)throw new _0x274fd1('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2d885e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x39a5a9,annotations:_0x3ea183}){const _0x2ee20b=[],_0x5425c5=this['editor']['model']['document']['selection'],_0x4ff4b0=Array['from'](_0x5425c5['getRanges']());for(const [_0x4736c5,_0x55c670]of this['_editorAnnotationsData']){const _0x51bfe3=_0x58333c(_0x55c670),_0x509240=_0x3ea183['getByInnerView'](_0x4736c5);_0x51bfe3&&_0x509240&&_0x2ee20b['push']({'annotation':_0x509240,'range':_0x51bfe3});}function _0x58333c(_0xcae89){for(const _0x20aadc of _0xcae89)for(const _0x1058c1 of _0x4ff4b0)if(_0x20aadc['containsRange'](_0x1058c1,!_0x5425c5['isCollapsed']))return _0x20aadc;return null;}return _0x2ee20b['sort']((_0x47950f,_0x3af7e3)=>{const _0x2e6939=_0x47950f['range'],_0x59266c=_0x3af7e3['range'];if(!_0x2e6939['isEqual'](_0x59266c)){if(_0x2e6939['containsRange'](_0x59266c,!0x0))return 0x1;if(_0x59266c['containsRange'](_0x2e6939,!0x0))return-0x1;}return _0x47950f['annotation']==_0x39a5a9?-0x1:_0x3af7e3['annotation']==_0x39a5a9?0x1:0x0;})['map'](_0x1c953f=>_0x1c953f['annotation']);}get['_editorAnnotationsData'](){const _0x3fc65b=new Map();for(const _0xe2e394 of Array['from'](this['_dataCollectors']))for(const [_0x2c0740,_0x2cbdad]of _0xe2e394())_0x3fc65b['set'](_0x2c0740,_0x2cbdad);return _0x3fc65b;}}class ct extends _0x35651a{['afterInit'](){const _0x424d05=this['editor'];if(!_0x424d05['plugins']['has']('RestrictedEditingModeEditing'))return;_0x424d05['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x35651a{constructor(_0x3bfb2e){super(_0x3bfb2e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2edc4c=this['editor'],_0x2130eb=_0x2edc4c['commands']['get']('importWord'),_0x564f0f=_0x2edc4c['plugins']['get'](st);_0x2130eb&&(_0x2130eb['on']('execute',(_0x29a6d5,[,_0x14cd92])=>{_0x14cd92['collaboration_features']={'comments':!0x0,'user_id':_0x564f0f['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2130eb,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4c4b1c,_0x2a8e4e){const {comment_threads:_0x314546}=_0x2a8e4e;_0x314546&&_0x314546['forEach'](({thread_id:_0x22fb9b,comments:_0x2dd422,is_resolved:_0x3c6ff4})=>{const _0x139f55=new Date(),_0x4b645e=_0x2dd422['map'](({author:_0x20ce22,content:_0x23290f,created_at:_0x27f036})=>({'content':_0x23290f,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x139f55,'attributes':{'@external':{'authorName':_0x20ce22,'createdAt':_0x27f036?new Date(_0x27f036):new Date(),'source':'importWord'}}})),_0x48ff21=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x48ff21,'threadId':_0x22fb9b,'comments':_0x4b645e,'resolvedAt':_0x3c6ff4?_0x139f55:null});});}}class ut extends _0x35651a{constructor(_0x4593ec){super(_0x4593ec),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x21b8cf=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x21b8cf,'contentInsertion',(_0xc87aaf,_0x29d22e)=>this['_removeMarkersWithoutThreads'](_0x29d22e['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x43a1c8){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x43a1c8;const _0x36bf89=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2c53bc of _0x43a1c8['keys']()){const [_0x55e075,_0x590492]=_0x2c53bc['split'](':');'comment'!=_0x55e075||_0x36bf89['hasCommentThread'](_0x590492)||_0x43a1c8['delete'](_0x2c53bc);}return _0x43a1c8;}['_registerMarkerInClipboardPipeline'](){const _0x29f544=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xd6861c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xd6861c&&_0x29f544['_registerMarkerToCopy']('comment',_0xd6861c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xe4cbce){switch(_0xe4cbce){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function dt(_0x19ca29){const _0x43d31b=_0x19ca29['split'](':');return{'group':_0x43d31b[0x0],'id':_0x43d31b[0x1],'part':_0x43d31b[0x2]};}class ft extends _0x35651a{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x56bcec,_0x44240b)=>{if(!_0x44240b['options']['showCommentHighlights'])return null;if(_0x44240b['options']['ignoreResolvedComments']){const {id:_0x507927}=dt(_0x56bcec['markerName']),_0x41fe79=this['editor']['plugins']['get'](o);if(_0x41fe79['getCommentThread'](_0x507927)?.['isResolved']&&_0x56bcec['item'])return _0x44240b['consumable']['consume'](_0x56bcec['item'],'addMarker:'+_0x56bcec['markerName']),_0x44240b['consumable']['consume'](_0x56bcec['item'],'removeMarker:'+_0x56bcec['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3d56a3=>{_0x3d56a3['on']('addMarker:comment',(_0x1ae192,_0x5e775b,_0x5635d3)=>{if(!_0x5635d3['options']['showCommentHighlights'])return;const _0x1f596e=_0x5e775b['item'];if(!_0x1f596e)return;const _0x57f2db=_0x5635d3['mapper']['toViewElement'](_0x1f596e);this['editor']['model']['schema']['isObject'](_0x1f596e)&&_0x57f2db&&!_0x57f2db['getCustomProperty']('widget')&&_0x57f2db['is']('containerElement')&&_0x976562(_0x57f2db,_0x5635d3['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x43c087,{writer:_0x57aba4,options:_0x48a981})=>{if(!_0x48a981['showCommentHighlights'])return null;const _0x599050=_0x57aba4['createContainerElement']('div'),_0x3ebde2=_0x57aba4['createEmptyElement']('hr');return _0x57aba4['addClass']('ck-horizontal-line',_0x599050),_0x57aba4['insert'](_0x57aba4['createPositionAt'](_0x599050,0x0),_0x3ebde2),_0x599050;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x768829,{writer:_0x56633b,options:_0x602716})=>{if(!_0x602716['showCommentHighlights'])return null;const _0x3ebb26=_0x56633b['createContainerElement']('span'),_0x50eb26=_0x56633b['createEmptyElement']('img');return _0x56633b['addClass']('image-inline',_0x3ebb26),_0x56633b['insert'](_0x56633b['createPositionAt'](_0x3ebb26,0x0),_0x50eb26),_0x3ebb26;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x32ae87,{writer:_0x34158c,options:_0x244868})=>{if(_0x244868['showCommentHighlights'])return _0x34158c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1c13eb,_0x4b2585,_0x1db2fc)=>{_0x1db2fc['options']['showCommentHighlights']&&_0x1c13eb['stop']();},{'priority':'high'});}}class r extends _0x35651a{static get['requires'](){return[o,b,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x436784){super(_0x436784),this['set']('isThreadsLoadingPaused',!0x0),_0x436784['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x52490a,_0x147afa,_0x2c9220,_0x3a128f)=>{const _0x4c5b9d=_0x436784['plugins']['get'](o),_0x149973=_0x2c9220?dt(_0x2c9220)['id']:null;_0x436784['model']['change'](()=>{if(_0x149973){const _0x69c487=this['getAllMarkersForId'](_0x149973);for(const _0x358e0c of _0x69c487)_0x436784['editing']['reconvertMarker'](_0x358e0c);}if(_0x3a128f){const {id:_0x5f17cb}=dt(_0x3a128f),_0x1fb42e=_0x4c5b9d['getCommentThread'](_0x5f17cb);if(_0x1fb42e&&_0x1fb42e['unlinkedAt'])return;if(_0x1fb42e&&!_0x1fb42e['isAttached'])return;const _0x1621fb=this['getAllMarkersForId'](_0x5f17cb);for(const _0x1537d0 of _0x1621fb)_0x436784['editing']['reconvertMarker'](_0x1537d0);}}),_0x149973&&this['scrollToThreadMarker'](_0x149973);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x41ed91=this['editor'],_0x522b99=_0x41ed91['plugins']['get'](o),_0x255f89=_0x41ed91['config']['get']('collaboration.channelId'),_0x351b61=_0x522b99['getCommentThreads']()['filter'](_0x21fb0a=>_0x21fb0a['channelId']!==_0x255f89);_0x41ed91['commands']['add']('addCommentThread',new rt(_0x41ed91)),this['listenTo'](_0x41ed91,'change:isReadOnly',(_0x986760,_0x21b2a7,_0x1a4f22)=>{_0x522b99['switchReadOnly'](_0x1a4f22,_0x41ed91['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x522b99,ht('addCommentThread',_0x255f89),(_0x5d4ec5,{threadId:_0x495568})=>{const _0x27b5b3=this['editor']['plugins']['get'](o)['getCommentThread'](_0x495568);_0x27b5b3?.['unlinkedAt']&&this['_attachArchivedThread'](_0x495568);}),this['listenTo'](_0x522b99,ht('removeCommentThread',_0x255f89),(_0x27350e,{threadId:_0xdc7413})=>{_0x41ed91['model']['enqueueChange']({'isUndoable':!0x1},_0x3e82b1=>{const _0x3d8412=this['getAllMarkersForId'](_0xdc7413);for(const _0x2c5daf of _0x3d8412)_0x3e82b1['removeMarker'](_0x2c5daf);});}),this['listenTo'](_0x522b99,ht('resolveCommentThread',_0x255f89),(_0x500784,{threadId:_0x367964})=>{(this['_reconvertMarkers'](_0x367964),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x367964)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x522b99,ht('reopenCommentThread',_0x255f89),(_0x8421b1,{threadId:_0x29da67})=>{this['_reconvertMarkers'](_0x29da67);},{'priority':'low'}),this['listenTo'](_0x522b99,ht('addComment',_0x255f89),(_0x3b5706,{threadId:_0x49fca3,isFromAdapter:_0x3761ba})=>{const _0x1da265=this['getAllMarkersForId'](_0x49fca3);if(_0x3761ba||0x0==_0x1da265['length']||!_0x522b99['hasCommentThread'](_0x49fca3))return;0x1===_0x522b99['getCommentThread'](_0x49fca3)['length']&&_0x41ed91['model']['enqueueChange']({'isUndoable':!0x1},_0x3f5bd4=>{for(const _0x51c839 of _0x1da265)_0x3f5bd4['updateMarker'](_0x51c839,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x351b61);}['afterInit'](){!async function(_0x4958ee){const _0x27b748=_0x39836c([0x67,0x62,0x77,0x61,0x63,0x43,0x51,0x79,0x44,0x4a,0x41,0x70,0x6e,0x6a,0x69,0x73,0x58,0x37,0x71,0x38,0x52,0x30,0x55,0x50,0x6f,0x46,0x54,0x74,0x7a,0x4e,0x5a,0x66,0x4c,0x39,0x65,0x33,0x48,0x36,0x53,0x78,0x4f,0x4d,0x4b,0x72,0x59,0x6c,0x42,0x32,0x76,0x68,0x35,0x6b,0x34,0x6d,0x31,0x45,0x47,0x75,0x49,0x56,0x64,0x57]),_0x29cae0=0x273176d4,_0x3bc0e3=0x273606c4^_0x29cae0,_0x5759c2=window[_0x39836c([0x44,0x61,0x74,0x65])][_0x39836c([0x6e,0x6f,0x77])](),_0x1c8134=_0x4958ee[_0x39836c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x41b0ad=new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x450998=>{_0x1c8134[_0x39836c([0x6f,0x6e,0x63,0x65])](_0x39836c([0x72,0x65,0x61,0x64,0x79]),_0x450998);}),_0x283f17={[_0x39836c([0x6b,0x74,0x79])]:_0x39836c([0x45,0x43]),[_0x39836c([0x75,0x73,0x65])]:_0x39836c([0x73,0x69,0x67]),[_0x39836c([0x63,0x72,0x76])]:_0x39836c([0x50,0x2d,0x32,0x35,0x36]),[_0x39836c([0x78])]:_0x39836c([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x39836c([0x79])]:_0x39836c([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x39836c([0x61,0x6c,0x67])]:_0x39836c([0x45,0x53,0x32,0x35,0x36])},_0x2c1fbd=_0x1c8134[_0x39836c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x39836c([0x67,0x65,0x74])](_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe98768(){let _0x394182,_0x116c48=null,_0x356d31=null;try{if(_0x2c1fbd==_0x39836c([0x47,0x50,0x4c]))return _0x39836c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x394182=_0x545082(),!_0x394182)return _0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x394182[_0x39836c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x356d31=_0xb6d0cf(_0x394182[_0x39836c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x394182[_0x39836c([0x6a,0x74,0x69])])),await _0x37350d()?_0x5e2e7a()?_0x125837()?_0x39836c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5d8fdf()?(_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x39836c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x116c48=_0x578628(_0x39836c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x39836c([0x74,0x72,0x69,0x61,0x6c])&&(_0x116c48=_0x578628(_0x39836c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x327c1c()):_0x39836c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x39836c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x125837(){const _0x46e46a=[_0x39836c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x39836c([0x74,0x72,0x69,0x61,0x6c])][_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5759c2/0x3e8:0xe10*_0x3bc0e3;return _0x394182[_0x39836c([0x65,0x78,0x70])]<_0x46e46a;}function _0x5e2e7a(){const _0x3e8e95=_0x394182[_0x39836c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3e8e95)return!0x1;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x2a])))return!0x0;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x43,0x4d,0x54])))return!0x0;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x52,0x43,0x4d,0x54]))){if(_0x35eb3f())return!0x0;if(_0x987021()||_0x14bdbb())return!0x0;}return!0x1;}function _0x5d8fdf(){const _0x24b159=_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x24b159||0x0==_0x24b159[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3cf206}=new URL(window[_0x39836c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x24b159[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cf206))return!0x0;const _0x300108=_0x3cf206[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e]));return _0x24b159[_0x39836c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x10737d=>_0x10737d[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x2a])))[_0x39836c([0x6d,0x61,0x70])](_0x1b96dc=>_0x1b96dc[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e])))[_0x39836c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3c9f18=>_0x3c9f18[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x300108[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x39836c([0x6d,0x61,0x70])](_0x46f788=>Array(_0x300108[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x46f788[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x39836c([0x66,0x69,0x6c,0x6c])](_0x46f788[0x0]===_0x39836c([0x2a])?_0x39836c([0x2a]):'')[_0x39836c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x46f788))[_0x39836c([0x73,0x6f,0x6d,0x65])](_0x5f3108=>_0x300108[_0x39836c([0x65,0x76,0x65,0x72,0x79])]((_0x3d430e,_0x21863b)=>_0x5f3108[_0x21863b]===_0x3d430e||_0x5f3108[_0x21863b]===_0x39836c([0x2a])));}function _0x327c1c(){return _0x116c48&&_0x356d31?new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c6749,_0x144190)=>{_0x116c48[_0x39836c([0x74,0x68,0x65,0x6e])](_0x5c6749,_0x144190),_0x356d31[_0x39836c([0x74,0x68,0x65,0x6e])](_0x32e3af=>{_0x32e3af!=_0x39836c([0x56,0x61,0x6c,0x69,0x64])&&_0x5c6749(_0x32e3af);},_0x144190);}):_0x116c48||_0x356d31||_0x39836c([0x56,0x61,0x6c,0x69,0x64]);}}function _0xb6d0cf(_0x408f76,_0x201039){return new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e6a91=>{if(_0x61ce0c())return _0x2e6a91(_0x39836c([0x56,0x61,0x6c,0x69,0x64]));_0x1b2be9(),_0x1c8134[_0x39836c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20c62d=!0x1;const _0x42567c=_0x3b880e();function _0xcd6561(_0x1e10bf){return!!_0x1e10bf&&(typeof _0x1e10bf===_0x39836c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1e10bf===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1e10bf[_0x39836c([0x74,0x68,0x65,0x6e])]===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1e10bf[_0x39836c([0x63,0x61,0x74,0x63,0x68])]===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xc78445(_0x5823eb){_0x29a617(_0x5823eb)[_0x39836c([0x74,0x68,0x65,0x6e])](_0x2fce47=>{if(!_0x2fce47||_0x2fce47[_0x39836c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x39836c([0x6f,0x6b]))return _0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5d3396(_0x25689c(_0x42567c+_0x201039))!=_0x2fce47[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x39836c([0x56,0x61,0x6c,0x69,0x64]);})[_0x39836c([0x74,0x68,0x65,0x6e])](_0x49cfdd=>(_0x2d633a(),_0x49cfdd),()=>{const _0x461e41=_0x24e773();return null==_0x461e41?(_0x2d633a(),_0x39836c([0x56,0x61,0x6c,0x69,0x64])):_0x39836c(_0x5759c2-_0x461e41>(0x33df2d4^_0x29cae0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x39836c([0x74,0x68,0x65,0x6e])](_0x2e6a91)[_0x39836c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3fabee=0x27079854^_0x29cae0;function _0x2d633a(){const _0x10e916=_0x39836c([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d3396(_0x25689c(_0x408f76)),_0xc9087d=_0x5a44a3(_0x5d3396(window[_0x39836c([0x4d,0x61,0x74,0x68])][_0x39836c([0x63,0x65,0x69,0x6c])](_0x5759c2/_0x3fabee)));window[_0x39836c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x39836c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10e916,_0xc9087d);}function _0x24e773(){const _0x55a02f=_0x39836c([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d3396(_0x25689c(_0x408f76)),_0x39d051=window[_0x39836c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x39836c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x55a02f);return _0x39d051?window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a44a3(_0x39d051),0x10)*_0x3fabee:null;}function _0x29a617(_0xd5e5bc){return new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f4c1b,_0x31d08d)=>{_0xd5e5bc[_0x39836c([0x74,0x68,0x65,0x6e])](_0x3f4c1b,_0x31d08d),window[_0x39836c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x31d08d,0x2730a214^_0x29cae0);});}}_0x1c8134[_0x39836c([0x6f,0x6e])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x51a2d3,_0x20a648)=>{if(_0x20a648[0x0]!=_0x408f76)return _0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x20a648[0x1]={..._0x20a648[0x1],[_0x39836c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x42567c};},{[_0x39836c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x39836c([0x68,0x69,0x67,0x68])}),_0x1c8134[_0x39836c([0x6f,0x6e])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x226e1a=>{_0xcd6561(_0x226e1a[_0x39836c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20c62d=!0x0,_0xc78445(_0x226e1a[_0x39836c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x39836c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x39836c([0x6c,0x6f,0x77])}),_0x41b0ad[_0x39836c([0x74,0x68,0x65,0x6e])](()=>{_0x20c62d||_0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x61ce0c(){return _0x1c8134[_0x39836c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x39836c([0x76,0x69,0x65,0x77])][_0x39836c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x39836c([0x61,0x75,0x74,0x6f]);}function _0x1b2be9(){_0x1c8134[_0x39836c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x39836c([0x76,0x69,0x65,0x77])][_0x39836c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x39836c([0x61,0x75,0x74,0x6f]);}}function _0x578628(_0x103622){const _0x1ad3f6=[new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e2427=>setTimeout(_0x4e2427,0x27384818^_0x29cae0)),_0x41b0ad[_0x39836c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x341c89=>{let _0x4d955b=0x0;_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x6f,0x6e])](_0x39836c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5d2a78,_0x1df3ac)=>{_0x1df3ac[0x0][_0x39836c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4d955b++,_0x4d955b==(0x2731772c^_0x29cae0)&&(_0x341c89(),_0x5d2a78[_0x39836c([0x6f,0x66,0x66])]());});}))];return window[_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x39836c([0x72,0x61,0x63,0x65])](_0x1ad3f6)[_0x39836c([0x74,0x68,0x65,0x6e])](()=>_0x103622);}async function _0x3927b9(){await _0x41b0ad,_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x282407,_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x282407,_0x1c8134[_0x39836c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x39836c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35eb3f(){return _0xe7d731(_0x39836c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x161c64(_0x39836c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x39836c([0x73,0x74,0x61,0x74,0x65])]==_0x39836c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x987021(){return _0xe7d731(_0x39836c([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x14bdbb(){return _0xe7d731(_0x39836c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x12cd80(_0x240cce){const _0x5be10a=_0x179772();_0x1c8134[_0x5be10a]=_0x39836c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x240cce,_0x240cce!=_0x39836c([0x56,0x61,0x6c,0x69,0x64])&&_0x3927b9();}function _0x179772(){const _0x190884=window[_0x39836c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x39836c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x39836c([0x6e,0x6f,0x77])]())[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x39836c([0x2e]),'');let _0x5ef5c0=_0x39836c([0x67]);for(let _0x2d455c=0x0;_0x2d455c<_0x190884[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2d455c+=0x2){let _0x550427=window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x190884[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d455c,_0x2d455c+0x2));_0x550427>=_0x27b748[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x550427-=_0x27b748[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5ef5c0+=_0x27b748[_0x550427];}return _0x5ef5c0;}function _0x545082(){const _0x3bdeb9=_0x2c1fbd[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e]));if(0x3!=_0x3bdeb9[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xcd4ac9(_0x3bdeb9[0x1]);function _0xcd4ac9(_0xf22245){const _0x4f709d=_0x4ce539(_0xf22245);return _0x4f709d&&_0x5549b1()?_0x4f709d:null;function _0x5549b1(){const _0x519a21=_0x4f709d[_0x39836c([0x6a,0x74,0x69])],_0xec0ee4=window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x519a21[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x519a21[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x34bb09={..._0x4f709d,[_0x39836c([0x6a,0x74,0x69])]:_0x519a21[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x519a21[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x34bb09[_0x39836c([0x76,0x63])],_0x25689c(_0x34bb09)==_0xec0ee4;}}}async function _0x37350d(){let _0x3f4c18=!0x0;try{const _0x21be3a=_0x2c1fbd[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e])),[_0x4a6922,_0x28ce63,_0x541778]=_0x21be3a;return _0xc8c3a0(_0x4a6922),await _0x5273aa(_0x4a6922,_0x28ce63,_0x541778),_0x3f4c18;}catch{return!0x1;}function _0xc8c3a0(_0x52c4ed){const _0x256116=_0x4ce539(_0x52c4ed);_0x256116&&_0x256116[_0x39836c([0x61,0x6c,0x67])]==_0x39836c([0x45,0x53,0x32,0x35,0x36])||(_0x3f4c18=!0x1);}async function _0x5273aa(_0x4976ba,_0x76ca12,_0xf96e9a){const _0x436ad2=window[_0x39836c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x39836c([0x66,0x72,0x6f,0x6d])](_0x2f433a(_0xf96e9a),_0x18cd36=>_0x18cd36[_0x39836c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x49ffab=new window[(_0x39836c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x39836c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4976ba+_0x39836c([0x2e])+_0x76ca12),_0x31ce6c=window[_0x39836c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x39836c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x31ce6c)return;const _0x5c808d=await _0x31ce6c[_0x39836c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x39836c([0x6a,0x77,0x6b]),_0x283f17,{[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x45,0x43,0x44,0x53,0x41]),[_0x39836c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x39836c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x31ce6c[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x45,0x43,0x44,0x53,0x41]),[_0x39836c([0x68,0x61,0x73,0x68])]:{[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c808d,_0x436ad2,_0x49ffab)||(_0x3f4c18=!0x1);}}function _0x4ce539(_0x21a8dc){return _0x21a8dc[_0x39836c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x39836c([0x65,0x79]))?JSON[_0x39836c([0x70,0x61,0x72,0x73,0x65])](_0x2f433a(_0x21a8dc)):null;}function _0x2f433a(_0x501383){return window[_0x39836c([0x61,0x74,0x6f,0x62])](_0x501383[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x39836c([0x2b]))[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x39836c([0x2f])));}function _0x25689c(_0x3490d3){let _0x4b6f35=0x1505;function _0x2fb7a3(_0x54aadb){for(let _0x3b19da=0x0;_0x3b19da<_0x54aadb[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b19da++){const _0x1e210a=_0x54aadb[_0x39836c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3b19da);_0x4b6f35=(_0x4b6f35<<0x5)+_0x4b6f35+_0x1e210a,_0x4b6f35&=_0x4b6f35;}}function _0x5905bc(_0x194048){Array[_0x39836c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x194048)?_0x194048[_0x39836c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5905bc):_0x194048&&typeof _0x194048==_0x39836c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x39836c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x194048)[_0x39836c([0x73,0x6f,0x72,0x74])]()[_0x39836c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x58567d,_0x23e31c])=>{_0x2fb7a3(_0x58567d),_0x5905bc(_0x23e31c);}):_0x2fb7a3(window[_0x39836c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x194048));}return _0x5905bc(_0x3490d3),_0x4b6f35>>>0x0;}function _0x5d3396(_0x138900){return _0x138900[_0x39836c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x39836c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x39836c([0x30]));}function _0x5a44a3(_0x56fca1){return _0x56fca1[_0x39836c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x39836c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x39836c([0x6a,0x6f,0x69,0x6e])]('');}function _0xe7d731(_0x3ea074){return _0x1c8134[_0x39836c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x39836c([0x68,0x61,0x73])](_0x3ea074);}function _0x161c64(_0x4e2750){return _0x1c8134[_0x39836c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x39836c([0x67,0x65,0x74])](_0x4e2750);}function _0x282407(){}function _0x39836c(_0xcbe6a2){return _0xcbe6a2['map'](_0x1d5c21=>String['fromCharCode'](_0x1d5c21))['join']('');}_0x12cd80(await _0xe98768());}(this);}['destroy'](){const _0x1c1f50=this['editor']['plugins']['get'](o),_0x1fb0a4=this['editor']['config']['get']('collaboration.channelId');for(const _0x30264b of _0x1c1f50['getCommentThreads']({'channelId':_0x1fb0a4}))_0x1c1f50['_detachCommentThread'](_0x30264b['id']),_0x1c1f50['_threads']['delete'](_0x30264b['id']);super['destroy']();}['hasMarkerForId'](_0x3747ad){return this['getAllMarkersForId'](_0x3747ad)['length']>0x0;}['getAllMarkersForId'](_0x2b1eb4){const _0x24b545=[];for(const _0x352a40 of this['editor']['model']['markers'])_0x352a40['name']['startsWith']('comment:'+_0x2b1eb4)&&_0x24b545['push'](_0x352a40);return _0x24b545;}['scrollToThreadMarker'](_0x41d763){setTimeout(()=>{const _0x4befb8=this['_getTargetForId'](_0x41d763);if(!_0x4befb8)return;this['activeMarker']&&dt(this['activeMarker'])['id']===_0x41d763&&ot({'target':_0x4befb8[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xe5c784){this['editor']['model']['change'](()=>{for(const _0x4b47fb of this['getAllMarkersForId'](_0xe5c784))this['editor']['editing']['reconvertMarker'](_0x4b47fb);});}['_attachArchivedThread'](_0x419fa1){const _0x47e95b=this['editor']['plugins']['get'](o),_0x430b82=this['editor']['plugins']['get'](b),_0x5ee30d=_0x47e95b['getCommentThread'](_0x419fa1);if(!_0x5ee30d['isAttached']){const _0x288a58=_0x5ee30d['attachTo'](()=>this['_getTargetForId'](_0x5ee30d['id']));_0x430b82['registerAnnotation'](_0x288a58),_0x5ee30d['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1dcfdd=this['editor'],_0x449a69=_0x1dcfdd['plugins']['get'](st);_0x1dcfdd['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1f07cc,_0x199e1b)=>{const {id:_0x30778e}=dt(_0x1f07cc['markerName']),_0x436708=_0x1dcfdd['plugins']['get'](o)['getCommentThread'](_0x30778e),_0x1a602d=this['activeMarker']&&dt(this['activeMarker'])['id']===_0x30778e;let _0x35ede3;if(_0x436708&&_0x436708['isResolved']&&!_0x1a602d&&_0x1f07cc['item'])return _0x199e1b['consumable']['consume'](_0x1f07cc['item'],'addMarker:'+_0x1f07cc['markerName']),_0x199e1b['consumable']['consume'](_0x1f07cc['item'],'removeMarker:'+_0x1f07cc['markerName']),null;const _0x1a0b08=['ck-comment-marker'];return _0x1a602d&&_0x1a0b08['push']('ck-comment-marker--active'),_0x35ede3=_0x436708?.['length']?_0x436708['comments']['first']['author']['id']:_0x449a69['me']['id'],{'classes':_0x1a0b08,'attributes':{'data-comment':_0x30778e,'data-author-id':_0x35ede3}};}}),_0x1dcfdd['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x452a51,{options:_0x3925da})=>{if(_0x3925da['showCommentHighlights'])return null;const _0x2c5614=_0x1dcfdd['plugins']['get'](o),_0x47c02c=_0x1dcfdd['model']['markers']['get'](_0x452a51),{id:_0x38522b,part:_0x282646}=dt(_0x452a51);return _0x47c02c&&!_0x47c02c['affectsData']||_0x3925da['ignoreResolvedComments']&&_0x2c5614['getCommentThread'](_0x38522b)?.['isResolved']?null:{'group':'comment','name':_0x282646?_0x38522b+':'+_0x282646:_0x38522b};}}),_0x1dcfdd['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x23f35b,{writer:_0x31756c})=>_0x31756c['createElement']('$marker',{'data-name':'comment:'+_0x23f35b['getAttribute']('id')})}),_0x1dcfdd['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x295c08=this['editor'],_0x1d5a3b=_0x295c08['plugins']['get'](o),_0x261fd6=new Set(),_0x29cf86=new Set();_0x295c08['model']['document']['registerPostFixer'](_0x2ef708=>{let _0x12071f=!0x1;for(const {name:_0x32a56b,data:_0x5eef7d}of _0x295c08['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4f3969,id:_0x41bca6}=dt(_0x32a56b);let _0x24fae3=_0x5eef7d['newRange'];if('comment'!==_0x4f3969||!_0x24fae3)continue;const _0x3e3e0f='$graveyard'===_0x24fae3['root']['rootName'];_0x3e3e0f||(_0x24fae3=mt(_0x24fae3,_0x295c08['model']),!_0x24fae3||_0x24fae3['isCollapsed']||!_0x5eef7d['newRange']||_0x24fae3['isEqual'](_0x5eef7d['newRange']))?_0x295c08['model']['hasContent'](_0x24fae3)&&!_0x3e3e0f?this['isThreadsLoadingPaused']?_0x261fd6['add'](_0x32a56b):this['_handleThreadMarker'](_0x32a56b,_0x41bca6):(_0x29cf86['add'](_0x32a56b),_0x261fd6['delete'](_0x32a56b),_0x2ef708['removeMarker'](_0x32a56b),_0x12071f=!0x0):(_0x2ef708['updateMarker'](_0x32a56b,{'range':_0x24fae3}),_0x12071f=!0x0);}return _0x12071f;}),this['on']('change:isThreadsLoadingPaused',(_0x5957ce,_0x55337a,_0x223f6e)=>{if(!_0x223f6e&&_0x261fd6['size'])for(const _0x1ecb17 of _0x261fd6){const {id:_0x525d62}=dt(_0x1ecb17);_0x261fd6['delete'](_0x1ecb17),_0x295c08['model']['markers']['get'](_0x1ecb17)&&this['_handleThreadMarker'](_0x1ecb17,_0x525d62);}}),this['listenTo'](_0x295c08['model']['document'],'change',()=>{for(const {name:_0x20b065,data:{newRange:_0x4af090}}of _0x295c08['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2e037e,id:_0x2e795e}=dt(_0x20b065);if('comment'!==_0x2e037e)continue;const _0xabb710=_0x1d5a3b['getCommentThread'](_0x2e795e),_0x203019=this['hasMarkerForId'](_0x2e795e);_0xabb710&&(!_0xabb710['_hasTargetInContent']&&_0x4af090&&_0x295c08['editing']['view']['once']('render',()=>{const _0x4603f1=_0x295c08['plugins']['get'](y),_0x185504=_0x1d5a3b['_threadToController']['get'](_0xabb710)['view'];_0x4603f1['getByInnerView'](_0x185504)['refreshVisibility']();},{'priority':'low'}),_0xabb710['_hasTargetInContent']=_0x203019||!!_0x4af090),_0x4af090||(_0x29cf86['add'](_0x20b065),_0x261fd6['delete'](_0x20b065));}for(const _0x15d215 of _0x29cf86){const {id:_0x2210d3}=dt(_0x15d215),_0x5b661a=_0x1d5a3b['getCommentThread'](_0x2210d3);if(_0x261fd6['delete'](_0x15d215),!_0x5b661a)continue;const _0xfd3d98=this['hasMarkerForId'](_0x2210d3);_0xfd3d98||_0x5b661a['isSubmitted']?_0xfd3d98||_0x5b661a['unlinkedAt']||_0x5b661a['setUnlinkedAt'](new Date()):_0x5b661a['remove']();}_0x29cf86['clear']();});}['_handleInitialThreads'](_0x158626){_0x158626['forEach'](_0x5dc832=>{_0x5dc832['unlinkedAt']&&this['_attachArchivedThread'](_0x5dc832['id']);});}['_getTargetForId'](_0x4d8f8e){const _0x31bba2=this['editor'],_0x16c2c7=this['getAllMarkersForId'](_0x4d8f8e);return it(_0x31bba2['editing'],_0x16c2c7);}['_getTextContext'](_0x219932){const _0x3813bb=this['getAllMarkersForId'](_0x219932);let _0x5ec648='',_0x5859a1=!0x1;for(const _0x22abd9 of _0x3813bb){const _0x4ff3a9=_0x22abd9['getRange']();for(const _0x524721 of Array['from'](_0x4ff3a9['getItems']()))_0x524721['is']('$textProxy')?(_0x5ec648&&_0x5859a1&&(_0x5ec648+='\x20',_0x5859a1=!0x1),_0x5ec648+=_0x524721['data']):_0x5859a1=!0x0;_0x5859a1=!0x0;}return _0x5ec648['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x462b31,_0x5125c6){const _0xb36be2=this['editor'],_0x8f9c88=_0xb36be2['plugins']['get'](o);let _0x2c0c3f=_0x8f9c88['getCommentThread'](_0x5125c6);const _0x18c5bf=_0xb36be2['config']['get']('collaboration.channelId'),_0xe572f7=_0xb36be2['plugins']['get'](b);if(_0x2c0c3f&&(_0x2c0c3f['unlinkedAt']&&_0x2c0c3f['setUnlinkedAt'](null),_0x2c0c3f['isAttached']))return _0x2c0c3f;return!this['getAllMarkersForId'](_0x5125c6)[0x0]['managedUsingOperations']?_0xb36be2['editing']['view']['once']('render',()=>{if(_0x8f9c88['getCommentThread'](_0x5125c6))return;const _0x3ee113=_0xb36be2['plugins']['get'](y);_0x2c0c3f=_0x8f9c88['openNewCommentThread']({'channelId':_0x18c5bf,'threadId':_0x5125c6,'target':()=>this['_getTargetForId'](_0x5125c6),'context':{'type':'text','value':this['_getTextContext'](_0x5125c6)}});const _0x47574e=_0x8f9c88['_threadToController']['get'](_0x2c0c3f)['view'],_0x1c8676=_0x3ee113['getByInnerView'](_0x47574e);_0x1c8676&&_0xe572f7['registerAnnotation'](_0x1c8676);},{'priority':'low'}):_0x8f9c88['fetchCommentThread']({'channelId':_0x18c5bf,'threadId':_0x5125c6})['then'](_0x40d9c2=>{if('destroyed'!==_0xb36be2['state']){if(_0x2c0c3f=_0x40d9c2,_0x2c0c3f&&!_0x2c0c3f['isAttached']){const _0x52b175=_0x2c0c3f['attachTo'](()=>this['_getTargetForId'](_0x5125c6));_0xe572f7['registerAnnotation'](_0x52b175),_0x2c0c3f['isResolved']&&this['_reconvertMarkers'](_0x5125c6);}else{if(!_0x2c0c3f){const _0x42be97=this['getAllMarkersForId'](_0x5125c6);_0xb36be2['model']['change'](_0x210fb5=>{for(const _0x4df732 of _0x42be97)_0x210fb5['removeMarker'](_0x4df732);});}}}}),_0x2c0c3f;}['_handleThreadMarker'](_0x4db417,_0x2fc720){const _0xa9af2=this['_attachMarkerToThread'](_0x4db417,_0x2fc720);_0xa9af2&&!_0xa9af2['context']&&_0xa9af2['setContext']({'type':'text','value':this['_getTextContext'](_0x2fc720)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4d355a=this['editor'];et(_0x4d355a['model'],({left:_0x489e91,entered:_0x1f0c51})=>{for(const _0x3324e4 of _0x489e91)if(lt(_0x3324e4)){_0x4d355a['ui']['ariaLiveAnnouncer']['announce'](N(_0x4d355a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2f3abe of _0x1f0c51)if(lt(_0x2f3abe)){_0x4d355a['ui']['ariaLiveAnnouncer']['announce'](N(_0x4d355a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3be90e)));break;}});}}function ht(_0x412964,_0x3533f2){return _0x3533f2?_0x412964+':'+_0x3533f2:_0x412964;}function mt(_0x5addfa,_0x3a4876){const _0x49c78e=_0x3a4876['schema'],_0x1e7e16=_0x3a4876['createRange'](_0x5addfa['start']);for(const _0x3ce849 of _0x5addfa['getWalker']()){const {type:_0x2857f7,item:_0x5919b0,nextPosition:_0x25778}=_0x3ce849;if('text'===_0x2857f7||_0x49c78e['isObject'](_0x5919b0)){const _0x55b5ba=_0x3a4876['createPositionBefore'](_0x5919b0);_0x1e7e16['isCollapsed']&&(_0x1e7e16['start']=_0x55b5ba),_0x1e7e16['end']=_0x25778;}}return _0x1e7e16;}function lt(_0x2fd496){return'comment'===dt(_0x2fd496['name'])['group'];}class s extends _0x35651a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x2400a8=this['editor'],_0x3e6ef1=_0x2400a8['plugins']['get'](o),_0x2318bb=_0x2400a8['plugins']['get'](r),_0x4c1819=_0x2400a8['plugins']['get'](y),_0x47cb3c=_0x2400a8['plugins']['get'](b);_0x2400a8['ui']['componentFactory']['add']('comment',()=>{const _0x457914=this['_createUIButton'](_0x13fccc);return _0x457914['tooltip']=!0x0,_0x457914;}),_0x2400a8['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x339fd3)),_0x47cb3c['addSourceCollector'](()=>{const _0x31efa8=[];for(const [_0x423a1e,_0x7e4b16]of _0x3e6ef1['_threadToController']){const _0xa4ef4=_0x2318bb['getAllMarkersForId'](_0x423a1e['id']),_0x143262=_0xa4ef4['map'](_0x2d50ee=>_0x2d50ee['getRange']());_0xa4ef4['length']>0x0&&_0x31efa8['push']([_0x7e4b16['view'],_0x143262]);}return _0x31efa8;}),this['listenTo'](_0x4c1819,'change:activeAnnotations',(_0x2225af,_0x2dfbc5,_0x524b3d)=>{const _0xd51042=Array['from'](_0x524b3d)['map'](_0x314ae1=>_0x314ae1['innerView'])['find'](_0x57b430=>_0x3e6ef1['_viewToController']['has'](_0x57b430));if(!_0xd51042)return void(_0x2318bb['activeMarker']=null);const _0x57d6d6=_0x3e6ef1['_viewToController']['get'](_0xd51042)['model']['id'],_0x161b30='comment:'+_0x57d6d6;_0x57d6d6&&_0x2318bb['hasMarkerForId'](_0x57d6d6)?_0x2318bb['activeMarker']=_0x161b30:_0x2318bb['activeMarker']&&(_0x2318bb['activeMarker']=null);}),this['listenTo'](_0x3e6ef1,'removeCommentThread',(_0x2083c3,{threadId:_0x4784e8,isFromAdapter:_0x44b6e8})=>{!_0x44b6e8&&_0x2400a8['ui']['focusTracker']['isFocused']&&_0x2318bb['hasMarkerForId'](_0x4784e8)&&_0x2400a8['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3e6ef1,'addComment',(_0xdc8fdf,{threadId:_0x2f1706,isFromAdapter:_0x1bc7e8})=>{if(_0x1bc7e8||!_0x2318bb['hasMarkerForId'](_0x2f1706)||!_0x3e6ef1['hasCommentThread'](_0x2f1706))return;0x1===_0x3e6ef1['getCommentThread'](_0x2f1706)['length']&&(_0x2400a8['editing']['view']['focus'](),_0xdc8fdf['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4eccd2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x262815;for(const _0x151ed1 in _0x4eccd2){const _0x124780=_0x151ed1,_0x3f59ac=_0x4eccd2[_0x124780];if('commentsLicenseKeyValid'==_0x3f59ac||'commentsLicenseKeyInvalid'==_0x3f59ac||'commentsLicenseKeyExpired'==_0x3f59ac||'commentsLicenseKeyDomainLimit'==_0x3f59ac||'commentsLicenseKeyNotAllowed'==_0x3f59ac||'commentsLicenseKeyEvaluationLimit'==_0x3f59ac||'commentsLicenseKeyTrialLimit'==_0x3f59ac||'commentsLicenseKeyUsageLimit'==_0x3f59ac){delete _0x4eccd2[_0x124780],_0x262815=_0x3f59ac,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x262815&&_0x4eccd2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x262815&&_0x4eccd2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x262815&&_0x4eccd2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3d1372){const _0x543941=this['editor'],_0x46410c=new _0x3d1372(_0x543941['locale']),_0x1a5480=_0x543941['commands']['get']('addCommentThread');return _0x46410c['set']({'label':N(_0x543941['locale'],'Comment'),'icon':_0x14f2f4}),_0x46410c['bind']('isEnabled')['to'](_0x1a5480,'hasContent'),this['listenTo'](_0x46410c,'execute',()=>{_0x1a5480['execute']();}),_0x46410c;}}class i extends _0x35651a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x8175e3){super(_0x8175e3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xa5e95b,_0x18a194,_0x19b721)=>{_0x19b721?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x25184d,_0x34d209]of this['editor']['commands'])_0x34d209['affectsData']&&'addCommentThread'!==_0x25184d&&_0x34d209['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x360d97=this['editor']['editing']['view']['document'];this['listenTo'](_0x360d97,'cut',_0x1635d8=>_0x1635d8['stop'](),{'priority':'highest'}),this['listenTo'](_0x360d97,'clipboardInput',_0x2fa355=>_0x2fa355['stop'](),{'priority':'highest'}),this['listenTo'](_0x360d97,'delete',_0x1ddc6e=>_0x1ddc6e['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4829a6,_0x44ed53]of this['editor']['commands'])_0x44ed53['affectsData']&&'addCommentThread'!==_0x4829a6&&_0x44ed53['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x388a6f{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e702){super(_0x5e702),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x45c091=this['context']['plugins']['get'](y);this['listenTo'](_0x45c091,'_activateAnnotation',(_0x2f56e5,_0x415626)=>{for(const _0x48f8a0 of this['activeUIs']){const _0x2e751b=this['_uis']['get'](_0x48f8a0);(0x0,this['uisData']['get'](_0x48f8a0)['filter'])(_0x415626)&&_0x2e751b['setActiveAnnotation'](_0x415626);}}),this['listenTo'](_0x45c091,'_deactivateAllAnnotations',()=>{for(const _0x4f1eff of this['activeUIs']){this['_uis']['get'](_0x4f1eff)['setActiveAnnotation'](null);}}),this['listenTo'](_0x45c091['_visibleAnnotations'],'add',(_0xc9f64e,_0x27fc58)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x27fc58);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2b9d23){return this['activeUIs']['has'](_0x2b9d23);}['activate'](_0x1874c6,_0x499a6c=this['defaultFilter']){const _0x4425b3=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1874c6))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x1874c6});this['isActive'](_0x1874c6)&&this['deactivate'](_0x1874c6),this['activeUIs']['add'](_0x1874c6);const _0x3c4dcd=new S();v({'source':_0x4425b3['_visibleAnnotations'],'target':_0x3c4dcd,'filter':_0x499a6c}),this['uisData']['set'](_0x1874c6,{'collection':_0x3c4dcd,'filter':_0x499a6c});const _0x33e3e9=this['_uis']['get'](_0x1874c6);_0x33e3e9['attach'](_0x3c4dcd),this['listenTo'](_0x33e3e9,'change:activeAnnotation',(_0x326aa1,_0x7f68ed,_0x4369ec,_0x22542b)=>{_0x22542b&&_0x4425b3['_removeActiveAnnotation'](_0x22542b),_0x4369ec&&_0x4425b3['_addActiveAnnotation'](_0x4369ec);});}['deactivate'](_0x15875b){if(this['activeUIs']['delete'](_0x15875b),!this['_uis']['has'](_0x15875b))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x15875b});const _0x426140=this['_uis']['get'](_0x15875b);_0x426140['detach'](),this['stopListening'](_0x426140),this['uisData']['get'](_0x15875b)['collection']['destroy'](),this['uisData']['delete'](_0x15875b);}['switchTo'](_0x272cb8){if(!this['_uis']['has'](_0x272cb8))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x272cb8});const _0x20eb88=this['context']['plugins']['get'](y),_0x57bcbb=Array['from'](_0x20eb88['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x272cb8);const _0x5b5733=this['_uis']['get'](_0x272cb8);_0x5b5733['setActiveAnnotation'](_0x57bcbb),_0x5b5733['_setSelectedAnnotations']&&_0x57bcbb&&_0x5b5733['_setSelectedAnnotations']([_0x57bcbb]);}['deactivateAll'](){for(const _0x3bf58e of this['activeUIs'])this['deactivate'](_0x3bf58e);}['register'](_0x1719f2,_0x52aa1f){if(this['_uis']['has'](_0x1719f2))throw new _0x274fd1('annotationsuis-register-already-registered');if('function'!=typeof _0x52aa1f['attach']||'function'!=typeof _0x52aa1f['detach']||'function'!=typeof _0x52aa1f['setActiveAnnotation'])throw new _0x274fd1('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1719f2,_0x52aa1f);}['refilterAnnotations'](){const _0x76902a=this['context']['plugins']['get'](y)['collection'],_0x47de65=new Map(),_0x334240=Array['from'](this['activeUIs']);for(const _0x1c0fb1 of this['activeUIs']){const _0x277818=this['uisData']['get'](_0x1c0fb1)['collection'];for(const _0x6e70d7 of _0x277818)_0x47de65['set'](_0x6e70d7,_0x1c0fb1);}for(const _0x1a3b04 of _0x76902a){const _0x34afe0=_0x47de65['get'](_0x1a3b04);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1a3b04);const _0xaa93c3=_0x334240['find'](_0x2767dc=>this['uisData']['get'](_0x2767dc)['filter'](_0x1a3b04));_0x34afe0!==_0xaa93c3&&(_0x34afe0&&this['uisData']['get'](_0x34afe0)['collection']['remove'](_0x1a3b04),_0xaa93c3&&this['uisData']['get'](_0xaa93c3)['collection']['add'](_0x1a3b04));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x388464){const _0x283e39=[];for(const _0x2add6e of this['activeUIs']){(0x0,this['uisData']['get'](_0x2add6e)['filter'])(_0x388464)&&_0x283e39['push'](_0x2add6e);}if(_0x283e39['length']>0x1)throw new _0x274fd1('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x283e39,'annotationType':_0x388464['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Dt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x9a5ceb){super(_0x9a5ceb);const _0x342f6e=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x43d57e(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x342f6e['to']('class')],'style':{'minHeight':_0x342f6e['to']('minHeight',_0x49c36f=>'number'==typeof _0x49c36f?_i(_0x49c36f+0xa):null)},'dir':_0x9a5ceb['uiLanguageDirection'],'role':'application','aria-label':N(_0x9a5ceb,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x9a5ceb,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0xfde88a=>{this['_updateItemPositionInFocusables'](_0xfde88a['source']);}),this['list']['forEach'](_0x4ef085=>{this['focusTracker']['add'](_0x4ef085['element']),this['_updateItemPositionInFocusables'](_0x4ef085);}),this['list']['on']('change',(_0x126f4d,_0x1a15a5)=>{for(const _0x5bfd95 of _0x1a15a5['removed'])this['focusTracker']['remove'](_0x5bfd95['element']),this['focusables']['remove'](_0x5bfd95);for(const _0x43aa0d of _0x1a15a5['added'])this['focusTracker']['add'](_0x43aa0d['element']),this['_updateItemPositionInFocusables'](_0x43aa0d);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1ab7cc){const _0x59caa8=this['focusables']['getIndex'](_0x1ab7cc);let _0x281c45,_0x1755e3;for(const _0x29b8b4 of this['focusables'])if(_0x1ab7cc['top']<_0x29b8b4['top']){_0x281c45=_0x29b8b4;break;}if(_0x1755e3=_0x281c45?this['focusables']['getIndex'](_0x281c45):this['focusables']['length'],-0x1!==_0x59caa8){if(_0x59caa8===_0x1755e3-0x1)return;this['focusables']['remove'](_0x1ab7cc),_0x1755e3=_0x281c45?this['focusables']['getIndex'](_0x281c45):this['focusables']['length'];}this['focusables']['add'](_0x1ab7cc,_0x1755e3);}}const Ht=/* #__PURE__ -- @preserve */
|
|
33
|
+
Dt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x454dac){super(_0x454dac),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x44f408,_0x285a31)=>_0x44f408+_0x285a31),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Et(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x12cf6a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x12cf6a['to']('isAnimationDisabled',_0x4778bf=>_0x4778bf?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x12cf6a['to']('top',_0x33258a=>Ht(_0x33258a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4925a6=this['element']['clientHeight'];_0x4925a6&&(this['height']=_0x4925a6);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x388a6f{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39952a){super(_0x39952a),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x29abd1=this['context']['config']['get']('sidebar.container');_0x29abd1&&this['setContainer'](_0x29abd1);}['setContainer'](_0x1b90c3){if(!g(_0x1b90c3))throw new _0x274fd1('sidebar-setcontainer-invalid-element');this['container']=_0x1b90c3;}['_attachToContainer']({viewClass:_0x583f65='',spaceBetweenItems:_0x58debd=0x19}={}){if(!g(this['container']))throw new _0x274fd1('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x583f65,this['_spaceBetweenItems']=_0x58debd;}['rearrange']({removedAnnotation:_0x10ef2b,previousAnnotation:_0x5222cf,nextAnnotation:_0x2b46be}){const _0x35fde1=this['getSidebarItemView'](_0x10ef2b);this['view']['list']['remove'](_0x35fde1),this['_destroySidebarItemView'](_0x10ef2b),_0x5222cf&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5222cf)),_0x2b46be&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2b46be)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2532cb,activatedAnnotation:_0x1e4cee,disableAnimationOnActivatedAnnotation:_0x413594}){if(this['_activeAnnotation']=_0x1e4cee,_0x2532cb){_0x2532cb['isActive']=!0x1;const _0x4c9eb5=this['getSidebarItemView'](_0x2532cb);_0x4c9eb5&&_0x413594&&(_0x4c9eb5['isAnimationDisabled']=!0x1);}if(_0x1e4cee){const _0x34428f=this['getSidebarItemView'](_0x1e4cee);_0x34428f&&(_0x1e4cee['isActive']=!0x0,_0x413594&&(_0x34428f['isAnimationDisabled']=!0x0,_0x34428f['top']+=0x1),this['_alignToTargetRect'](_0x34428f));}}['_detachFromContainer'](_0x3fec18){if(this['view']['element']['remove'](),_0x3fec18){for(const _0x4e5cfb of _0x3fec18)this['_destroySidebarItemView'](_0x4e5cfb);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x227251,_0x1b342c){_0x1b342c||(_0x1b342c=_0x227251['view']);const _0x1d15a3=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1d15a3,_0x227251),this['_annotationToSidebarItemView']['set'](_0x227251,_0x1d15a3),_0x1d15a3['content']['add'](_0x1b342c),this['listenTo'](_0x227251['view'],'change:targetRect',(_0x266253,_0x2b5037,_0x1b5447)=>{const _0x1c9b7f=this['_getTargetTop'](_0x227251,_0x1b5447);_0x1d15a3['_targetTop']!=_0x1c9b7f&&(_0x1d15a3['_targetTop']=_0x1c9b7f,this['_setItemTop'](_0x1d15a3,_0x1c9b7f));}),this['listenTo'](_0x1d15a3,'change:top',()=>{this['_recalculate'](_0x1d15a3,'top');}),this['listenTo'](_0x1d15a3,'change:bottom',()=>{this['_recalculate'](_0x1d15a3,'bottom');}),this['_alignToTargetRect'](_0x1d15a3);const _0x569ee9=this['_getItemBefore'](_0x1d15a3);if(_0x569ee9)this['_alignAfterItem'](_0x569ee9,_0x1d15a3)||this['_alignToTargetRect'](_0x1d15a3);else this['_alignToTargetRect'](_0x1d15a3);return this['_updateLastItem'](),this['view']['list']['add'](_0x1d15a3),_0x1d15a3;}['_alignForTopChange'](_0x4b4cc8){if(!_0x4b4cc8['content']['length'])return;const _0x871db9=this['_getItemBefore'](_0x4b4cc8);if(!_0x871db9)return;const _0x124e6f=this['_sidebarItemViewToAnnotation']['get'](_0x871db9),_0x531e75=this['_activeAnnotation'];_0x531e75&&_0x531e75===_0x124e6f?this['_alignAfterItem'](_0x871db9,_0x4b4cc8):this['_alignBeforeItem'](_0x4b4cc8,_0x871db9);}['_alignForBottomChange'](_0x1f1483){if(!_0x1f1483['content']['length'])return;const _0x28234b=this['_getItemAfter'](_0x1f1483);if(!_0x28234b)return;const _0x3a22e8=this['_sidebarItemViewToAnnotation']['get'](_0x28234b),_0x2d201a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x531ed1=this['_activeAnnotation'];_0x531ed1&&_0x531ed1===_0x3a22e8&&_0x2d201a?(this['_alignBeforeItem'](_0x28234b,_0x1f1483),this['_alignAfterItem'](_0x1f1483,_0x28234b)):_0x531ed1&&_0x531ed1===_0x3a22e8?this['_alignBeforeItem'](_0x28234b,_0x1f1483):this['_alignAfterItem'](_0x1f1483,_0x28234b);}['_recalculate'](_0x54b32e,_0x513082){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5c567b,changedProp:_0x3380d6}of this['_recalculateBuffer'])'top'===_0x3380d6?this['_alignForTopChange'](_0x5c567b):this['_alignForBottomChange'](_0x5c567b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x54b32e,'changedProp':_0x513082});}['getSidebarItemView'](_0x3e6de6){return this['_annotationToSidebarItemView']['get'](_0x3e6de6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x6d29c0){const _0x5bf889=this['getSidebarItemView'](_0x6d29c0);this['stopListening'](_0x5bf889),this['stopListening'](_0x6d29c0['view']),_0x5bf889['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x6d29c0),this['_sidebarItemViewToAnnotation']['delete'](_0x5bf889);}['_createSidebarView'](){const _0x2dd475=new H(this['context']['locale']);return _0x2dd475['render'](),this['on']('change:_lastItem',(_0x1e958c,_0x32007,_0x428679,_0x46b664)=>{_0x46b664&&_0x2dd475['unbind']('minHeight'),_0x428679?_0x2dd475['bind']('minHeight')['to'](_0x428679,'bottom'):_0x2dd475['minHeight']=null;}),_0x2dd475;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x108936){const _0x2cbc0b=this['_sidebarItemViewToAnnotation']['get'](_0x108936),_0x3517ca=_0x2cbc0b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2cbc0b)-0x1);return _0x3517ca&&this['getSidebarItemView'](_0x3517ca)||null;}['_getItemAfter'](_0x556308){const _0x4fa846=this['_sidebarItemViewToAnnotation']['get'](_0x556308),_0x25fffb=_0x4fa846&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4fa846)+0x1);return _0x25fffb&&this['getSidebarItemView'](_0x25fffb)||null;}['_alignBeforeItem'](_0xec6410,_0x50cd8e){_0xec6410['updateHeight']();const _0x43d97c=G(_0x50cd8e['bottom']+this['_spaceBetweenItems'],_0xec6410['top']);return!!_0x43d97c&&(this['_setItemTop'](_0x50cd8e,_0x50cd8e['top']-_0x43d97c),!0x0);}['_alignAfterItem'](_0x24210c,_0x2e9821){_0x24210c['updateHeight']();const _0x2b0070=G(_0x24210c['bottom']+this['_spaceBetweenItems'],_0x2e9821['top']);return!!_0x2b0070&&(this['_setItemTop'](_0x2e9821,_0x2e9821['top']+_0x2b0070,!0x1),!0x0);}['_alignToTargetRect'](_0x1f1ef1){const _0x185461=this['_sidebarItemViewToAnnotation']['get'](_0x1f1ef1);if(!_0x185461||!_0x185461['target']||!_0x185461['targetRect'])return;const _0x59b2bc=this['_getTargetTop'](_0x185461,_0x185461['targetRect']);this['_setItemTop'](_0x1f1ef1,_0x59b2bc);}['_getTargetTop'](_0x4a1cc7,_0x52b017){if(null===_0x52b017)return 0x0;if(_0x4a1cc7['target']instanceof _0x3dcdfa)return _0x52b017['top'];{const _0x2a9270=new _0x3dcdfa(this['view']['element'])['top'];return _0x52b017['top']-_0x2a9270;}}['_setItemTop'](_0x10c582,_0x53ac0c,_0x48ccc0=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x48ccc0&&(_0x53ac0c=Math['max'](_0x53ac0c,this['_getMaxAvailableTop'](_0x10c582))),_0x10c582['top']=_0x53ac0c;}['_getMaxAvailableTop'](_0x1c8b90){let _0x1642a5=this['_getItemBefore'](_0x1c8b90),_0x5df7d3=0x0;for(;_0x1642a5;)_0x1642a5['updateHeight'](),_0x5df7d3+=this['_spaceBetweenItems']+_0x1642a5['height'],_0x1642a5=this['_getItemBefore'](_0x1642a5);return _0x5df7d3;}}function G(_0x3ca5a4,_0x1c1299){return Math['max'](_0x3ca5a4-_0x1c1299,0x0);}function g(_0x5a943a){return null!==_0x5a943a&&'object'==typeof _0x5a943a&&0x1===_0x5a943a['nodeType'];}class e extends _0x388a6f{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x58a7cf){super(_0x58a7cf),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x504ada(),this['_refreshPositioningDebounced']=_0x12b399(()=>{_0x58a7cf['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x9d6925=this['context']['plugins']['get'](j),_0x81610=this['context']['plugins']['get'](z);_0x9d6925['register']('wideSidebar',this),_0x81610['container']&&_0x9d6925['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x36c16f){if(_0x36c16f===this['activeAnnotation'])return;const _0x3f77a6=this['context']['plugins']['get'](z);_0x3f77a6['_activeAnnotation']=_0x36c16f;const _0xacc878=this['activeAnnotation'];_0x3f77a6['refresh']({'blurredAnnotation':_0xacc878,'activatedAnnotation':_0x36c16f}),this['activeAnnotation']=_0x36c16f;}['attach'](_0x76c379){this['annotations']=_0x76c379;const _0x61c103=this['context']['plugins']['get'](z);if(_0x61c103['_annotations']=_0x76c379,this['isAttached'])throw new _0x274fd1('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x61c103,'set:container',()=>{this['detach'](),this['listenTo'](_0x61c103,'change:container',_0xe1cb77=>{_0xe1cb77['off'](),this['attach'](_0x76c379);});}),_0x61c103['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x42d242=_0x3b62f3=>{_0x3b62f3['updateTargetRect'](),_0x61c103['addAnnotation'](_0x3b62f3);};for(const _0x3e7aec of _0x76c379)_0x42d242(_0x3e7aec);this['listenTo'](_0x76c379,'add',(_0x5ed9cf,_0x58a725)=>{_0x42d242(_0x58a725);}),this['listenTo'](_0x76c379,'remove',(_0x2e2507,_0x267e67,_0xffda5f)=>{_0x61c103['rearrange']({'removedAnnotation':_0x267e67,'previousAnnotation':_0x76c379['get'](_0xffda5f-0x1),'nextAnnotation':_0x76c379['get'](_0xffda5f+0x1)}),_0x267e67===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x76c379,'focus',(_0x5baa52,_0x20abe4)=>{this['setActiveAnnotation'](_0x20abe4);}),this['listenTo'](_0x76c379,'blur',()=>{this['setActiveAnnotation'](null);});const _0xda44fa=this['context']instanceof _0x3a3651?this['context']['editors']:new _0x504ada([this['context']]);for(const _0x495875 of _0xda44fa)this['_integrateWithEditorAnnotations'](_0x495875);this['listenTo'](_0xda44fa,'add',(_0x10efd2,_0x328780)=>{this['listenTo'](_0x328780,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x328780);});}),this['listenTo'](_0xda44fa,'remove',(_0x1a5caa,_0x1a1322)=>{_0x1a1322['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1a1322['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x274fd1('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5d4f07=this['context']['plugins']['get'](z);_0x5d4f07['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5d4f07),this['stopListening'](this['annotations']),this['context']instanceof _0x3a3651&&this['stopListening'](this['context']['editors']);for(const _0x211183 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x211183);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3b82ff){if(!_0x3b82ff['plugins']['has']('EditorAnnotations'))return;const _0x34ad9e=_0x3b82ff['plugins']['get']('EditorAnnotations'),_0x22b2d2=()=>{const _0x3a0b8f=_0x34ad9e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3a0b8f[0x0]||null);};this['listenTo'](_0x34ad9e,'refresh',_0x22b2d2),this['listenTo'](_0x34ad9e,'blur',(_0x32c90b,{isAnnotationTracked:_0x1827ce})=>{this['activeAnnotation']&&_0x1827ce(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x34ad9e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x557048=>{_0x34ad9e['hasDomSelection']()&&(_0x22b2d2(),_0x557048['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x34ad9e);}['_destroyEditorAnnotationsIntegration'](_0x4c8d8f){this['stopListening'](_0x4c8d8f),this['_editorAnnotations']['remove'](_0x4c8d8f);}}class C extends _0x13fccc{['counterView'];constructor(_0x54779a){super(_0x54779a);const _0x1b2e5a=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x21b323,_0x3e76b9)=>_0x21b323?'...':_0x3e76b9['toString']()),this['set']('annotationType',''),this['icon']=_0x14f2f4,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1b2e5a['to']('annotationType',_0x4c7683=>'ck-annotation-counter__badge--'+_0x4c7683),_0x1b2e5a['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1b2e5a['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x388a6f{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f3938){super(_0x2f3938),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3fda0f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x504ada(),this['_refreshPositioningDebounced']=_0x12b399(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x308b40(this['context']['locale']),this['balloonPanelView']=new _0x1d2c37(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x490417){this['annotations']=_0x490417;const _0x3e5bf2=this['context']['plugins']['get'](z),_0x5793be=this['balloonPanelView'];if(_0x3e5bf2['_annotations']=_0x490417,this['isAttached'])throw new _0x274fd1('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3e5bf2,'set:container',()=>{this['detach'](),this['listenTo'](_0x3e5bf2,'change:container',_0x19ec37=>{_0x19ec37['off'](),this['attach'](_0x490417);});}),_0x3e5bf2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x65fb4e=_0x26163a=>{const _0xd80b60=new C(this['context']['locale']);_0x3e5bf2['addAnnotation'](_0x26163a,_0xd80b60),this['_annotationToNarrowView']['set'](_0x26163a,_0xd80b60),_0xd80b60['bind']('isDirty','annotationType','number')['to'](_0x26163a['view'],'isDirty','type','length'),_0xd80b60['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5793be['content']['first']!==_0x26163a['view']?(this['_showBalloon'](_0x26163a),_0x26163a['view']['element']['focus'](),this['setActiveAnnotation'](_0x26163a)):this['setActiveAnnotation'](null);});};for(const _0x334b52 of _0x490417)_0x65fb4e(_0x334b52);this['listenTo'](_0x490417,'add',(_0x28c066,_0x3ff0c6)=>{_0x65fb4e(_0x3ff0c6);}),this['listenTo'](_0x490417,'remove',(_0x1deb64,_0x2d3f99,_0x20aaa1)=>{this['_annotationToNarrowView']['get'](_0x2d3f99)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2d3f99),_0x3e5bf2['rearrange']({'removedAnnotation':_0x2d3f99,'previousAnnotation':_0x490417['get'](_0x20aaa1-0x1),'nextAnnotation':_0x490417['get'](_0x20aaa1+0x1)}),_0x2d3f99===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x490417,'focus',(_0x4b7040,_0x4cc94e)=>{this['setActiveAnnotation'](_0x4cc94e);}),this['listenTo'](_0x490417,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x51878f,_0x4056c0)=>{_0x4056c0['keyCode']===_0x50541b['esc']&&_0x5793be['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5793be['content']['first']),this['_hideBalloon'](),_0x4056c0['stopPropagation'](),_0x4056c0['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1fb495,_0x323e5e)=>{const _0x58dfc7=_0x323e5e['target'];_0x5793be['isVisible']&&_0x5793be['element']['contains'](_0x58dfc7)||_0x3e5bf2['view']['element']['contains'](_0x58dfc7)||_0x1fb495['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x193b03=>_0x193b03['contains'](_0x58dfc7))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3b5687=this['context']instanceof _0x3a3651?this['context']['editors']:new _0x504ada([this['context']]);for(const _0x1d6e78 of _0x3b5687)this['_integrateWithEditorAnnotations'](_0x1d6e78);this['listenTo'](_0x3b5687,'add',(_0x3d52b0,_0x4b99bd)=>{this['listenTo'](_0x4b99bd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4b99bd);});}),this['listenTo'](_0x3b5687,'remove',(_0x11f332,_0x3a26ab)=>{_0x3a26ab['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a26ab['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2b9d54){if(_0x2b9d54===this['activeAnnotation'])return;const _0x2e36fb=this['context']['plugins']['get'](z);if(_0x2e36fb['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2b9d54,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2b9d54)_0x2e36fb['getSidebarItemView'](_0x2b9d54)?this['_showBalloon'](_0x2b9d54):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2b9d54;}['detach'](){if(!this['isAttached'])throw new _0x274fd1('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x429703=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x42c854=>_0x42c854['destroy']()),this['_annotationToNarrowView']['clear'](),_0x429703['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3a3651&&this['stopListening'](this['context']['editors']);for(const _0x23e830 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x23e830);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0xca5fdc){if(!_0xca5fdc['plugins']['has']('EditorAnnotations'))return;const _0x4e10a2=_0xca5fdc['plugins']['get']('EditorAnnotations'),_0x375a2a=this['context']['plugins']['get'](z),_0x2f1134=this['annotations'],_0x45ce88=this['balloonPanelView'],_0x334c16=()=>{const _0x2e1fc5=_0x4e10a2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2e1fc5),this['setActiveAnnotation'](_0x2e1fc5[0x0]||null);};this['listenTo'](_0x4e10a2,'refresh',_0x334c16),this['listenTo'](_0x4e10a2,'blur',(_0x35f479,{isAnnotationTracked:_0x5b9dec})=>{this['activeAnnotation']&&_0x5b9dec(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4e10a2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2f1134,'blur',_0x1950ba=>{_0x4e10a2['hasDomSelection']()&&_0x1950ba['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x45f8ea,_0x465240)=>{const _0x184b29=_0x465240['target'];_0x45ce88['isVisible']&&_0x45ce88['element']['contains'](_0x184b29)||_0x375a2a['view']['element']['contains'](_0x184b29)||this['activeAnnotation']&&_0x4e10a2['hasDomSelection']()&&(_0x334c16(),_0x45f8ea['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4e10a2);}['_destroyEditorAnnotationsIntegration'](_0x44ff47){_0x44ff47&&(this['stopListening'](_0x44ff47),this['_editorAnnotations']['remove'](_0x44ff47));}['_setSelectedAnnotations'](_0x5735af){for(const _0x530042 of this['_selectedAnnotations'])_0x5735af['includes'](_0x530042)||this['_manuallyClosedAnnotationViews']['delete'](_0x530042['view']);this['_selectedAnnotations']=_0x5735af;}['_refreshPositioning'](){const _0xb0f7d5=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xb0f7d5['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x489047){if(this['_manuallyClosedAnnotationViews']['has'](_0x489047['view']))return;const _0x30ffde=this['balloonPanelView']['content']['first'];_0x30ffde!==_0x489047['view']?(_0x30ffde&&this['_detachListeners'](_0x30ffde),this['_attachListeners'](_0x489047['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x489047['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1654db=this['balloonPanelView']['content']['first'],_0x488dd0=_0x1654db&&this['annotations']['getByView'](_0x1654db);if(!_0x488dd0||!this['_annotationToNarrowView']['has'](_0x488dd0))return;const _0x1195f4=this['_annotationToNarrowView']['get'](_0x488dd0)['element'],_0x2d59f6=(function(){const _0x12bcb5=_0x1d2c37['defaultPositions'];return[_0x12bcb5['southArrowNorthEast'],_0x12bcb5['northArrowSouthEast'],_0x12bcb5['southArrowNorth'],_0x12bcb5['northArrowSouth'],_0x12bcb5['southArrowNorthWest'],_0x12bcb5['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1195f4,'positions':_0x2d59f6});}['_hideBalloon'](){const _0x23db2f=this['balloonPanelView'],_0xdd260e=_0x23db2f['content']['first'];_0xdd260e&&(this['_detachListeners'](_0xdd260e),_0x23db2f['unpin'](),_0x23db2f['content']['clear']());}['_attachListeners'](_0x48f9d6){this['listenTo'](_0x48f9d6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x48f9d6,'Esc',(_0x3c4860,_0xe01ab5)=>{this['_manuallyClosedAnnotationViews']['add'](_0x48f9d6),this['_hideBalloon'](),_0xe01ab5();});}['_detachListeners'](_0x5cdf70){this['stopListening'](_0x5cdf70);}}class c extends _0x35651a{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2e5f1d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x497c67){super(_0x497c67),_0x497c67['editing']['view']['addObserver'](_0xbea9b9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x497c67['plugins']['get'](_0x2e5f1d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xe6d4ab=this['editor']['plugins']['get'](j);_0xe6d4ab['context']===this['editor']&&(_0xe6d4ab['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1faaf7,_0x371428)=>{const _0x463606=this['_balloon'];if(this['isAttached']&&_0x463606['visibleView']){const _0x3b2af8=this['annotations']['getByView'](_0x463606['visibleView']);_0x3b2af8&&this['_closeAnnotation'](_0x3b2af8),_0x371428();}}));}['afterInit'](){const _0x46d39a=this['editor']['plugins']['get'](j);_0x46d39a['context']===this['editor']&&(_0x46d39a['hasActive']()||_0x46d39a['switchTo']('inline'));}['setActiveAnnotation'](_0x1e223b){_0x1e223b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1e223b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1e223b)&&this['_addAnnotationToBalloon'](_0x1e223b,!0x0),_0x1e223b['isActive']=!0x0),_0x1e223b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1e223b);}['attach'](_0x568430){this['annotations']=_0x568430;const _0x19115d=this['editor']['plugins']['get'](j),_0x267b1d=this['_balloon'];if(this['isAttached'])throw new _0x274fd1('inlineannotations-attach-already-attached',this);if(_0x19115d['context']!==this['editor'])throw new _0x274fd1('inlineannotations-not-allowed-with-context',this);const _0x3d9dff=this['editor']['plugins']['get'](b);this['listenTo'](_0x3d9dff,'refresh',()=>{const _0x1e846c=_0x3d9dff['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x573b8b,_0x429d5b;!this['_forceRefresh']&&(_0x573b8b=_0x1e846c,_0x429d5b=this['_selectedAnnotations'],_0x573b8b['length']===_0x429d5b['length']&&_0x573b8b['every'](_0x3c274c=>_0x429d5b['includes'](_0x3c274c)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1e846c),this['setActiveAnnotation'](_0x1e846c[0x0]||null));}),this['listenTo'](_0x3d9dff,'blur',(_0xa47002,{isAnnotationTracked:_0x2af247})=>{this['activeAnnotation']&&_0x2af247(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x38c126,_0x2e513d,_0xb9a91b)=>{_0xb9a91b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x568430,'remove',(_0x13c544,_0x4b27a4)=>{this['_removeAnnotationFromBalloon'](_0x4b27a4),_0x4b27a4===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x267b1d,'change:visibleView',(_0x3bbfd5,_0x3571e4,_0x44f4a8,_0x3765a5)=>{_0x3765a5&&this['stopListening'](_0x3765a5);const _0x19ae43=_0x568430['getByView'](_0x44f4a8);_0x44f4a8&&_0x19ae43&&(this['listenTo'](_0x44f4a8,'change:height',()=>{_0x267b1d['updatePosition']();}),this['listenTo'](_0x44f4a8,'Esc',()=>{this['_closeAnnotation'](_0x19ae43),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x19ae43&&this['setActiveAnnotation'](_0x19ae43));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x267b1d['visibleView']&&(_0x568430['getByView'](_0x267b1d['visibleView'])&&_0x267b1d['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x274fd1('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1cfae3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1cfae3);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x748942){for(const _0x524791 of this['_selectedAnnotations'])_0x748942['includes'](_0x524791)||this['_manuallyClosed']['delete'](_0x524791);for(const _0x4d0a7b of this['annotations'])_0x748942['includes'](_0x4d0a7b)||this['_removeAnnotationFromBalloon'](_0x4d0a7b);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x349ad0 of _0x748942)this['_addAnnotationToBalloon'](_0x349ad0);}this['_selectedAnnotations']=_0x748942;}['_addAnnotationToBalloon'](_0x2bb61f,_0x4fc9de=!0x1){this['_manuallyClosed']['has'](_0x2bb61f)||(this['_addedAnnotations']['has'](_0x2bb61f)||this['_balloon']['hasView'](_0x2bb61f['view'])||(this['_addedAnnotations']['add'](_0x2bb61f),this['_balloon']['add']({'stackId':_0x2bb61f['view']['id'],'view':_0x2bb61f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2bb61f)}})),_0x4fc9de&&this['_balloon']['showStack'](_0x2bb61f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2222e6){const _0x38d6dd=_0x2222e6['target'],_0x5707b8=this['editor']['editing']['view'],_0x1806d1=_0x5707b8['document']['selection']['getFirstRange'](),_0x3c6951=_0x5707b8['domConverter']['viewRangeToDom'](_0x1806d1);if(_0x3c6951['collapse'](!0x0),_0x38d6dd){if(_0x38d6dd instanceof _0x3dcdfa)return _0x38d6dd;let _0x64edf7=[];for(const _0x5459f9 of _0x38d6dd)_0x64edf7['push'](...F(_0x5459f9['getClientRects']()));_0x64edf7=function(_0x1a7c58){const _0x4ace9d=[];let _0x420083=_0x1a7c58[0x0];for(let _0x32920b=0x1;_0x32920b<_0x1a7c58['length'];_0x32920b++)P(_0x420083,_0x1a7c58[_0x32920b])?_0x420083['width']+=_0x1a7c58[_0x32920b]['width']:(_0x4ace9d['push'](_0x420083),_0x420083=_0x1a7c58[_0x32920b]);return _0x4ace9d['push'](_0x420083),_0x4ace9d;}(_0x64edf7);const _0x49641e=_0x3c6951['getBoundingClientRect']();return _0x64edf7['find'](_0x2141ff=>_0x2141ff['top']<=_0x49641e['top']&&_0x2141ff['bottom']>=_0x49641e['bottom']&&_0x2141ff['left']<=_0x49641e['left']&&_0x2141ff['right']>=_0x49641e['right'])||_0x64edf7[0x0];}return _0x2222e6['targetRect']||_0x3c6951;}['_removeAnnotationFromBalloon'](_0xf38b20){this['_addedAnnotations']['has'](_0xf38b20)&&this['_balloon']['hasView'](_0xf38b20['view'])&&(this['_addedAnnotations']['delete'](_0xf38b20),this['_balloon']['remove'](_0xf38b20['view']));}['_closeAnnotation'](_0x335f4a){this['_manuallyClosed']['add'](_0x335f4a),this['_removeAnnotationFromBalloon'](_0x335f4a);}}function F(_0x589230){return Array['from'](_0x589230)['map'](DOMRect['fromRect']);}function P(_0xaee39b,_0xbeca68){return _0xaee39b['top']===_0xbeca68['top']&&_0xaee39b['bottom']===_0xbeca68['bottom']&&_0xaee39b['right']===_0xbeca68['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x532d6c,_0x187ddd){super(_0x532d6c),this['set']('isEmpty',!_0x187ddd['length']),this['focusTracker']=new _0x43d57e(),this['_annotationViews']=_0x187ddd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5a7382({'focusables':_0x187ddd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x187ddd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x187ddd,'remove',(_0x442d9a,_0x27646f)=>{_0x27646f['isActive']&&this['focus'](),_0x187ddd['length']||(this['isEmpty']=!0x0);});const _0x2a2e5a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x532d6c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x187ddd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2a2e5a['if']('isEmpty','ck-hidden',_0x4f3ada=>!_0x4f3ada)]},'children':[{'text':N(_0x532d6c,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x2f0742 of this['_annotationViews'])this['focusTracker']['add'](_0x2f0742['element']);this['_annotationViews']['on']('change',(_0x13d98c,{added:_0xe5a0f4,removed:_0x2181d2})=>{for(const _0x4052a4 of _0xe5a0f4)this['focusTracker']['add'](_0x4052a4['element']);for(const _0x52ecbe of _0x2181d2)this['focusTracker']['remove'](_0x52ecbe['element']);});}}class p extends _0x388a6f{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x1ecf6a){super(_0x1ecf6a),this['archivedThreads']=new _0x504ada();}['init'](){const _0x5cd10f=this['context'],_0x219019=_0x5cd10f['plugins']['get'](o),_0x1452ff=_0x5cd10f['plugins']['get'](y);this['listenTo'](_0x219019,'addCommentThread',(_0x4695af,{threadId:_0x9d26aa})=>{const _0x2fcbe4=_0x219019['getCommentThread'](_0x9d26aa);_0x2fcbe4['archivedAt']&&this['archivedThreads']['add'](_0x2fcbe4,this['_calculatePosition'](_0x2fcbe4['archivedAt'])),this['listenTo'](_0x2fcbe4,'change:archivedAt',(_0xd01f89,_0x2accd3,_0x5370f8)=>{_0x5370f8?this['archivedThreads']['has'](_0x2fcbe4)||this['archivedThreads']['add'](_0x2fcbe4,this['_calculatePosition'](_0x2fcbe4['archivedAt'])):this['archivedThreads']['has'](_0x2fcbe4)&&this['archivedThreads']['remove'](_0x2fcbe4);});}),this['listenTo'](_0x219019,'removeCommentThread',(_0x3c675e,{threadId:_0x30aa72})=>{const _0x1cc67d=_0x219019['getCommentThread'](_0x30aa72);this['stopListening'](_0x1cc67d),this['archivedThreads']['has'](_0x1cc67d)&&this['archivedThreads']['remove'](_0x1cc67d);},{'priority':'highest'}),this['listenTo'](_0x1452ff['collection'],'focus',(_0xd2871,_0x20f3f6)=>{_0x20f3f6['isVisible']||(_0x20f3f6['isActive']=!0x0,_0x1452ff['activate'](_0x20f3f6));});}['_calculatePosition'](_0x4b3bd6){const _0xd73a3a=[...this['archivedThreads']]['findIndex'](_0x125817=>_0x125817['archivedAt']<_0x4b3bd6);return _0xd73a3a>-0x1?_0xd73a3a:this['archivedThreads']['length'];}}class a extends _0x35651a{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3c85b0];}constructor(_0xe29118){super(_0xe29118),this['annotationViews']=new _0x31ebb9(),this['_pendingThreads']=[];}['init'](){const _0x18cbdc=this['editor'],_0x5d6bcc=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x18cbdc['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x13fccc,!0x0)),_0x18cbdc['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x47fdd9=this['_createCommentsArchiveButton'](_0x339fd3);return _0x47fdd9['set']({'role':'menuitemcheckbox'}),_0x47fdd9;});const _0xab182d=_0x18cbdc['plugins']['get'](p),_0x258868=_0x18cbdc['plugins']['get']('Annotations'),_0x2de03b=_0x18cbdc['plugins']['get']('CommentsRepository');_0xab182d['archivedThreads']['forEach'](_0x2326fa=>{this['_handleNewThread'](_0x2326fa);}),this['listenTo'](_0xab182d['archivedThreads'],'add',(_0x5ec7f0,_0x4aff92)=>{this['_handleNewThread'](_0x4aff92);}),this['listenTo'](_0x258868['collection'],'add',(_0x47ec1d,_0x51d996)=>{const _0x452e9b=this['_pendingThreads']['find'](_0x2e8438=>{const _0x3d82bc=_0x2de03b['_threadToController']['get'](_0x2e8438);return _0x3d82bc&&_0x51d996['innerView']===_0x3d82bc['view'];});if(_0x452e9b){const _0x3e3530=this['_calculatePosition'](_0x452e9b['archivedAt']);this['annotationViews']['add'](_0x51d996['view'],_0x3e3530),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x452e9b),0x1);}}),this['listenTo'](_0xab182d['archivedThreads'],'remove',(_0x54b62b,_0x388137)=>{const _0x37caa7=_0x18cbdc['config']['get']('collaboration.channelId');if(!_0x37caa7||_0x388137['channelId']===_0x37caa7){if(this['_pendingThreads']['includes'](_0x388137))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x388137),0x1);else{const _0x3acd4a=_0x2de03b['_threadToController']['get'](_0x388137),_0x2e2f76=_0x258868['getByInnerView'](_0x3acd4a['view']);this['annotationViews']['remove'](_0x2e2f76['view']),this['stopListening'](_0x2e2f76['focusableElements']);}}}),this['listenTo'](_0x258868['collection'],'add',(_0x4abf65,_0x124792)=>{this['listenTo'](_0x124792,'escape',_0x5d6bcc);}),this['listenTo'](_0x258868['collection'],'remove',(_0x4921d3,_0x5983f8)=>{this['stopListening'](_0x5983f8,'escape',_0x5d6bcc);});}['_handleNewThread'](_0x34867b){const _0x42df52=this['editor']['plugins']['get']('CommentsRepository'),_0x1042ca=this['editor']['plugins']['get']('Annotations'),_0x34941b=this['editor']['config']['get']('collaboration.channelId');if(!_0x34941b||_0x34867b['channelId']===_0x34941b){const _0x5aa367=_0x42df52['_threadToController']['get'](_0x34867b);if(!_0x5aa367)return void this['_pendingThreads']['push'](_0x34867b);const _0xf364c=this['_calculatePosition'](_0x34867b['archivedAt']),_0x13b9ca=_0x1042ca['getByInnerView'](_0x5aa367['view']);_0x13b9ca['isVisible']&&_0x1042ca['_visibleAnnotations']['remove'](_0x13b9ca),this['annotationViews']['add'](_0x13b9ca['view'],_0xf364c);}}['_calculatePosition'](_0x2131a3){const _0x38c792=this['editor']['config']['get']('collaboration.channelId'),_0x3eb46d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x47e1f6=>_0x47e1f6['channelId']===_0x38c792)['findIndex'](_0x46cf70=>_0x46cf70['archivedAt']<_0x2131a3);return _0x3eb46d<0x0||_0x3eb46d>this['annotationViews']['length']?this['annotationViews']['length']:_0x3eb46d-0x1;}['_toggleDialog'](){const _0x501d3c=this['editor'],_0x23b233=_0x501d3c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x501d3c['locale'],this['annotationViews'])),'commentsArchive'===_0x23b233['id']?_0x23b233['hide']():_0x23b233['show']({'id':'commentsArchive','title':N(_0x501d3c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x37f55e,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4c44fd['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x33a533,_0x47d587=!0x1){const _0x4fb832=this['editor']['locale'],_0x5f5479=this['editor']['plugins']['get']('Dialog'),_0x44e425=new _0x33a533(_0x4fb832);return _0x44e425['bind']('isEnabled')['to'](this,'isEnabled'),_0x44e425['bind']('isOn')['to'](_0x5f5479,'id',_0x249b10=>'commentsArchive'===_0x249b10),_0x44e425['set']({'label':N(_0x4fb832,'COMMENTS_ARCHIVE'),'icon':_0x37f55e,'isToggleable':!0x0}),_0x47d587&&(_0x44e425['tooltip']=!0x0),this['listenTo'](_0x44e425,'execute',()=>this['_toggleDialog']()),_0x44e425;}['_hideDialogOnAnnotationEscape']=_0x5da0ad=>{const _0x38f265=_0x5da0ad['source'];if(!this['annotationViews']['has'](_0x38f265['view']))return;const _0x3c9be9=this['editor']['plugins']['get']('Dialog');_0x3c9be9['isOpen']&&'commentsArchive'===_0x3c9be9['id']&&(_0x3c9be9['hide'](),_0x5da0ad['stop']());};}class gi extends _0x35651a{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,gt as CommentThreadController,ie as CommentThreadInputView,Tt as CommentThreadView,_t as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|