@ckeditor/ckeditor5-comments 47.4.0-alpha.4 → 47.4.0-alpha.6
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/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +19 -19
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- 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/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- 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/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.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/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.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(_0x629d73={}){function _0x3d6475(_0x135b85){return _0x135b85['map'](_0x215d0b=>String['fromCharCode'](_0x215d0b))['join']('');}(_0x629d73=Object['assign']({},_0x629d73))['plugins']||(_0x629d73['plugins']=hs['defaultPlugins']),super(_0x629d73),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3d6475([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d6475([0x76,0x69,0x65,0x77])][_0x3d6475([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3d6475([0x61,0x75,0x74,0x6f]),this[_0x3d6475([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3d6475([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3d6475([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3d6475([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3d6475([0x6f,0x6b])});}['create'](){const _0x320151=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x320151))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3e0c81=>{const _0x286f36=this['model']['document']['getRoot'](),_0x53053a=_0x286f36&&_0x286f36['getChild'](_0x286f36['childCount']-0x1);_0x3e0c81['setSelection'](_0x53053a,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xa04e76=this['editing']['view'],_0x4811d5=_0xa04e76['document']['getRoot'](),_0x46a543=_0x4811d5['getChild'](0x0);_0x4811d5['childCount']>0x1||!_0x46a543||'p'!=_0x46a543['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0xa04e76,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x46a543['placeholder']=this['placeholder']),Ft({'view':_0xa04e76,'element':_0x46a543,'keepOnFocus':!0x0}),this['placeholderElement']=_0x46a543);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x10d5af,_0x55b194={}){super(_0x10d5af),this['editor']=null,this['_editorConfig']=_0x55b194,this['set']('value',_0x55b194['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x10d5af,'Reply...')),this['set']('submitLabel',N(_0x10d5af,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x290ee8(),this['focusCycler']=new _0x35defd({'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',(_0x4946ec,_0x586796)=>{this['cancelButtonView']['fire']('execute'),_0x586796();}),this['keystrokes']['set']('Ctrl+Enter',(_0xf6b92e,_0x3fd9e4)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3fd9e4());}),this['on']('submit',(_0x535177,_0x1fb942)=>{_0x1fb942['length']>0xfde8?(alert(N(_0x10d5af,'TOO_LONG_COMMENT_ALERT',[_0x1fb942['length'],0xfde8])),_0x535177['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xafcfd4=this['editor'];this['element']['insertBefore'](_0xafcfd4['ui']['element'],this['element']['firstChild']),_0xafcfd4['model']['document']['on']('change',()=>this['value']=_0xafcfd4['getData']()),_0xafcfd4['bind']('placeholder')['to'](this),this['focusables']['add'](_0xafcfd4['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x21a226){-0x1===_0x21a226?(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:_0x35b5cf}=this,_0x101577=new _0x5281d3(_0x35b5cf);return _0x101577['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x101577['withText']=!0x0,_0x101577['bind']('label')['to'](this,'submitLabel'),_0x101577['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x101577['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2a0c3d,_0x1d9d0a)=>!_0x1d9d0a&&!!_0x2a0c3d['trim']()),_0x101577;}['_createCancelButton'](){const {locale:_0xfc02f1}=this,_0x1b812e=new _0x5281d3(_0xfc02f1);return _0x1b812e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1b812e['label']=N(_0xfc02f1,'Cancel'),_0x1b812e['withText']=!0x0,_0x1b812e['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1b812e;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4d6dbd=>{this['focusTracker']['add'](_0x4d6dbd['element']);}),this['focusables']['on']('change',(_0x34dbca,_0x421cac)=>{for(const _0xc6045c of Array['from'](_0x421cac['added'])['reverse']())this['focusTracker']['add'](_0xc6045c['element']);});}}class ie extends kt{constructor(_0x17b628,_0x33c07f,_0x233c28){super(_0x17b628),this['commentInputView']=new es(_0x17b628,_0x233c28),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1995ac,_0x147f1e)=>_0x1995ac||!!_0x147f1e),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 _0x5e6680(_0x17b628,_0x33c07f),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'](_0x11047c){this['commentInputView']['focus'](_0x11047c);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xc64aef,_0x57af9a)=>{const {submitButtonView:_0x5d0664,cancelButtonView:_0x283569,editor:_0x54826e}=this['commentInputView'];[_0x5d0664['element'],_0x283569['element'],_0x54826e?_0x54826e['editing']['view']['getDomRoot']():null]['filter'](_0x33221d=>_0x33221d)['some'](_0x41da11=>_0x41da11['contains'](_0x57af9a['target']))||(this['focus'](),_0x57af9a['preventDefault']());});}}class rs extends kt{constructor(_0x5a53c7){super(_0x5a53c7);const _0x487656=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x487656['to']('count',_0x1c4d1b=>N(_0x5a53c7,'NUMBER_OF_COMMENTS',_0x1c4d1b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x139642,_0x2909ec,_0x4ff097){super(_0x139642);const _0x50bdd9=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2909ec['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2909ec,this['_config']=_0x4ff097,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x290ee8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x35defd({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5070f5=>this['commentViews']['map'](_0x566d17=>_0x566d17['element'])['includes'](_0x5070f5['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x139642),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1eadbd=>_0x1eadbd-this['_config']['maxCommentsWhenCollapsed']);for(const _0xa345fe of _0x2909ec['comments'])this['_handleNewCommentModel'](_0xa345fe);this['_handleInfoComment'](),this['listenTo'](_0x2909ec['comments'],'add',(_0x35765f,_0x9c9b91)=>{const _0x3af9d7=this['_calculatePosition'](_0x9c9b91);this['length']++,this['_handleNewCommentModel'](_0x9c9b91,_0x3af9d7),this['refreshVisibleViews']();}),this['listenTo'](_0x2909ec['comments'],'remove',(_0x384d6b,_0x42d8ef)=>{this['length']--,this['_handleRemoveCommentModel'](_0x42d8ef),this['refreshVisibleViews']();}),this['listenTo'](_0x2909ec,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2909ec,'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',_0x50bdd9['if']('length','ck-hidden',_0x51b054=>!_0x51b054)],'aria-label':N(_0x139642,'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'](_0x262a2a){-0x1===_0x262a2a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5f4440 of this['commentViews'])_0x5f4440['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1e8489,_0x5ad06f){const _0x4c5639=new this['_config']['CommentView'](this['locale'],_0x1e8489,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4c5639['viewUid']=_0x1e8489['id'],_0x4c5639['delegate']('removeComment')['to'](this),_0x4c5639['delegate']('updateComment')['to'](this),_0x4c5639['delegate']('resolveCommentThread')['to'](this),_0x4c5639['delegate']('editorReady')['to'](this),_0x4c5639['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4c5639,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4c5639,_0x5ad06f);}['_calculatePosition'](_0x2796c7){const _0x4fe991=this['_model']['_findOptimalIndex'](_0x2796c7);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2796c7['authoredAt']?_0x4fe991-0x1:_0x4fe991:_0x4fe991-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4cc3f2={'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'],_0x4cc3f2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4cc3f2));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x305024){const _0x4d6b7a=this['commentViews']['remove'](_0x305024['id']);this['stopListening'](_0x4d6b7a),_0x4d6b7a['isEditMode']&&this['_updateHasDirtyComment'](),_0x4d6b7a['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5ab365=>_0x5ab365['isEditMode']);}['_rearrangeCollapse'](){const _0x26a721=function(_0x4e6749){const _0x4c1531=new _0x5db265();for(const _0x18c9dc of _0x4e6749)_0x4c1531['add'](_0x18c9dc);return _0x4c1531;}(this['commentViews']),_0x4ca3cc=this['_collapsedCommentsView']['count'];for(let _0x4cae4b=0x1;_0x4cae4b<=_0x4ca3cc;_0x4cae4b++)_0x26a721['remove'](0x1);for(const _0xac5adf of _0x26a721)_0xac5adf['collapse']();_0x4ca3cc>0x0&&_0x26a721['add'](this['_collapsedCommentsView'],0x1),ns(_0x2936d6(Array['from'](this['visibleViews']),Array['from'](_0x26a721)),this['visibleViews'],_0x26a721);}['_rearrangeExpand'](){ns(_0x2936d6(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x134c53 of this['visibleViews'])_0x134c53['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2f1391=>{this['focusTracker']['add'](_0x2f1391['element']),this['keystrokes']['listenTo'](_0x2f1391['element']);}),this['commentViews']['on']('change',(_0x309d6d,_0x4f749a)=>{for(const _0x60dc7d of _0x4f749a['removed'])this['focusTracker']['remove'](_0x60dc7d['element']),this['keystrokes']['stopListening'](_0x60dc7d['element']);for(const _0x2fd517 of Array['from'](_0x4f749a['added'])['reverse']())this['focusTracker']['add'](_0x2fd517['element']),this['keystrokes']['listenTo'](_0x2fd517['element']);});}}function ns(_0xe7231a,_0x2e44e1,_0x508e5b){let _0x5f5b84=0x0;for(const _0x733b0d of _0xe7231a)switch(_0x733b0d){case'insert':_0x2e44e1['add'](_0x508e5b['get'](_0x5f5b84),_0x5f5b84),_0x5f5b84++;break;case'delete':_0x2e44e1['remove'](_0x5f5b84);break;case'equal':_0x5f5b84++;}}class oe extends kt{constructor(_0x4f32c2){super(_0x4f32c2);const _0x4bec07=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4bec07['to']('contextValue',_0x59cc01=>N(_0x4f32c2,'THREAD_CONTEXT_LABEL',_0x59cc01)),'tabindex':-0x1},'children':[{'text':_0x4bec07['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x275509,_0xf445e9){super(_0x275509);const _0x2b5f6c=this['bindTemplate'];this['_model']=_0xf445e9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x290ee8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x35defd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5dd43e=>!!_0x5dd43e),this['bind']('contextValue')['to'](this['_model'],'context',_0x464a1b=>_0x464a1b&&_0x464a1b['value']?this['_trimContextValue'](_0x464a1b['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',_0x2b5f6c['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 _0x3aecfc=new _0x5281d3(this['locale']);return _0x3aecfc['label']=N(this['locale'],'Reopen'),_0x3aecfc['tooltip']=N(this['locale'],'Reopen'),_0x3aecfc['icon']=_0x3bdff5,_0x3aecfc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d8b4d=>!_0x1d8b4d),_0x3aecfc['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x57a42e,_0x52cb77)=>_0x57a42e&&_0x52cb77),_0x3aecfc['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3aecfc;}['_trimContextValue'](_0x2694c1){if(_0x2694c1['length']<0x96)return _0x2694c1;const _0x1a1710=_0x2694c1['lastIndexOf']('\x20',0x93);return _0x2694c1['substring'](0x0,_0x1a1710>-0x1?_0x1a1710:0x93)+'...';}['_attachContextActions'](){const _0x2fc7ef=this['element']['querySelector']('.ck-context'),_0x5ea422=_0x2fc7ef['querySelector']('.ck-context__value');this['listenTo'](_0x2fc7ef,'mouseenter',()=>{_0x5ea422['offsetWidth']<_0x5ea422['scrollWidth']&&_0x2fc7ef['classList']['add']('overlay');}),this['listenTo'](_0x2fc7ef,'mouseleave',()=>{_0x2fc7ef['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x50f0f7 of this['focusables'])this['focusTracker']['add'](_0x50f0f7['element']),this['keystrokes']['listenTo'](_0x50f0f7['element']);}['_createContextView'](){const _0xe90e3f=new oe(this['locale']);return _0xe90e3f['bind']('contextValue')['to'](this),_0xe90e3f;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x15bb76,_0xde4fc3,_0x5a96f2,_0x2a7af6){super(_0x15bb76),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xde4fc3,this['_localUser']=_0x5a96f2,this['_config']=_0x2a7af6,this['commentThreadHeaderView']=new Xt(_0x15bb76,_0xde4fc3),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x15bb76,N(_0x15bb76,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x15bb76,_0xde4fc3,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2a7af6)),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',(_0x284c7b,_0x4b16e3)=>_0x284c7b||!!_0x4b16e3),this['bind']('isUnlinked')['to'](_0xde4fc3,'unlinkedAt',_0x5a111e=>!!_0x5a111e),this['bind']('ariaLabel')['to'](this,'length',_0x10d1eb=>{const _0x5268ab=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x10d1eb,_0x5268ab]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x290ee8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x35defd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5c70aa=>_0x5c70aa['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2ac2b0=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x9dfc2c=_0x2ac2b0['commentInputView'];return _0x2ac2b0['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x9dfc2c,'value',(_0x5420f1,_0x25fb02,_0x2a88b3,_0x4face5,_0x2e16ca)=>!!_0x2e16ca||!!_0x4face5&&_0x2a88b3&&!_0x25fb02||_0x5420f1&&_0x2a88b3&&!_0x25fb02),_0x9dfc2c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4f06dd,_0xfc3c72,_0x1d9080)=>{let _0x5812a4;return _0x5812a4=_0x1d9080&&_0xfc3c72?'Reply\x20to\x20reopen\x20discussion...':_0x4f06dd?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5812a4);}),_0x9dfc2c['bind']('submitLabel')['to'](this,'length',_0x340aad=>N(this['locale'],_0x340aad?'Reply':'Comment')),_0x9dfc2c['on']('submit',(_0x237009,_0x129b21)=>{this['fire']('addComment',_0x129b21),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x9dfc2c['on']('cancel',()=>{this['focus']();}),_0x9dfc2c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x9dfc2c['on']('cancel',_0x1c0697=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1c0697['stop']());}),this['on']('change:isActive',(_0xf91f1,_0x4191f4,_0x1eb1d2)=>{_0x1eb1d2||this['length']||_0x9dfc2c['value']||this['fire']('removeCommentThread');}),_0x2ac2b0;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x478ae2(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1f0ae7,target:_0x5a650c,type:_0x2cd114,isVisible:_0x2e96b4=!0x0}){super(),this['view']=_0x1f0ae7,this['view']['element']||this['view']['render'](),this['_type']=_0x2cd114,this['_target']=_0x5a650c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5db265([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x517e9e,_0x5db69a)=>{this['view']['focusTracker']['add'](_0x5db69a);}),this['focusableElements']['on']('remove',(_0x1602e3,_0x3ec4b7)=>{this['view']['focusTracker']['remove'](_0x3ec4b7);}),this['set']('isVisible',_0x2e96b4);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x64c082=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x64c082),_0x64c082;}get['targetRect'](){const _0x19395a=this['target'];if(null===_0x19395a)return null;if(_0x19395a instanceof _0x5ba026)return _0x19395a;const _0x3a2200=_0x19395a['filter'](_0x433267=>function(_0x5ab4fe){const _0x57e89c=_0x5ab4fe['offsetParent'];if(_0x57e89c)return!0x0;const _0x5384d2=_0x5ab4fe['getClientRects']()['item'](0x0);return!!_0x5384d2;}(_0x433267));return 0x0===_0x3a2200['length']?null:new _0x5ba026(_0x3a2200[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3c0e14){this['view']['isActive']=_0x3c0e14,this['view']['mainView']['isActive']=_0x3c0e14;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4bb58c){if(!(null===_0x4bb58c||_0x4bb58c instanceof _0x5ba026||Array['isArray'](_0x4bb58c)&&_0x4bb58c['every'](_0x2da8db=>fi(_0x2da8db))))throw new _0x50bda('annotation-invalid-target',null,{'target':_0x4bb58c});}['_getNormalizedTarget'](){const _0x5ecdd1='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5ecdd1)?[_0x5ecdd1]:_0x5ecdd1;}}function fi(_0x48d25a){return null!==_0x48d25a&&'object'==typeof _0x48d25a&&'nodeType'in _0x48d25a&&0x1===_0x48d25a['nodeType'];}class S extends _0x5db265{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2742af=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x290ee8(),this['_focusTracker']['on']('change:isFocused',(_0x46bb58,_0x5e5d43,_0x2a1222)=>{_0x2a1222||this['fire']('blur');});for(const _0x5d3333 of _0x2742af)this['add'](_0x5d3333);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x47275a){if(this['has'](_0x47275a))throw new _0x50bda('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x47275a['innerView'],_0x47275a),this['_viewToAnnotation']['set'](_0x47275a['view'],_0x47275a);for(const _0x254a07 of _0x47275a['focusableElements'])this['_focusTracker']['add'](_0x254a07);this['listenTo'](_0x47275a['focusableElements'],'add',(_0x4123d9,_0x15aea7)=>{this['_focusTracker']['add'](_0x15aea7);}),this['listenTo'](_0x47275a['focusableElements'],'remove',(_0x5594d5,_0x3a8bcd)=>{this['_focusTracker']['remove'](_0x3a8bcd);}),this['listenTo'](_0x47275a['view']['focusTracker'],'change:isFocused',(_0x200232,_0x590b55,_0x3e9ab6)=>{_0x3e9ab6&&this['fire']('focus',_0x47275a);}),_0x47275a['updateTargetRect']();const _0x45068c=this['_getOrderInContent'](_0x47275a['view']['targetRect']);return super['add'](_0x47275a,_0x45068c);}['remove'](_0x4b6a00){if(!this['has'](_0x4b6a00))throw new _0x50bda('annotationcollection-not-existing-item',null);this['stopListening'](_0x4b6a00['view']['focusTracker']),this['stopListening'](_0x4b6a00['focusableElements']);for(const _0x2cbe6c of _0x4b6a00['focusableElements'])this['_focusTracker']['remove'](_0x2cbe6c);return this['_viewToAnnotation']['delete'](_0x4b6a00['view']),this['_innerViewToAnnotation']['delete'](_0x4b6a00['innerView']),super['remove'](_0x4b6a00);}['getByInnerView'](_0xc56d8d){return this['_innerViewToAnnotation']['get'](_0xc56d8d);}['getByView'](_0x152722){return this['_viewToAnnotation']['get'](_0x152722);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x36fe97 of this)_0x36fe97['updateTargetRect']();this['_sort']();}['_sort'](){const _0x10bb47=Array['from'](this)['sort']((_0x5b33f1,_0x3269a0)=>w(_0x5b33f1['view']['targetRect'],_0x3269a0['view']['targetRect']));for(let _0x390454=_0x10bb47['length']-0x1;_0x390454>0x0;_0x390454--){const _0x5e6e2c=_0x10bb47[_0x390454];_0x390454!==this['getIndex'](_0x5e6e2c)&&(this['remove'](_0x5e6e2c),this['add'](_0x5e6e2c));}}['_getOrderInContent'](_0x4d2d9e){let _0x3fe2b1=0x0;if(!_0x4d2d9e)return this['length'];for(const _0x55203f of this){const _0x218e15=_0x55203f['view']['targetRect'];if(_0x218e15){if(w(_0x4d2d9e,_0x218e15)<0x0)return _0x3fe2b1;_0x3fe2b1++;}}return _0x3fe2b1;}}function v({source:_0x121a34,target:_0x357ac8,filter:_0x42dcb7}){for(const _0x1d7ce3 of _0x121a34)_0x42dcb7(_0x1d7ce3)&&_0x357ac8['add'](_0x1d7ce3);_0x357ac8['listenTo'](_0x121a34,'add',(_0x313086,_0x10ddd4)=>{_0x42dcb7(_0x10ddd4)&&_0x357ac8['add'](_0x10ddd4);}),_0x357ac8['listenTo'](_0x121a34,'remove',(_0x45eedc,_0x2dcc69)=>{_0x357ac8['has'](_0x2dcc69)&&_0x357ac8['remove'](_0x2dcc69);});}function w(_0x4da30f,_0x158933){if(null===_0x4da30f&&null===_0x158933)return 0x0;if(null===_0x4da30f)return-0x1;if(null===_0x158933)return 0x1;const _0x117e5f=_0x4da30f['top']-_0x158933['top'];return 0x0==_0x117e5f?_0x4da30f['left']-_0x158933['left']:_0x117e5f;}class y extends _0xdc4a0a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x256d98){if(super(_0x256d98),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x256d98 instanceof _0x210304){const _0xb0e94e=_0x256d98['locale'];_0x256d98['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xb0e94e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xb0e94e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xb0e94e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xb0e94e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xb0e94e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xb0e94e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xb0e94e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x43302f){this['collection']['add'](_0x43302f);}['remove'](_0x34e4ce){this['collection']['remove'](_0x34e4ce),_0x34e4ce['destroy']();}['refreshVisibility'](){for(const _0x27fd4b of this['collection'])_0x27fd4b['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x483a73){return this['collection']['getByInnerView'](_0x483a73);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2efb28 of this['collection'])_0x2efb28['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x792c9e){this['fire']('_activateAnnotation',_0x792c9e);}['createAnnotation'](_0x48b65d){return new T(_0x48b65d);}['createAnnotationView'](_0x23cf14,_0x3b7f69){return new E(_0x23cf14,_0x3b7f69);}['_addActiveAnnotation'](_0x5d169b){const _0x3b4478=new Set(this['activeAnnotations']);_0x3b4478['add'](_0x5d169b),this['activeAnnotations']=_0x3b4478;}['_removeActiveAnnotation'](_0x2de21c){const _0x3436af=new Set(this['activeAnnotations']);_0x3436af['delete'](_0x2de21c),this['activeAnnotations']=_0x3436af;}['_bindAnnotationsToVisibleAnnotations'](){const _0x517a73=this['collection'],_0x278ecb=this['_visibleAnnotations'];function _0x2ba23e(_0x1790bc){const _0x1fc8f6=_0x1790bc['source'];_0x1fc8f6['isVisible']&&!_0x278ecb['has'](_0x1fc8f6)?_0x278ecb['add'](_0x1fc8f6):!_0x1fc8f6['isVisible']&&_0x278ecb['has'](_0x1fc8f6)&&_0x278ecb['remove'](_0x1fc8f6),_0x1fc8f6['view']['focusTracker']['remove'](_0x1fc8f6['view']['element']),_0x1fc8f6['view']['focusTracker']['add'](_0x1fc8f6['view']['element']);}this['listenTo'](_0x517a73,'add',(_0x3c6de6,_0xfa5f9d)=>{_0xfa5f9d['isVisible']&&_0x278ecb['add'](_0xfa5f9d),this['listenTo'](_0xfa5f9d,'change:isVisible',_0x2ba23e);}),this['listenTo'](_0x517a73,'remove',(_0x52bdce,_0x4d3fd7)=>{_0x278ecb['has'](_0x4d3fd7)&&_0x278ecb['remove'](_0x4d3fd7),this['stopListening'](_0x4d3fd7,'change:isVisible',_0x2ba23e);});}['_setupEnterAnnotationKeystroke'](){const _0x29fa1e=_0x54833b=>{_0x54833b['on']('ready',()=>{_0x54833b['keystrokes']['set'](_0x5af35e,(_0x2fd039,_0x306655)=>{const _0x55e06d=_0x306a8b(this['activeAnnotations']['values']());_0x55e06d&&(_0x55e06d['view']['focus'](),_0x306655());});});};this['context']instanceof _0x210304?_0x29fa1e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x553d5a,_0x46aedb)=>{_0x29fa1e(_0x46aedb);});}['_setupEscapeAnnotationHandling'](){const _0x27987e=_0x47adb0=>{const _0x411a91=_0x47adb0['source'],_0x21470a=[];let _0x325235;if(Array['isArray'](_0x411a91['target'])){_0x325235=_0x411a91['target'][0x0],this['context']instanceof _0x210304?_0x21470a['push'](this['context']):this['context']['editors']&&_0x21470a['push'](...this['context']['editors']);for(const _0x5ae413 of _0x21470a)for(const _0x43790a of _0x5ae413['editing']['view']['domRoots']['values']())if(_0x43790a['contains'](_0x325235))return void _0x5ae413['editing']['view']['focus']();_0x325235['focus']();}};this['listenTo'](this['collection'],'add',(_0x53e58f,_0x1a0548)=>{this['listenTo'](_0x1a0548,'escape',_0x27987e,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x40c443,_0x5e9094)=>{this['stopListening'](_0x5e9094,'escape',_0x27987e);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xdc4a0a{['_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(_0x394bd8){super(_0x394bd8),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x494a0b=this['context']['config'];_0x494a0b['define']('comments.maxCommentsWhenCollapsed',0x2),_0x494a0b['define']('comments.maxThreadTotalWeight',0x1f4),_0x494a0b['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x494a0b['define']('comments.CommentThreadView',gt),_0x494a0b['define']('comments.CommentView',Tt),_0x494a0b['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x123a2=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x485756,_0x2db044)=>this['_addCommentThread'](_0x2db044)),this['on']('submitCommentThread',(_0x39afa6,_0x52ce14)=>this['_submitCommentThread'](_0x52ce14)),this['on']('resolveCommentThread',(_0x598297,_0x5e68b1)=>this['_resolveCommentThread'](_0x5e68b1)),this['on']('resolveCommentThread',(_0xb596be,_0x55e4ce)=>this['_updateActiveAnnotation'](_0x55e4ce),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x245655,_0x4781c4)=>this['_reopenCommentThread'](_0x4781c4)),this['on']('reopenCommentThread',(_0x98c853,_0x513e76)=>this['_updateActiveAnnotation'](_0x513e76),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x14be5c,_0x21a132)=>this['_removeCommentThread'](_0x21a132)),this['on']('updateCommentThread',(_0x4b1db1,_0x5a1b77)=>this['_updateCommentThread'](_0x5a1b77)),this['on']('updateCommentThread',(_0x22835f,_0x1f0375)=>this['_updateActiveAnnotation'](_0x1f0375),{'priority':'lowest'}),this['on']('addComment',(_0x26103d,_0x339341)=>this['_addComment'](_0x339341)),this['on']('updateComment',(_0x1fb3dc,_0x57f28d)=>this['_updateComment'](_0x57f28d)),this['on']('removeComment',(_0x4ced00,_0xb12ea1)=>this['_removeComment'](_0xb12ea1)),this['on']('addComment',(_0x38e949,{threadId:_0x5f5622,isFromAdapter:_0x50b483})=>{if(_0x50b483)return;const _0x454fdd=this['getCommentThread'](_0x5f5622),_0x2199ed=_0x454fdd&&this['_threadToController']['get'](_0x454fdd);_0x2199ed&&_0x2199ed['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x123a2,'change:activeAnnotations',(_0x1a5309,_0x42b985,_0x1f7651)=>{const _0x3e0d18=Array['from'](_0x1f7651)['map'](_0x5cca7e=>this['_viewToController']['get'](_0x5cca7e['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3e0d18?_0x3e0d18['model']:null;});}set['adapter'](_0x563501){if(this['_adapter'])throw new _0x50bda('commentsrepository-adapter-already-set');this['_adapter']=_0x563501;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xe59a5a=_t,threadId:_0x453c3f=_0xb5ba6(),comments:_0x2ee6ec=[],unlinkedAt:_0x347940=null,resolvedAt:_0x1281b0=null,resolvedBy:_0x52c17d=null,target:_0xe4526f=null,context:_0x4de7cf=null,attributes:_0x8bf41b={},isResolvable:_0x1a9147=!0x0,isSubmitted:_0x1cd095=!0x1,isFromAdapter:_0x31925f=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xe59a5a),{'channelId':_0xe59a5a,'threadId':_0x453c3f,'comments':_0x2ee6ec,'unlinkedAt':_0x347940,'resolvedAt':_0x1281b0,'resolvedBy':_0x52c17d,'target':_0xe4526f,'context':_0x4de7cf,'attributes':_0x8bf41b,'isFromAdapter':_0x31925f,'isResolvable':_0x1a9147,'isSubmitted':_0x1cd095}),this['getCommentThread'](_0x453c3f);}['openNewCommentThread']({channelId:_0x2eb5cb=_t,threadId:_0x46c670=_0xb5ba6(),target:_0x59a37a,context:_0x5dd0cc=null,isResolvable:_0xbc34d0=!0x0}){if(this['_readOnlyChannels']['has'](_0x2eb5cb)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x59a37a)throw new _0x50bda('commentsrepository-missing-target');const _0x3d4cb6=this['addCommentThread']({'channelId':_0x2eb5cb,'threadId':_0x46c670,'target':_0x59a37a,'context':_0x5dd0cc,'isResolvable':_0xbc34d0});if(!_0x3d4cb6)return null;const _0x56d352=this['_threadToController']['get'](_0x3d4cb6),_0x5278d1=_0x56d352['view']['commentThreadInputView']['commentInputView'],_0x5520ee=this['context']['plugins']['get'](y),_0x11dd51=_0x5520ee['getByInnerView'](_0x56d352['view']);return _0x5520ee['activate'](_0x11dd51),_0x5278d1['once']('editorReady',()=>_0x5278d1['focus']()),_0x3d4cb6;}['hasCommentThread'](_0x4d1c3b){if('string'!=typeof _0x4d1c3b)throw new _0x50bda('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4d1c3b);}['updateCommentThread']({channelId:_0x22b90a=_t,threadId:_0x1bca6b,context:_0x162f81,unlinkedAt:_0x419d87,attributes:_0xdfeba0,isFromAdapter:_0x3cade=!0x1}){return this['fire'](Nt('updateCommentThread',_0x22b90a),{'channelId':_0x22b90a,'threadId':_0x1bca6b,'context':_0x162f81,'unlinkedAt':_0x419d87,'attributes':_0xdfeba0,'isFromAdapter':_0x3cade}),this['getCommentThread'](_0x1bca6b);}['getCommentThread'](_0x3a92c1){if('string'!=typeof _0x3a92c1)throw new _0x50bda('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3a92c1);}['fetchCommentThread']({channelId:_0x4ec907,threadId:_0x339b22}={}){const _0x340ca5=this['getCommentThread'](_0x339b22);if(_0x340ca5)return Promise['resolve'](_0x340ca5);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x50bda('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4ec907,'threadId':_0x339b22})['then'](_0x438b3c=>this['hasCommentThread'](_0x339b22)?this['getCommentThread'](_0x339b22):_0x438b3c?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4ec907},_0x438b3c)):void 0x0)['catch'](_0x77b9ad=>{throw console['error'](_0x77b9ad),new _0x50bda('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x475d1b,skipNotAttached:_0x5d6810=!0x1,skipEmpty:_0x4f8e35=!0x1,toJSON:_0x36f7c4=!0x1}={}){const _0x4619b6=[];for(const _0x3bdc84 of this['_threads']['values']())_0x475d1b&&_0x3bdc84['channelId']!==_0x475d1b||_0x5d6810&&!_0x3bdc84['isAttached']||_0x4f8e35&&0x0===_0x3bdc84['length']||_0x4619b6['push'](_0x3bdc84);return _0x36f7c4?_0x4619b6['map'](_0x5d6b17=>_0x5d6b17['toJSON']()):_0x4619b6;}['getAnnotationForCommentThread'](_0x199425){const _0x2710c0=this['_threadToController']['get'](_0x199425);if(!_0x2710c0)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2710c0['view'])||null;}['getCommentThreadForAnnotation'](_0x126496){const _0x3fca8e=this['_viewToController']['get'](_0x126496['innerView']);return _0x3fca8e?_0x3fca8e['model']:null;}['setActiveCommentThread'](_0x46e36b){const _0x45380d=this['context']['plugins']['get'](y);if(!_0x46e36b)return void(this['activeCommentThread']&&_0x45380d['deactivateAll']());const _0x250819=this['getCommentThread'](_0x46e36b);if(!_0x250819)throw new _0x50bda('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x46e36b});if(!this['_threadToController']['has'](_0x250819))throw new _0x50bda('commentsrepository-active-not-attached',null,{'threadId':_0x46e36b});const _0x4b3fbc=_0x45380d['getByInnerView'](this['_threadToController']['get'](_0x250819)['view']);_0x45380d['activate'](_0x4b3fbc);}['switchReadOnly'](_0x5d9512,_0x18ba04){_0x5d9512?this['_readOnlyChannels']['add'](_0x18ba04):this['_readOnlyChannels']['delete'](_0x18ba04),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x460e08){return this['_readOnlyChannels']['has'](_0x460e08)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x590d20,_0x1bfeea){return new vt(_0x590d20,_0x1bfeea);}['setPermissions'](_0x31da02,_0x4454f6=_t){this['_permissions']['set'](_0x4454f6,_0x31da02),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x534f3a=_t){return this['_permissions']['has'](_0x534f3a)?this['_permissions']['get'](_0x534f3a):bt;}['_addCommentThread']({channelId:_0x88f754,threadId:_0x36e399,comments:_0x4686f2,unlinkedAt:_0x53030e,resolvedAt:_0x532e60,resolvedBy:_0x1a24d3,target:_0x3612b1,context:_0x51861f,attributes:_0x3c8f43,isFromAdapter:_0x51b2ce,isResolvable:_0x3482d6,isSubmitted:_0x2f676d}){if('string'!=typeof _0x36e399)throw new _0x50bda('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x36e399});if(this['hasCommentThread'](_0x36e399))throw new _0x50bda('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x36e399});const _0x44aebd=new pi(this,{'channelId':_0x88f754,'id':_0x36e399,'context':_0x51861f,'attributes':_0x3c8f43,'unlinkedAt':_0x53030e,'resolvedAt':_0x532e60,'resolvedBy':_0x1a24d3?this['context']['plugins']['get'](it)['getUser'](_0x1a24d3):null,'isResolvable':_0x3482d6,'isSubmitted':_0x2f676d||_0x51b2ce});this['_threads']['set'](_0x36e399,_0x44aebd);for(const _0xbbb637 of _0x4686f2)_0x44aebd['_add'](this['_createNewComment']({'threadId':_0x36e399,..._0xbbb637}));return _0x3612b1&&_0x44aebd['attachTo'](_0x3612b1),_0x51b2ce||!_0x44aebd['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x88f754,'threadId':_0x36e399});}['_submitCommentThread']({channelId:_0xc43bd1,threadId:_0x685f12}){if(!this['hasCommentThread'](_0x685f12))throw new _0x50bda('commentsrepository-missing-comment-thread',this);const _0x2e0552=this['getCommentThread'](_0x685f12);if(_0x2e0552['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x333b42,comments:_0x154396,resolvedAt:_0x2a4c9d,resolvedBy:_0x2eb4bb,context:_0x84ceee,attributes:_0x48f6e6}=_0x2e0552,_0x6baf2d=this['context']['plugins']['get']('PendingActions'),_0x28df23=_0x6baf2d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0xc43bd1,'threadId':_0x333b42,'comments':_0x154396['map'](_0x4e3290=>_0x4e3290['toJSON']()),'resolvedAt':_0x2a4c9d,'resolvedBy':_0x2eb4bb?_0x2eb4bb['id']:_0x2eb4bb,'context':_0x84ceee,'attributes':_0x48f6e6})['then'](({comments:_0x24eb16})=>{_0x6baf2d['remove'](_0x28df23);for(const _0x3f3316 of _0x24eb16)this['_updateComment']({'channelId':_0xc43bd1,'threadId':_0x685f12,'commentId':_0x3f3316['commentId'],'createdAt':_0x3f3316['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x444912=>{throw console['error'](_0x444912),new _0x50bda('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x19a4e0,target:_0x43be5f}){const _0xa7b77b=this['getCommentThread'](_0x19a4e0);if(!_0xa7b77b)throw new _0x50bda('commentsrepository-attach-missing-comment-thread',this);const _0x1a5672=this['context']['plugins']['get']('PendingActions'),_0x158ecf=this['context']['plugins']['get'](y),_0x50a70f=this['_createCommentThreadView'](_0xa7b77b),_0x59b3e5=new vt(_0xa7b77b,_0x50a70f);let _0x104e1f=null;_0x50a70f['on']('change:isDirty',(_0x5857f7,_0x30c2cb,_0x24a14d)=>{_0x24a14d?_0x104e1f=_0x1a5672['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x104e1f&&(_0x1a5672['remove'](_0x104e1f),_0x104e1f=null);}),this['_threadToController']['set'](_0xa7b77b,_0x59b3e5),this['_viewToController']['set'](_0x50a70f,_0x59b3e5);const _0x3d71c4=new E(this['context']['locale'],_0x50a70f);_0x3d71c4['bind']('length')['to'](_0x50a70f),_0x3d71c4['bind']('isDirty')['to'](_0x50a70f,'isDirty',_0x50a70f,'length',(_0x57f40f,_0x36df69)=>_0x57f40f||!_0x36df69),_0x3d71c4['bind']('isActive')['to'](_0x50a70f),_0x3d71c4['type']='comment';const _0x49a923=new T({'view':_0x3d71c4,'target':_0x43be5f,'type':'comment','isVisible':!_0xa7b77b['archivedAt']&&!!('function'==typeof _0x43be5f?_0x43be5f():_0x43be5f)});return _0x50a70f['on']('escape',()=>{_0x49a923['fire']('escape');}),this['_bindAnnotationToEditors'](_0x50a70f,_0x49a923),_0x158ecf['add'](_0x49a923),_0x49a923;}['_bindAnnotationToEditors'](_0x23f430,_0x4de05e){this['listenTo'](_0x23f430,'editorReady',(_0x4ff1a1,_0x5e3510)=>{const _0x510da6=_0x5e3510['ui']['view']['body']['bodyCollectionContainer'];_0x4de05e['focusableElements']['add'](_0x510da6),this['context']instanceof _0x210304&&this['context']['ui']['focusTracker']['add'](_0x510da6);},{'priority':'highest'}),this['listenTo'](_0x23f430,'editorDestroyed',(_0xcef552,_0x2d31d1)=>{const _0x5c2760=_0x2d31d1['ui']['view']['body']['bodyCollectionContainer'];_0x4de05e['focusableElements']['has'](_0x5c2760)&&_0x4de05e['focusableElements']['remove'](_0x5c2760),this['context']instanceof _0x210304&&this['context']['ui']['focusTracker']['remove'](_0x5c2760);});}['_unbindEditors'](_0x4cf817){this['stopListening'](_0x4cf817,'editorReady'),this['stopListening'](_0x4cf817,'editorDestroyed');}['_createCommentThreadView'](_0x55ceeb){const _0xc8842c=this['context']['plugins']['get'](it),{config:_0x34f98e,locale:_0x3dcc67}=this['context'],_0x5aa241=pt(_0x34f98e['get']('locale'),_0x3dcc67);return new(0x0,(_0x34f98e['get']('comments'))['CommentThreadView'])(_0x3dcc67,_0x55ceeb,_0xc8842c['me'],{'editorConfig':{..._0x34f98e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x34f98e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x34f98e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x34f98e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x34f98e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5aa241,'CommentView':_0x34f98e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x16d4d2,channelId:_0x48cf90,resolvedAt:_0x194ef0,resolvedBy:_0x4b0044,isFromAdapter:_0x5658b2}){if(!this['hasCommentThread'](_0x16d4d2))throw new _0x50bda('commentsrepository-missing-comment-thread',null,{'threadId':_0x16d4d2});const _0x5b1b9d=this['getCommentThread'](_0x16d4d2);if(_0x5b1b9d['isResolved'])throw new _0x50bda('commentsrepository-resolved-comment-thread',null,{'threadId':_0x16d4d2});const _0x5d9e3e=this['context']['plugins']['get'](it);if(_0x5b1b9d['resolvedBy']=_0x5d9e3e['getUser'](_0x4b0044),_0x5b1b9d['resolvedAt']=_0x194ef0,_0x5658b2||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x574596=this['context']['plugins']['get']('PendingActions'),_0x21654e=_0x574596['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x48cf90,'threadId':_0x16d4d2})['then'](({resolvedAt:_0x736a66,resolvedBy:_0x3aec31})=>{_0x574596['remove'](_0x21654e),_0x5b1b9d['resolvedBy']['id']!==_0x3aec31&&(_0x5b1b9d['resolvedBy']=_0x5d9e3e['getUser'](_0x3aec31)),_0x5b1b9d['resolvedAt']=_0x736a66;})['catch'](_0x23bef8=>{throw console['error'](_0x23bef8),new _0x50bda('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x276471,channelId:_0x58e799,isFromAdapter:_0x2f467d}){if(!this['hasCommentThread'](_0x276471))throw new _0x50bda('commentsrepository-missing-comment-thread',null,{'threadId':_0x276471});const _0xd7c2a5=this['getCommentThread'](_0x276471);if(!_0xd7c2a5['isResolved'])throw new _0x50bda('commentsrepository-reopen-comment-thread',null,{'threadId':_0x276471});if(_0xd7c2a5['resolvedBy']=null,_0xd7c2a5['resolvedAt']=null,_0x2f467d||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1f7a20=this['context']['plugins']['get']('PendingActions'),_0x3f087d=_0x1f7a20['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x58e799,'threadId':_0x276471})['then'](()=>_0x1f7a20['remove'](_0x3f087d))['catch'](_0xefce5a=>{throw console['error'](_0xefce5a),new _0x50bda('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3a27eb,isFromAdapter:_0x1c9ae0}){const _0x412598=this['getCommentThread'](_0x3a27eb);if(!_0x412598)throw new _0x50bda('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3a27eb),this['_threads']['delete'](_0x3a27eb),!_0x412598['isSubmitted']||_0x1c9ae0||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5b91f2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x281562}=_0x412598,_0x4f74e1=_0x5b91f2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x281562,'threadId':_0x3a27eb})['then'](()=>_0x5b91f2['remove'](_0x4f74e1))['catch'](_0x19fbeb=>{throw console['error'](_0x19fbeb),new _0x50bda('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x56d8c0,unlinkedAt:_0x46f2d9,context:_0x1fcabe,attributes:_0x17e836,isFromAdapter:_0x52224b}){if('string'!=typeof _0x56d8c0)throw new _0x50bda('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x56d8c0});if(!this['hasCommentThread'](_0x56d8c0))throw new _0x50bda('commentsrepository-missing-comment-thread',null,{'threadId':_0x56d8c0});const _0x9b604f=this['getCommentThread'](_0x56d8c0);let _0x18a6f1=!0x1;if(void 0x0!==_0x1fcabe&&_0x9b604f['context']!==_0x1fcabe&&(_0x9b604f['context']=_0x1fcabe,_0x18a6f1=!0x0),void 0x0!==_0x46f2d9&&_0x9b604f['unlinkedAt']!==_0x46f2d9&&(_0x9b604f['unlinkedAt']=_0x46f2d9,_0x18a6f1=!0x0),_0x17e836&&!At(_0x17e836,_0x9b604f['attributes'])&&(_0x9b604f['attributes']=_0x17e836,_0x18a6f1=!0x0),!_0x18a6f1)return Promise['resolve']();if(!_0x9b604f['isSubmitted']||_0x52224b||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x36069a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x206386}=_0x9b604f,_0x4e4bdd=_0x36069a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x206386,'threadId':_0x56d8c0,'context':_0x1fcabe,'unlinkedAt':_0x46f2d9,'attributes':_0x17e836})['then'](()=>_0x36069a['remove'](_0x4e4bdd))['catch'](_0x21e6c5=>{throw console['error'](_0x21e6c5),new _0x50bda('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3905a6){const _0x515bd1=this['context']['plugins']['get'](y),_0x250d0=this['getCommentThread'](_0x3905a6);if(_0x250d0['_isAttached']=!0x1,this['_threadToController']['has'](_0x250d0)){const _0x190c2f=this['_threadToController']['get'](_0x250d0),_0x128ebf=_0x190c2f['view'],_0x596e96=_0x515bd1['getByInnerView'](_0x128ebf);this['_threadToController']['delete'](_0x250d0),this['_viewToController']['delete'](_0x128ebf),_0x596e96&&_0x515bd1['remove'](_0x596e96),_0x190c2f['destroy'](),_0x128ebf['destroy']()['then'](()=>{this['_unbindEditors'](_0x128ebf);});}}['_updateActiveAnnotation']({threadId:_0x153995,resolvedAt:_0x128475,unlinkedAt:_0x4c73ca}){const _0x4b7e35=!!_0x128475,_0x49a8ad=this['context']['plugins']['get'](y),_0x51b3f3=this['getCommentThread'](_0x153995);if(this['_threadToController']['has'](_0x51b3f3)){const _0x33c3e0=this['_threadToController']['get'](_0x51b3f3)['view'],_0x13c841=_0x49a8ad['getByInnerView'](_0x33c3e0);_0x13c841&&(_0x4b7e35&&_0x49a8ad['_removeActiveAnnotation'](_0x13c841),_0x4c73ca?_0x13c841['isVisible']=!0x1:_0x13c841['refreshVisibility']());}}['_getExternalAuthor'](_0x2ce910){const _0x54f008=this['context']['plugins']['get'](it),_0x2a7c54=It('external:'+_0x2ce910),_0x5972d5=_0x54f008['getUser'](_0x2a7c54);return _0x5972d5||_0x54f008['addUser']({'id':_0x2a7c54,'name':_0x2ce910});}['_createNewComment']({threadId:_0x3812ca,commentId:_0x2f2281=_0xb5ba6(),content:_0xd6de38,authorId:_0x58f56b,createdAt:_0x350732,attributes:_0x19f466}){if('string'!=typeof _0x2f2281)throw new _0x50bda('commentsrepository-invalid-commentid');if('string'!=typeof _0x58f56b)throw new _0x50bda('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xd6de38||!_0xd6de38['trim']())throw new _0x50bda('commentsrepository-invalid-comment-content');const _0x1e7a21=this['context']['plugins']['get'](it)['getUser'](_0x58f56b);if(!_0x1e7a21)throw new _0x50bda('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x58f56b});let _0x509132=null,_0x5c607d=_0x350732;return _0x19f466?.['@external']&&(_0x509132=this['_getExternalAuthor'](_0x19f466['@external']['authorName']),_0x5c607d=new Date(_0x19f466['@external']['createdAt'])),new wi(this,{'threadId':_0x3812ca,'id':_0x2f2281,'author':_0x509132||_0x1e7a21,'creator':_0x1e7a21,'content':_0xd6de38,'createdAt':_0x350732,'authoredAt':_0x5c607d,'attributes':_0x19f466});}['_addComment'](_0x9dd7b){let {threadId:_0xcad92d,content:_0x3a7b12,attributes:_0x5019aa,isFromAdapter:_0x239294}=_0x9dd7b;const _0x23e7c1=this['getCommentThread'](_0x9dd7b['threadId']);if(!_0x23e7c1)throw new _0x50bda('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5231eb=this['_createNewComment'](_0x9dd7b),{id:_0x2592a8}=_0x5231eb;if(_0x23e7c1['_add'](_0x5231eb),_0x239294||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x23e7c1['isSubmitted'])return Promise['resolve']();const _0x419990=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1b8e79}=_0x23e7c1,_0xcbc2ca=_0x419990['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5019aa||(_0x5019aa={}),this['adapter']['addComment']({'channelId':_0x1b8e79,'threadId':_0xcad92d,'commentId':_0x2592a8,'content':_0x3a7b12,'attributes':_0x5019aa})['then'](_0x108871=>{_0x419990['remove'](_0xcbc2ca),_0x108871&&this['_updateComment']({'channelId':_0x1b8e79,'threadId':_0xcad92d,'commentId':_0x2592a8,'createdAt':_0x108871['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x6294be=>{throw console['error'](_0x6294be),new _0x50bda('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x53f0d8,commentId:_0x29fb4c,content:_0x1d2b24,createdAt:_0x4f8bcc,attributes:_0x140b50,isFromAdapter:_0x4f33b9}){if(void 0x0!==_0x1d2b24&&('string'!=typeof _0x1d2b24||!_0x1d2b24['trim']()['length']))throw new _0x50bda('commentsrepository-update-comment-invalid-content');const _0x32a329=this['getCommentThread'](_0x53f0d8),_0x62aeed=_0x32a329['getComment'](_0x29fb4c);if(!_0x62aeed)throw new _0x50bda('commentsrepository-update-missing-comment',this);let _0x402279=!0x1;if(_0x1d2b24&&_0x1d2b24!==_0x62aeed['content']&&(_0x62aeed['isEditable']||_0x4f33b9)&&(_0x62aeed['content']=_0x1d2b24,_0x402279=!0x0),_0x4f8bcc&&_0x4f8bcc!==_0x62aeed['createdAt']&&(_0x62aeed['createdAt']=_0x4f8bcc,_0x62aeed['attributes']&&_0x62aeed['attributes']['@external']||(_0x62aeed['authoredAt']=_0x4f8bcc),_0x402279=!0x0),_0x140b50&&!At(_0x140b50,_0x62aeed['attributes'])&&(_0x62aeed['attributes']=_0x140b50,_0x402279=!0x0),!_0x402279)return Promise['resolve']();if(_0x32a329['fire']('commentUpdated'),_0x4f33b9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x530cf4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x29bdef}=this['getCommentThread'](_0x62aeed['threadId']),_0xeaabf8=_0x530cf4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x29bdef,'threadId':_0x53f0d8,'commentId':_0x29fb4c,'content':_0x1d2b24,'attributes':_0x140b50})['then'](()=>_0x530cf4['remove'](_0xeaabf8))['catch'](_0xf04029=>{throw console['error'](_0xf04029),new _0x50bda('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x58ad89,commentId:_0x379753,isFromAdapter:_0x5c607e}){const _0x4921f0=this['getCommentThread'](_0x58ad89),_0x4a9c73=_0x4921f0['getComment'](_0x379753);if(!_0x4a9c73)throw new _0x50bda('commentsrepository-remove-missing-comment',this);if(_0x4921f0['_remove'](_0x4a9c73),_0x5c607e||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x341204=this['context']['plugins']['get']('PendingActions'),{channelId:_0x363600}=_0x4921f0,_0x20edab=_0x341204['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x363600,'threadId':_0x58ad89,'commentId':_0x379753})['then'](()=>_0x341204['remove'](_0x20edab))['catch'](_0xa4f53=>{throw console['error'](_0xa4f53),new _0x50bda('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x478ae2(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x122262,_0x302709){super();const _0x2dc17f=_0x122262['context']['plugins']['get'](it)['me'],_0x1856c1=_0x122262['getCommentThread'](_0x302709['threadId']),_0xad07eb=0x0===_0x1856c1['comments']['length'],_0x3af23d=_0x2dc17f===_0x302709['author'];this['id']=_0x302709['id'],this['threadId']=_0x302709['threadId'],this['author']=_0x302709['author'],this['creator']=_0x302709['creator'],this['isExternal']=Boolean(_0x302709['attributes']&&_0x302709['attributes']['@external']),this['set']('content',_0x302709['content']),this['createdAt']=_0x302709['createdAt']||new Date(),this['set']('authoredAt',_0x302709['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1856c1,'resolvedAt'),this['set']('attributes',_0x302709['attributes']||{}),this['bind']('isEditable')['to'](_0x122262,'_permissions',()=>{const _0x50b2c0=_0x122262['getPermissions'](_0x1856c1['channelId'])['write'],_0x58a0f9=_0x122262['getPermissions'](_0x1856c1['channelId'])['modifyAll'];return _0x3af23d&&_0x50b2c0||!_0x3af23d&&_0x58a0f9;}),this['bind']('isRemovable')['to'](_0x1856c1,'isRemovable',_0x122262,'_permissions',_0x471b5b=>{const _0x31cfeb=_0x122262['getPermissions'](_0x1856c1['channelId'])['write'],_0x32327a=_0x122262['getPermissions'](_0x1856c1['channelId'])['modifyAll'];return _0x3af23d&&_0x31cfeb||_0x471b5b&&_0xad07eb||!_0x3af23d&&_0x32327a&&!_0xad07eb;}),this['bind']('isReadOnly')['to'](_0x1856c1,'isReadOnly'),this['_repository']=_0x122262;}get['weight'](){return Math['max'](function(_0x247733){const _0x5512c5=document['createElement']('div');return _0x5512c5['innerHTML']=_0x247733,_0x5512c5['textContent']['length'];}(this['content']),0xc8);}['update'](_0xdedf08){const {threadId:_0x522781,id:_0x4ef1f3}=this;if(!this['_repository']['hasCommentThread'](_0x522781))throw new _0x50bda('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x2af426}=this['_repository']['getCommentThread'](_0x522781);this['_repository']['fire'](Nt('updateComment',_0x2af426,_0x522781),{'channelId':_0x2af426,'threadId':_0x522781,'commentId':_0x4ef1f3,..._0xdedf08});}['setAttribute'](_0x31c82a,_0x3a9726){const _0x29d41e=wt(this['attributes']);yt(_0x29d41e,_0x31c82a,_0x3a9726),this['update']({'attributes':_0x29d41e});}['removeAttribute'](_0x20b45a){const _0x315129=wt(this['attributes']);Ct(_0x315129,_0x20b45a),this['update']({'attributes':_0x315129});}['remove'](_0x4ed181={}){if(!_0x4ed181['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1e12f4,id:_0xd3ed63}=this;if(!this['_repository']['hasCommentThread'](_0x1e12f4))throw new _0x50bda('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1ecd66}=this['_repository']['getCommentThread'](_0x1e12f4);this['_repository']['fire'](Nt('removeComment',_0x1ecd66,_0x1e12f4),{'channelId':_0x1ecd66,'threadId':_0x1e12f4,'commentId':_0xd3ed63,..._0x4ed181});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x5ed78c,..._0x544af8){for(const _0x5dcee7 of _0x544af8)void 0x0!==_0x5dcee7&&(_0x5ed78c+=':'+String(_0x5dcee7));return _0x5ed78c;}class ot extends _0x2982be{constructor(_0x27b29e){super(_0x27b29e),this['set']('hasContent',!0x1);}['refresh'](){const _0x54eda4=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x148018 of _0x54eda4['getRanges']())if(this['_hasContent'](_0x148018))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5094d2=_0xb5ba6(),ranges:_0x3c775f,comment:_0x18a587}={}){const _0x18eca3=this['editor']['model'],_0x393d02=_0x3c775f??Array['from'](_0x18eca3['document']['selection']['getRanges']()),_0x2ed00c=[];for(const _0x32449b of _0x393d02)this['_hasContent'](_0x32449b)&&_0x2ed00c['push'](this['_trimToContent'](_0x32449b));if(!_0x2ed00c['length'])throw new _0x50bda('addcommentthreadcommand-incorrect-ranges',null);_0x18a587&&this['_createCommentThread'](_0x5094d2,_0x18a587),this['_createMarkersFromRanges'](_0x5094d2,_0x2ed00c,!!_0x18a587);}['_createMarkersFromRanges'](_0xe7f68f,_0x2c77af,_0x40bb60){this['editor']['model']['change'](_0x432c1d=>{for(const _0x322095 of _0x2c77af){const _0x365310=_0xb5ba6()['substr'](0x1,0x5),_0x4e37e8='comment:'+_0xe7f68f+':'+_0x365310;_0x432c1d['addMarker'](_0x4e37e8,{'range':_0x322095,'usingOperation':_0x40bb60,'affectsData':_0x40bb60});}});}['_createCommentThread'](_0x5e7a4b,_0x5d0ed1){const _0x47b343=this['editor']['plugins']['get']('CommentsRepository'),_0x469ff3=this['editor']['config']['get']('collaboration.channelId'),_0x394359=this['editor']['plugins']['get']('Users')['me'];if(!_0x394359)throw new _0x50bda('addcommentthreadcommand-user-not-found',null);_0x47b343['addCommentThread']({'threadId':_0x5e7a4b,'channelId':_0x469ff3,'comments':[{'authorId':_0x394359['id'],'content':_0x5d0ed1,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x471116){for(const _0x1ac2e4 of _0x471116['getItems']())if(this['_itemIsContent'](_0x1ac2e4))return!0x0;return!0x1;}['_itemIsContent'](_0x3712c0){return _0x3712c0['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3712c0)&&!_0x3712c0['is']('element','tableCell');}['_trimToContent'](_0x49a255){const _0x2bdab2=_0x49461c=>!this['_itemIsContent'](_0x49461c['item']),_0x176397=_0x49a255['start']['getLastMatchingPosition'](_0x2bdab2),_0x1a0814=_0x49a255['end']['getLastMatchingPosition'](_0x2bdab2,{'direction':'backward'});return this['editor']['model']['createRange'](_0x176397,_0x1a0814);}}class b extends _0x44affe{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2bb878){super(_0x2bb878),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x37ae66=this['editor'],_0x165fa4=_0x37ae66['model']['document']['selection'],_0x949b52=_0x1a15c5(()=>this['refreshSelectedViews'](),0xa);_0x165fa4['on']('change:range',(_0x3a441e,_0x18b90f)=>{_0x18b90f['directChange']&&(_0x949b52['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x37ae66['editing']['view']['document'],'change:isFocused',(_0x8725a2,_0x90699d,_0x297260)=>{_0x297260&&_0x949b52();}),this['listenTo'](_0x37ae66['ui']['focusTracker'],'change:isFocused',(_0x1af72a,_0x16c792,_0x53f5db)=>{_0x53f5db||this['fire']('blur',{'isAnnotationTracked':_0x3397c8=>this['_editorAnnotationsData']['has'](_0x3397c8['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1e2339){if(this['_editorAnnotations']['has'](_0x1e2339['view']))return;this['_editorAnnotations']['add'](_0x1e2339['view']),this['editor']['ui']['focusTracker']['add'](_0x1e2339['view']['element']);const _0x19e789=this['editor']['plugins']['get'](y);this['listenTo'](_0x19e789['collection'],'remove',(_0x15ba32,_0x5dc310)=>{this['editor']['ui']['focusTracker']['remove'](_0x5dc310['view']['element']),this['_editorAnnotations']['delete'](_0x5dc310['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x28f518){if('function'!=typeof _0x28f518)throw new _0x50bda('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x28f518);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2ab02f,annotations:_0xfb9d6a}){const _0x532ed9=[],_0x3d800d=this['editor']['model']['document']['selection'],_0x14d9f7=Array['from'](_0x3d800d['getRanges']());for(const [_0x409188,_0x1d7e97]of this['_editorAnnotationsData']){const _0x54aa95=_0x3562f9(_0x1d7e97),_0x37b604=_0xfb9d6a['getByInnerView'](_0x409188);_0x54aa95&&_0x37b604&&_0x532ed9['push']({'annotation':_0x37b604,'range':_0x54aa95});}function _0x3562f9(_0x1c8877){for(const _0x564486 of _0x1c8877)for(const _0x26258f of _0x14d9f7)if(_0x564486['containsRange'](_0x26258f,!_0x3d800d['isCollapsed']))return _0x564486;return null;}return _0x532ed9['sort']((_0x1e81fd,_0x1710c1)=>{const _0x1dc800=_0x1e81fd['range'],_0x9668f=_0x1710c1['range'];if(!_0x1dc800['isEqual'](_0x9668f)){if(_0x1dc800['containsRange'](_0x9668f,!0x0))return 0x1;if(_0x9668f['containsRange'](_0x1dc800,!0x0))return-0x1;}return _0x1e81fd['annotation']==_0x2ab02f?-0x1:_0x1710c1['annotation']==_0x2ab02f?0x1:0x0;})['map'](_0x3e61e6=>_0x3e61e6['annotation']);}get['_editorAnnotationsData'](){const _0x37728a=new Map();for(const _0x910316 of Array['from'](this['_dataCollectors']))for(const [_0x327c73,_0x5aabd7]of _0x910316())_0x37728a['set'](_0x327c73,_0x5aabd7);return _0x37728a;}}class st extends _0x44affe{['afterInit'](){const _0x4c1ef3=this['editor'];if(!_0x4c1ef3['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4c1ef3['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x44affe{constructor(_0x8faf74){super(_0x8faf74),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2af6ec=this['editor'],_0x5e2a8c=_0x2af6ec['commands']['get']('importWord'),_0x19e8af=_0x2af6ec['plugins']['get'](it);_0x5e2a8c&&(_0x5e2a8c['on']('execute',(_0x22d653,[,_0x19f0b9])=>{_0x19f0b9['collaboration_features']={'comments':!0x0,'user_id':_0x19e8af['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5e2a8c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5067ba,_0x3958af){const {comment_threads:_0x51cf48}=_0x3958af;_0x51cf48&&_0x51cf48['forEach'](({thread_id:_0x3dbebb,comments:_0x5ce026,is_resolved:_0x45a39b})=>{const _0x2f0c8d=new Date(),_0x1599e5=_0x5ce026['map'](({author:_0x165f12,content:_0x5973e1,created_at:_0x3eca41})=>({'content':_0x5973e1,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2f0c8d,'attributes':{'@external':{'authorName':_0x165f12,'createdAt':_0x3eca41?new Date(_0x3eca41):new Date(),'source':'importWord'}}})),_0x17d19c=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x17d19c,'threadId':_0x3dbebb,'comments':_0x1599e5,'resolvedAt':_0x45a39b?_0x2f0c8d:null});});}}class at extends _0x44affe{constructor(_0x5f5582){super(_0x5f5582),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x58c6b6=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x58c6b6,'contentInsertion',(_0x4afa21,_0x5858ef)=>this['_removeMarkersWithoutThreads'](_0x5858ef['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x500311){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x500311;const _0x42d5ad=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5e71b0 of _0x500311['keys']()){const [_0x426cf5,_0x16f3b5]=_0x5e71b0['split'](':');'comment'!=_0x426cf5||_0x42d5ad['hasCommentThread'](_0x16f3b5)||_0x500311['delete'](_0x5e71b0);}return _0x500311;}['_registerMarkerInClipboardPipeline'](){const _0x2d3634=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5d32ed=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5d32ed&&_0x2d3634['_registerMarkerToCopy']('comment',_0x5d32ed);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4f8a06){switch(_0x4f8a06){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x1f5475){const _0x30ca81=_0x1f5475['split'](':');return{'group':_0x30ca81[0x0],'id':_0x30ca81[0x1],'part':_0x30ca81[0x2]};}class ut extends _0x44affe{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4df00f,_0x227b81)=>{if(!_0x227b81['options']['showCommentHighlights'])return null;if(_0x227b81['options']['ignoreResolvedComments']){const {id:_0x919673}=ft(_0x4df00f['markerName']),_0x449e1b=this['editor']['plugins']['get'](o);if(_0x449e1b['getCommentThread'](_0x919673)?.['isResolved']&&_0x4df00f['item'])return _0x227b81['consumable']['consume'](_0x4df00f['item'],'addMarker:'+_0x4df00f['markerName']),_0x227b81['consumable']['consume'](_0x4df00f['item'],'removeMarker:'+_0x4df00f['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x19fc6f=>{_0x19fc6f['on']('addMarker:comment',(_0x2a9536,_0x26d3c7,_0x217605)=>{if(!_0x217605['options']['showCommentHighlights'])return;const _0x3241d5=_0x26d3c7['item'];if(!_0x3241d5)return;const _0x155335=_0x217605['mapper']['toViewElement'](_0x3241d5);this['editor']['model']['schema']['isObject'](_0x3241d5)&&_0x155335&&!_0x155335['getCustomProperty']('widget')&&_0x155335['is']('containerElement')&&_0x5b066a(_0x155335,_0x217605['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xc85ba8,{writer:_0x3df3d8,options:_0x12f2b8})=>{if(!_0x12f2b8['showCommentHighlights'])return null;const _0x5dc45a=_0x3df3d8['createContainerElement']('div'),_0x47770e=_0x3df3d8['createEmptyElement']('hr');return _0x3df3d8['addClass']('ck-horizontal-line',_0x5dc45a),_0x3df3d8['insert'](_0x3df3d8['createPositionAt'](_0x5dc45a,0x0),_0x47770e),_0x5dc45a;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x127f0b,{writer:_0x10affb,options:_0x3e3940})=>{if(!_0x3e3940['showCommentHighlights'])return null;const _0x1d703e=_0x10affb['createContainerElement']('span'),_0x5e4775=_0x10affb['createEmptyElement']('img');return _0x10affb['addClass']('image-inline',_0x1d703e),_0x10affb['insert'](_0x10affb['createPositionAt'](_0x1d703e,0x0),_0x5e4775),_0x1d703e;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xbe53ad,{writer:_0x361eae,options:_0x5c6aed})=>{if(_0x5c6aed['showCommentHighlights'])return _0x361eae['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3cb827,_0x59c9c,_0x3d815e)=>{_0x3d815e['options']['showCommentHighlights']&&_0x3cb827['stop']();},{'priority':'high'});}}class r extends _0x44affe{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(_0x5d0098){super(_0x5d0098),this['set']('isThreadsLoadingPaused',!0x0),_0x5d0098['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x186d44,_0x124d53,_0x580a2f,_0x45b249)=>{const _0x55a698=_0x5d0098['plugins']['get'](o),_0x3b5003=_0x580a2f?ft(_0x580a2f)['id']:null;_0x5d0098['model']['change'](()=>{if(_0x3b5003){const _0x1fd93a=this['getAllMarkersForId'](_0x3b5003);for(const _0x3c1045 of _0x1fd93a)_0x5d0098['editing']['reconvertMarker'](_0x3c1045);}if(_0x45b249){const {id:_0x68133b}=ft(_0x45b249),_0x144ff2=_0x55a698['getCommentThread'](_0x68133b);if(_0x144ff2&&_0x144ff2['unlinkedAt'])return;if(_0x144ff2&&!_0x144ff2['isAttached'])return;const _0x1e0886=this['getAllMarkersForId'](_0x68133b);for(const _0x109530 of _0x1e0886)_0x5d0098['editing']['reconvertMarker'](_0x109530);}}),_0x3b5003&&this['scrollToThreadMarker'](_0x3b5003);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x1d0e74=this['editor'],_0x152c69=_0x1d0e74['plugins']['get'](o),_0x2474e9=_0x1d0e74['config']['get']('collaboration.channelId'),_0x4dd0c4=_0x152c69['getCommentThreads']()['filter'](_0x27f552=>_0x27f552['channelId']!==_0x2474e9);_0x1d0e74['commands']['add']('addCommentThread',new ot(_0x1d0e74)),this['listenTo'](_0x1d0e74,'change:isReadOnly',(_0x31cb7e,_0x4da804,_0x27224d)=>{_0x152c69['switchReadOnly'](_0x27224d,_0x1d0e74['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x152c69,dt('addCommentThread',_0x2474e9),(_0x3b19b2,{threadId:_0x1ad3d6})=>{const _0x19fdd6=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1ad3d6);_0x19fdd6?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1ad3d6);}),this['listenTo'](_0x152c69,dt('removeCommentThread',_0x2474e9),(_0x3c044a,{threadId:_0x168289})=>{_0x1d0e74['model']['enqueueChange']({'isUndoable':!0x1},_0x231bf7=>{const _0x584cc7=this['getAllMarkersForId'](_0x168289);for(const _0x2054c8 of _0x584cc7)_0x231bf7['removeMarker'](_0x2054c8);});}),this['listenTo'](_0x152c69,dt('resolveCommentThread',_0x2474e9),(_0x122d85,{threadId:_0x1ef6f2})=>{(this['_reconvertMarkers'](_0x1ef6f2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1ef6f2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x152c69,dt('reopenCommentThread',_0x2474e9),(_0xd95b7f,{threadId:_0x4b8644})=>{this['_reconvertMarkers'](_0x4b8644);},{'priority':'low'}),this['listenTo'](_0x152c69,dt('addComment',_0x2474e9),(_0x470f7c,{threadId:_0x20d5b7,isFromAdapter:_0x1dfeb8})=>{const _0x518d21=this['getAllMarkersForId'](_0x20d5b7);if(_0x1dfeb8||0x0==_0x518d21['length']||!_0x152c69['hasCommentThread'](_0x20d5b7))return;0x1===_0x152c69['getCommentThread'](_0x20d5b7)['length']&&_0x1d0e74['model']['enqueueChange']({'isUndoable':!0x1},_0x54f523=>{for(const _0x2add87 of _0x518d21)_0x54f523['updateMarker'](_0x2add87,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4dd0c4);}['afterInit'](){!async function(_0xcbb7bb){const _0x112c0=_0x3b7b3a([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x34ab15=0x73460ab3,_0x1a0125=0x7341742b^_0x34ab15,_0x202bb1=window[_0x3b7b3a([0x44,0x61,0x74,0x65])][_0x3b7b3a([0x6e,0x6f,0x77])](),_0x1ca8d2=_0xcbb7bb[_0x3b7b3a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x6aae5b=new window[(_0x3b7b3a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b6bf3=>{_0x1ca8d2[_0x3b7b3a([0x6f,0x6e,0x63,0x65])](_0x3b7b3a([0x72,0x65,0x61,0x64,0x79]),_0x5b6bf3);}),_0x135413={[_0x3b7b3a([0x6b,0x74,0x79])]:_0x3b7b3a([0x45,0x43]),[_0x3b7b3a([0x75,0x73,0x65])]:_0x3b7b3a([0x73,0x69,0x67]),[_0x3b7b3a([0x63,0x72,0x76])]:_0x3b7b3a([0x50,0x2d,0x32,0x35,0x36]),[_0x3b7b3a([0x78])]:_0x3b7b3a([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]),[_0x3b7b3a([0x79])]:_0x3b7b3a([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]),[_0x3b7b3a([0x61,0x6c,0x67])]:_0x3b7b3a([0x45,0x53,0x32,0x35,0x36])},_0x3d73fa=_0x1ca8d2[_0x3b7b3a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3b7b3a([0x67,0x65,0x74])](_0x3b7b3a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1235f1(){let _0x4bd29c,_0x359f84=null,_0x34aa9e=null;try{if(_0x3d73fa==_0x3b7b3a([0x47,0x50,0x4c]))return _0x3b7b3a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4bd29c=_0x563bc8(),!_0x4bd29c)return _0x3b7b3a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4bd29c[_0x3b7b3a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x34aa9e=_0x4f5866(_0x4bd29c[_0x3b7b3a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4bd29c[_0x3b7b3a([0x6a,0x74,0x69])])),await _0x1c1d1a()?_0xb2ca77()?_0x560ba9()?_0x3b7b3a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x196a6d()?(_0x4bd29c[_0x3b7b3a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3b7b3a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x359f84=_0x130104(_0x3b7b3a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x34dd80()):_0x3b7b3a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3b7b3a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3b7b3a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3b7b3a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x560ba9(){const _0x260a48=[_0x3b7b3a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3b7b3a([0x74,0x72,0x69,0x61,0x6c])][_0x3b7b3a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bd29c[_0x3b7b3a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x202bb1/0x3e8:0xe10*_0x1a0125;return _0x4bd29c[_0x3b7b3a([0x65,0x78,0x70])]<_0x260a48;}function _0xb2ca77(){const _0x3763ab=_0x4bd29c[_0x3b7b3a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3763ab)return!0x1;if(_0x3763ab[_0x3b7b3a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b7b3a([0x2a])))return!0x0;if(_0x3763ab[_0x3b7b3a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b7b3a([0x43,0x4d,0x54])))return!0x0;if(_0x3763ab[_0x3b7b3a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b7b3a([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0xbec8fe())return!0x0;if(_0x3763ab[_0x3b7b3a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b7b3a([0x52,0x43,0x4d,0x54]))){if(_0x506a01())return!0x0;if(_0x45c81f()||_0x5038b4())return!0x0;}return!0x1;}function _0x196a6d(){const _0x1f0385=_0x4bd29c[_0x3b7b3a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1f0385||0x0==_0x1f0385[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x52d4bc}=new URL(window[_0x3b7b3a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1f0385[_0x3b7b3a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52d4bc))return!0x0;const _0x358b42=_0x52d4bc[_0x3b7b3a([0x73,0x70,0x6c,0x69,0x74])](_0x3b7b3a([0x2e]));return _0x1f0385[_0x3b7b3a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x16b9d8=>_0x16b9d8[_0x3b7b3a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b7b3a([0x2a])))[_0x3b7b3a([0x6d,0x61,0x70])](_0x3543d=>_0x3543d[_0x3b7b3a([0x73,0x70,0x6c,0x69,0x74])](_0x3b7b3a([0x2e])))[_0x3b7b3a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4670d0=>_0x4670d0[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x358b42[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3b7b3a([0x6d,0x61,0x70])](_0x4f3752=>Array(_0x358b42[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4f3752[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3b7b3a([0x66,0x69,0x6c,0x6c])](_0x4f3752[0x0]===_0x3b7b3a([0x2a])?_0x3b7b3a([0x2a]):'')[_0x3b7b3a([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4f3752))[_0x3b7b3a([0x73,0x6f,0x6d,0x65])](_0x1b637e=>_0x358b42[_0x3b7b3a([0x65,0x76,0x65,0x72,0x79])]((_0x597369,_0x2de10c)=>_0x1b637e[_0x2de10c]===_0x597369||_0x1b637e[_0x2de10c]===_0x3b7b3a([0x2a])));}function _0x34dd80(){return _0x359f84&&_0x34aa9e?new window[(_0x3b7b3a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x35bafc,_0x324945)=>{_0x359f84[_0x3b7b3a([0x74,0x68,0x65,0x6e])](_0x35bafc,_0x324945),_0x34aa9e[_0x3b7b3a([0x74,0x68,0x65,0x6e])](_0x102d0c=>{_0x102d0c!=_0x3b7b3a([0x56,0x61,0x6c,0x69,0x64])&&_0x35bafc(_0x102d0c);},_0x324945);}):_0x359f84||_0x34aa9e||_0x3b7b3a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4f5866(_0x2c843f,_0xd403a1){return new window[(_0x3b7b3a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f1175=>{if(_0x4d9fe8())return _0x5f1175(_0x3b7b3a([0x56,0x61,0x6c,0x69,0x64]));_0x112cd6(),_0x1ca8d2[_0x3b7b3a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3b7b3a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x358d30=!0x1;const _0x111316=_0xb5ba6();function _0x40dbe0(_0xe9671a){return!!_0xe9671a&&(typeof _0xe9671a===_0x3b7b3a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xe9671a===_0x3b7b3a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xe9671a[_0x3b7b3a([0x74,0x68,0x65,0x6e])]===_0x3b7b3a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xe9671a[_0x3b7b3a([0x63,0x61,0x74,0x63,0x68])]===_0x3b7b3a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1cc1f3(_0x1e55c8){_0x20554f(_0x1e55c8)[_0x3b7b3a([0x74,0x68,0x65,0x6e])](_0x2bdf41=>{if(!_0x2bdf41||_0x2bdf41[_0x3b7b3a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3b7b3a([0x6f,0x6b]))return _0x3b7b3a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1af291(_0x1ce7eb(_0x111316+_0xd403a1))!=_0x2bdf41[_0x3b7b3a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3b7b3a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3b7b3a([0x56,0x61,0x6c,0x69,0x64]);})[_0x3b7b3a([0x74,0x68,0x65,0x6e])](_0xbaf0db=>(_0x251fbd(),_0xbaf0db),()=>{const _0x10994e=_0x266059();return null==_0x10994e?(_0x251fbd(),_0x3b7b3a([0x56,0x61,0x6c,0x69,0x64])):_0x3b7b3a(_0x202bb1-_0x10994e>(0x574a8eb3^_0x34ab15)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3b7b3a([0x74,0x68,0x65,0x6e])](_0x5f1175)[_0x3b7b3a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5f1175(_0x3b7b3a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x35d107=0x7370e433^_0x34ab15;function _0x251fbd(){const _0xb8b88b=_0x3b7b3a([0x6c,0x6c,0x63,0x74,0x2d])+_0x1af291(_0x1ce7eb(_0x2c843f)),_0x2ec0b5=_0x1f8e13(_0x1af291(window[_0x3b7b3a([0x4d,0x61,0x74,0x68])][_0x3b7b3a([0x63,0x65,0x69,0x6c])](_0x202bb1/_0x35d107)));window[_0x3b7b3a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3b7b3a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xb8b88b,_0x2ec0b5);}function _0x266059(){const _0x44cd19=_0x3b7b3a([0x6c,0x6c,0x63,0x74,0x2d])+_0x1af291(_0x1ce7eb(_0x2c843f)),_0x17e34f=window[_0x3b7b3a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3b7b3a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x44cd19);return _0x17e34f?window[_0x3b7b3a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f8e13(_0x17e34f),0x10)*_0x35d107:null;}function _0x20554f(_0x44e1c4){return new window[(_0x3b7b3a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xcca6ad,_0xeb6d4c)=>{_0x44e1c4[_0x3b7b3a([0x74,0x68,0x65,0x6e])](_0xcca6ad,_0xeb6d4c),window[_0x3b7b3a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xeb6d4c,0x7347de73^_0x34ab15);});}}_0x1ca8d2[_0x3b7b3a([0x6f,0x6e])](_0x3b7b3a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x53c4e4,_0x53f1ec)=>{if(_0x53f1ec[0x0]!=_0x2c843f)return _0x5f1175(_0x3b7b3a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x53f1ec[0x1]={..._0x53f1ec[0x1],[_0x3b7b3a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x111316};},{[_0x3b7b3a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3b7b3a([0x68,0x69,0x67,0x68])}),_0x1ca8d2[_0x3b7b3a([0x6f,0x6e])](_0x3b7b3a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5a801f=>{_0x40dbe0(_0x5a801f[_0x3b7b3a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x358d30=!0x0,_0x1cc1f3(_0x5a801f[_0x3b7b3a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3b7b3a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3b7b3a([0x6c,0x6f,0x77])}),_0x6aae5b[_0x3b7b3a([0x74,0x68,0x65,0x6e])](()=>{_0x358d30||_0x5f1175(_0x3b7b3a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4d9fe8(){return _0x1ca8d2[_0x3b7b3a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3b7b3a([0x76,0x69,0x65,0x77])][_0x3b7b3a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3b7b3a([0x61,0x75,0x74,0x6f]);}function _0x112cd6(){_0x1ca8d2[_0x3b7b3a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3b7b3a([0x76,0x69,0x65,0x77])][_0x3b7b3a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3b7b3a([0x61,0x75,0x74,0x6f]);}}function _0x130104(_0x2cd348){const _0xbad0f0=[new window[(_0x3b7b3a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19dfec=>setTimeout(_0x19dfec,0x734f347f^_0x34ab15)),_0x6aae5b[_0x3b7b3a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3b7b3a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3357b3=>{let _0x8ad832=0x0;_0x1ca8d2[_0x3b7b3a([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b7b3a([0x6f,0x6e])](_0x3b7b3a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1d6c71,_0x5230f1)=>{_0x5230f1[0x0][_0x3b7b3a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x8ad832++,_0x8ad832==(0x73460f5b^_0x34ab15)&&(_0x3357b3(),_0x1d6c71[_0x3b7b3a([0x6f,0x66,0x66])]());});}))];return window[_0x3b7b3a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3b7b3a([0x72,0x61,0x63,0x65])](_0xbad0f0)[_0x3b7b3a([0x74,0x68,0x65,0x6e])](()=>_0x2cd348);}async function _0x32fab8(){await _0x6aae5b,_0x1ca8d2[_0x3b7b3a([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b7b3a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2e4329,_0x1ca8d2[_0x3b7b3a([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b7b3a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2e4329,_0x1ca8d2[_0x3b7b3a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3b7b3a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xbec8fe(){return window[_0x3b7b3a([0x67,0x6c,0x6f,0x62])]&&window[_0x3b7b3a([0x67,0x6c,0x6f,0x62])][_0x3b7b3a([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x506a01(){return _0x1f0e33(_0x3b7b3a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x596de3(_0x3b7b3a([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3b7b3a([0x73,0x74,0x61,0x74,0x65])]==_0x3b7b3a([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x45c81f(){return _0x1f0e33(_0x3b7b3a([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 _0x5038b4(){return _0x1f0e33(_0x3b7b3a([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4b9851(_0x17f85c){const _0x43191c=_0x4fc3a9();_0x1ca8d2[_0x43191c]=_0x3b7b3a([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x17f85c,_0x17f85c!=_0x3b7b3a([0x56,0x61,0x6c,0x69,0x64])&&_0x32fab8();}function _0x4fc3a9(){const _0x15e552=window[_0x3b7b3a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3b7b3a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3b7b3a([0x6e,0x6f,0x77])]())[_0x3b7b3a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3b7b3a([0x2e]),'');let _0x5c295e=_0x3b7b3a([0x4b]);for(let _0x402695=0x0;_0x402695<_0x15e552[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x402695+=0x2){let _0x2bc3e8=window[_0x3b7b3a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15e552[_0x3b7b3a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x402695,_0x402695+0x2));_0x2bc3e8>=_0x112c0[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2bc3e8-=_0x112c0[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5c295e+=_0x112c0[_0x2bc3e8];}return _0x5c295e;}function _0x563bc8(){const _0x26b3a0=_0x3d73fa[_0x3b7b3a([0x73,0x70,0x6c,0x69,0x74])](_0x3b7b3a([0x2e]));if(0x3!=_0x26b3a0[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2e4450(_0x26b3a0[0x1]);function _0x2e4450(_0x1e0d52){const _0x3b2b8a=_0x5f4627(_0x1e0d52);return _0x3b2b8a&&_0x4da3b5()?_0x3b2b8a:null;function _0x4da3b5(){const _0x4b2067=_0x3b2b8a[_0x3b7b3a([0x6a,0x74,0x69])],_0x4c4f95=window[_0x3b7b3a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4b2067[_0x3b7b3a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b2067[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4ca38a={..._0x3b2b8a,[_0x3b7b3a([0x6a,0x74,0x69])]:_0x4b2067[_0x3b7b3a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4b2067[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4ca38a[_0x3b7b3a([0x76,0x63])],_0x1ce7eb(_0x4ca38a)==_0x4c4f95;}}}async function _0x1c1d1a(){let _0x554497=!0x0;try{const _0x17d75e=_0x3d73fa[_0x3b7b3a([0x73,0x70,0x6c,0x69,0x74])](_0x3b7b3a([0x2e])),[_0x23d7fc,_0x386881,_0x1eb352]=_0x17d75e;return _0x515034(_0x23d7fc),await _0x4149ba(_0x23d7fc,_0x386881,_0x1eb352),_0x554497;}catch{return!0x1;}function _0x515034(_0x826390){const _0x53cbff=_0x5f4627(_0x826390);_0x53cbff&&_0x53cbff[_0x3b7b3a([0x61,0x6c,0x67])]==_0x3b7b3a([0x45,0x53,0x32,0x35,0x36])||(_0x554497=!0x1);}async function _0x4149ba(_0x314b72,_0x206d44,_0x42e24a){const _0x20de67=window[_0x3b7b3a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3b7b3a([0x66,0x72,0x6f,0x6d])](_0x55a00e(_0x42e24a),_0x2a0706=>_0x2a0706[_0x3b7b3a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5c8f28=new window[(_0x3b7b3a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3b7b3a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x314b72+_0x3b7b3a([0x2e])+_0x206d44),_0x306139=window[_0x3b7b3a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3b7b3a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x306139)return;const _0x70e83b=await _0x306139[_0x3b7b3a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3b7b3a([0x6a,0x77,0x6b]),_0x135413,{[_0x3b7b3a([0x6e,0x61,0x6d,0x65])]:_0x3b7b3a([0x45,0x43,0x44,0x53,0x41]),[_0x3b7b3a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3b7b3a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3b7b3a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x306139[_0x3b7b3a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3b7b3a([0x6e,0x61,0x6d,0x65])]:_0x3b7b3a([0x45,0x43,0x44,0x53,0x41]),[_0x3b7b3a([0x68,0x61,0x73,0x68])]:{[_0x3b7b3a([0x6e,0x61,0x6d,0x65])]:_0x3b7b3a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x70e83b,_0x20de67,_0x5c8f28)||(_0x554497=!0x1);}}function _0x5f4627(_0x55c50d){return _0x55c50d[_0x3b7b3a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3b7b3a([0x65,0x79]))?JSON[_0x3b7b3a([0x70,0x61,0x72,0x73,0x65])](_0x55a00e(_0x55c50d)):null;}function _0x55a00e(_0x17850d){return window[_0x3b7b3a([0x61,0x74,0x6f,0x62])](_0x17850d[_0x3b7b3a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3b7b3a([0x2b]))[_0x3b7b3a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3b7b3a([0x2f])));}function _0x1ce7eb(_0x468679){let _0x33c040=0x1505;function _0x4cc960(_0x25a086){for(let _0x4679cb=0x0;_0x4679cb<_0x25a086[_0x3b7b3a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4679cb++){const _0x357e84=_0x25a086[_0x3b7b3a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4679cb);_0x33c040=(_0x33c040<<0x5)+_0x33c040+_0x357e84,_0x33c040&=_0x33c040;}}function _0x39610d(_0x25f814){Array[_0x3b7b3a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x25f814)?_0x25f814[_0x3b7b3a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39610d):_0x25f814&&typeof _0x25f814==_0x3b7b3a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3b7b3a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x25f814)[_0x3b7b3a([0x73,0x6f,0x72,0x74])]()[_0x3b7b3a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4b9ee1,_0x25a7c0])=>{_0x4cc960(_0x4b9ee1),_0x39610d(_0x25a7c0);}):_0x4cc960(window[_0x3b7b3a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x25f814));}return _0x39610d(_0x468679),_0x33c040>>>0x0;}function _0x1af291(_0x1e7073){return _0x1e7073[_0x3b7b3a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3b7b3a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3b7b3a([0x30]));}function _0x1f8e13(_0x8ebca){return _0x8ebca[_0x3b7b3a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3b7b3a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3b7b3a([0x6a,0x6f,0x69,0x6e])]('');}function _0x1f0e33(_0x210d29){return _0x1ca8d2[_0x3b7b3a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3b7b3a([0x68,0x61,0x73])](_0x210d29);}function _0x596de3(_0x3074aa){return _0x1ca8d2[_0x3b7b3a([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3b7b3a([0x67,0x65,0x74])](_0x3074aa);}function _0x2e4329(){}function _0x3b7b3a(_0x2b6266){return _0x2b6266['map'](_0x540b58=>String['fromCharCode'](_0x540b58))['join']('');}_0x4b9851(await _0x1235f1());}(this);}['destroy'](){const _0x45713e=this['editor']['plugins']['get'](o),_0x249ef9=this['editor']['config']['get']('collaboration.channelId');for(const _0x14de79 of _0x45713e['getCommentThreads']({'channelId':_0x249ef9}))_0x45713e['_detachCommentThread'](_0x14de79['id']),_0x45713e['_threads']['delete'](_0x14de79['id']);super['destroy']();}['hasMarkerForId'](_0x162b10){return this['getAllMarkersForId'](_0x162b10)['length']>0x0;}['getAllMarkersForId'](_0x15278b){const _0x3e5f97=[];for(const _0x294a44 of this['editor']['model']['markers'])_0x294a44['name']['startsWith']('comment:'+_0x15278b)&&_0x3e5f97['push'](_0x294a44);return _0x3e5f97;}['scrollToThreadMarker'](_0xd2e7ab){setTimeout(()=>{const _0x530a03=this['_getTargetForId'](_0xd2e7ab);if(!_0x530a03)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xd2e7ab&&nt({'target':_0x530a03[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3a2be5){this['editor']['model']['change'](()=>{for(const _0x163a84 of this['getAllMarkersForId'](_0x3a2be5))this['editor']['editing']['reconvertMarker'](_0x163a84);});}['_attachArchivedThread'](_0x54f8c8){const _0x3554df=this['editor']['plugins']['get'](o),_0x3be637=this['editor']['plugins']['get'](b),_0x164308=_0x3554df['getCommentThread'](_0x54f8c8);if(!_0x164308['isAttached']){const _0x2f7064=_0x164308['attachTo'](()=>this['_getTargetForId'](_0x164308['id']));_0x3be637['registerAnnotation'](_0x2f7064),_0x164308['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2f8dc2=this['editor'],_0x1d7b5a=_0x2f8dc2['plugins']['get'](it);_0x2f8dc2['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5ead10,_0x491334)=>{const {id:_0x26ba70}=ft(_0x5ead10['markerName']),_0x6e1ceb=_0x2f8dc2['plugins']['get'](o)['getCommentThread'](_0x26ba70),_0x5e2853=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x26ba70;let _0x574fc1;if(_0x6e1ceb&&_0x6e1ceb['isResolved']&&!_0x5e2853&&_0x5ead10['item'])return _0x491334['consumable']['consume'](_0x5ead10['item'],'addMarker:'+_0x5ead10['markerName']),_0x491334['consumable']['consume'](_0x5ead10['item'],'removeMarker:'+_0x5ead10['markerName']),null;const _0x3f35e7=['ck-comment-marker'];return _0x5e2853&&_0x3f35e7['push']('ck-comment-marker--active'),_0x574fc1=_0x6e1ceb?.['length']?_0x6e1ceb['comments']['first']['author']['id']:_0x1d7b5a['me']['id'],{'classes':_0x3f35e7,'attributes':{'data-comment':_0x26ba70,'data-author-id':_0x574fc1}};}}),_0x2f8dc2['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2c2640,{options:_0xb99613})=>{if(_0xb99613['showCommentHighlights'])return null;const _0x4b1042=_0x2f8dc2['plugins']['get'](o),_0x41740b=_0x2f8dc2['model']['markers']['get'](_0x2c2640),{id:_0x3c109c,part:_0x6fadc3}=ft(_0x2c2640);return _0x41740b&&!_0x41740b['affectsData']||_0xb99613['ignoreResolvedComments']&&_0x4b1042['getCommentThread'](_0x3c109c)?.['isResolved']?null:{'group':'comment','name':_0x6fadc3?_0x3c109c+':'+_0x6fadc3:_0x3c109c};}}),_0x2f8dc2['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2ff61d,{writer:_0xdb6a32})=>_0xdb6a32['createElement']('$marker',{'data-name':'comment:'+_0x2ff61d['getAttribute']('id')})}),_0x2f8dc2['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x48ead9=this['editor'],_0x571d1d=_0x48ead9['plugins']['get'](o),_0x1afb85=new Set(),_0x355848=new Set();_0x48ead9['model']['document']['registerPostFixer'](_0xf9d738=>{let _0x35842e=!0x1;for(const {name:_0x159910,data:_0x26d682}of _0x48ead9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x77feaf,id:_0x5ad173}=ft(_0x159910);let _0x567cec=_0x26d682['newRange'];if('comment'!==_0x77feaf||!_0x567cec)continue;const _0x521668='$graveyard'===_0x567cec['root']['rootName'];_0x521668||(_0x567cec=ht(_0x567cec,_0x48ead9['model']),!_0x567cec||_0x567cec['isCollapsed']||!_0x26d682['newRange']||_0x567cec['isEqual'](_0x26d682['newRange']))?_0x48ead9['model']['hasContent'](_0x567cec)&&!_0x521668?this['isThreadsLoadingPaused']?_0x1afb85['add'](_0x159910):this['_handleThreadMarker'](_0x159910,_0x5ad173):(_0x355848['add'](_0x159910),_0x1afb85['delete'](_0x159910),_0xf9d738['removeMarker'](_0x159910),_0x35842e=!0x0):(_0xf9d738['updateMarker'](_0x159910,{'range':_0x567cec}),_0x35842e=!0x0);}return _0x35842e;}),this['on']('change:isThreadsLoadingPaused',(_0x374c92,_0x37adb4,_0x137a58)=>{if(!_0x137a58&&_0x1afb85['size'])for(const _0x30d514 of _0x1afb85){const {id:_0x2cfc6d}=ft(_0x30d514);_0x1afb85['delete'](_0x30d514),_0x48ead9['model']['markers']['get'](_0x30d514)&&this['_handleThreadMarker'](_0x30d514,_0x2cfc6d);}}),this['listenTo'](_0x48ead9['model']['document'],'change',()=>{for(const {name:_0x2ae3c7,data:{newRange:_0x5e711b}}of _0x48ead9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3a20bc,id:_0x3919ae}=ft(_0x2ae3c7);if('comment'!==_0x3a20bc)continue;const _0x1a9409=_0x571d1d['getCommentThread'](_0x3919ae),_0x55789d=this['hasMarkerForId'](_0x3919ae);_0x1a9409&&(!_0x1a9409['_hasTargetInContent']&&_0x5e711b&&_0x48ead9['editing']['view']['once']('render',()=>{const _0x7ed750=_0x48ead9['plugins']['get'](y),_0x28414e=_0x571d1d['_threadToController']['get'](_0x1a9409)['view'];_0x7ed750['getByInnerView'](_0x28414e)['refreshVisibility']();},{'priority':'low'}),_0x1a9409['_hasTargetInContent']=_0x55789d||!!_0x5e711b),_0x5e711b||(_0x355848['add'](_0x2ae3c7),_0x1afb85['delete'](_0x2ae3c7));}for(const _0x432cab of _0x355848){const {id:_0x4f4d04}=ft(_0x432cab),_0x4a323f=_0x571d1d['getCommentThread'](_0x4f4d04);if(_0x1afb85['delete'](_0x432cab),!_0x4a323f)continue;const _0xce5b25=this['hasMarkerForId'](_0x4f4d04);_0xce5b25||_0x4a323f['isSubmitted']?_0xce5b25||_0x4a323f['unlinkedAt']||_0x4a323f['setUnlinkedAt'](new Date()):_0x4a323f['remove']();}_0x355848['clear']();});}['_handleInitialThreads'](_0x205737){_0x205737['forEach'](_0xa23b83=>{_0xa23b83['unlinkedAt']&&this['_attachArchivedThread'](_0xa23b83['id']);});}['_getTargetForId'](_0x1838b6){const _0x417f4b=this['editor'],_0xdd937f=this['getAllMarkersForId'](_0x1838b6);return et(_0x417f4b['editing'],_0xdd937f);}['_getTextContext'](_0x159417){const _0x980e8c=this['getAllMarkersForId'](_0x159417);let _0x2d42f6='',_0x37abf1=!0x1;for(const _0x2485e1 of _0x980e8c){const _0x1a1b8f=_0x2485e1['getRange']();for(const _0x512ab4 of Array['from'](_0x1a1b8f['getItems']()))_0x512ab4['is']('$textProxy')?(_0x2d42f6&&_0x37abf1&&(_0x2d42f6+='\x20',_0x37abf1=!0x1),_0x2d42f6+=_0x512ab4['data']):_0x37abf1=!0x0;_0x37abf1=!0x0;}return _0x2d42f6['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x40410c,_0x168df0){const _0x354063=this['editor'],_0x2ac25e=_0x354063['plugins']['get'](o);let _0x14ca67=_0x2ac25e['getCommentThread'](_0x168df0);const _0x32d991=_0x354063['config']['get']('collaboration.channelId'),_0x3b459d=_0x354063['plugins']['get'](b);if(_0x14ca67&&(_0x14ca67['unlinkedAt']&&_0x14ca67['setUnlinkedAt'](null),_0x14ca67['isAttached']))return _0x14ca67;return!this['getAllMarkersForId'](_0x168df0)[0x0]['managedUsingOperations']?_0x354063['editing']['view']['once']('render',()=>{if(_0x2ac25e['getCommentThread'](_0x168df0))return;const _0x9e58f9=_0x354063['plugins']['get'](y);_0x14ca67=_0x2ac25e['openNewCommentThread']({'channelId':_0x32d991,'threadId':_0x168df0,'target':()=>this['_getTargetForId'](_0x168df0),'context':{'type':'text','value':this['_getTextContext'](_0x168df0)}});const _0x3c543d=_0x2ac25e['_threadToController']['get'](_0x14ca67)['view'],_0x27a4bf=_0x9e58f9['getByInnerView'](_0x3c543d);_0x27a4bf&&_0x3b459d['registerAnnotation'](_0x27a4bf);},{'priority':'low'}):_0x2ac25e['fetchCommentThread']({'channelId':_0x32d991,'threadId':_0x168df0})['then'](_0x8fd041=>{if('destroyed'!==_0x354063['state']){if(_0x14ca67=_0x8fd041,_0x14ca67&&!_0x14ca67['isAttached']){const _0xabc3a6=_0x14ca67['attachTo'](()=>this['_getTargetForId'](_0x168df0));_0x3b459d['registerAnnotation'](_0xabc3a6),_0x14ca67['isResolved']&&this['_reconvertMarkers'](_0x168df0);}else{if(!_0x14ca67){const _0x245870=this['getAllMarkersForId'](_0x168df0);_0x354063['model']['change'](_0x5d7b62=>{for(const _0x2fb84a of _0x245870)_0x5d7b62['removeMarker'](_0x2fb84a);});}}}}),_0x14ca67;}['_handleThreadMarker'](_0x1cd127,_0x37f29b){const _0x367ffb=this['_attachMarkerToThread'](_0x1cd127,_0x37f29b);_0x367ffb&&!_0x367ffb['context']&&_0x367ffb['setContext']({'type':'text','value':this['_getTextContext'](_0x37f29b)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3688b8=this['editor'];rt(_0x3688b8['model'],({left:_0x4ada07,entered:_0x330dcb})=>{for(const _0x4e324c of _0x4ada07)if(mt(_0x4e324c)){_0x3688b8['ui']['ariaLiveAnnouncer']['announce'](N(_0x3688b8['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x31a659 of _0x330dcb)if(mt(_0x31a659)){_0x3688b8['ui']['ariaLiveAnnouncer']['announce'](N(_0x3688b8['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x396338)));break;}});}}function dt(_0x1a4b60,_0x49c5f5){return _0x49c5f5?_0x1a4b60+':'+_0x49c5f5:_0x1a4b60;}function ht(_0x23e3c3,_0x51f75c){const _0x26e5d1=_0x51f75c['schema'],_0x530977=_0x51f75c['createRange'](_0x23e3c3['start']);for(const _0x3da76d of _0x23e3c3['getWalker']()){const {type:_0xca647a,item:_0xc1bb6a,nextPosition:_0x14fb40}=_0x3da76d;if('text'===_0xca647a||_0x26e5d1['isObject'](_0xc1bb6a)){const _0x184bc0=_0x51f75c['createPositionBefore'](_0xc1bb6a);_0x530977['isCollapsed']&&(_0x530977['start']=_0x184bc0),_0x530977['end']=_0x14fb40;}}return _0x530977;}function mt(_0x48c380){return'comment'===ft(_0x48c380['name'])['group'];}class s extends _0x44affe{['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 _0x22391a=this['editor'],_0x3580ea=_0x22391a['plugins']['get'](o),_0x3bce7f=_0x22391a['plugins']['get'](r),_0x21b2c8=_0x22391a['plugins']['get'](y),_0x48951f=_0x22391a['plugins']['get'](b);_0x22391a['ui']['componentFactory']['add']('comment',()=>{const _0x4c8080=this['_createUIButton'](_0x5281d3);return _0x4c8080['tooltip']=!0x0,_0x4c8080;}),_0x22391a['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x4695c5)),_0x48951f['addSourceCollector'](()=>{const _0x54720d=[];for(const [_0x4603a8,_0x61ccd7]of _0x3580ea['_threadToController']){const _0x59eb76=_0x3bce7f['getAllMarkersForId'](_0x4603a8['id']),_0xcf7062=_0x59eb76['map'](_0x39785b=>_0x39785b['getRange']());_0x59eb76['length']>0x0&&_0x54720d['push']([_0x61ccd7['view'],_0xcf7062]);}return _0x54720d;}),this['listenTo'](_0x21b2c8,'change:activeAnnotations',(_0x23b70f,_0x43b270,_0x4dbf6e)=>{const _0x34fe6d=Array['from'](_0x4dbf6e)['map'](_0x2be0eb=>_0x2be0eb['innerView'])['find'](_0x4913df=>_0x3580ea['_viewToController']['has'](_0x4913df));if(!_0x34fe6d)return void(_0x3bce7f['activeMarker']=null);const _0x3d0301=_0x3580ea['_viewToController']['get'](_0x34fe6d)['model']['id'],_0x423f9c='comment:'+_0x3d0301;_0x3d0301&&_0x3bce7f['hasMarkerForId'](_0x3d0301)?_0x3bce7f['activeMarker']=_0x423f9c:_0x3bce7f['activeMarker']&&(_0x3bce7f['activeMarker']=null);}),this['listenTo'](_0x3580ea,'removeCommentThread',(_0x4700eb,{threadId:_0x1b02b8,isFromAdapter:_0x5de19f})=>{!_0x5de19f&&_0x22391a['ui']['focusTracker']['isFocused']&&_0x3bce7f['hasMarkerForId'](_0x1b02b8)&&_0x22391a['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3580ea,'addComment',(_0x3d1999,{threadId:_0x534410,isFromAdapter:_0x430d2a})=>{if(_0x430d2a||!_0x3bce7f['hasMarkerForId'](_0x534410)||!_0x3580ea['hasCommentThread'](_0x534410))return;0x1===_0x3580ea['getCommentThread'](_0x534410)['length']&&(_0x22391a['editing']['view']['focus'](),_0x3d1999['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5eab4e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5abcca;for(const _0x15236a in _0x5eab4e){const _0xfe1fdb=_0x15236a,_0x1aac16=_0x5eab4e[_0xfe1fdb];if('commentsLicenseKeyValid'==_0x1aac16||'commentsLicenseKeyInvalid'==_0x1aac16||'commentsLicenseKeyExpired'==_0x1aac16||'commentsLicenseKeyDomainLimit'==_0x1aac16||'commentsLicenseKeyNotAllowed'==_0x1aac16||'commentsLicenseKeyEvaluationLimit'==_0x1aac16||'commentsLicenseKeyUsageLimit'==_0x1aac16){delete _0x5eab4e[_0xfe1fdb],_0x5abcca=_0x1aac16,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x5abcca&&_0x5eab4e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x5abcca&&_0x5eab4e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x5abcca&&_0x5eab4e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x5abcca&&_0x5eab4e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x5abcca&&_0x5eab4e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x5abcca&&_0x5eab4e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x5caaf6){const _0x2788e5=this['editor'],_0x105c35=new _0x5caaf6(_0x2788e5['locale']),_0xac9cf=_0x2788e5['commands']['get']('addCommentThread');return _0x105c35['set']({'label':N(_0x2788e5['locale'],'Comment'),'icon':_0x376438}),_0x105c35['bind']('isEnabled')['to'](_0xac9cf,'isEnabled',_0xac9cf,'hasContent',(_0x59d40a,_0x2554a3)=>_0x59d40a&&_0x2554a3),this['listenTo'](_0x105c35,'execute',()=>{_0xac9cf['execute']();}),_0x105c35;}}class i extends _0x44affe{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x3e53b4){super(_0x3e53b4),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xabbf51,_0x11a69a,_0xaf0295)=>{_0xaf0295?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x56e9c4,_0x3bea35]of this['editor']['commands'])_0x3bea35['affectsData']&&'addCommentThread'!==_0x56e9c4&&_0x3bea35['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x83852b=this['editor']['editing']['view']['document'];this['listenTo'](_0x83852b,'cut',_0x193e15=>_0x193e15['stop'](),{'priority':'highest'}),this['listenTo'](_0x83852b,'clipboardInput',_0x151274=>_0x151274['stop'](),{'priority':'highest'}),this['listenTo'](_0x83852b,'delete',_0x1184aa=>_0x1184aa['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x394bb8,_0x35364b]of this['editor']['commands'])_0x35364b['affectsData']&&'addCommentThread'!==_0x394bb8&&_0x35364b['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['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 _0xdc4a0a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b0d40){super(_0x1b0d40),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x34f317=this['context']['plugins']['get'](y);this['listenTo'](_0x34f317,'_activateAnnotation',(_0x3ceba1,_0xbd5910)=>{for(const _0x45b52b of this['activeUIs']){const _0x56a682=this['_uis']['get'](_0x45b52b);(0x0,this['uisData']['get'](_0x45b52b)['filter'])(_0xbd5910)&&_0x56a682['setActiveAnnotation'](_0xbd5910);}}),this['listenTo'](_0x34f317,'_deactivateAllAnnotations',()=>{for(const _0x462d6a of this['activeUIs']){this['_uis']['get'](_0x462d6a)['setActiveAnnotation'](null);}}),this['listenTo'](_0x34f317['_visibleAnnotations'],'add',(_0x3e18db,_0x36dfa6)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x36dfa6);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x254c7c){return this['activeUIs']['has'](_0x254c7c);}['activate'](_0x475e0a,_0x4a362d=this['defaultFilter']){const _0x3cfb91=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x475e0a))throw new _0x50bda('annotationsuis-missing-ui',this,{'uiName':_0x475e0a});this['isActive'](_0x475e0a)&&this['deactivate'](_0x475e0a),this['activeUIs']['add'](_0x475e0a);const _0x3614f6=new S();v({'source':_0x3cfb91['_visibleAnnotations'],'target':_0x3614f6,'filter':_0x4a362d}),this['uisData']['set'](_0x475e0a,{'collection':_0x3614f6,'filter':_0x4a362d});const _0xf912e7=this['_uis']['get'](_0x475e0a);_0xf912e7['attach'](_0x3614f6),this['listenTo'](_0xf912e7,'change:activeAnnotation',(_0x3518f6,_0x3336dd,_0x2e6de2,_0x20e02a)=>{_0x20e02a&&_0x3cfb91['_removeActiveAnnotation'](_0x20e02a),_0x2e6de2&&_0x3cfb91['_addActiveAnnotation'](_0x2e6de2);});}['deactivate'](_0x537ddb){if(this['activeUIs']['delete'](_0x537ddb),!this['_uis']['has'](_0x537ddb))throw new _0x50bda('annotationsuis-missing-ui',this,{'uiName':_0x537ddb});const _0x2efe7f=this['_uis']['get'](_0x537ddb);_0x2efe7f['detach'](),this['stopListening'](_0x2efe7f),this['uisData']['get'](_0x537ddb)['collection']['destroy'](),this['uisData']['delete'](_0x537ddb);}['switchTo'](_0x3cf454){if(!this['_uis']['has'](_0x3cf454))throw new _0x50bda('annotationsuis-missing-ui',this,{'uiName':_0x3cf454});const _0x32c2af=this['context']['plugins']['get'](y),_0x1dd002=Array['from'](_0x32c2af['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3cf454);const _0x512755=this['_uis']['get'](_0x3cf454);_0x512755['setActiveAnnotation'](_0x1dd002),_0x512755['_setSelectedAnnotations']&&_0x1dd002&&_0x512755['_setSelectedAnnotations']([_0x1dd002]);}['deactivateAll'](){for(const _0x5d0d29 of this['activeUIs'])this['deactivate'](_0x5d0d29);}['register'](_0x33a183,_0x21d533){if(this['_uis']['has'](_0x33a183))throw new _0x50bda('annotationsuis-register-already-registered');if('function'!=typeof _0x21d533['attach']||'function'!=typeof _0x21d533['detach']||'function'!=typeof _0x21d533['setActiveAnnotation'])throw new _0x50bda('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x33a183,_0x21d533);}['refilterAnnotations'](){const _0x5c2b9c=this['context']['plugins']['get'](y)['collection'],_0x2dd75e=new Map(),_0x431032=Array['from'](this['activeUIs']);for(const _0x5ed4e1 of this['activeUIs']){const _0x5d7c51=this['uisData']['get'](_0x5ed4e1)['collection'];for(const _0xf3e916 of _0x5d7c51)_0x2dd75e['set'](_0xf3e916,_0x5ed4e1);}for(const _0x4a0dd2 of _0x5c2b9c){const _0x22d604=_0x2dd75e['get'](_0x4a0dd2);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4a0dd2);const _0x1c0066=_0x431032['find'](_0x5ab58b=>this['uisData']['get'](_0x5ab58b)['filter'](_0x4a0dd2));_0x22d604!==_0x1c0066&&(_0x22d604&&this['uisData']['get'](_0x22d604)['collection']['remove'](_0x4a0dd2),_0x1c0066&&this['uisData']['get'](_0x1c0066)['collection']['add'](_0x4a0dd2));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x29a549){const _0x106180=[];for(const _0x20e2b5 of this['activeUIs']){(0x0,this['uisData']['get'](_0x20e2b5)['filter'])(_0x29a549)&&_0x106180['push'](_0x20e2b5);}if(_0x106180['length']>0x1)throw new _0x50bda('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x106180,'annotationType':_0x29a549['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x2ed0f0){super(_0x2ed0f0),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4ff34a,_0x153636)=>_0x4ff34a+_0x153636),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2961e3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2961e3['to']('isAnimationDisabled',_0x2b67dd=>_0x2b67dd?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2961e3['to']('top',_0x292c29=>Ot(_0x292c29))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x14eb37=this['element']['clientHeight'];_0x14eb37&&(this['height']=_0x14eb37);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xdc4a0a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ed0ea){super(_0x2ed0ea),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 _0x255a6d=this['context']['config']['get']('sidebar.container');_0x255a6d&&this['setContainer'](_0x255a6d);}['setContainer'](_0xaba6a0){if(!g(_0xaba6a0))throw new _0x50bda('sidebar-setcontainer-invalid-element');this['container']=_0xaba6a0;}['_attachToContainer']({viewClass:_0x54ce85='',spaceBetweenItems:_0x22c397=0x19}={}){if(!g(this['container']))throw new _0x50bda('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x54ce85,this['_spaceBetweenItems']=_0x22c397;}['rearrange']({removedAnnotation:_0x2a2c6d,previousAnnotation:_0x197083,nextAnnotation:_0x5237f1}){const _0x252a68=this['getSidebarItemView'](_0x2a2c6d);this['view']['list']['remove'](_0x252a68),this['_destroySidebarItemView'](_0x2a2c6d),_0x197083&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x197083)),_0x5237f1&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5237f1)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x67a1a3,activatedAnnotation:_0x4a90db,disableAnimationOnActivatedAnnotation:_0x53316f}){if(this['_activeAnnotation']=_0x4a90db,_0x67a1a3){_0x67a1a3['isActive']=!0x1;const _0x221e93=this['getSidebarItemView'](_0x67a1a3);_0x221e93&&_0x53316f&&(_0x221e93['isAnimationDisabled']=!0x1);}if(_0x4a90db){const _0xd10aea=this['getSidebarItemView'](_0x4a90db);_0xd10aea&&(_0x4a90db['isActive']=!0x0,_0x53316f&&(_0xd10aea['isAnimationDisabled']=!0x0,_0xd10aea['top']+=0x1),this['_alignToTargetRect'](_0xd10aea));}}['_detachFromContainer'](_0x43d26e){if(this['view']['element']['remove'](),_0x43d26e){for(const _0x58f8c5 of _0x43d26e)this['_destroySidebarItemView'](_0x58f8c5);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1e8e97,_0x32a569){_0x32a569||(_0x32a569=_0x1e8e97['view']);const _0xc1d889=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xc1d889,_0x1e8e97),this['_annotationToSidebarItemView']['set'](_0x1e8e97,_0xc1d889),_0xc1d889['content']['add'](_0x32a569),this['listenTo'](_0x1e8e97['view'],'change:targetRect',(_0x2dfa25,_0x4499f4,_0x1f43d9)=>{const _0x5f583c=this['_getTargetTop'](_0x1e8e97,_0x1f43d9);_0xc1d889['_targetTop']!=_0x5f583c&&(_0xc1d889['_targetTop']=_0x5f583c,this['_setItemTop'](_0xc1d889,_0x5f583c));}),this['listenTo'](_0xc1d889,'change:top',()=>{this['_recalculate'](_0xc1d889,'top');}),this['listenTo'](_0xc1d889,'change:bottom',()=>{this['_recalculate'](_0xc1d889,'bottom');}),this['_alignToTargetRect'](_0xc1d889);const _0x3c039d=this['_getItemBefore'](_0xc1d889);if(_0x3c039d)this['_alignAfterItem'](_0x3c039d,_0xc1d889)||this['_alignToTargetRect'](_0xc1d889);else this['_alignToTargetRect'](_0xc1d889);return this['_updateLastItem'](),this['view']['list']['add'](_0xc1d889),_0xc1d889;}['_alignForTopChange'](_0x5564e6){if(!_0x5564e6['content']['length'])return;const _0x1b4c30=this['_getItemBefore'](_0x5564e6);if(!_0x1b4c30)return;const _0x50a993=this['_sidebarItemViewToAnnotation']['get'](_0x1b4c30),_0x512036=this['_activeAnnotation'];_0x512036&&_0x512036===_0x50a993?this['_alignAfterItem'](_0x1b4c30,_0x5564e6):this['_alignBeforeItem'](_0x5564e6,_0x1b4c30);}['_alignForBottomChange'](_0x4d7e3d){if(!_0x4d7e3d['content']['length'])return;const _0x2d567b=this['_getItemAfter'](_0x4d7e3d);if(!_0x2d567b)return;const _0x129d1f=this['_sidebarItemViewToAnnotation']['get'](_0x2d567b),_0x32221b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x20e194=this['_activeAnnotation'];_0x20e194&&_0x20e194===_0x129d1f&&_0x32221b?(this['_alignBeforeItem'](_0x2d567b,_0x4d7e3d),this['_alignAfterItem'](_0x4d7e3d,_0x2d567b)):_0x20e194&&_0x20e194===_0x129d1f?this['_alignBeforeItem'](_0x2d567b,_0x4d7e3d):this['_alignAfterItem'](_0x4d7e3d,_0x2d567b);}['_recalculate'](_0x18a97a,_0x1019d3){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3061e3,changedProp:_0x58ecc1}of this['_recalculateBuffer'])'top'===_0x58ecc1?this['_alignForTopChange'](_0x3061e3):this['_alignForBottomChange'](_0x3061e3);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x18a97a,'changedProp':_0x1019d3});}['getSidebarItemView'](_0x3ecb51){return this['_annotationToSidebarItemView']['get'](_0x3ecb51);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3976d6){const _0x38c25c=this['getSidebarItemView'](_0x3976d6);this['stopListening'](_0x38c25c),this['stopListening'](_0x3976d6['view']),_0x38c25c['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3976d6),this['_sidebarItemViewToAnnotation']['delete'](_0x38c25c);}['_createSidebarView'](){const _0x33e09a=new H(this['context']['locale']);return _0x33e09a['render'](),this['on']('change:_lastItem',(_0x1a18fa,_0x1625c2,_0x3220f7,_0x2b45de)=>{_0x2b45de&&_0x33e09a['unbind']('minHeight'),_0x3220f7?_0x33e09a['bind']('minHeight')['to'](_0x3220f7,'bottom'):_0x33e09a['minHeight']=null;}),_0x33e09a;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2fa81b){const _0x2306ab=this['_sidebarItemViewToAnnotation']['get'](_0x2fa81b),_0x380fcd=_0x2306ab&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2306ab)-0x1);return _0x380fcd&&this['getSidebarItemView'](_0x380fcd)||null;}['_getItemAfter'](_0x457284){const _0x206da6=this['_sidebarItemViewToAnnotation']['get'](_0x457284),_0x27df3a=_0x206da6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x206da6)+0x1);return _0x27df3a&&this['getSidebarItemView'](_0x27df3a)||null;}['_alignBeforeItem'](_0x54c2d2,_0x24ee3e){_0x54c2d2['updateHeight']();const _0x46c224=G(_0x24ee3e['bottom']+this['_spaceBetweenItems'],_0x54c2d2['top']);return!!_0x46c224&&(this['_setItemTop'](_0x24ee3e,_0x24ee3e['top']-_0x46c224),!0x0);}['_alignAfterItem'](_0x43bb96,_0x15213b){_0x43bb96['updateHeight']();const _0x2bf085=G(_0x43bb96['bottom']+this['_spaceBetweenItems'],_0x15213b['top']);return!!_0x2bf085&&(this['_setItemTop'](_0x15213b,_0x15213b['top']+_0x2bf085,!0x1),!0x0);}['_alignToTargetRect'](_0x5b93b9){const _0x133762=this['_sidebarItemViewToAnnotation']['get'](_0x5b93b9);if(!_0x133762||!_0x133762['target']||!_0x133762['targetRect'])return;const _0x460c6c=this['_getTargetTop'](_0x133762,_0x133762['targetRect']);this['_setItemTop'](_0x5b93b9,_0x460c6c);}['_getTargetTop'](_0x5bc181,_0x254603){if(null===_0x254603)return 0x0;if(_0x5bc181['target']instanceof _0x5ba026)return _0x254603['top'];{const _0x27ccbf=new _0x5ba026(this['view']['element'])['top'];return _0x254603['top']-_0x27ccbf;}}['_setItemTop'](_0xf28560,_0x6849e7,_0x5e68d3=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5e68d3&&(_0x6849e7=Math['max'](_0x6849e7,this['_getMaxAvailableTop'](_0xf28560))),_0xf28560['top']=_0x6849e7;}['_getMaxAvailableTop'](_0x5e1091){let _0x434d72=this['_getItemBefore'](_0x5e1091),_0x1141c8=0x0;for(;_0x434d72;)_0x434d72['updateHeight'](),_0x1141c8+=this['_spaceBetweenItems']+_0x434d72['height'],_0x434d72=this['_getItemBefore'](_0x434d72);return _0x1141c8;}}function G(_0x5a708f,_0x3195dc){return Math['max'](_0x5a708f-_0x3195dc,0x0);}function g(_0x314840){return null!==_0x314840&&'object'==typeof _0x314840&&0x1===_0x314840['nodeType'];}class e extends _0xdc4a0a{['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(_0x4780cb){super(_0x4780cb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5db265(),this['_refreshPositioningDebounced']=_0x1a15c5(()=>{_0x4780cb['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3e2ba8=this['context']['plugins']['get'](j),_0x5d3c9c=this['context']['plugins']['get'](z);_0x3e2ba8['register']('wideSidebar',this),_0x5d3c9c['container']&&_0x3e2ba8['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x9c7c0d){if(_0x9c7c0d===this['activeAnnotation'])return;const _0x7fe4a5=this['context']['plugins']['get'](z);_0x7fe4a5['_activeAnnotation']=_0x9c7c0d;const _0x2e73fa=this['activeAnnotation'];_0x7fe4a5['refresh']({'blurredAnnotation':_0x2e73fa,'activatedAnnotation':_0x9c7c0d}),this['activeAnnotation']=_0x9c7c0d;}['attach'](_0x4b1254){this['annotations']=_0x4b1254;const _0x4d0974=this['context']['plugins']['get'](z);if(_0x4d0974['_annotations']=_0x4b1254,this['isAttached'])throw new _0x50bda('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4d0974,'set:container',()=>{this['detach'](),this['listenTo'](_0x4d0974,'change:container',_0x986444=>{_0x986444['off'](),this['attach'](_0x4b1254);});}),_0x4d0974['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x58b391=_0x23a70d=>{_0x23a70d['updateTargetRect'](),_0x4d0974['addAnnotation'](_0x23a70d);};for(const _0xb67da5 of _0x4b1254)_0x58b391(_0xb67da5);this['listenTo'](_0x4b1254,'add',(_0x13edbc,_0x314a4b)=>{_0x58b391(_0x314a4b);}),this['listenTo'](_0x4b1254,'remove',(_0x4685ef,_0x3c9b6a,_0x1389ee)=>{_0x4d0974['rearrange']({'removedAnnotation':_0x3c9b6a,'previousAnnotation':_0x4b1254['get'](_0x1389ee-0x1),'nextAnnotation':_0x4b1254['get'](_0x1389ee+0x1)}),_0x3c9b6a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4b1254,'focus',(_0x125c00,_0x173f56)=>{this['setActiveAnnotation'](_0x173f56);}),this['listenTo'](_0x4b1254,'blur',()=>{this['setActiveAnnotation'](null);});const _0x7e9e6c=this['context']instanceof _0x4e2cdd?this['context']['editors']:new _0x5db265([this['context']]);for(const _0x4f754f of _0x7e9e6c)this['_integrateWithEditorAnnotations'](_0x4f754f);this['listenTo'](_0x7e9e6c,'add',(_0x51e521,_0x1d7a4a)=>{this['listenTo'](_0x1d7a4a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1d7a4a);});}),this['listenTo'](_0x7e9e6c,'remove',(_0x195118,_0x4f77a0)=>{_0x4f77a0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4f77a0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x50bda('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4566cc=this['context']['plugins']['get'](z);_0x4566cc['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4566cc),this['stopListening'](this['annotations']),this['context']instanceof _0x4e2cdd&&this['stopListening'](this['context']['editors']);for(const _0x1c8d71 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1c8d71);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x577551){if(!_0x577551['plugins']['has']('EditorAnnotations'))return;const _0x2f3998=_0x577551['plugins']['get']('EditorAnnotations'),_0x313ed3=()=>{const _0xeba0c0=_0x2f3998['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xeba0c0[0x0]||null);};this['listenTo'](_0x2f3998,'refresh',_0x313ed3),this['listenTo'](_0x2f3998,'blur',(_0xd8de8b,{isAnnotationTracked:_0x2dbd54})=>{this['activeAnnotation']&&_0x2dbd54(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2f3998,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x36c4ff=>{_0x2f3998['hasDomSelection']()&&(_0x313ed3(),_0x36c4ff['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2f3998);}['_destroyEditorAnnotationsIntegration'](_0x3dfc15){this['stopListening'](_0x3dfc15),this['_editorAnnotations']['remove'](_0x3dfc15);}}class C extends _0x5281d3{['counterView'];constructor(_0x4458b7){super(_0x4458b7);const _0x451c8b=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x205615,_0x39fba9)=>_0x205615?'...':_0x39fba9['toString']()),this['set']('annotationType',''),this['icon']=_0x376438,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x451c8b['to']('annotationType',_0x383fe3=>'ck-annotation-counter__badge--'+_0x383fe3),_0x451c8b['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x451c8b['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xdc4a0a{['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(_0x3697e5){super(_0x3697e5),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x442c7d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5db265(),this['_refreshPositioningDebounced']=_0x1a15c5(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x28988b(this['context']['locale']),this['balloonPanelView']=new _0x10e711(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x44bdb4){this['annotations']=_0x44bdb4;const _0x4054c9=this['context']['plugins']['get'](z),_0x238158=this['balloonPanelView'];if(_0x4054c9['_annotations']=_0x44bdb4,this['isAttached'])throw new _0x50bda('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4054c9,'set:container',()=>{this['detach'](),this['listenTo'](_0x4054c9,'change:container',_0x2e9ae8=>{_0x2e9ae8['off'](),this['attach'](_0x44bdb4);});}),_0x4054c9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3f261a=_0x10e87f=>{const _0x5ea263=new C(this['context']['locale']);_0x4054c9['addAnnotation'](_0x10e87f,_0x5ea263),this['_annotationToNarrowView']['set'](_0x10e87f,_0x5ea263),_0x5ea263['bind']('isDirty','annotationType','number')['to'](_0x10e87f['view'],'isDirty','type','length'),_0x5ea263['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x238158['content']['first']!==_0x10e87f['view']?(this['_showBalloon'](_0x10e87f),_0x10e87f['view']['element']['focus'](),this['setActiveAnnotation'](_0x10e87f)):this['setActiveAnnotation'](null);});};for(const _0x2102dd of _0x44bdb4)_0x3f261a(_0x2102dd);this['listenTo'](_0x44bdb4,'add',(_0xa574da,_0x3da7b0)=>{_0x3f261a(_0x3da7b0);}),this['listenTo'](_0x44bdb4,'remove',(_0x33c2f5,_0x3b2702,_0x4eae4c)=>{this['_annotationToNarrowView']['get'](_0x3b2702)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3b2702),_0x4054c9['rearrange']({'removedAnnotation':_0x3b2702,'previousAnnotation':_0x44bdb4['get'](_0x4eae4c-0x1),'nextAnnotation':_0x44bdb4['get'](_0x4eae4c+0x1)}),_0x3b2702===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x44bdb4,'focus',(_0x564e2a,_0x13f95d)=>{this['setActiveAnnotation'](_0x13f95d);}),this['listenTo'](_0x44bdb4,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x40268f,_0x1bdbdf)=>{_0x1bdbdf['keyCode']===_0x228f4b['esc']&&_0x238158['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x238158['content']['first']),this['_hideBalloon'](),_0x1bdbdf['stopPropagation'](),_0x1bdbdf['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2001c5,_0xdbed61)=>{const _0x4ea230=_0xdbed61['target'];_0x238158['isVisible']&&_0x238158['element']['contains'](_0x4ea230)||_0x4054c9['view']['element']['contains'](_0x4ea230)||_0x2001c5['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x149385=>_0x149385['contains'](_0x4ea230))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2151e2=this['context']instanceof _0x4e2cdd?this['context']['editors']:new _0x5db265([this['context']]);for(const _0x15b5e3 of _0x2151e2)this['_integrateWithEditorAnnotations'](_0x15b5e3);this['listenTo'](_0x2151e2,'add',(_0x267af5,_0x922a76)=>{this['listenTo'](_0x922a76,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x922a76);});}),this['listenTo'](_0x2151e2,'remove',(_0x47b317,_0x9a5af0)=>{_0x9a5af0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x9a5af0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x35f06c){if(_0x35f06c===this['activeAnnotation'])return;const _0xc67df6=this['context']['plugins']['get'](z);if(_0xc67df6['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x35f06c,'disableAnimationOnActivatedAnnotation':!0x0}),_0x35f06c)_0xc67df6['getSidebarItemView'](_0x35f06c)?this['_showBalloon'](_0x35f06c):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x35f06c;}['detach'](){if(!this['isAttached'])throw new _0x50bda('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x205f3a=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5ba42d=>_0x5ba42d['destroy']()),this['_annotationToNarrowView']['clear'](),_0x205f3a['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4e2cdd&&this['stopListening'](this['context']['editors']);for(const _0x156d39 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x156d39);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'](_0x1d4387){if(!_0x1d4387['plugins']['has']('EditorAnnotations'))return;const _0x31f0c8=_0x1d4387['plugins']['get']('EditorAnnotations'),_0x2842df=this['context']['plugins']['get'](z),_0x4d1d94=this['annotations'],_0x1ac787=this['balloonPanelView'],_0xdc1246=()=>{const _0x37e509=_0x31f0c8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x37e509),this['setActiveAnnotation'](_0x37e509[0x0]||null);};this['listenTo'](_0x31f0c8,'refresh',_0xdc1246),this['listenTo'](_0x31f0c8,'blur',(_0x32d95a,{isAnnotationTracked:_0x297718})=>{this['activeAnnotation']&&_0x297718(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x31f0c8,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4d1d94,'blur',_0x593c61=>{_0x31f0c8['hasDomSelection']()&&_0x593c61['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5b33ea,_0x4439ee)=>{const _0x16e734=_0x4439ee['target'];_0x1ac787['isVisible']&&_0x1ac787['element']['contains'](_0x16e734)||_0x2842df['view']['element']['contains'](_0x16e734)||this['activeAnnotation']&&_0x31f0c8['hasDomSelection']()&&(_0xdc1246(),_0x5b33ea['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x31f0c8);}['_destroyEditorAnnotationsIntegration'](_0x3fa49f){_0x3fa49f&&(this['stopListening'](_0x3fa49f),this['_editorAnnotations']['remove'](_0x3fa49f));}['_setSelectedAnnotations'](_0x3bb693){for(const _0x40a4df of this['_selectedAnnotations'])_0x3bb693['includes'](_0x40a4df)||this['_manuallyClosedAnnotationViews']['delete'](_0x40a4df['view']);this['_selectedAnnotations']=_0x3bb693;}['_refreshPositioning'](){const _0x2ee6ae=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x2ee6ae['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x47484b){if(this['_manuallyClosedAnnotationViews']['has'](_0x47484b['view']))return;const _0x247bf7=this['balloonPanelView']['content']['first'];_0x247bf7!==_0x47484b['view']?(_0x247bf7&&this['_detachListeners'](_0x247bf7),this['_attachListeners'](_0x47484b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x47484b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3a3538=this['balloonPanelView']['content']['first'],_0x5e2220=_0x3a3538&&this['annotations']['getByView'](_0x3a3538);if(!_0x5e2220||!this['_annotationToNarrowView']['has'](_0x5e2220))return;const _0x2e828f=this['_annotationToNarrowView']['get'](_0x5e2220)['element'],_0x4add0e=(function(){const _0x4c6467=_0x10e711['defaultPositions'];return[_0x4c6467['southArrowNorthEast'],_0x4c6467['northArrowSouthEast'],_0x4c6467['southArrowNorth'],_0x4c6467['northArrowSouth'],_0x4c6467['southArrowNorthWest'],_0x4c6467['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2e828f,'positions':_0x4add0e});}['_hideBalloon'](){const _0x4ba623=this['balloonPanelView'],_0x5e178a=_0x4ba623['content']['first'];_0x5e178a&&(this['_detachListeners'](_0x5e178a),_0x4ba623['unpin'](),_0x4ba623['content']['clear']());}['_attachListeners'](_0x5dce45){this['listenTo'](_0x5dce45,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5dce45,'Esc',(_0x23eb61,_0x125bdc)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5dce45),this['_hideBalloon'](),_0x125bdc();});}['_detachListeners'](_0x143263){this['stopListening'](_0x143263);}}class c extends _0x44affe{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2433e3,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47f2c4){super(_0x47f2c4),_0x47f2c4['editing']['view']['addObserver'](_0x1cd994),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x47f2c4['plugins']['get'](_0x2433e3),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x24ab89=this['editor']['plugins']['get'](j);_0x24ab89['context']===this['editor']&&(_0x24ab89['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x17e677,_0x2ecc13)=>{const _0x557e76=this['_balloon'];if(this['isAttached']&&_0x557e76['visibleView']){const _0x1b8dea=this['annotations']['getByView'](_0x557e76['visibleView']);_0x1b8dea&&this['_closeAnnotation'](_0x1b8dea),_0x2ecc13();}}));}['afterInit'](){const _0x16f590=this['editor']['plugins']['get'](j);_0x16f590['context']===this['editor']&&(_0x16f590['hasActive']()||_0x16f590['switchTo']('inline'));}['setActiveAnnotation'](_0x1f61b5){_0x1f61b5!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1f61b5&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1f61b5)&&this['_addAnnotationToBalloon'](_0x1f61b5,!0x0),_0x1f61b5['isActive']=!0x0),_0x1f61b5||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1f61b5);}['attach'](_0x15d73d){this['annotations']=_0x15d73d;const _0x680ab0=this['editor']['plugins']['get'](j),_0x579b6f=this['_balloon'];if(this['isAttached'])throw new _0x50bda('inlineannotations-attach-already-attached',this);if(_0x680ab0['context']!==this['editor'])throw new _0x50bda('inlineannotations-not-allowed-with-context',this);const _0x456e8b=this['editor']['plugins']['get'](b);this['listenTo'](_0x456e8b,'refresh',()=>{const _0x551eb9=_0x456e8b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1c2d21,_0x31dee7;!this['_forceRefresh']&&(_0x1c2d21=_0x551eb9,_0x31dee7=this['_selectedAnnotations'],_0x1c2d21['length']===_0x31dee7['length']&&_0x1c2d21['every'](_0x52599d=>_0x31dee7['includes'](_0x52599d)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x551eb9),this['setActiveAnnotation'](_0x551eb9[0x0]||null));}),this['listenTo'](_0x456e8b,'blur',(_0xd4f49b,{isAnnotationTracked:_0xf696c5})=>{this['activeAnnotation']&&_0xf696c5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5e5eba,_0x481809,_0x34763e)=>{_0x34763e||this['setActiveAnnotation'](null);}),this['listenTo'](_0x15d73d,'remove',(_0x3174c9,_0x19c508)=>{this['_removeAnnotationFromBalloon'](_0x19c508),_0x19c508===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x579b6f,'change:visibleView',(_0x186122,_0x5746b1,_0x2e66e6,_0x4361ad)=>{_0x4361ad&&this['stopListening'](_0x4361ad);const _0x16fa53=_0x15d73d['getByView'](_0x2e66e6);_0x2e66e6&&_0x16fa53&&(this['listenTo'](_0x2e66e6,'change:height',()=>{_0x579b6f['updatePosition']();}),this['listenTo'](_0x2e66e6,'Esc',()=>{this['_closeAnnotation'](_0x16fa53),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x16fa53&&this['setActiveAnnotation'](_0x16fa53));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x579b6f['visibleView']&&(_0x15d73d['getByView'](_0x579b6f['visibleView'])&&_0x579b6f['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 _0x50bda('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5b10f7 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5b10f7);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x219725){for(const _0x55d786 of this['_selectedAnnotations'])_0x219725['includes'](_0x55d786)||this['_manuallyClosed']['delete'](_0x55d786);for(const _0x53f585 of this['annotations'])_0x219725['includes'](_0x53f585)||this['_removeAnnotationFromBalloon'](_0x53f585);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x72082 of _0x219725)this['_addAnnotationToBalloon'](_0x72082);}this['_selectedAnnotations']=_0x219725;}['_addAnnotationToBalloon'](_0x3b0180,_0x1a7862=!0x1){this['_manuallyClosed']['has'](_0x3b0180)||(this['_addedAnnotations']['has'](_0x3b0180)||this['_balloon']['hasView'](_0x3b0180['view'])||(this['_addedAnnotations']['add'](_0x3b0180),this['_balloon']['add']({'stackId':_0x3b0180['view']['id'],'view':_0x3b0180['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3b0180)}})),_0x1a7862&&this['_balloon']['showStack'](_0x3b0180['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2feead){const _0x4559bd=_0x2feead['target'],_0x4a2db7=this['editor']['editing']['view'],_0x3a32f3=_0x4a2db7['document']['selection']['getFirstRange'](),_0x3eee48=_0x4a2db7['domConverter']['viewRangeToDom'](_0x3a32f3);if(_0x3eee48['collapse'](!0x0),_0x4559bd){if(_0x4559bd instanceof _0x5ba026)return _0x4559bd;let _0x3ce337=[];for(const _0x25c589 of _0x4559bd)_0x3ce337['push'](...F(_0x25c589['getClientRects']()));_0x3ce337=function(_0x365ecc){const _0x214ce0=[];let _0x30db76=_0x365ecc[0x0];for(let _0x57e221=0x1;_0x57e221<_0x365ecc['length'];_0x57e221++)P(_0x30db76,_0x365ecc[_0x57e221])?_0x30db76['width']+=_0x365ecc[_0x57e221]['width']:(_0x214ce0['push'](_0x30db76),_0x30db76=_0x365ecc[_0x57e221]);return _0x214ce0['push'](_0x30db76),_0x214ce0;}(_0x3ce337);const _0x2698c0=_0x3eee48['getBoundingClientRect']();return _0x3ce337['find'](_0x3709fd=>_0x3709fd['top']<=_0x2698c0['top']&&_0x3709fd['bottom']>=_0x2698c0['bottom']&&_0x3709fd['left']<=_0x2698c0['left']&&_0x3709fd['right']>=_0x2698c0['right'])||_0x3ce337[0x0];}return _0x2feead['targetRect']||_0x3eee48;}['_removeAnnotationFromBalloon'](_0x41569d){this['_addedAnnotations']['has'](_0x41569d)&&this['_balloon']['hasView'](_0x41569d['view'])&&(this['_addedAnnotations']['delete'](_0x41569d),this['_balloon']['remove'](_0x41569d['view']));}['_closeAnnotation'](_0xfbe10){this['_manuallyClosed']['add'](_0xfbe10),this['_removeAnnotationFromBalloon'](_0xfbe10);}}function F(_0x3de9a4){return Array['from'](_0x3de9a4)['map'](DOMRect['fromRect']);}function P(_0x5c2087,_0x15a4f1){return _0x5c2087['top']===_0x15a4f1['top']&&_0x5c2087['bottom']===_0x15a4f1['bottom']&&_0x5c2087['right']===_0x15a4f1['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x48bb25,_0x31642b){super(_0x48bb25),this['set']('isEmpty',!_0x31642b['length']),this['focusTracker']=new _0x290ee8(),this['_annotationViews']=_0x31642b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x35defd({'focusables':_0x31642b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x31642b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x31642b,'remove',(_0x4d2167,_0x34c2e8)=>{_0x34c2e8['isActive']&&this['focus'](),_0x31642b['length']||(this['isEmpty']=!0x0);});const _0x7877a5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x48bb25,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x31642b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x7877a5['if']('isEmpty','ck-hidden',_0x4a1565=>!_0x4a1565)]},'children':[{'text':N(_0x48bb25,'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 _0x4574a8 of this['_annotationViews'])this['focusTracker']['add'](_0x4574a8['element']);this['_annotationViews']['on']('change',(_0xfba346,{added:_0x122467,removed:_0x144ea3})=>{for(const _0x322dc1 of _0x122467)this['focusTracker']['add'](_0x322dc1['element']);for(const _0x4f28a7 of _0x144ea3)this['focusTracker']['remove'](_0x4f28a7['element']);});}}class p extends _0xdc4a0a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x496bb5){super(_0x496bb5),this['archivedThreads']=new _0x5db265();}['init'](){const _0x2f164c=this['context'],_0x5662c8=_0x2f164c['plugins']['get'](o),_0x2b3dc3=_0x2f164c['plugins']['get'](y);this['listenTo'](_0x5662c8,'addCommentThread',(_0x1ac86d,{threadId:_0x413a57})=>{const _0xcbfe50=_0x5662c8['getCommentThread'](_0x413a57);_0xcbfe50['archivedAt']&&this['archivedThreads']['add'](_0xcbfe50,this['_calculatePosition'](_0xcbfe50['archivedAt'])),this['listenTo'](_0xcbfe50,'change:archivedAt',(_0x33cf97,_0x3bea46,_0xfdce5b)=>{_0xfdce5b?this['archivedThreads']['has'](_0xcbfe50)||this['archivedThreads']['add'](_0xcbfe50,this['_calculatePosition'](_0xcbfe50['archivedAt'])):this['archivedThreads']['has'](_0xcbfe50)&&this['archivedThreads']['remove'](_0xcbfe50);});}),this['listenTo'](_0x5662c8,'removeCommentThread',(_0x2accec,{threadId:_0x2c5180})=>{const _0x4e8629=_0x5662c8['getCommentThread'](_0x2c5180);this['stopListening'](_0x4e8629),this['archivedThreads']['has'](_0x4e8629)&&this['archivedThreads']['remove'](_0x4e8629);},{'priority':'highest'}),this['listenTo'](_0x2b3dc3['collection'],'focus',(_0x49290d,_0x29255c)=>{_0x29255c['isVisible']||(_0x29255c['isActive']=!0x0,_0x2b3dc3['activate'](_0x29255c));});}['_calculatePosition'](_0x1d9f0d){const _0x177ec3=[...this['archivedThreads']]['findIndex'](_0x37708b=>_0x37708b['archivedAt']<_0x1d9f0d);return _0x177ec3>-0x1?_0x177ec3:this['archivedThreads']['length'];}}class a extends _0x44affe{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x38f7c8];}constructor(_0x113f0d){super(_0x113f0d),this['annotationViews']=new _0x47b0f9(),this['_pendingThreads']=[];}['init'](){const _0x5bb7ad=this['editor'],_0x12d846=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5bb7ad['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5281d3,!0x0)),_0x5bb7ad['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1afa20=this['_createCommentsArchiveButton'](_0x4695c5);return _0x1afa20['set']({'role':'menuitemcheckbox'}),_0x1afa20;});const _0x2453c4=_0x5bb7ad['plugins']['get'](p),_0x105464=_0x5bb7ad['plugins']['get']('Annotations'),_0x4745e5=_0x5bb7ad['plugins']['get']('CommentsRepository');_0x2453c4['archivedThreads']['forEach'](_0x39d246=>{this['_handleNewThread'](_0x39d246);}),this['listenTo'](_0x2453c4['archivedThreads'],'add',(_0x2f3400,_0x2b7ac0)=>{this['_handleNewThread'](_0x2b7ac0);}),this['listenTo'](_0x105464['collection'],'add',(_0x19e17c,_0x13293e)=>{const _0x29e9f4=this['_pendingThreads']['find'](_0x51f493=>{const _0x29f9d2=_0x4745e5['_threadToController']['get'](_0x51f493);return _0x29f9d2&&_0x13293e['innerView']===_0x29f9d2['view'];});if(_0x29e9f4){const _0x3c318b=this['_calculatePosition'](_0x29e9f4['archivedAt']);this['_addAnnotationToArchive'](_0x13293e,_0x3c318b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x29e9f4),0x1);}}),this['listenTo'](_0x2453c4['archivedThreads'],'remove',(_0x417ec8,_0x317701)=>{const _0x56ea6f=_0x5bb7ad['config']['get']('collaboration.channelId');if(!_0x56ea6f||_0x317701['channelId']===_0x56ea6f){if(this['_pendingThreads']['includes'](_0x317701))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x317701),0x1);else{const _0x578363=_0x4745e5['_threadToController']['get'](_0x317701),_0x4dcc51=_0x105464['getByInnerView'](_0x578363['view']);this['annotationViews']['remove'](_0x4dcc51['view']),this['stopListening'](_0x4dcc51),this['stopListening'](_0x4dcc51['focusableElements']);}}}),this['listenTo'](_0x105464['collection'],'add',(_0x1b308f,_0xe19620)=>{this['listenTo'](_0xe19620,'escape',_0x12d846);}),this['listenTo'](_0x105464['collection'],'remove',(_0x4c3931,_0x11d22b)=>{this['stopListening'](_0x11d22b,'escape',_0x12d846);});}['_addAnnotationToArchive'](_0x57ca83,_0x222476){this['listenTo'](_0x57ca83,'set:isVisible',_0x15ee11=>{_0x15ee11['return']=!0x1,_0x15ee11['stop']();}),this['annotationViews']['add'](_0x57ca83['view'],_0x222476);}['_handleNewThread'](_0x115f45){const _0x2bd288=this['editor']['plugins']['get']('CommentsRepository'),_0x51f202=this['editor']['plugins']['get']('Annotations'),_0x4c40f9=this['editor']['config']['get']('collaboration.channelId');if(!_0x4c40f9||_0x115f45['channelId']===_0x4c40f9){const _0x3f21b2=_0x2bd288['_threadToController']['get'](_0x115f45);if(!_0x3f21b2)return void this['_pendingThreads']['push'](_0x115f45);const _0x3ddef5=this['_calculatePosition'](_0x115f45['archivedAt']),_0xe2ef99=_0x51f202['getByInnerView'](_0x3f21b2['view']);_0xe2ef99['isVisible']&&_0x51f202['_visibleAnnotations']['remove'](_0xe2ef99),this['_addAnnotationToArchive'](_0xe2ef99,_0x3ddef5);}}['_calculatePosition'](_0x1c554b){const _0x4d6766=this['editor']['config']['get']('collaboration.channelId'),_0x3b782b=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2d240b=>_0x2d240b['channelId']===_0x4d6766)['findIndex'](_0x5d01d9=>_0x5d01d9['archivedAt']<_0x1c554b);return _0x3b782b<0x0||_0x3b782b>this['annotationViews']['length']?this['annotationViews']['length']:_0x3b782b-0x1;}['_toggleDialog'](){const _0x175a4a=this['editor'],_0x490d8b=_0x175a4a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x175a4a['locale'],this['annotationViews'])),'commentsArchive'===_0x490d8b['id']?_0x490d8b['hide']():_0x490d8b['show']({'id':'commentsArchive','title':N(_0x175a4a['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4c1629,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2077cc['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x35a387,_0x25fb5d=!0x1){const _0x24457c=this['editor']['locale'],_0x58948f=this['editor']['plugins']['get']('Dialog'),_0x5c2e84=new _0x35a387(_0x24457c);return _0x5c2e84['bind']('isEnabled')['to'](this,'isEnabled'),_0x5c2e84['bind']('isOn')['to'](_0x58948f,'id',_0x36335d=>'commentsArchive'===_0x36335d),_0x5c2e84['set']({'label':N(_0x24457c,'COMMENTS_ARCHIVE'),'icon':_0x4c1629,'isToggleable':!0x0}),_0x25fb5d&&(_0x5c2e84['tooltip']=!0x0),this['listenTo'](_0x5c2e84,'execute',()=>this['_toggleDialog']()),_0x5c2e84;}['_hideDialogOnAnnotationEscape']=_0x343449=>{const _0x4f9312=_0x343449['source'];if(!this['annotationViews']['has'](_0x4f9312['view']))return;const _0x4582aa=this['editor']['plugins']['get']('Dialog');_0x4582aa['isOpen']&&'commentsArchive'===_0x4582aa['id']&&(_0x4582aa['hide'](),_0x343449['stop']());};}class gi extends _0x44affe{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 _0x1f8384,ContextPlugin as _0x152fb7,PendingActions as lt,Command as _0x39b56b,Plugin as _0x165a5f,Context as _0x4eea4a}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x41c8cb,uid as _0x4c5e37,KeystrokeHandler as jt,FocusTracker as _0x5f5319,diff as _0x52b175,Collection as _0x139e96,Rect as _0x3f14b6,CKEditorError as _0x266f92,first as _0x49bf05,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x2bb24d,keyCodes as _0x63f92}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x193858,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x188cb3,trimHtml as ts,LateFocusDropdownButtonView as _0x539736,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x355e93}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x3b904d}from'es-toolkit/compat';import{IconUndo as _0x130a47,IconCheck as _0x2a328a,IconPencil as _0x5939de,IconRemoveComment as _0x92b88,IconThreeVerticalDots as _0x44b678,IconAddComment as _0x1b49ba,IconCommentsArchive as _0x54b5f6}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x140f1f,ButtonView as _0x47a354,ViewCollection as _0x577399,createDropdown as _0x3deee8,ListView as _0x5ca25c,focusChildOnDropdownOpen as _0x1518f9,ListItemView as _0x365663,MenuBarMenuListItemButtonView as _0x320df3,BodyCollection as _0x530e58,BalloonPanelView as _0x4534d9,ContextualBalloon as _0x15b3ff,Dialog as _0x20864c,DialogViewPosition as _0x22636}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x1cac50}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 _0x3b0de7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x4359cf}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x41c8cb(){['model'];['view'];constructor(_0x35177d,_0x61bc16){super(),this['model']=_0x35177d,this['model']['_isAttached']=!0x0,this['view']=_0x61bc16,this['listenTo'](_0x61bc16,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x61bc16,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x61bc16,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x61bc16,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x61bc16,'addComment',(_0x5e0975,_0xb98570)=>this['addComment'](_0xb98570)),this['listenTo'](_0x61bc16,'updateComment',(_0x5c2753,_0x5dc974,_0x5ecfdc)=>this['updateComment'](_0x5dc974,_0x5ecfdc)),this['listenTo'](_0x61bc16,'removeComment',(_0x133a12,_0x3cd7c4)=>this['removeComment'](_0x3cd7c4));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1ffbf4){this['model']['addComment']({'content':_0x1ffbf4,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2def70,_0x14031d){this['model']['getComment'](_0x2def70)['update']({'content':_0x14031d});}['removeComment'](_0x900bb7){this['model']['getComment'](_0x900bb7)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x14d22b,_0x58bdc0,_0x149b13){const t=_0x14d22b['t'];switch(_0x58bdc0){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'},_0x149b13);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'},_0x149b13);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'},_0x149b13);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'},_0x149b13);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x149b13);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'},_0x149b13);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'},_0x149b13);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'},_0x149b13);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 Rt extends $t{['main'];['editable'];constructor(_0x923db3,_0x1d166b){super(_0x923db3);const _0x2cf00b=_0x4c5e37();this['main']=this['createCollection'](),this['editable']=new Vt(_0x923db3,_0x1d166b,void 0x0,{'label':()=>N(_0x923db3,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x923db3['uiLanguageDirection'],'lang':_0x923db3['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x2cf00b},'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 Et extends Ut{['view'];constructor(_0x51911d){super(_0x51911d),this['view']=new Rt(_0x51911d['locale'],_0x51911d['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x317777=this['editor']['editing']['view'],_0xb9bd04=this['view']['editable'],_0x2e7663=_0x317777['document']['getRoot']();_0xb9bd04['name']=_0x2e7663['rootName'],this['view']['render']();const _0x3d5294=_0xb9bd04['element'];this['setEditableElement'](_0xb9bd04['name'],_0x3d5294),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x317777['attachDomRoot'](_0x3d5294),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x41c8cb(_0x1f8384){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x3c4fe9={}){function _0x3cddeb(_0x4d3ce4){return _0x4d3ce4['map'](_0x285a6a=>String['fromCharCode'](_0x285a6a))['join']('');}(_0x3c4fe9=Object['assign']({},_0x3c4fe9))['plugins']||(_0x3c4fe9['plugins']=hs['defaultPlugins']),super(_0x3c4fe9),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3cddeb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3cddeb([0x76,0x69,0x65,0x77])][_0x3cddeb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3cddeb([0x61,0x75,0x74,0x6f]),this[_0x3cddeb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3cddeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3cddeb([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3cddeb([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3cddeb([0x6f,0x6b])});}['create'](){const _0x5e5868=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5e5868))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xc18d11=>{const _0x3ef22d=this['model']['document']['getRoot'](),_0x4879d3=_0x3ef22d&&_0x3ef22d['getChild'](_0x3ef22d['childCount']-0x1);_0xc18d11['setSelection'](_0x4879d3,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x44bae1=this['editing']['view'],_0x49cd6b=_0x44bae1['document']['getRoot'](),_0x524568=_0x49cd6b['getChild'](0x0);_0x49cd6b['childCount']>0x1||!_0x524568||'p'!=_0x524568['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x44bae1,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x524568['placeholder']=this['placeholder']),Ft({'view':_0x44bae1,'element':_0x524568,'keepOnFocus':!0x0}),this['placeholderElement']=_0x524568);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x532e96,_0x3375e1={}){super(_0x532e96),this['editor']=null,this['_editorConfig']=_0x3375e1,this['set']('value',_0x3375e1['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x532e96,'Reply...')),this['set']('submitLabel',N(_0x532e96,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5f5319(),this['focusCycler']=new _0x140f1f({'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',(_0x24dd75,_0x24ba18)=>{this['cancelButtonView']['fire']('execute'),_0x24ba18();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3b56d0,_0x3ee3b5)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3ee3b5());}),this['on']('submit',(_0x34139d,_0x31e5db)=>{_0x31e5db['length']>0xfde8?(alert(N(_0x532e96,'TOO_LONG_COMMENT_ALERT',[_0x31e5db['length'],0xfde8])),_0x34139d['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x16aa56=this['editor'];this['element']['insertBefore'](_0x16aa56['ui']['element'],this['element']['firstChild']),_0x16aa56['model']['document']['on']('change',()=>this['value']=_0x16aa56['getData']()),_0x16aa56['bind']('placeholder')['to'](this),this['focusables']['add'](_0x16aa56['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4638a8){-0x1===_0x4638a8?(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:_0x9d630}=this,_0x52d7e6=new _0x47a354(_0x9d630);return _0x52d7e6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x52d7e6['withText']=!0x0,_0x52d7e6['bind']('label')['to'](this,'submitLabel'),_0x52d7e6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x52d7e6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x536e64,_0x168a8c)=>!_0x168a8c&&!!_0x536e64['trim']()),_0x52d7e6;}['_createCancelButton'](){const {locale:_0x4b32b5}=this,_0x33c61f=new _0x47a354(_0x4b32b5);return _0x33c61f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x33c61f['label']=N(_0x4b32b5,'Cancel'),_0x33c61f['withText']=!0x0,_0x33c61f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x33c61f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5d789f=>{this['focusTracker']['add'](_0x5d789f['element']);}),this['focusables']['on']('change',(_0x46e03d,_0x472025)=>{for(const _0x1a79cd of Array['from'](_0x472025['added'])['reverse']())this['focusTracker']['add'](_0x1a79cd['element']);});}}class ie extends kt{constructor(_0x186388,_0x4c9eb5,_0x28ca93){super(_0x186388),this['commentInputView']=new es(_0x186388,_0x28ca93),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4adc72,_0x2d4e40)=>_0x4adc72||!!_0x2d4e40),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 _0x193858(_0x186388,_0x4c9eb5),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'](_0x32f95c){this['commentInputView']['focus'](_0x32f95c);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x21b9a3,_0x2ee8cd)=>{const {submitButtonView:_0x464707,cancelButtonView:_0x16df27,editor:_0x3386de}=this['commentInputView'];[_0x464707['element'],_0x16df27['element'],_0x3386de?_0x3386de['editing']['view']['getDomRoot']():null]['filter'](_0x4c0274=>_0x4c0274)['some'](_0xe054f=>_0xe054f['contains'](_0x2ee8cd['target']))||(this['focus'](),_0x2ee8cd['preventDefault']());});}}class rs extends kt{constructor(_0x22f4cc){super(_0x22f4cc);const _0x50de5d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x50de5d['to']('count',_0x143643=>N(_0x22f4cc,'NUMBER_OF_COMMENTS',_0x143643))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2f4030,_0x9ab699,_0x5781f3){super(_0x2f4030);const _0x3343b3=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x9ab699['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x9ab699,this['_config']=_0x5781f3,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['focusCycler']=new _0x140f1f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x360176=>this['commentViews']['map'](_0x571d04=>_0x571d04['element'])['includes'](_0x360176['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x2f4030),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x239242=>_0x239242-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4eb311 of _0x9ab699['comments'])this['_handleNewCommentModel'](_0x4eb311);this['_handleInfoComment'](),this['listenTo'](_0x9ab699['comments'],'add',(_0x3514,_0x49de90)=>{const _0x1906df=this['_calculatePosition'](_0x49de90);this['length']++,this['_handleNewCommentModel'](_0x49de90,_0x1906df),this['refreshVisibleViews']();}),this['listenTo'](_0x9ab699['comments'],'remove',(_0x5994c5,_0x4e5a28)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4e5a28),this['refreshVisibleViews']();}),this['listenTo'](_0x9ab699,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x9ab699,'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',_0x3343b3['if']('length','ck-hidden',_0x2f3031=>!_0x2f3031)],'aria-label':N(_0x2f4030,'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'](_0x2e1e2b){-0x1===_0x2e1e2b?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x33cfd2 of this['commentViews'])_0x33cfd2['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x5a1b5f,_0x39fb16){const _0x133917=new this['_config']['CommentView'](this['locale'],_0x5a1b5f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x133917['viewUid']=_0x5a1b5f['id'],_0x133917['delegate']('removeComment')['to'](this),_0x133917['delegate']('updateComment')['to'](this),_0x133917['delegate']('resolveCommentThread')['to'](this),_0x133917['delegate']('editorReady')['to'](this),_0x133917['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x133917,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x133917,_0x39fb16);}['_calculatePosition'](_0x4ca0e7){const _0xaaee6c=this['_model']['_findOptimalIndex'](_0x4ca0e7);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x4ca0e7['authoredAt']?_0xaaee6c-0x1:_0xaaee6c:_0xaaee6c-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x56eb59={'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'],_0x56eb59,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x56eb59));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x232955){const _0xe272c2=this['commentViews']['remove'](_0x232955['id']);this['stopListening'](_0xe272c2),_0xe272c2['isEditMode']&&this['_updateHasDirtyComment'](),_0xe272c2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1ea64c=>_0x1ea64c['isEditMode']);}['_rearrangeCollapse'](){const _0x3aef9a=function(_0x381723){const _0xc579d=new _0x139e96();for(const _0x29819c of _0x381723)_0xc579d['add'](_0x29819c);return _0xc579d;}(this['commentViews']),_0x3a6c23=this['_collapsedCommentsView']['count'];for(let _0x39bf2f=0x1;_0x39bf2f<=_0x3a6c23;_0x39bf2f++)_0x3aef9a['remove'](0x1);for(const _0x4b8a0b of _0x3aef9a)_0x4b8a0b['collapse']();_0x3a6c23>0x0&&_0x3aef9a['add'](this['_collapsedCommentsView'],0x1),ns(_0x52b175(Array['from'](this['visibleViews']),Array['from'](_0x3aef9a)),this['visibleViews'],_0x3aef9a);}['_rearrangeExpand'](){ns(_0x52b175(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x111ed6 of this['visibleViews'])_0x111ed6['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x539bcb=>{this['focusTracker']['add'](_0x539bcb['element']),this['keystrokes']['listenTo'](_0x539bcb['element']);}),this['commentViews']['on']('change',(_0x1ae5d9,_0x47aafd)=>{for(const _0x328654 of _0x47aafd['removed'])this['focusTracker']['remove'](_0x328654['element']),this['keystrokes']['stopListening'](_0x328654['element']);for(const _0x4cf4f1 of Array['from'](_0x47aafd['added'])['reverse']())this['focusTracker']['add'](_0x4cf4f1['element']),this['keystrokes']['listenTo'](_0x4cf4f1['element']);});}}function ns(_0xdd8c44,_0x49dbe2,_0x273ecf){let _0x5e87b8=0x0;for(const _0x5bb72a of _0xdd8c44)switch(_0x5bb72a){case'insert':_0x49dbe2['add'](_0x273ecf['get'](_0x5e87b8),_0x5e87b8),_0x5e87b8++;break;case'delete':_0x49dbe2['remove'](_0x5e87b8);break;case'equal':_0x5e87b8++;}}class oe extends kt{constructor(_0x4a4f13){super(_0x4a4f13);const _0x4e6007=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4e6007['to']('contextValue',_0x127637=>N(_0x4a4f13,'THREAD_CONTEXT_LABEL',_0x127637)),'tabindex':-0x1},'children':[{'text':_0x4e6007['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2b150d,_0x377fa5){super(_0x2b150d);const _0x2bcdcd=this['bindTemplate'];this['_model']=_0x377fa5,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['focusCycler']=new _0x140f1f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5a6a75=>!!_0x5a6a75),this['bind']('contextValue')['to'](this['_model'],'context',_0x3b46ea=>_0x3b46ea&&_0x3b46ea['value']?this['_trimContextValue'](_0x3b46ea['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',_0x2bcdcd['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 _0x172aaa=new _0x47a354(this['locale']);return _0x172aaa['label']=N(this['locale'],'Reopen'),_0x172aaa['tooltip']=N(this['locale'],'Reopen'),_0x172aaa['icon']=_0x130a47,_0x172aaa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x54f77=>!_0x54f77),_0x172aaa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x42ec5c,_0x194a95)=>_0x42ec5c&&_0x194a95),_0x172aaa['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x172aaa;}['_trimContextValue'](_0x5c18a5){if(_0x5c18a5['length']<0x96)return _0x5c18a5;const _0x161674=_0x5c18a5['lastIndexOf']('\x20',0x93);return _0x5c18a5['substring'](0x0,_0x161674>-0x1?_0x161674:0x93)+'...';}['_attachContextActions'](){const _0x247bca=this['element']['querySelector']('.ck-context'),_0x465291=_0x247bca['querySelector']('.ck-context__value');this['listenTo'](_0x247bca,'mouseenter',()=>{_0x465291['offsetWidth']<_0x465291['scrollWidth']&&_0x247bca['classList']['add']('overlay');}),this['listenTo'](_0x247bca,'mouseleave',()=>{_0x247bca['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x47fa2b of this['focusables'])this['focusTracker']['add'](_0x47fa2b['element']),this['keystrokes']['listenTo'](_0x47fa2b['element']);}['_createContextView'](){const _0x16c793=new oe(this['locale']);return _0x16c793['bind']('contextValue')['to'](this),_0x16c793;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x54b277,_0x2705b5,_0x44f53d,_0x225fb5){super(_0x54b277),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2705b5,this['_localUser']=_0x44f53d,this['_config']=_0x225fb5,this['commentThreadHeaderView']=new Xt(_0x54b277,_0x2705b5),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x54b277,N(_0x54b277,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x54b277,_0x2705b5,Object['assign']({'CommentView':this['_config']['CommentView']},_0x225fb5)),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',(_0x4b933c,_0x1dd826)=>_0x4b933c||!!_0x1dd826),this['bind']('isUnlinked')['to'](_0x2705b5,'unlinkedAt',_0x2bbc7b=>!!_0x2bbc7b),this['bind']('ariaLabel')['to'](this,'length',_0x49ad7a=>{const _0x9f9537=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x49ad7a,_0x9f9537]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['focusCycler']=new _0x140f1f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x356ad7=>_0x356ad7['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x21e3fd=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x48f60a=_0x21e3fd['commentInputView'];return _0x21e3fd['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x48f60a,'value',(_0x2c1a97,_0x1b4dd2,_0x44448c,_0x171611,_0x161c98)=>!!_0x161c98||!!_0x171611&&_0x44448c&&!_0x1b4dd2||_0x2c1a97&&_0x44448c&&!_0x1b4dd2),_0x48f60a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5d3337,_0x4174bc,_0x4d3357)=>{let _0x1b215d;return _0x1b215d=_0x4d3357&&_0x4174bc?'Reply\x20to\x20reopen\x20discussion...':_0x5d3337?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x1b215d);}),_0x48f60a['bind']('submitLabel')['to'](this,'length',_0x40baca=>N(this['locale'],_0x40baca?'Reply':'Comment')),_0x48f60a['on']('submit',(_0x2c77b1,_0xa60ad6)=>{this['fire']('addComment',_0xa60ad6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x48f60a['on']('cancel',()=>{this['focus']();}),_0x48f60a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x48f60a['on']('cancel',_0x86753a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x86753a['stop']());}),this['on']('change:isActive',(_0x59ea1d,_0x11da3f,_0x12bd8a)=>{_0x12bd8a||this['length']||_0x48f60a['value']||this['fire']('removeCommentThread');}),_0x21e3fd;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x40ae74,_0x50e3d,_0x38a291,_0x558856){super(_0x40ae74,_0x50e3d,_0x38a291,_0x558856),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x40ae74,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x330c17,_0x341fbd,_0x201b9b)=>{_0x201b9b||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x308a97,_0x89e4f,_0x2f80d8)=>{_0x2f80d8&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x34d771=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x34d771['if']('isActive','ck-thread--active'),_0x34d771['if']('isUnlinked','ck-thread--unlinked'),_0x34d771['to']('actionIndicator',_0x54d1e8=>_0x54d1e8?'ck-thread--'+_0x54d1e8:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x34d771['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 _0x31b5c6 of this['commentsListView']['commentViews'])_0x31b5c6['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x648028}=this,_0x3007ba=this['commentsListView']['commentViews']['get'](0x0);_0x3007ba===this['_boundFirstCommentView']||_0x3007ba['isSystemComment']||(this['_boundFirstCommentView']=_0x3007ba,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3007ba,'actionIndicator',_0x400930=>'remove'===_0x400930?'remove':null),_0x3007ba['placeholder']=N(_0x648028,'Write\x20a\x20comment...'),_0x3007ba['removeButton']['on']('execute',_0x7183d5=>{_0x7183d5['stop'](),this['showConfirm'](N(_0x648028,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3007ba['focus']();}),_0x3007ba['actionBar']['add'](this['resolveButton'],0x0),_0x3007ba['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2d4084=new _0x188cb3(this['locale']);return _0x2d4084['label']=N(this['locale'],'Resolve'),_0x2d4084['tooltip']=N(this['locale'],'Resolve'),_0x2d4084['icon']=_0x2a328a,_0x2d4084['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2d4084['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x415828=>!_0x415828),_0x2d4084['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xea1c2b,_0x558482)=>_0xea1c2b&&!_0x558482),_0x2d4084['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2d4084;}['_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 is extends kt{constructor(_0xd808c1){super(_0xd808c1),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1bc05d,_0x427bf7,_0x5f100c)=>{this['element']['innerHTML']=_0x5f100c;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x57563c,_0x3ae401,_0x3fb87c){super(_0x57563c),this['_model']=_0x3ae401,this['_config']=_0x3fb87c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x3ae401,'content',_0x3ae401,'authoredAt',(_0x53a348,_0x1d4ba0)=>N(_0x57563c,'COMMENT_ARIA_LABEL',[_0x3ae401['author']['name'],_0x3fb87c['formatDateTime'](_0x1d4ba0),new DOMParser()['parseFromString'](_0x53a348,'text/html')['body']['textContent'],_0x3ae401['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x57563c,N(_0x57563c,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x577399(),this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['focusCycler']=new _0x140f1f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1a8b3d=>_0x1a8b3d['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 _0x3063f2=new is(this['locale']);return _0x3063f2['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x3b8e17,_0x1ef626)=>_0x1ef626?ts(_0x3b8e17,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x3b8e17),_0x3063f2;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5387b2=new es(this['locale'],this['_config']['editorConfig']);return _0x5387b2['value']=this['_model']['content'],_0x5387b2['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5387b2['submitLabel']=N(this['locale'],'Save'),_0x5387b2['on']('submit',(_0x104525,_0x54d33d)=>{this['fire']('updateComment',this['_model']['id'],_0x54d33d),this['switchToDisplayMode'](),this['focus']();}),_0x5387b2['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5387b2['once']('editorReady',()=>{_0x5387b2['focus']();}),_0x5387b2['createEditor'](),_0x5387b2['delegate']('editorReady')['to'](this),_0x5387b2['delegate']('editorDestroyed')['to'](this),_0x5387b2;}['_setupKeyboardNavigation'](){const _0x5e7a2b=this['element'];this['keystrokes']['listenTo'](_0x5e7a2b);for(const _0x38dd59 of this['focusables'])this['focusTracker']['add'](_0x38dd59['element']),this['keystrokes']['listenTo'](_0x38dd59['element']);this['focusables']['on']('change',(_0x57c64f,_0x103357)=>{for(const _0x3749ee of _0x103357['removed'])this['focusTracker']['remove'](_0x3749ee['element']),this['keystrokes']['stopListening'](_0x3749ee['element']);for(const _0x578dcc of _0x103357['added'])this['focusTracker']['add'](_0x578dcc['element']),this['keystrokes']['listenTo'](_0x578dcc['element']);}),this['keystrokes']['set']('enter',(_0x389905,_0x493482)=>{_0x5e7a2b===_0x389905['target']&&(this['focusCycler']['focusFirst'](),_0x493482());}),this['keystrokes']['set']('esc',(_0x51809c,_0xed9c8e)=>{_0x5e7a2b!==_0x51809c['target']&&(this['focus'](),_0xed9c8e());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x4d7379,_0x49c673,_0x1a2f64){super(_0x4d7379,_0x49c673,_0x1a2f64),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x4d7379,'Reply...')),this['bind']('authoredAt')['to'](_0x49c673),this['bind']('resolvedAt')['to'](_0x49c673),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 _0x193858(_0x4d7379,_0x49c673['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x49c673,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1b5272=this['bindTemplate'],_0x48068a=[{'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':_0x1b5272['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1b5272['to']('authoredAt',_0x4f024e=>this['_config']['formatDateTime'](_0x4f024e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1b5272['if']('isEditMode','ck-comment__actions--hidden'),_0x1b5272['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']&&_0x48068a['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x1b5272['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1b5272['if']('isEditMode','ck-comment--edit'),_0x1b5272['if']('isSystemComment','ck-comment--info'),_0x1b5272['to']('actionIndicator',_0x19d792=>_0x19d792?'ck-comment--'+_0x19d792:'')],'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':_0x48068a}]}]};}['_createEditButton'](){const _0xf4fe27=new _0x47a354(this['locale']);return _0xf4fe27['label']=N(this['locale'],'Edit'),_0xf4fe27['icon']=_0x5939de,_0xf4fe27['withText']=!0x0,_0xf4fe27['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xf4fe27['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x55e0a1=>!_0x55e0a1),_0xf4fe27['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xf4fe27['on']('execute',()=>this['switchToEditMode']()),_0xf4fe27;}['_createRemoveButton'](){const _0x31516f=new _0x47a354(this['locale']);return _0x31516f['label']=N(this['locale'],'Remove'),_0x31516f['icon']=_0x92b88,_0x31516f['withText']=!0x0,_0x31516f['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x31516f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xf033ae=>!_0xf033ae),_0x31516f['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x31516f['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x31516f;}['_createDropdown'](){const _0x535109=_0x3deee8(this['locale'],_0x539736),_0x7dcfcd=_0x535109['panelView']['children'],_0x433d3f=new _0x5ca25c(this['locale']),_0x88c7ed=_0x535109['bindTemplate'];_0x1518f9(_0x535109,()=>this['items']['find'](_0x44d54c=>_0x44d54c['isVisible'])),_0x535109['extendTemplate']({'attributes':{'class':[_0x88c7ed['if']('isVisible','ck-hidden',_0xe60691=>!_0xe60691)]}});const _0x4b1e0b=(_0x5acd43,_0x38479b=-0x1)=>{const _0x3ea0bd=new _0x365663(this['locale']);_0x3ea0bd['children']['add'](_0x5acd43);const _0x55f01f=_0x38479b>-0x1?_0x38479b:_0x433d3f['items']['length'];_0x433d3f['items']['add'](_0x3ea0bd,_0x55f01f);const _0x16e998=Array['from'](this['items']);_0x535109['unbind']('isEnabled','isVisible'),_0x535109['bind']('isEnabled')['toMany'](_0x16e998,'isEnabled',(..._0x51a35c)=>_0x51a35c['some'](_0x3214ad=>_0x3214ad)),_0x535109['bind']('isVisible')['toMany'](_0x16e998,'isVisible',(..._0x5390b0)=>_0x5390b0['some'](_0x9fac88=>_0x9fac88));};_0x535109['panelPosition']='sw',_0x535109['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x44b678});for(const _0x27dad0 of this['items'])_0x4b1e0b(_0x27dad0);return _0x7dcfcd['add'](_0x433d3f),_0x535109['listenTo'](this['items'],'add',(_0x6ac6d0,_0x550cd2,_0xc88233)=>{_0x4b1e0b(_0x550cd2,_0xc88233);}),_0x535109['listenTo'](this['items'],'remove',(_0x5508d7,_0x135aaa,_0x596809)=>{_0x433d3f['items']['remove'](_0x596809);}),_0x535109;}['_attachActions'](_0x18dd8e,_0x5e77a4){const _0x48482f=_0x18dd8e&&_0x18dd8e['element'];_0x48482f&&(this['listenTo'](_0x48482f,'mouseenter',()=>this['actionIndicator']=_0x5e77a4),this['listenTo'](_0x48482f,'focus',()=>this['actionIndicator']=_0x5e77a4),this['listenTo'](_0x48482f,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x48482f,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x46a7ef=super['_createCommentInputView']();return _0x46a7ef['bind']('placeholder')['to'](this),_0x46a7ef;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x2ee6d5){const _0x1bf762=Dt(_0x2ee6d5,0x1e),_0x19f99d=new MutationObserver(_0x1ed9e4=>{for(const _0x572cee of _0x1ed9e4)('attributes'==_0x572cee['type']&&'class'==_0x572cee['attributeName']||'childList'==_0x572cee['type']||'characterData'==_0x572cee['type'])&&_0x1bf762();});return{'attach'(_0x448b45){_0x19f99d['observe'](_0x448b45,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x19f99d['disconnect'](),_0x1bf762['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x117a1e,_0x52f251){super(_0x117a1e),this['id']=_0x4c5e37(),this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x200bf5,_0x24b16f)=>this['fire']('Esc',_0x24b16f)),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']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x52f251),this['mainView']=_0x52f251;const _0x178025=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x178025['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 _0x1098c5=this['element']['clientHeight'];_0x1098c5&&(this['height']=_0x1098c5);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x41c8cb(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x26e44a,target:_0x235b72,type:_0x3f76fa,isVisible:_0x53b625=!0x0}){super(),this['view']=_0x26e44a,this['view']['element']||this['view']['render'](),this['_type']=_0x3f76fa,this['_target']=_0x235b72,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x139e96([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x56b5ba,_0x943a83)=>{this['view']['focusTracker']['add'](_0x943a83);}),this['focusableElements']['on']('remove',(_0x2e2dbc,_0x528803)=>{this['view']['focusTracker']['remove'](_0x528803);}),this['set']('isVisible',_0x53b625);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3d1708=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3d1708),_0x3d1708;}get['targetRect'](){const _0x5b0d29=this['target'];if(null===_0x5b0d29)return null;if(_0x5b0d29 instanceof _0x3f14b6)return _0x5b0d29;const _0x194a5f=_0x5b0d29['filter'](_0x305ed7=>function(_0x186e1f){const _0x3ae0a6=_0x186e1f['offsetParent'];if(_0x3ae0a6)return!0x0;const _0x1b39eb=_0x186e1f['getClientRects']()['item'](0x0);return!!_0x1b39eb;}(_0x305ed7));return 0x0===_0x194a5f['length']?null:new _0x3f14b6(_0x194a5f[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5271b4){this['view']['isActive']=_0x5271b4,this['view']['mainView']['isActive']=_0x5271b4;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2d3153){if(!(null===_0x2d3153||_0x2d3153 instanceof _0x3f14b6||Array['isArray'](_0x2d3153)&&_0x2d3153['every'](_0x5f575a=>fi(_0x5f575a))))throw new _0x266f92('annotation-invalid-target',null,{'target':_0x2d3153});}['_getNormalizedTarget'](){const _0x56af1b='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x56af1b)?[_0x56af1b]:_0x56af1b;}}function fi(_0x4ba54e){return null!==_0x4ba54e&&'object'==typeof _0x4ba54e&&'nodeType'in _0x4ba54e&&0x1===_0x4ba54e['nodeType'];}class S extends _0x139e96{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x9890f7=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5f5319(),this['_focusTracker']['on']('change:isFocused',(_0x30bd59,_0x594026,_0x5af28a)=>{_0x5af28a||this['fire']('blur');});for(const _0x5de883 of _0x9890f7)this['add'](_0x5de883);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3e24a9){if(this['has'](_0x3e24a9))throw new _0x266f92('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3e24a9['innerView'],_0x3e24a9),this['_viewToAnnotation']['set'](_0x3e24a9['view'],_0x3e24a9);for(const _0x4c2cca of _0x3e24a9['focusableElements'])this['_focusTracker']['add'](_0x4c2cca);this['listenTo'](_0x3e24a9['focusableElements'],'add',(_0x3ac30b,_0x1a8a90)=>{this['_focusTracker']['add'](_0x1a8a90);}),this['listenTo'](_0x3e24a9['focusableElements'],'remove',(_0x1db501,_0x121890)=>{this['_focusTracker']['remove'](_0x121890);}),this['listenTo'](_0x3e24a9['view']['focusTracker'],'change:isFocused',(_0x435344,_0x4eb7e8,_0x53eabb)=>{_0x53eabb&&this['fire']('focus',_0x3e24a9);}),_0x3e24a9['updateTargetRect']();const _0x5554f2=this['_getOrderInContent'](_0x3e24a9['view']['targetRect']);return super['add'](_0x3e24a9,_0x5554f2);}['remove'](_0x23f535){if(!this['has'](_0x23f535))throw new _0x266f92('annotationcollection-not-existing-item',null);this['stopListening'](_0x23f535['view']['focusTracker']),this['stopListening'](_0x23f535['focusableElements']);for(const _0x2909ca of _0x23f535['focusableElements'])this['_focusTracker']['remove'](_0x2909ca);return this['_viewToAnnotation']['delete'](_0x23f535['view']),this['_innerViewToAnnotation']['delete'](_0x23f535['innerView']),super['remove'](_0x23f535);}['getByInnerView'](_0x3877e6){return this['_innerViewToAnnotation']['get'](_0x3877e6);}['getByView'](_0x1cee72){return this['_viewToAnnotation']['get'](_0x1cee72);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x10fdb0 of this)_0x10fdb0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1b969a=Array['from'](this)['sort']((_0x162dd9,_0x305661)=>w(_0x162dd9['view']['targetRect'],_0x305661['view']['targetRect']));for(let _0x224b0f=_0x1b969a['length']-0x1;_0x224b0f>0x0;_0x224b0f--){const _0x3cf51c=_0x1b969a[_0x224b0f];_0x224b0f!==this['getIndex'](_0x3cf51c)&&(this['remove'](_0x3cf51c),this['add'](_0x3cf51c));}}['_getOrderInContent'](_0x40eb1e){let _0x35c4e6=0x0;if(!_0x40eb1e)return this['length'];for(const _0x112845 of this){const _0x36abbf=_0x112845['view']['targetRect'];if(_0x36abbf){if(w(_0x40eb1e,_0x36abbf)<0x0)return _0x35c4e6;_0x35c4e6++;}}return _0x35c4e6;}}function v({source:_0x6f27d,target:_0x13cddc,filter:_0x3ee75c}){for(const _0x1e80b4 of _0x6f27d)_0x3ee75c(_0x1e80b4)&&_0x13cddc['add'](_0x1e80b4);_0x13cddc['listenTo'](_0x6f27d,'add',(_0x1bdede,_0x360a17)=>{_0x3ee75c(_0x360a17)&&_0x13cddc['add'](_0x360a17);}),_0x13cddc['listenTo'](_0x6f27d,'remove',(_0x5ee66e,_0x948477)=>{_0x13cddc['has'](_0x948477)&&_0x13cddc['remove'](_0x948477);});}function w(_0x2c340e,_0x416a54){if(null===_0x2c340e&&null===_0x416a54)return 0x0;if(null===_0x2c340e)return-0x1;if(null===_0x416a54)return 0x1;const _0xa8b561=_0x2c340e['top']-_0x416a54['top'];return 0x0==_0xa8b561?_0x2c340e['left']-_0x416a54['left']:_0xa8b561;}class y extends _0x152fb7{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d4089){if(super(_0x1d4089),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1d4089 instanceof _0x1f8384){const _0xe0325a=_0x1d4089['locale'];_0x1d4089['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1d658b){this['collection']['add'](_0x1d658b);}['remove'](_0x495b04){this['collection']['remove'](_0x495b04),_0x495b04['destroy']();}['refreshVisibility'](){for(const _0x386924 of this['collection'])_0x386924['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x514cce){return this['collection']['getByInnerView'](_0x514cce);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x273d25 of this['collection'])_0x273d25['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x61a3cb){this['fire']('_activateAnnotation',_0x61a3cb);}['createAnnotation'](_0x1f55b3){return new T(_0x1f55b3);}['createAnnotationView'](_0x33209d,_0x4fd0ee){return new E(_0x33209d,_0x4fd0ee);}['_addActiveAnnotation'](_0xcbbd74){const _0x1cba97=new Set(this['activeAnnotations']);_0x1cba97['add'](_0xcbbd74),this['activeAnnotations']=_0x1cba97;}['_removeActiveAnnotation'](_0x5b7a5c){const _0x66b187=new Set(this['activeAnnotations']);_0x66b187['delete'](_0x5b7a5c),this['activeAnnotations']=_0x66b187;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3f3188=this['collection'],_0x4a705a=this['_visibleAnnotations'];function _0x169e85(_0x547d23){const _0x5c8f8b=_0x547d23['source'];_0x5c8f8b['isVisible']&&!_0x4a705a['has'](_0x5c8f8b)?_0x4a705a['add'](_0x5c8f8b):!_0x5c8f8b['isVisible']&&_0x4a705a['has'](_0x5c8f8b)&&_0x4a705a['remove'](_0x5c8f8b),_0x5c8f8b['view']['focusTracker']['remove'](_0x5c8f8b['view']['element']),_0x5c8f8b['view']['focusTracker']['add'](_0x5c8f8b['view']['element']);}this['listenTo'](_0x3f3188,'add',(_0x1ec58b,_0x445f20)=>{_0x445f20['isVisible']&&_0x4a705a['add'](_0x445f20),this['listenTo'](_0x445f20,'change:isVisible',_0x169e85);}),this['listenTo'](_0x3f3188,'remove',(_0x7c7076,_0x578846)=>{_0x4a705a['has'](_0x578846)&&_0x4a705a['remove'](_0x578846),this['stopListening'](_0x578846,'change:isVisible',_0x169e85);});}['_setupEnterAnnotationKeystroke'](){const _0x1b84ec=_0xee9c7d=>{_0xee9c7d['on']('ready',()=>{_0xee9c7d['keystrokes']['set'](_0x3b0de7,(_0x46ec73,_0x29a075)=>{const _0x41f3fd=_0x49bf05(this['activeAnnotations']['values']());_0x41f3fd&&(_0x41f3fd['view']['focus'](),_0x29a075());});});};this['context']instanceof _0x1f8384?_0x1b84ec(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x58554c,_0x50917f)=>{_0x1b84ec(_0x50917f);});}['_setupEscapeAnnotationHandling'](){const _0x36e238=_0x303133=>{const _0x394015=_0x303133['source'],_0x24ed0a=[];let _0xa0d7c7;if(Array['isArray'](_0x394015['target'])){_0xa0d7c7=_0x394015['target'][0x0],this['context']instanceof _0x1f8384?_0x24ed0a['push'](this['context']):this['context']['editors']&&_0x24ed0a['push'](...this['context']['editors']);for(const _0x501be8 of _0x24ed0a)for(const _0x14f96e of _0x501be8['editing']['view']['domRoots']['values']())if(_0x14f96e['contains'](_0xa0d7c7))return void _0x501be8['editing']['view']['focus']();_0xa0d7c7['focus']();}};this['listenTo'](this['collection'],'add',(_0x2d2a6e,_0x42a7d8)=>{this['listenTo'](_0x42a7d8,'escape',_0x36e238,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x25b4bd,_0x5740b9)=>{this['stopListening'](_0x5740b9,'escape',_0x36e238);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x152fb7{['_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(_0x45a819){super(_0x45a819),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1afdf2=this['context']['config'];_0x1afdf2['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1afdf2['define']('comments.maxThreadTotalWeight',0x1f4),_0x1afdf2['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1afdf2['define']('comments.CommentThreadView',gt),_0x1afdf2['define']('comments.CommentView',Tt),_0x1afdf2['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3b6858=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x26bed8,_0x358865)=>this['_addCommentThread'](_0x358865)),this['on']('submitCommentThread',(_0x3d5b8c,_0xca3659)=>this['_submitCommentThread'](_0xca3659)),this['on']('resolveCommentThread',(_0x98e652,_0x510851)=>this['_resolveCommentThread'](_0x510851)),this['on']('resolveCommentThread',(_0x3e5909,_0x4e7135)=>this['_updateActiveAnnotation'](_0x4e7135),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x10458a,_0x222265)=>this['_reopenCommentThread'](_0x222265)),this['on']('reopenCommentThread',(_0x562fd3,_0x2addf4)=>this['_updateActiveAnnotation'](_0x2addf4),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x14d8c6,_0x179bd6)=>this['_removeCommentThread'](_0x179bd6)),this['on']('updateCommentThread',(_0x163e98,_0x24705d)=>this['_updateCommentThread'](_0x24705d)),this['on']('updateCommentThread',(_0x5d217a,_0x394959)=>this['_updateActiveAnnotation'](_0x394959),{'priority':'lowest'}),this['on']('addComment',(_0x36b483,_0x3db42f)=>this['_addComment'](_0x3db42f)),this['on']('updateComment',(_0x44db19,_0x3879d3)=>this['_updateComment'](_0x3879d3)),this['on']('removeComment',(_0x2da261,_0x186a63)=>this['_removeComment'](_0x186a63)),this['on']('addComment',(_0x4ad97d,{threadId:_0x16c377,isFromAdapter:_0x160743})=>{if(_0x160743)return;const _0x180dc8=this['getCommentThread'](_0x16c377),_0x147fd7=_0x180dc8&&this['_threadToController']['get'](_0x180dc8);_0x147fd7&&_0x147fd7['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3b6858,'change:activeAnnotations',(_0x2838bb,_0x31fae9,_0x1d7e6c)=>{const _0x5a0b68=Array['from'](_0x1d7e6c)['map'](_0x4521cb=>this['_viewToController']['get'](_0x4521cb['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5a0b68?_0x5a0b68['model']:null;});}set['adapter'](_0x21050d){if(this['_adapter'])throw new _0x266f92('commentsrepository-adapter-already-set');this['_adapter']=_0x21050d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5dee48=_t,threadId:_0x30743f=_0x4c5e37(),comments:_0x1e216d=[],unlinkedAt:_0x20ecef=null,resolvedAt:_0x1aa1e0=null,resolvedBy:_0x6b63f6=null,target:_0x462fb8=null,context:_0x501e16=null,attributes:_0x406d2c={},isResolvable:_0x5387f6=!0x0,isSubmitted:_0x38d16c=!0x1,isFromAdapter:_0xb222a5=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x5dee48),{'channelId':_0x5dee48,'threadId':_0x30743f,'comments':_0x1e216d,'unlinkedAt':_0x20ecef,'resolvedAt':_0x1aa1e0,'resolvedBy':_0x6b63f6,'target':_0x462fb8,'context':_0x501e16,'attributes':_0x406d2c,'isFromAdapter':_0xb222a5,'isResolvable':_0x5387f6,'isSubmitted':_0x38d16c}),this['getCommentThread'](_0x30743f);}['openNewCommentThread']({channelId:_0x415aec=_t,threadId:_0x504516=_0x4c5e37(),target:_0x2dd969,context:_0x1af586=null,isResolvable:_0x39d693=!0x0}){if(this['_readOnlyChannels']['has'](_0x415aec)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2dd969)throw new _0x266f92('commentsrepository-missing-target');const _0x1036d3=this['addCommentThread']({'channelId':_0x415aec,'threadId':_0x504516,'target':_0x2dd969,'context':_0x1af586,'isResolvable':_0x39d693});if(!_0x1036d3)return null;const _0x1e2098=this['_threadToController']['get'](_0x1036d3),_0x2ede26=_0x1e2098['view']['commentThreadInputView']['commentInputView'],_0x34858b=this['context']['plugins']['get'](y),_0x59f928=_0x34858b['getByInnerView'](_0x1e2098['view']);return _0x34858b['activate'](_0x59f928),_0x2ede26['once']('editorReady',()=>_0x2ede26['focus']()),_0x1036d3;}['hasCommentThread'](_0x46faf5){if('string'!=typeof _0x46faf5)throw new _0x266f92('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x46faf5);}['updateCommentThread']({channelId:_0x2b9a48=_t,threadId:_0xbb1bfc,context:_0x2ae7b5,unlinkedAt:_0x6e375b,attributes:_0x10298c,isFromAdapter:_0x5c4fc3=!0x1}){return this['fire'](Nt('updateCommentThread',_0x2b9a48),{'channelId':_0x2b9a48,'threadId':_0xbb1bfc,'context':_0x2ae7b5,'unlinkedAt':_0x6e375b,'attributes':_0x10298c,'isFromAdapter':_0x5c4fc3}),this['getCommentThread'](_0xbb1bfc);}['getCommentThread'](_0x41b4ec){if('string'!=typeof _0x41b4ec)throw new _0x266f92('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x41b4ec);}['fetchCommentThread']({channelId:_0x5d5f38,threadId:_0x57a1b1}={}){const _0x2d42b6=this['getCommentThread'](_0x57a1b1);if(_0x2d42b6)return Promise['resolve'](_0x2d42b6);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x266f92('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5d5f38,'threadId':_0x57a1b1})['then'](_0x5f4e64=>this['hasCommentThread'](_0x57a1b1)?this['getCommentThread'](_0x57a1b1):_0x5f4e64?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5d5f38},_0x5f4e64)):void 0x0)['catch'](_0x37437d=>{throw console['error'](_0x37437d),new _0x266f92('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x289e1d,skipNotAttached:_0x3b54ad=!0x1,skipEmpty:_0x4cd618=!0x1,toJSON:_0x4d1f4b=!0x1}={}){const _0x432217=[];for(const _0x292905 of this['_threads']['values']())_0x289e1d&&_0x292905['channelId']!==_0x289e1d||_0x3b54ad&&!_0x292905['isAttached']||_0x4cd618&&0x0===_0x292905['length']||_0x432217['push'](_0x292905);return _0x4d1f4b?_0x432217['map'](_0x43868e=>_0x43868e['toJSON']()):_0x432217;}['getAnnotationForCommentThread'](_0x5c2b64){const _0x1f3f5c=this['_threadToController']['get'](_0x5c2b64);if(!_0x1f3f5c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1f3f5c['view'])||null;}['getCommentThreadForAnnotation'](_0x76df22){const _0x46aaf2=this['_viewToController']['get'](_0x76df22['innerView']);return _0x46aaf2?_0x46aaf2['model']:null;}['setActiveCommentThread'](_0x478fd3){const _0x47c65d=this['context']['plugins']['get'](y);if(!_0x478fd3)return void(this['activeCommentThread']&&_0x47c65d['deactivateAll']());const _0x4dd6a1=this['getCommentThread'](_0x478fd3);if(!_0x4dd6a1)throw new _0x266f92('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x478fd3});if(!this['_threadToController']['has'](_0x4dd6a1))throw new _0x266f92('commentsrepository-active-not-attached',null,{'threadId':_0x478fd3});const _0x1d5574=_0x47c65d['getByInnerView'](this['_threadToController']['get'](_0x4dd6a1)['view']);_0x47c65d['activate'](_0x1d5574);}['switchReadOnly'](_0x579e2d,_0x385760){_0x579e2d?this['_readOnlyChannels']['add'](_0x385760):this['_readOnlyChannels']['delete'](_0x385760),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x420004){return this['_readOnlyChannels']['has'](_0x420004)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x32d6be,_0xb24d2b){return new vt(_0x32d6be,_0xb24d2b);}['setPermissions'](_0x3f786d,_0x2481e7=_t){this['_permissions']['set'](_0x2481e7,_0x3f786d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5b9a43=_t){return this['_permissions']['has'](_0x5b9a43)?this['_permissions']['get'](_0x5b9a43):bt;}['_addCommentThread']({channelId:_0x283e10,threadId:_0x3985f0,comments:_0x327482,unlinkedAt:_0x5d6eae,resolvedAt:_0x57f75a,resolvedBy:_0x3c1442,target:_0x5aea21,context:_0x568af2,attributes:_0x4e61d4,isFromAdapter:_0x3cbaea,isResolvable:_0x24598e,isSubmitted:_0x197be6}){if('string'!=typeof _0x3985f0)throw new _0x266f92('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3985f0});if(this['hasCommentThread'](_0x3985f0))throw new _0x266f92('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3985f0});const _0xef0aa4=new pi(this,{'channelId':_0x283e10,'id':_0x3985f0,'context':_0x568af2,'attributes':_0x4e61d4,'unlinkedAt':_0x5d6eae,'resolvedAt':_0x57f75a,'resolvedBy':_0x3c1442?this['context']['plugins']['get'](it)['getUser'](_0x3c1442):null,'isResolvable':_0x24598e,'isSubmitted':_0x197be6||_0x3cbaea});this['_threads']['set'](_0x3985f0,_0xef0aa4);for(const _0x146615 of _0x327482)_0xef0aa4['_add'](this['_createNewComment']({'threadId':_0x3985f0,..._0x146615}));return _0x5aea21&&_0xef0aa4['attachTo'](_0x5aea21),_0x3cbaea||!_0xef0aa4['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x283e10,'threadId':_0x3985f0});}['_submitCommentThread']({channelId:_0x288f59,threadId:_0x44e7ff}){if(!this['hasCommentThread'](_0x44e7ff))throw new _0x266f92('commentsrepository-missing-comment-thread',this);const _0x2ec2aa=this['getCommentThread'](_0x44e7ff);if(_0x2ec2aa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x19ae11,comments:_0x306d74,resolvedAt:_0x318d40,resolvedBy:_0xcbdda4,context:_0x21efa0,attributes:_0x5691eb}=_0x2ec2aa,_0x1e6486=this['context']['plugins']['get']('PendingActions'),_0x59fd79=_0x1e6486['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x288f59,'threadId':_0x19ae11,'comments':_0x306d74['map'](_0x4b5426=>_0x4b5426['toJSON']()),'resolvedAt':_0x318d40,'resolvedBy':_0xcbdda4?_0xcbdda4['id']:_0xcbdda4,'context':_0x21efa0,'attributes':_0x5691eb})['then'](({comments:_0x886b3b})=>{_0x1e6486['remove'](_0x59fd79);for(const _0x37b7e9 of _0x886b3b)this['_updateComment']({'channelId':_0x288f59,'threadId':_0x44e7ff,'commentId':_0x37b7e9['commentId'],'createdAt':_0x37b7e9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x278143=>{throw console['error'](_0x278143),new _0x266f92('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x13d471,target:_0x280d2b}){const _0x2fa642=this['getCommentThread'](_0x13d471);if(!_0x2fa642)throw new _0x266f92('commentsrepository-attach-missing-comment-thread',this);const _0x1ca8d1=this['context']['plugins']['get']('PendingActions'),_0x19e333=this['context']['plugins']['get'](y),_0x49cacc=this['_createCommentThreadView'](_0x2fa642),_0x20d4f6=new vt(_0x2fa642,_0x49cacc);let _0x5c31c6=null;_0x49cacc['on']('change:isDirty',(_0x22de24,_0xc8dc69,_0xc4638b)=>{_0xc4638b?_0x5c31c6=_0x1ca8d1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5c31c6&&(_0x1ca8d1['remove'](_0x5c31c6),_0x5c31c6=null);}),this['_threadToController']['set'](_0x2fa642,_0x20d4f6),this['_viewToController']['set'](_0x49cacc,_0x20d4f6);const _0x11d77f=new E(this['context']['locale'],_0x49cacc);_0x11d77f['bind']('length')['to'](_0x49cacc),_0x11d77f['bind']('isDirty')['to'](_0x49cacc,'isDirty',_0x49cacc,'length',(_0x51ce5e,_0x15267f)=>_0x51ce5e||!_0x15267f),_0x11d77f['bind']('isActive')['to'](_0x49cacc),_0x11d77f['type']='comment';const _0xb8208=new T({'view':_0x11d77f,'target':_0x280d2b,'type':'comment','isVisible':!_0x2fa642['archivedAt']&&!!('function'==typeof _0x280d2b?_0x280d2b():_0x280d2b)});return _0x49cacc['on']('escape',()=>{_0xb8208['fire']('escape');}),this['_bindAnnotationToEditors'](_0x49cacc,_0xb8208),_0x19e333['add'](_0xb8208),_0xb8208;}['_bindAnnotationToEditors'](_0x5c4f18,_0x67191){this['listenTo'](_0x5c4f18,'editorReady',(_0x1421bc,_0xf5a1a4)=>{const _0x16c8b7=_0xf5a1a4['ui']['view']['body']['bodyCollectionContainer'];_0x67191['focusableElements']['add'](_0x16c8b7),this['context']instanceof _0x1f8384&&this['context']['ui']['focusTracker']['add'](_0x16c8b7);},{'priority':'highest'}),this['listenTo'](_0x5c4f18,'editorDestroyed',(_0x40229d,_0x6c60f)=>{const _0x2016f4=_0x6c60f['ui']['view']['body']['bodyCollectionContainer'];_0x67191['focusableElements']['has'](_0x2016f4)&&_0x67191['focusableElements']['remove'](_0x2016f4),this['context']instanceof _0x1f8384&&this['context']['ui']['focusTracker']['remove'](_0x2016f4);});}['_unbindEditors'](_0x455496){this['stopListening'](_0x455496,'editorReady'),this['stopListening'](_0x455496,'editorDestroyed');}['_createCommentThreadView'](_0x2d52df){const _0x5235b0=this['context']['plugins']['get'](it),{config:_0xc032d,locale:_0x4da7ed}=this['context'],_0x2361de=pt(_0xc032d['get']('locale'),_0x4da7ed);return new(0x0,(_0xc032d['get']('comments'))['CommentThreadView'])(_0x4da7ed,_0x2d52df,_0x5235b0['me'],{'editorConfig':{..._0xc032d['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xc032d['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xc032d['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xc032d['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xc032d['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2361de,'CommentView':_0xc032d['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3ac328,channelId:_0x5a0482,resolvedAt:_0x2221eb,resolvedBy:_0x372a67,isFromAdapter:_0x20de7d}){if(!this['hasCommentThread'](_0x3ac328))throw new _0x266f92('commentsrepository-missing-comment-thread',null,{'threadId':_0x3ac328});const _0x30bf4a=this['getCommentThread'](_0x3ac328);if(_0x30bf4a['isResolved'])throw new _0x266f92('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3ac328});const _0x25e3f3=this['context']['plugins']['get'](it);if(_0x30bf4a['resolvedBy']=_0x25e3f3['getUser'](_0x372a67),_0x30bf4a['resolvedAt']=_0x2221eb,_0x20de7d||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x255913=this['context']['plugins']['get']('PendingActions'),_0x1410b1=_0x255913['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5a0482,'threadId':_0x3ac328})['then'](({resolvedAt:_0x40b8a3,resolvedBy:_0x1e0d03})=>{_0x255913['remove'](_0x1410b1),_0x30bf4a['resolvedBy']['id']!==_0x1e0d03&&(_0x30bf4a['resolvedBy']=_0x25e3f3['getUser'](_0x1e0d03)),_0x30bf4a['resolvedAt']=_0x40b8a3;})['catch'](_0x2bebe0=>{throw console['error'](_0x2bebe0),new _0x266f92('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3c184e,channelId:_0x4c0a49,isFromAdapter:_0x15ef49}){if(!this['hasCommentThread'](_0x3c184e))throw new _0x266f92('commentsrepository-missing-comment-thread',null,{'threadId':_0x3c184e});const _0x5372d6=this['getCommentThread'](_0x3c184e);if(!_0x5372d6['isResolved'])throw new _0x266f92('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3c184e});if(_0x5372d6['resolvedBy']=null,_0x5372d6['resolvedAt']=null,_0x15ef49||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x46aa3d=this['context']['plugins']['get']('PendingActions'),_0x2834a3=_0x46aa3d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4c0a49,'threadId':_0x3c184e})['then'](()=>_0x46aa3d['remove'](_0x2834a3))['catch'](_0x2c2360=>{throw console['error'](_0x2c2360),new _0x266f92('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5367bb,isFromAdapter:_0x1cd28a}){const _0x5b8ef7=this['getCommentThread'](_0x5367bb);if(!_0x5b8ef7)throw new _0x266f92('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5367bb),this['_threads']['delete'](_0x5367bb),!_0x5b8ef7['isSubmitted']||_0x1cd28a||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x457292=this['context']['plugins']['get']('PendingActions'),{channelId:_0x714ad6}=_0x5b8ef7,_0x54593a=_0x457292['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x714ad6,'threadId':_0x5367bb})['then'](()=>_0x457292['remove'](_0x54593a))['catch'](_0x2ef7b9=>{throw console['error'](_0x2ef7b9),new _0x266f92('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1f1b3f,unlinkedAt:_0x2849f6,context:_0x2cc1ec,attributes:_0x4ec564,isFromAdapter:_0x3671dd}){if('string'!=typeof _0x1f1b3f)throw new _0x266f92('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1f1b3f});if(!this['hasCommentThread'](_0x1f1b3f))throw new _0x266f92('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f1b3f});const _0x55b32d=this['getCommentThread'](_0x1f1b3f);let _0x1a868c=!0x1;if(void 0x0!==_0x2cc1ec&&_0x55b32d['context']!==_0x2cc1ec&&(_0x55b32d['context']=_0x2cc1ec,_0x1a868c=!0x0),void 0x0!==_0x2849f6&&_0x55b32d['unlinkedAt']!==_0x2849f6&&(_0x55b32d['unlinkedAt']=_0x2849f6,_0x1a868c=!0x0),_0x4ec564&&!At(_0x4ec564,_0x55b32d['attributes'])&&(_0x55b32d['attributes']=_0x4ec564,_0x1a868c=!0x0),!_0x1a868c)return Promise['resolve']();if(!_0x55b32d['isSubmitted']||_0x3671dd||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5df204=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd37b37}=_0x55b32d,_0x125d45=_0x5df204['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xd37b37,'threadId':_0x1f1b3f,'context':_0x2cc1ec,'unlinkedAt':_0x2849f6,'attributes':_0x4ec564})['then'](()=>_0x5df204['remove'](_0x125d45))['catch'](_0x5ba4df=>{throw console['error'](_0x5ba4df),new _0x266f92('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x45d827){const _0x328fda=this['context']['plugins']['get'](y),_0x28411e=this['getCommentThread'](_0x45d827);if(_0x28411e['_isAttached']=!0x1,this['_threadToController']['has'](_0x28411e)){const _0x4386d1=this['_threadToController']['get'](_0x28411e),_0x33bee4=_0x4386d1['view'],_0x4b2804=_0x328fda['getByInnerView'](_0x33bee4);this['_threadToController']['delete'](_0x28411e),this['_viewToController']['delete'](_0x33bee4),_0x4b2804&&_0x328fda['remove'](_0x4b2804),_0x4386d1['destroy'](),_0x33bee4['destroy']()['then'](()=>{this['_unbindEditors'](_0x33bee4);});}}['_updateActiveAnnotation']({threadId:_0x28ed8e,resolvedAt:_0x6bbe5e,unlinkedAt:_0x30f530}){const _0x44de3e=!!_0x6bbe5e,_0x6ef0a9=this['context']['plugins']['get'](y),_0x4d148a=this['getCommentThread'](_0x28ed8e);if(this['_threadToController']['has'](_0x4d148a)){const _0x2e3e08=this['_threadToController']['get'](_0x4d148a)['view'],_0x42f331=_0x6ef0a9['getByInnerView'](_0x2e3e08);_0x42f331&&(_0x44de3e&&_0x6ef0a9['_removeActiveAnnotation'](_0x42f331),_0x30f530?_0x42f331['isVisible']=!0x1:_0x42f331['refreshVisibility']());}}['_getExternalAuthor'](_0x536535){const _0x1ceabf=this['context']['plugins']['get'](it),_0x4c6005=It('external:'+_0x536535),_0x152f1d=_0x1ceabf['getUser'](_0x4c6005);return _0x152f1d||_0x1ceabf['addUser']({'id':_0x4c6005,'name':_0x536535});}['_createNewComment']({threadId:_0x3cba43,commentId:_0x1dbe6d=_0x4c5e37(),content:_0x5337af,authorId:_0x844a4f,createdAt:_0x410d07,attributes:_0x3594b7}){if('string'!=typeof _0x1dbe6d)throw new _0x266f92('commentsrepository-invalid-commentid');if('string'!=typeof _0x844a4f)throw new _0x266f92('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5337af||!_0x5337af['trim']())throw new _0x266f92('commentsrepository-invalid-comment-content');const _0x315394=this['context']['plugins']['get'](it)['getUser'](_0x844a4f);if(!_0x315394)throw new _0x266f92('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x844a4f});let _0x27aee9=null,_0x477470=_0x410d07;return _0x3594b7?.['@external']&&(_0x27aee9=this['_getExternalAuthor'](_0x3594b7['@external']['authorName']),_0x477470=new Date(_0x3594b7['@external']['createdAt'])),new wi(this,{'threadId':_0x3cba43,'id':_0x1dbe6d,'author':_0x27aee9||_0x315394,'creator':_0x315394,'content':_0x5337af,'createdAt':_0x410d07,'authoredAt':_0x477470,'attributes':_0x3594b7});}['_addComment'](_0x232ccf){let {threadId:_0x11131d,content:_0x11f64c,attributes:_0x22c7a1,isFromAdapter:_0xbcfbb4}=_0x232ccf;const _0x37166e=this['getCommentThread'](_0x232ccf['threadId']);if(!_0x37166e)throw new _0x266f92('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5ea40c=this['_createNewComment'](_0x232ccf),{id:_0x179db0}=_0x5ea40c;if(_0x37166e['_add'](_0x5ea40c),_0xbcfbb4||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x37166e['isSubmitted'])return Promise['resolve']();const _0x931b1c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1cdc92}=_0x37166e,_0x671a2e=_0x931b1c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x22c7a1||(_0x22c7a1={}),this['adapter']['addComment']({'channelId':_0x1cdc92,'threadId':_0x11131d,'commentId':_0x179db0,'content':_0x11f64c,'attributes':_0x22c7a1})['then'](_0x570ddd=>{_0x931b1c['remove'](_0x671a2e),_0x570ddd&&this['_updateComment']({'channelId':_0x1cdc92,'threadId':_0x11131d,'commentId':_0x179db0,'createdAt':_0x570ddd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x345e9a=>{throw console['error'](_0x345e9a),new _0x266f92('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xd09fad,commentId:_0x5e7942,content:_0x3eb182,createdAt:_0x597b58,attributes:_0x309ba5,isFromAdapter:_0x910cc3}){if(void 0x0!==_0x3eb182&&('string'!=typeof _0x3eb182||!_0x3eb182['trim']()['length']))throw new _0x266f92('commentsrepository-update-comment-invalid-content');const _0x1f2197=this['getCommentThread'](_0xd09fad),_0x34afe5=_0x1f2197['getComment'](_0x5e7942);if(!_0x34afe5)throw new _0x266f92('commentsrepository-update-missing-comment',this);let _0x34468a=!0x1;if(_0x3eb182&&_0x3eb182!==_0x34afe5['content']&&(_0x34afe5['isEditable']||_0x910cc3)&&(_0x34afe5['content']=_0x3eb182,_0x34468a=!0x0),_0x597b58&&_0x597b58!==_0x34afe5['createdAt']&&(_0x34afe5['createdAt']=_0x597b58,_0x34afe5['attributes']&&_0x34afe5['attributes']['@external']||(_0x34afe5['authoredAt']=_0x597b58),_0x34468a=!0x0),_0x309ba5&&!At(_0x309ba5,_0x34afe5['attributes'])&&(_0x34afe5['attributes']=_0x309ba5,_0x34468a=!0x0),!_0x34468a)return Promise['resolve']();if(_0x1f2197['fire']('commentUpdated'),_0x910cc3||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x58e8f4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x532436}=this['getCommentThread'](_0x34afe5['threadId']),_0x2b6520=_0x58e8f4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x532436,'threadId':_0xd09fad,'commentId':_0x5e7942,'content':_0x3eb182,'attributes':_0x309ba5})['then'](()=>_0x58e8f4['remove'](_0x2b6520))['catch'](_0x214aa0=>{throw console['error'](_0x214aa0),new _0x266f92('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xa5a5e3,commentId:_0x5c95e1,isFromAdapter:_0x4111ab}){const _0x4fa818=this['getCommentThread'](_0xa5a5e3),_0x598d3a=_0x4fa818['getComment'](_0x5c95e1);if(!_0x598d3a)throw new _0x266f92('commentsrepository-remove-missing-comment',this);if(_0x4fa818['_remove'](_0x598d3a),_0x4111ab||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4c1f50=this['context']['plugins']['get']('PendingActions'),{channelId:_0x325ee6}=_0x4fa818,_0x177e94=_0x4c1f50['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x325ee6,'threadId':_0xa5a5e3,'commentId':_0x5c95e1})['then'](()=>_0x4c1f50['remove'](_0x177e94))['catch'](_0x46f143=>{throw console['error'](_0x46f143),new _0x266f92('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x41c8cb(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x463732,_0x5b5307){super();const _0x4594c5=_0x5b5307['isResolvable'];this['channelId']=_0x5b5307['channelId'],this['id']=_0x5b5307['id'],this['comments']=new _0x139e96(),this['_repository']=_0x463732,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5b5307['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x463732,'_permissions',_0x463732,'_readOnlyChannels',()=>_0x463732['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x463732,'_permissions',()=>_0x463732['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x463732,'_permissions',()=>{const _0x248742=_0x463732['getPermissions'](this['channelId']);return _0x248742['write']||_0x248742['admin'];}),this['bind']('isResolvable')['to'](_0x463732,'_permissions',()=>_0x4594c5&&_0x463732['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5b5307['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5e4f37,_0x2b6d30)=>_0x5e4f37?_0x2b6d30?_0x5e4f37<_0x2b6d30?_0x5e4f37:_0x2b6d30:_0x5e4f37:_0x2b6d30),this['set']('unlinkedAt',_0x5b5307['unlinkedAt']||null),this['set']('resolvedAt',_0x5b5307['resolvedAt']||null),this['set']('resolvedBy',_0x5b5307['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x362260=>!!_0x362260),this['set']('attributes',_0x5b5307['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2d1fe2,_0x563613)=>_0x2d1fe2+_0x563613['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xb0f67e,id:_0x4de3bf}=this;this['_repository']['fire'](Nt('submitCommentThread',_0xb0f67e),{'channelId':_0xb0f67e,'threadId':_0x4de3bf});}['setUnlinkedAt'](_0x1d5fc6){this['_update']({'unlinkedAt':_0x1d5fc6});}['resolve']({resolvedAt:_0x1f6396=new Date(),resolvedBy:_0xaf6cb3='',isFromAdapter:_0x18e17e=!0x1}={}){const _0x19ff08=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4877e3,id:_0x5759cf}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4877e3),{'channelId':_0x4877e3,'threadId':_0x5759cf,'resolvedAt':_0x1f6396,'resolvedBy':_0xaf6cb3||_0x19ff08['id'],'isFromAdapter':_0x18e17e});}['reopen']({isFromAdapter:_0x2763de=!0x1}={}){const {channelId:_0x2eb75b,id:_0x475555}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2eb75b),{'channelId':_0x2eb75b,'threadId':_0x475555,'isFromAdapter':_0x2763de});}['setContext'](_0x5c8797){this['context']||this['_update']({'context':_0x5c8797});}['setAttribute'](_0x149c92,_0x32e73f){const _0x1916fc=wt(this['attributes']);yt(_0x1916fc,_0x149c92,_0x32e73f),this['_update']({'attributes':_0x1916fc});}['removeAttribute'](_0x45747e){const _0xa63b45=wt(this['attributes']);Ct(_0xa63b45,_0x45747e),this['_update']({'attributes':_0xa63b45});}['remove']({isFromAdapter:_0x2e1543=!0x1}={}){const {channelId:_0x4cf2d1,id:_0xc1d9a0}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x4cf2d1),{'channelId':_0x4cf2d1,'threadId':_0xc1d9a0,'isFromAdapter':_0x2e1543});}['attachTo'](_0x249330){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x249330});}['addComment'](_0xc03726){const {channelId:_0xfb6475,id:_0x1573ef}=this;this['_repository']['fire'](Nt('addComment',_0xfb6475,_0x1573ef),Object['assign']({'channelId':_0xfb6475,'threadId':_0x1573ef},_0xc03726));}['getComment'](_0x181dae){if('string'!=typeof _0x181dae)throw new _0x266f92('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x181dae});return this['comments']['get'](_0x181dae);}['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'](_0x2f7d49=>_0x2f7d49['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5e7c20){return this['listenTo'](_0x5e7c20,'change:authoredAt',()=>{const _0x35c8ac=this['_findOptimalIndex'](_0x5e7c20),_0x22e75e=this['comments'];_0x35c8ac-0x1!=_0x22e75e['getIndex'](_0x5e7c20)&&_0x35c8ac+0x1!=_0x22e75e['getIndex'](_0x5e7c20)&&(this['_remove'](_0x5e7c20),this['_add'](_0x5e7c20));}),this['comments']['add'](_0x5e7c20,this['_findOptimalIndex'](_0x5e7c20));}['_update'](_0x93aa3){const {channelId:_0x21b026,id:_0x2058dd}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x21b026),{..._0x93aa3,'channelId':_0x21b026,'threadId':_0x2058dd});}['_remove'](_0x53df1a){return this['stopListening'](_0x53df1a),_0x53df1a['destroy'](),this['comments']['remove'](_0x53df1a);}['_findOptimalIndex'](_0x7034c1){const _0x32771c=this['comments']['find'](_0x4aeb3e=>new Date(_0x4aeb3e['authoredAt'])['getTime']()>new Date(_0x7034c1['authoredAt'])['getTime']());return _0x32771c?this['comments']['getIndex'](_0x32771c):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x41c8cb(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x165742,_0x343b2f){super();const _0x6f28a4=_0x165742['context']['plugins']['get'](it)['me'],_0x385da6=_0x165742['getCommentThread'](_0x343b2f['threadId']),_0x4b1fc9=0x0===_0x385da6['comments']['length'],_0x39aa94=_0x6f28a4===_0x343b2f['author'];this['id']=_0x343b2f['id'],this['threadId']=_0x343b2f['threadId'],this['author']=_0x343b2f['author'],this['creator']=_0x343b2f['creator'],this['isExternal']=Boolean(_0x343b2f['attributes']&&_0x343b2f['attributes']['@external']),this['set']('content',_0x343b2f['content']),this['createdAt']=_0x343b2f['createdAt']||new Date(),this['set']('authoredAt',_0x343b2f['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x385da6,'resolvedAt'),this['set']('attributes',_0x343b2f['attributes']||{}),this['bind']('isEditable')['to'](_0x165742,'_permissions',()=>{const _0x58d095=_0x165742['getPermissions'](_0x385da6['channelId'])['write'],_0xd0f70a=_0x165742['getPermissions'](_0x385da6['channelId'])['modifyAll'];return _0x39aa94&&_0x58d095||!_0x39aa94&&_0xd0f70a;}),this['bind']('isRemovable')['to'](_0x385da6,'isRemovable',_0x165742,'_permissions',_0x128571=>{const _0xd25c19=_0x165742['getPermissions'](_0x385da6['channelId'])['write'],_0x1c27d4=_0x165742['getPermissions'](_0x385da6['channelId'])['modifyAll'];return _0x39aa94&&_0xd25c19||_0x128571&&_0x4b1fc9||!_0x39aa94&&_0x1c27d4&&!_0x4b1fc9;}),this['bind']('isReadOnly')['to'](_0x385da6,'isReadOnly'),this['_repository']=_0x165742;}get['weight'](){return Math['max'](function(_0x21f458){const _0x5166fe=document['createElement']('div');return _0x5166fe['innerHTML']=_0x21f458,_0x5166fe['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3023f1){const {threadId:_0x5e92ae,id:_0xebb2e1}=this;if(!this['_repository']['hasCommentThread'](_0x5e92ae))throw new _0x266f92('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4718bb}=this['_repository']['getCommentThread'](_0x5e92ae);this['_repository']['fire'](Nt('updateComment',_0x4718bb,_0x5e92ae),{'channelId':_0x4718bb,'threadId':_0x5e92ae,'commentId':_0xebb2e1,..._0x3023f1});}['setAttribute'](_0x490532,_0x486eb6){const _0x1054df=wt(this['attributes']);yt(_0x1054df,_0x490532,_0x486eb6),this['update']({'attributes':_0x1054df});}['removeAttribute'](_0x130208){const _0x236046=wt(this['attributes']);Ct(_0x236046,_0x130208),this['update']({'attributes':_0x236046});}['remove'](_0x5ba015={}){if(!_0x5ba015['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4739e5,id:_0x58a187}=this;if(!this['_repository']['hasCommentThread'](_0x4739e5))throw new _0x266f92('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4b0a9c}=this['_repository']['getCommentThread'](_0x4739e5);this['_repository']['fire'](Nt('removeComment',_0x4b0a9c,_0x4739e5),{'channelId':_0x4b0a9c,'threadId':_0x4739e5,'commentId':_0x58a187,..._0x5ba015});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0xb0d342,..._0x1845dc){for(const _0x448dcd of _0x1845dc)void 0x0!==_0x448dcd&&(_0xb0d342+=':'+String(_0x448dcd));return _0xb0d342;}class ot extends _0x39b56b{constructor(_0x2e4d4b){super(_0x2e4d4b),this['set']('hasContent',!0x1);}['refresh'](){const _0x48325c=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5c89b8 of _0x48325c['getRanges']())if(this['_hasContent'](_0x5c89b8))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x47600e=_0x4c5e37(),ranges:_0x336abb,comment:_0x1e5ec8}={}){const _0x1ed3dc=this['editor']['model'],_0x24c7a7=_0x336abb??Array['from'](_0x1ed3dc['document']['selection']['getRanges']()),_0x3feadc=[];for(const _0x5d2ab5 of _0x24c7a7)this['_hasContent'](_0x5d2ab5)&&_0x3feadc['push'](this['_trimToContent'](_0x5d2ab5));if(!_0x3feadc['length'])throw new _0x266f92('addcommentthreadcommand-incorrect-ranges',null);_0x1e5ec8&&this['_createCommentThread'](_0x47600e,_0x1e5ec8),this['_createMarkersFromRanges'](_0x47600e,_0x3feadc,!!_0x1e5ec8);}['_createMarkersFromRanges'](_0xe3ed2e,_0x2f1153,_0x86b529){this['editor']['model']['change'](_0x43b635=>{for(const _0x178666 of _0x2f1153){const _0x2c4eb6=_0x4c5e37()['substr'](0x1,0x5),_0x1b37c6='comment:'+_0xe3ed2e+':'+_0x2c4eb6;_0x43b635['addMarker'](_0x1b37c6,{'range':_0x178666,'usingOperation':_0x86b529,'affectsData':_0x86b529});}});}['_createCommentThread'](_0x33e6dc,_0x19df70){const _0x1d266d=this['editor']['plugins']['get']('CommentsRepository'),_0x2f8b40=this['editor']['config']['get']('collaboration.channelId'),_0x569b0a=this['editor']['plugins']['get']('Users')['me'];if(!_0x569b0a)throw new _0x266f92('addcommentthreadcommand-user-not-found',null);_0x1d266d['addCommentThread']({'threadId':_0x33e6dc,'channelId':_0x2f8b40,'comments':[{'authorId':_0x569b0a['id'],'content':_0x19df70,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x51153b){for(const _0x4ab971 of _0x51153b['getItems']())if(this['_itemIsContent'](_0x4ab971))return!0x0;return!0x1;}['_itemIsContent'](_0xba4120){return _0xba4120['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xba4120)&&!_0xba4120['is']('element','tableCell');}['_trimToContent'](_0x5305fe){const _0x3a3d6b=_0x3e2c34=>!this['_itemIsContent'](_0x3e2c34['item']),_0x279cc3=_0x5305fe['start']['getLastMatchingPosition'](_0x3a3d6b),_0xd97db5=_0x5305fe['end']['getLastMatchingPosition'](_0x3a3d6b,{'direction':'backward'});return this['editor']['model']['createRange'](_0x279cc3,_0xd97db5);}}class b extends _0x165a5f{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f6b2f){super(_0x4f6b2f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x53a06e=this['editor'],_0x339cca=_0x53a06e['model']['document']['selection'],_0x361729=_0x3b904d(()=>this['refreshSelectedViews'](),0xa);_0x339cca['on']('change:range',(_0x3441c9,_0x32f185)=>{_0x32f185['directChange']&&(_0x361729['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x53a06e['editing']['view']['document'],'change:isFocused',(_0x67676b,_0x4068b1,_0x4d498e)=>{_0x4d498e&&_0x361729();}),this['listenTo'](_0x53a06e['ui']['focusTracker'],'change:isFocused',(_0x53cee6,_0x3334ce,_0x174eaa)=>{_0x174eaa||this['fire']('blur',{'isAnnotationTracked':_0x3ed08d=>this['_editorAnnotationsData']['has'](_0x3ed08d['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x455526){if(this['_editorAnnotations']['has'](_0x455526['view']))return;this['_editorAnnotations']['add'](_0x455526['view']),this['editor']['ui']['focusTracker']['add'](_0x455526['view']['element']);const _0x16d102=this['editor']['plugins']['get'](y);this['listenTo'](_0x16d102['collection'],'remove',(_0x1b5647,_0x212dd3)=>{this['editor']['ui']['focusTracker']['remove'](_0x212dd3['view']['element']),this['_editorAnnotations']['delete'](_0x212dd3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x405134){if('function'!=typeof _0x405134)throw new _0x266f92('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x405134);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x54d19a,annotations:_0x282c3b}){const _0x28ffa6=[],_0xd15654=this['editor']['model']['document']['selection'],_0x3df471=Array['from'](_0xd15654['getRanges']());for(const [_0x47f9d1,_0x252682]of this['_editorAnnotationsData']){const _0xbb3600=_0x1c8d36(_0x252682),_0x323395=_0x282c3b['getByInnerView'](_0x47f9d1);_0xbb3600&&_0x323395&&_0x28ffa6['push']({'annotation':_0x323395,'range':_0xbb3600});}function _0x1c8d36(_0x5e5bb8){for(const _0x54e22f of _0x5e5bb8)for(const _0x19dfae of _0x3df471)if(_0x54e22f['containsRange'](_0x19dfae,!_0xd15654['isCollapsed']))return _0x54e22f;return null;}return _0x28ffa6['sort']((_0x5bc535,_0x3afb64)=>{const _0x404fbb=_0x5bc535['range'],_0xdf429b=_0x3afb64['range'];if(!_0x404fbb['isEqual'](_0xdf429b)){if(_0x404fbb['containsRange'](_0xdf429b,!0x0))return 0x1;if(_0xdf429b['containsRange'](_0x404fbb,!0x0))return-0x1;}return _0x5bc535['annotation']==_0x54d19a?-0x1:_0x3afb64['annotation']==_0x54d19a?0x1:0x0;})['map'](_0x5506b4=>_0x5506b4['annotation']);}get['_editorAnnotationsData'](){const _0x4f1852=new Map();for(const _0x43b99f of Array['from'](this['_dataCollectors']))for(const [_0x52c435,_0x7ae8a3]of _0x43b99f())_0x4f1852['set'](_0x52c435,_0x7ae8a3);return _0x4f1852;}}class st extends _0x165a5f{['afterInit'](){const _0x50e059=this['editor'];if(!_0x50e059['plugins']['has']('RestrictedEditingModeEditing'))return;_0x50e059['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x165a5f{constructor(_0x1fa356){super(_0x1fa356),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2b620a=this['editor'],_0x5f492d=_0x2b620a['commands']['get']('importWord'),_0x3e8a8c=_0x2b620a['plugins']['get'](it);_0x5f492d&&(_0x5f492d['on']('execute',(_0x1b9dbe,[,_0x360dab])=>{_0x360dab['collaboration_features']={'comments':!0x0,'user_id':_0x3e8a8c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5f492d,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x56c900,_0x4ef799){const {comment_threads:_0x1777f5}=_0x4ef799;_0x1777f5&&_0x1777f5['forEach'](({thread_id:_0x5e835c,comments:_0x5d1fca,is_resolved:_0x22b735})=>{const _0x41a999=new Date(),_0x373023=_0x5d1fca['map'](({author:_0x4b3fe7,content:_0x2f7944,created_at:_0x60dfe0})=>({'content':_0x2f7944,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x41a999,'attributes':{'@external':{'authorName':_0x4b3fe7,'createdAt':_0x60dfe0?new Date(_0x60dfe0):new Date(),'source':'importWord'}}})),_0x1bf232=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1bf232,'threadId':_0x5e835c,'comments':_0x373023,'resolvedAt':_0x22b735?_0x41a999:null});});}}class at extends _0x165a5f{constructor(_0x25e460){super(_0x25e460),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2c6d34=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2c6d34,'contentInsertion',(_0x278834,_0x15d455)=>this['_removeMarkersWithoutThreads'](_0x15d455['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xc447d4){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xc447d4;const _0x46c128=this['editor']['plugins']['get']('CommentsRepository');for(const _0x415a44 of _0xc447d4['keys']()){const [_0x1338c3,_0x217f6c]=_0x415a44['split'](':');'comment'!=_0x1338c3||_0x46c128['hasCommentThread'](_0x217f6c)||_0xc447d4['delete'](_0x415a44);}return _0xc447d4;}['_registerMarkerInClipboardPipeline'](){const _0xda8b54=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2401c2=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2401c2&&_0xda8b54['_registerMarkerToCopy']('comment',_0x2401c2);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x322d5c){switch(_0x322d5c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x4bf466){const _0x25a445=_0x4bf466['split'](':');return{'group':_0x25a445[0x0],'id':_0x25a445[0x1],'part':_0x25a445[0x2]};}class ut extends _0x165a5f{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x31ed13,_0x4cd0e6)=>{if(!_0x4cd0e6['options']['showCommentHighlights'])return null;if(_0x4cd0e6['options']['ignoreResolvedComments']){const {id:_0x41190b}=ft(_0x31ed13['markerName']),_0x14f620=this['editor']['plugins']['get'](o);if(_0x14f620['getCommentThread'](_0x41190b)?.['isResolved']&&_0x31ed13['item'])return _0x4cd0e6['consumable']['consume'](_0x31ed13['item'],'addMarker:'+_0x31ed13['markerName']),_0x4cd0e6['consumable']['consume'](_0x31ed13['item'],'removeMarker:'+_0x31ed13['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5fba0b=>{_0x5fba0b['on']('addMarker:comment',(_0x2078cf,_0x1fc61b,_0x249b1d)=>{if(!_0x249b1d['options']['showCommentHighlights'])return;const _0x49d80b=_0x1fc61b['item'];if(!_0x49d80b)return;const _0x1a89e5=_0x249b1d['mapper']['toViewElement'](_0x49d80b);this['editor']['model']['schema']['isObject'](_0x49d80b)&&_0x1a89e5&&!_0x1a89e5['getCustomProperty']('widget')&&_0x1a89e5['is']('containerElement')&&_0x4359cf(_0x1a89e5,_0x249b1d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4b58a4,{writer:_0x1df54d,options:_0x527ed1})=>{if(!_0x527ed1['showCommentHighlights'])return null;const _0x3b8efd=_0x1df54d['createContainerElement']('div'),_0x505878=_0x1df54d['createEmptyElement']('hr');return _0x1df54d['addClass']('ck-horizontal-line',_0x3b8efd),_0x1df54d['insert'](_0x1df54d['createPositionAt'](_0x3b8efd,0x0),_0x505878),_0x3b8efd;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4e3b99,{writer:_0x1855a0,options:_0x188bb4})=>{if(!_0x188bb4['showCommentHighlights'])return null;const _0x4188f6=_0x1855a0['createContainerElement']('span'),_0x17725c=_0x1855a0['createEmptyElement']('img');return _0x1855a0['addClass']('image-inline',_0x4188f6),_0x1855a0['insert'](_0x1855a0['createPositionAt'](_0x4188f6,0x0),_0x17725c),_0x4188f6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x372951,{writer:_0x328fcb,options:_0x40f126})=>{if(_0x40f126['showCommentHighlights'])return _0x328fcb['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1a7d7b,_0x47c896,_0xe37a3b)=>{_0xe37a3b['options']['showCommentHighlights']&&_0x1a7d7b['stop']();},{'priority':'high'});}}class r extends _0x165a5f{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(_0x474004){super(_0x474004),this['set']('isThreadsLoadingPaused',!0x0),_0x474004['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2df79b,_0x1e1f31,_0xded7c6,_0x39900d)=>{const _0x3107fd=_0x474004['plugins']['get'](o),_0x5b45c0=_0xded7c6?ft(_0xded7c6)['id']:null;_0x474004['model']['change'](()=>{if(_0x5b45c0){const _0x363dbe=this['getAllMarkersForId'](_0x5b45c0);for(const _0x5317d7 of _0x363dbe)_0x474004['editing']['reconvertMarker'](_0x5317d7);}if(_0x39900d){const {id:_0x1a6568}=ft(_0x39900d),_0x381465=_0x3107fd['getCommentThread'](_0x1a6568);if(_0x381465&&_0x381465['unlinkedAt'])return;if(_0x381465&&!_0x381465['isAttached'])return;const _0x1bba49=this['getAllMarkersForId'](_0x1a6568);for(const _0x238422 of _0x1bba49)_0x474004['editing']['reconvertMarker'](_0x238422);}}),_0x5b45c0&&this['scrollToThreadMarker'](_0x5b45c0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x1b2e01=this['editor'],_0x2ba296=_0x1b2e01['plugins']['get'](o),_0x364bd2=_0x1b2e01['config']['get']('collaboration.channelId'),_0x345fa4=_0x2ba296['getCommentThreads']()['filter'](_0x9c5227=>_0x9c5227['channelId']!==_0x364bd2);_0x1b2e01['commands']['add']('addCommentThread',new ot(_0x1b2e01)),this['listenTo'](_0x1b2e01,'change:isReadOnly',(_0x1d863b,_0x2a6f01,_0x48e844)=>{_0x2ba296['switchReadOnly'](_0x48e844,_0x1b2e01['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2ba296,dt('addCommentThread',_0x364bd2),(_0x43ec00,{threadId:_0xdd9a37})=>{const _0x163e11=this['editor']['plugins']['get'](o)['getCommentThread'](_0xdd9a37);_0x163e11?.['unlinkedAt']&&this['_attachArchivedThread'](_0xdd9a37);}),this['listenTo'](_0x2ba296,dt('removeCommentThread',_0x364bd2),(_0x2c7c29,{threadId:_0x190a69})=>{_0x1b2e01['model']['enqueueChange']({'isUndoable':!0x1},_0x22ded9=>{const _0x547053=this['getAllMarkersForId'](_0x190a69);for(const _0x4af547 of _0x547053)_0x22ded9['removeMarker'](_0x4af547);});}),this['listenTo'](_0x2ba296,dt('resolveCommentThread',_0x364bd2),(_0x45910b,{threadId:_0x1904a2})=>{(this['_reconvertMarkers'](_0x1904a2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1904a2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2ba296,dt('reopenCommentThread',_0x364bd2),(_0x544e33,{threadId:_0x37503c})=>{this['_reconvertMarkers'](_0x37503c);},{'priority':'low'}),this['listenTo'](_0x2ba296,dt('addComment',_0x364bd2),(_0x4d4542,{threadId:_0x411107,isFromAdapter:_0x10355f})=>{const _0xa8e4da=this['getAllMarkersForId'](_0x411107);if(_0x10355f||0x0==_0xa8e4da['length']||!_0x2ba296['hasCommentThread'](_0x411107))return;0x1===_0x2ba296['getCommentThread'](_0x411107)['length']&&_0x1b2e01['model']['enqueueChange']({'isUndoable':!0x1},_0x13d392=>{for(const _0x339338 of _0xa8e4da)_0x13d392['updateMarker'](_0x339338,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x345fa4);}['afterInit'](){!async function(_0x260844){const _0x332e45=_0x309b49([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x1137e9=0x73460ab3,_0x279822=0x7341747b^_0x1137e9,_0x14ca18=window[_0x309b49([0x44,0x61,0x74,0x65])][_0x309b49([0x6e,0x6f,0x77])](),_0x560007=_0x260844[_0x309b49([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x59b04d=new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d6385=>{_0x560007[_0x309b49([0x6f,0x6e,0x63,0x65])](_0x309b49([0x72,0x65,0x61,0x64,0x79]),_0x4d6385);}),_0x46117e={[_0x309b49([0x6b,0x74,0x79])]:_0x309b49([0x45,0x43]),[_0x309b49([0x75,0x73,0x65])]:_0x309b49([0x73,0x69,0x67]),[_0x309b49([0x63,0x72,0x76])]:_0x309b49([0x50,0x2d,0x32,0x35,0x36]),[_0x309b49([0x78])]:_0x309b49([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]),[_0x309b49([0x79])]:_0x309b49([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]),[_0x309b49([0x61,0x6c,0x67])]:_0x309b49([0x45,0x53,0x32,0x35,0x36])},_0x35345a=_0x560007[_0x309b49([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x309b49([0x67,0x65,0x74])](_0x309b49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x23fd15(){let _0x2cf608,_0x145eca=null,_0xd59f10=null;try{if(_0x35345a==_0x309b49([0x47,0x50,0x4c]))return _0x309b49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2cf608=_0x26ed33(),!_0x2cf608)return _0x309b49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2cf608[_0x309b49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xd59f10=_0x399ecc(_0x2cf608[_0x309b49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2cf608[_0x309b49([0x6a,0x74,0x69])])),await _0x4724f0()?_0x5b4b56()?_0x30b98b()?_0x309b49([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x18031f()?(_0x2cf608[_0x309b49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x309b49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x145eca=_0x44a297(_0x309b49([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59543f()):_0x309b49([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x309b49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x309b49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x309b49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x30b98b(){const _0x315608=[_0x309b49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x309b49([0x74,0x72,0x69,0x61,0x6c])][_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cf608[_0x309b49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14ca18/0x3e8:0xe10*_0x279822;return _0x2cf608[_0x309b49([0x65,0x78,0x70])]<_0x315608;}function _0x5b4b56(){const _0xc1c408=_0x2cf608[_0x309b49([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xc1c408)return!0x1;if(_0xc1c408[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x2a])))return!0x0;if(_0xc1c408[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x43,0x4d,0x54])))return!0x0;if(_0xc1c408[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4af233())return!0x0;if(_0xc1c408[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x52,0x43,0x4d,0x54]))){if(_0x1ba01e())return!0x0;if(_0x277bd8()||_0x664143())return!0x0;}return!0x1;}function _0x18031f(){const _0x187d30=_0x2cf608[_0x309b49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x187d30||0x0==_0x187d30[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x77d41b}=new URL(window[_0x309b49([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x187d30[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x77d41b))return!0x0;const _0x33fb68=_0x77d41b[_0x309b49([0x73,0x70,0x6c,0x69,0x74])](_0x309b49([0x2e]));return _0x187d30[_0x309b49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x508cf8=>_0x508cf8[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x2a])))[_0x309b49([0x6d,0x61,0x70])](_0x39448e=>_0x39448e[_0x309b49([0x73,0x70,0x6c,0x69,0x74])](_0x309b49([0x2e])))[_0x309b49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a48af=>_0x5a48af[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x33fb68[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x309b49([0x6d,0x61,0x70])](_0x28915d=>Array(_0x33fb68[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x28915d[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x309b49([0x66,0x69,0x6c,0x6c])](_0x28915d[0x0]===_0x309b49([0x2a])?_0x309b49([0x2a]):'')[_0x309b49([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x28915d))[_0x309b49([0x73,0x6f,0x6d,0x65])](_0x3c9767=>_0x33fb68[_0x309b49([0x65,0x76,0x65,0x72,0x79])]((_0x5aaf75,_0x131565)=>_0x3c9767[_0x131565]===_0x5aaf75||_0x3c9767[_0x131565]===_0x309b49([0x2a])));}function _0x59543f(){return _0x145eca&&_0xd59f10?new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x186a25,_0x1c151c)=>{_0x145eca[_0x309b49([0x74,0x68,0x65,0x6e])](_0x186a25,_0x1c151c),_0xd59f10[_0x309b49([0x74,0x68,0x65,0x6e])](_0x5f26f9=>{_0x5f26f9!=_0x309b49([0x56,0x61,0x6c,0x69,0x64])&&_0x186a25(_0x5f26f9);},_0x1c151c);}):_0x145eca||_0xd59f10||_0x309b49([0x56,0x61,0x6c,0x69,0x64]);}}function _0x399ecc(_0x6141a9,_0x25b768){return new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38721e=>{if(_0x418288())return _0x38721e(_0x309b49([0x56,0x61,0x6c,0x69,0x64]));_0x4545e2(),_0x560007[_0x309b49([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x309b49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5c687b=!0x1;const _0x5e4263=_0x4c5e37();function _0x376c6b(_0xf46531){return!!_0xf46531&&(typeof _0xf46531===_0x309b49([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xf46531===_0x309b49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xf46531[_0x309b49([0x74,0x68,0x65,0x6e])]===_0x309b49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xf46531[_0x309b49([0x63,0x61,0x74,0x63,0x68])]===_0x309b49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x162874(_0x3609ce){_0x1dc8f6(_0x3609ce)[_0x309b49([0x74,0x68,0x65,0x6e])](_0x305fa6=>{if(!_0x305fa6||_0x305fa6[_0x309b49([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x309b49([0x6f,0x6b]))return _0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1061f9(_0x589f8c(_0x5e4263+_0x25b768))!=_0x305fa6[_0x309b49([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x309b49([0x56,0x61,0x6c,0x69,0x64]);})[_0x309b49([0x74,0x68,0x65,0x6e])](_0x3d0440=>(_0x40ad74(),_0x3d0440),()=>{const _0x3c12cd=_0x416add();return null==_0x3c12cd?(_0x40ad74(),_0x309b49([0x56,0x61,0x6c,0x69,0x64])):_0x309b49(_0x14ca18-_0x3c12cd>(0x574a8eb3^_0x1137e9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x309b49([0x74,0x68,0x65,0x6e])](_0x38721e)[_0x309b49([0x63,0x61,0x74,0x63,0x68])](()=>{_0x38721e(_0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xb05495=0x7370e433^_0x1137e9;function _0x40ad74(){const _0xebcc83=_0x309b49([0x6c,0x6c,0x63,0x74,0x2d])+_0x1061f9(_0x589f8c(_0x6141a9)),_0x3ec57a=_0xf8b9c7(_0x1061f9(window[_0x309b49([0x4d,0x61,0x74,0x68])][_0x309b49([0x63,0x65,0x69,0x6c])](_0x14ca18/_0xb05495)));window[_0x309b49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x309b49([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xebcc83,_0x3ec57a);}function _0x416add(){const _0xef83b7=_0x309b49([0x6c,0x6c,0x63,0x74,0x2d])+_0x1061f9(_0x589f8c(_0x6141a9)),_0xb1cea=window[_0x309b49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x309b49([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xef83b7);return _0xb1cea?window[_0x309b49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xf8b9c7(_0xb1cea),0x10)*_0xb05495:null;}function _0x1dc8f6(_0x2378ce){return new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x577d7b,_0x4710cb)=>{_0x2378ce[_0x309b49([0x74,0x68,0x65,0x6e])](_0x577d7b,_0x4710cb),window[_0x309b49([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4710cb,0x7347de73^_0x1137e9);});}}_0x560007[_0x309b49([0x6f,0x6e])](_0x309b49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3c3dfb,_0x44c7ff)=>{if(_0x44c7ff[0x0]!=_0x6141a9)return _0x38721e(_0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x44c7ff[0x1]={..._0x44c7ff[0x1],[_0x309b49([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5e4263};},{[_0x309b49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x309b49([0x68,0x69,0x67,0x68])}),_0x560007[_0x309b49([0x6f,0x6e])](_0x309b49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x7909ba=>{_0x376c6b(_0x7909ba[_0x309b49([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5c687b=!0x0,_0x162874(_0x7909ba[_0x309b49([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x309b49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x309b49([0x6c,0x6f,0x77])}),_0x59b04d[_0x309b49([0x74,0x68,0x65,0x6e])](()=>{_0x5c687b||_0x38721e(_0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x418288(){return _0x560007[_0x309b49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x309b49([0x76,0x69,0x65,0x77])][_0x309b49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x309b49([0x61,0x75,0x74,0x6f]);}function _0x4545e2(){_0x560007[_0x309b49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x309b49([0x76,0x69,0x65,0x77])][_0x309b49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x309b49([0x61,0x75,0x74,0x6f]);}}function _0x44a297(_0xef9a93){const _0x435d58=[new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x107d4d=>setTimeout(_0x107d4d,0x734f347f^_0x1137e9)),_0x59b04d[_0x309b49([0x74,0x68,0x65,0x6e])](()=>new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2dd156=>{let _0x4f87fe=0x0;_0x560007[_0x309b49([0x6d,0x6f,0x64,0x65,0x6c])][_0x309b49([0x6f,0x6e])](_0x309b49([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d832d,_0x52d791)=>{_0x52d791[0x0][_0x309b49([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4f87fe++,_0x4f87fe==(0x73460f5b^_0x1137e9)&&(_0x2dd156(),_0x2d832d[_0x309b49([0x6f,0x66,0x66])]());});}))];return window[_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x309b49([0x72,0x61,0x63,0x65])](_0x435d58)[_0x309b49([0x74,0x68,0x65,0x6e])](()=>_0xef9a93);}async function _0x5e525a(){await _0x59b04d,_0x560007[_0x309b49([0x6d,0x6f,0x64,0x65,0x6c])][_0x309b49([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x23627a,_0x560007[_0x309b49([0x6d,0x6f,0x64,0x65,0x6c])][_0x309b49([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x23627a,_0x560007[_0x309b49([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x309b49([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4af233(){return window[_0x309b49([0x67,0x6c,0x6f,0x62])]&&window[_0x309b49([0x67,0x6c,0x6f,0x62])][_0x309b49([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1ba01e(){return _0x153ae7(_0x309b49([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3d4f13(_0x309b49([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x309b49([0x73,0x74,0x61,0x74,0x65])]==_0x309b49([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x277bd8(){return _0x153ae7(_0x309b49([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 _0x664143(){return _0x153ae7(_0x309b49([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4399f6(_0xe2ebac){const _0x5a7c02=_0x25ef81();_0x560007[_0x5a7c02]=_0x309b49([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xe2ebac,_0xe2ebac!=_0x309b49([0x56,0x61,0x6c,0x69,0x64])&&_0x5e525a();}function _0x25ef81(){const _0x34d98e=window[_0x309b49([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x309b49([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x309b49([0x6e,0x6f,0x77])]())[_0x309b49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x309b49([0x2e]),'');let _0x230672=_0x309b49([0x4b]);for(let _0x5b6c82=0x0;_0x5b6c82<_0x34d98e[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5b6c82+=0x2){let _0x284d5a=window[_0x309b49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34d98e[_0x309b49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b6c82,_0x5b6c82+0x2));_0x284d5a>=_0x332e45[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x284d5a-=_0x332e45[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x230672+=_0x332e45[_0x284d5a];}return _0x230672;}function _0x26ed33(){const _0x35c964=_0x35345a[_0x309b49([0x73,0x70,0x6c,0x69,0x74])](_0x309b49([0x2e]));if(0x3!=_0x35c964[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2bbf91(_0x35c964[0x1]);function _0x2bbf91(_0x1dc22e){const _0xdcbbb2=_0x36a44e(_0x1dc22e);return _0xdcbbb2&&_0x45426d()?_0xdcbbb2:null;function _0x45426d(){const _0x4667ce=_0xdcbbb2[_0x309b49([0x6a,0x74,0x69])],_0x37f1be=window[_0x309b49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4667ce[_0x309b49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4667ce[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2a378e={..._0xdcbbb2,[_0x309b49([0x6a,0x74,0x69])]:_0x4667ce[_0x309b49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4667ce[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2a378e[_0x309b49([0x76,0x63])],_0x589f8c(_0x2a378e)==_0x37f1be;}}}async function _0x4724f0(){let _0x315989=!0x0;try{const _0x7d9e3=_0x35345a[_0x309b49([0x73,0x70,0x6c,0x69,0x74])](_0x309b49([0x2e])),[_0x1f1130,_0x5745e4,_0x530c72]=_0x7d9e3;return _0x81836a(_0x1f1130),await _0x560922(_0x1f1130,_0x5745e4,_0x530c72),_0x315989;}catch{return!0x1;}function _0x81836a(_0x15257d){const _0x832ece=_0x36a44e(_0x15257d);_0x832ece&&_0x832ece[_0x309b49([0x61,0x6c,0x67])]==_0x309b49([0x45,0x53,0x32,0x35,0x36])||(_0x315989=!0x1);}async function _0x560922(_0x39984d,_0x21b50a,_0x17048f){const _0xd9281b=window[_0x309b49([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x309b49([0x66,0x72,0x6f,0x6d])](_0x232309(_0x17048f),_0xee21bc=>_0xee21bc[_0x309b49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2d436a=new window[(_0x309b49([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x309b49([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x39984d+_0x309b49([0x2e])+_0x21b50a),_0x537e9a=window[_0x309b49([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x309b49([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x537e9a)return;const _0x1dbcb9=await _0x537e9a[_0x309b49([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x309b49([0x6a,0x77,0x6b]),_0x46117e,{[_0x309b49([0x6e,0x61,0x6d,0x65])]:_0x309b49([0x45,0x43,0x44,0x53,0x41]),[_0x309b49([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x309b49([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x309b49([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x537e9a[_0x309b49([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x309b49([0x6e,0x61,0x6d,0x65])]:_0x309b49([0x45,0x43,0x44,0x53,0x41]),[_0x309b49([0x68,0x61,0x73,0x68])]:{[_0x309b49([0x6e,0x61,0x6d,0x65])]:_0x309b49([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1dbcb9,_0xd9281b,_0x2d436a)||(_0x315989=!0x1);}}function _0x36a44e(_0xe5fe53){return _0xe5fe53[_0x309b49([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x309b49([0x65,0x79]))?JSON[_0x309b49([0x70,0x61,0x72,0x73,0x65])](_0x232309(_0xe5fe53)):null;}function _0x232309(_0x5de894){return window[_0x309b49([0x61,0x74,0x6f,0x62])](_0x5de894[_0x309b49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x309b49([0x2b]))[_0x309b49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x309b49([0x2f])));}function _0x589f8c(_0x136379){let _0x37b2d9=0x1505;function _0x227874(_0x19daa6){for(let _0x4b4e29=0x0;_0x4b4e29<_0x19daa6[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b4e29++){const _0x3b23a1=_0x19daa6[_0x309b49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4b4e29);_0x37b2d9=(_0x37b2d9<<0x5)+_0x37b2d9+_0x3b23a1,_0x37b2d9&=_0x37b2d9;}}function _0x399a80(_0x382da1){Array[_0x309b49([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x382da1)?_0x382da1[_0x309b49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x399a80):_0x382da1&&typeof _0x382da1==_0x309b49([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x309b49([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x382da1)[_0x309b49([0x73,0x6f,0x72,0x74])]()[_0x309b49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x398112,_0x351cf1])=>{_0x227874(_0x398112),_0x399a80(_0x351cf1);}):_0x227874(window[_0x309b49([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x382da1));}return _0x399a80(_0x136379),_0x37b2d9>>>0x0;}function _0x1061f9(_0x17c1c6){return _0x17c1c6[_0x309b49([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x309b49([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x309b49([0x30]));}function _0xf8b9c7(_0x4d66f8){return _0x4d66f8[_0x309b49([0x73,0x70,0x6c,0x69,0x74])]('')[_0x309b49([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x309b49([0x6a,0x6f,0x69,0x6e])]('');}function _0x153ae7(_0x17eedc){return _0x560007[_0x309b49([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x309b49([0x68,0x61,0x73])](_0x17eedc);}function _0x3d4f13(_0x43d418){return _0x560007[_0x309b49([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x309b49([0x67,0x65,0x74])](_0x43d418);}function _0x23627a(){}function _0x309b49(_0x2b5dee){return _0x2b5dee['map'](_0x555e75=>String['fromCharCode'](_0x555e75))['join']('');}_0x4399f6(await _0x23fd15());}(this);}['destroy'](){const _0x8c0c64=this['editor']['plugins']['get'](o),_0x24c872=this['editor']['config']['get']('collaboration.channelId');for(const _0x5351a9 of _0x8c0c64['getCommentThreads']({'channelId':_0x24c872}))_0x8c0c64['_detachCommentThread'](_0x5351a9['id']),_0x8c0c64['_threads']['delete'](_0x5351a9['id']);super['destroy']();}['hasMarkerForId'](_0x59abe3){return this['getAllMarkersForId'](_0x59abe3)['length']>0x0;}['getAllMarkersForId'](_0x5f2fd3){const _0x17a2fb=[];for(const _0x1bcb7a of this['editor']['model']['markers'])_0x1bcb7a['name']['startsWith']('comment:'+_0x5f2fd3)&&_0x17a2fb['push'](_0x1bcb7a);return _0x17a2fb;}['scrollToThreadMarker'](_0x3c6d14){setTimeout(()=>{const _0x8288d0=this['_getTargetForId'](_0x3c6d14);if(!_0x8288d0)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x3c6d14&&nt({'target':_0x8288d0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x20bf60){this['editor']['model']['change'](()=>{for(const _0x3d5c84 of this['getAllMarkersForId'](_0x20bf60))this['editor']['editing']['reconvertMarker'](_0x3d5c84);});}['_attachArchivedThread'](_0x2b0bef){const _0x4f98c0=this['editor']['plugins']['get'](o),_0x5d20a4=this['editor']['plugins']['get'](b),_0x1d3438=_0x4f98c0['getCommentThread'](_0x2b0bef);if(!_0x1d3438['isAttached']){const _0x11ff0f=_0x1d3438['attachTo'](()=>this['_getTargetForId'](_0x1d3438['id']));_0x5d20a4['registerAnnotation'](_0x11ff0f),_0x1d3438['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xddded9=this['editor'],_0x516d79=_0xddded9['plugins']['get'](it);_0xddded9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1c25ee,_0x3bc33b)=>{const {id:_0x9219e9}=ft(_0x1c25ee['markerName']),_0x1687fe=_0xddded9['plugins']['get'](o)['getCommentThread'](_0x9219e9),_0x2f5873=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x9219e9;let _0x581ea0;if(_0x1687fe&&_0x1687fe['isResolved']&&!_0x2f5873&&_0x1c25ee['item'])return _0x3bc33b['consumable']['consume'](_0x1c25ee['item'],'addMarker:'+_0x1c25ee['markerName']),_0x3bc33b['consumable']['consume'](_0x1c25ee['item'],'removeMarker:'+_0x1c25ee['markerName']),null;const _0xc63909=['ck-comment-marker'];return _0x2f5873&&_0xc63909['push']('ck-comment-marker--active'),_0x581ea0=_0x1687fe?.['length']?_0x1687fe['comments']['first']['author']['id']:_0x516d79['me']['id'],{'classes':_0xc63909,'attributes':{'data-comment':_0x9219e9,'data-author-id':_0x581ea0}};}}),_0xddded9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2e7ff0,{options:_0x2581c2})=>{if(_0x2581c2['showCommentHighlights'])return null;const _0x51291f=_0xddded9['plugins']['get'](o),_0x238014=_0xddded9['model']['markers']['get'](_0x2e7ff0),{id:_0x112c35,part:_0x174905}=ft(_0x2e7ff0);return _0x238014&&!_0x238014['affectsData']||_0x2581c2['ignoreResolvedComments']&&_0x51291f['getCommentThread'](_0x112c35)?.['isResolved']?null:{'group':'comment','name':_0x174905?_0x112c35+':'+_0x174905:_0x112c35};}}),_0xddded9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5a654e,{writer:_0x49627b})=>_0x49627b['createElement']('$marker',{'data-name':'comment:'+_0x5a654e['getAttribute']('id')})}),_0xddded9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x97d80a=this['editor'],_0x34a28a=_0x97d80a['plugins']['get'](o),_0x5c6374=new Set(),_0x5b46e5=new Set();_0x97d80a['model']['document']['registerPostFixer'](_0x41b94d=>{let _0x23a3e6=!0x1;for(const {name:_0x4b9efa,data:_0x2e47d4}of _0x97d80a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x107f48,id:_0x2f3923}=ft(_0x4b9efa);let _0x5cde94=_0x2e47d4['newRange'];if('comment'!==_0x107f48||!_0x5cde94)continue;const _0x116696='$graveyard'===_0x5cde94['root']['rootName'];_0x116696||(_0x5cde94=ht(_0x5cde94,_0x97d80a['model']),!_0x5cde94||_0x5cde94['isCollapsed']||!_0x2e47d4['newRange']||_0x5cde94['isEqual'](_0x2e47d4['newRange']))?_0x97d80a['model']['hasContent'](_0x5cde94)&&!_0x116696?this['isThreadsLoadingPaused']?_0x5c6374['add'](_0x4b9efa):this['_handleThreadMarker'](_0x4b9efa,_0x2f3923):(_0x5b46e5['add'](_0x4b9efa),_0x5c6374['delete'](_0x4b9efa),_0x41b94d['removeMarker'](_0x4b9efa),_0x23a3e6=!0x0):(_0x41b94d['updateMarker'](_0x4b9efa,{'range':_0x5cde94}),_0x23a3e6=!0x0);}return _0x23a3e6;}),this['on']('change:isThreadsLoadingPaused',(_0x4d9f2b,_0x15b6de,_0x5cfe6a)=>{if(!_0x5cfe6a&&_0x5c6374['size'])for(const _0x4727fc of _0x5c6374){const {id:_0x413cd1}=ft(_0x4727fc);_0x5c6374['delete'](_0x4727fc),_0x97d80a['model']['markers']['get'](_0x4727fc)&&this['_handleThreadMarker'](_0x4727fc,_0x413cd1);}}),this['listenTo'](_0x97d80a['model']['document'],'change',()=>{for(const {name:_0x462f43,data:{newRange:_0x422f62}}of _0x97d80a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4b0537,id:_0x5119ad}=ft(_0x462f43);if('comment'!==_0x4b0537)continue;const _0x278285=_0x34a28a['getCommentThread'](_0x5119ad),_0xa3aaf0=this['hasMarkerForId'](_0x5119ad);_0x278285&&(!_0x278285['_hasTargetInContent']&&_0x422f62&&_0x97d80a['editing']['view']['once']('render',()=>{const _0x264163=_0x97d80a['plugins']['get'](y),_0x2f84ad=_0x34a28a['_threadToController']['get'](_0x278285)['view'];_0x264163['getByInnerView'](_0x2f84ad)['refreshVisibility']();},{'priority':'low'}),_0x278285['_hasTargetInContent']=_0xa3aaf0||!!_0x422f62),_0x422f62||(_0x5b46e5['add'](_0x462f43),_0x5c6374['delete'](_0x462f43));}for(const _0x46bbd2 of _0x5b46e5){const {id:_0x11ef85}=ft(_0x46bbd2),_0x570459=_0x34a28a['getCommentThread'](_0x11ef85);if(_0x5c6374['delete'](_0x46bbd2),!_0x570459)continue;const _0x5e2c70=this['hasMarkerForId'](_0x11ef85);_0x5e2c70||_0x570459['isSubmitted']?_0x5e2c70||_0x570459['unlinkedAt']||_0x570459['setUnlinkedAt'](new Date()):_0x570459['remove']();}_0x5b46e5['clear']();});}['_handleInitialThreads'](_0x4b0290){_0x4b0290['forEach'](_0x4f89ce=>{_0x4f89ce['unlinkedAt']&&this['_attachArchivedThread'](_0x4f89ce['id']);});}['_getTargetForId'](_0x38f216){const _0xd3896=this['editor'],_0xad15db=this['getAllMarkersForId'](_0x38f216);return et(_0xd3896['editing'],_0xad15db);}['_getTextContext'](_0x41b7f0){const _0x4f8d8c=this['getAllMarkersForId'](_0x41b7f0);let _0x1b8985='',_0x2ea24b=!0x1;for(const _0x1051d4 of _0x4f8d8c){const _0x4e0e70=_0x1051d4['getRange']();for(const _0x4e5ca2 of Array['from'](_0x4e0e70['getItems']()))_0x4e5ca2['is']('$textProxy')?(_0x1b8985&&_0x2ea24b&&(_0x1b8985+='\x20',_0x2ea24b=!0x1),_0x1b8985+=_0x4e5ca2['data']):_0x2ea24b=!0x0;_0x2ea24b=!0x0;}return _0x1b8985['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x50f55e,_0x5ce882){const _0x4c4faa=this['editor'],_0x2bfa57=_0x4c4faa['plugins']['get'](o);let _0x2c3693=_0x2bfa57['getCommentThread'](_0x5ce882);const _0x5a0bd6=_0x4c4faa['config']['get']('collaboration.channelId'),_0x36a3e3=_0x4c4faa['plugins']['get'](b);if(_0x2c3693&&(_0x2c3693['unlinkedAt']&&_0x2c3693['setUnlinkedAt'](null),_0x2c3693['isAttached']))return _0x2c3693;return!this['getAllMarkersForId'](_0x5ce882)[0x0]['managedUsingOperations']?_0x4c4faa['editing']['view']['once']('render',()=>{if(_0x2bfa57['getCommentThread'](_0x5ce882))return;const _0x561bcc=_0x4c4faa['plugins']['get'](y);_0x2c3693=_0x2bfa57['openNewCommentThread']({'channelId':_0x5a0bd6,'threadId':_0x5ce882,'target':()=>this['_getTargetForId'](_0x5ce882),'context':{'type':'text','value':this['_getTextContext'](_0x5ce882)}});const _0x5f3cc8=_0x2bfa57['_threadToController']['get'](_0x2c3693)['view'],_0x4ea022=_0x561bcc['getByInnerView'](_0x5f3cc8);_0x4ea022&&_0x36a3e3['registerAnnotation'](_0x4ea022);},{'priority':'low'}):_0x2bfa57['fetchCommentThread']({'channelId':_0x5a0bd6,'threadId':_0x5ce882})['then'](_0x290d1a=>{if('destroyed'!==_0x4c4faa['state']){if(_0x2c3693=_0x290d1a,_0x2c3693&&!_0x2c3693['isAttached']){const _0x491bb7=_0x2c3693['attachTo'](()=>this['_getTargetForId'](_0x5ce882));_0x36a3e3['registerAnnotation'](_0x491bb7),_0x2c3693['isResolved']&&this['_reconvertMarkers'](_0x5ce882);}else{if(!_0x2c3693){const _0x500a15=this['getAllMarkersForId'](_0x5ce882);_0x4c4faa['model']['change'](_0xca3faf=>{for(const _0x39f045 of _0x500a15)_0xca3faf['removeMarker'](_0x39f045);});}}}}),_0x2c3693;}['_handleThreadMarker'](_0x18cd7c,_0x42276d){const _0x1bb942=this['_attachMarkerToThread'](_0x18cd7c,_0x42276d);_0x1bb942&&!_0x1bb942['context']&&_0x1bb942['setContext']({'type':'text','value':this['_getTextContext'](_0x42276d)});}['_initAriaMarkerChangeAnnouncements'](){const _0x11f521=this['editor'];rt(_0x11f521['model'],({left:_0x194cff,entered:_0x74afa1})=>{for(const _0x34eed1 of _0x194cff)if(mt(_0x34eed1)){_0x11f521['ui']['ariaLiveAnnouncer']['announce'](N(_0x11f521['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x28f9e9 of _0x74afa1)if(mt(_0x28f9e9)){_0x11f521['ui']['ariaLiveAnnouncer']['announce'](N(_0x11f521['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x355e93)));break;}});}}function dt(_0x1ed3d7,_0x41a147){return _0x41a147?_0x1ed3d7+':'+_0x41a147:_0x1ed3d7;}function ht(_0x1253ba,_0x543b67){const _0x449b59=_0x543b67['schema'],_0x4f1cad=_0x543b67['createRange'](_0x1253ba['start']);for(const _0x2dcde5 of _0x1253ba['getWalker']()){const {type:_0x51b491,item:_0x5c9182,nextPosition:_0x41f447}=_0x2dcde5;if('text'===_0x51b491||_0x449b59['isObject'](_0x5c9182)){const _0x4ea900=_0x543b67['createPositionBefore'](_0x5c9182);_0x4f1cad['isCollapsed']&&(_0x4f1cad['start']=_0x4ea900),_0x4f1cad['end']=_0x41f447;}}return _0x4f1cad;}function mt(_0x425fdc){return'comment'===ft(_0x425fdc['name'])['group'];}class s extends _0x165a5f{['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 _0x43deca=this['editor'],_0x4178ba=_0x43deca['plugins']['get'](o),_0x26cc1a=_0x43deca['plugins']['get'](r),_0x501bc8=_0x43deca['plugins']['get'](y),_0x2cc0f3=_0x43deca['plugins']['get'](b);_0x43deca['ui']['componentFactory']['add']('comment',()=>{const _0x13722d=this['_createUIButton'](_0x47a354);return _0x13722d['tooltip']=!0x0,_0x13722d;}),_0x43deca['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x320df3)),_0x2cc0f3['addSourceCollector'](()=>{const _0x44d005=[];for(const [_0x48391e,_0x845901]of _0x4178ba['_threadToController']){const _0x554e19=_0x26cc1a['getAllMarkersForId'](_0x48391e['id']),_0x3a427c=_0x554e19['map'](_0xa4054d=>_0xa4054d['getRange']());_0x554e19['length']>0x0&&_0x44d005['push']([_0x845901['view'],_0x3a427c]);}return _0x44d005;}),this['listenTo'](_0x501bc8,'change:activeAnnotations',(_0x45c256,_0x1f0a98,_0x33db2b)=>{const _0x27803f=Array['from'](_0x33db2b)['map'](_0x7d3fcd=>_0x7d3fcd['innerView'])['find'](_0x17b742=>_0x4178ba['_viewToController']['has'](_0x17b742));if(!_0x27803f)return void(_0x26cc1a['activeMarker']=null);const _0x2af08b=_0x4178ba['_viewToController']['get'](_0x27803f)['model']['id'],_0x29433a='comment:'+_0x2af08b;_0x2af08b&&_0x26cc1a['hasMarkerForId'](_0x2af08b)?_0x26cc1a['activeMarker']=_0x29433a:_0x26cc1a['activeMarker']&&(_0x26cc1a['activeMarker']=null);}),this['listenTo'](_0x4178ba,'removeCommentThread',(_0x53f75f,{threadId:_0x3cc957,isFromAdapter:_0x4702f8})=>{!_0x4702f8&&_0x43deca['ui']['focusTracker']['isFocused']&&_0x26cc1a['hasMarkerForId'](_0x3cc957)&&_0x43deca['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4178ba,'addComment',(_0x562542,{threadId:_0x166469,isFromAdapter:_0x45eb1a})=>{if(_0x45eb1a||!_0x26cc1a['hasMarkerForId'](_0x166469)||!_0x4178ba['hasCommentThread'](_0x166469))return;0x1===_0x4178ba['getCommentThread'](_0x166469)['length']&&(_0x43deca['editing']['view']['focus'](),_0x562542['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3f4589=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23e5f8;for(const _0x374aaa in _0x3f4589){const _0x80b60f=_0x374aaa,_0x1bbf79=_0x3f4589[_0x80b60f];if('commentsLicenseKeyValid'==_0x1bbf79||'commentsLicenseKeyInvalid'==_0x1bbf79||'commentsLicenseKeyExpired'==_0x1bbf79||'commentsLicenseKeyDomainLimit'==_0x1bbf79||'commentsLicenseKeyNotAllowed'==_0x1bbf79||'commentsLicenseKeyEvaluationLimit'==_0x1bbf79||'commentsLicenseKeyUsageLimit'==_0x1bbf79){delete _0x3f4589[_0x80b60f],_0x23e5f8=_0x1bbf79,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x23e5f8&&_0x3f4589['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x23e5f8&&_0x3f4589['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x23e5f8&&_0x3f4589['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x23e5f8&&_0x3f4589['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x23e5f8&&_0x3f4589['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x23e5f8&&_0x3f4589['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xae8be2){const _0x27dc66=this['editor'],_0x571250=new _0xae8be2(_0x27dc66['locale']),_0x4a598d=_0x27dc66['commands']['get']('addCommentThread');return _0x571250['set']({'label':N(_0x27dc66['locale'],'Comment'),'icon':_0x1b49ba}),_0x571250['bind']('isEnabled')['to'](_0x4a598d,'isEnabled',_0x4a598d,'hasContent',(_0x3406a6,_0x838ca8)=>_0x3406a6&&_0x838ca8),this['listenTo'](_0x571250,'execute',()=>{_0x4a598d['execute']();}),_0x571250;}}class i extends _0x165a5f{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2605f6){super(_0x2605f6),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x399dee,_0x53af3c,_0x1c675d)=>{_0x1c675d?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x29ee31,_0x51a944]of this['editor']['commands'])_0x51a944['affectsData']&&'addCommentThread'!==_0x29ee31&&_0x51a944['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1bbb7b=this['editor']['editing']['view']['document'];this['listenTo'](_0x1bbb7b,'cut',_0x3fa220=>_0x3fa220['stop'](),{'priority':'highest'}),this['listenTo'](_0x1bbb7b,'clipboardInput',_0xef4259=>_0xef4259['stop'](),{'priority':'highest'}),this['listenTo'](_0x1bbb7b,'delete',_0x2111f3=>_0x2111f3['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x582215,_0x26b83a]of this['editor']['commands'])_0x26b83a['affectsData']&&'addCommentThread'!==_0x582215&&_0x26b83a['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['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 _0x152fb7{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d4173){super(_0x3d4173),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4d41ab=this['context']['plugins']['get'](y);this['listenTo'](_0x4d41ab,'_activateAnnotation',(_0x5163bd,_0x118da0)=>{for(const _0x5a76f4 of this['activeUIs']){const _0x3a3ba2=this['_uis']['get'](_0x5a76f4);(0x0,this['uisData']['get'](_0x5a76f4)['filter'])(_0x118da0)&&_0x3a3ba2['setActiveAnnotation'](_0x118da0);}}),this['listenTo'](_0x4d41ab,'_deactivateAllAnnotations',()=>{for(const _0x3339cd of this['activeUIs']){this['_uis']['get'](_0x3339cd)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4d41ab['_visibleAnnotations'],'add',(_0x1a5e33,_0x3841ff)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3841ff);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2c1259){return this['activeUIs']['has'](_0x2c1259);}['activate'](_0x4d208e,_0x2fa776=this['defaultFilter']){const _0x493b88=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4d208e))throw new _0x266f92('annotationsuis-missing-ui',this,{'uiName':_0x4d208e});this['isActive'](_0x4d208e)&&this['deactivate'](_0x4d208e),this['activeUIs']['add'](_0x4d208e);const _0x5b978e=new S();v({'source':_0x493b88['_visibleAnnotations'],'target':_0x5b978e,'filter':_0x2fa776}),this['uisData']['set'](_0x4d208e,{'collection':_0x5b978e,'filter':_0x2fa776});const _0x5f2485=this['_uis']['get'](_0x4d208e);_0x5f2485['attach'](_0x5b978e),this['listenTo'](_0x5f2485,'change:activeAnnotation',(_0x5363fe,_0x3bbdcd,_0x2b5fe5,_0x364878)=>{_0x364878&&_0x493b88['_removeActiveAnnotation'](_0x364878),_0x2b5fe5&&_0x493b88['_addActiveAnnotation'](_0x2b5fe5);});}['deactivate'](_0x120ca2){if(this['activeUIs']['delete'](_0x120ca2),!this['_uis']['has'](_0x120ca2))throw new _0x266f92('annotationsuis-missing-ui',this,{'uiName':_0x120ca2});const _0x7e01d2=this['_uis']['get'](_0x120ca2);_0x7e01d2['detach'](),this['stopListening'](_0x7e01d2),this['uisData']['get'](_0x120ca2)['collection']['destroy'](),this['uisData']['delete'](_0x120ca2);}['switchTo'](_0x245650){if(!this['_uis']['has'](_0x245650))throw new _0x266f92('annotationsuis-missing-ui',this,{'uiName':_0x245650});const _0x2ebdd8=this['context']['plugins']['get'](y),_0x33d54f=Array['from'](_0x2ebdd8['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x245650);const _0x3242df=this['_uis']['get'](_0x245650);_0x3242df['setActiveAnnotation'](_0x33d54f),_0x3242df['_setSelectedAnnotations']&&_0x33d54f&&_0x3242df['_setSelectedAnnotations']([_0x33d54f]);}['deactivateAll'](){for(const _0x42136e of this['activeUIs'])this['deactivate'](_0x42136e);}['register'](_0x143161,_0x30944f){if(this['_uis']['has'](_0x143161))throw new _0x266f92('annotationsuis-register-already-registered');if('function'!=typeof _0x30944f['attach']||'function'!=typeof _0x30944f['detach']||'function'!=typeof _0x30944f['setActiveAnnotation'])throw new _0x266f92('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x143161,_0x30944f);}['refilterAnnotations'](){const _0x34125f=this['context']['plugins']['get'](y)['collection'],_0x15b6fc=new Map(),_0x4e33dc=Array['from'](this['activeUIs']);for(const _0x151fb4 of this['activeUIs']){const _0x13dbd4=this['uisData']['get'](_0x151fb4)['collection'];for(const _0xf67328 of _0x13dbd4)_0x15b6fc['set'](_0xf67328,_0x151fb4);}for(const _0x26bb57 of _0x34125f){const _0x8ed9d0=_0x15b6fc['get'](_0x26bb57);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x26bb57);const _0x45b312=_0x4e33dc['find'](_0x47317e=>this['uisData']['get'](_0x47317e)['filter'](_0x26bb57));_0x8ed9d0!==_0x45b312&&(_0x8ed9d0&&this['uisData']['get'](_0x8ed9d0)['collection']['remove'](_0x26bb57),_0x45b312&&this['uisData']['get'](_0x45b312)['collection']['add'](_0x26bb57));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x568dff){const _0x3ae80d=[];for(const _0xbaf593 of this['activeUIs']){(0x0,this['uisData']['get'](_0xbaf593)['filter'])(_0x568dff)&&_0x3ae80d['push'](_0xbaf593);}if(_0x3ae80d['length']>0x1)throw new _0x266f92('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3ae80d,'annotationType':_0x568dff['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x17a9e3){super(_0x17a9e3);const _0x4693ad=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 _0x5f5319(),this['focusCycler']=new _0x140f1f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4693ad['to']('class')],'style':{'minHeight':_0x4693ad['to']('minHeight',_0x29c5e4=>'number'==typeof _0x29c5e4?_i(_0x29c5e4+0xa):null)},'dir':_0x17a9e3['uiLanguageDirection'],'role':'application','aria-label':N(_0x17a9e3,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x17a9e3,'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',_0x3a840f=>{this['_updateItemPositionInFocusables'](_0x3a840f['source']);}),this['list']['forEach'](_0x20b79c=>{this['focusTracker']['add'](_0x20b79c['element']),this['_updateItemPositionInFocusables'](_0x20b79c);}),this['list']['on']('change',(_0x512d56,_0x4a0d8c)=>{for(const _0x561889 of _0x4a0d8c['removed'])this['focusTracker']['remove'](_0x561889['element']),this['focusables']['remove'](_0x561889);for(const _0xded53c of _0x4a0d8c['added'])this['focusTracker']['add'](_0xded53c['element']),this['_updateItemPositionInFocusables'](_0xded53c);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x3ad96a){const _0x2c3ef7=this['focusables']['getIndex'](_0x3ad96a);let _0x113903,_0x25af27;for(const _0x10c589 of this['focusables'])if(_0x3ad96a['top']<_0x10c589['top']){_0x113903=_0x10c589;break;}if(_0x25af27=_0x113903?this['focusables']['getIndex'](_0x113903):this['focusables']['length'],-0x1!==_0x2c3ef7){if(_0x2c3ef7===_0x25af27-0x1)return;this['focusables']['remove'](_0x3ad96a),_0x25af27=_0x113903?this['focusables']['getIndex'](_0x113903):this['focusables']['length'];}this['focusables']['add'](_0x3ad96a,_0x25af27);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4ff66a){super(_0x4ff66a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5d2e75,_0x175694)=>_0x5d2e75+_0x175694),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1c94bb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1c94bb['to']('isAnimationDisabled',_0x53f06b=>_0x53f06b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1c94bb['to']('top',_0x538c72=>Ot(_0x538c72))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5c21da=this['element']['clientHeight'];_0x5c21da&&(this['height']=_0x5c21da);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x152fb7{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f9e48){super(_0x3f9e48),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 _0x1f4e94=this['context']['config']['get']('sidebar.container');_0x1f4e94&&this['setContainer'](_0x1f4e94);}['setContainer'](_0x371bfe){if(!g(_0x371bfe))throw new _0x266f92('sidebar-setcontainer-invalid-element');this['container']=_0x371bfe;}['_attachToContainer']({viewClass:_0x2defaa='',spaceBetweenItems:_0x10b2c8=0x19}={}){if(!g(this['container']))throw new _0x266f92('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2defaa,this['_spaceBetweenItems']=_0x10b2c8;}['rearrange']({removedAnnotation:_0x53e5f9,previousAnnotation:_0x3eb88e,nextAnnotation:_0x1fcb0e}){const _0x253955=this['getSidebarItemView'](_0x53e5f9);this['view']['list']['remove'](_0x253955),this['_destroySidebarItemView'](_0x53e5f9),_0x3eb88e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3eb88e)),_0x1fcb0e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1fcb0e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3632b4,activatedAnnotation:_0x55bc34,disableAnimationOnActivatedAnnotation:_0x1fbb8a}){if(this['_activeAnnotation']=_0x55bc34,_0x3632b4){_0x3632b4['isActive']=!0x1;const _0x56c1ce=this['getSidebarItemView'](_0x3632b4);_0x56c1ce&&_0x1fbb8a&&(_0x56c1ce['isAnimationDisabled']=!0x1);}if(_0x55bc34){const _0xbcff16=this['getSidebarItemView'](_0x55bc34);_0xbcff16&&(_0x55bc34['isActive']=!0x0,_0x1fbb8a&&(_0xbcff16['isAnimationDisabled']=!0x0,_0xbcff16['top']+=0x1),this['_alignToTargetRect'](_0xbcff16));}}['_detachFromContainer'](_0x2eb341){if(this['view']['element']['remove'](),_0x2eb341){for(const _0x492411 of _0x2eb341)this['_destroySidebarItemView'](_0x492411);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x45d106,_0x11158d){_0x11158d||(_0x11158d=_0x45d106['view']);const _0x209e47=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x209e47,_0x45d106),this['_annotationToSidebarItemView']['set'](_0x45d106,_0x209e47),_0x209e47['content']['add'](_0x11158d),this['listenTo'](_0x45d106['view'],'change:targetRect',(_0x387bc5,_0x1af19f,_0x212d6e)=>{const _0x3845c0=this['_getTargetTop'](_0x45d106,_0x212d6e);_0x209e47['_targetTop']!=_0x3845c0&&(_0x209e47['_targetTop']=_0x3845c0,this['_setItemTop'](_0x209e47,_0x3845c0));}),this['listenTo'](_0x209e47,'change:top',()=>{this['_recalculate'](_0x209e47,'top');}),this['listenTo'](_0x209e47,'change:bottom',()=>{this['_recalculate'](_0x209e47,'bottom');}),this['_alignToTargetRect'](_0x209e47);const _0x43bda1=this['_getItemBefore'](_0x209e47);if(_0x43bda1)this['_alignAfterItem'](_0x43bda1,_0x209e47)||this['_alignToTargetRect'](_0x209e47);else this['_alignToTargetRect'](_0x209e47);return this['_updateLastItem'](),this['view']['list']['add'](_0x209e47),_0x209e47;}['_alignForTopChange'](_0x29a34b){if(!_0x29a34b['content']['length'])return;const _0x4bcfd9=this['_getItemBefore'](_0x29a34b);if(!_0x4bcfd9)return;const _0x475004=this['_sidebarItemViewToAnnotation']['get'](_0x4bcfd9),_0x51bd29=this['_activeAnnotation'];_0x51bd29&&_0x51bd29===_0x475004?this['_alignAfterItem'](_0x4bcfd9,_0x29a34b):this['_alignBeforeItem'](_0x29a34b,_0x4bcfd9);}['_alignForBottomChange'](_0x38eb5c){if(!_0x38eb5c['content']['length'])return;const _0x40018e=this['_getItemAfter'](_0x38eb5c);if(!_0x40018e)return;const _0x428ab3=this['_sidebarItemViewToAnnotation']['get'](_0x40018e),_0x1c2963=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x58d81f=this['_activeAnnotation'];_0x58d81f&&_0x58d81f===_0x428ab3&&_0x1c2963?(this['_alignBeforeItem'](_0x40018e,_0x38eb5c),this['_alignAfterItem'](_0x38eb5c,_0x40018e)):_0x58d81f&&_0x58d81f===_0x428ab3?this['_alignBeforeItem'](_0x40018e,_0x38eb5c):this['_alignAfterItem'](_0x38eb5c,_0x40018e);}['_recalculate'](_0x3a7f9f,_0x4a7728){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3923a4,changedProp:_0x5b7c2e}of this['_recalculateBuffer'])'top'===_0x5b7c2e?this['_alignForTopChange'](_0x3923a4):this['_alignForBottomChange'](_0x3923a4);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3a7f9f,'changedProp':_0x4a7728});}['getSidebarItemView'](_0x4ec154){return this['_annotationToSidebarItemView']['get'](_0x4ec154);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x41c80b){const _0x4ee44a=this['getSidebarItemView'](_0x41c80b);this['stopListening'](_0x4ee44a),this['stopListening'](_0x41c80b['view']),_0x4ee44a['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x41c80b),this['_sidebarItemViewToAnnotation']['delete'](_0x4ee44a);}['_createSidebarView'](){const _0x142143=new H(this['context']['locale']);return _0x142143['render'](),this['on']('change:_lastItem',(_0x343f17,_0x125429,_0x2ac625,_0x43e426)=>{_0x43e426&&_0x142143['unbind']('minHeight'),_0x2ac625?_0x142143['bind']('minHeight')['to'](_0x2ac625,'bottom'):_0x142143['minHeight']=null;}),_0x142143;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x477db4){const _0xd7c305=this['_sidebarItemViewToAnnotation']['get'](_0x477db4),_0x106364=_0xd7c305&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xd7c305)-0x1);return _0x106364&&this['getSidebarItemView'](_0x106364)||null;}['_getItemAfter'](_0x2072d2){const _0x2c8871=this['_sidebarItemViewToAnnotation']['get'](_0x2072d2),_0x221839=_0x2c8871&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2c8871)+0x1);return _0x221839&&this['getSidebarItemView'](_0x221839)||null;}['_alignBeforeItem'](_0x329c8c,_0x4b1d31){_0x329c8c['updateHeight']();const _0x40bed9=G(_0x4b1d31['bottom']+this['_spaceBetweenItems'],_0x329c8c['top']);return!!_0x40bed9&&(this['_setItemTop'](_0x4b1d31,_0x4b1d31['top']-_0x40bed9),!0x0);}['_alignAfterItem'](_0x73af74,_0x3cdae9){_0x73af74['updateHeight']();const _0xccff07=G(_0x73af74['bottom']+this['_spaceBetweenItems'],_0x3cdae9['top']);return!!_0xccff07&&(this['_setItemTop'](_0x3cdae9,_0x3cdae9['top']+_0xccff07,!0x1),!0x0);}['_alignToTargetRect'](_0x576a1b){const _0x48e529=this['_sidebarItemViewToAnnotation']['get'](_0x576a1b);if(!_0x48e529||!_0x48e529['target']||!_0x48e529['targetRect'])return;const _0x1183bb=this['_getTargetTop'](_0x48e529,_0x48e529['targetRect']);this['_setItemTop'](_0x576a1b,_0x1183bb);}['_getTargetTop'](_0x44a53d,_0x503c52){if(null===_0x503c52)return 0x0;if(_0x44a53d['target']instanceof _0x3f14b6)return _0x503c52['top'];{const _0x5633f4=new _0x3f14b6(this['view']['element'])['top'];return _0x503c52['top']-_0x5633f4;}}['_setItemTop'](_0x3416e1,_0x27a754,_0x2dfb0e=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2dfb0e&&(_0x27a754=Math['max'](_0x27a754,this['_getMaxAvailableTop'](_0x3416e1))),_0x3416e1['top']=_0x27a754;}['_getMaxAvailableTop'](_0x30409a){let _0x17baa9=this['_getItemBefore'](_0x30409a),_0x37fdbd=0x0;for(;_0x17baa9;)_0x17baa9['updateHeight'](),_0x37fdbd+=this['_spaceBetweenItems']+_0x17baa9['height'],_0x17baa9=this['_getItemBefore'](_0x17baa9);return _0x37fdbd;}}function G(_0x27fb07,_0x1800ec){return Math['max'](_0x27fb07-_0x1800ec,0x0);}function g(_0x53c9ee){return null!==_0x53c9ee&&'object'==typeof _0x53c9ee&&0x1===_0x53c9ee['nodeType'];}class e extends _0x152fb7{['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(_0x1708ed){super(_0x1708ed),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x139e96(),this['_refreshPositioningDebounced']=_0x3b904d(()=>{_0x1708ed['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x34e961=this['context']['plugins']['get'](j),_0x128866=this['context']['plugins']['get'](z);_0x34e961['register']('wideSidebar',this),_0x128866['container']&&_0x34e961['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1f5a9e){if(_0x1f5a9e===this['activeAnnotation'])return;const _0xc97a08=this['context']['plugins']['get'](z);_0xc97a08['_activeAnnotation']=_0x1f5a9e;const _0xfc210d=this['activeAnnotation'];_0xc97a08['refresh']({'blurredAnnotation':_0xfc210d,'activatedAnnotation':_0x1f5a9e}),this['activeAnnotation']=_0x1f5a9e;}['attach'](_0x4d3532){this['annotations']=_0x4d3532;const _0x11ea36=this['context']['plugins']['get'](z);if(_0x11ea36['_annotations']=_0x4d3532,this['isAttached'])throw new _0x266f92('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x11ea36,'set:container',()=>{this['detach'](),this['listenTo'](_0x11ea36,'change:container',_0x34ec17=>{_0x34ec17['off'](),this['attach'](_0x4d3532);});}),_0x11ea36['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x21b425=_0x13cb16=>{_0x13cb16['updateTargetRect'](),_0x11ea36['addAnnotation'](_0x13cb16);};for(const _0x2ccd0a of _0x4d3532)_0x21b425(_0x2ccd0a);this['listenTo'](_0x4d3532,'add',(_0x1204c8,_0x480482)=>{_0x21b425(_0x480482);}),this['listenTo'](_0x4d3532,'remove',(_0x535e7f,_0x47a3b1,_0x45167e)=>{_0x11ea36['rearrange']({'removedAnnotation':_0x47a3b1,'previousAnnotation':_0x4d3532['get'](_0x45167e-0x1),'nextAnnotation':_0x4d3532['get'](_0x45167e+0x1)}),_0x47a3b1===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4d3532,'focus',(_0x277f3c,_0x3d4134)=>{this['setActiveAnnotation'](_0x3d4134);}),this['listenTo'](_0x4d3532,'blur',()=>{this['setActiveAnnotation'](null);});const _0x75d15c=this['context']instanceof _0x4eea4a?this['context']['editors']:new _0x139e96([this['context']]);for(const _0x3cfec4 of _0x75d15c)this['_integrateWithEditorAnnotations'](_0x3cfec4);this['listenTo'](_0x75d15c,'add',(_0x3fc75d,_0x4856b3)=>{this['listenTo'](_0x4856b3,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4856b3);});}),this['listenTo'](_0x75d15c,'remove',(_0x483845,_0x4fa230)=>{_0x4fa230['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4fa230['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x266f92('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1094e1=this['context']['plugins']['get'](z);_0x1094e1['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1094e1),this['stopListening'](this['annotations']),this['context']instanceof _0x4eea4a&&this['stopListening'](this['context']['editors']);for(const _0x446de1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x446de1);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1e6f6b){if(!_0x1e6f6b['plugins']['has']('EditorAnnotations'))return;const _0x2fdfae=_0x1e6f6b['plugins']['get']('EditorAnnotations'),_0x1e3388=()=>{const _0x4fab5c=_0x2fdfae['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4fab5c[0x0]||null);};this['listenTo'](_0x2fdfae,'refresh',_0x1e3388),this['listenTo'](_0x2fdfae,'blur',(_0x2f97f9,{isAnnotationTracked:_0x4a74b6})=>{this['activeAnnotation']&&_0x4a74b6(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2fdfae,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x49a168=>{_0x2fdfae['hasDomSelection']()&&(_0x1e3388(),_0x49a168['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2fdfae);}['_destroyEditorAnnotationsIntegration'](_0x5235c2){this['stopListening'](_0x5235c2),this['_editorAnnotations']['remove'](_0x5235c2);}}class C extends _0x47a354{['counterView'];constructor(_0xb8ace9){super(_0xb8ace9);const _0x4ded26=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5cbfbc,_0xebab28)=>_0x5cbfbc?'...':_0xebab28['toString']()),this['set']('annotationType',''),this['icon']=_0x1b49ba,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4ded26['to']('annotationType',_0x91c3fc=>'ck-annotation-counter__badge--'+_0x91c3fc),_0x4ded26['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4ded26['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x152fb7{['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(_0x326f93){super(_0x326f93),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2bb24d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x139e96(),this['_refreshPositioningDebounced']=_0x3b904d(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x530e58(this['context']['locale']),this['balloonPanelView']=new _0x4534d9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x43127f){this['annotations']=_0x43127f;const _0x34ae74=this['context']['plugins']['get'](z),_0x16b0fe=this['balloonPanelView'];if(_0x34ae74['_annotations']=_0x43127f,this['isAttached'])throw new _0x266f92('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x34ae74,'set:container',()=>{this['detach'](),this['listenTo'](_0x34ae74,'change:container',_0x5ed163=>{_0x5ed163['off'](),this['attach'](_0x43127f);});}),_0x34ae74['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2ba996=_0x5545cb=>{const _0x1b639d=new C(this['context']['locale']);_0x34ae74['addAnnotation'](_0x5545cb,_0x1b639d),this['_annotationToNarrowView']['set'](_0x5545cb,_0x1b639d),_0x1b639d['bind']('isDirty','annotationType','number')['to'](_0x5545cb['view'],'isDirty','type','length'),_0x1b639d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x16b0fe['content']['first']!==_0x5545cb['view']?(this['_showBalloon'](_0x5545cb),_0x5545cb['view']['element']['focus'](),this['setActiveAnnotation'](_0x5545cb)):this['setActiveAnnotation'](null);});};for(const _0x49b229 of _0x43127f)_0x2ba996(_0x49b229);this['listenTo'](_0x43127f,'add',(_0x2269ee,_0x5c881b)=>{_0x2ba996(_0x5c881b);}),this['listenTo'](_0x43127f,'remove',(_0x2a9c6f,_0x1f1e1d,_0x40c2fe)=>{this['_annotationToNarrowView']['get'](_0x1f1e1d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1f1e1d),_0x34ae74['rearrange']({'removedAnnotation':_0x1f1e1d,'previousAnnotation':_0x43127f['get'](_0x40c2fe-0x1),'nextAnnotation':_0x43127f['get'](_0x40c2fe+0x1)}),_0x1f1e1d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x43127f,'focus',(_0x4f370f,_0x199380)=>{this['setActiveAnnotation'](_0x199380);}),this['listenTo'](_0x43127f,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xef12b6,_0x2990b1)=>{_0x2990b1['keyCode']===_0x63f92['esc']&&_0x16b0fe['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x16b0fe['content']['first']),this['_hideBalloon'](),_0x2990b1['stopPropagation'](),_0x2990b1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3119fe,_0x1771bb)=>{const _0x2c89f3=_0x1771bb['target'];_0x16b0fe['isVisible']&&_0x16b0fe['element']['contains'](_0x2c89f3)||_0x34ae74['view']['element']['contains'](_0x2c89f3)||_0x3119fe['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x110c04=>_0x110c04['contains'](_0x2c89f3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x15b295=this['context']instanceof _0x4eea4a?this['context']['editors']:new _0x139e96([this['context']]);for(const _0x50495d of _0x15b295)this['_integrateWithEditorAnnotations'](_0x50495d);this['listenTo'](_0x15b295,'add',(_0x2a978d,_0x29fb4f)=>{this['listenTo'](_0x29fb4f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x29fb4f);});}),this['listenTo'](_0x15b295,'remove',(_0x3dff87,_0x1881c2)=>{_0x1881c2['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1881c2['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2f4073){if(_0x2f4073===this['activeAnnotation'])return;const _0x568480=this['context']['plugins']['get'](z);if(_0x568480['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2f4073,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2f4073)_0x568480['getSidebarItemView'](_0x2f4073)?this['_showBalloon'](_0x2f4073):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2f4073;}['detach'](){if(!this['isAttached'])throw new _0x266f92('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x402249=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4b30fd=>_0x4b30fd['destroy']()),this['_annotationToNarrowView']['clear'](),_0x402249['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4eea4a&&this['stopListening'](this['context']['editors']);for(const _0x35163b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x35163b);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'](_0x3eecc3){if(!_0x3eecc3['plugins']['has']('EditorAnnotations'))return;const _0x2361d8=_0x3eecc3['plugins']['get']('EditorAnnotations'),_0x48f32e=this['context']['plugins']['get'](z),_0x19dd01=this['annotations'],_0x39daa8=this['balloonPanelView'],_0x3a8337=()=>{const _0x41cdf0=_0x2361d8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x41cdf0),this['setActiveAnnotation'](_0x41cdf0[0x0]||null);};this['listenTo'](_0x2361d8,'refresh',_0x3a8337),this['listenTo'](_0x2361d8,'blur',(_0x13b557,{isAnnotationTracked:_0x56feb6})=>{this['activeAnnotation']&&_0x56feb6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2361d8,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x19dd01,'blur',_0x269a25=>{_0x2361d8['hasDomSelection']()&&_0x269a25['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x509542,_0xcf9a16)=>{const _0x8dd852=_0xcf9a16['target'];_0x39daa8['isVisible']&&_0x39daa8['element']['contains'](_0x8dd852)||_0x48f32e['view']['element']['contains'](_0x8dd852)||this['activeAnnotation']&&_0x2361d8['hasDomSelection']()&&(_0x3a8337(),_0x509542['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2361d8);}['_destroyEditorAnnotationsIntegration'](_0x384c9d){_0x384c9d&&(this['stopListening'](_0x384c9d),this['_editorAnnotations']['remove'](_0x384c9d));}['_setSelectedAnnotations'](_0x33d229){for(const _0x1210be of this['_selectedAnnotations'])_0x33d229['includes'](_0x1210be)||this['_manuallyClosedAnnotationViews']['delete'](_0x1210be['view']);this['_selectedAnnotations']=_0x33d229;}['_refreshPositioning'](){const _0x291afa=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x291afa['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x484575){if(this['_manuallyClosedAnnotationViews']['has'](_0x484575['view']))return;const _0x5c174=this['balloonPanelView']['content']['first'];_0x5c174!==_0x484575['view']?(_0x5c174&&this['_detachListeners'](_0x5c174),this['_attachListeners'](_0x484575['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x484575['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x397c90=this['balloonPanelView']['content']['first'],_0x1ed207=_0x397c90&&this['annotations']['getByView'](_0x397c90);if(!_0x1ed207||!this['_annotationToNarrowView']['has'](_0x1ed207))return;const _0x2acb29=this['_annotationToNarrowView']['get'](_0x1ed207)['element'],_0x5f34cd=(function(){const _0x259491=_0x4534d9['defaultPositions'];return[_0x259491['southArrowNorthEast'],_0x259491['northArrowSouthEast'],_0x259491['southArrowNorth'],_0x259491['northArrowSouth'],_0x259491['southArrowNorthWest'],_0x259491['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2acb29,'positions':_0x5f34cd});}['_hideBalloon'](){const _0x3360eb=this['balloonPanelView'],_0x311070=_0x3360eb['content']['first'];_0x311070&&(this['_detachListeners'](_0x311070),_0x3360eb['unpin'](),_0x3360eb['content']['clear']());}['_attachListeners'](_0x30b2d5){this['listenTo'](_0x30b2d5,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x30b2d5,'Esc',(_0x1f92da,_0x4c50b8)=>{this['_manuallyClosedAnnotationViews']['add'](_0x30b2d5),this['_hideBalloon'](),_0x4c50b8();});}['_detachListeners'](_0x5d56ba){this['stopListening'](_0x5d56ba);}}class c extends _0x165a5f{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x15b3ff,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1585d9){super(_0x1585d9),_0x1585d9['editing']['view']['addObserver'](_0x1cac50),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1585d9['plugins']['get'](_0x15b3ff),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5edefe=this['editor']['plugins']['get'](j);_0x5edefe['context']===this['editor']&&(_0x5edefe['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x400e15,_0x4aad76)=>{const _0xe88c78=this['_balloon'];if(this['isAttached']&&_0xe88c78['visibleView']){const _0x325791=this['annotations']['getByView'](_0xe88c78['visibleView']);_0x325791&&this['_closeAnnotation'](_0x325791),_0x4aad76();}}));}['afterInit'](){const _0x2d74c8=this['editor']['plugins']['get'](j);_0x2d74c8['context']===this['editor']&&(_0x2d74c8['hasActive']()||_0x2d74c8['switchTo']('inline'));}['setActiveAnnotation'](_0x38ba14){_0x38ba14!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x38ba14&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x38ba14)&&this['_addAnnotationToBalloon'](_0x38ba14,!0x0),_0x38ba14['isActive']=!0x0),_0x38ba14||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x38ba14);}['attach'](_0x2bc726){this['annotations']=_0x2bc726;const _0x40e6d5=this['editor']['plugins']['get'](j),_0x173247=this['_balloon'];if(this['isAttached'])throw new _0x266f92('inlineannotations-attach-already-attached',this);if(_0x40e6d5['context']!==this['editor'])throw new _0x266f92('inlineannotations-not-allowed-with-context',this);const _0x12891c=this['editor']['plugins']['get'](b);this['listenTo'](_0x12891c,'refresh',()=>{const _0x2bd135=_0x12891c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1fe0ec,_0x315f82;!this['_forceRefresh']&&(_0x1fe0ec=_0x2bd135,_0x315f82=this['_selectedAnnotations'],_0x1fe0ec['length']===_0x315f82['length']&&_0x1fe0ec['every'](_0x41e78b=>_0x315f82['includes'](_0x41e78b)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2bd135),this['setActiveAnnotation'](_0x2bd135[0x0]||null));}),this['listenTo'](_0x12891c,'blur',(_0x1107d8,{isAnnotationTracked:_0x449984})=>{this['activeAnnotation']&&_0x449984(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x48c8a7,_0x511009,_0x23afe8)=>{_0x23afe8||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2bc726,'remove',(_0x3cd5b0,_0x11036d)=>{this['_removeAnnotationFromBalloon'](_0x11036d),_0x11036d===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x173247,'change:visibleView',(_0x3fbd28,_0x20e337,_0x45121e,_0x456854)=>{_0x456854&&this['stopListening'](_0x456854);const _0x1ec205=_0x2bc726['getByView'](_0x45121e);_0x45121e&&_0x1ec205&&(this['listenTo'](_0x45121e,'change:height',()=>{_0x173247['updatePosition']();}),this['listenTo'](_0x45121e,'Esc',()=>{this['_closeAnnotation'](_0x1ec205),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1ec205&&this['setActiveAnnotation'](_0x1ec205));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x173247['visibleView']&&(_0x2bc726['getByView'](_0x173247['visibleView'])&&_0x173247['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 _0x266f92('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xd5d70e of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xd5d70e);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x5afc71){for(const _0x45196e of this['_selectedAnnotations'])_0x5afc71['includes'](_0x45196e)||this['_manuallyClosed']['delete'](_0x45196e);for(const _0x59501d of this['annotations'])_0x5afc71['includes'](_0x59501d)||this['_removeAnnotationFromBalloon'](_0x59501d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x322323 of _0x5afc71)this['_addAnnotationToBalloon'](_0x322323);}this['_selectedAnnotations']=_0x5afc71;}['_addAnnotationToBalloon'](_0x26c70f,_0x54c86d=!0x1){this['_manuallyClosed']['has'](_0x26c70f)||(this['_addedAnnotations']['has'](_0x26c70f)||this['_balloon']['hasView'](_0x26c70f['view'])||(this['_addedAnnotations']['add'](_0x26c70f),this['_balloon']['add']({'stackId':_0x26c70f['view']['id'],'view':_0x26c70f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x26c70f)}})),_0x54c86d&&this['_balloon']['showStack'](_0x26c70f['view']['id']));}['_getBalloonTargetForAnnotation'](_0xa1de){const _0x350c4f=_0xa1de['target'],_0x286144=this['editor']['editing']['view'],_0x438078=_0x286144['document']['selection']['getFirstRange'](),_0x3d8a2d=_0x286144['domConverter']['viewRangeToDom'](_0x438078);if(_0x3d8a2d['collapse'](!0x0),_0x350c4f){if(_0x350c4f instanceof _0x3f14b6)return _0x350c4f;let _0x482857=[];for(const _0x1ef7b5 of _0x350c4f)_0x482857['push'](...F(_0x1ef7b5['getClientRects']()));_0x482857=function(_0x1b5b81){const _0x1dd50e=[];let _0x42633d=_0x1b5b81[0x0];for(let _0x3023af=0x1;_0x3023af<_0x1b5b81['length'];_0x3023af++)P(_0x42633d,_0x1b5b81[_0x3023af])?_0x42633d['width']+=_0x1b5b81[_0x3023af]['width']:(_0x1dd50e['push'](_0x42633d),_0x42633d=_0x1b5b81[_0x3023af]);return _0x1dd50e['push'](_0x42633d),_0x1dd50e;}(_0x482857);const _0x5cb912=_0x3d8a2d['getBoundingClientRect']();return _0x482857['find'](_0x48dcc3=>_0x48dcc3['top']<=_0x5cb912['top']&&_0x48dcc3['bottom']>=_0x5cb912['bottom']&&_0x48dcc3['left']<=_0x5cb912['left']&&_0x48dcc3['right']>=_0x5cb912['right'])||_0x482857[0x0];}return _0xa1de['targetRect']||_0x3d8a2d;}['_removeAnnotationFromBalloon'](_0x229d38){this['_addedAnnotations']['has'](_0x229d38)&&this['_balloon']['hasView'](_0x229d38['view'])&&(this['_addedAnnotations']['delete'](_0x229d38),this['_balloon']['remove'](_0x229d38['view']));}['_closeAnnotation'](_0x1958bf){this['_manuallyClosed']['add'](_0x1958bf),this['_removeAnnotationFromBalloon'](_0x1958bf);}}function F(_0x55472e){return Array['from'](_0x55472e)['map'](DOMRect['fromRect']);}function P(_0x2d7a5d,_0x1df71c){return _0x2d7a5d['top']===_0x1df71c['top']&&_0x2d7a5d['bottom']===_0x1df71c['bottom']&&_0x2d7a5d['right']===_0x1df71c['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x18a561,_0x52c6db){super(_0x18a561),this['set']('isEmpty',!_0x52c6db['length']),this['focusTracker']=new _0x5f5319(),this['_annotationViews']=_0x52c6db,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x140f1f({'focusables':_0x52c6db,'focusTracker':this['focusTracker']}),this['listenTo'](_0x52c6db,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x52c6db,'remove',(_0x1e9a5e,_0x454156)=>{_0x454156['isActive']&&this['focus'](),_0x52c6db['length']||(this['isEmpty']=!0x0);});const _0x310a6c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x18a561,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x52c6db},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x310a6c['if']('isEmpty','ck-hidden',_0x48152c=>!_0x48152c)]},'children':[{'text':N(_0x18a561,'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 _0x4801c4 of this['_annotationViews'])this['focusTracker']['add'](_0x4801c4['element']);this['_annotationViews']['on']('change',(_0x173443,{added:_0x5a5d1a,removed:_0x3e5a28})=>{for(const _0x502019 of _0x5a5d1a)this['focusTracker']['add'](_0x502019['element']);for(const _0xa52059 of _0x3e5a28)this['focusTracker']['remove'](_0xa52059['element']);});}}class p extends _0x152fb7{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x282968){super(_0x282968),this['archivedThreads']=new _0x139e96();}['init'](){const _0x734b8e=this['context'],_0xefeb7d=_0x734b8e['plugins']['get'](o),_0x2c0f75=_0x734b8e['plugins']['get'](y);this['listenTo'](_0xefeb7d,'addCommentThread',(_0x3c4991,{threadId:_0x6c3112})=>{const _0x264975=_0xefeb7d['getCommentThread'](_0x6c3112);_0x264975['archivedAt']&&this['archivedThreads']['add'](_0x264975,this['_calculatePosition'](_0x264975['archivedAt'])),this['listenTo'](_0x264975,'change:archivedAt',(_0x2523e1,_0x418d48,_0x278cdb)=>{_0x278cdb?this['archivedThreads']['has'](_0x264975)||this['archivedThreads']['add'](_0x264975,this['_calculatePosition'](_0x264975['archivedAt'])):this['archivedThreads']['has'](_0x264975)&&this['archivedThreads']['remove'](_0x264975);});}),this['listenTo'](_0xefeb7d,'removeCommentThread',(_0x52fc35,{threadId:_0xc17bad})=>{const _0x48f85b=_0xefeb7d['getCommentThread'](_0xc17bad);this['stopListening'](_0x48f85b),this['archivedThreads']['has'](_0x48f85b)&&this['archivedThreads']['remove'](_0x48f85b);},{'priority':'highest'}),this['listenTo'](_0x2c0f75['collection'],'focus',(_0xdb94d6,_0x2db1d5)=>{_0x2db1d5['isVisible']||(_0x2db1d5['isActive']=!0x0,_0x2c0f75['activate'](_0x2db1d5));});}['_calculatePosition'](_0x449ebc){const _0x2ed4ba=[...this['archivedThreads']]['findIndex'](_0x321d17=>_0x321d17['archivedAt']<_0x449ebc);return _0x2ed4ba>-0x1?_0x2ed4ba:this['archivedThreads']['length'];}}class a extends _0x165a5f{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x20864c];}constructor(_0x119b35){super(_0x119b35),this['annotationViews']=new _0x577399(),this['_pendingThreads']=[];}['init'](){const _0xa30389=this['editor'],_0x1746e4=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xa30389['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x47a354,!0x0)),_0xa30389['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x34100c=this['_createCommentsArchiveButton'](_0x320df3);return _0x34100c['set']({'role':'menuitemcheckbox'}),_0x34100c;});const _0x38bab9=_0xa30389['plugins']['get'](p),_0x16c1cb=_0xa30389['plugins']['get']('Annotations'),_0xc0c8a3=_0xa30389['plugins']['get']('CommentsRepository');_0x38bab9['archivedThreads']['forEach'](_0x81437a=>{this['_handleNewThread'](_0x81437a);}),this['listenTo'](_0x38bab9['archivedThreads'],'add',(_0x331d43,_0x5db006)=>{this['_handleNewThread'](_0x5db006);}),this['listenTo'](_0x16c1cb['collection'],'add',(_0x23c7f0,_0x3a96cc)=>{const _0xc9d807=this['_pendingThreads']['find'](_0x1b4c9d=>{const _0x1ff848=_0xc0c8a3['_threadToController']['get'](_0x1b4c9d);return _0x1ff848&&_0x3a96cc['innerView']===_0x1ff848['view'];});if(_0xc9d807){const _0x324808=this['_calculatePosition'](_0xc9d807['archivedAt']);this['_addAnnotationToArchive'](_0x3a96cc,_0x324808),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xc9d807),0x1);}}),this['listenTo'](_0x38bab9['archivedThreads'],'remove',(_0x35c7f9,_0x4486ec)=>{const _0x3af432=_0xa30389['config']['get']('collaboration.channelId');if(!_0x3af432||_0x4486ec['channelId']===_0x3af432){if(this['_pendingThreads']['includes'](_0x4486ec))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4486ec),0x1);else{const _0x22b33b=_0xc0c8a3['_threadToController']['get'](_0x4486ec),_0x6862cb=_0x16c1cb['getByInnerView'](_0x22b33b['view']);this['annotationViews']['remove'](_0x6862cb['view']),this['stopListening'](_0x6862cb),this['stopListening'](_0x6862cb['focusableElements']);}}}),this['listenTo'](_0x16c1cb['collection'],'add',(_0x3e21d5,_0x303c63)=>{this['listenTo'](_0x303c63,'escape',_0x1746e4);}),this['listenTo'](_0x16c1cb['collection'],'remove',(_0x2b86f0,_0x16097b)=>{this['stopListening'](_0x16097b,'escape',_0x1746e4);});}['_addAnnotationToArchive'](_0x49392e,_0x57946a){this['listenTo'](_0x49392e,'set:isVisible',_0x571a07=>{_0x571a07['return']=!0x1,_0x571a07['stop']();}),this['annotationViews']['add'](_0x49392e['view'],_0x57946a);}['_handleNewThread'](_0x369f7a){const _0x387417=this['editor']['plugins']['get']('CommentsRepository'),_0x357724=this['editor']['plugins']['get']('Annotations'),_0x5465be=this['editor']['config']['get']('collaboration.channelId');if(!_0x5465be||_0x369f7a['channelId']===_0x5465be){const _0x4cc054=_0x387417['_threadToController']['get'](_0x369f7a);if(!_0x4cc054)return void this['_pendingThreads']['push'](_0x369f7a);const _0x4b2bf5=this['_calculatePosition'](_0x369f7a['archivedAt']),_0x10abc=_0x357724['getByInnerView'](_0x4cc054['view']);_0x10abc['isVisible']&&_0x357724['_visibleAnnotations']['remove'](_0x10abc),this['_addAnnotationToArchive'](_0x10abc,_0x4b2bf5);}}['_calculatePosition'](_0x168796){const _0xcbf0bf=this['editor']['config']['get']('collaboration.channelId'),_0x132722=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x26e0e2=>_0x26e0e2['channelId']===_0xcbf0bf)['findIndex'](_0x5beb65=>_0x5beb65['archivedAt']<_0x168796);return _0x132722<0x0||_0x132722>this['annotationViews']['length']?this['annotationViews']['length']:_0x132722-0x1;}['_toggleDialog'](){const _0x551687=this['editor'],_0x250c2b=_0x551687['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x551687['locale'],this['annotationViews'])),'commentsArchive'===_0x250c2b['id']?_0x250c2b['hide']():_0x250c2b['show']({'id':'commentsArchive','title':N(_0x551687['locale'],'COMMENTS_ARCHIVE'),'icon':_0x54b5f6,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x22636['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2355d6,_0x23b4a8=!0x1){const _0x3a0df2=this['editor']['locale'],_0x568991=this['editor']['plugins']['get']('Dialog'),_0x3080e4=new _0x2355d6(_0x3a0df2);return _0x3080e4['bind']('isEnabled')['to'](this,'isEnabled'),_0x3080e4['bind']('isOn')['to'](_0x568991,'id',_0x8b4472=>'commentsArchive'===_0x8b4472),_0x3080e4['set']({'label':N(_0x3a0df2,'COMMENTS_ARCHIVE'),'icon':_0x54b5f6,'isToggleable':!0x0}),_0x23b4a8&&(_0x3080e4['tooltip']=!0x0),this['listenTo'](_0x3080e4,'execute',()=>this['_toggleDialog']()),_0x3080e4;}['_hideDialogOnAnnotationEscape']=_0x480dbb=>{const _0x55d7a5=_0x480dbb['source'];if(!this['annotationViews']['has'](_0x55d7a5['view']))return;const _0x2ed053=this['editor']['plugins']['get']('Dialog');_0x2ed053['isOpen']&&'commentsArchive'===_0x2ed053['id']&&(_0x2ed053['hide'](),_0x480dbb['stop']());};}class gi extends _0x165a5f{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};
|