@ckeditor/ckeditor5-comments 47.1.0-alpha.1 → 47.1.0-alpha.2
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 +18 -18
- 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(_0x170c2d={}){function _0x94f4a8(_0x34930a){return _0x34930a['map'](_0x589ade=>String['fromCharCode'](_0x589ade))['join']('');}(_0x170c2d=Object['assign']({},_0x170c2d))['plugins']||(_0x170c2d['plugins']=hs['defaultPlugins']),super(_0x170c2d),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[_0x94f4a8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x94f4a8([0x76,0x69,0x65,0x77])][_0x94f4a8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x94f4a8([0x61,0x75,0x74,0x6f]),this[_0x94f4a8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x94f4a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x94f4a8([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x94f4a8([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x94f4a8([0x6f,0x6b])});}['create'](){const _0x50161c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x50161c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x12d37f=>{const _0x48c848=this['model']['document']['getRoot'](),_0x439a3e=_0x48c848&&_0x48c848['getChild'](_0x48c848['childCount']-0x1);_0x12d37f['setSelection'](_0x439a3e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5e793b=this['editing']['view'],_0x4816c4=_0x5e793b['document']['getRoot'](),_0xb3b15d=_0x4816c4['getChild'](0x0);_0x4816c4['childCount']>0x1||!_0xb3b15d||'p'!=_0xb3b15d['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x5e793b,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xb3b15d['placeholder']=this['placeholder']),Ft({'view':_0x5e793b,'element':_0xb3b15d,'keepOnFocus':!0x0}),this['placeholderElement']=_0xb3b15d);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1d7d48,_0x3aa7d1={}){super(_0x1d7d48),this['editor']=null,this['_editorConfig']=_0x3aa7d1,this['set']('value',_0x3aa7d1['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x1d7d48,'Reply...')),this['set']('submitLabel',N(_0x1d7d48,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1c8200(),this['focusCycler']=new _0x49e0cf({'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',(_0x13f66b,_0x121037)=>{this['cancelButtonView']['fire']('execute'),_0x121037();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3e733c,_0x4f895c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4f895c());}),this['on']('submit',(_0x35fb77,_0x4c80ba)=>{_0x4c80ba['length']>0xfde8?(alert(N(_0x1d7d48,'TOO_LONG_COMMENT_ALERT',[_0x4c80ba['length'],0xfde8])),_0x35fb77['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 _0x2abe87=this['editor'];this['element']['insertBefore'](_0x2abe87['ui']['element'],this['element']['firstChild']),_0x2abe87['model']['document']['on']('change',()=>this['value']=_0x2abe87['getData']()),_0x2abe87['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2abe87['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3086e8){-0x1===_0x3086e8?(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:_0x2d093e}=this,_0x40f1cc=new _0x5a79b9(_0x2d093e);return _0x40f1cc['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x40f1cc['withText']=!0x0,_0x40f1cc['bind']('label')['to'](this,'submitLabel'),_0x40f1cc['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x40f1cc['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x32d4a9,_0x536d62)=>!_0x536d62&&!!_0x32d4a9['trim']()),_0x40f1cc;}['_createCancelButton'](){const {locale:_0x3da5a0}=this,_0x37f9c2=new _0x5a79b9(_0x3da5a0);return _0x37f9c2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x37f9c2['label']=N(_0x3da5a0,'Cancel'),_0x37f9c2['withText']=!0x0,_0x37f9c2['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x37f9c2;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x42f8cf=>{this['focusTracker']['add'](_0x42f8cf['element']);}),this['focusables']['on']('change',(_0x92297b,_0x26c6a0)=>{for(const _0x2d9062 of Array['from'](_0x26c6a0['added'])['reverse']())this['focusTracker']['add'](_0x2d9062['element']);});}}class ie extends kt{constructor(_0x5bf074,_0x243eae,_0x47cff9){super(_0x5bf074),this['commentInputView']=new es(_0x5bf074,_0x47cff9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4bc608,_0x1d626b)=>_0x4bc608||!!_0x1d626b),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 _0x5ce653(_0x5bf074,_0x243eae),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'](_0x11ad03){this['commentInputView']['focus'](_0x11ad03);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x10e9ce,_0x13a09b)=>{const {submitButtonView:_0x131d34,cancelButtonView:_0x2e0003,editor:_0x107d64}=this['commentInputView'];[_0x131d34['element'],_0x2e0003['element'],_0x107d64?_0x107d64['editing']['view']['getDomRoot']():null]['filter'](_0x55dfc7=>_0x55dfc7)['some'](_0x290331=>_0x290331['contains'](_0x13a09b['target']))||(this['focus'](),_0x13a09b['preventDefault']());});}}class rs extends kt{constructor(_0x968d05){super(_0x968d05);const _0x3a60e8=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3a60e8['to']('count',_0x420d56=>N(_0x968d05,'NUMBER_OF_COMMENTS',_0x420d56))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x233732,_0x69407d,_0x42d940){super(_0x233732);const _0x4675d1=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x69407d['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x69407d,this['_config']=_0x42d940,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1c8200(),this['keystrokes']=new jt(),this['focusCycler']=new _0x49e0cf({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1ba5a3=>this['commentViews']['map'](_0x1a491e=>_0x1a491e['element'])['includes'](_0x1ba5a3['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x233732),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x52eac1=>_0x52eac1-this['_config']['maxCommentsWhenCollapsed']);for(const _0x120ad9 of _0x69407d['comments'])this['_handleNewCommentModel'](_0x120ad9);this['_handleInfoComment'](),this['listenTo'](_0x69407d['comments'],'add',(_0x9c065e,_0x1bb56e)=>{const _0x4f3c99=this['_calculatePosition'](_0x1bb56e);this['length']++,this['_handleNewCommentModel'](_0x1bb56e,_0x4f3c99),this['refreshVisibleViews']();}),this['listenTo'](_0x69407d['comments'],'remove',(_0xa651c1,_0xd4dff7)=>{this['length']--,this['_handleRemoveCommentModel'](_0xd4dff7),this['refreshVisibleViews']();}),this['listenTo'](_0x69407d,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x69407d,'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',_0x4675d1['if']('length','ck-hidden',_0x5af010=>!_0x5af010)],'aria-label':N(_0x233732,'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'](_0x2ed663){-0x1===_0x2ed663?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2cfea2 of this['commentViews'])_0x2cfea2['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4e1b4a,_0x1a8024){const _0x506265=new this['_config']['CommentView'](this['locale'],_0x4e1b4a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x506265['viewUid']=_0x4e1b4a['id'],_0x506265['delegate']('removeComment')['to'](this),_0x506265['delegate']('updateComment')['to'](this),_0x506265['delegate']('resolveCommentThread')['to'](this),_0x506265['delegate']('editorReady')['to'](this),_0x506265['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x506265,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x506265,_0x1a8024);}['_calculatePosition'](_0x2c22fd){const _0x16d429=this['_model']['_findOptimalIndex'](_0x2c22fd);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2c22fd['authoredAt']?_0x16d429-0x1:_0x16d429:_0x16d429-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2354ba={'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'],_0x2354ba,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2354ba));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x188757){const _0x204b4f=this['commentViews']['remove'](_0x188757['id']);this['stopListening'](_0x204b4f),_0x204b4f['isEditMode']&&this['_updateHasDirtyComment'](),_0x204b4f['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4da960=>_0x4da960['isEditMode']);}['_rearrangeCollapse'](){const _0x209e2c=function(_0x350a1c){const _0x227e6d=new _0x41c939();for(const _0x313127 of _0x350a1c)_0x227e6d['add'](_0x313127);return _0x227e6d;}(this['commentViews']),_0x1203e9=this['_collapsedCommentsView']['count'];for(let _0x29a9ce=0x1;_0x29a9ce<=_0x1203e9;_0x29a9ce++)_0x209e2c['remove'](0x1);for(const _0x494400 of _0x209e2c)_0x494400['collapse']();_0x1203e9>0x0&&_0x209e2c['add'](this['_collapsedCommentsView'],0x1),ns(_0x1bbe44(Array['from'](this['visibleViews']),Array['from'](_0x209e2c)),this['visibleViews'],_0x209e2c);}['_rearrangeExpand'](){ns(_0x1bbe44(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3703b4 of this['visibleViews'])_0x3703b4['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4da7fa=>{this['focusTracker']['add'](_0x4da7fa['element']),this['keystrokes']['listenTo'](_0x4da7fa['element']);}),this['commentViews']['on']('change',(_0x474101,_0x3cc2d4)=>{for(const _0x15eeea of _0x3cc2d4['removed'])this['focusTracker']['remove'](_0x15eeea['element']),this['keystrokes']['stopListening'](_0x15eeea['element']);for(const _0x30f2ee of Array['from'](_0x3cc2d4['added'])['reverse']())this['focusTracker']['add'](_0x30f2ee['element']),this['keystrokes']['listenTo'](_0x30f2ee['element']);});}}function ns(_0x155c8b,_0x45a583,_0x3fe5b3){let _0x141b0=0x0;for(const _0x1ac237 of _0x155c8b)switch(_0x1ac237){case'insert':_0x45a583['add'](_0x3fe5b3['get'](_0x141b0),_0x141b0),_0x141b0++;break;case'delete':_0x45a583['remove'](_0x141b0);break;case'equal':_0x141b0++;}}class oe extends kt{constructor(_0xd29464){super(_0xd29464);const _0x84a499=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x84a499['to']('contextValue',_0x3746f7=>N(_0xd29464,'THREAD_CONTEXT_LABEL',_0x3746f7)),'tabindex':-0x1},'children':[{'text':_0x84a499['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x17bac7,_0x26932a){super(_0x17bac7);const _0x12696d=this['bindTemplate'];this['_model']=_0x26932a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1c8200(),this['keystrokes']=new jt(),this['focusCycler']=new _0x49e0cf({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5cdb69=>!!_0x5cdb69),this['bind']('contextValue')['to'](this['_model'],'context',_0x32f460=>_0x32f460&&_0x32f460['value']?this['_trimContextValue'](_0x32f460['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',_0x12696d['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 _0x545a4c=new _0x5a79b9(this['locale']);return _0x545a4c['label']=N(this['locale'],'Reopen'),_0x545a4c['tooltip']=N(this['locale'],'Reopen'),_0x545a4c['icon']=_0x52e939,_0x545a4c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x158150=>!_0x158150),_0x545a4c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2257fa,_0x3336a9)=>_0x2257fa&&_0x3336a9),_0x545a4c['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x545a4c;}['_trimContextValue'](_0x474ef8){if(_0x474ef8['length']<0x96)return _0x474ef8;const _0x1a947d=_0x474ef8['lastIndexOf']('\x20',0x93);return _0x474ef8['substring'](0x0,_0x1a947d>-0x1?_0x1a947d:0x93)+'...';}['_attachContextActions'](){const _0x60a111=this['element']['querySelector']('.ck-context'),_0x3dbaae=_0x60a111['querySelector']('.ck-context__value');this['listenTo'](_0x60a111,'mouseenter',()=>{_0x3dbaae['offsetWidth']<_0x3dbaae['scrollWidth']&&_0x60a111['classList']['add']('overlay');}),this['listenTo'](_0x60a111,'mouseleave',()=>{_0x60a111['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2fccf7 of this['focusables'])this['focusTracker']['add'](_0x2fccf7['element']),this['keystrokes']['listenTo'](_0x2fccf7['element']);}['_createContextView'](){const _0x1997e5=new oe(this['locale']);return _0x1997e5['bind']('contextValue')['to'](this),_0x1997e5;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c2c28,_0x46d8eb,_0x541456,_0x57310a){super(_0x3c2c28),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x46d8eb,this['_localUser']=_0x541456,this['_config']=_0x57310a,this['commentThreadHeaderView']=new Xt(_0x3c2c28,_0x46d8eb),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3c2c28,N(_0x3c2c28,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3c2c28,_0x46d8eb,Object['assign']({'CommentView':this['_config']['CommentView']},_0x57310a)),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',(_0xfb8313,_0x324119)=>_0xfb8313||!!_0x324119),this['bind']('isUnlinked')['to'](_0x46d8eb,'unlinkedAt',_0x542315=>!!_0x542315),this['bind']('ariaLabel')['to'](this,'length',_0x434648=>{const _0x59cf50=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x434648,_0x59cf50]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1c8200(),this['keystrokes']=new jt(),this['focusCycler']=new _0x49e0cf({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x53a2ef=>_0x53a2ef['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 _0x703eea=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x571483=_0x703eea['commentInputView'];return _0x703eea['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x571483,'value',(_0x327b8c,_0x36ce13,_0x32cfc9,_0x4ee86d,_0x4be71a)=>!!_0x4be71a||!!_0x4ee86d&&_0x32cfc9&&!_0x36ce13||_0x327b8c&&_0x32cfc9&&!_0x36ce13),_0x571483['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x13e96c,_0x689898,_0x5c3269)=>{let _0x390b48;return _0x390b48=_0x5c3269&&_0x689898?'Reply\x20to\x20reopen\x20discussion...':_0x13e96c?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x390b48);}),_0x571483['bind']('submitLabel')['to'](this,'length',_0x3f547d=>N(this['locale'],_0x3f547d?'Reply':'Comment')),_0x571483['on']('submit',(_0x32d4ec,_0x37ceaa)=>{this['fire']('addComment',_0x37ceaa),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x571483['on']('cancel',()=>{this['focus']();}),_0x571483['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x571483['on']('cancel',_0x3150a4=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3150a4['stop']());}),this['on']('change:isActive',(_0x21dee7,_0x33a190,_0x475b73)=>{_0x475b73||this['length']||_0x571483['value']||this['fire']('removeCommentThread');}),_0x703eea;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x3f5bd4(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x12abf5,target:_0x59cff9,type:_0x4f461b,isVisible:_0x235e5b=!0x0}){super(),this['view']=_0x12abf5,this['view']['element']||this['view']['render'](),this['_type']=_0x4f461b,this['_target']=_0x59cff9,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x41c939([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3fc526,_0x2f0d6d)=>{this['view']['focusTracker']['add'](_0x2f0d6d);}),this['focusableElements']['on']('remove',(_0x4f0789,_0x34e73b)=>{this['view']['focusTracker']['remove'](_0x34e73b);}),this['set']('isVisible',_0x235e5b);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x17192e=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x17192e),_0x17192e;}get['targetRect'](){const _0x277ac8=this['target'];if(null===_0x277ac8)return null;if(_0x277ac8 instanceof _0x4803da)return _0x277ac8;const _0x4ffbae=_0x277ac8['filter'](_0x3fe4e0=>function(_0x324105){const _0x235868=_0x324105['offsetParent'];if(_0x235868)return!0x0;const _0x362bde=_0x324105['getClientRects']()['item'](0x0);return!!_0x362bde;}(_0x3fe4e0));return 0x0===_0x4ffbae['length']?null:new _0x4803da(_0x4ffbae[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1d6b98){this['view']['isActive']=_0x1d6b98,this['view']['mainView']['isActive']=_0x1d6b98;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3d4b0d){if(!(null===_0x3d4b0d||_0x3d4b0d instanceof _0x4803da||Array['isArray'](_0x3d4b0d)&&_0x3d4b0d['every'](_0x26e3bd=>fi(_0x26e3bd))))throw new _0x23709e('annotation-invalid-target',null,{'target':_0x3d4b0d});}['_getNormalizedTarget'](){const _0x3b6bc9='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x3b6bc9)?[_0x3b6bc9]:_0x3b6bc9;}}function fi(_0x3bdcee){return null!==_0x3bdcee&&'object'==typeof _0x3bdcee&&'nodeType'in _0x3bdcee&&0x1===_0x3bdcee['nodeType'];}class S extends _0x41c939{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4b447f=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1c8200(),this['_focusTracker']['on']('change:isFocused',(_0x59544a,_0x1800f1,_0x346285)=>{_0x346285||this['fire']('blur');});for(const _0x2af668 of _0x4b447f)this['add'](_0x2af668);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x110357){if(this['has'](_0x110357))throw new _0x23709e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x110357['innerView'],_0x110357),this['_viewToAnnotation']['set'](_0x110357['view'],_0x110357);for(const _0x57e6b9 of _0x110357['focusableElements'])this['_focusTracker']['add'](_0x57e6b9);this['listenTo'](_0x110357['focusableElements'],'add',(_0x25b281,_0x3c74dc)=>{this['_focusTracker']['add'](_0x3c74dc);}),this['listenTo'](_0x110357['focusableElements'],'remove',(_0x4a2b3e,_0x286ab3)=>{this['_focusTracker']['remove'](_0x286ab3);}),this['listenTo'](_0x110357['view']['focusTracker'],'change:isFocused',(_0x544be5,_0x457cc4,_0x756190)=>{_0x756190&&this['fire']('focus',_0x110357);}),_0x110357['updateTargetRect']();const _0x2b65d3=this['_getOrderInContent'](_0x110357['view']['targetRect']);return super['add'](_0x110357,_0x2b65d3);}['remove'](_0x171c4b){if(!this['has'](_0x171c4b))throw new _0x23709e('annotationcollection-not-existing-item',null);this['stopListening'](_0x171c4b['view']['focusTracker']),this['stopListening'](_0x171c4b['focusableElements']);for(const _0x4018ed of _0x171c4b['focusableElements'])this['_focusTracker']['remove'](_0x4018ed);return this['_viewToAnnotation']['delete'](_0x171c4b['view']),this['_innerViewToAnnotation']['delete'](_0x171c4b['innerView']),super['remove'](_0x171c4b);}['getByInnerView'](_0x15ade5){return this['_innerViewToAnnotation']['get'](_0x15ade5);}['getByView'](_0x548e2f){return this['_viewToAnnotation']['get'](_0x548e2f);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x47d3fe of this)_0x47d3fe['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2f0b5b=Array['from'](this)['sort']((_0x28283a,_0x5848d7)=>w(_0x28283a['view']['targetRect'],_0x5848d7['view']['targetRect']));for(let _0x418632=_0x2f0b5b['length']-0x1;_0x418632>0x0;_0x418632--){const _0x61033a=_0x2f0b5b[_0x418632];_0x418632!==this['getIndex'](_0x61033a)&&(this['remove'](_0x61033a),this['add'](_0x61033a));}}['_getOrderInContent'](_0x42ceb7){let _0x1c707a=0x0;if(!_0x42ceb7)return this['length'];for(const _0x115b54 of this){const _0x1ac752=_0x115b54['view']['targetRect'];if(_0x1ac752){if(w(_0x42ceb7,_0x1ac752)<0x0)return _0x1c707a;_0x1c707a++;}}return _0x1c707a;}}function v({source:_0x26f682,target:_0x1aa171,filter:_0x221a27}){for(const _0x331f03 of _0x26f682)_0x221a27(_0x331f03)&&_0x1aa171['add'](_0x331f03);_0x1aa171['listenTo'](_0x26f682,'add',(_0x133119,_0x5da368)=>{_0x221a27(_0x5da368)&&_0x1aa171['add'](_0x5da368);}),_0x1aa171['listenTo'](_0x26f682,'remove',(_0x39e5b8,_0x300dd0)=>{_0x1aa171['has'](_0x300dd0)&&_0x1aa171['remove'](_0x300dd0);});}function w(_0x1b2857,_0x15184e){if(null===_0x1b2857&&null===_0x15184e)return 0x0;if(null===_0x1b2857)return-0x1;if(null===_0x15184e)return 0x1;const _0x11815f=_0x1b2857['top']-_0x15184e['top'];return 0x0==_0x11815f?_0x1b2857['left']-_0x15184e['left']:_0x11815f;}class y extends _0x2f0852{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10c200){if(super(_0x10c200),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x10c200 instanceof _0x37377e){const _0x5b8b28=_0x10c200['locale'];_0x10c200['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x5b8b28,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x5b8b28,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x5b8b28,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x5b8b28,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x5b8b28,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x5b8b28,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x5b8b28,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3c7590){this['collection']['add'](_0x3c7590);}['remove'](_0x419d22){this['collection']['remove'](_0x419d22),_0x419d22['destroy']();}['refreshVisibility'](){for(const _0x1f0c59 of this['collection'])_0x1f0c59['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x498abb){return this['collection']['getByInnerView'](_0x498abb);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x31c827 of this['collection'])_0x31c827['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2e81b){this['fire']('_activateAnnotation',_0x2e81b);}['createAnnotation'](_0x2cc2ca){return new T(_0x2cc2ca);}['createAnnotationView'](_0x3377a7,_0xabb24c){return new E(_0x3377a7,_0xabb24c);}['_addActiveAnnotation'](_0x4a5b59){const _0x440eaa=new Set(this['activeAnnotations']);_0x440eaa['add'](_0x4a5b59),this['activeAnnotations']=_0x440eaa;}['_removeActiveAnnotation'](_0x3b7e4b){const _0x434018=new Set(this['activeAnnotations']);_0x434018['delete'](_0x3b7e4b),this['activeAnnotations']=_0x434018;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2a1470=this['collection'],_0x3f13ae=this['_visibleAnnotations'];function _0x2f824a(_0x180ea6){const _0xae5c1c=_0x180ea6['source'];_0xae5c1c['isVisible']&&!_0x3f13ae['has'](_0xae5c1c)?_0x3f13ae['add'](_0xae5c1c):!_0xae5c1c['isVisible']&&_0x3f13ae['has'](_0xae5c1c)&&_0x3f13ae['remove'](_0xae5c1c),_0xae5c1c['view']['focusTracker']['remove'](_0xae5c1c['view']['element']),_0xae5c1c['view']['focusTracker']['add'](_0xae5c1c['view']['element']);}this['listenTo'](_0x2a1470,'add',(_0x4e04ae,_0x1d07ec)=>{_0x1d07ec['isVisible']&&_0x3f13ae['add'](_0x1d07ec),this['listenTo'](_0x1d07ec,'change:isVisible',_0x2f824a);}),this['listenTo'](_0x2a1470,'remove',(_0x4ee3eb,_0x20fe56)=>{_0x3f13ae['has'](_0x20fe56)&&_0x3f13ae['remove'](_0x20fe56),this['stopListening'](_0x20fe56,'change:isVisible',_0x2f824a);});}['_setupEnterAnnotationKeystroke'](){const _0x190ec0=_0x4e9f37=>{_0x4e9f37['on']('ready',()=>{_0x4e9f37['keystrokes']['set'](_0x225b0,(_0x5d2d57,_0x29f242)=>{const _0x8c6e9c=_0x15829c(this['activeAnnotations']['values']());_0x8c6e9c&&(_0x8c6e9c['view']['focus'](),_0x29f242());});});};this['context']instanceof _0x37377e?_0x190ec0(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2b62a7,_0x1f0dee)=>{_0x190ec0(_0x1f0dee);});}['_setupEscapeAnnotationHandling'](){const _0x2914cc=_0x43a263=>{const _0x348877=_0x43a263['source'],_0x5bf6d1=[];let _0x4c6597;if(Array['isArray'](_0x348877['target'])){_0x4c6597=_0x348877['target'][0x0],this['context']instanceof _0x37377e?_0x5bf6d1['push'](this['context']):this['context']['editors']&&_0x5bf6d1['push'](...this['context']['editors']);for(const _0x35ef43 of _0x5bf6d1)for(const _0x36d752 of _0x35ef43['editing']['view']['domRoots']['values']())if(_0x36d752['contains'](_0x4c6597))return void _0x35ef43['editing']['view']['focus']();_0x4c6597['focus']();}};this['listenTo'](this['collection'],'add',(_0x5d7d99,_0x3eaca7)=>{this['listenTo'](_0x3eaca7,'escape',_0x2914cc,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x575b8c,_0x3c0478)=>{this['stopListening'](_0x3c0478,'escape',_0x2914cc);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2f0852{['_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(_0x81c7c8){super(_0x81c7c8),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x49c7a7=this['context']['config'];_0x49c7a7['define']('comments.maxCommentsWhenCollapsed',0x2),_0x49c7a7['define']('comments.maxThreadTotalWeight',0x1f4),_0x49c7a7['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x49c7a7['define']('comments.CommentThreadView',gt),_0x49c7a7['define']('comments.CommentView',Tt),_0x49c7a7['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x9ffbca=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x502074,_0x50ac52)=>this['_addCommentThread'](_0x50ac52)),this['on']('submitCommentThread',(_0x312c34,_0x290087)=>this['_submitCommentThread'](_0x290087)),this['on']('resolveCommentThread',(_0x4ad79c,_0x1d04d4)=>this['_resolveCommentThread'](_0x1d04d4)),this['on']('resolveCommentThread',(_0x59a393,_0x50f41c)=>this['_updateActiveAnnotation'](_0x50f41c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x522c80,_0x261c9c)=>this['_reopenCommentThread'](_0x261c9c)),this['on']('reopenCommentThread',(_0x1ee4c4,_0x56168c)=>this['_updateActiveAnnotation'](_0x56168c),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2024c1,_0x4db4d2)=>this['_removeCommentThread'](_0x4db4d2)),this['on']('updateCommentThread',(_0x5a10cf,_0x5292b5)=>this['_updateCommentThread'](_0x5292b5)),this['on']('updateCommentThread',(_0x34bed9,_0x2c4767)=>this['_updateActiveAnnotation'](_0x2c4767),{'priority':'lowest'}),this['on']('addComment',(_0x10df47,_0x49a4ba)=>this['_addComment'](_0x49a4ba)),this['on']('updateComment',(_0x2df3a8,_0x3c1f5d)=>this['_updateComment'](_0x3c1f5d)),this['on']('removeComment',(_0x30a054,_0x3c1fef)=>this['_removeComment'](_0x3c1fef)),this['on']('addComment',(_0x1b39c2,{threadId:_0x57184a,isFromAdapter:_0x517911})=>{if(_0x517911)return;const _0x4e55f6=this['getCommentThread'](_0x57184a),_0x828f4a=_0x4e55f6&&this['_threadToController']['get'](_0x4e55f6);_0x828f4a&&_0x828f4a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x9ffbca,'change:activeAnnotations',(_0x51c7e9,_0x5a5914,_0x5bb5e7)=>{const _0x5c3a42=Array['from'](_0x5bb5e7)['map'](_0x585857=>this['_viewToController']['get'](_0x585857['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5c3a42?_0x5c3a42['model']:null;});}set['adapter'](_0x398cdc){if(this['_adapter'])throw new _0x23709e('commentsrepository-adapter-already-set');this['_adapter']=_0x398cdc;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x223e7b=_t,threadId:_0x3879e8=_0x1847cc(),comments:_0x14bf59=[],unlinkedAt:_0x32a0a7=null,resolvedAt:_0x4591a5=null,resolvedBy:_0x63f474=null,target:_0x5d537a=null,context:_0x4279e5=null,attributes:_0x3bad3f={},isResolvable:_0x52b2df=!0x0,isSubmitted:_0x37a7ed=!0x1,isFromAdapter:_0x15666a=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x223e7b),{'channelId':_0x223e7b,'threadId':_0x3879e8,'comments':_0x14bf59,'unlinkedAt':_0x32a0a7,'resolvedAt':_0x4591a5,'resolvedBy':_0x63f474,'target':_0x5d537a,'context':_0x4279e5,'attributes':_0x3bad3f,'isFromAdapter':_0x15666a,'isResolvable':_0x52b2df,'isSubmitted':_0x37a7ed}),this['getCommentThread'](_0x3879e8);}['openNewCommentThread']({channelId:_0x4e6167=_t,threadId:_0x3db4ce=_0x1847cc(),target:_0x223ec5,context:_0x264853=null,isResolvable:_0x5bc895=!0x0}){if(this['_readOnlyChannels']['has'](_0x4e6167)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x223ec5)throw new _0x23709e('commentsrepository-missing-target');const _0x581fe6=this['addCommentThread']({'channelId':_0x4e6167,'threadId':_0x3db4ce,'target':_0x223ec5,'context':_0x264853,'isResolvable':_0x5bc895});if(!_0x581fe6)return null;const _0x1525e9=this['_threadToController']['get'](_0x581fe6),_0x1d6cbe=_0x1525e9['view']['commentThreadInputView']['commentInputView'],_0x2c0301=this['context']['plugins']['get'](y),_0x507b03=_0x2c0301['getByInnerView'](_0x1525e9['view']);return _0x2c0301['activate'](_0x507b03),_0x1d6cbe['once']('editorReady',()=>_0x1d6cbe['focus']()),_0x581fe6;}['hasCommentThread'](_0x3f0830){if('string'!=typeof _0x3f0830)throw new _0x23709e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3f0830);}['updateCommentThread']({channelId:_0x553d4f=_t,threadId:_0x1226b1,context:_0x5c1c37,unlinkedAt:_0x31f1,attributes:_0x2a37ee,isFromAdapter:_0x37d31f=!0x1}){return this['fire'](Nt('updateCommentThread',_0x553d4f),{'channelId':_0x553d4f,'threadId':_0x1226b1,'context':_0x5c1c37,'unlinkedAt':_0x31f1,'attributes':_0x2a37ee,'isFromAdapter':_0x37d31f}),this['getCommentThread'](_0x1226b1);}['getCommentThread'](_0x15338f){if('string'!=typeof _0x15338f)throw new _0x23709e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x15338f);}['fetchCommentThread']({channelId:_0x5c5ba0,threadId:_0x3ae42b}={}){const _0x4da690=this['getCommentThread'](_0x3ae42b);if(_0x4da690)return Promise['resolve'](_0x4da690);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x23709e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5c5ba0,'threadId':_0x3ae42b})['then'](_0x2b3387=>this['hasCommentThread'](_0x3ae42b)?this['getCommentThread'](_0x3ae42b):_0x2b3387?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5c5ba0},_0x2b3387)):void 0x0)['catch'](_0x724303=>{throw console['error'](_0x724303),new _0x23709e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x20f474,skipNotAttached:_0x256f61=!0x1,skipEmpty:_0x533ca4=!0x1,toJSON:_0x4ae4f2=!0x1}={}){const _0x4b897b=[];for(const _0x1632cc of this['_threads']['values']())_0x20f474&&_0x1632cc['channelId']!==_0x20f474||_0x256f61&&!_0x1632cc['isAttached']||_0x533ca4&&0x0===_0x1632cc['length']||_0x4b897b['push'](_0x1632cc);return _0x4ae4f2?_0x4b897b['map'](_0x4835de=>_0x4835de['toJSON']()):_0x4b897b;}['getAnnotationForCommentThread'](_0x4981bc){const _0x3ed64c=this['_threadToController']['get'](_0x4981bc);if(!_0x3ed64c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3ed64c['view'])||null;}['getCommentThreadForAnnotation'](_0x4c6f0f){const _0x2c77d9=this['_viewToController']['get'](_0x4c6f0f['innerView']);return _0x2c77d9?_0x2c77d9['model']:null;}['setActiveCommentThread'](_0x2e78ab){const _0x12e742=this['context']['plugins']['get'](y);if(!_0x2e78ab)return void(this['activeCommentThread']&&_0x12e742['deactivateAll']());const _0x57b04f=this['getCommentThread'](_0x2e78ab);if(!_0x57b04f)throw new _0x23709e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2e78ab});if(!this['_threadToController']['has'](_0x57b04f))throw new _0x23709e('commentsrepository-active-not-attached',null,{'threadId':_0x2e78ab});const _0x600ac4=_0x12e742['getByInnerView'](this['_threadToController']['get'](_0x57b04f)['view']);_0x12e742['activate'](_0x600ac4);}['switchReadOnly'](_0x3a2788,_0x50938c){_0x3a2788?this['_readOnlyChannels']['add'](_0x50938c):this['_readOnlyChannels']['delete'](_0x50938c),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x518b3f){return this['_readOnlyChannels']['has'](_0x518b3f)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2af9d6,_0x4d1d06){return new vt(_0x2af9d6,_0x4d1d06);}['setPermissions'](_0x59ad71,_0x54a27e=_t){this['_permissions']['set'](_0x54a27e,_0x59ad71),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5216a1=_t){return this['_permissions']['has'](_0x5216a1)?this['_permissions']['get'](_0x5216a1):bt;}['_addCommentThread']({channelId:_0x44c18c,threadId:_0x491838,comments:_0x1183f6,unlinkedAt:_0xc81a61,resolvedAt:_0x4a0e97,resolvedBy:_0x32aa85,target:_0x1dd252,context:_0x532913,attributes:_0x20d77e,isFromAdapter:_0x5e5709,isResolvable:_0x33239f,isSubmitted:_0x1f274f}){if('string'!=typeof _0x491838)throw new _0x23709e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x491838});if(this['hasCommentThread'](_0x491838))throw new _0x23709e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x491838});const _0x3034e8=new pi(this,{'channelId':_0x44c18c,'id':_0x491838,'context':_0x532913,'attributes':_0x20d77e,'unlinkedAt':_0xc81a61,'resolvedAt':_0x4a0e97,'resolvedBy':_0x32aa85?this['context']['plugins']['get'](it)['getUser'](_0x32aa85):null,'isResolvable':_0x33239f,'isSubmitted':_0x1f274f||_0x5e5709});this['_threads']['set'](_0x491838,_0x3034e8);for(const _0x5baf85 of _0x1183f6)_0x3034e8['_add'](this['_createNewComment']({'threadId':_0x491838,..._0x5baf85}));return _0x1dd252&&_0x3034e8['attachTo'](_0x1dd252),_0x5e5709||!_0x3034e8['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x44c18c,'threadId':_0x491838});}['_submitCommentThread']({channelId:_0x518ff8,threadId:_0x6a0d9b}){if(!this['hasCommentThread'](_0x6a0d9b))throw new _0x23709e('commentsrepository-missing-comment-thread',this);const _0x250cea=this['getCommentThread'](_0x6a0d9b);if(_0x250cea['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x359746,comments:_0x58d970,resolvedAt:_0xf9f674,resolvedBy:_0x11d85d,context:_0x34021d,attributes:_0xb28195}=_0x250cea,_0x45cd09=this['context']['plugins']['get']('PendingActions'),_0x32d262=_0x45cd09['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x518ff8,'threadId':_0x359746,'comments':_0x58d970['map'](_0x5d41ce=>_0x5d41ce['toJSON']()),'resolvedAt':_0xf9f674,'resolvedBy':_0x11d85d?_0x11d85d['id']:_0x11d85d,'context':_0x34021d,'attributes':_0xb28195})['then'](({comments:_0x1d8944})=>{_0x45cd09['remove'](_0x32d262);for(const _0x1d07f0 of _0x1d8944)this['_updateComment']({'channelId':_0x518ff8,'threadId':_0x6a0d9b,'commentId':_0x1d07f0['commentId'],'createdAt':_0x1d07f0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5aec69=>{throw console['error'](_0x5aec69),new _0x23709e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2fb284,target:_0x288c7c}){const _0x6aee06=this['getCommentThread'](_0x2fb284);if(!_0x6aee06)throw new _0x23709e('commentsrepository-attach-missing-comment-thread',this);const _0x4780ae=this['context']['plugins']['get']('PendingActions'),_0x1a90db=this['context']['plugins']['get'](y),_0x244663=this['_createCommentThreadView'](_0x6aee06),_0x2139a0=new vt(_0x6aee06,_0x244663);let _0x54c58e=null;_0x244663['on']('change:isDirty',(_0x1752d5,_0x29184d,_0x1f4eaf)=>{_0x1f4eaf?_0x54c58e=_0x4780ae['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x54c58e&&(_0x4780ae['remove'](_0x54c58e),_0x54c58e=null);}),this['_threadToController']['set'](_0x6aee06,_0x2139a0),this['_viewToController']['set'](_0x244663,_0x2139a0);const _0x49c05f=new E(this['context']['locale'],_0x244663);_0x49c05f['bind']('length')['to'](_0x244663),_0x49c05f['bind']('isDirty')['to'](_0x244663,'isDirty',_0x244663,'length',(_0x17f8db,_0x38b429)=>_0x17f8db||!_0x38b429),_0x49c05f['bind']('isActive')['to'](_0x244663),_0x49c05f['type']='comment';const _0x199bff=new T({'view':_0x49c05f,'target':_0x288c7c,'type':'comment','isVisible':!_0x6aee06['archivedAt']&&!!('function'==typeof _0x288c7c?_0x288c7c():_0x288c7c)});return _0x244663['on']('escape',()=>{_0x199bff['fire']('escape');}),this['_bindAnnotationToEditors'](_0x244663,_0x199bff),_0x1a90db['add'](_0x199bff),_0x199bff;}['_bindAnnotationToEditors'](_0x52059c,_0x21d8c3){this['listenTo'](_0x52059c,'editorReady',(_0x3bf494,_0x4b8c8f)=>{const _0x593dc2=_0x4b8c8f['ui']['view']['body']['bodyCollectionContainer'];_0x21d8c3['focusableElements']['add'](_0x593dc2),this['context']instanceof _0x37377e&&this['context']['ui']['focusTracker']['add'](_0x593dc2);},{'priority':'highest'}),this['listenTo'](_0x52059c,'editorDestroyed',(_0x7149fe,_0x4db361)=>{const _0x7105a8=_0x4db361['ui']['view']['body']['bodyCollectionContainer'];_0x21d8c3['focusableElements']['has'](_0x7105a8)&&_0x21d8c3['focusableElements']['remove'](_0x7105a8),this['context']instanceof _0x37377e&&this['context']['ui']['focusTracker']['remove'](_0x7105a8);});}['_unbindEditors'](_0x1e9395){this['stopListening'](_0x1e9395,'editorReady'),this['stopListening'](_0x1e9395,'editorDestroyed');}['_createCommentThreadView'](_0x210d7e){const _0x48fe66=this['context']['plugins']['get'](it),{config:_0x1d0eed,locale:_0x4acecb}=this['context'],_0x4820d4=pt(_0x1d0eed['get']('locale'),_0x4acecb);return new(0x0,(_0x1d0eed['get']('comments'))['CommentThreadView'])(_0x4acecb,_0x210d7e,_0x48fe66['me'],{'editorConfig':{..._0x1d0eed['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1d0eed['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1d0eed['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1d0eed['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1d0eed['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4820d4,'CommentView':_0x1d0eed['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x55f085,channelId:_0x366f3c,resolvedAt:_0x48c661,resolvedBy:_0x520901,isFromAdapter:_0x3d62c6}){if(!this['hasCommentThread'](_0x55f085))throw new _0x23709e('commentsrepository-missing-comment-thread',null,{'threadId':_0x55f085});const _0xbf92c6=this['getCommentThread'](_0x55f085);if(_0xbf92c6['isResolved'])throw new _0x23709e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x55f085});const _0x38d59c=this['context']['plugins']['get'](it);if(_0xbf92c6['resolvedBy']=_0x38d59c['getUser'](_0x520901),_0xbf92c6['resolvedAt']=_0x48c661,_0x3d62c6||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5e4aba=this['context']['plugins']['get']('PendingActions'),_0x43e0be=_0x5e4aba['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x366f3c,'threadId':_0x55f085})['then'](({resolvedAt:_0x20aa59,resolvedBy:_0x44d882})=>{_0x5e4aba['remove'](_0x43e0be),_0xbf92c6['resolvedBy']['id']!==_0x44d882&&(_0xbf92c6['resolvedBy']=_0x38d59c['getUser'](_0x44d882)),_0xbf92c6['resolvedAt']=_0x20aa59;})['catch'](_0x225577=>{throw console['error'](_0x225577),new _0x23709e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x26e8f8,channelId:_0x24e2e4,isFromAdapter:_0x4eab8d}){if(!this['hasCommentThread'](_0x26e8f8))throw new _0x23709e('commentsrepository-missing-comment-thread',null,{'threadId':_0x26e8f8});const _0x5491cb=this['getCommentThread'](_0x26e8f8);if(!_0x5491cb['isResolved'])throw new _0x23709e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x26e8f8});if(_0x5491cb['resolvedBy']=null,_0x5491cb['resolvedAt']=null,_0x4eab8d||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3fdcad=this['context']['plugins']['get']('PendingActions'),_0x37bbd9=_0x3fdcad['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x24e2e4,'threadId':_0x26e8f8})['then'](()=>_0x3fdcad['remove'](_0x37bbd9))['catch'](_0x1c805d=>{throw console['error'](_0x1c805d),new _0x23709e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2ada6e,isFromAdapter:_0x281524}){const _0x112837=this['getCommentThread'](_0x2ada6e);if(!_0x112837)throw new _0x23709e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2ada6e),this['_threads']['delete'](_0x2ada6e),!_0x112837['isSubmitted']||_0x281524||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4dfed2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x38cfff}=_0x112837,_0x21df3d=_0x4dfed2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x38cfff,'threadId':_0x2ada6e})['then'](()=>_0x4dfed2['remove'](_0x21df3d))['catch'](_0x413c03=>{throw console['error'](_0x413c03),new _0x23709e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x50c29a,unlinkedAt:_0x1baba4,context:_0x28b429,attributes:_0x49fd07,isFromAdapter:_0x355e4b}){if('string'!=typeof _0x50c29a)throw new _0x23709e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x50c29a});if(!this['hasCommentThread'](_0x50c29a))throw new _0x23709e('commentsrepository-missing-comment-thread',null,{'threadId':_0x50c29a});const _0x6e1dea=this['getCommentThread'](_0x50c29a);let _0x3e04ed=!0x1;if(void 0x0!==_0x28b429&&_0x6e1dea['context']!==_0x28b429&&(_0x6e1dea['context']=_0x28b429,_0x3e04ed=!0x0),void 0x0!==_0x1baba4&&_0x6e1dea['unlinkedAt']!==_0x1baba4&&(_0x6e1dea['unlinkedAt']=_0x1baba4,_0x3e04ed=!0x0),_0x49fd07&&!At(_0x49fd07,_0x6e1dea['attributes'])&&(_0x6e1dea['attributes']=_0x49fd07,_0x3e04ed=!0x0),!_0x3e04ed)return Promise['resolve']();if(!_0x6e1dea['isSubmitted']||_0x355e4b||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x281b49=this['context']['plugins']['get']('PendingActions'),{channelId:_0x116d26}=_0x6e1dea,_0x42710b=_0x281b49['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x116d26,'threadId':_0x50c29a,'context':_0x28b429,'unlinkedAt':_0x1baba4,'attributes':_0x49fd07})['then'](()=>_0x281b49['remove'](_0x42710b))['catch'](_0x322446=>{throw console['error'](_0x322446),new _0x23709e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x6e7a3d){const _0x2fd5a9=this['context']['plugins']['get'](y),_0x3b1644=this['getCommentThread'](_0x6e7a3d);if(_0x3b1644['_isAttached']=!0x1,this['_threadToController']['has'](_0x3b1644)){const _0x5c49b4=this['_threadToController']['get'](_0x3b1644),_0x32de08=_0x5c49b4['view'],_0xdd04fd=_0x2fd5a9['getByInnerView'](_0x32de08);this['_threadToController']['delete'](_0x3b1644),this['_viewToController']['delete'](_0x32de08),_0xdd04fd&&_0x2fd5a9['remove'](_0xdd04fd),_0x5c49b4['destroy'](),_0x32de08['destroy']()['then'](()=>{this['_unbindEditors'](_0x32de08);});}}['_updateActiveAnnotation']({threadId:_0x18284e,resolvedAt:_0x37dbb8,unlinkedAt:_0x479323}){const _0xdd603d=!!_0x37dbb8,_0x2242b7=this['context']['plugins']['get'](y),_0x137470=this['getCommentThread'](_0x18284e);if(this['_threadToController']['has'](_0x137470)){const _0x31e89d=this['_threadToController']['get'](_0x137470)['view'],_0xfccf20=_0x2242b7['getByInnerView'](_0x31e89d);_0xfccf20&&(_0xdd603d&&_0x2242b7['_removeActiveAnnotation'](_0xfccf20),_0x479323?_0xfccf20['isVisible']=!0x1:_0xfccf20['refreshVisibility']());}}['_getExternalAuthor'](_0x55620c){const _0x4d56a9=this['context']['plugins']['get'](it),_0x64e011=It('external:'+_0x55620c),_0x30b0e6=_0x4d56a9['getUser'](_0x64e011);return _0x30b0e6||_0x4d56a9['addUser']({'id':_0x64e011,'name':_0x55620c});}['_createNewComment']({threadId:_0x2e2992,commentId:_0x350668=_0x1847cc(),content:_0x296a50,authorId:_0x22fdc9,createdAt:_0x59459e,attributes:_0x52dfd8}){if('string'!=typeof _0x350668)throw new _0x23709e('commentsrepository-invalid-commentid');if('string'!=typeof _0x22fdc9)throw new _0x23709e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x296a50||!_0x296a50['trim']())throw new _0x23709e('commentsrepository-invalid-comment-content');const _0x124b8=this['context']['plugins']['get'](it)['getUser'](_0x22fdc9);if(!_0x124b8)throw new _0x23709e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x22fdc9});let _0x5caaa4=null,_0x1bf201=_0x59459e;return _0x52dfd8?.['@external']&&(_0x5caaa4=this['_getExternalAuthor'](_0x52dfd8['@external']['authorName']),_0x1bf201=new Date(_0x52dfd8['@external']['createdAt'])),new wi(this,{'threadId':_0x2e2992,'id':_0x350668,'author':_0x5caaa4||_0x124b8,'creator':_0x124b8,'content':_0x296a50,'createdAt':_0x59459e,'authoredAt':_0x1bf201,'attributes':_0x52dfd8});}['_addComment'](_0xa6d78c){let {threadId:_0x2fed30,content:_0x5a4ac2,attributes:_0x4ac715,isFromAdapter:_0xff4d7f}=_0xa6d78c;const _0x2714c7=this['getCommentThread'](_0xa6d78c['threadId']);if(!_0x2714c7)throw new _0x23709e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3b75dc=this['_createNewComment'](_0xa6d78c),{id:_0x5f5c6a}=_0x3b75dc;if(_0x2714c7['_add'](_0x3b75dc),_0xff4d7f||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2714c7['isSubmitted'])return Promise['resolve']();const _0x4c3ca2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3c1905}=_0x2714c7,_0x4e8a87=_0x4c3ca2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4ac715||(_0x4ac715={}),this['adapter']['addComment']({'channelId':_0x3c1905,'threadId':_0x2fed30,'commentId':_0x5f5c6a,'content':_0x5a4ac2,'attributes':_0x4ac715})['then'](_0x5a2ffd=>{_0x4c3ca2['remove'](_0x4e8a87),_0x5a2ffd&&this['_updateComment']({'channelId':_0x3c1905,'threadId':_0x2fed30,'commentId':_0x5f5c6a,'createdAt':_0x5a2ffd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x562dd9=>{throw console['error'](_0x562dd9),new _0x23709e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5dd567,commentId:_0x16f218,content:_0x1b8449,createdAt:_0x465b98,attributes:_0xf4dac6,isFromAdapter:_0x3d11a9}){if(void 0x0!==_0x1b8449&&('string'!=typeof _0x1b8449||!_0x1b8449['trim']()['length']))throw new _0x23709e('commentsrepository-update-comment-invalid-content');const _0x45cab7=this['getCommentThread'](_0x5dd567),_0xec9da9=_0x45cab7['getComment'](_0x16f218);if(!_0xec9da9)throw new _0x23709e('commentsrepository-update-missing-comment',this);let _0xc9648e=!0x1;if(_0x1b8449&&_0x1b8449!==_0xec9da9['content']&&(_0xec9da9['isEditable']||_0x3d11a9)&&(_0xec9da9['content']=_0x1b8449,_0xc9648e=!0x0),_0x465b98&&_0x465b98!==_0xec9da9['createdAt']&&(_0xec9da9['createdAt']=_0x465b98,_0xec9da9['attributes']&&_0xec9da9['attributes']['@external']||(_0xec9da9['authoredAt']=_0x465b98),_0xc9648e=!0x0),_0xf4dac6&&!At(_0xf4dac6,_0xec9da9['attributes'])&&(_0xec9da9['attributes']=_0xf4dac6,_0xc9648e=!0x0),!_0xc9648e)return Promise['resolve']();if(_0x45cab7['fire']('commentUpdated'),_0x3d11a9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1eac77=this['context']['plugins']['get']('PendingActions'),{channelId:_0x55785a}=this['getCommentThread'](_0xec9da9['threadId']),_0x355fdd=_0x1eac77['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x55785a,'threadId':_0x5dd567,'commentId':_0x16f218,'content':_0x1b8449,'attributes':_0xf4dac6})['then'](()=>_0x1eac77['remove'](_0x355fdd))['catch'](_0x36d8c4=>{throw console['error'](_0x36d8c4),new _0x23709e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x487465,commentId:_0x2f7288,isFromAdapter:_0x4addf4}){const _0xb61f8b=this['getCommentThread'](_0x487465),_0x18890c=_0xb61f8b['getComment'](_0x2f7288);if(!_0x18890c)throw new _0x23709e('commentsrepository-remove-missing-comment',this);if(_0xb61f8b['_remove'](_0x18890c),_0x4addf4||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2d1d23=this['context']['plugins']['get']('PendingActions'),{channelId:_0xf333be}=_0xb61f8b,_0x5b580b=_0x2d1d23['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xf333be,'threadId':_0x487465,'commentId':_0x2f7288})['then'](()=>_0x2d1d23['remove'](_0x5b580b))['catch'](_0x2049bc=>{throw console['error'](_0x2049bc),new _0x23709e('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3f5bd4(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x17a819,_0x258561){super();const _0x1cda9d=_0x17a819['context']['plugins']['get'](it)['me'],_0x58f2dd=_0x17a819['getCommentThread'](_0x258561['threadId']),_0x16eec7=0x0===_0x58f2dd['comments']['length'],_0x74a9d1=_0x1cda9d===_0x258561['author'];this['id']=_0x258561['id'],this['threadId']=_0x258561['threadId'],this['author']=_0x258561['author'],this['creator']=_0x258561['creator'],this['isExternal']=Boolean(_0x258561['attributes']&&_0x258561['attributes']['@external']),this['set']('content',_0x258561['content']),this['createdAt']=_0x258561['createdAt']||new Date(),this['set']('authoredAt',_0x258561['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x58f2dd,'resolvedAt'),this['set']('attributes',_0x258561['attributes']||{}),this['bind']('isEditable')['to'](_0x17a819,'_permissions',()=>{const _0x3a3f6a=_0x17a819['getPermissions'](_0x58f2dd['channelId'])['write'],_0x3165dc=_0x17a819['getPermissions'](_0x58f2dd['channelId'])['modifyAll'];return _0x74a9d1&&_0x3a3f6a||!_0x74a9d1&&_0x3165dc;}),this['bind']('isRemovable')['to'](_0x58f2dd,'isRemovable',_0x17a819,'_permissions',_0x16cb07=>{const _0x26a8a3=_0x17a819['getPermissions'](_0x58f2dd['channelId'])['write'],_0x16473f=_0x17a819['getPermissions'](_0x58f2dd['channelId'])['modifyAll'];return _0x74a9d1&&_0x26a8a3||_0x16cb07&&_0x16eec7||!_0x74a9d1&&_0x16473f&&!_0x16eec7;}),this['bind']('isReadOnly')['to'](_0x58f2dd,'isReadOnly'),this['_repository']=_0x17a819;}get['weight'](){return Math['max'](function(_0x10e1c6){const _0xbac021=document['createElement']('div');return _0xbac021['innerHTML']=_0x10e1c6,_0xbac021['textContent']['length'];}(this['content']),0xc8);}['update'](_0x235885){const {threadId:_0x2c0c1a,id:_0x2c5e73}=this;if(!this['_repository']['hasCommentThread'](_0x2c0c1a))throw new _0x23709e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x47f8d5}=this['_repository']['getCommentThread'](_0x2c0c1a);this['_repository']['fire'](Nt('updateComment',_0x47f8d5,_0x2c0c1a),{'channelId':_0x47f8d5,'threadId':_0x2c0c1a,'commentId':_0x2c5e73,..._0x235885});}['setAttribute'](_0x2a0ebe,_0x55775e){const _0x391ee7=wt(this['attributes']);yt(_0x391ee7,_0x2a0ebe,_0x55775e),this['update']({'attributes':_0x391ee7});}['removeAttribute'](_0x2c1c15){const _0x2e461f=wt(this['attributes']);Ct(_0x2e461f,_0x2c1c15),this['update']({'attributes':_0x2e461f});}['remove'](_0x44110c={}){if(!_0x44110c['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x559404,id:_0x33a205}=this;if(!this['_repository']['hasCommentThread'](_0x559404))throw new _0x23709e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4176bc}=this['_repository']['getCommentThread'](_0x559404);this['_repository']['fire'](Nt('removeComment',_0x4176bc,_0x559404),{'channelId':_0x4176bc,'threadId':_0x559404,'commentId':_0x33a205,..._0x44110c});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x4d98c1,..._0x5d58d7){for(const _0x52b96a of _0x5d58d7)void 0x0!==_0x52b96a&&(_0x4d98c1+=':'+String(_0x52b96a));return _0x4d98c1;}class ot extends _0x349e0a{constructor(_0x27279f){super(_0x27279f),this['set']('hasContent',!0x1);}['refresh'](){const _0x4deb8b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x81c2fa of _0x4deb8b['getRanges']())if(this['_hasContent'](_0x81c2fa))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x56ae7b=_0x1847cc(),ranges:_0x59e42e,comment:_0x4e0259}={}){const _0x499c2f=this['editor']['model'],_0x462c76=_0x59e42e??Array['from'](_0x499c2f['document']['selection']['getRanges']()),_0x1445f5=[];for(const _0x2dc820 of _0x462c76)this['_hasContent'](_0x2dc820)&&_0x1445f5['push'](this['_trimToContent'](_0x2dc820));if(!_0x1445f5['length'])throw new _0x23709e('addcommentthreadcommand-incorrect-ranges',null);_0x4e0259&&this['_createCommentThread'](_0x56ae7b,_0x4e0259),this['_createMarkersFromRanges'](_0x56ae7b,_0x1445f5,!!_0x4e0259);}['_createMarkersFromRanges'](_0x432b3d,_0x53b57f,_0xc64560){this['editor']['model']['change'](_0x282eff=>{for(const _0x140a29 of _0x53b57f){const _0x1ad97a=_0x1847cc()['substr'](0x1,0x5),_0x4fa427='comment:'+_0x432b3d+':'+_0x1ad97a;_0x282eff['addMarker'](_0x4fa427,{'range':_0x140a29,'usingOperation':_0xc64560,'affectsData':_0xc64560});}});}['_createCommentThread'](_0x5b8543,_0x2b9e89){const _0x4f32e5=this['editor']['plugins']['get']('CommentsRepository'),_0x1119c2=this['editor']['config']['get']('collaboration.channelId'),_0xf81027=this['editor']['plugins']['get']('Users')['me'];if(!_0xf81027)throw new _0x23709e('addcommentthreadcommand-user-not-found',null);_0x4f32e5['addCommentThread']({'threadId':_0x5b8543,'channelId':_0x1119c2,'comments':[{'authorId':_0xf81027['id'],'content':_0x2b9e89,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3fc906){for(const _0x2c9976 of _0x3fc906['getItems']())if(this['_itemIsContent'](_0x2c9976))return!0x0;return!0x1;}['_itemIsContent'](_0x577c7f){return _0x577c7f['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x577c7f)&&!_0x577c7f['is']('element','tableCell');}['_trimToContent'](_0x475a1e){const _0x372cfe=_0x3170b9=>!this['_itemIsContent'](_0x3170b9['item']),_0xb05aa5=_0x475a1e['start']['getLastMatchingPosition'](_0x372cfe),_0x5acbf6=_0x475a1e['end']['getLastMatchingPosition'](_0x372cfe,{'direction':'backward'});return this['editor']['model']['createRange'](_0xb05aa5,_0x5acbf6);}}class b extends _0x183679{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b2337){super(_0x2b2337),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x456331=this['editor'],_0x540c40=_0x456331['model']['document']['selection'],_0x41ec13=_0x3a7083(()=>this['refreshSelectedViews'](),0xa);_0x540c40['on']('change:range',(_0x580067,_0x4de771)=>{_0x4de771['directChange']&&(_0x41ec13['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x456331['editing']['view']['document'],'change:isFocused',(_0x5d4ba6,_0x288a05,_0x263070)=>{_0x263070&&_0x41ec13();}),this['listenTo'](_0x456331['ui']['focusTracker'],'change:isFocused',(_0x3c724f,_0x1f9cfe,_0x211d05)=>{_0x211d05||this['fire']('blur',{'isAnnotationTracked':_0x38d860=>this['_editorAnnotationsData']['has'](_0x38d860['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x10c14c){if(this['_editorAnnotations']['has'](_0x10c14c['view']))return;this['_editorAnnotations']['add'](_0x10c14c['view']),this['editor']['ui']['focusTracker']['add'](_0x10c14c['view']['element']);const _0x2b45dd=this['editor']['plugins']['get'](y);this['listenTo'](_0x2b45dd['collection'],'remove',(_0x1c516e,_0x383d4e)=>{this['editor']['ui']['focusTracker']['remove'](_0x383d4e['view']['element']),this['_editorAnnotations']['delete'](_0x383d4e['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x39c973){if('function'!=typeof _0x39c973)throw new _0x23709e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x39c973);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x5e8135,annotations:_0x5216e2}){const _0x4d3784=[],_0x1cf80e=this['editor']['model']['document']['selection'],_0x436a18=Array['from'](_0x1cf80e['getRanges']());for(const [_0x965536,_0x32d7f2]of this['_editorAnnotationsData']){const _0x195bb6=_0xd4d727(_0x32d7f2),_0x4d439d=_0x5216e2['getByInnerView'](_0x965536);_0x195bb6&&_0x4d439d&&_0x4d3784['push']({'annotation':_0x4d439d,'range':_0x195bb6});}function _0xd4d727(_0x4ad657){for(const _0x56aa29 of _0x4ad657)for(const _0x5796ae of _0x436a18)if(_0x56aa29['containsRange'](_0x5796ae,!_0x1cf80e['isCollapsed']))return _0x56aa29;return null;}return _0x4d3784['sort']((_0x2a165b,_0x35e19b)=>{const _0x3aff9d=_0x2a165b['range'],_0x5f0d11=_0x35e19b['range'];if(!_0x3aff9d['isEqual'](_0x5f0d11)){if(_0x3aff9d['containsRange'](_0x5f0d11,!0x0))return 0x1;if(_0x5f0d11['containsRange'](_0x3aff9d,!0x0))return-0x1;}return _0x2a165b['annotation']==_0x5e8135?-0x1:_0x35e19b['annotation']==_0x5e8135?0x1:0x0;})['map'](_0x307542=>_0x307542['annotation']);}get['_editorAnnotationsData'](){const _0x4aeb61=new Map();for(const _0x52cec1 of Array['from'](this['_dataCollectors']))for(const [_0x4991e6,_0x537bb5]of _0x52cec1())_0x4aeb61['set'](_0x4991e6,_0x537bb5);return _0x4aeb61;}}class st extends _0x183679{['afterInit'](){const _0x35c05c=this['editor'];if(!_0x35c05c['plugins']['has']('RestrictedEditingModeEditing'))return;_0x35c05c['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x183679{constructor(_0x4343e4){super(_0x4343e4),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x60e4ad=this['editor'],_0x1e31f0=_0x60e4ad['commands']['get']('importWord'),_0x2ecbab=_0x60e4ad['plugins']['get'](it);_0x1e31f0&&(_0x1e31f0['on']('execute',(_0x483214,[,_0x4257b0])=>{_0x4257b0['collaboration_features']={'comments':!0x0,'user_id':_0x2ecbab['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1e31f0,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x10ea0d,_0x4e9b08){const {comment_threads:_0x445045}=_0x4e9b08;_0x445045&&_0x445045['forEach'](({thread_id:_0x40b3dc,comments:_0x519526,is_resolved:_0x411eba})=>{const _0x3642fc=new Date(),_0x5e2e10=_0x519526['map'](({author:_0x3c8930,content:_0x540a76,created_at:_0x5685b2})=>({'content':_0x540a76,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x3642fc,'attributes':{'@external':{'authorName':_0x3c8930,'createdAt':_0x5685b2?new Date(_0x5685b2):new Date(),'source':'importWord'}}})),_0x4ff370=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4ff370,'threadId':_0x40b3dc,'comments':_0x5e2e10,'resolvedAt':_0x411eba?_0x3642fc:null});});}}class at extends _0x183679{constructor(_0x1ab23f){super(_0x1ab23f),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x441fb8=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x441fb8,'contentInsertion',(_0x4c23dc,_0x4fc647)=>this['_removeMarkersWithoutThreads'](_0x4fc647['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x5dc019){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5dc019;const _0x5b1fe8=this['editor']['plugins']['get']('CommentsRepository');for(const _0x263d47 of _0x5dc019['keys']()){const [_0x46d145,_0x1895df]=_0x263d47['split'](':');'comment'!=_0x46d145||_0x5b1fe8['hasCommentThread'](_0x1895df)||_0x5dc019['delete'](_0x263d47);}return _0x5dc019;}['_registerMarkerInClipboardPipeline'](){const _0xe4f448=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x229b8a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x229b8a&&_0xe4f448['_registerMarkerToCopy']('comment',_0x229b8a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x374834){switch(_0x374834){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0xace58d){const _0x5c7391=_0xace58d['split'](':');return{'group':_0x5c7391[0x0],'id':_0x5c7391[0x1],'part':_0x5c7391[0x2]};}class ut extends _0x183679{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x378b00,_0x110560)=>{if(!_0x110560['options']['showCommentHighlights'])return null;if(_0x110560['options']['ignoreResolvedComments']){const {id:_0x2ec205}=ft(_0x378b00['markerName']),_0x5c6c48=this['editor']['plugins']['get'](o);if(_0x5c6c48['getCommentThread'](_0x2ec205)?.['isResolved']&&_0x378b00['item'])return _0x110560['consumable']['consume'](_0x378b00['item'],'addMarker:'+_0x378b00['markerName']),_0x110560['consumable']['consume'](_0x378b00['item'],'removeMarker:'+_0x378b00['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x540b9d=>{_0x540b9d['on']('addMarker:comment',(_0x112d5d,_0x239b4e,_0x2a2579)=>{if(!_0x2a2579['options']['showCommentHighlights'])return;const _0x13c9b3=_0x239b4e['item'];if(!_0x13c9b3)return;const _0x5b30a6=_0x2a2579['mapper']['toViewElement'](_0x13c9b3);this['editor']['model']['schema']['isObject'](_0x13c9b3)&&_0x5b30a6&&!_0x5b30a6['getCustomProperty']('widget')&&_0x5b30a6['is']('containerElement')&&_0x4815a8(_0x5b30a6,_0x2a2579['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2ab91f,{writer:_0x366d71,options:_0x3bb381})=>{if(!_0x3bb381['showCommentHighlights'])return null;const _0x4b39d1=_0x366d71['createContainerElement']('div'),_0x2bc8e4=_0x366d71['createEmptyElement']('hr');return _0x366d71['addClass']('ck-horizontal-line',_0x4b39d1),_0x366d71['insert'](_0x366d71['createPositionAt'](_0x4b39d1,0x0),_0x2bc8e4),_0x4b39d1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5d47d8,{writer:_0x35ce8b,options:_0x138cf3})=>{if(!_0x138cf3['showCommentHighlights'])return null;const _0x1f99f9=_0x35ce8b['createContainerElement']('span'),_0xb5f9bc=_0x35ce8b['createEmptyElement']('img');return _0x35ce8b['addClass']('image-inline',_0x1f99f9),_0x35ce8b['insert'](_0x35ce8b['createPositionAt'](_0x1f99f9,0x0),_0xb5f9bc),_0x1f99f9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5336cf,{writer:_0x59057d,options:_0x1e28bf})=>{if(_0x1e28bf['showCommentHighlights'])return _0x59057d['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xc9e9d,_0x1f22be,_0x460ebb)=>{_0x460ebb['options']['showCommentHighlights']&&_0xc9e9d['stop']();},{'priority':'high'});}}class r extends _0x183679{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(_0x4c3f01){super(_0x4c3f01),this['set']('isThreadsLoadingPaused',!0x0),_0x4c3f01['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x28b2cd,_0x10e15e,_0x1b9cef,_0x44c599)=>{const _0x89e30=_0x4c3f01['plugins']['get'](o),_0x1a44d4=_0x1b9cef?ft(_0x1b9cef)['id']:null;_0x4c3f01['model']['change'](()=>{if(_0x1a44d4){const _0x1f38ef=this['getAllMarkersForId'](_0x1a44d4);for(const _0x34aaf2 of _0x1f38ef)_0x4c3f01['editing']['reconvertMarker'](_0x34aaf2);}if(_0x44c599){const {id:_0x3aafd0}=ft(_0x44c599),_0x1c3253=_0x89e30['getCommentThread'](_0x3aafd0);if(_0x1c3253&&_0x1c3253['unlinkedAt'])return;if(_0x1c3253&&!_0x1c3253['isAttached'])return;const _0xb35a3b=this['getAllMarkersForId'](_0x3aafd0);for(const _0x1e4c8a of _0xb35a3b)_0x4c3f01['editing']['reconvertMarker'](_0x1e4c8a);}}),_0x1a44d4&&this['scrollToThreadMarker'](_0x1a44d4);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x97d66a=this['editor'],_0x48c558=_0x97d66a['plugins']['get'](o),_0x474ca6=_0x97d66a['config']['get']('collaboration.channelId'),_0xb5b0f9=_0x48c558['getCommentThreads']()['filter'](_0x5163af=>_0x5163af['channelId']!==_0x474ca6);_0x97d66a['commands']['add']('addCommentThread',new ot(_0x97d66a)),this['listenTo'](_0x97d66a,'change:isReadOnly',(_0x504a54,_0xe6ec5b,_0x74879d)=>{_0x48c558['switchReadOnly'](_0x74879d,_0x97d66a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x48c558,dt('addCommentThread',_0x474ca6),(_0x428fe8,{threadId:_0x13f2b1})=>{const _0x35b166=this['editor']['plugins']['get'](o)['getCommentThread'](_0x13f2b1);_0x35b166?.['unlinkedAt']&&this['_attachArchivedThread'](_0x13f2b1);}),this['listenTo'](_0x48c558,dt('removeCommentThread',_0x474ca6),(_0x41526f,{threadId:_0x585722})=>{_0x97d66a['model']['enqueueChange']({'isUndoable':!0x1},_0x3c6749=>{const _0x4b76ff=this['getAllMarkersForId'](_0x585722);for(const _0x324a18 of _0x4b76ff)_0x3c6749['removeMarker'](_0x324a18);});}),this['listenTo'](_0x48c558,dt('resolveCommentThread',_0x474ca6),(_0x2efcc4,{threadId:_0x100e08})=>{(this['_reconvertMarkers'](_0x100e08),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x100e08)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x48c558,dt('reopenCommentThread',_0x474ca6),(_0x30f6ce,{threadId:_0x1da04b})=>{this['_reconvertMarkers'](_0x1da04b);},{'priority':'low'}),this['listenTo'](_0x48c558,dt('addComment',_0x474ca6),(_0x55833e,{threadId:_0x252175,isFromAdapter:_0x338479})=>{const _0x63b4dd=this['getAllMarkersForId'](_0x252175);if(_0x338479||0x0==_0x63b4dd['length']||!_0x48c558['hasCommentThread'](_0x252175))return;0x1===_0x48c558['getCommentThread'](_0x252175)['length']&&_0x97d66a['model']['enqueueChange']({'isUndoable':!0x1},_0x49e740=>{for(const _0x41f06d of _0x63b4dd)_0x49e740['updateMarker'](_0x41f06d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xb5b0f9);}['afterInit'](){!async function(_0x3157ea){const _0x4e2e48=_0x2abede([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]),_0x466a3a=0x73460ab3,_0x2668ab=0x73417cf3^_0x466a3a,_0x12e681=window[_0x2abede([0x44,0x61,0x74,0x65])][_0x2abede([0x6e,0x6f,0x77])](),_0x8210cb=_0x3157ea[_0x2abede([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x33b96f=new window[(_0x2abede([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18fb8f=>{_0x8210cb[_0x2abede([0x6f,0x6e,0x63,0x65])](_0x2abede([0x72,0x65,0x61,0x64,0x79]),_0x18fb8f);}),_0x1208c6={[_0x2abede([0x6b,0x74,0x79])]:_0x2abede([0x45,0x43]),[_0x2abede([0x75,0x73,0x65])]:_0x2abede([0x73,0x69,0x67]),[_0x2abede([0x63,0x72,0x76])]:_0x2abede([0x50,0x2d,0x32,0x35,0x36]),[_0x2abede([0x78])]:_0x2abede([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]),[_0x2abede([0x79])]:_0x2abede([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]),[_0x2abede([0x61,0x6c,0x67])]:_0x2abede([0x45,0x53,0x32,0x35,0x36])},_0x1bd43a=_0x8210cb[_0x2abede([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2abede([0x67,0x65,0x74])](_0x2abede([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1a6b10(){let _0x2e42b3,_0x593266=null,_0x37d7de=null;try{if(_0x1bd43a==_0x2abede([0x47,0x50,0x4c]))return _0x2abede([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e42b3=_0x163880(),!_0x2e42b3)return _0x2abede([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e42b3[_0x2abede([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x37d7de=_0x5f2485(_0x2e42b3[_0x2abede([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e42b3[_0x2abede([0x6a,0x74,0x69])])),await _0x410bd2()?_0x59cec2()?_0x4c5ae2()?_0x2abede([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5cd0f6()?(_0x2e42b3[_0x2abede([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2abede([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x593266=_0xba82fc(_0x2abede([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2e42b3[_0x2abede([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2abede([0x74,0x72,0x69,0x61,0x6c])&&(_0x593266=_0xba82fc(_0x2abede([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59d69d()):_0x2abede([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2abede([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2abede([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2abede([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4c5ae2(){const _0x2d4e1d=[_0x2abede([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2abede([0x74,0x72,0x69,0x61,0x6c])][_0x2abede([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e42b3[_0x2abede([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x12e681/0x3e8:0xe10*_0x2668ab;return _0x2e42b3[_0x2abede([0x65,0x78,0x70])]<_0x2d4e1d;}function _0x59cec2(){const _0x4580d7=_0x2e42b3[_0x2abede([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4580d7)return!0x1;if(_0x4580d7[_0x2abede([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2abede([0x2a])))return!0x0;if(_0x4580d7[_0x2abede([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2abede([0x43,0x4d,0x54])))return!0x0;if(_0x4580d7[_0x2abede([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2abede([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x41dfc5())return!0x0;if(_0x4580d7[_0x2abede([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2abede([0x52,0x43,0x4d,0x54]))){if(_0xdce9ca())return!0x0;if(_0x539740()||_0xbffbb5())return!0x0;}return!0x1;}function _0x5cd0f6(){const _0x1fd657=_0x2e42b3[_0x2abede([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1fd657||0x0==_0x1fd657[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x42a1ab}=new URL(window[_0x2abede([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1fd657[_0x2abede([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42a1ab))return!0x0;const _0x417868=_0x42a1ab[_0x2abede([0x73,0x70,0x6c,0x69,0x74])](_0x2abede([0x2e]));return _0x1fd657[_0x2abede([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x416116=>_0x416116[_0x2abede([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2abede([0x2a])))[_0x2abede([0x6d,0x61,0x70])](_0x1cb59b=>_0x1cb59b[_0x2abede([0x73,0x70,0x6c,0x69,0x74])](_0x2abede([0x2e])))[_0x2abede([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x48254e=>_0x48254e[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x417868[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2abede([0x6d,0x61,0x70])](_0x43a246=>Array(_0x417868[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x43a246[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2abede([0x66,0x69,0x6c,0x6c])](_0x43a246[0x0]===_0x2abede([0x2a])?_0x2abede([0x2a]):'')[_0x2abede([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x43a246))[_0x2abede([0x73,0x6f,0x6d,0x65])](_0x40f996=>_0x417868[_0x2abede([0x65,0x76,0x65,0x72,0x79])]((_0xeefb31,_0x166776)=>_0x40f996[_0x166776]===_0xeefb31||_0x40f996[_0x166776]===_0x2abede([0x2a])));}function _0x59d69d(){return _0x593266&&_0x37d7de?new window[(_0x2abede([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5a77b7,_0x8a5837)=>{_0x593266[_0x2abede([0x74,0x68,0x65,0x6e])](_0x5a77b7,_0x8a5837),_0x37d7de[_0x2abede([0x74,0x68,0x65,0x6e])](_0x3d28bd=>{_0x3d28bd!=_0x2abede([0x56,0x61,0x6c,0x69,0x64])&&_0x5a77b7(_0x3d28bd);},_0x8a5837);}):_0x593266||_0x37d7de||_0x2abede([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5f2485(_0x3a62e4,_0x386273){return new window[(_0x2abede([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x41e84d=>{if(_0x5c74b8())return _0x41e84d(_0x2abede([0x56,0x61,0x6c,0x69,0x64]));_0x1add2a(),_0x8210cb[_0x2abede([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2abede([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2fc629=!0x1;const _0x21c522=_0x1847cc();function _0x112eb2(_0x5acc5a){return!!_0x5acc5a&&(typeof _0x5acc5a===_0x2abede([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5acc5a===_0x2abede([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5acc5a[_0x2abede([0x74,0x68,0x65,0x6e])]===_0x2abede([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5acc5a[_0x2abede([0x63,0x61,0x74,0x63,0x68])]===_0x2abede([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x407eaf(_0x109020){_0xe77423(_0x109020)[_0x2abede([0x74,0x68,0x65,0x6e])](_0x2af62b=>{if(!_0x2af62b||_0x2af62b[_0x2abede([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2abede([0x6f,0x6b]))return _0x2abede([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x510d62(_0x40387d(_0x21c522+_0x386273))!=_0x2af62b[_0x2abede([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2abede([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2abede([0x56,0x61,0x6c,0x69,0x64]);})[_0x2abede([0x74,0x68,0x65,0x6e])](_0xd50707=>(_0x3a1e87(),_0xd50707),()=>{const _0x2853c4=_0x407a5b();return null==_0x2853c4?(_0x3a1e87(),_0x2abede([0x56,0x61,0x6c,0x69,0x64])):_0x2abede(_0x12e681-_0x2853c4>(0x574a8eb3^_0x466a3a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2abede([0x74,0x68,0x65,0x6e])](_0x41e84d)[_0x2abede([0x63,0x61,0x74,0x63,0x68])](()=>{_0x41e84d(_0x2abede([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x37b753=0x7370e433^_0x466a3a;function _0x3a1e87(){const _0xbf7b78=_0x2abede([0x6c,0x6c,0x63,0x74,0x2d])+_0x510d62(_0x40387d(_0x3a62e4)),_0x7b773c=_0x5665f6(_0x510d62(window[_0x2abede([0x4d,0x61,0x74,0x68])][_0x2abede([0x63,0x65,0x69,0x6c])](_0x12e681/_0x37b753)));window[_0x2abede([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2abede([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xbf7b78,_0x7b773c);}function _0x407a5b(){const _0x53735e=_0x2abede([0x6c,0x6c,0x63,0x74,0x2d])+_0x510d62(_0x40387d(_0x3a62e4)),_0xdc49a4=window[_0x2abede([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2abede([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x53735e);return _0xdc49a4?window[_0x2abede([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5665f6(_0xdc49a4),0x10)*_0x37b753:null;}function _0xe77423(_0x3dc068){return new window[(_0x2abede([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3b5132,_0x2fe122)=>{_0x3dc068[_0x2abede([0x74,0x68,0x65,0x6e])](_0x3b5132,_0x2fe122),window[_0x2abede([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2fe122,0x7347de73^_0x466a3a);});}}_0x8210cb[_0x2abede([0x6f,0x6e])](_0x2abede([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xcaa6d9,_0xeece89)=>{if(_0xeece89[0x0]!=_0x3a62e4)return _0x41e84d(_0x2abede([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xeece89[0x1]={..._0xeece89[0x1],[_0x2abede([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x21c522};},{[_0x2abede([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2abede([0x68,0x69,0x67,0x68])}),_0x8210cb[_0x2abede([0x6f,0x6e])](_0x2abede([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xbf3be4=>{_0x112eb2(_0xbf3be4[_0x2abede([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2fc629=!0x0,_0x407eaf(_0xbf3be4[_0x2abede([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2abede([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2abede([0x6c,0x6f,0x77])}),_0x33b96f[_0x2abede([0x74,0x68,0x65,0x6e])](()=>{_0x2fc629||_0x41e84d(_0x2abede([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5c74b8(){return _0x8210cb[_0x2abede([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2abede([0x76,0x69,0x65,0x77])][_0x2abede([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2abede([0x61,0x75,0x74,0x6f]);}function _0x1add2a(){_0x8210cb[_0x2abede([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2abede([0x76,0x69,0x65,0x77])][_0x2abede([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2abede([0x61,0x75,0x74,0x6f]);}}function _0xba82fc(_0x556dc4){const _0x876f9a=[new window[(_0x2abede([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2bf151=>setTimeout(_0x2bf151,0x734f347f^_0x466a3a)),_0x33b96f[_0x2abede([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2abede([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d1f99=>{let _0x5e889d=0x0;_0x8210cb[_0x2abede([0x6d,0x6f,0x64,0x65,0x6c])][_0x2abede([0x6f,0x6e])](_0x2abede([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1fd60c,_0x5df716)=>{_0x5df716[0x0][_0x2abede([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5e889d++,_0x5e889d==(0x73460b4b^_0x466a3a)&&(_0x1d1f99(),_0x1fd60c[_0x2abede([0x6f,0x66,0x66])]());});}))];return window[_0x2abede([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2abede([0x72,0x61,0x63,0x65])](_0x876f9a)[_0x2abede([0x74,0x68,0x65,0x6e])](()=>_0x556dc4);}async function _0x5ab3f2(){await _0x33b96f,_0x8210cb[_0x2abede([0x6d,0x6f,0x64,0x65,0x6c])][_0x2abede([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1a1424,_0x8210cb[_0x2abede([0x6d,0x6f,0x64,0x65,0x6c])][_0x2abede([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1a1424,_0x8210cb[_0x2abede([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2abede([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x41dfc5(){return window[_0x2abede([0x67,0x6c,0x6f,0x62])]&&window[_0x2abede([0x67,0x6c,0x6f,0x62])][_0x2abede([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0xdce9ca(){return _0x31fb62(_0x2abede([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x234efa(_0x2abede([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2abede([0x73,0x74,0x61,0x74,0x65])]==_0x2abede([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x539740(){return _0x31fb62(_0x2abede([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 _0xbffbb5(){return _0x31fb62(_0x2abede([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x411879(_0x51f8a3){const _0x434713=_0x4519f4();_0x8210cb[_0x434713]=_0x2abede([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x51f8a3,_0x51f8a3!=_0x2abede([0x56,0x61,0x6c,0x69,0x64])&&_0x5ab3f2();}function _0x4519f4(){const _0x1a355a=window[_0x2abede([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2abede([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2abede([0x6e,0x6f,0x77])]())[_0x2abede([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2abede([0x2e]),'');let _0x8be1be=_0x2abede([0x4b]);for(let _0x4551dc=0x0;_0x4551dc<_0x1a355a[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4551dc+=0x2){let _0x7695e=window[_0x2abede([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1a355a[_0x2abede([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4551dc,_0x4551dc+0x2));_0x7695e>=_0x4e2e48[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x7695e-=_0x4e2e48[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x8be1be+=_0x4e2e48[_0x7695e];}return _0x8be1be;}function _0x163880(){const _0x458fad=_0x1bd43a[_0x2abede([0x73,0x70,0x6c,0x69,0x74])](_0x2abede([0x2e]));if(0x3!=_0x458fad[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x56db0f(_0x458fad[0x1]);function _0x56db0f(_0x325248){const _0x556899=_0x15d83c(_0x325248);return _0x556899&&_0x1b1e50()?_0x556899:null;function _0x1b1e50(){const _0x4ad34e=_0x556899[_0x2abede([0x6a,0x74,0x69])],_0x57f38c=window[_0x2abede([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ad34e[_0x2abede([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4ad34e[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x478059={..._0x556899,[_0x2abede([0x6a,0x74,0x69])]:_0x4ad34e[_0x2abede([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4ad34e[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x478059[_0x2abede([0x76,0x63])],_0x40387d(_0x478059)==_0x57f38c;}}}async function _0x410bd2(){let _0xb52da4=!0x0;try{const _0x41628f=_0x1bd43a[_0x2abede([0x73,0x70,0x6c,0x69,0x74])](_0x2abede([0x2e])),[_0x4d5728,_0x5ce0e4,_0x27ad7d]=_0x41628f;return _0x36cae9(_0x4d5728),await _0x1c5b38(_0x4d5728,_0x5ce0e4,_0x27ad7d),_0xb52da4;}catch{return!0x1;}function _0x36cae9(_0x5684c1){const _0x1b268f=_0x15d83c(_0x5684c1);_0x1b268f&&_0x1b268f[_0x2abede([0x61,0x6c,0x67])]==_0x2abede([0x45,0x53,0x32,0x35,0x36])||(_0xb52da4=!0x1);}async function _0x1c5b38(_0x242ca6,_0x11a3d9,_0x2e5981){const _0x1f0171=window[_0x2abede([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2abede([0x66,0x72,0x6f,0x6d])](_0x2cc824(_0x2e5981),_0x538cc5=>_0x538cc5[_0x2abede([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x53650=new window[(_0x2abede([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2abede([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x242ca6+_0x2abede([0x2e])+_0x11a3d9),_0x399fda=window[_0x2abede([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2abede([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x399fda)return;const _0x91bbbf=await _0x399fda[_0x2abede([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2abede([0x6a,0x77,0x6b]),_0x1208c6,{[_0x2abede([0x6e,0x61,0x6d,0x65])]:_0x2abede([0x45,0x43,0x44,0x53,0x41]),[_0x2abede([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2abede([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2abede([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x399fda[_0x2abede([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2abede([0x6e,0x61,0x6d,0x65])]:_0x2abede([0x45,0x43,0x44,0x53,0x41]),[_0x2abede([0x68,0x61,0x73,0x68])]:{[_0x2abede([0x6e,0x61,0x6d,0x65])]:_0x2abede([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x91bbbf,_0x1f0171,_0x53650)||(_0xb52da4=!0x1);}}function _0x15d83c(_0x5adbf5){return _0x5adbf5[_0x2abede([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2abede([0x65,0x79]))?JSON[_0x2abede([0x70,0x61,0x72,0x73,0x65])](_0x2cc824(_0x5adbf5)):null;}function _0x2cc824(_0x557937){return window[_0x2abede([0x61,0x74,0x6f,0x62])](_0x557937[_0x2abede([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2abede([0x2b]))[_0x2abede([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2abede([0x2f])));}function _0x40387d(_0x428450){let _0xb423e1=0x1505;function _0x27a0c9(_0xea36a4){for(let _0x1c4b92=0x0;_0x1c4b92<_0xea36a4[_0x2abede([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c4b92++){const _0x2d20ef=_0xea36a4[_0x2abede([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c4b92);_0xb423e1=(_0xb423e1<<0x5)+_0xb423e1+_0x2d20ef,_0xb423e1&=_0xb423e1;}}function _0x46ae56(_0x15e62c){Array[_0x2abede([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x15e62c)?_0x15e62c[_0x2abede([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x46ae56):_0x15e62c&&typeof _0x15e62c==_0x2abede([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2abede([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x15e62c)[_0x2abede([0x73,0x6f,0x72,0x74])]()[_0x2abede([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x11f9fd,_0x15b37c])=>{_0x27a0c9(_0x11f9fd),_0x46ae56(_0x15b37c);}):_0x27a0c9(window[_0x2abede([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x15e62c));}return _0x46ae56(_0x428450),_0xb423e1>>>0x0;}function _0x510d62(_0x53a6b3){return _0x53a6b3[_0x2abede([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2abede([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2abede([0x30]));}function _0x5665f6(_0x59df67){return _0x59df67[_0x2abede([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2abede([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2abede([0x6a,0x6f,0x69,0x6e])]('');}function _0x31fb62(_0x6460ff){return _0x8210cb[_0x2abede([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2abede([0x68,0x61,0x73])](_0x6460ff);}function _0x234efa(_0x14b43d){return _0x8210cb[_0x2abede([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2abede([0x67,0x65,0x74])](_0x14b43d);}function _0x1a1424(){}function _0x2abede(_0x4712e6){return _0x4712e6['map'](_0x38dcb6=>String['fromCharCode'](_0x38dcb6))['join']('');}_0x411879(await _0x1a6b10());}(this);}['destroy'](){const _0x5bd718=this['editor']['plugins']['get'](o),_0x35f8b9=this['editor']['config']['get']('collaboration.channelId');for(const _0x360002 of _0x5bd718['getCommentThreads']({'channelId':_0x35f8b9}))_0x5bd718['_detachCommentThread'](_0x360002['id']),_0x5bd718['_threads']['delete'](_0x360002['id']);super['destroy']();}['hasMarkerForId'](_0x419cab){return this['getAllMarkersForId'](_0x419cab)['length']>0x0;}['getAllMarkersForId'](_0x2d6ac7){const _0x43f240=[];for(const _0x1ea580 of this['editor']['model']['markers'])_0x1ea580['name']['startsWith']('comment:'+_0x2d6ac7)&&_0x43f240['push'](_0x1ea580);return _0x43f240;}['scrollToThreadMarker'](_0xd5852){setTimeout(()=>{const _0x5d9ad1=this['_getTargetForId'](_0xd5852);if(!_0x5d9ad1)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xd5852&&nt({'target':_0x5d9ad1[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xc912a6){this['editor']['model']['change'](()=>{for(const _0x34e3d1 of this['getAllMarkersForId'](_0xc912a6))this['editor']['editing']['reconvertMarker'](_0x34e3d1);});}['_attachArchivedThread'](_0x119c83){const _0x14777e=this['editor']['plugins']['get'](o),_0x15f294=this['editor']['plugins']['get'](b),_0x2863d0=_0x14777e['getCommentThread'](_0x119c83);if(!_0x2863d0['isAttached']){const _0x3d74aa=_0x2863d0['attachTo'](()=>this['_getTargetForId'](_0x2863d0['id']));_0x15f294['registerAnnotation'](_0x3d74aa),_0x2863d0['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x226023=this['editor'],_0x2ce49b=_0x226023['plugins']['get'](it);_0x226023['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x558751,_0x3fe82c)=>{const {id:_0x5ee786}=ft(_0x558751['markerName']),_0x2b2d22=_0x226023['plugins']['get'](o)['getCommentThread'](_0x5ee786),_0x462416=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5ee786;let _0x28f372;if(_0x2b2d22&&_0x2b2d22['isResolved']&&!_0x462416&&_0x558751['item'])return _0x3fe82c['consumable']['consume'](_0x558751['item'],'addMarker:'+_0x558751['markerName']),_0x3fe82c['consumable']['consume'](_0x558751['item'],'removeMarker:'+_0x558751['markerName']),null;const _0x106327=['ck-comment-marker'];return _0x462416&&_0x106327['push']('ck-comment-marker--active'),_0x28f372=_0x2b2d22?.['length']?_0x2b2d22['comments']['first']['author']['id']:_0x2ce49b['me']['id'],{'classes':_0x106327,'attributes':{'data-comment':_0x5ee786,'data-author-id':_0x28f372}};}}),_0x226023['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4d274e,{options:_0x35270a})=>{if(_0x35270a['showCommentHighlights'])return null;const _0x9fb8f1=_0x226023['plugins']['get'](o),_0x2cc9ba=_0x226023['model']['markers']['get'](_0x4d274e),{id:_0x20b941,part:_0x552ac2}=ft(_0x4d274e);return _0x2cc9ba&&!_0x2cc9ba['affectsData']||_0x35270a['ignoreResolvedComments']&&_0x9fb8f1['getCommentThread'](_0x20b941)?.['isResolved']?null:{'group':'comment','name':_0x552ac2?_0x20b941+':'+_0x552ac2:_0x20b941};}}),_0x226023['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x46b9b6,{writer:_0x456cd3})=>_0x456cd3['createElement']('$marker',{'data-name':'comment:'+_0x46b9b6['getAttribute']('id')})}),_0x226023['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3e4088=this['editor'],_0x13da38=_0x3e4088['plugins']['get'](o),_0x55ce05=new Set(),_0x2536e6=new Set();_0x3e4088['model']['document']['registerPostFixer'](_0x4a2f10=>{let _0x57f1bb=!0x1;for(const {name:_0x45d8d2,data:_0xc206d6}of _0x3e4088['model']['document']['differ']['getChangedMarkers']()){const {group:_0x32a0b0,id:_0x174eb1}=ft(_0x45d8d2);let _0x117127=_0xc206d6['newRange'];if('comment'!==_0x32a0b0||!_0x117127)continue;const _0x4b90e0='$graveyard'===_0x117127['root']['rootName'];_0x4b90e0||(_0x117127=ht(_0x117127,_0x3e4088['model']),!_0x117127||_0x117127['isCollapsed']||!_0xc206d6['newRange']||_0x117127['isEqual'](_0xc206d6['newRange']))?_0x3e4088['model']['hasContent'](_0x117127)&&!_0x4b90e0?this['isThreadsLoadingPaused']?_0x55ce05['add'](_0x45d8d2):this['_handleThreadMarker'](_0x45d8d2,_0x174eb1):(_0x2536e6['add'](_0x45d8d2),_0x55ce05['delete'](_0x45d8d2),_0x4a2f10['removeMarker'](_0x45d8d2),_0x57f1bb=!0x0):(_0x4a2f10['updateMarker'](_0x45d8d2,{'range':_0x117127}),_0x57f1bb=!0x0);}return _0x57f1bb;}),this['on']('change:isThreadsLoadingPaused',(_0xe71b5a,_0x16a544,_0x21281b)=>{if(!_0x21281b&&_0x55ce05['size'])for(const _0x94ba50 of _0x55ce05){const {id:_0x3b13be}=ft(_0x94ba50);_0x55ce05['delete'](_0x94ba50),_0x3e4088['model']['markers']['get'](_0x94ba50)&&this['_handleThreadMarker'](_0x94ba50,_0x3b13be);}}),this['listenTo'](_0x3e4088['model']['document'],'change',()=>{for(const {name:_0x2626b2,data:{newRange:_0x476490}}of _0x3e4088['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3739e3,id:_0x3d8d49}=ft(_0x2626b2);if('comment'!==_0x3739e3)continue;const _0x347e18=_0x13da38['getCommentThread'](_0x3d8d49),_0x2a10b8=this['hasMarkerForId'](_0x3d8d49);_0x347e18&&(!_0x347e18['_hasTargetInContent']&&_0x476490&&_0x3e4088['editing']['view']['once']('render',()=>{const _0x2714d5=_0x3e4088['plugins']['get'](y),_0x30fa4d=_0x13da38['_threadToController']['get'](_0x347e18)['view'];_0x2714d5['getByInnerView'](_0x30fa4d)['refreshVisibility']();},{'priority':'low'}),_0x347e18['_hasTargetInContent']=_0x2a10b8||!!_0x476490),_0x476490||(_0x2536e6['add'](_0x2626b2),_0x55ce05['delete'](_0x2626b2));}for(const _0xe8c748 of _0x2536e6){const {id:_0x5855f}=ft(_0xe8c748),_0x4786b5=_0x13da38['getCommentThread'](_0x5855f);if(_0x55ce05['delete'](_0xe8c748),!_0x4786b5)continue;const _0x40ecc2=this['hasMarkerForId'](_0x5855f);_0x40ecc2||_0x4786b5['isSubmitted']?_0x40ecc2||_0x4786b5['unlinkedAt']||_0x4786b5['setUnlinkedAt'](new Date()):_0x4786b5['remove']();}_0x2536e6['clear']();});}['_handleInitialThreads'](_0x46ae92){_0x46ae92['forEach'](_0x2d9eb1=>{_0x2d9eb1['unlinkedAt']&&this['_attachArchivedThread'](_0x2d9eb1['id']);});}['_getTargetForId'](_0x2d0e24){const _0x14ee52=this['editor'],_0x3c1690=this['getAllMarkersForId'](_0x2d0e24);return et(_0x14ee52['editing'],_0x3c1690);}['_getTextContext'](_0x3265bb){const _0x42b94f=this['getAllMarkersForId'](_0x3265bb);let _0x11960a='',_0x3f4e3e=!0x1;for(const _0x1f3c74 of _0x42b94f){const _0x5417e5=_0x1f3c74['getRange']();for(const _0xbe5f9c of Array['from'](_0x5417e5['getItems']()))_0xbe5f9c['is']('$textProxy')?(_0x11960a&&_0x3f4e3e&&(_0x11960a+='\x20',_0x3f4e3e=!0x1),_0x11960a+=_0xbe5f9c['data']):_0x3f4e3e=!0x0;_0x3f4e3e=!0x0;}return _0x11960a['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x32b56b,_0x321570){const _0x56a745=this['editor'],_0x272abf=_0x56a745['plugins']['get'](o);let _0x40e798=_0x272abf['getCommentThread'](_0x321570);const _0xdf593f=_0x56a745['config']['get']('collaboration.channelId'),_0x3e4570=_0x56a745['plugins']['get'](b);if(_0x40e798&&(_0x40e798['unlinkedAt']&&_0x40e798['setUnlinkedAt'](null),_0x40e798['isAttached']))return _0x40e798;return!this['getAllMarkersForId'](_0x321570)[0x0]['managedUsingOperations']?_0x56a745['editing']['view']['once']('render',()=>{if(_0x272abf['getCommentThread'](_0x321570))return;const _0x417196=_0x56a745['plugins']['get'](y);_0x40e798=_0x272abf['openNewCommentThread']({'channelId':_0xdf593f,'threadId':_0x321570,'target':()=>this['_getTargetForId'](_0x321570),'context':{'type':'text','value':this['_getTextContext'](_0x321570)}});const _0x585eda=_0x272abf['_threadToController']['get'](_0x40e798)['view'],_0xb102f6=_0x417196['getByInnerView'](_0x585eda);_0xb102f6&&_0x3e4570['registerAnnotation'](_0xb102f6);},{'priority':'low'}):_0x272abf['fetchCommentThread']({'channelId':_0xdf593f,'threadId':_0x321570})['then'](_0x443ed8=>{if('destroyed'!==_0x56a745['state']){if(_0x40e798=_0x443ed8,_0x40e798&&!_0x40e798['isAttached']){const _0x5bf648=_0x40e798['attachTo'](()=>this['_getTargetForId'](_0x321570));_0x3e4570['registerAnnotation'](_0x5bf648),_0x40e798['isResolved']&&this['_reconvertMarkers'](_0x321570);}else{if(!_0x40e798){const _0x51c863=this['getAllMarkersForId'](_0x321570);_0x56a745['model']['change'](_0x5e8d3b=>{for(const _0xd383e7 of _0x51c863)_0x5e8d3b['removeMarker'](_0xd383e7);});}}}}),_0x40e798;}['_handleThreadMarker'](_0x27fbad,_0xd2b980){const _0x45c97a=this['_attachMarkerToThread'](_0x27fbad,_0xd2b980);_0x45c97a&&!_0x45c97a['context']&&_0x45c97a['setContext']({'type':'text','value':this['_getTextContext'](_0xd2b980)});}['_initAriaMarkerChangeAnnouncements'](){const _0x127195=this['editor'];rt(_0x127195['model'],({left:_0x4aa989,entered:_0x47cbb6})=>{for(const _0x1c2f7e of _0x4aa989)if(mt(_0x1c2f7e)){_0x127195['ui']['ariaLiveAnnouncer']['announce'](N(_0x127195['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3c027c of _0x47cbb6)if(mt(_0x3c027c)){_0x127195['ui']['ariaLiveAnnouncer']['announce'](N(_0x127195['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x190a8a)));break;}});}}function dt(_0x35fcf5,_0x1e5ab2){return _0x1e5ab2?_0x35fcf5+':'+_0x1e5ab2:_0x35fcf5;}function ht(_0x4ac3a7,_0x1d9650){const _0xf42db7=_0x1d9650['schema'],_0x27bb43=_0x1d9650['createRange'](_0x4ac3a7['start']);for(const _0x2408c8 of _0x4ac3a7['getWalker']()){const {type:_0x5dd244,item:_0x493599,nextPosition:_0x208baa}=_0x2408c8;if('text'===_0x5dd244||_0xf42db7['isObject'](_0x493599)){const _0x4a4a4c=_0x1d9650['createPositionBefore'](_0x493599);_0x27bb43['isCollapsed']&&(_0x27bb43['start']=_0x4a4a4c),_0x27bb43['end']=_0x208baa;}}return _0x27bb43;}function mt(_0x1782d5){return'comment'===ft(_0x1782d5['name'])['group'];}class s extends _0x183679{['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 _0xcb90ee=this['editor'],_0xa03242=_0xcb90ee['plugins']['get'](o),_0x56cf2e=_0xcb90ee['plugins']['get'](r),_0x19fbcc=_0xcb90ee['plugins']['get'](y),_0x3696fb=_0xcb90ee['plugins']['get'](b);_0xcb90ee['ui']['componentFactory']['add']('comment',()=>{const _0x2e69a9=this['_createUIButton'](_0x5a79b9);return _0x2e69a9['tooltip']=!0x0,_0x2e69a9;}),_0xcb90ee['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x30a49a)),_0x3696fb['addSourceCollector'](()=>{const _0x5b0b45=[];for(const [_0x103a75,_0x5a7562]of _0xa03242['_threadToController']){const _0x21304f=_0x56cf2e['getAllMarkersForId'](_0x103a75['id']),_0x9736cd=_0x21304f['map'](_0x5120f0=>_0x5120f0['getRange']());_0x21304f['length']>0x0&&_0x5b0b45['push']([_0x5a7562['view'],_0x9736cd]);}return _0x5b0b45;}),this['listenTo'](_0x19fbcc,'change:activeAnnotations',(_0x2b77d7,_0x4afc3d,_0x386f79)=>{const _0x1df062=Array['from'](_0x386f79)['map'](_0x1f65c8=>_0x1f65c8['innerView'])['find'](_0x5291e0=>_0xa03242['_viewToController']['has'](_0x5291e0));if(!_0x1df062)return void(_0x56cf2e['activeMarker']=null);const _0x28b671=_0xa03242['_viewToController']['get'](_0x1df062)['model']['id'],_0x20932c='comment:'+_0x28b671;_0x28b671&&_0x56cf2e['hasMarkerForId'](_0x28b671)?_0x56cf2e['activeMarker']=_0x20932c:_0x56cf2e['activeMarker']&&(_0x56cf2e['activeMarker']=null);}),this['listenTo'](_0xa03242,'removeCommentThread',(_0x2d9f9b,{threadId:_0x57517d,isFromAdapter:_0x23a904})=>{!_0x23a904&&_0xcb90ee['ui']['focusTracker']['isFocused']&&_0x56cf2e['hasMarkerForId'](_0x57517d)&&_0xcb90ee['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xa03242,'addComment',(_0x1ac5fd,{threadId:_0x3d8cb2,isFromAdapter:_0x39e97e})=>{if(_0x39e97e||!_0x56cf2e['hasMarkerForId'](_0x3d8cb2)||!_0xa03242['hasCommentThread'](_0x3d8cb2))return;0x1===_0xa03242['getCommentThread'](_0x3d8cb2)['length']&&(_0xcb90ee['editing']['view']['focus'](),_0x1ac5fd['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x26d057=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x59d755;for(const _0xcf59ca in _0x26d057){const _0x570c34=_0xcf59ca,_0x1be82d=_0x26d057[_0x570c34];if('commentsLicenseKeyValid'==_0x1be82d||'commentsLicenseKeyInvalid'==_0x1be82d||'commentsLicenseKeyExpired'==_0x1be82d||'commentsLicenseKeyDomainLimit'==_0x1be82d||'commentsLicenseKeyNotAllowed'==_0x1be82d||'commentsLicenseKeyEvaluationLimit'==_0x1be82d||'commentsLicenseKeyTrialLimit'==_0x1be82d||'commentsLicenseKeyUsageLimit'==_0x1be82d){delete _0x26d057[_0x570c34],_0x59d755=_0x1be82d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x59d755&&_0x26d057['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x59d755&&_0x26d057['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x59d755&&_0x26d057['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x59d755&&_0x26d057['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x59d755&&_0x26d057['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x59d755&&_0x26d057['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x59d755&&_0x26d057['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x25d228){const _0x6b5447=this['editor'],_0x599803=new _0x25d228(_0x6b5447['locale']),_0x9ab43e=_0x6b5447['commands']['get']('addCommentThread');return _0x599803['set']({'label':N(_0x6b5447['locale'],'Comment'),'icon':_0x456141}),_0x599803['bind']('isEnabled')['to'](_0x9ab43e,'hasContent'),this['listenTo'](_0x599803,'execute',()=>{_0x9ab43e['execute']();}),_0x599803;}}class i extends _0x183679{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x123849){super(_0x123849),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xa51d6f,_0x416e65,_0x27c817)=>{_0x27c817?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x21bd79,_0x39c178]of this['editor']['commands'])_0x39c178['affectsData']&&'addCommentThread'!==_0x21bd79&&_0x39c178['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x33e0ba=this['editor']['editing']['view']['document'];this['listenTo'](_0x33e0ba,'cut',_0x47f12a=>_0x47f12a['stop'](),{'priority':'highest'}),this['listenTo'](_0x33e0ba,'clipboardInput',_0x3d1e16=>_0x3d1e16['stop'](),{'priority':'highest'}),this['listenTo'](_0x33e0ba,'delete',_0x5fb2d6=>_0x5fb2d6['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2fb7ff,_0x9cf94e]of this['editor']['commands'])_0x9cf94e['affectsData']&&'addCommentThread'!==_0x2fb7ff&&_0x9cf94e['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 _0x2f0852{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47537c){super(_0x47537c),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x59c075=this['context']['plugins']['get'](y);this['listenTo'](_0x59c075,'_activateAnnotation',(_0x454d2d,_0x754b8f)=>{for(const _0x27c8db of this['activeUIs']){const _0x46a856=this['_uis']['get'](_0x27c8db);(0x0,this['uisData']['get'](_0x27c8db)['filter'])(_0x754b8f)&&_0x46a856['setActiveAnnotation'](_0x754b8f);}}),this['listenTo'](_0x59c075,'_deactivateAllAnnotations',()=>{for(const _0x203d29 of this['activeUIs']){this['_uis']['get'](_0x203d29)['setActiveAnnotation'](null);}}),this['listenTo'](_0x59c075['_visibleAnnotations'],'add',(_0x370cff,_0x365ca9)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x365ca9);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x30cef0){return this['activeUIs']['has'](_0x30cef0);}['activate'](_0x2c74a2,_0x224698=this['defaultFilter']){const _0x2bd8a7=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2c74a2))throw new _0x23709e('annotationsuis-missing-ui',this,{'uiName':_0x2c74a2});this['isActive'](_0x2c74a2)&&this['deactivate'](_0x2c74a2),this['activeUIs']['add'](_0x2c74a2);const _0x3c183d=new S();v({'source':_0x2bd8a7['_visibleAnnotations'],'target':_0x3c183d,'filter':_0x224698}),this['uisData']['set'](_0x2c74a2,{'collection':_0x3c183d,'filter':_0x224698});const _0x54f103=this['_uis']['get'](_0x2c74a2);_0x54f103['attach'](_0x3c183d),this['listenTo'](_0x54f103,'change:activeAnnotation',(_0x2f640a,_0x153bff,_0x4de9f6,_0x1aef0a)=>{_0x1aef0a&&_0x2bd8a7['_removeActiveAnnotation'](_0x1aef0a),_0x4de9f6&&_0x2bd8a7['_addActiveAnnotation'](_0x4de9f6);});}['deactivate'](_0x346dad){if(this['activeUIs']['delete'](_0x346dad),!this['_uis']['has'](_0x346dad))throw new _0x23709e('annotationsuis-missing-ui',this,{'uiName':_0x346dad});const _0x355877=this['_uis']['get'](_0x346dad);_0x355877['detach'](),this['stopListening'](_0x355877),this['uisData']['get'](_0x346dad)['collection']['destroy'](),this['uisData']['delete'](_0x346dad);}['switchTo'](_0x595ed8){if(!this['_uis']['has'](_0x595ed8))throw new _0x23709e('annotationsuis-missing-ui',this,{'uiName':_0x595ed8});const _0x30c8c0=this['context']['plugins']['get'](y),_0x46f18e=Array['from'](_0x30c8c0['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x595ed8);const _0x5d666e=this['_uis']['get'](_0x595ed8);_0x5d666e['setActiveAnnotation'](_0x46f18e),_0x5d666e['_setSelectedAnnotations']&&_0x46f18e&&_0x5d666e['_setSelectedAnnotations']([_0x46f18e]);}['deactivateAll'](){for(const _0x5c6474 of this['activeUIs'])this['deactivate'](_0x5c6474);}['register'](_0x1addf9,_0x2849ee){if(this['_uis']['has'](_0x1addf9))throw new _0x23709e('annotationsuis-register-already-registered');if('function'!=typeof _0x2849ee['attach']||'function'!=typeof _0x2849ee['detach']||'function'!=typeof _0x2849ee['setActiveAnnotation'])throw new _0x23709e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1addf9,_0x2849ee);}['refilterAnnotations'](){const _0x3ce34e=this['context']['plugins']['get'](y)['collection'],_0xc42114=new Map(),_0x572ac5=Array['from'](this['activeUIs']);for(const _0x1e7321 of this['activeUIs']){const _0x40e39c=this['uisData']['get'](_0x1e7321)['collection'];for(const _0x450d68 of _0x40e39c)_0xc42114['set'](_0x450d68,_0x1e7321);}for(const _0x359ffb of _0x3ce34e){const _0x27e1ac=_0xc42114['get'](_0x359ffb);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x359ffb);const _0x181939=_0x572ac5['find'](_0x232aa3=>this['uisData']['get'](_0x232aa3)['filter'](_0x359ffb));_0x27e1ac!==_0x181939&&(_0x27e1ac&&this['uisData']['get'](_0x27e1ac)['collection']['remove'](_0x359ffb),_0x181939&&this['uisData']['get'](_0x181939)['collection']['add'](_0x359ffb));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x20a359){const _0x455d8c=[];for(const _0x13b539 of this['activeUIs']){(0x0,this['uisData']['get'](_0x13b539)['filter'])(_0x20a359)&&_0x455d8c['push'](_0x13b539);}if(_0x455d8c['length']>0x1)throw new _0x23709e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x455d8c,'annotationType':_0x20a359['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(_0x22658b){super(_0x22658b),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1646a8,_0x445b66)=>_0x1646a8+_0x445b66),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x481060=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x481060['to']('isAnimationDisabled',_0x3af2af=>_0x3af2af?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x481060['to']('top',_0x1aa6b2=>Ot(_0x1aa6b2))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xefa44a=this['element']['clientHeight'];_0xefa44a&&(this['height']=_0xefa44a);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2f0852{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e45b0){super(_0x5e45b0),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 _0x5b8d94=this['context']['config']['get']('sidebar.container');_0x5b8d94&&this['setContainer'](_0x5b8d94);}['setContainer'](_0x18dbfc){if(!g(_0x18dbfc))throw new _0x23709e('sidebar-setcontainer-invalid-element');this['container']=_0x18dbfc;}['_attachToContainer']({viewClass:_0x1ff0fa='',spaceBetweenItems:_0x4b5373=0x19}={}){if(!g(this['container']))throw new _0x23709e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1ff0fa,this['_spaceBetweenItems']=_0x4b5373;}['rearrange']({removedAnnotation:_0x2738e5,previousAnnotation:_0x1a69e5,nextAnnotation:_0x309b1a}){const _0x516dbe=this['getSidebarItemView'](_0x2738e5);this['view']['list']['remove'](_0x516dbe),this['_destroySidebarItemView'](_0x2738e5),_0x1a69e5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1a69e5)),_0x309b1a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x309b1a)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x42ced9,activatedAnnotation:_0x2079b4,disableAnimationOnActivatedAnnotation:_0x315c85}){if(this['_activeAnnotation']=_0x2079b4,_0x42ced9){_0x42ced9['isActive']=!0x1;const _0x41c1e5=this['getSidebarItemView'](_0x42ced9);_0x41c1e5&&_0x315c85&&(_0x41c1e5['isAnimationDisabled']=!0x1);}if(_0x2079b4){const _0x193943=this['getSidebarItemView'](_0x2079b4);_0x193943&&(_0x2079b4['isActive']=!0x0,_0x315c85&&(_0x193943['isAnimationDisabled']=!0x0,_0x193943['top']+=0x1),this['_alignToTargetRect'](_0x193943));}}['_detachFromContainer'](_0xf3c9f9){if(this['view']['element']['remove'](),_0xf3c9f9){for(const _0x4cd150 of _0xf3c9f9)this['_destroySidebarItemView'](_0x4cd150);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x414325,_0x1e2eb2){_0x1e2eb2||(_0x1e2eb2=_0x414325['view']);const _0x4b0d60=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4b0d60,_0x414325),this['_annotationToSidebarItemView']['set'](_0x414325,_0x4b0d60),_0x4b0d60['content']['add'](_0x1e2eb2),this['listenTo'](_0x414325['view'],'change:targetRect',(_0x3f2d25,_0x50e037,_0x5e83e4)=>{const _0x2c03a7=this['_getTargetTop'](_0x414325,_0x5e83e4);_0x4b0d60['_targetTop']!=_0x2c03a7&&(_0x4b0d60['_targetTop']=_0x2c03a7,this['_setItemTop'](_0x4b0d60,_0x2c03a7));}),this['listenTo'](_0x4b0d60,'change:top',()=>{this['_recalculate'](_0x4b0d60,'top');}),this['listenTo'](_0x4b0d60,'change:bottom',()=>{this['_recalculate'](_0x4b0d60,'bottom');}),this['_alignToTargetRect'](_0x4b0d60);const _0x720095=this['_getItemBefore'](_0x4b0d60);if(_0x720095)this['_alignAfterItem'](_0x720095,_0x4b0d60)||this['_alignToTargetRect'](_0x4b0d60);else this['_alignToTargetRect'](_0x4b0d60);return this['_updateLastItem'](),this['view']['list']['add'](_0x4b0d60),_0x4b0d60;}['_alignForTopChange'](_0x5cb99a){if(!_0x5cb99a['content']['length'])return;const _0x384dab=this['_getItemBefore'](_0x5cb99a);if(!_0x384dab)return;const _0x4febbd=this['_sidebarItemViewToAnnotation']['get'](_0x384dab),_0x319cc9=this['_activeAnnotation'];_0x319cc9&&_0x319cc9===_0x4febbd?this['_alignAfterItem'](_0x384dab,_0x5cb99a):this['_alignBeforeItem'](_0x5cb99a,_0x384dab);}['_alignForBottomChange'](_0x51f5bf){if(!_0x51f5bf['content']['length'])return;const _0xfdced9=this['_getItemAfter'](_0x51f5bf);if(!_0xfdced9)return;const _0x521aad=this['_sidebarItemViewToAnnotation']['get'](_0xfdced9),_0x54226a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1041ac=this['_activeAnnotation'];_0x1041ac&&_0x1041ac===_0x521aad&&_0x54226a?(this['_alignBeforeItem'](_0xfdced9,_0x51f5bf),this['_alignAfterItem'](_0x51f5bf,_0xfdced9)):_0x1041ac&&_0x1041ac===_0x521aad?this['_alignBeforeItem'](_0xfdced9,_0x51f5bf):this['_alignAfterItem'](_0x51f5bf,_0xfdced9);}['_recalculate'](_0x4047b5,_0x2f915d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3191ef,changedProp:_0x1aba8e}of this['_recalculateBuffer'])'top'===_0x1aba8e?this['_alignForTopChange'](_0x3191ef):this['_alignForBottomChange'](_0x3191ef);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4047b5,'changedProp':_0x2f915d});}['getSidebarItemView'](_0x36f5a){return this['_annotationToSidebarItemView']['get'](_0x36f5a);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1fd29a){const _0x5bbc04=this['getSidebarItemView'](_0x1fd29a);this['stopListening'](_0x5bbc04),this['stopListening'](_0x1fd29a['view']),_0x5bbc04['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1fd29a),this['_sidebarItemViewToAnnotation']['delete'](_0x5bbc04);}['_createSidebarView'](){const _0x5cf179=new H(this['context']['locale']);return _0x5cf179['render'](),this['on']('change:_lastItem',(_0x445795,_0x30a3da,_0x296f05,_0x168212)=>{_0x168212&&_0x5cf179['unbind']('minHeight'),_0x296f05?_0x5cf179['bind']('minHeight')['to'](_0x296f05,'bottom'):_0x5cf179['minHeight']=null;}),_0x5cf179;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x447697){const _0x2a9f9d=this['_sidebarItemViewToAnnotation']['get'](_0x447697),_0x1c453f=_0x2a9f9d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2a9f9d)-0x1);return _0x1c453f&&this['getSidebarItemView'](_0x1c453f)||null;}['_getItemAfter'](_0x15230b){const _0x379281=this['_sidebarItemViewToAnnotation']['get'](_0x15230b),_0x44688b=_0x379281&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x379281)+0x1);return _0x44688b&&this['getSidebarItemView'](_0x44688b)||null;}['_alignBeforeItem'](_0x3b8d8b,_0x18f59c){_0x3b8d8b['updateHeight']();const _0x3e0ecb=G(_0x18f59c['bottom']+this['_spaceBetweenItems'],_0x3b8d8b['top']);return!!_0x3e0ecb&&(this['_setItemTop'](_0x18f59c,_0x18f59c['top']-_0x3e0ecb),!0x0);}['_alignAfterItem'](_0x4da588,_0x438ea1){_0x4da588['updateHeight']();const _0x12fdda=G(_0x4da588['bottom']+this['_spaceBetweenItems'],_0x438ea1['top']);return!!_0x12fdda&&(this['_setItemTop'](_0x438ea1,_0x438ea1['top']+_0x12fdda,!0x1),!0x0);}['_alignToTargetRect'](_0x200ffc){const _0x5f918=this['_sidebarItemViewToAnnotation']['get'](_0x200ffc);if(!_0x5f918||!_0x5f918['target']||!_0x5f918['targetRect'])return;const _0x28e4d4=this['_getTargetTop'](_0x5f918,_0x5f918['targetRect']);this['_setItemTop'](_0x200ffc,_0x28e4d4);}['_getTargetTop'](_0x4805e9,_0x1e4a54){if(null===_0x1e4a54)return 0x0;if(_0x4805e9['target']instanceof _0x4803da)return _0x1e4a54['top'];{const _0x10a67b=new _0x4803da(this['view']['element'])['top'];return _0x1e4a54['top']-_0x10a67b;}}['_setItemTop'](_0x1d1d81,_0x97ee9f,_0x1c2428=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1c2428&&(_0x97ee9f=Math['max'](_0x97ee9f,this['_getMaxAvailableTop'](_0x1d1d81))),_0x1d1d81['top']=_0x97ee9f;}['_getMaxAvailableTop'](_0x5f2706){let _0x631adf=this['_getItemBefore'](_0x5f2706),_0x214465=0x0;for(;_0x631adf;)_0x631adf['updateHeight'](),_0x214465+=this['_spaceBetweenItems']+_0x631adf['height'],_0x631adf=this['_getItemBefore'](_0x631adf);return _0x214465;}}function G(_0x44e054,_0x37227a){return Math['max'](_0x44e054-_0x37227a,0x0);}function g(_0x30888d){return null!==_0x30888d&&'object'==typeof _0x30888d&&0x1===_0x30888d['nodeType'];}class e extends _0x2f0852{['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(_0x132c79){super(_0x132c79),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x41c939(),this['_refreshPositioningDebounced']=_0x3a7083(()=>{_0x132c79['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0xa749b=this['context']['plugins']['get'](j),_0x42df35=this['context']['plugins']['get'](z);_0xa749b['register']('wideSidebar',this),_0x42df35['container']&&_0xa749b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5bf106){if(_0x5bf106===this['activeAnnotation'])return;const _0x52e05f=this['context']['plugins']['get'](z);_0x52e05f['_activeAnnotation']=_0x5bf106;const _0x3859d5=this['activeAnnotation'];_0x52e05f['refresh']({'blurredAnnotation':_0x3859d5,'activatedAnnotation':_0x5bf106}),this['activeAnnotation']=_0x5bf106;}['attach'](_0x4c6588){this['annotations']=_0x4c6588;const _0x59afec=this['context']['plugins']['get'](z);if(_0x59afec['_annotations']=_0x4c6588,this['isAttached'])throw new _0x23709e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x59afec,'set:container',()=>{this['detach'](),this['listenTo'](_0x59afec,'change:container',_0x354a61=>{_0x354a61['off'](),this['attach'](_0x4c6588);});}),_0x59afec['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x45cccc=_0x2ab416=>{_0x2ab416['updateTargetRect'](),_0x59afec['addAnnotation'](_0x2ab416);};for(const _0x2bcb27 of _0x4c6588)_0x45cccc(_0x2bcb27);this['listenTo'](_0x4c6588,'add',(_0x1faa2c,_0x5d36e0)=>{_0x45cccc(_0x5d36e0);}),this['listenTo'](_0x4c6588,'remove',(_0x2021a1,_0x4b687a,_0x2e5a0f)=>{_0x59afec['rearrange']({'removedAnnotation':_0x4b687a,'previousAnnotation':_0x4c6588['get'](_0x2e5a0f-0x1),'nextAnnotation':_0x4c6588['get'](_0x2e5a0f+0x1)}),_0x4b687a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4c6588,'focus',(_0x3e0252,_0x34abc6)=>{this['setActiveAnnotation'](_0x34abc6);}),this['listenTo'](_0x4c6588,'blur',()=>{this['setActiveAnnotation'](null);});const _0x551b96=this['context']instanceof _0x52d672?this['context']['editors']:new _0x41c939([this['context']]);for(const _0x40c10d of _0x551b96)this['_integrateWithEditorAnnotations'](_0x40c10d);this['listenTo'](_0x551b96,'add',(_0x296d9e,_0x2e0bdd)=>{this['listenTo'](_0x2e0bdd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2e0bdd);});}),this['listenTo'](_0x551b96,'remove',(_0x339009,_0x11b29a)=>{_0x11b29a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x11b29a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x23709e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x433bab=this['context']['plugins']['get'](z);_0x433bab['_detachFromContainer'](this['annotations']),this['stopListening'](_0x433bab),this['stopListening'](this['annotations']),this['context']instanceof _0x52d672&&this['stopListening'](this['context']['editors']);for(const _0x39c683 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x39c683);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2b3b17){if(!_0x2b3b17['plugins']['has']('EditorAnnotations'))return;const _0x535ef2=_0x2b3b17['plugins']['get']('EditorAnnotations'),_0x503101=()=>{const _0x4a4ac8=_0x535ef2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4a4ac8[0x0]||null);};this['listenTo'](_0x535ef2,'refresh',_0x503101),this['listenTo'](_0x535ef2,'blur',(_0x588153,{isAnnotationTracked:_0x367ed2})=>{this['activeAnnotation']&&_0x367ed2(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x535ef2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1c1e98=>{_0x535ef2['hasDomSelection']()&&(_0x503101(),_0x1c1e98['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x535ef2);}['_destroyEditorAnnotationsIntegration'](_0x579a38){this['stopListening'](_0x579a38),this['_editorAnnotations']['remove'](_0x579a38);}}class C extends _0x5a79b9{['counterView'];constructor(_0x46ee75){super(_0x46ee75);const _0xdb5556=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4bf2fc,_0x4f36ea)=>_0x4bf2fc?'...':_0x4f36ea['toString']()),this['set']('annotationType',''),this['icon']=_0x456141,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xdb5556['to']('annotationType',_0x10f979=>'ck-annotation-counter__badge--'+_0x10f979),_0xdb5556['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xdb5556['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2f0852{['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(_0x482aee){super(_0x482aee),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x353c61())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x41c939(),this['_refreshPositioningDebounced']=_0x3a7083(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0xa022f0(this['context']['locale']),this['balloonPanelView']=new _0x443934(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2db968){this['annotations']=_0x2db968;const _0x46c8d4=this['context']['plugins']['get'](z),_0x2f7c9e=this['balloonPanelView'];if(_0x46c8d4['_annotations']=_0x2db968,this['isAttached'])throw new _0x23709e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x46c8d4,'set:container',()=>{this['detach'](),this['listenTo'](_0x46c8d4,'change:container',_0x518d6e=>{_0x518d6e['off'](),this['attach'](_0x2db968);});}),_0x46c8d4['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4e56c6=_0x21442a=>{const _0x49b740=new C(this['context']['locale']);_0x46c8d4['addAnnotation'](_0x21442a,_0x49b740),this['_annotationToNarrowView']['set'](_0x21442a,_0x49b740),_0x49b740['bind']('isDirty','annotationType','number')['to'](_0x21442a['view'],'isDirty','type','length'),_0x49b740['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2f7c9e['content']['first']!==_0x21442a['view']?(this['_showBalloon'](_0x21442a),_0x21442a['view']['element']['focus'](),this['setActiveAnnotation'](_0x21442a)):this['setActiveAnnotation'](null);});};for(const _0x551deb of _0x2db968)_0x4e56c6(_0x551deb);this['listenTo'](_0x2db968,'add',(_0x3acfb6,_0x2241e5)=>{_0x4e56c6(_0x2241e5);}),this['listenTo'](_0x2db968,'remove',(_0x2e01ff,_0xb2ec01,_0x51abb3)=>{this['_annotationToNarrowView']['get'](_0xb2ec01)['destroy'](),this['_annotationToNarrowView']['delete'](_0xb2ec01),_0x46c8d4['rearrange']({'removedAnnotation':_0xb2ec01,'previousAnnotation':_0x2db968['get'](_0x51abb3-0x1),'nextAnnotation':_0x2db968['get'](_0x51abb3+0x1)}),_0xb2ec01===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2db968,'focus',(_0x80a90f,_0x3a15d6)=>{this['setActiveAnnotation'](_0x3a15d6);}),this['listenTo'](_0x2db968,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xea46bb,_0x247770)=>{_0x247770['keyCode']===_0x60121b['esc']&&_0x2f7c9e['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2f7c9e['content']['first']),this['_hideBalloon'](),_0x247770['stopPropagation'](),_0x247770['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4f7274,_0x4555a1)=>{const _0x52cd52=_0x4555a1['target'];_0x2f7c9e['isVisible']&&_0x2f7c9e['element']['contains'](_0x52cd52)||_0x46c8d4['view']['element']['contains'](_0x52cd52)||_0x4f7274['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x562617=>_0x562617['contains'](_0x52cd52))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3dfc88=this['context']instanceof _0x52d672?this['context']['editors']:new _0x41c939([this['context']]);for(const _0x4cfd41 of _0x3dfc88)this['_integrateWithEditorAnnotations'](_0x4cfd41);this['listenTo'](_0x3dfc88,'add',(_0x383837,_0x3b2a71)=>{this['listenTo'](_0x3b2a71,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3b2a71);});}),this['listenTo'](_0x3dfc88,'remove',(_0x1db1f9,_0x1fb4a9)=>{_0x1fb4a9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1fb4a9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3104fa){if(_0x3104fa===this['activeAnnotation'])return;const _0x1c2963=this['context']['plugins']['get'](z);if(_0x1c2963['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3104fa,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3104fa)_0x1c2963['getSidebarItemView'](_0x3104fa)?this['_showBalloon'](_0x3104fa):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3104fa;}['detach'](){if(!this['isAttached'])throw new _0x23709e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x591abe=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1b2486=>_0x1b2486['destroy']()),this['_annotationToNarrowView']['clear'](),_0x591abe['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x52d672&&this['stopListening'](this['context']['editors']);for(const _0x3bb90d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3bb90d);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'](_0x58daa9){if(!_0x58daa9['plugins']['has']('EditorAnnotations'))return;const _0x25ebec=_0x58daa9['plugins']['get']('EditorAnnotations'),_0x34eca2=this['context']['plugins']['get'](z),_0x563fca=this['annotations'],_0x48d0fa=this['balloonPanelView'],_0x53b548=()=>{const _0x583232=_0x25ebec['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x583232),this['setActiveAnnotation'](_0x583232[0x0]||null);};this['listenTo'](_0x25ebec,'refresh',_0x53b548),this['listenTo'](_0x25ebec,'blur',(_0x3ed8bb,{isAnnotationTracked:_0x3bb7b4})=>{this['activeAnnotation']&&_0x3bb7b4(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x25ebec,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x563fca,'blur',_0x3d9d23=>{_0x25ebec['hasDomSelection']()&&_0x3d9d23['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x214987,_0x1dd91c)=>{const _0x3c9484=_0x1dd91c['target'];_0x48d0fa['isVisible']&&_0x48d0fa['element']['contains'](_0x3c9484)||_0x34eca2['view']['element']['contains'](_0x3c9484)||this['activeAnnotation']&&_0x25ebec['hasDomSelection']()&&(_0x53b548(),_0x214987['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x25ebec);}['_destroyEditorAnnotationsIntegration'](_0x1d5790){_0x1d5790&&(this['stopListening'](_0x1d5790),this['_editorAnnotations']['remove'](_0x1d5790));}['_setSelectedAnnotations'](_0x5f3bac){for(const _0x4b3e23 of this['_selectedAnnotations'])_0x5f3bac['includes'](_0x4b3e23)||this['_manuallyClosedAnnotationViews']['delete'](_0x4b3e23['view']);this['_selectedAnnotations']=_0x5f3bac;}['_refreshPositioning'](){const _0x491951=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x491951['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3801d5){if(this['_manuallyClosedAnnotationViews']['has'](_0x3801d5['view']))return;const _0x2f3f26=this['balloonPanelView']['content']['first'];_0x2f3f26!==_0x3801d5['view']?(_0x2f3f26&&this['_detachListeners'](_0x2f3f26),this['_attachListeners'](_0x3801d5['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3801d5['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x27a7d7=this['balloonPanelView']['content']['first'],_0x50ff82=_0x27a7d7&&this['annotations']['getByView'](_0x27a7d7);if(!_0x50ff82||!this['_annotationToNarrowView']['has'](_0x50ff82))return;const _0x2082ed=this['_annotationToNarrowView']['get'](_0x50ff82)['element'],_0x18e18b=(function(){const _0x25a591=_0x443934['defaultPositions'];return[_0x25a591['southArrowNorthEast'],_0x25a591['northArrowSouthEast'],_0x25a591['southArrowNorth'],_0x25a591['northArrowSouth'],_0x25a591['southArrowNorthWest'],_0x25a591['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2082ed,'positions':_0x18e18b});}['_hideBalloon'](){const _0x5b4205=this['balloonPanelView'],_0x13f07c=_0x5b4205['content']['first'];_0x13f07c&&(this['_detachListeners'](_0x13f07c),_0x5b4205['unpin'](),_0x5b4205['content']['clear']());}['_attachListeners'](_0x571ec3){this['listenTo'](_0x571ec3,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x571ec3,'Esc',(_0x408c65,_0x493683)=>{this['_manuallyClosedAnnotationViews']['add'](_0x571ec3),this['_hideBalloon'](),_0x493683();});}['_detachListeners'](_0x3c9ccc){this['stopListening'](_0x3c9ccc);}}class c extends _0x183679{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x4a595f,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4fd284){super(_0x4fd284),_0x4fd284['editing']['view']['addObserver'](_0x85916a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4fd284['plugins']['get'](_0x4a595f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x18b8f1=this['editor']['plugins']['get'](j);_0x18b8f1['context']===this['editor']&&(_0x18b8f1['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xa3da06,_0x3b3e30)=>{const _0x2980c4=this['_balloon'];if(this['isAttached']&&_0x2980c4['visibleView']){const _0x16a723=this['annotations']['getByView'](_0x2980c4['visibleView']);_0x16a723&&this['_closeAnnotation'](_0x16a723),_0x3b3e30();}}));}['afterInit'](){const _0x4463a5=this['editor']['plugins']['get'](j);_0x4463a5['context']===this['editor']&&(_0x4463a5['hasActive']()||_0x4463a5['switchTo']('inline'));}['setActiveAnnotation'](_0x4c49bb){_0x4c49bb!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4c49bb&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4c49bb)&&this['_addAnnotationToBalloon'](_0x4c49bb,!0x0),_0x4c49bb['isActive']=!0x0),_0x4c49bb||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4c49bb);}['attach'](_0x389010){this['annotations']=_0x389010;const _0x273806=this['editor']['plugins']['get'](j),_0x4f14c2=this['_balloon'];if(this['isAttached'])throw new _0x23709e('inlineannotations-attach-already-attached',this);if(_0x273806['context']!==this['editor'])throw new _0x23709e('inlineannotations-not-allowed-with-context',this);const _0x249e50=this['editor']['plugins']['get'](b);this['listenTo'](_0x249e50,'refresh',()=>{const _0x5e9356=_0x249e50['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5623ec,_0x2bf5ee;!this['_forceRefresh']&&(_0x5623ec=_0x5e9356,_0x2bf5ee=this['_selectedAnnotations'],_0x5623ec['length']===_0x2bf5ee['length']&&_0x5623ec['every'](_0x50936d=>_0x2bf5ee['includes'](_0x50936d)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5e9356),this['setActiveAnnotation'](_0x5e9356[0x0]||null));}),this['listenTo'](_0x249e50,'blur',(_0x5a86b5,{isAnnotationTracked:_0x2d177f})=>{this['activeAnnotation']&&_0x2d177f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5ef110,_0x603db5,_0x26571e)=>{_0x26571e||this['setActiveAnnotation'](null);}),this['listenTo'](_0x389010,'remove',(_0x29ef96,_0x2d36b3)=>{this['_removeAnnotationFromBalloon'](_0x2d36b3),_0x2d36b3===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4f14c2,'change:visibleView',(_0x234c2e,_0x279908,_0x4ea5cb,_0x4b242e)=>{_0x4b242e&&this['stopListening'](_0x4b242e);const _0x502b10=_0x389010['getByView'](_0x4ea5cb);_0x4ea5cb&&_0x502b10&&(this['listenTo'](_0x4ea5cb,'change:height',()=>{_0x4f14c2['updatePosition']();}),this['listenTo'](_0x4ea5cb,'Esc',()=>{this['_closeAnnotation'](_0x502b10),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x502b10&&this['setActiveAnnotation'](_0x502b10));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4f14c2['visibleView']&&(_0x389010['getByView'](_0x4f14c2['visibleView'])&&_0x4f14c2['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 _0x23709e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x564b48 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x564b48);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x303a85){for(const _0x3027f1 of this['_selectedAnnotations'])_0x303a85['includes'](_0x3027f1)||this['_manuallyClosed']['delete'](_0x3027f1);for(const _0x5da078 of this['annotations'])_0x303a85['includes'](_0x5da078)||this['_removeAnnotationFromBalloon'](_0x5da078);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x48991f of _0x303a85)this['_addAnnotationToBalloon'](_0x48991f);}this['_selectedAnnotations']=_0x303a85;}['_addAnnotationToBalloon'](_0x19e774,_0xc96715=!0x1){this['_manuallyClosed']['has'](_0x19e774)||(this['_addedAnnotations']['has'](_0x19e774)||this['_balloon']['hasView'](_0x19e774['view'])||(this['_addedAnnotations']['add'](_0x19e774),this['_balloon']['add']({'stackId':_0x19e774['view']['id'],'view':_0x19e774['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x19e774)}})),_0xc96715&&this['_balloon']['showStack'](_0x19e774['view']['id']));}['_getBalloonTargetForAnnotation'](_0x21f564){const _0x3770d5=_0x21f564['target'],_0x2718e4=this['editor']['editing']['view'],_0x586150=_0x2718e4['document']['selection']['getFirstRange'](),_0x5e505f=_0x2718e4['domConverter']['viewRangeToDom'](_0x586150);if(_0x5e505f['collapse'](!0x0),_0x3770d5){if(_0x3770d5 instanceof _0x4803da)return _0x3770d5;let _0x46d166=[];for(const _0x37949e of _0x3770d5)_0x46d166['push'](...F(_0x37949e['getClientRects']()));_0x46d166=function(_0x2ec678){const _0x21a456=[];let _0x599d7c=_0x2ec678[0x0];for(let _0xbf19eb=0x1;_0xbf19eb<_0x2ec678['length'];_0xbf19eb++)P(_0x599d7c,_0x2ec678[_0xbf19eb])?_0x599d7c['width']+=_0x2ec678[_0xbf19eb]['width']:(_0x21a456['push'](_0x599d7c),_0x599d7c=_0x2ec678[_0xbf19eb]);return _0x21a456['push'](_0x599d7c),_0x21a456;}(_0x46d166);const _0x528c04=_0x5e505f['getBoundingClientRect']();return _0x46d166['find'](_0x1d994f=>_0x1d994f['top']<=_0x528c04['top']&&_0x1d994f['bottom']>=_0x528c04['bottom']&&_0x1d994f['left']<=_0x528c04['left']&&_0x1d994f['right']>=_0x528c04['right'])||_0x46d166[0x0];}return _0x21f564['targetRect']||_0x5e505f;}['_removeAnnotationFromBalloon'](_0x1fd0c2){this['_addedAnnotations']['has'](_0x1fd0c2)&&this['_balloon']['hasView'](_0x1fd0c2['view'])&&(this['_addedAnnotations']['delete'](_0x1fd0c2),this['_balloon']['remove'](_0x1fd0c2['view']));}['_closeAnnotation'](_0x3961a6){this['_manuallyClosed']['add'](_0x3961a6),this['_removeAnnotationFromBalloon'](_0x3961a6);}}function F(_0x580a35){return Array['from'](_0x580a35)['map'](DOMRect['fromRect']);}function P(_0x2d15ab,_0x20eb51){return _0x2d15ab['top']===_0x20eb51['top']&&_0x2d15ab['bottom']===_0x20eb51['bottom']&&_0x2d15ab['right']===_0x20eb51['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x261a7f,_0x273ebc){super(_0x261a7f),this['set']('isEmpty',!_0x273ebc['length']),this['focusTracker']=new _0x1c8200(),this['_annotationViews']=_0x273ebc,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x49e0cf({'focusables':_0x273ebc,'focusTracker':this['focusTracker']}),this['listenTo'](_0x273ebc,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x273ebc,'remove',(_0x485b2d,_0x3be712)=>{_0x3be712['isActive']&&this['focus'](),_0x273ebc['length']||(this['isEmpty']=!0x0);});const _0x570648=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x261a7f,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x273ebc},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x570648['if']('isEmpty','ck-hidden',_0x48f50e=>!_0x48f50e)]},'children':[{'text':N(_0x261a7f,'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 _0x552fbc of this['_annotationViews'])this['focusTracker']['add'](_0x552fbc['element']);this['_annotationViews']['on']('change',(_0x4d34cf,{added:_0x1c37a3,removed:_0x205bb4})=>{for(const _0xf3ed78 of _0x1c37a3)this['focusTracker']['add'](_0xf3ed78['element']);for(const _0x524770 of _0x205bb4)this['focusTracker']['remove'](_0x524770['element']);});}}class p extends _0x2f0852{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x31eba4){super(_0x31eba4),this['archivedThreads']=new _0x41c939();}['init'](){const _0x3a959a=this['context'],_0x3d5b83=_0x3a959a['plugins']['get'](o),_0x1a433e=_0x3a959a['plugins']['get'](y);this['listenTo'](_0x3d5b83,'addCommentThread',(_0x1a1c28,{threadId:_0x114f99})=>{const _0x13e96e=_0x3d5b83['getCommentThread'](_0x114f99);_0x13e96e['archivedAt']&&this['archivedThreads']['add'](_0x13e96e,this['_calculatePosition'](_0x13e96e['archivedAt'])),this['listenTo'](_0x13e96e,'change:archivedAt',(_0x22a1e9,_0x1cf6e5,_0x2c9b5f)=>{_0x2c9b5f?this['archivedThreads']['has'](_0x13e96e)||this['archivedThreads']['add'](_0x13e96e,this['_calculatePosition'](_0x13e96e['archivedAt'])):this['archivedThreads']['has'](_0x13e96e)&&this['archivedThreads']['remove'](_0x13e96e);});}),this['listenTo'](_0x3d5b83,'removeCommentThread',(_0x49c180,{threadId:_0x3b6a54})=>{const _0x29e505=_0x3d5b83['getCommentThread'](_0x3b6a54);this['stopListening'](_0x29e505),this['archivedThreads']['has'](_0x29e505)&&this['archivedThreads']['remove'](_0x29e505);},{'priority':'highest'}),this['listenTo'](_0x1a433e['collection'],'focus',(_0x1f6fd0,_0x4ab9d9)=>{_0x4ab9d9['isVisible']||(_0x4ab9d9['isActive']=!0x0,_0x1a433e['activate'](_0x4ab9d9));});}['_calculatePosition'](_0x31dd97){const _0x2baefb=[...this['archivedThreads']]['findIndex'](_0x9e83f4=>_0x9e83f4['archivedAt']<_0x31dd97);return _0x2baefb>-0x1?_0x2baefb:this['archivedThreads']['length'];}}class a extends _0x183679{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x16538a];}constructor(_0xd40859){super(_0xd40859),this['annotationViews']=new _0x26d77d(),this['_pendingThreads']=[];}['init'](){const _0x2132cd=this['editor'],_0x314394=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2132cd['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5a79b9,!0x0)),_0x2132cd['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x57b987=this['_createCommentsArchiveButton'](_0x30a49a);return _0x57b987['set']({'role':'menuitemcheckbox'}),_0x57b987;});const _0x42015b=_0x2132cd['plugins']['get'](p),_0x1880e0=_0x2132cd['plugins']['get']('Annotations'),_0xe87ce0=_0x2132cd['plugins']['get']('CommentsRepository');_0x42015b['archivedThreads']['forEach'](_0xa1d1df=>{this['_handleNewThread'](_0xa1d1df);}),this['listenTo'](_0x42015b['archivedThreads'],'add',(_0x2ae433,_0x3cbb2f)=>{this['_handleNewThread'](_0x3cbb2f);}),this['listenTo'](_0x1880e0['collection'],'add',(_0x25510b,_0x9f2455)=>{const _0x4e4d4f=this['_pendingThreads']['find'](_0x4080b6=>{const _0x255740=_0xe87ce0['_threadToController']['get'](_0x4080b6);return _0x255740&&_0x9f2455['innerView']===_0x255740['view'];});if(_0x4e4d4f){const _0xd4c6dd=this['_calculatePosition'](_0x4e4d4f['archivedAt']);this['_addAnnotationToArchive'](_0x9f2455,_0xd4c6dd),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4e4d4f),0x1);}}),this['listenTo'](_0x42015b['archivedThreads'],'remove',(_0x16a669,_0xd8df60)=>{const _0x1e69ef=_0x2132cd['config']['get']('collaboration.channelId');if(!_0x1e69ef||_0xd8df60['channelId']===_0x1e69ef){if(this['_pendingThreads']['includes'](_0xd8df60))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xd8df60),0x1);else{const _0x278398=_0xe87ce0['_threadToController']['get'](_0xd8df60),_0x1652d7=_0x1880e0['getByInnerView'](_0x278398['view']);this['annotationViews']['remove'](_0x1652d7['view']),this['stopListening'](_0x1652d7),this['stopListening'](_0x1652d7['focusableElements']);}}}),this['listenTo'](_0x1880e0['collection'],'add',(_0x54a247,_0x519feb)=>{this['listenTo'](_0x519feb,'escape',_0x314394);}),this['listenTo'](_0x1880e0['collection'],'remove',(_0x317bed,_0x438d3b)=>{this['stopListening'](_0x438d3b,'escape',_0x314394);});}['_addAnnotationToArchive'](_0x174034,_0x2a765d){this['listenTo'](_0x174034,'set:isVisible',_0x13fe65=>{_0x13fe65['return']=!0x1,_0x13fe65['stop']();}),this['annotationViews']['add'](_0x174034['view'],_0x2a765d);}['_handleNewThread'](_0x17ab8f){const _0x16a985=this['editor']['plugins']['get']('CommentsRepository'),_0x8fcd2b=this['editor']['plugins']['get']('Annotations'),_0x5d08ab=this['editor']['config']['get']('collaboration.channelId');if(!_0x5d08ab||_0x17ab8f['channelId']===_0x5d08ab){const _0x50c54c=_0x16a985['_threadToController']['get'](_0x17ab8f);if(!_0x50c54c)return void this['_pendingThreads']['push'](_0x17ab8f);const _0xcd7e3e=this['_calculatePosition'](_0x17ab8f['archivedAt']),_0x45f0f9=_0x8fcd2b['getByInnerView'](_0x50c54c['view']);_0x45f0f9['isVisible']&&_0x8fcd2b['_visibleAnnotations']['remove'](_0x45f0f9),this['_addAnnotationToArchive'](_0x45f0f9,_0xcd7e3e);}}['_calculatePosition'](_0x14143f){const _0xdd3808=this['editor']['config']['get']('collaboration.channelId'),_0x1d2646=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x55bf80=>_0x55bf80['channelId']===_0xdd3808)['findIndex'](_0x17785a=>_0x17785a['archivedAt']<_0x14143f);return _0x1d2646<0x0||_0x1d2646>this['annotationViews']['length']?this['annotationViews']['length']:_0x1d2646-0x1;}['_toggleDialog'](){const _0x54d283=this['editor'],_0x6645cc=_0x54d283['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x54d283['locale'],this['annotationViews'])),'commentsArchive'===_0x6645cc['id']?_0x6645cc['hide']():_0x6645cc['show']({'id':'commentsArchive','title':N(_0x54d283['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4a59b5,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1ae2ec['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xb2fea8,_0x4e5fe7=!0x1){const _0x3d45d8=this['editor']['locale'],_0x2689b4=this['editor']['plugins']['get']('Dialog'),_0x2f4e2f=new _0xb2fea8(_0x3d45d8);return _0x2f4e2f['bind']('isEnabled')['to'](this,'isEnabled'),_0x2f4e2f['bind']('isOn')['to'](_0x2689b4,'id',_0x469dfd=>'commentsArchive'===_0x469dfd),_0x2f4e2f['set']({'label':N(_0x3d45d8,'COMMENTS_ARCHIVE'),'icon':_0x4a59b5,'isToggleable':!0x0}),_0x4e5fe7&&(_0x2f4e2f['tooltip']=!0x0),this['listenTo'](_0x2f4e2f,'execute',()=>this['_toggleDialog']()),_0x2f4e2f;}['_hideDialogOnAnnotationEscape']=_0x2325d2=>{const _0x1cbf50=_0x2325d2['source'];if(!this['annotationViews']['has'](_0x1cbf50['view']))return;const _0x41bda2=this['editor']['plugins']['get']('Dialog');_0x41bda2['isOpen']&&'commentsArchive'===_0x41bda2['id']&&(_0x41bda2['hide'](),_0x2325d2['stop']());};}class gi extends _0x183679{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 _0x4cf281,ContextPlugin as _0x59fa22,PendingActions as lt,Command as _0xad8c8,Plugin as _0x3f26c5,Context as _0x4109a3}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1721bd,uid as _0x5cca00,KeystrokeHandler as jt,FocusTracker as _0x158d2e,diff as _0x16e1b2,Collection as _0xf11332,Rect as _0x520f72,CKEditorError as _0x44e108,first as _0x90e481,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x55947a,keyCodes as _0x3d25c7}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x31ec43,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x2b1212,trimHtml as ts,LateFocusDropdownButtonView as _0x25c429,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x3005d9}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x22be3f}from'es-toolkit/compat';import{IconUndo as _0xeaa7b1,IconCheck as _0x5ea6a9,IconPencil as _0xe0f0dc,IconRemoveComment as _0x4301aa,IconThreeVerticalDots as _0x1f7c91,IconAddComment as _0x3a5d19,IconCommentsArchive as _0x52296d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x56e70d,ButtonView as _0x73e913,ViewCollection as _0x2989d3,createDropdown as _0x2ad308,ListView as _0x4606cc,focusChildOnDropdownOpen as _0x5a9080,ListItemView as _0x1d7d74,MenuBarMenuListItemButtonView as _0x216b27,BodyCollection as _0x471887,BalloonPanelView as _0x13911b,ContextualBalloon as _0x4c88f1,Dialog as _0x1305dc,DialogViewPosition as _0x3c3639}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x1cdacc}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 _0x4eeb50}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3ba665}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1721bd(){['model'];['view'];constructor(_0xaf0b7,_0x4474eb){super(),this['model']=_0xaf0b7,this['model']['_isAttached']=!0x0,this['view']=_0x4474eb,this['listenTo'](_0x4474eb,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4474eb,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4474eb,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4474eb,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4474eb,'addComment',(_0x318581,_0x52aeb5)=>this['addComment'](_0x52aeb5)),this['listenTo'](_0x4474eb,'updateComment',(_0x4b5435,_0x52d117,_0x10c706)=>this['updateComment'](_0x52d117,_0x10c706)),this['listenTo'](_0x4474eb,'removeComment',(_0x213a71,_0x1ae623)=>this['removeComment'](_0x1ae623));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x30bad6){this['model']['addComment']({'content':_0x30bad6,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xe3b25a,_0x5974eb){this['model']['getComment'](_0xe3b25a)['update']({'content':_0x5974eb});}['removeComment'](_0x52c379){this['model']['getComment'](_0x52c379)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0xc02caa,_0x53e606,_0x226571){const t=_0xc02caa['t'];switch(_0x53e606){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'},_0x226571);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'},_0x226571);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'},_0x226571);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'},_0x226571);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x226571);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'},_0x226571);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'},_0x226571);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'},_0x226571);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(_0x364e1f,_0x56d1f4){super(_0x364e1f);const _0x45ddc7=_0x5cca00();this['main']=this['createCollection'](),this['editable']=new Vt(_0x364e1f,_0x56d1f4,void 0x0,{'label':()=>N(_0x364e1f,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x364e1f['uiLanguageDirection'],'lang':_0x364e1f['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x45ddc7},'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(_0x44b195){super(_0x44b195),this['view']=new Rt(_0x44b195['locale'],_0x44b195['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x279e77=this['editor']['editing']['view'],_0x596ac3=this['view']['editable'],_0x575827=_0x279e77['document']['getRoot']();_0x596ac3['name']=_0x575827['rootName'],this['view']['render']();const _0x34be96=_0x596ac3['element'];this['setEditableElement'](_0x596ac3['name'],_0x34be96),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x279e77['attachDomRoot'](_0x34be96),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1721bd(_0x4cf281){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x359ffa={}){function _0x3faa81(_0x3c2ee0){return _0x3c2ee0['map'](_0x5e0dcf=>String['fromCharCode'](_0x5e0dcf))['join']('');}(_0x359ffa=Object['assign']({},_0x359ffa))['plugins']||(_0x359ffa['plugins']=hs['defaultPlugins']),super(_0x359ffa),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[_0x3faa81([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3faa81([0x76,0x69,0x65,0x77])][_0x3faa81([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3faa81([0x61,0x75,0x74,0x6f]),this[_0x3faa81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3faa81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3faa81([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3faa81([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3faa81([0x6f,0x6b])});}['create'](){const _0x33e9f8=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x33e9f8))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x50218a=>{const _0x5885b5=this['model']['document']['getRoot'](),_0x4e3657=_0x5885b5&&_0x5885b5['getChild'](_0x5885b5['childCount']-0x1);_0x50218a['setSelection'](_0x4e3657,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2591d8=this['editing']['view'],_0x5aeffc=_0x2591d8['document']['getRoot'](),_0x1f6b36=_0x5aeffc['getChild'](0x0);_0x5aeffc['childCount']>0x1||!_0x1f6b36||'p'!=_0x1f6b36['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x2591d8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1f6b36['placeholder']=this['placeholder']),Ft({'view':_0x2591d8,'element':_0x1f6b36,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1f6b36);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x54eb30,_0x39eb49={}){super(_0x54eb30),this['editor']=null,this['_editorConfig']=_0x39eb49,this['set']('value',_0x39eb49['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x54eb30,'Reply...')),this['set']('submitLabel',N(_0x54eb30,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x158d2e(),this['focusCycler']=new _0x56e70d({'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',(_0x3e96d1,_0x52cab6)=>{this['cancelButtonView']['fire']('execute'),_0x52cab6();}),this['keystrokes']['set']('Ctrl+Enter',(_0x494ef2,_0x1d2b24)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1d2b24());}),this['on']('submit',(_0x41b3f6,_0x227d07)=>{_0x227d07['length']>0xfde8?(alert(N(_0x54eb30,'TOO_LONG_COMMENT_ALERT',[_0x227d07['length'],0xfde8])),_0x41b3f6['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 _0x46ae09=this['editor'];this['element']['insertBefore'](_0x46ae09['ui']['element'],this['element']['firstChild']),_0x46ae09['model']['document']['on']('change',()=>this['value']=_0x46ae09['getData']()),_0x46ae09['bind']('placeholder')['to'](this),this['focusables']['add'](_0x46ae09['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1bc8aa){-0x1===_0x1bc8aa?(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:_0x4fc72c}=this,_0x43080b=new _0x73e913(_0x4fc72c);return _0x43080b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x43080b['withText']=!0x0,_0x43080b['bind']('label')['to'](this,'submitLabel'),_0x43080b['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x43080b['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2723bf,_0x195dee)=>!_0x195dee&&!!_0x2723bf['trim']()),_0x43080b;}['_createCancelButton'](){const {locale:_0x25d1b1}=this,_0x1573bf=new _0x73e913(_0x25d1b1);return _0x1573bf['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1573bf['label']=N(_0x25d1b1,'Cancel'),_0x1573bf['withText']=!0x0,_0x1573bf['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1573bf;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x670e42=>{this['focusTracker']['add'](_0x670e42['element']);}),this['focusables']['on']('change',(_0x2432fd,_0x3ac690)=>{for(const _0xedc1be of Array['from'](_0x3ac690['added'])['reverse']())this['focusTracker']['add'](_0xedc1be['element']);});}}class ie extends kt{constructor(_0x12597b,_0x53f7a8,_0x5cbc9c){super(_0x12597b),this['commentInputView']=new es(_0x12597b,_0x5cbc9c),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x37bd78,_0x17f7be)=>_0x37bd78||!!_0x17f7be),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 _0x31ec43(_0x12597b,_0x53f7a8),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'](_0x2d0487){this['commentInputView']['focus'](_0x2d0487);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5d8ca1,_0x1921cd)=>{const {submitButtonView:_0x263360,cancelButtonView:_0x521c96,editor:_0x107b33}=this['commentInputView'];[_0x263360['element'],_0x521c96['element'],_0x107b33?_0x107b33['editing']['view']['getDomRoot']():null]['filter'](_0x2c8557=>_0x2c8557)['some'](_0x4996d0=>_0x4996d0['contains'](_0x1921cd['target']))||(this['focus'](),_0x1921cd['preventDefault']());});}}class rs extends kt{constructor(_0x284120){super(_0x284120);const _0x19a589=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x19a589['to']('count',_0x40e322=>N(_0x284120,'NUMBER_OF_COMMENTS',_0x40e322))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x12570b,_0x58e993,_0x4eb160){super(_0x12570b);const _0x1aa4fb=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x58e993['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x58e993,this['_config']=_0x4eb160,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x158d2e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x56e70d({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xbf3721=>this['commentViews']['map'](_0x3ac289=>_0x3ac289['element'])['includes'](_0xbf3721['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x12570b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4151fb=>_0x4151fb-this['_config']['maxCommentsWhenCollapsed']);for(const _0x32846b of _0x58e993['comments'])this['_handleNewCommentModel'](_0x32846b);this['_handleInfoComment'](),this['listenTo'](_0x58e993['comments'],'add',(_0x5379b1,_0x3586bb)=>{const _0x2365fe=this['_calculatePosition'](_0x3586bb);this['length']++,this['_handleNewCommentModel'](_0x3586bb,_0x2365fe),this['refreshVisibleViews']();}),this['listenTo'](_0x58e993['comments'],'remove',(_0x32f19b,_0x424d15)=>{this['length']--,this['_handleRemoveCommentModel'](_0x424d15),this['refreshVisibleViews']();}),this['listenTo'](_0x58e993,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x58e993,'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',_0x1aa4fb['if']('length','ck-hidden',_0x3a27e2=>!_0x3a27e2)],'aria-label':N(_0x12570b,'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'](_0x39e835){-0x1===_0x39e835?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5c5ae4 of this['commentViews'])_0x5c5ae4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3dfbc4,_0x52809e){const _0x528b58=new this['_config']['CommentView'](this['locale'],_0x3dfbc4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x528b58['viewUid']=_0x3dfbc4['id'],_0x528b58['delegate']('removeComment')['to'](this),_0x528b58['delegate']('updateComment')['to'](this),_0x528b58['delegate']('resolveCommentThread')['to'](this),_0x528b58['delegate']('editorReady')['to'](this),_0x528b58['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x528b58,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x528b58,_0x52809e);}['_calculatePosition'](_0x184919){const _0x2ecf31=this['_model']['_findOptimalIndex'](_0x184919);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x184919['authoredAt']?_0x2ecf31-0x1:_0x2ecf31:_0x2ecf31-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x73eb9c={'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'],_0x73eb9c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x73eb9c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x399352){const _0x4c9b53=this['commentViews']['remove'](_0x399352['id']);this['stopListening'](_0x4c9b53),_0x4c9b53['isEditMode']&&this['_updateHasDirtyComment'](),_0x4c9b53['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4f4311=>_0x4f4311['isEditMode']);}['_rearrangeCollapse'](){const _0x954e0d=function(_0x57513e){const _0x195ca5=new _0xf11332();for(const _0x473c03 of _0x57513e)_0x195ca5['add'](_0x473c03);return _0x195ca5;}(this['commentViews']),_0x3cb933=this['_collapsedCommentsView']['count'];for(let _0x408c72=0x1;_0x408c72<=_0x3cb933;_0x408c72++)_0x954e0d['remove'](0x1);for(const _0x67094b of _0x954e0d)_0x67094b['collapse']();_0x3cb933>0x0&&_0x954e0d['add'](this['_collapsedCommentsView'],0x1),ns(_0x16e1b2(Array['from'](this['visibleViews']),Array['from'](_0x954e0d)),this['visibleViews'],_0x954e0d);}['_rearrangeExpand'](){ns(_0x16e1b2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3881ba of this['visibleViews'])_0x3881ba['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0xabb72f=>{this['focusTracker']['add'](_0xabb72f['element']),this['keystrokes']['listenTo'](_0xabb72f['element']);}),this['commentViews']['on']('change',(_0x41e6da,_0x389fbf)=>{for(const _0x4c5596 of _0x389fbf['removed'])this['focusTracker']['remove'](_0x4c5596['element']),this['keystrokes']['stopListening'](_0x4c5596['element']);for(const _0x54a775 of Array['from'](_0x389fbf['added'])['reverse']())this['focusTracker']['add'](_0x54a775['element']),this['keystrokes']['listenTo'](_0x54a775['element']);});}}function ns(_0x3a9a85,_0x3324d0,_0x3e136d){let _0x504f9a=0x0;for(const _0x8cee5f of _0x3a9a85)switch(_0x8cee5f){case'insert':_0x3324d0['add'](_0x3e136d['get'](_0x504f9a),_0x504f9a),_0x504f9a++;break;case'delete':_0x3324d0['remove'](_0x504f9a);break;case'equal':_0x504f9a++;}}class oe extends kt{constructor(_0x282163){super(_0x282163);const _0xe6889c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xe6889c['to']('contextValue',_0x29731a=>N(_0x282163,'THREAD_CONTEXT_LABEL',_0x29731a)),'tabindex':-0x1},'children':[{'text':_0xe6889c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2ad438,_0x33bd91){super(_0x2ad438);const _0x5ec97e=this['bindTemplate'];this['_model']=_0x33bd91,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x158d2e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x56e70d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1e0b68=>!!_0x1e0b68),this['bind']('contextValue')['to'](this['_model'],'context',_0x459243=>_0x459243&&_0x459243['value']?this['_trimContextValue'](_0x459243['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',_0x5ec97e['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 _0x5e6869=new _0x73e913(this['locale']);return _0x5e6869['label']=N(this['locale'],'Reopen'),_0x5e6869['tooltip']=N(this['locale'],'Reopen'),_0x5e6869['icon']=_0xeaa7b1,_0x5e6869['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5b48a3=>!_0x5b48a3),_0x5e6869['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1bb421,_0x19b1c3)=>_0x1bb421&&_0x19b1c3),_0x5e6869['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5e6869;}['_trimContextValue'](_0x5467c2){if(_0x5467c2['length']<0x96)return _0x5467c2;const _0xa51325=_0x5467c2['lastIndexOf']('\x20',0x93);return _0x5467c2['substring'](0x0,_0xa51325>-0x1?_0xa51325:0x93)+'...';}['_attachContextActions'](){const _0x5bee6d=this['element']['querySelector']('.ck-context'),_0x98a33b=_0x5bee6d['querySelector']('.ck-context__value');this['listenTo'](_0x5bee6d,'mouseenter',()=>{_0x98a33b['offsetWidth']<_0x98a33b['scrollWidth']&&_0x5bee6d['classList']['add']('overlay');}),this['listenTo'](_0x5bee6d,'mouseleave',()=>{_0x5bee6d['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5797ac of this['focusables'])this['focusTracker']['add'](_0x5797ac['element']),this['keystrokes']['listenTo'](_0x5797ac['element']);}['_createContextView'](){const _0x3bff2e=new oe(this['locale']);return _0x3bff2e['bind']('contextValue')['to'](this),_0x3bff2e;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4258d6,_0x447d83,_0x5f5af4,_0x5ae5f4){super(_0x4258d6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x447d83,this['_localUser']=_0x5f5af4,this['_config']=_0x5ae5f4,this['commentThreadHeaderView']=new Xt(_0x4258d6,_0x447d83),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x4258d6,N(_0x4258d6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x4258d6,_0x447d83,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5ae5f4)),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',(_0x345a13,_0x155be8)=>_0x345a13||!!_0x155be8),this['bind']('isUnlinked')['to'](_0x447d83,'unlinkedAt',_0x2fe94d=>!!_0x2fe94d),this['bind']('ariaLabel')['to'](this,'length',_0x19c657=>{const _0x43afc2=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x19c657,_0x43afc2]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x158d2e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x56e70d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x434c31=>_0x434c31['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 _0x241446=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4d3677=_0x241446['commentInputView'];return _0x241446['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4d3677,'value',(_0x3e5231,_0x3ac081,_0x582703,_0x487844,_0x4c5cc4)=>!!_0x4c5cc4||!!_0x487844&&_0x582703&&!_0x3ac081||_0x3e5231&&_0x582703&&!_0x3ac081),_0x4d3677['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2b1db1,_0x40ca6b,_0x48bbdc)=>{let _0x15415a;return _0x15415a=_0x48bbdc&&_0x40ca6b?'Reply\x20to\x20reopen\x20discussion...':_0x2b1db1?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x15415a);}),_0x4d3677['bind']('submitLabel')['to'](this,'length',_0x1b36f1=>N(this['locale'],_0x1b36f1?'Reply':'Comment')),_0x4d3677['on']('submit',(_0x4dfc46,_0x17af21)=>{this['fire']('addComment',_0x17af21),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4d3677['on']('cancel',()=>{this['focus']();}),_0x4d3677['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4d3677['on']('cancel',_0xa398e8=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xa398e8['stop']());}),this['on']('change:isActive',(_0x1b6277,_0x47052c,_0x26c364)=>{_0x26c364||this['length']||_0x4d3677['value']||this['fire']('removeCommentThread');}),_0x241446;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1d485a,_0x4e725d,_0x3b129d,_0x333f14){super(_0x1d485a,_0x4e725d,_0x3b129d,_0x333f14),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1d485a,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x124e81,_0x2e4f2d,_0x55f3dd)=>{_0x55f3dd||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xcab699,_0x25726f,_0x4c8e88)=>{_0x4c8e88&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x19c0e7=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x19c0e7['if']('isActive','ck-thread--active'),_0x19c0e7['if']('isUnlinked','ck-thread--unlinked'),_0x19c0e7['to']('actionIndicator',_0x943ddd=>_0x943ddd?'ck-thread--'+_0x943ddd:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x19c0e7['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 _0x80db8c of this['commentsListView']['commentViews'])_0x80db8c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x45ed61}=this,_0x54b6bf=this['commentsListView']['commentViews']['get'](0x0);_0x54b6bf===this['_boundFirstCommentView']||_0x54b6bf['isSystemComment']||(this['_boundFirstCommentView']=_0x54b6bf,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x54b6bf,'actionIndicator',_0x232733=>'remove'===_0x232733?'remove':null),_0x54b6bf['placeholder']=N(_0x45ed61,'Write\x20a\x20comment...'),_0x54b6bf['removeButton']['on']('execute',_0x47b0a4=>{_0x47b0a4['stop'](),this['showConfirm'](N(_0x45ed61,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x54b6bf['focus']();}),_0x54b6bf['actionBar']['add'](this['resolveButton'],0x0),_0x54b6bf['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x234b7c=new _0x2b1212(this['locale']);return _0x234b7c['label']=N(this['locale'],'Resolve'),_0x234b7c['tooltip']=N(this['locale'],'Resolve'),_0x234b7c['icon']=_0x5ea6a9,_0x234b7c['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x234b7c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x14c3ed=>!_0x14c3ed),_0x234b7c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4954c0,_0x14bf0f)=>_0x4954c0&&!_0x14bf0f),_0x234b7c['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x234b7c;}['_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(_0x457c7a){super(_0x457c7a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x2e2d4c,_0x193911,_0x1406a5)=>{this['element']['innerHTML']=_0x1406a5;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x13c320,_0x57ea5e,_0x5e2b94){super(_0x13c320),this['_model']=_0x57ea5e,this['_config']=_0x5e2b94,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x57ea5e,'content',_0x57ea5e,'authoredAt',(_0x13a77b,_0x48ef66)=>N(_0x13c320,'COMMENT_ARIA_LABEL',[_0x57ea5e['author']['name'],_0x5e2b94['formatDateTime'](_0x48ef66),new DOMParser()['parseFromString'](_0x13a77b,'text/html')['body']['textContent'],_0x57ea5e['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x13c320,N(_0x13c320,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x2989d3(),this['focusTracker']=new _0x158d2e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x56e70d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2ad71b=>_0x2ad71b['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 _0x18ff28=new is(this['locale']);return _0x18ff28['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x489543,_0x382cf2)=>_0x382cf2?ts(_0x489543,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x489543),_0x18ff28;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x15a8ca=new es(this['locale'],this['_config']['editorConfig']);return _0x15a8ca['value']=this['_model']['content'],_0x15a8ca['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x15a8ca['submitLabel']=N(this['locale'],'Save'),_0x15a8ca['on']('submit',(_0x5e9210,_0x865d47)=>{this['fire']('updateComment',this['_model']['id'],_0x865d47),this['switchToDisplayMode'](),this['focus']();}),_0x15a8ca['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x15a8ca['once']('editorReady',()=>{_0x15a8ca['focus']();}),_0x15a8ca['createEditor'](),_0x15a8ca['delegate']('editorReady')['to'](this),_0x15a8ca['delegate']('editorDestroyed')['to'](this),_0x15a8ca;}['_setupKeyboardNavigation'](){const _0x5797ca=this['element'];this['keystrokes']['listenTo'](_0x5797ca);for(const _0x3aca9d of this['focusables'])this['focusTracker']['add'](_0x3aca9d['element']),this['keystrokes']['listenTo'](_0x3aca9d['element']);this['focusables']['on']('change',(_0x3736e7,_0x1087f8)=>{for(const _0x18e82a of _0x1087f8['removed'])this['focusTracker']['remove'](_0x18e82a['element']),this['keystrokes']['stopListening'](_0x18e82a['element']);for(const _0x747b3 of _0x1087f8['added'])this['focusTracker']['add'](_0x747b3['element']),this['keystrokes']['listenTo'](_0x747b3['element']);}),this['keystrokes']['set']('enter',(_0x515976,_0x25204e)=>{_0x5797ca===_0x515976['target']&&(this['focusCycler']['focusFirst'](),_0x25204e());}),this['keystrokes']['set']('esc',(_0x276e4b,_0x192411)=>{_0x5797ca!==_0x276e4b['target']&&(this['focus'](),_0x192411());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x4c9c73,_0x2dbbba,_0x2a117f){super(_0x4c9c73,_0x2dbbba,_0x2a117f),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x4c9c73,'Reply...')),this['bind']('authoredAt')['to'](_0x2dbbba),this['bind']('resolvedAt')['to'](_0x2dbbba),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 _0x31ec43(_0x4c9c73,_0x2dbbba['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2dbbba,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x34f0d6=this['bindTemplate'],_0x355573=[{'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':_0x34f0d6['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x34f0d6['to']('authoredAt',_0x364663=>this['_config']['formatDateTime'](_0x364663))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x34f0d6['if']('isEditMode','ck-comment__actions--hidden'),_0x34f0d6['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']&&_0x355573['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x34f0d6['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x34f0d6['if']('isEditMode','ck-comment--edit'),_0x34f0d6['if']('isSystemComment','ck-comment--info'),_0x34f0d6['to']('actionIndicator',_0x505149=>_0x505149?'ck-comment--'+_0x505149:'')],'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':_0x355573}]}]};}['_createEditButton'](){const _0x163833=new _0x73e913(this['locale']);return _0x163833['label']=N(this['locale'],'Edit'),_0x163833['icon']=_0xe0f0dc,_0x163833['withText']=!0x0,_0x163833['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x163833['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x376e44=>!_0x376e44),_0x163833['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x163833['on']('execute',()=>this['switchToEditMode']()),_0x163833;}['_createRemoveButton'](){const _0x549b4b=new _0x73e913(this['locale']);return _0x549b4b['label']=N(this['locale'],'Remove'),_0x549b4b['icon']=_0x4301aa,_0x549b4b['withText']=!0x0,_0x549b4b['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x549b4b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x58ec04=>!_0x58ec04),_0x549b4b['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x549b4b['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x549b4b;}['_createDropdown'](){const _0x1d9088=_0x2ad308(this['locale'],_0x25c429),_0x31d52e=_0x1d9088['panelView']['children'],_0x222a96=new _0x4606cc(this['locale']),_0x2626a8=_0x1d9088['bindTemplate'];_0x5a9080(_0x1d9088,()=>this['items']['find'](_0x3b5838=>_0x3b5838['isVisible'])),_0x1d9088['extendTemplate']({'attributes':{'class':[_0x2626a8['if']('isVisible','ck-hidden',_0x574bcd=>!_0x574bcd)]}});const _0x13df5f=(_0x3d69cc,_0x5190e8=-0x1)=>{const _0x2fccc7=new _0x1d7d74(this['locale']);_0x2fccc7['children']['add'](_0x3d69cc);const _0x5dae87=_0x5190e8>-0x1?_0x5190e8:_0x222a96['items']['length'];_0x222a96['items']['add'](_0x2fccc7,_0x5dae87);const _0x27702b=Array['from'](this['items']);_0x1d9088['unbind']('isEnabled','isVisible'),_0x1d9088['bind']('isEnabled')['toMany'](_0x27702b,'isEnabled',(..._0xa9653c)=>_0xa9653c['some'](_0xb654d1=>_0xb654d1)),_0x1d9088['bind']('isVisible')['toMany'](_0x27702b,'isVisible',(..._0x1825ae)=>_0x1825ae['some'](_0x3caadd=>_0x3caadd));};_0x1d9088['panelPosition']='sw',_0x1d9088['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x1f7c91});for(const _0x4b4c6a of this['items'])_0x13df5f(_0x4b4c6a);return _0x31d52e['add'](_0x222a96),_0x1d9088['listenTo'](this['items'],'add',(_0x23ee69,_0xad873,_0x269dd3)=>{_0x13df5f(_0xad873,_0x269dd3);}),_0x1d9088['listenTo'](this['items'],'remove',(_0x13fe20,_0x287a15,_0x4f653d)=>{_0x222a96['items']['remove'](_0x4f653d);}),_0x1d9088;}['_attachActions'](_0x35cd3f,_0x446f9f){const _0x78bb58=_0x35cd3f&&_0x35cd3f['element'];_0x78bb58&&(this['listenTo'](_0x78bb58,'mouseenter',()=>this['actionIndicator']=_0x446f9f),this['listenTo'](_0x78bb58,'focus',()=>this['actionIndicator']=_0x446f9f),this['listenTo'](_0x78bb58,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x78bb58,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x36afdd=super['_createCommentInputView']();return _0x36afdd['bind']('placeholder')['to'](this),_0x36afdd;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x4ebc08){const _0x1d1fa4=Dt(_0x4ebc08,0x1e),_0x4226f7=new MutationObserver(_0x601300=>{for(const _0x53256f of _0x601300)('attributes'==_0x53256f['type']&&'class'==_0x53256f['attributeName']||'childList'==_0x53256f['type']||'characterData'==_0x53256f['type'])&&_0x1d1fa4();});return{'attach'(_0xd2ecc6){_0x4226f7['observe'](_0xd2ecc6,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4226f7['disconnect'](),_0x1d1fa4['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5a404b,_0x56aa67){super(_0x5a404b),this['id']=_0x5cca00(),this['focusTracker']=new _0x158d2e(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5b0be0,_0x15e495)=>this['fire']('Esc',_0x15e495)),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'](_0x56aa67),this['mainView']=_0x56aa67;const _0x3bd0c9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3bd0c9['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 _0x13f19a=this['element']['clientHeight'];_0x13f19a&&(this['height']=_0x13f19a);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1721bd(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3752ba,target:_0x1afc09,type:_0x3f71db,isVisible:_0xb8874b=!0x0}){super(),this['view']=_0x3752ba,this['view']['element']||this['view']['render'](),this['_type']=_0x3f71db,this['_target']=_0x1afc09,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xf11332([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5ef6a2,_0x2f917e)=>{this['view']['focusTracker']['add'](_0x2f917e);}),this['focusableElements']['on']('remove',(_0x2f70ff,_0xff2378)=>{this['view']['focusTracker']['remove'](_0xff2378);}),this['set']('isVisible',_0xb8874b);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x374245=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x374245),_0x374245;}get['targetRect'](){const _0x5abd26=this['target'];if(null===_0x5abd26)return null;if(_0x5abd26 instanceof _0x520f72)return _0x5abd26;const _0x2081ab=_0x5abd26['filter'](_0x133750=>function(_0xb3bb27){const _0x5781be=_0xb3bb27['offsetParent'];if(_0x5781be)return!0x0;const _0x2833c8=_0xb3bb27['getClientRects']()['item'](0x0);return!!_0x2833c8;}(_0x133750));return 0x0===_0x2081ab['length']?null:new _0x520f72(_0x2081ab[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0xed76dc){this['view']['isActive']=_0xed76dc,this['view']['mainView']['isActive']=_0xed76dc;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x5d7120){if(!(null===_0x5d7120||_0x5d7120 instanceof _0x520f72||Array['isArray'](_0x5d7120)&&_0x5d7120['every'](_0x4fe2d1=>fi(_0x4fe2d1))))throw new _0x44e108('annotation-invalid-target',null,{'target':_0x5d7120});}['_getNormalizedTarget'](){const _0x281202='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x281202)?[_0x281202]:_0x281202;}}function fi(_0x5de20a){return null!==_0x5de20a&&'object'==typeof _0x5de20a&&'nodeType'in _0x5de20a&&0x1===_0x5de20a['nodeType'];}class S extends _0xf11332{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x43e2bf=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x158d2e(),this['_focusTracker']['on']('change:isFocused',(_0x58c326,_0xe8f0d9,_0x5db240)=>{_0x5db240||this['fire']('blur');});for(const _0xa18d92 of _0x43e2bf)this['add'](_0xa18d92);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x15fa7f){if(this['has'](_0x15fa7f))throw new _0x44e108('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x15fa7f['innerView'],_0x15fa7f),this['_viewToAnnotation']['set'](_0x15fa7f['view'],_0x15fa7f);for(const _0xf19700 of _0x15fa7f['focusableElements'])this['_focusTracker']['add'](_0xf19700);this['listenTo'](_0x15fa7f['focusableElements'],'add',(_0x4a7ae0,_0x44f040)=>{this['_focusTracker']['add'](_0x44f040);}),this['listenTo'](_0x15fa7f['focusableElements'],'remove',(_0x50f061,_0x400e9c)=>{this['_focusTracker']['remove'](_0x400e9c);}),this['listenTo'](_0x15fa7f['view']['focusTracker'],'change:isFocused',(_0x5abf4e,_0x561364,_0xb5d3f2)=>{_0xb5d3f2&&this['fire']('focus',_0x15fa7f);}),_0x15fa7f['updateTargetRect']();const _0x101caf=this['_getOrderInContent'](_0x15fa7f['view']['targetRect']);return super['add'](_0x15fa7f,_0x101caf);}['remove'](_0x4c24f0){if(!this['has'](_0x4c24f0))throw new _0x44e108('annotationcollection-not-existing-item',null);this['stopListening'](_0x4c24f0['view']['focusTracker']),this['stopListening'](_0x4c24f0['focusableElements']);for(const _0x19d97c of _0x4c24f0['focusableElements'])this['_focusTracker']['remove'](_0x19d97c);return this['_viewToAnnotation']['delete'](_0x4c24f0['view']),this['_innerViewToAnnotation']['delete'](_0x4c24f0['innerView']),super['remove'](_0x4c24f0);}['getByInnerView'](_0x5ef5e8){return this['_innerViewToAnnotation']['get'](_0x5ef5e8);}['getByView'](_0x38a55d){return this['_viewToAnnotation']['get'](_0x38a55d);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x4c1c0f of this)_0x4c1c0f['updateTargetRect']();this['_sort']();}['_sort'](){const _0x49ae79=Array['from'](this)['sort']((_0x2fc8de,_0x1d7155)=>w(_0x2fc8de['view']['targetRect'],_0x1d7155['view']['targetRect']));for(let _0x355f13=_0x49ae79['length']-0x1;_0x355f13>0x0;_0x355f13--){const _0x5b2d8d=_0x49ae79[_0x355f13];_0x355f13!==this['getIndex'](_0x5b2d8d)&&(this['remove'](_0x5b2d8d),this['add'](_0x5b2d8d));}}['_getOrderInContent'](_0x31a065){let _0x4114e3=0x0;if(!_0x31a065)return this['length'];for(const _0x769773 of this){const _0x5604d5=_0x769773['view']['targetRect'];if(_0x5604d5){if(w(_0x31a065,_0x5604d5)<0x0)return _0x4114e3;_0x4114e3++;}}return _0x4114e3;}}function v({source:_0x41379f,target:_0x316501,filter:_0x38f746}){for(const _0x25d484 of _0x41379f)_0x38f746(_0x25d484)&&_0x316501['add'](_0x25d484);_0x316501['listenTo'](_0x41379f,'add',(_0x308c07,_0x166b46)=>{_0x38f746(_0x166b46)&&_0x316501['add'](_0x166b46);}),_0x316501['listenTo'](_0x41379f,'remove',(_0x1effee,_0x1f48e6)=>{_0x316501['has'](_0x1f48e6)&&_0x316501['remove'](_0x1f48e6);});}function w(_0x2af23c,_0x3ecd87){if(null===_0x2af23c&&null===_0x3ecd87)return 0x0;if(null===_0x2af23c)return-0x1;if(null===_0x3ecd87)return 0x1;const _0x383f99=_0x2af23c['top']-_0x3ecd87['top'];return 0x0==_0x383f99?_0x2af23c['left']-_0x3ecd87['left']:_0x383f99;}class y extends _0x59fa22{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a2e79){if(super(_0x2a2e79),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2a2e79 instanceof _0x4cf281){const _0x41adb5=_0x2a2e79['locale'];_0x2a2e79['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x41adb5,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x41adb5,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x41adb5,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x41adb5,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x41adb5,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x41adb5,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x41adb5,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x462e8b){this['collection']['add'](_0x462e8b);}['remove'](_0x2fec78){this['collection']['remove'](_0x2fec78),_0x2fec78['destroy']();}['refreshVisibility'](){for(const _0x750891 of this['collection'])_0x750891['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1eb3fd){return this['collection']['getByInnerView'](_0x1eb3fd);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1c6832 of this['collection'])_0x1c6832['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x6e2a5f){this['fire']('_activateAnnotation',_0x6e2a5f);}['createAnnotation'](_0x4cdbca){return new T(_0x4cdbca);}['createAnnotationView'](_0x27aa00,_0x130921){return new E(_0x27aa00,_0x130921);}['_addActiveAnnotation'](_0x15b1d0){const _0x51b01a=new Set(this['activeAnnotations']);_0x51b01a['add'](_0x15b1d0),this['activeAnnotations']=_0x51b01a;}['_removeActiveAnnotation'](_0x330f97){const _0x4396de=new Set(this['activeAnnotations']);_0x4396de['delete'](_0x330f97),this['activeAnnotations']=_0x4396de;}['_bindAnnotationsToVisibleAnnotations'](){const _0x10a33b=this['collection'],_0x1a8529=this['_visibleAnnotations'];function _0xb92ca9(_0x2d0439){const _0x3c05ea=_0x2d0439['source'];_0x3c05ea['isVisible']&&!_0x1a8529['has'](_0x3c05ea)?_0x1a8529['add'](_0x3c05ea):!_0x3c05ea['isVisible']&&_0x1a8529['has'](_0x3c05ea)&&_0x1a8529['remove'](_0x3c05ea),_0x3c05ea['view']['focusTracker']['remove'](_0x3c05ea['view']['element']),_0x3c05ea['view']['focusTracker']['add'](_0x3c05ea['view']['element']);}this['listenTo'](_0x10a33b,'add',(_0x51760d,_0x5a6897)=>{_0x5a6897['isVisible']&&_0x1a8529['add'](_0x5a6897),this['listenTo'](_0x5a6897,'change:isVisible',_0xb92ca9);}),this['listenTo'](_0x10a33b,'remove',(_0x123e2a,_0x5a4763)=>{_0x1a8529['has'](_0x5a4763)&&_0x1a8529['remove'](_0x5a4763),this['stopListening'](_0x5a4763,'change:isVisible',_0xb92ca9);});}['_setupEnterAnnotationKeystroke'](){const _0x27a87c=_0x501150=>{_0x501150['on']('ready',()=>{_0x501150['keystrokes']['set'](_0x4eeb50,(_0x56b745,_0x3ac7c0)=>{const _0x5a894b=_0x90e481(this['activeAnnotations']['values']());_0x5a894b&&(_0x5a894b['view']['focus'](),_0x3ac7c0());});});};this['context']instanceof _0x4cf281?_0x27a87c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x538982,_0x44ff28)=>{_0x27a87c(_0x44ff28);});}['_setupEscapeAnnotationHandling'](){const _0x2aabca=_0x17d70e=>{const _0x4e8bd5=_0x17d70e['source'],_0x4bbc5d=[];let _0x26cd28;if(Array['isArray'](_0x4e8bd5['target'])){_0x26cd28=_0x4e8bd5['target'][0x0],this['context']instanceof _0x4cf281?_0x4bbc5d['push'](this['context']):this['context']['editors']&&_0x4bbc5d['push'](...this['context']['editors']);for(const _0x208a80 of _0x4bbc5d)for(const _0x489814 of _0x208a80['editing']['view']['domRoots']['values']())if(_0x489814['contains'](_0x26cd28))return void _0x208a80['editing']['view']['focus']();_0x26cd28['focus']();}};this['listenTo'](this['collection'],'add',(_0x46f8ed,_0x433edd)=>{this['listenTo'](_0x433edd,'escape',_0x2aabca,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2f5362,_0x1924df)=>{this['stopListening'](_0x1924df,'escape',_0x2aabca);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x59fa22{['_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(_0x2a5faa){super(_0x2a5faa),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x56de65=this['context']['config'];_0x56de65['define']('comments.maxCommentsWhenCollapsed',0x2),_0x56de65['define']('comments.maxThreadTotalWeight',0x1f4),_0x56de65['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x56de65['define']('comments.CommentThreadView',gt),_0x56de65['define']('comments.CommentView',Tt),_0x56de65['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5d7ffe=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2efd29,_0x358843)=>this['_addCommentThread'](_0x358843)),this['on']('submitCommentThread',(_0x40801b,_0x18ea79)=>this['_submitCommentThread'](_0x18ea79)),this['on']('resolveCommentThread',(_0xaef19d,_0x5f2323)=>this['_resolveCommentThread'](_0x5f2323)),this['on']('resolveCommentThread',(_0x134a03,_0x43ef30)=>this['_updateActiveAnnotation'](_0x43ef30),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1de14b,_0x4de639)=>this['_reopenCommentThread'](_0x4de639)),this['on']('reopenCommentThread',(_0x5bfe85,_0x526b8a)=>this['_updateActiveAnnotation'](_0x526b8a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x448c1c,_0x5730a0)=>this['_removeCommentThread'](_0x5730a0)),this['on']('updateCommentThread',(_0x5aa9a8,_0x552b87)=>this['_updateCommentThread'](_0x552b87)),this['on']('updateCommentThread',(_0x699ae8,_0x235cf9)=>this['_updateActiveAnnotation'](_0x235cf9),{'priority':'lowest'}),this['on']('addComment',(_0x54574d,_0x27e9e2)=>this['_addComment'](_0x27e9e2)),this['on']('updateComment',(_0x40db86,_0x97c713)=>this['_updateComment'](_0x97c713)),this['on']('removeComment',(_0x28df6c,_0x5aac79)=>this['_removeComment'](_0x5aac79)),this['on']('addComment',(_0x3ce218,{threadId:_0x5c699d,isFromAdapter:_0x1fbe4c})=>{if(_0x1fbe4c)return;const _0x4c75a8=this['getCommentThread'](_0x5c699d),_0x36862f=_0x4c75a8&&this['_threadToController']['get'](_0x4c75a8);_0x36862f&&_0x36862f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5d7ffe,'change:activeAnnotations',(_0x42a5b6,_0x75ab3c,_0x1c6287)=>{const _0x128a35=Array['from'](_0x1c6287)['map'](_0x4c2a29=>this['_viewToController']['get'](_0x4c2a29['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x128a35?_0x128a35['model']:null;});}set['adapter'](_0xe67e4c){if(this['_adapter'])throw new _0x44e108('commentsrepository-adapter-already-set');this['_adapter']=_0xe67e4c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x541c9e=_t,threadId:_0x328ba2=_0x5cca00(),comments:_0x25e85a=[],unlinkedAt:_0x3e3957=null,resolvedAt:_0x2789ce=null,resolvedBy:_0x2109ad=null,target:_0xe8a3aa=null,context:_0x5c0926=null,attributes:_0x5e79a6={},isResolvable:_0x2d3930=!0x0,isSubmitted:_0x269745=!0x1,isFromAdapter:_0x4afd99=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x541c9e),{'channelId':_0x541c9e,'threadId':_0x328ba2,'comments':_0x25e85a,'unlinkedAt':_0x3e3957,'resolvedAt':_0x2789ce,'resolvedBy':_0x2109ad,'target':_0xe8a3aa,'context':_0x5c0926,'attributes':_0x5e79a6,'isFromAdapter':_0x4afd99,'isResolvable':_0x2d3930,'isSubmitted':_0x269745}),this['getCommentThread'](_0x328ba2);}['openNewCommentThread']({channelId:_0x56eee6=_t,threadId:_0x55a015=_0x5cca00(),target:_0x1292ab,context:_0x4b934e=null,isResolvable:_0x38a94c=!0x0}){if(this['_readOnlyChannels']['has'](_0x56eee6)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1292ab)throw new _0x44e108('commentsrepository-missing-target');const _0x4a275a=this['addCommentThread']({'channelId':_0x56eee6,'threadId':_0x55a015,'target':_0x1292ab,'context':_0x4b934e,'isResolvable':_0x38a94c});if(!_0x4a275a)return null;const _0x468bc8=this['_threadToController']['get'](_0x4a275a),_0x55fe8d=_0x468bc8['view']['commentThreadInputView']['commentInputView'],_0x1f9b17=this['context']['plugins']['get'](y),_0x2973c3=_0x1f9b17['getByInnerView'](_0x468bc8['view']);return _0x1f9b17['activate'](_0x2973c3),_0x55fe8d['once']('editorReady',()=>_0x55fe8d['focus']()),_0x4a275a;}['hasCommentThread'](_0x20348d){if('string'!=typeof _0x20348d)throw new _0x44e108('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x20348d);}['updateCommentThread']({channelId:_0x59d757=_t,threadId:_0x23abc7,context:_0x152bd0,unlinkedAt:_0x1a60da,attributes:_0x1a5495,isFromAdapter:_0x2975c7=!0x1}){return this['fire'](Nt('updateCommentThread',_0x59d757),{'channelId':_0x59d757,'threadId':_0x23abc7,'context':_0x152bd0,'unlinkedAt':_0x1a60da,'attributes':_0x1a5495,'isFromAdapter':_0x2975c7}),this['getCommentThread'](_0x23abc7);}['getCommentThread'](_0x442784){if('string'!=typeof _0x442784)throw new _0x44e108('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x442784);}['fetchCommentThread']({channelId:_0x108df2,threadId:_0x3903c8}={}){const _0x1abebe=this['getCommentThread'](_0x3903c8);if(_0x1abebe)return Promise['resolve'](_0x1abebe);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x44e108('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x108df2,'threadId':_0x3903c8})['then'](_0x5d4c3d=>this['hasCommentThread'](_0x3903c8)?this['getCommentThread'](_0x3903c8):_0x5d4c3d?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x108df2},_0x5d4c3d)):void 0x0)['catch'](_0x4aad38=>{throw console['error'](_0x4aad38),new _0x44e108('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x238e7a,skipNotAttached:_0x2b776f=!0x1,skipEmpty:_0x49ebd5=!0x1,toJSON:_0x5038f8=!0x1}={}){const _0xb7d30b=[];for(const _0x23bc96 of this['_threads']['values']())_0x238e7a&&_0x23bc96['channelId']!==_0x238e7a||_0x2b776f&&!_0x23bc96['isAttached']||_0x49ebd5&&0x0===_0x23bc96['length']||_0xb7d30b['push'](_0x23bc96);return _0x5038f8?_0xb7d30b['map'](_0x5a87a8=>_0x5a87a8['toJSON']()):_0xb7d30b;}['getAnnotationForCommentThread'](_0x1dd981){const _0x2bc52a=this['_threadToController']['get'](_0x1dd981);if(!_0x2bc52a)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2bc52a['view'])||null;}['getCommentThreadForAnnotation'](_0xa7adac){const _0xedf45b=this['_viewToController']['get'](_0xa7adac['innerView']);return _0xedf45b?_0xedf45b['model']:null;}['setActiveCommentThread'](_0x440fc0){const _0x3871d6=this['context']['plugins']['get'](y);if(!_0x440fc0)return void(this['activeCommentThread']&&_0x3871d6['deactivateAll']());const _0x55f8c7=this['getCommentThread'](_0x440fc0);if(!_0x55f8c7)throw new _0x44e108('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x440fc0});if(!this['_threadToController']['has'](_0x55f8c7))throw new _0x44e108('commentsrepository-active-not-attached',null,{'threadId':_0x440fc0});const _0x5a1ffa=_0x3871d6['getByInnerView'](this['_threadToController']['get'](_0x55f8c7)['view']);_0x3871d6['activate'](_0x5a1ffa);}['switchReadOnly'](_0x32bc92,_0x28c270){_0x32bc92?this['_readOnlyChannels']['add'](_0x28c270):this['_readOnlyChannels']['delete'](_0x28c270),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2d6682){return this['_readOnlyChannels']['has'](_0x2d6682)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x434009,_0x231c1e){return new vt(_0x434009,_0x231c1e);}['setPermissions'](_0x52785e,_0x1ae490=_t){this['_permissions']['set'](_0x1ae490,_0x52785e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2eacbb=_t){return this['_permissions']['has'](_0x2eacbb)?this['_permissions']['get'](_0x2eacbb):bt;}['_addCommentThread']({channelId:_0x2ca5e4,threadId:_0x35ea3b,comments:_0x49ec75,unlinkedAt:_0x351bb7,resolvedAt:_0x4b5008,resolvedBy:_0x17bde5,target:_0x3c31d4,context:_0x232585,attributes:_0x5f3468,isFromAdapter:_0x49c6cd,isResolvable:_0x1d834c,isSubmitted:_0xc64132}){if('string'!=typeof _0x35ea3b)throw new _0x44e108('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x35ea3b});if(this['hasCommentThread'](_0x35ea3b))throw new _0x44e108('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x35ea3b});const _0x6836c7=new pi(this,{'channelId':_0x2ca5e4,'id':_0x35ea3b,'context':_0x232585,'attributes':_0x5f3468,'unlinkedAt':_0x351bb7,'resolvedAt':_0x4b5008,'resolvedBy':_0x17bde5?this['context']['plugins']['get'](it)['getUser'](_0x17bde5):null,'isResolvable':_0x1d834c,'isSubmitted':_0xc64132||_0x49c6cd});this['_threads']['set'](_0x35ea3b,_0x6836c7);for(const _0x1a784 of _0x49ec75)_0x6836c7['_add'](this['_createNewComment']({'threadId':_0x35ea3b,..._0x1a784}));return _0x3c31d4&&_0x6836c7['attachTo'](_0x3c31d4),_0x49c6cd||!_0x6836c7['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2ca5e4,'threadId':_0x35ea3b});}['_submitCommentThread']({channelId:_0x56e7c4,threadId:_0x5ee27a}){if(!this['hasCommentThread'](_0x5ee27a))throw new _0x44e108('commentsrepository-missing-comment-thread',this);const _0x2f27b2=this['getCommentThread'](_0x5ee27a);if(_0x2f27b2['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x205925,comments:_0x61951e,resolvedAt:_0x118319,resolvedBy:_0x5a7711,context:_0x188c30,attributes:_0x437caa}=_0x2f27b2,_0x1c302d=this['context']['plugins']['get']('PendingActions'),_0x929d4a=_0x1c302d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x56e7c4,'threadId':_0x205925,'comments':_0x61951e['map'](_0x5769f6=>_0x5769f6['toJSON']()),'resolvedAt':_0x118319,'resolvedBy':_0x5a7711?_0x5a7711['id']:_0x5a7711,'context':_0x188c30,'attributes':_0x437caa})['then'](({comments:_0x14be38})=>{_0x1c302d['remove'](_0x929d4a);for(const _0xd03256 of _0x14be38)this['_updateComment']({'channelId':_0x56e7c4,'threadId':_0x5ee27a,'commentId':_0xd03256['commentId'],'createdAt':_0xd03256['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2930fc=>{throw console['error'](_0x2930fc),new _0x44e108('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x271a46,target:_0x5c5319}){const _0x3de9c7=this['getCommentThread'](_0x271a46);if(!_0x3de9c7)throw new _0x44e108('commentsrepository-attach-missing-comment-thread',this);const _0x455248=this['context']['plugins']['get']('PendingActions'),_0x15f373=this['context']['plugins']['get'](y),_0x45efd0=this['_createCommentThreadView'](_0x3de9c7),_0x4249b3=new vt(_0x3de9c7,_0x45efd0);let _0x37fadc=null;_0x45efd0['on']('change:isDirty',(_0x1ffebc,_0x1c127c,_0x3a5125)=>{_0x3a5125?_0x37fadc=_0x455248['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x37fadc&&(_0x455248['remove'](_0x37fadc),_0x37fadc=null);}),this['_threadToController']['set'](_0x3de9c7,_0x4249b3),this['_viewToController']['set'](_0x45efd0,_0x4249b3);const _0x3fa8f6=new E(this['context']['locale'],_0x45efd0);_0x3fa8f6['bind']('length')['to'](_0x45efd0),_0x3fa8f6['bind']('isDirty')['to'](_0x45efd0,'isDirty',_0x45efd0,'length',(_0x7a4190,_0x3734fb)=>_0x7a4190||!_0x3734fb),_0x3fa8f6['bind']('isActive')['to'](_0x45efd0),_0x3fa8f6['type']='comment';const _0x252716=new T({'view':_0x3fa8f6,'target':_0x5c5319,'type':'comment','isVisible':!_0x3de9c7['archivedAt']&&!!('function'==typeof _0x5c5319?_0x5c5319():_0x5c5319)});return _0x45efd0['on']('escape',()=>{_0x252716['fire']('escape');}),this['_bindAnnotationToEditors'](_0x45efd0,_0x252716),_0x15f373['add'](_0x252716),_0x252716;}['_bindAnnotationToEditors'](_0x203a1,_0x2ed509){this['listenTo'](_0x203a1,'editorReady',(_0x262756,_0x34db66)=>{const _0x6afb17=_0x34db66['ui']['view']['body']['bodyCollectionContainer'];_0x2ed509['focusableElements']['add'](_0x6afb17),this['context']instanceof _0x4cf281&&this['context']['ui']['focusTracker']['add'](_0x6afb17);},{'priority':'highest'}),this['listenTo'](_0x203a1,'editorDestroyed',(_0x2412d4,_0x4bf584)=>{const _0x18586d=_0x4bf584['ui']['view']['body']['bodyCollectionContainer'];_0x2ed509['focusableElements']['has'](_0x18586d)&&_0x2ed509['focusableElements']['remove'](_0x18586d),this['context']instanceof _0x4cf281&&this['context']['ui']['focusTracker']['remove'](_0x18586d);});}['_unbindEditors'](_0x5a6a18){this['stopListening'](_0x5a6a18,'editorReady'),this['stopListening'](_0x5a6a18,'editorDestroyed');}['_createCommentThreadView'](_0x35ce0c){const _0x2cd96a=this['context']['plugins']['get'](it),{config:_0x4b3701,locale:_0x2b647c}=this['context'],_0x4612a0=pt(_0x4b3701['get']('locale'),_0x2b647c);return new(0x0,(_0x4b3701['get']('comments'))['CommentThreadView'])(_0x2b647c,_0x35ce0c,_0x2cd96a['me'],{'editorConfig':{..._0x4b3701['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4b3701['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4b3701['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4b3701['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4b3701['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4612a0,'CommentView':_0x4b3701['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x301b18,channelId:_0x3a904d,resolvedAt:_0x1859b5,resolvedBy:_0x33cb4a,isFromAdapter:_0x3f0280}){if(!this['hasCommentThread'](_0x301b18))throw new _0x44e108('commentsrepository-missing-comment-thread',null,{'threadId':_0x301b18});const _0x11bc00=this['getCommentThread'](_0x301b18);if(_0x11bc00['isResolved'])throw new _0x44e108('commentsrepository-resolved-comment-thread',null,{'threadId':_0x301b18});const _0x435add=this['context']['plugins']['get'](it);if(_0x11bc00['resolvedBy']=_0x435add['getUser'](_0x33cb4a),_0x11bc00['resolvedAt']=_0x1859b5,_0x3f0280||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x27c501=this['context']['plugins']['get']('PendingActions'),_0x1023f3=_0x27c501['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3a904d,'threadId':_0x301b18})['then'](({resolvedAt:_0x118a8a,resolvedBy:_0xf7719a})=>{_0x27c501['remove'](_0x1023f3),_0x11bc00['resolvedBy']['id']!==_0xf7719a&&(_0x11bc00['resolvedBy']=_0x435add['getUser'](_0xf7719a)),_0x11bc00['resolvedAt']=_0x118a8a;})['catch'](_0x5a4a96=>{throw console['error'](_0x5a4a96),new _0x44e108('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2d5fe5,channelId:_0xb8861f,isFromAdapter:_0x4d07cb}){if(!this['hasCommentThread'](_0x2d5fe5))throw new _0x44e108('commentsrepository-missing-comment-thread',null,{'threadId':_0x2d5fe5});const _0x1eda18=this['getCommentThread'](_0x2d5fe5);if(!_0x1eda18['isResolved'])throw new _0x44e108('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2d5fe5});if(_0x1eda18['resolvedBy']=null,_0x1eda18['resolvedAt']=null,_0x4d07cb||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x41e31b=this['context']['plugins']['get']('PendingActions'),_0x3e0e02=_0x41e31b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xb8861f,'threadId':_0x2d5fe5})['then'](()=>_0x41e31b['remove'](_0x3e0e02))['catch'](_0x1ed249=>{throw console['error'](_0x1ed249),new _0x44e108('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x150264,isFromAdapter:_0x5b7111}){const _0x1dce6d=this['getCommentThread'](_0x150264);if(!_0x1dce6d)throw new _0x44e108('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x150264),this['_threads']['delete'](_0x150264),!_0x1dce6d['isSubmitted']||_0x5b7111||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3d0264=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1b9862}=_0x1dce6d,_0x135765=_0x3d0264['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1b9862,'threadId':_0x150264})['then'](()=>_0x3d0264['remove'](_0x135765))['catch'](_0x383a73=>{throw console['error'](_0x383a73),new _0x44e108('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3da40d,unlinkedAt:_0x34cefd,context:_0x310fef,attributes:_0x590843,isFromAdapter:_0x32fa42}){if('string'!=typeof _0x3da40d)throw new _0x44e108('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3da40d});if(!this['hasCommentThread'](_0x3da40d))throw new _0x44e108('commentsrepository-missing-comment-thread',null,{'threadId':_0x3da40d});const _0x5875a8=this['getCommentThread'](_0x3da40d);let _0x585bf3=!0x1;if(void 0x0!==_0x310fef&&_0x5875a8['context']!==_0x310fef&&(_0x5875a8['context']=_0x310fef,_0x585bf3=!0x0),void 0x0!==_0x34cefd&&_0x5875a8['unlinkedAt']!==_0x34cefd&&(_0x5875a8['unlinkedAt']=_0x34cefd,_0x585bf3=!0x0),_0x590843&&!At(_0x590843,_0x5875a8['attributes'])&&(_0x5875a8['attributes']=_0x590843,_0x585bf3=!0x0),!_0x585bf3)return Promise['resolve']();if(!_0x5875a8['isSubmitted']||_0x32fa42||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x358b3a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1bbbad}=_0x5875a8,_0x191bc0=_0x358b3a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1bbbad,'threadId':_0x3da40d,'context':_0x310fef,'unlinkedAt':_0x34cefd,'attributes':_0x590843})['then'](()=>_0x358b3a['remove'](_0x191bc0))['catch'](_0x5b6762=>{throw console['error'](_0x5b6762),new _0x44e108('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x19775f){const _0x53cbbb=this['context']['plugins']['get'](y),_0x38fc0f=this['getCommentThread'](_0x19775f);if(_0x38fc0f['_isAttached']=!0x1,this['_threadToController']['has'](_0x38fc0f)){const _0x26c23b=this['_threadToController']['get'](_0x38fc0f),_0x4778e9=_0x26c23b['view'],_0x14e0f5=_0x53cbbb['getByInnerView'](_0x4778e9);this['_threadToController']['delete'](_0x38fc0f),this['_viewToController']['delete'](_0x4778e9),_0x14e0f5&&_0x53cbbb['remove'](_0x14e0f5),_0x26c23b['destroy'](),_0x4778e9['destroy']()['then'](()=>{this['_unbindEditors'](_0x4778e9);});}}['_updateActiveAnnotation']({threadId:_0x120f20,resolvedAt:_0x4b350b,unlinkedAt:_0x3b1fba}){const _0x294b00=!!_0x4b350b,_0x3a9521=this['context']['plugins']['get'](y),_0x4b5c67=this['getCommentThread'](_0x120f20);if(this['_threadToController']['has'](_0x4b5c67)){const _0xff9cb3=this['_threadToController']['get'](_0x4b5c67)['view'],_0x276d8b=_0x3a9521['getByInnerView'](_0xff9cb3);_0x276d8b&&(_0x294b00&&_0x3a9521['_removeActiveAnnotation'](_0x276d8b),_0x3b1fba?_0x276d8b['isVisible']=!0x1:_0x276d8b['refreshVisibility']());}}['_getExternalAuthor'](_0x38fca0){const _0x5220df=this['context']['plugins']['get'](it),_0xbd3f84=It('external:'+_0x38fca0),_0x448570=_0x5220df['getUser'](_0xbd3f84);return _0x448570||_0x5220df['addUser']({'id':_0xbd3f84,'name':_0x38fca0});}['_createNewComment']({threadId:_0x377cbd,commentId:_0xb7b952=_0x5cca00(),content:_0x1ee1d0,authorId:_0x4bf706,createdAt:_0x255d8f,attributes:_0x26b954}){if('string'!=typeof _0xb7b952)throw new _0x44e108('commentsrepository-invalid-commentid');if('string'!=typeof _0x4bf706)throw new _0x44e108('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1ee1d0||!_0x1ee1d0['trim']())throw new _0x44e108('commentsrepository-invalid-comment-content');const _0x4b4121=this['context']['plugins']['get'](it)['getUser'](_0x4bf706);if(!_0x4b4121)throw new _0x44e108('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4bf706});let _0x49d53c=null,_0x4458ee=_0x255d8f;return _0x26b954?.['@external']&&(_0x49d53c=this['_getExternalAuthor'](_0x26b954['@external']['authorName']),_0x4458ee=new Date(_0x26b954['@external']['createdAt'])),new wi(this,{'threadId':_0x377cbd,'id':_0xb7b952,'author':_0x49d53c||_0x4b4121,'creator':_0x4b4121,'content':_0x1ee1d0,'createdAt':_0x255d8f,'authoredAt':_0x4458ee,'attributes':_0x26b954});}['_addComment'](_0x3aa0a6){let {threadId:_0x258b41,content:_0x48d8b9,attributes:_0x30928f,isFromAdapter:_0x7f1978}=_0x3aa0a6;const _0x34bdd8=this['getCommentThread'](_0x3aa0a6['threadId']);if(!_0x34bdd8)throw new _0x44e108('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4c7561=this['_createNewComment'](_0x3aa0a6),{id:_0xab8899}=_0x4c7561;if(_0x34bdd8['_add'](_0x4c7561),_0x7f1978||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x34bdd8['isSubmitted'])return Promise['resolve']();const _0x48d81c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33bc01}=_0x34bdd8,_0x4efee6=_0x48d81c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x30928f||(_0x30928f={}),this['adapter']['addComment']({'channelId':_0x33bc01,'threadId':_0x258b41,'commentId':_0xab8899,'content':_0x48d8b9,'attributes':_0x30928f})['then'](_0x31469a=>{_0x48d81c['remove'](_0x4efee6),_0x31469a&&this['_updateComment']({'channelId':_0x33bc01,'threadId':_0x258b41,'commentId':_0xab8899,'createdAt':_0x31469a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1f45a2=>{throw console['error'](_0x1f45a2),new _0x44e108('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x195aef,commentId:_0x57f673,content:_0x53e8d9,createdAt:_0x3a6aac,attributes:_0x31c36a,isFromAdapter:_0x39b81d}){if(void 0x0!==_0x53e8d9&&('string'!=typeof _0x53e8d9||!_0x53e8d9['trim']()['length']))throw new _0x44e108('commentsrepository-update-comment-invalid-content');const _0x4c286f=this['getCommentThread'](_0x195aef),_0x10e2a5=_0x4c286f['getComment'](_0x57f673);if(!_0x10e2a5)throw new _0x44e108('commentsrepository-update-missing-comment',this);let _0x355e25=!0x1;if(_0x53e8d9&&_0x53e8d9!==_0x10e2a5['content']&&(_0x10e2a5['isEditable']||_0x39b81d)&&(_0x10e2a5['content']=_0x53e8d9,_0x355e25=!0x0),_0x3a6aac&&_0x3a6aac!==_0x10e2a5['createdAt']&&(_0x10e2a5['createdAt']=_0x3a6aac,_0x10e2a5['attributes']&&_0x10e2a5['attributes']['@external']||(_0x10e2a5['authoredAt']=_0x3a6aac),_0x355e25=!0x0),_0x31c36a&&!At(_0x31c36a,_0x10e2a5['attributes'])&&(_0x10e2a5['attributes']=_0x31c36a,_0x355e25=!0x0),!_0x355e25)return Promise['resolve']();if(_0x4c286f['fire']('commentUpdated'),_0x39b81d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5116e2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x48e764}=this['getCommentThread'](_0x10e2a5['threadId']),_0x3c3afc=_0x5116e2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x48e764,'threadId':_0x195aef,'commentId':_0x57f673,'content':_0x53e8d9,'attributes':_0x31c36a})['then'](()=>_0x5116e2['remove'](_0x3c3afc))['catch'](_0x51c12c=>{throw console['error'](_0x51c12c),new _0x44e108('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xe0f32f,commentId:_0x12de7c,isFromAdapter:_0x23b878}){const _0x286ba3=this['getCommentThread'](_0xe0f32f),_0x594267=_0x286ba3['getComment'](_0x12de7c);if(!_0x594267)throw new _0x44e108('commentsrepository-remove-missing-comment',this);if(_0x286ba3['_remove'](_0x594267),_0x23b878||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2cb1df=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d8c38}=_0x286ba3,_0xbb1339=_0x2cb1df['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3d8c38,'threadId':_0xe0f32f,'commentId':_0x12de7c})['then'](()=>_0x2cb1df['remove'](_0xbb1339))['catch'](_0x1ed918=>{throw console['error'](_0x1ed918),new _0x44e108('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1721bd(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x18623d,_0xe0b95c){super();const _0x3db9bc=_0xe0b95c['isResolvable'];this['channelId']=_0xe0b95c['channelId'],this['id']=_0xe0b95c['id'],this['comments']=new _0xf11332(),this['_repository']=_0x18623d,this['_isAttached']=!0x1,this['_isSubmitted']=_0xe0b95c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x18623d,'_permissions',_0x18623d,'_readOnlyChannels',()=>_0x18623d['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x18623d,'_permissions',()=>_0x18623d['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x18623d,'_permissions',()=>{const _0x1ffa0a=_0x18623d['getPermissions'](this['channelId']);return _0x1ffa0a['write']||_0x1ffa0a['admin'];}),this['bind']('isResolvable')['to'](_0x18623d,'_permissions',()=>_0x3db9bc&&_0x18623d['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xe0b95c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1cb738,_0x3ef935)=>_0x1cb738?_0x3ef935?_0x1cb738<_0x3ef935?_0x1cb738:_0x3ef935:_0x1cb738:_0x3ef935),this['set']('unlinkedAt',_0xe0b95c['unlinkedAt']||null),this['set']('resolvedAt',_0xe0b95c['resolvedAt']||null),this['set']('resolvedBy',_0xe0b95c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1f848d=>!!_0x1f848d),this['set']('attributes',_0xe0b95c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x20ba83,_0x550f9c)=>_0x20ba83+_0x550f9c['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x45bdd1,id:_0x38f475}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x45bdd1),{'channelId':_0x45bdd1,'threadId':_0x38f475});}['setUnlinkedAt'](_0x238129){this['_update']({'unlinkedAt':_0x238129});}['resolve']({resolvedAt:_0x2986b6=new Date(),resolvedBy:_0x5743a3='',isFromAdapter:_0x2cf287=!0x1}={}){const _0xe5066e=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4a6943,id:_0x473c8c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4a6943),{'channelId':_0x4a6943,'threadId':_0x473c8c,'resolvedAt':_0x2986b6,'resolvedBy':_0x5743a3||_0xe5066e['id'],'isFromAdapter':_0x2cf287});}['reopen']({isFromAdapter:_0x19ba44=!0x1}={}){const {channelId:_0x53964,id:_0x343022}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x53964),{'channelId':_0x53964,'threadId':_0x343022,'isFromAdapter':_0x19ba44});}['setContext'](_0x16afed){this['context']||this['_update']({'context':_0x16afed});}['setAttribute'](_0x4df053,_0x105efb){const _0x9636f=wt(this['attributes']);yt(_0x9636f,_0x4df053,_0x105efb),this['_update']({'attributes':_0x9636f});}['removeAttribute'](_0x500d04){const _0x54df3a=wt(this['attributes']);Ct(_0x54df3a,_0x500d04),this['_update']({'attributes':_0x54df3a});}['remove']({isFromAdapter:_0x5549f5=!0x1}={}){const {channelId:_0x54e20f,id:_0x147ad5}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x54e20f),{'channelId':_0x54e20f,'threadId':_0x147ad5,'isFromAdapter':_0x5549f5});}['attachTo'](_0x2daa53){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2daa53});}['addComment'](_0x126999){const {channelId:_0x4f770d,id:_0x66b251}=this;this['_repository']['fire'](Nt('addComment',_0x4f770d,_0x66b251),Object['assign']({'channelId':_0x4f770d,'threadId':_0x66b251},_0x126999));}['getComment'](_0x341d71){if('string'!=typeof _0x341d71)throw new _0x44e108('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x341d71});return this['comments']['get'](_0x341d71);}['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'](_0x17fabb=>_0x17fabb['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2df7c1){return this['listenTo'](_0x2df7c1,'change:authoredAt',()=>{const _0x407c3a=this['_findOptimalIndex'](_0x2df7c1),_0x2325ce=this['comments'];_0x407c3a-0x1!=_0x2325ce['getIndex'](_0x2df7c1)&&_0x407c3a+0x1!=_0x2325ce['getIndex'](_0x2df7c1)&&(this['_remove'](_0x2df7c1),this['_add'](_0x2df7c1));}),this['comments']['add'](_0x2df7c1,this['_findOptimalIndex'](_0x2df7c1));}['_update'](_0x15bc7f){const {channelId:_0x384f20,id:_0x2bdce3}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x384f20),{..._0x15bc7f,'channelId':_0x384f20,'threadId':_0x2bdce3});}['_remove'](_0x41e427){return this['stopListening'](_0x41e427),_0x41e427['destroy'](),this['comments']['remove'](_0x41e427);}['_findOptimalIndex'](_0x1d2091){const _0x5a70e9=this['comments']['find'](_0x14726e=>new Date(_0x14726e['authoredAt'])['getTime']()>new Date(_0x1d2091['authoredAt'])['getTime']());return _0x5a70e9?this['comments']['getIndex'](_0x5a70e9):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1721bd(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x33c058,_0x5ed824){super();const _0x52f3b8=_0x33c058['context']['plugins']['get'](it)['me'],_0x15e971=_0x33c058['getCommentThread'](_0x5ed824['threadId']),_0x137e59=0x0===_0x15e971['comments']['length'],_0x1c87c8=_0x52f3b8===_0x5ed824['author'];this['id']=_0x5ed824['id'],this['threadId']=_0x5ed824['threadId'],this['author']=_0x5ed824['author'],this['creator']=_0x5ed824['creator'],this['isExternal']=Boolean(_0x5ed824['attributes']&&_0x5ed824['attributes']['@external']),this['set']('content',_0x5ed824['content']),this['createdAt']=_0x5ed824['createdAt']||new Date(),this['set']('authoredAt',_0x5ed824['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x15e971,'resolvedAt'),this['set']('attributes',_0x5ed824['attributes']||{}),this['bind']('isEditable')['to'](_0x33c058,'_permissions',()=>{const _0x171be2=_0x33c058['getPermissions'](_0x15e971['channelId'])['write'],_0x5871cb=_0x33c058['getPermissions'](_0x15e971['channelId'])['modifyAll'];return _0x1c87c8&&_0x171be2||!_0x1c87c8&&_0x5871cb;}),this['bind']('isRemovable')['to'](_0x15e971,'isRemovable',_0x33c058,'_permissions',_0x50f48c=>{const _0x45e7cf=_0x33c058['getPermissions'](_0x15e971['channelId'])['write'],_0x32fe7e=_0x33c058['getPermissions'](_0x15e971['channelId'])['modifyAll'];return _0x1c87c8&&_0x45e7cf||_0x50f48c&&_0x137e59||!_0x1c87c8&&_0x32fe7e&&!_0x137e59;}),this['bind']('isReadOnly')['to'](_0x15e971,'isReadOnly'),this['_repository']=_0x33c058;}get['weight'](){return Math['max'](function(_0x13786e){const _0x312780=document['createElement']('div');return _0x312780['innerHTML']=_0x13786e,_0x312780['textContent']['length'];}(this['content']),0xc8);}['update'](_0x518cc6){const {threadId:_0x51b6fa,id:_0x154a51}=this;if(!this['_repository']['hasCommentThread'](_0x51b6fa))throw new _0x44e108('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5eabb6}=this['_repository']['getCommentThread'](_0x51b6fa);this['_repository']['fire'](Nt('updateComment',_0x5eabb6,_0x51b6fa),{'channelId':_0x5eabb6,'threadId':_0x51b6fa,'commentId':_0x154a51,..._0x518cc6});}['setAttribute'](_0x597ecb,_0x47a17c){const _0x3e2684=wt(this['attributes']);yt(_0x3e2684,_0x597ecb,_0x47a17c),this['update']({'attributes':_0x3e2684});}['removeAttribute'](_0xcfeadc){const _0x35cd42=wt(this['attributes']);Ct(_0x35cd42,_0xcfeadc),this['update']({'attributes':_0x35cd42});}['remove'](_0x3ab0a9={}){if(!_0x3ab0a9['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x262da6,id:_0x2dcf58}=this;if(!this['_repository']['hasCommentThread'](_0x262da6))throw new _0x44e108('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4b69ac}=this['_repository']['getCommentThread'](_0x262da6);this['_repository']['fire'](Nt('removeComment',_0x4b69ac,_0x262da6),{'channelId':_0x4b69ac,'threadId':_0x262da6,'commentId':_0x2dcf58,..._0x3ab0a9});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x57def8,..._0x8862ea){for(const _0x437df3 of _0x8862ea)void 0x0!==_0x437df3&&(_0x57def8+=':'+String(_0x437df3));return _0x57def8;}class ot extends _0xad8c8{constructor(_0x4c5196){super(_0x4c5196),this['set']('hasContent',!0x1);}['refresh'](){const _0x5e5e5d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4e6c72 of _0x5e5e5d['getRanges']())if(this['_hasContent'](_0x4e6c72))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5005c0=_0x5cca00(),ranges:_0x763181,comment:_0x265709}={}){const _0x1d0fcf=this['editor']['model'],_0x336626=_0x763181??Array['from'](_0x1d0fcf['document']['selection']['getRanges']()),_0x4fe735=[];for(const _0x75dd7 of _0x336626)this['_hasContent'](_0x75dd7)&&_0x4fe735['push'](this['_trimToContent'](_0x75dd7));if(!_0x4fe735['length'])throw new _0x44e108('addcommentthreadcommand-incorrect-ranges',null);_0x265709&&this['_createCommentThread'](_0x5005c0,_0x265709),this['_createMarkersFromRanges'](_0x5005c0,_0x4fe735,!!_0x265709);}['_createMarkersFromRanges'](_0x5b7e97,_0xc483d9,_0x5fdf0b){this['editor']['model']['change'](_0x53d3ea=>{for(const _0x39faf6 of _0xc483d9){const _0x512008=_0x5cca00()['substr'](0x1,0x5),_0x573a24='comment:'+_0x5b7e97+':'+_0x512008;_0x53d3ea['addMarker'](_0x573a24,{'range':_0x39faf6,'usingOperation':_0x5fdf0b,'affectsData':_0x5fdf0b});}});}['_createCommentThread'](_0x16ef7b,_0x14eaf1){const _0x1619a9=this['editor']['plugins']['get']('CommentsRepository'),_0x46d67f=this['editor']['config']['get']('collaboration.channelId'),_0x355690=this['editor']['plugins']['get']('Users')['me'];if(!_0x355690)throw new _0x44e108('addcommentthreadcommand-user-not-found',null);_0x1619a9['addCommentThread']({'threadId':_0x16ef7b,'channelId':_0x46d67f,'comments':[{'authorId':_0x355690['id'],'content':_0x14eaf1,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x36a99d){for(const _0x2dbff8 of _0x36a99d['getItems']())if(this['_itemIsContent'](_0x2dbff8))return!0x0;return!0x1;}['_itemIsContent'](_0x160731){return _0x160731['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x160731)&&!_0x160731['is']('element','tableCell');}['_trimToContent'](_0x1d550e){const _0x39f414=_0x3a4643=>!this['_itemIsContent'](_0x3a4643['item']),_0x3d7318=_0x1d550e['start']['getLastMatchingPosition'](_0x39f414),_0x3ae751=_0x1d550e['end']['getLastMatchingPosition'](_0x39f414,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3d7318,_0x3ae751);}}class b extends _0x3f26c5{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x231387){super(_0x231387),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1c454d=this['editor'],_0x5d8012=_0x1c454d['model']['document']['selection'],_0x1ee784=_0x22be3f(()=>this['refreshSelectedViews'](),0xa);_0x5d8012['on']('change:range',(_0x3436ed,_0x5582aa)=>{_0x5582aa['directChange']&&(_0x1ee784['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1c454d['editing']['view']['document'],'change:isFocused',(_0x562eab,_0x50c6a6,_0xd94fae)=>{_0xd94fae&&_0x1ee784();}),this['listenTo'](_0x1c454d['ui']['focusTracker'],'change:isFocused',(_0x52ef07,_0x5410e6,_0xf1079e)=>{_0xf1079e||this['fire']('blur',{'isAnnotationTracked':_0x1b5a2c=>this['_editorAnnotationsData']['has'](_0x1b5a2c['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3b16b1){if(this['_editorAnnotations']['has'](_0x3b16b1['view']))return;this['_editorAnnotations']['add'](_0x3b16b1['view']),this['editor']['ui']['focusTracker']['add'](_0x3b16b1['view']['element']);const _0x6c60db=this['editor']['plugins']['get'](y);this['listenTo'](_0x6c60db['collection'],'remove',(_0x233da5,_0x3745cf)=>{this['editor']['ui']['focusTracker']['remove'](_0x3745cf['view']['element']),this['_editorAnnotations']['delete'](_0x3745cf['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x3de5a6){if('function'!=typeof _0x3de5a6)throw new _0x44e108('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x3de5a6);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x501316,annotations:_0x2ea1c6}){const _0x21a74b=[],_0x4af96f=this['editor']['model']['document']['selection'],_0xd4cac2=Array['from'](_0x4af96f['getRanges']());for(const [_0x2e23c6,_0x200dee]of this['_editorAnnotationsData']){const _0x308d93=_0x55c15e(_0x200dee),_0x38b1d2=_0x2ea1c6['getByInnerView'](_0x2e23c6);_0x308d93&&_0x38b1d2&&_0x21a74b['push']({'annotation':_0x38b1d2,'range':_0x308d93});}function _0x55c15e(_0x2f5522){for(const _0x40fe43 of _0x2f5522)for(const _0x1911b0 of _0xd4cac2)if(_0x40fe43['containsRange'](_0x1911b0,!_0x4af96f['isCollapsed']))return _0x40fe43;return null;}return _0x21a74b['sort']((_0x4747e4,_0x533d38)=>{const _0x31a653=_0x4747e4['range'],_0x91e82c=_0x533d38['range'];if(!_0x31a653['isEqual'](_0x91e82c)){if(_0x31a653['containsRange'](_0x91e82c,!0x0))return 0x1;if(_0x91e82c['containsRange'](_0x31a653,!0x0))return-0x1;}return _0x4747e4['annotation']==_0x501316?-0x1:_0x533d38['annotation']==_0x501316?0x1:0x0;})['map'](_0x3e4e54=>_0x3e4e54['annotation']);}get['_editorAnnotationsData'](){const _0x5a9914=new Map();for(const _0x5a13db of Array['from'](this['_dataCollectors']))for(const [_0x5d3b52,_0x4bea70]of _0x5a13db())_0x5a9914['set'](_0x5d3b52,_0x4bea70);return _0x5a9914;}}class st extends _0x3f26c5{['afterInit'](){const _0x40715e=this['editor'];if(!_0x40715e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x40715e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3f26c5{constructor(_0x345d6c){super(_0x345d6c),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x49646b=this['editor'],_0x197bc1=_0x49646b['commands']['get']('importWord'),_0x1d659d=_0x49646b['plugins']['get'](it);_0x197bc1&&(_0x197bc1['on']('execute',(_0x54b041,[,_0x3aacdd])=>{_0x3aacdd['collaboration_features']={'comments':!0x0,'user_id':_0x1d659d['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x197bc1,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x51f74a,_0xa1314f){const {comment_threads:_0x33de49}=_0xa1314f;_0x33de49&&_0x33de49['forEach'](({thread_id:_0x56dc5a,comments:_0x395577,is_resolved:_0x7890da})=>{const _0x32d877=new Date(),_0xe1cccb=_0x395577['map'](({author:_0xd42c2e,content:_0x44759e,created_at:_0x2aed68})=>({'content':_0x44759e,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x32d877,'attributes':{'@external':{'authorName':_0xd42c2e,'createdAt':_0x2aed68?new Date(_0x2aed68):new Date(),'source':'importWord'}}})),_0x47eb27=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x47eb27,'threadId':_0x56dc5a,'comments':_0xe1cccb,'resolvedAt':_0x7890da?_0x32d877:null});});}}class at extends _0x3f26c5{constructor(_0x299731){super(_0x299731),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x3b2a46=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x3b2a46,'contentInsertion',(_0x47a220,_0x4d6a46)=>this['_removeMarkersWithoutThreads'](_0x4d6a46['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4dc173){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4dc173;const _0x306765=this['editor']['plugins']['get']('CommentsRepository');for(const _0x56575b of _0x4dc173['keys']()){const [_0x21765f,_0x6989fe]=_0x56575b['split'](':');'comment'!=_0x21765f||_0x306765['hasCommentThread'](_0x6989fe)||_0x4dc173['delete'](_0x56575b);}return _0x4dc173;}['_registerMarkerInClipboardPipeline'](){const _0xbfd04=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x39a9a5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x39a9a5&&_0xbfd04['_registerMarkerToCopy']('comment',_0x39a9a5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x22d67a){switch(_0x22d67a){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x278b83){const _0x3a38d3=_0x278b83['split'](':');return{'group':_0x3a38d3[0x0],'id':_0x3a38d3[0x1],'part':_0x3a38d3[0x2]};}class ut extends _0x3f26c5{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x7f18ee,_0x5cdc0f)=>{if(!_0x5cdc0f['options']['showCommentHighlights'])return null;if(_0x5cdc0f['options']['ignoreResolvedComments']){const {id:_0x420d64}=ft(_0x7f18ee['markerName']),_0x2e0c4d=this['editor']['plugins']['get'](o);if(_0x2e0c4d['getCommentThread'](_0x420d64)?.['isResolved']&&_0x7f18ee['item'])return _0x5cdc0f['consumable']['consume'](_0x7f18ee['item'],'addMarker:'+_0x7f18ee['markerName']),_0x5cdc0f['consumable']['consume'](_0x7f18ee['item'],'removeMarker:'+_0x7f18ee['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x14e750=>{_0x14e750['on']('addMarker:comment',(_0x11b36b,_0x36251e,_0x554a12)=>{if(!_0x554a12['options']['showCommentHighlights'])return;const _0x4a7ec4=_0x36251e['item'];if(!_0x4a7ec4)return;const _0x108049=_0x554a12['mapper']['toViewElement'](_0x4a7ec4);this['editor']['model']['schema']['isObject'](_0x4a7ec4)&&_0x108049&&!_0x108049['getCustomProperty']('widget')&&_0x108049['is']('containerElement')&&_0x3ba665(_0x108049,_0x554a12['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2be100,{writer:_0x383178,options:_0x27fc29})=>{if(!_0x27fc29['showCommentHighlights'])return null;const _0x8ca7b1=_0x383178['createContainerElement']('div'),_0x503fab=_0x383178['createEmptyElement']('hr');return _0x383178['addClass']('ck-horizontal-line',_0x8ca7b1),_0x383178['insert'](_0x383178['createPositionAt'](_0x8ca7b1,0x0),_0x503fab),_0x8ca7b1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x540589,{writer:_0x2f53,options:_0x387f40})=>{if(!_0x387f40['showCommentHighlights'])return null;const _0x3bec67=_0x2f53['createContainerElement']('span'),_0x3e6f59=_0x2f53['createEmptyElement']('img');return _0x2f53['addClass']('image-inline',_0x3bec67),_0x2f53['insert'](_0x2f53['createPositionAt'](_0x3bec67,0x0),_0x3e6f59),_0x3bec67;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x12117c,{writer:_0x200174,options:_0x732790})=>{if(_0x732790['showCommentHighlights'])return _0x200174['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x26c97e,_0x10863e,_0x558cfd)=>{_0x558cfd['options']['showCommentHighlights']&&_0x26c97e['stop']();},{'priority':'high'});}}class r extends _0x3f26c5{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(_0x2fc426){super(_0x2fc426),this['set']('isThreadsLoadingPaused',!0x0),_0x2fc426['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x56c1ba,_0x3d8570,_0x4bf312,_0x40148e)=>{const _0x4cdd18=_0x2fc426['plugins']['get'](o),_0x4ae1d4=_0x4bf312?ft(_0x4bf312)['id']:null;_0x2fc426['model']['change'](()=>{if(_0x4ae1d4){const _0x28a23c=this['getAllMarkersForId'](_0x4ae1d4);for(const _0xb6d401 of _0x28a23c)_0x2fc426['editing']['reconvertMarker'](_0xb6d401);}if(_0x40148e){const {id:_0x2625ef}=ft(_0x40148e),_0x54a075=_0x4cdd18['getCommentThread'](_0x2625ef);if(_0x54a075&&_0x54a075['unlinkedAt'])return;if(_0x54a075&&!_0x54a075['isAttached'])return;const _0x31defb=this['getAllMarkersForId'](_0x2625ef);for(const _0x1edce5 of _0x31defb)_0x2fc426['editing']['reconvertMarker'](_0x1edce5);}}),_0x4ae1d4&&this['scrollToThreadMarker'](_0x4ae1d4);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x144b9a=this['editor'],_0x523d11=_0x144b9a['plugins']['get'](o),_0x5a6e45=_0x144b9a['config']['get']('collaboration.channelId'),_0x1eb33a=_0x523d11['getCommentThreads']()['filter'](_0xeaaa4c=>_0xeaaa4c['channelId']!==_0x5a6e45);_0x144b9a['commands']['add']('addCommentThread',new ot(_0x144b9a)),this['listenTo'](_0x144b9a,'change:isReadOnly',(_0x42b9b5,_0xfabba7,_0x48d7be)=>{_0x523d11['switchReadOnly'](_0x48d7be,_0x144b9a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x523d11,dt('addCommentThread',_0x5a6e45),(_0x4ad65b,{threadId:_0x193570})=>{const _0x86da9e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x193570);_0x86da9e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x193570);}),this['listenTo'](_0x523d11,dt('removeCommentThread',_0x5a6e45),(_0x1a1a33,{threadId:_0x226111})=>{_0x144b9a['model']['enqueueChange']({'isUndoable':!0x1},_0x5042dc=>{const _0x493a41=this['getAllMarkersForId'](_0x226111);for(const _0x3ba9e9 of _0x493a41)_0x5042dc['removeMarker'](_0x3ba9e9);});}),this['listenTo'](_0x523d11,dt('resolveCommentThread',_0x5a6e45),(_0x1ac065,{threadId:_0x597a3a})=>{(this['_reconvertMarkers'](_0x597a3a),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x597a3a)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x523d11,dt('reopenCommentThread',_0x5a6e45),(_0x392aeb,{threadId:_0x3eb645})=>{this['_reconvertMarkers'](_0x3eb645);},{'priority':'low'}),this['listenTo'](_0x523d11,dt('addComment',_0x5a6e45),(_0x34cbfd,{threadId:_0x59500c,isFromAdapter:_0x4c038c})=>{const _0x416b98=this['getAllMarkersForId'](_0x59500c);if(_0x4c038c||0x0==_0x416b98['length']||!_0x523d11['hasCommentThread'](_0x59500c))return;0x1===_0x523d11['getCommentThread'](_0x59500c)['length']&&_0x144b9a['model']['enqueueChange']({'isUndoable':!0x1},_0x27d5dc=>{for(const _0x84523d of _0x416b98)_0x27d5dc['updateMarker'](_0x84523d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1eb33a);}['afterInit'](){!async function(_0x567b9){const _0x334a36=_0x2d6e38([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]),_0xcc5fe5=0x73460ab3,_0x5da6f7=0x73417ceb^_0xcc5fe5,_0x2bb19a=window[_0x2d6e38([0x44,0x61,0x74,0x65])][_0x2d6e38([0x6e,0x6f,0x77])](),_0x230cd0=_0x567b9[_0x2d6e38([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a6e5a=new window[(_0x2d6e38([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26d114=>{_0x230cd0[_0x2d6e38([0x6f,0x6e,0x63,0x65])](_0x2d6e38([0x72,0x65,0x61,0x64,0x79]),_0x26d114);}),_0x22474c={[_0x2d6e38([0x6b,0x74,0x79])]:_0x2d6e38([0x45,0x43]),[_0x2d6e38([0x75,0x73,0x65])]:_0x2d6e38([0x73,0x69,0x67]),[_0x2d6e38([0x63,0x72,0x76])]:_0x2d6e38([0x50,0x2d,0x32,0x35,0x36]),[_0x2d6e38([0x78])]:_0x2d6e38([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]),[_0x2d6e38([0x79])]:_0x2d6e38([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]),[_0x2d6e38([0x61,0x6c,0x67])]:_0x2d6e38([0x45,0x53,0x32,0x35,0x36])},_0xfba5ae=_0x230cd0[_0x2d6e38([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2d6e38([0x67,0x65,0x74])](_0x2d6e38([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2580b0(){let _0x1a2335,_0x21e7a9=null,_0x21ac42=null;try{if(_0xfba5ae==_0x2d6e38([0x47,0x50,0x4c]))return _0x2d6e38([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1a2335=_0x4130b9(),!_0x1a2335)return _0x2d6e38([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1a2335[_0x2d6e38([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x21ac42=_0x427fc4(_0x1a2335[_0x2d6e38([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1a2335[_0x2d6e38([0x6a,0x74,0x69])])),await _0x36dd68()?_0x3db9b0()?_0x1d7073()?_0x2d6e38([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x57a762()?(_0x1a2335[_0x2d6e38([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d6e38([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x21e7a9=_0x188e17(_0x2d6e38([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1a2335[_0x2d6e38([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2d6e38([0x74,0x72,0x69,0x61,0x6c])&&(_0x21e7a9=_0x188e17(_0x2d6e38([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x504d52()):_0x2d6e38([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2d6e38([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2d6e38([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2d6e38([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1d7073(){const _0x3d28c0=[_0x2d6e38([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2d6e38([0x74,0x72,0x69,0x61,0x6c])][_0x2d6e38([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a2335[_0x2d6e38([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2bb19a/0x3e8:0xe10*_0x5da6f7;return _0x1a2335[_0x2d6e38([0x65,0x78,0x70])]<_0x3d28c0;}function _0x3db9b0(){const _0x3e594f=_0x1a2335[_0x2d6e38([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3e594f)return!0x1;if(_0x3e594f[_0x2d6e38([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d6e38([0x2a])))return!0x0;if(_0x3e594f[_0x2d6e38([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d6e38([0x43,0x4d,0x54])))return!0x0;if(_0x3e594f[_0x2d6e38([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d6e38([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x31c933())return!0x0;if(_0x3e594f[_0x2d6e38([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d6e38([0x52,0x43,0x4d,0x54]))){if(_0x29b574())return!0x0;if(_0x544196()||_0x32d471())return!0x0;}return!0x1;}function _0x57a762(){const _0x12b85e=_0x1a2335[_0x2d6e38([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x12b85e||0x0==_0x12b85e[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x44d812}=new URL(window[_0x2d6e38([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x12b85e[_0x2d6e38([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44d812))return!0x0;const _0x1530ea=_0x44d812[_0x2d6e38([0x73,0x70,0x6c,0x69,0x74])](_0x2d6e38([0x2e]));return _0x12b85e[_0x2d6e38([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x599867=>_0x599867[_0x2d6e38([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d6e38([0x2a])))[_0x2d6e38([0x6d,0x61,0x70])](_0x2707df=>_0x2707df[_0x2d6e38([0x73,0x70,0x6c,0x69,0x74])](_0x2d6e38([0x2e])))[_0x2d6e38([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1c676c=>_0x1c676c[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1530ea[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2d6e38([0x6d,0x61,0x70])](_0x5853fb=>Array(_0x1530ea[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5853fb[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2d6e38([0x66,0x69,0x6c,0x6c])](_0x5853fb[0x0]===_0x2d6e38([0x2a])?_0x2d6e38([0x2a]):'')[_0x2d6e38([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5853fb))[_0x2d6e38([0x73,0x6f,0x6d,0x65])](_0x50bc5b=>_0x1530ea[_0x2d6e38([0x65,0x76,0x65,0x72,0x79])]((_0x5c1b58,_0x905ad6)=>_0x50bc5b[_0x905ad6]===_0x5c1b58||_0x50bc5b[_0x905ad6]===_0x2d6e38([0x2a])));}function _0x504d52(){return _0x21e7a9&&_0x21ac42?new window[(_0x2d6e38([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x249ff2,_0x2393a8)=>{_0x21e7a9[_0x2d6e38([0x74,0x68,0x65,0x6e])](_0x249ff2,_0x2393a8),_0x21ac42[_0x2d6e38([0x74,0x68,0x65,0x6e])](_0x175c6e=>{_0x175c6e!=_0x2d6e38([0x56,0x61,0x6c,0x69,0x64])&&_0x249ff2(_0x175c6e);},_0x2393a8);}):_0x21e7a9||_0x21ac42||_0x2d6e38([0x56,0x61,0x6c,0x69,0x64]);}}function _0x427fc4(_0x208f0a,_0x24da7d){return new window[(_0x2d6e38([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x28b248=>{if(_0x3ee44b())return _0x28b248(_0x2d6e38([0x56,0x61,0x6c,0x69,0x64]));_0x2fb015(),_0x230cd0[_0x2d6e38([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2d6e38([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1675b9=!0x1;const _0x4aaa00=_0x5cca00();function _0x5416e8(_0x40d7b3){return!!_0x40d7b3&&(typeof _0x40d7b3===_0x2d6e38([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x40d7b3===_0x2d6e38([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x40d7b3[_0x2d6e38([0x74,0x68,0x65,0x6e])]===_0x2d6e38([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x40d7b3[_0x2d6e38([0x63,0x61,0x74,0x63,0x68])]===_0x2d6e38([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x263e84(_0x439fd1){_0x14c506(_0x439fd1)[_0x2d6e38([0x74,0x68,0x65,0x6e])](_0x537f9a=>{if(!_0x537f9a||_0x537f9a[_0x2d6e38([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2d6e38([0x6f,0x6b]))return _0x2d6e38([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xee6259(_0x4033d0(_0x4aaa00+_0x24da7d))!=_0x537f9a[_0x2d6e38([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2d6e38([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2d6e38([0x56,0x61,0x6c,0x69,0x64]);})[_0x2d6e38([0x74,0x68,0x65,0x6e])](_0x17f171=>(_0x5e58c5(),_0x17f171),()=>{const _0x5051c8=_0x1884f8();return null==_0x5051c8?(_0x5e58c5(),_0x2d6e38([0x56,0x61,0x6c,0x69,0x64])):_0x2d6e38(_0x2bb19a-_0x5051c8>(0x574a8eb3^_0xcc5fe5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2d6e38([0x74,0x68,0x65,0x6e])](_0x28b248)[_0x2d6e38([0x63,0x61,0x74,0x63,0x68])](()=>{_0x28b248(_0x2d6e38([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x22ba60=0x7370e433^_0xcc5fe5;function _0x5e58c5(){const _0x14d3dd=_0x2d6e38([0x6c,0x6c,0x63,0x74,0x2d])+_0xee6259(_0x4033d0(_0x208f0a)),_0xb96b4e=_0x4bb8bd(_0xee6259(window[_0x2d6e38([0x4d,0x61,0x74,0x68])][_0x2d6e38([0x63,0x65,0x69,0x6c])](_0x2bb19a/_0x22ba60)));window[_0x2d6e38([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d6e38([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x14d3dd,_0xb96b4e);}function _0x1884f8(){const _0x1df027=_0x2d6e38([0x6c,0x6c,0x63,0x74,0x2d])+_0xee6259(_0x4033d0(_0x208f0a)),_0x33f1dd=window[_0x2d6e38([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2d6e38([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1df027);return _0x33f1dd?window[_0x2d6e38([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4bb8bd(_0x33f1dd),0x10)*_0x22ba60:null;}function _0x14c506(_0x5d6ca2){return new window[(_0x2d6e38([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4ae7ad,_0x520e01)=>{_0x5d6ca2[_0x2d6e38([0x74,0x68,0x65,0x6e])](_0x4ae7ad,_0x520e01),window[_0x2d6e38([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x520e01,0x7347de73^_0xcc5fe5);});}}_0x230cd0[_0x2d6e38([0x6f,0x6e])](_0x2d6e38([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3eb72c,_0x1d016f)=>{if(_0x1d016f[0x0]!=_0x208f0a)return _0x28b248(_0x2d6e38([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1d016f[0x1]={..._0x1d016f[0x1],[_0x2d6e38([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4aaa00};},{[_0x2d6e38([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d6e38([0x68,0x69,0x67,0x68])}),_0x230cd0[_0x2d6e38([0x6f,0x6e])](_0x2d6e38([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x557862=>{_0x5416e8(_0x557862[_0x2d6e38([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1675b9=!0x0,_0x263e84(_0x557862[_0x2d6e38([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2d6e38([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2d6e38([0x6c,0x6f,0x77])}),_0x4a6e5a[_0x2d6e38([0x74,0x68,0x65,0x6e])](()=>{_0x1675b9||_0x28b248(_0x2d6e38([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3ee44b(){return _0x230cd0[_0x2d6e38([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d6e38([0x76,0x69,0x65,0x77])][_0x2d6e38([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2d6e38([0x61,0x75,0x74,0x6f]);}function _0x2fb015(){_0x230cd0[_0x2d6e38([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d6e38([0x76,0x69,0x65,0x77])][_0x2d6e38([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d6e38([0x61,0x75,0x74,0x6f]);}}function _0x188e17(_0x1ed4a4){const _0x1bfca7=[new window[(_0x2d6e38([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd8a3e0=>setTimeout(_0xd8a3e0,0x734f347f^_0xcc5fe5)),_0x4a6e5a[_0x2d6e38([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2d6e38([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4be8fc=>{let _0x2845e9=0x0;_0x230cd0[_0x2d6e38([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d6e38([0x6f,0x6e])](_0x2d6e38([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x8caa4c,_0x2af3da)=>{_0x2af3da[0x0][_0x2d6e38([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2845e9++,_0x2845e9==(0x73460b4b^_0xcc5fe5)&&(_0x4be8fc(),_0x8caa4c[_0x2d6e38([0x6f,0x66,0x66])]());});}))];return window[_0x2d6e38([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d6e38([0x72,0x61,0x63,0x65])](_0x1bfca7)[_0x2d6e38([0x74,0x68,0x65,0x6e])](()=>_0x1ed4a4);}async function _0x379d61(){await _0x4a6e5a,_0x230cd0[_0x2d6e38([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d6e38([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x30ca63,_0x230cd0[_0x2d6e38([0x6d,0x6f,0x64,0x65,0x6c])][_0x2d6e38([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x30ca63,_0x230cd0[_0x2d6e38([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2d6e38([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x31c933(){return window[_0x2d6e38([0x67,0x6c,0x6f,0x62])]&&window[_0x2d6e38([0x67,0x6c,0x6f,0x62])][_0x2d6e38([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x29b574(){return _0x1fa8d9(_0x2d6e38([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x34d61a(_0x2d6e38([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2d6e38([0x73,0x74,0x61,0x74,0x65])]==_0x2d6e38([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x544196(){return _0x1fa8d9(_0x2d6e38([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 _0x32d471(){return _0x1fa8d9(_0x2d6e38([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x385ae7(_0x44321b){const _0x195ca2=_0x4e8f89();_0x230cd0[_0x195ca2]=_0x2d6e38([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x44321b,_0x44321b!=_0x2d6e38([0x56,0x61,0x6c,0x69,0x64])&&_0x379d61();}function _0x4e8f89(){const _0x4f8b51=window[_0x2d6e38([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2d6e38([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2d6e38([0x6e,0x6f,0x77])]())[_0x2d6e38([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2d6e38([0x2e]),'');let _0x27c03b=_0x2d6e38([0x4b]);for(let _0x44de53=0x0;_0x44de53<_0x4f8b51[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x44de53+=0x2){let _0x2f71a0=window[_0x2d6e38([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f8b51[_0x2d6e38([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x44de53,_0x44de53+0x2));_0x2f71a0>=_0x334a36[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2f71a0-=_0x334a36[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x27c03b+=_0x334a36[_0x2f71a0];}return _0x27c03b;}function _0x4130b9(){const _0x9fd0b2=_0xfba5ae[_0x2d6e38([0x73,0x70,0x6c,0x69,0x74])](_0x2d6e38([0x2e]));if(0x3!=_0x9fd0b2[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1b5df5(_0x9fd0b2[0x1]);function _0x1b5df5(_0xe0c21b){const _0x189a84=_0xa88027(_0xe0c21b);return _0x189a84&&_0x43ea65()?_0x189a84:null;function _0x43ea65(){const _0x2a3f17=_0x189a84[_0x2d6e38([0x6a,0x74,0x69])],_0x3a798d=window[_0x2d6e38([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a3f17[_0x2d6e38([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2a3f17[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x43b439={..._0x189a84,[_0x2d6e38([0x6a,0x74,0x69])]:_0x2a3f17[_0x2d6e38([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2a3f17[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x43b439[_0x2d6e38([0x76,0x63])],_0x4033d0(_0x43b439)==_0x3a798d;}}}async function _0x36dd68(){let _0x2e2fdb=!0x0;try{const _0x82a0b1=_0xfba5ae[_0x2d6e38([0x73,0x70,0x6c,0x69,0x74])](_0x2d6e38([0x2e])),[_0x3b800f,_0x2803c7,_0x50b21d]=_0x82a0b1;return _0x2a3506(_0x3b800f),await _0x1751f0(_0x3b800f,_0x2803c7,_0x50b21d),_0x2e2fdb;}catch{return!0x1;}function _0x2a3506(_0x356562){const _0x55680e=_0xa88027(_0x356562);_0x55680e&&_0x55680e[_0x2d6e38([0x61,0x6c,0x67])]==_0x2d6e38([0x45,0x53,0x32,0x35,0x36])||(_0x2e2fdb=!0x1);}async function _0x1751f0(_0x401fe4,_0x16197d,_0x2e4131){const _0x357a15=window[_0x2d6e38([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2d6e38([0x66,0x72,0x6f,0x6d])](_0x5490ea(_0x2e4131),_0x1a4d7d=>_0x1a4d7d[_0x2d6e38([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5c4700=new window[(_0x2d6e38([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2d6e38([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x401fe4+_0x2d6e38([0x2e])+_0x16197d),_0x3aba3b=window[_0x2d6e38([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2d6e38([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3aba3b)return;const _0x264a17=await _0x3aba3b[_0x2d6e38([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2d6e38([0x6a,0x77,0x6b]),_0x22474c,{[_0x2d6e38([0x6e,0x61,0x6d,0x65])]:_0x2d6e38([0x45,0x43,0x44,0x53,0x41]),[_0x2d6e38([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2d6e38([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2d6e38([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3aba3b[_0x2d6e38([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2d6e38([0x6e,0x61,0x6d,0x65])]:_0x2d6e38([0x45,0x43,0x44,0x53,0x41]),[_0x2d6e38([0x68,0x61,0x73,0x68])]:{[_0x2d6e38([0x6e,0x61,0x6d,0x65])]:_0x2d6e38([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x264a17,_0x357a15,_0x5c4700)||(_0x2e2fdb=!0x1);}}function _0xa88027(_0x1763fc){return _0x1763fc[_0x2d6e38([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2d6e38([0x65,0x79]))?JSON[_0x2d6e38([0x70,0x61,0x72,0x73,0x65])](_0x5490ea(_0x1763fc)):null;}function _0x5490ea(_0x1d355a){return window[_0x2d6e38([0x61,0x74,0x6f,0x62])](_0x1d355a[_0x2d6e38([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2d6e38([0x2b]))[_0x2d6e38([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2d6e38([0x2f])));}function _0x4033d0(_0x1d2ce4){let _0xb1fe9=0x1505;function _0x170d8f(_0x36fca6){for(let _0x412632=0x0;_0x412632<_0x36fca6[_0x2d6e38([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x412632++){const _0x458e2e=_0x36fca6[_0x2d6e38([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x412632);_0xb1fe9=(_0xb1fe9<<0x5)+_0xb1fe9+_0x458e2e,_0xb1fe9&=_0xb1fe9;}}function _0xe09fb4(_0x29c88b){Array[_0x2d6e38([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x29c88b)?_0x29c88b[_0x2d6e38([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xe09fb4):_0x29c88b&&typeof _0x29c88b==_0x2d6e38([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2d6e38([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x29c88b)[_0x2d6e38([0x73,0x6f,0x72,0x74])]()[_0x2d6e38([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x21f0a5,_0x4c4f71])=>{_0x170d8f(_0x21f0a5),_0xe09fb4(_0x4c4f71);}):_0x170d8f(window[_0x2d6e38([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x29c88b));}return _0xe09fb4(_0x1d2ce4),_0xb1fe9>>>0x0;}function _0xee6259(_0xa8a7ec){return _0xa8a7ec[_0x2d6e38([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2d6e38([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2d6e38([0x30]));}function _0x4bb8bd(_0x380cc0){return _0x380cc0[_0x2d6e38([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2d6e38([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2d6e38([0x6a,0x6f,0x69,0x6e])]('');}function _0x1fa8d9(_0x10c816){return _0x230cd0[_0x2d6e38([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d6e38([0x68,0x61,0x73])](_0x10c816);}function _0x34d61a(_0x1aefde){return _0x230cd0[_0x2d6e38([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2d6e38([0x67,0x65,0x74])](_0x1aefde);}function _0x30ca63(){}function _0x2d6e38(_0x22530e){return _0x22530e['map'](_0x310b70=>String['fromCharCode'](_0x310b70))['join']('');}_0x385ae7(await _0x2580b0());}(this);}['destroy'](){const _0x5f5b17=this['editor']['plugins']['get'](o),_0x3f8872=this['editor']['config']['get']('collaboration.channelId');for(const _0xa1521b of _0x5f5b17['getCommentThreads']({'channelId':_0x3f8872}))_0x5f5b17['_detachCommentThread'](_0xa1521b['id']),_0x5f5b17['_threads']['delete'](_0xa1521b['id']);super['destroy']();}['hasMarkerForId'](_0x938719){return this['getAllMarkersForId'](_0x938719)['length']>0x0;}['getAllMarkersForId'](_0x416bcf){const _0x5cc77a=[];for(const _0x5ba650 of this['editor']['model']['markers'])_0x5ba650['name']['startsWith']('comment:'+_0x416bcf)&&_0x5cc77a['push'](_0x5ba650);return _0x5cc77a;}['scrollToThreadMarker'](_0x3c5d8e){setTimeout(()=>{const _0x2170f0=this['_getTargetForId'](_0x3c5d8e);if(!_0x2170f0)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x3c5d8e&&nt({'target':_0x2170f0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3ac5f2){this['editor']['model']['change'](()=>{for(const _0x441bb9 of this['getAllMarkersForId'](_0x3ac5f2))this['editor']['editing']['reconvertMarker'](_0x441bb9);});}['_attachArchivedThread'](_0x501b1d){const _0x22eb9b=this['editor']['plugins']['get'](o),_0x305905=this['editor']['plugins']['get'](b),_0x5b5c3c=_0x22eb9b['getCommentThread'](_0x501b1d);if(!_0x5b5c3c['isAttached']){const _0xaaacaa=_0x5b5c3c['attachTo'](()=>this['_getTargetForId'](_0x5b5c3c['id']));_0x305905['registerAnnotation'](_0xaaacaa),_0x5b5c3c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x56bdd5=this['editor'],_0x19de55=_0x56bdd5['plugins']['get'](it);_0x56bdd5['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x108a9f,_0x3741a8)=>{const {id:_0x2caa84}=ft(_0x108a9f['markerName']),_0x24c59e=_0x56bdd5['plugins']['get'](o)['getCommentThread'](_0x2caa84),_0x4ce4bd=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2caa84;let _0x329c58;if(_0x24c59e&&_0x24c59e['isResolved']&&!_0x4ce4bd&&_0x108a9f['item'])return _0x3741a8['consumable']['consume'](_0x108a9f['item'],'addMarker:'+_0x108a9f['markerName']),_0x3741a8['consumable']['consume'](_0x108a9f['item'],'removeMarker:'+_0x108a9f['markerName']),null;const _0x27175e=['ck-comment-marker'];return _0x4ce4bd&&_0x27175e['push']('ck-comment-marker--active'),_0x329c58=_0x24c59e?.['length']?_0x24c59e['comments']['first']['author']['id']:_0x19de55['me']['id'],{'classes':_0x27175e,'attributes':{'data-comment':_0x2caa84,'data-author-id':_0x329c58}};}}),_0x56bdd5['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1337f7,{options:_0x50e1bf})=>{if(_0x50e1bf['showCommentHighlights'])return null;const _0x1dc189=_0x56bdd5['plugins']['get'](o),_0x415f7a=_0x56bdd5['model']['markers']['get'](_0x1337f7),{id:_0x1b15ae,part:_0x10f1bb}=ft(_0x1337f7);return _0x415f7a&&!_0x415f7a['affectsData']||_0x50e1bf['ignoreResolvedComments']&&_0x1dc189['getCommentThread'](_0x1b15ae)?.['isResolved']?null:{'group':'comment','name':_0x10f1bb?_0x1b15ae+':'+_0x10f1bb:_0x1b15ae};}}),_0x56bdd5['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x209924,{writer:_0x32e143})=>_0x32e143['createElement']('$marker',{'data-name':'comment:'+_0x209924['getAttribute']('id')})}),_0x56bdd5['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x29cc26=this['editor'],_0x176eb6=_0x29cc26['plugins']['get'](o),_0x19a7da=new Set(),_0x3556d5=new Set();_0x29cc26['model']['document']['registerPostFixer'](_0x3d1005=>{let _0x31cac1=!0x1;for(const {name:_0x18d96d,data:_0x6762f7}of _0x29cc26['model']['document']['differ']['getChangedMarkers']()){const {group:_0x302289,id:_0x662581}=ft(_0x18d96d);let _0x4f4b52=_0x6762f7['newRange'];if('comment'!==_0x302289||!_0x4f4b52)continue;const _0x45316f='$graveyard'===_0x4f4b52['root']['rootName'];_0x45316f||(_0x4f4b52=ht(_0x4f4b52,_0x29cc26['model']),!_0x4f4b52||_0x4f4b52['isCollapsed']||!_0x6762f7['newRange']||_0x4f4b52['isEqual'](_0x6762f7['newRange']))?_0x29cc26['model']['hasContent'](_0x4f4b52)&&!_0x45316f?this['isThreadsLoadingPaused']?_0x19a7da['add'](_0x18d96d):this['_handleThreadMarker'](_0x18d96d,_0x662581):(_0x3556d5['add'](_0x18d96d),_0x19a7da['delete'](_0x18d96d),_0x3d1005['removeMarker'](_0x18d96d),_0x31cac1=!0x0):(_0x3d1005['updateMarker'](_0x18d96d,{'range':_0x4f4b52}),_0x31cac1=!0x0);}return _0x31cac1;}),this['on']('change:isThreadsLoadingPaused',(_0x173252,_0x1c2b30,_0x11d21c)=>{if(!_0x11d21c&&_0x19a7da['size'])for(const _0x2b2f7d of _0x19a7da){const {id:_0x7388b1}=ft(_0x2b2f7d);_0x19a7da['delete'](_0x2b2f7d),_0x29cc26['model']['markers']['get'](_0x2b2f7d)&&this['_handleThreadMarker'](_0x2b2f7d,_0x7388b1);}}),this['listenTo'](_0x29cc26['model']['document'],'change',()=>{for(const {name:_0x4ffe87,data:{newRange:_0x23589f}}of _0x29cc26['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3941c0,id:_0x1628c0}=ft(_0x4ffe87);if('comment'!==_0x3941c0)continue;const _0x46c05d=_0x176eb6['getCommentThread'](_0x1628c0),_0x2684b4=this['hasMarkerForId'](_0x1628c0);_0x46c05d&&(!_0x46c05d['_hasTargetInContent']&&_0x23589f&&_0x29cc26['editing']['view']['once']('render',()=>{const _0x5c1243=_0x29cc26['plugins']['get'](y),_0x57caa6=_0x176eb6['_threadToController']['get'](_0x46c05d)['view'];_0x5c1243['getByInnerView'](_0x57caa6)['refreshVisibility']();},{'priority':'low'}),_0x46c05d['_hasTargetInContent']=_0x2684b4||!!_0x23589f),_0x23589f||(_0x3556d5['add'](_0x4ffe87),_0x19a7da['delete'](_0x4ffe87));}for(const _0x2b2d84 of _0x3556d5){const {id:_0x3fa18a}=ft(_0x2b2d84),_0x45d4d6=_0x176eb6['getCommentThread'](_0x3fa18a);if(_0x19a7da['delete'](_0x2b2d84),!_0x45d4d6)continue;const _0x593132=this['hasMarkerForId'](_0x3fa18a);_0x593132||_0x45d4d6['isSubmitted']?_0x593132||_0x45d4d6['unlinkedAt']||_0x45d4d6['setUnlinkedAt'](new Date()):_0x45d4d6['remove']();}_0x3556d5['clear']();});}['_handleInitialThreads'](_0x1aebe2){_0x1aebe2['forEach'](_0x304b98=>{_0x304b98['unlinkedAt']&&this['_attachArchivedThread'](_0x304b98['id']);});}['_getTargetForId'](_0x4545c2){const _0x54fd3b=this['editor'],_0x8db7c6=this['getAllMarkersForId'](_0x4545c2);return et(_0x54fd3b['editing'],_0x8db7c6);}['_getTextContext'](_0x2eb438){const _0x2359dd=this['getAllMarkersForId'](_0x2eb438);let _0xf77cef='',_0x241c2c=!0x1;for(const _0x4e8c8a of _0x2359dd){const _0x44b698=_0x4e8c8a['getRange']();for(const _0x40168b of Array['from'](_0x44b698['getItems']()))_0x40168b['is']('$textProxy')?(_0xf77cef&&_0x241c2c&&(_0xf77cef+='\x20',_0x241c2c=!0x1),_0xf77cef+=_0x40168b['data']):_0x241c2c=!0x0;_0x241c2c=!0x0;}return _0xf77cef['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xeac023,_0x37a376){const _0x5a547b=this['editor'],_0x928465=_0x5a547b['plugins']['get'](o);let _0x189b3a=_0x928465['getCommentThread'](_0x37a376);const _0x473005=_0x5a547b['config']['get']('collaboration.channelId'),_0x30c323=_0x5a547b['plugins']['get'](b);if(_0x189b3a&&(_0x189b3a['unlinkedAt']&&_0x189b3a['setUnlinkedAt'](null),_0x189b3a['isAttached']))return _0x189b3a;return!this['getAllMarkersForId'](_0x37a376)[0x0]['managedUsingOperations']?_0x5a547b['editing']['view']['once']('render',()=>{if(_0x928465['getCommentThread'](_0x37a376))return;const _0x9cb34e=_0x5a547b['plugins']['get'](y);_0x189b3a=_0x928465['openNewCommentThread']({'channelId':_0x473005,'threadId':_0x37a376,'target':()=>this['_getTargetForId'](_0x37a376),'context':{'type':'text','value':this['_getTextContext'](_0x37a376)}});const _0x5611bd=_0x928465['_threadToController']['get'](_0x189b3a)['view'],_0x37a481=_0x9cb34e['getByInnerView'](_0x5611bd);_0x37a481&&_0x30c323['registerAnnotation'](_0x37a481);},{'priority':'low'}):_0x928465['fetchCommentThread']({'channelId':_0x473005,'threadId':_0x37a376})['then'](_0x3e6d74=>{if('destroyed'!==_0x5a547b['state']){if(_0x189b3a=_0x3e6d74,_0x189b3a&&!_0x189b3a['isAttached']){const _0x35b957=_0x189b3a['attachTo'](()=>this['_getTargetForId'](_0x37a376));_0x30c323['registerAnnotation'](_0x35b957),_0x189b3a['isResolved']&&this['_reconvertMarkers'](_0x37a376);}else{if(!_0x189b3a){const _0x3dd26a=this['getAllMarkersForId'](_0x37a376);_0x5a547b['model']['change'](_0x1a5bf0=>{for(const _0x249cb7 of _0x3dd26a)_0x1a5bf0['removeMarker'](_0x249cb7);});}}}}),_0x189b3a;}['_handleThreadMarker'](_0x56f044,_0x594afd){const _0x28da07=this['_attachMarkerToThread'](_0x56f044,_0x594afd);_0x28da07&&!_0x28da07['context']&&_0x28da07['setContext']({'type':'text','value':this['_getTextContext'](_0x594afd)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1f4b92=this['editor'];rt(_0x1f4b92['model'],({left:_0x46a679,entered:_0x48903f})=>{for(const _0x1bbf67 of _0x46a679)if(mt(_0x1bbf67)){_0x1f4b92['ui']['ariaLiveAnnouncer']['announce'](N(_0x1f4b92['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1ef416 of _0x48903f)if(mt(_0x1ef416)){_0x1f4b92['ui']['ariaLiveAnnouncer']['announce'](N(_0x1f4b92['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x3005d9)));break;}});}}function dt(_0x172bc7,_0x9ecfb7){return _0x9ecfb7?_0x172bc7+':'+_0x9ecfb7:_0x172bc7;}function ht(_0x5a496a,_0x4e41b7){const _0x18e84c=_0x4e41b7['schema'],_0x23a6af=_0x4e41b7['createRange'](_0x5a496a['start']);for(const _0x5a5e9a of _0x5a496a['getWalker']()){const {type:_0x176687,item:_0x5e6bed,nextPosition:_0x539f5c}=_0x5a5e9a;if('text'===_0x176687||_0x18e84c['isObject'](_0x5e6bed)){const _0x1eb474=_0x4e41b7['createPositionBefore'](_0x5e6bed);_0x23a6af['isCollapsed']&&(_0x23a6af['start']=_0x1eb474),_0x23a6af['end']=_0x539f5c;}}return _0x23a6af;}function mt(_0x215875){return'comment'===ft(_0x215875['name'])['group'];}class s extends _0x3f26c5{['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 _0x4a6633=this['editor'],_0xc93359=_0x4a6633['plugins']['get'](o),_0x1f427c=_0x4a6633['plugins']['get'](r),_0x501653=_0x4a6633['plugins']['get'](y),_0x12f1fd=_0x4a6633['plugins']['get'](b);_0x4a6633['ui']['componentFactory']['add']('comment',()=>{const _0x3a3705=this['_createUIButton'](_0x73e913);return _0x3a3705['tooltip']=!0x0,_0x3a3705;}),_0x4a6633['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x216b27)),_0x12f1fd['addSourceCollector'](()=>{const _0x3be519=[];for(const [_0x5af92f,_0x956bbd]of _0xc93359['_threadToController']){const _0x45d9a6=_0x1f427c['getAllMarkersForId'](_0x5af92f['id']),_0x3e48aa=_0x45d9a6['map'](_0x382773=>_0x382773['getRange']());_0x45d9a6['length']>0x0&&_0x3be519['push']([_0x956bbd['view'],_0x3e48aa]);}return _0x3be519;}),this['listenTo'](_0x501653,'change:activeAnnotations',(_0x4d9a31,_0x9493aa,_0x406025)=>{const _0x349a5b=Array['from'](_0x406025)['map'](_0x3e8519=>_0x3e8519['innerView'])['find'](_0x441053=>_0xc93359['_viewToController']['has'](_0x441053));if(!_0x349a5b)return void(_0x1f427c['activeMarker']=null);const _0x45a127=_0xc93359['_viewToController']['get'](_0x349a5b)['model']['id'],_0x50f12d='comment:'+_0x45a127;_0x45a127&&_0x1f427c['hasMarkerForId'](_0x45a127)?_0x1f427c['activeMarker']=_0x50f12d:_0x1f427c['activeMarker']&&(_0x1f427c['activeMarker']=null);}),this['listenTo'](_0xc93359,'removeCommentThread',(_0x5b2980,{threadId:_0x54cd9e,isFromAdapter:_0x2352fb})=>{!_0x2352fb&&_0x4a6633['ui']['focusTracker']['isFocused']&&_0x1f427c['hasMarkerForId'](_0x54cd9e)&&_0x4a6633['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xc93359,'addComment',(_0x275194,{threadId:_0x1737f5,isFromAdapter:_0x1452ec})=>{if(_0x1452ec||!_0x1f427c['hasMarkerForId'](_0x1737f5)||!_0xc93359['hasCommentThread'](_0x1737f5))return;0x1===_0xc93359['getCommentThread'](_0x1737f5)['length']&&(_0x4a6633['editing']['view']['focus'](),_0x275194['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xc930bc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1e9a74;for(const _0xafbb1b in _0xc930bc){const _0xf4e81b=_0xafbb1b,_0xfb283a=_0xc930bc[_0xf4e81b];if('commentsLicenseKeyValid'==_0xfb283a||'commentsLicenseKeyInvalid'==_0xfb283a||'commentsLicenseKeyExpired'==_0xfb283a||'commentsLicenseKeyDomainLimit'==_0xfb283a||'commentsLicenseKeyNotAllowed'==_0xfb283a||'commentsLicenseKeyEvaluationLimit'==_0xfb283a||'commentsLicenseKeyTrialLimit'==_0xfb283a||'commentsLicenseKeyUsageLimit'==_0xfb283a){delete _0xc930bc[_0xf4e81b],_0x1e9a74=_0xfb283a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1e9a74&&_0xc930bc['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1e9a74&&_0xc930bc['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1e9a74&&_0xc930bc['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1e9a74&&_0xc930bc['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1e9a74&&_0xc930bc['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1e9a74&&_0xc930bc['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1e9a74&&_0xc930bc['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1bf2ba){const _0x317815=this['editor'],_0x131929=new _0x1bf2ba(_0x317815['locale']),_0x342b0e=_0x317815['commands']['get']('addCommentThread');return _0x131929['set']({'label':N(_0x317815['locale'],'Comment'),'icon':_0x3a5d19}),_0x131929['bind']('isEnabled')['to'](_0x342b0e,'hasContent'),this['listenTo'](_0x131929,'execute',()=>{_0x342b0e['execute']();}),_0x131929;}}class i extends _0x3f26c5{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x50c97c){super(_0x50c97c),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5d9bbb,_0x48c59c,_0x396850)=>{_0x396850?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x66696c,_0x94aa9d]of this['editor']['commands'])_0x94aa9d['affectsData']&&'addCommentThread'!==_0x66696c&&_0x94aa9d['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x2bdbaf=this['editor']['editing']['view']['document'];this['listenTo'](_0x2bdbaf,'cut',_0x49e5f2=>_0x49e5f2['stop'](),{'priority':'highest'}),this['listenTo'](_0x2bdbaf,'clipboardInput',_0x335e65=>_0x335e65['stop'](),{'priority':'highest'}),this['listenTo'](_0x2bdbaf,'delete',_0x4505d9=>_0x4505d9['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x165c21,_0xa24b6c]of this['editor']['commands'])_0xa24b6c['affectsData']&&'addCommentThread'!==_0x165c21&&_0xa24b6c['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 _0x59fa22{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5133b4){super(_0x5133b4),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3c3566=this['context']['plugins']['get'](y);this['listenTo'](_0x3c3566,'_activateAnnotation',(_0x4c7c52,_0xbde4c1)=>{for(const _0x3375fd of this['activeUIs']){const _0x1356fd=this['_uis']['get'](_0x3375fd);(0x0,this['uisData']['get'](_0x3375fd)['filter'])(_0xbde4c1)&&_0x1356fd['setActiveAnnotation'](_0xbde4c1);}}),this['listenTo'](_0x3c3566,'_deactivateAllAnnotations',()=>{for(const _0x1f8480 of this['activeUIs']){this['_uis']['get'](_0x1f8480)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3c3566['_visibleAnnotations'],'add',(_0x4c7699,_0x20cf2d)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x20cf2d);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x499c61){return this['activeUIs']['has'](_0x499c61);}['activate'](_0x477bca,_0x2fdbe6=this['defaultFilter']){const _0x3ffc3e=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x477bca))throw new _0x44e108('annotationsuis-missing-ui',this,{'uiName':_0x477bca});this['isActive'](_0x477bca)&&this['deactivate'](_0x477bca),this['activeUIs']['add'](_0x477bca);const _0x27c6b1=new S();v({'source':_0x3ffc3e['_visibleAnnotations'],'target':_0x27c6b1,'filter':_0x2fdbe6}),this['uisData']['set'](_0x477bca,{'collection':_0x27c6b1,'filter':_0x2fdbe6});const _0x5c9287=this['_uis']['get'](_0x477bca);_0x5c9287['attach'](_0x27c6b1),this['listenTo'](_0x5c9287,'change:activeAnnotation',(_0x3c6d3e,_0x2d75ac,_0x2f8312,_0x42e106)=>{_0x42e106&&_0x3ffc3e['_removeActiveAnnotation'](_0x42e106),_0x2f8312&&_0x3ffc3e['_addActiveAnnotation'](_0x2f8312);});}['deactivate'](_0x177e92){if(this['activeUIs']['delete'](_0x177e92),!this['_uis']['has'](_0x177e92))throw new _0x44e108('annotationsuis-missing-ui',this,{'uiName':_0x177e92});const _0x51c107=this['_uis']['get'](_0x177e92);_0x51c107['detach'](),this['stopListening'](_0x51c107),this['uisData']['get'](_0x177e92)['collection']['destroy'](),this['uisData']['delete'](_0x177e92);}['switchTo'](_0x3e7520){if(!this['_uis']['has'](_0x3e7520))throw new _0x44e108('annotationsuis-missing-ui',this,{'uiName':_0x3e7520});const _0x2ab0a2=this['context']['plugins']['get'](y),_0x3dac85=Array['from'](_0x2ab0a2['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3e7520);const _0x59e1dc=this['_uis']['get'](_0x3e7520);_0x59e1dc['setActiveAnnotation'](_0x3dac85),_0x59e1dc['_setSelectedAnnotations']&&_0x3dac85&&_0x59e1dc['_setSelectedAnnotations']([_0x3dac85]);}['deactivateAll'](){for(const _0x1fbb95 of this['activeUIs'])this['deactivate'](_0x1fbb95);}['register'](_0x45b3a1,_0x30450c){if(this['_uis']['has'](_0x45b3a1))throw new _0x44e108('annotationsuis-register-already-registered');if('function'!=typeof _0x30450c['attach']||'function'!=typeof _0x30450c['detach']||'function'!=typeof _0x30450c['setActiveAnnotation'])throw new _0x44e108('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x45b3a1,_0x30450c);}['refilterAnnotations'](){const _0x4f2d38=this['context']['plugins']['get'](y)['collection'],_0x2c9760=new Map(),_0x172386=Array['from'](this['activeUIs']);for(const _0x1e37a8 of this['activeUIs']){const _0x1529b9=this['uisData']['get'](_0x1e37a8)['collection'];for(const _0x4e4323 of _0x1529b9)_0x2c9760['set'](_0x4e4323,_0x1e37a8);}for(const _0x249322 of _0x4f2d38){const _0x2a110a=_0x2c9760['get'](_0x249322);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x249322);const _0x10b644=_0x172386['find'](_0x2279e7=>this['uisData']['get'](_0x2279e7)['filter'](_0x249322));_0x2a110a!==_0x10b644&&(_0x2a110a&&this['uisData']['get'](_0x2a110a)['collection']['remove'](_0x249322),_0x10b644&&this['uisData']['get'](_0x10b644)['collection']['add'](_0x249322));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xaafe0e){const _0xefb72f=[];for(const _0x528408 of this['activeUIs']){(0x0,this['uisData']['get'](_0x528408)['filter'])(_0xaafe0e)&&_0xefb72f['push'](_0x528408);}if(_0xefb72f['length']>0x1)throw new _0x44e108('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xefb72f,'annotationType':_0xaafe0e['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2619e7){super(_0x2619e7);const _0x2a7857=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 _0x158d2e(),this['focusCycler']=new _0x56e70d({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2a7857['to']('class')],'style':{'minHeight':_0x2a7857['to']('minHeight',_0x3a5ed1=>'number'==typeof _0x3a5ed1?_i(_0x3a5ed1+0xa):null)},'dir':_0x2619e7['uiLanguageDirection'],'role':'application','aria-label':N(_0x2619e7,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2619e7,'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',_0x5a952f=>{this['_updateItemPositionInFocusables'](_0x5a952f['source']);}),this['list']['forEach'](_0x2006f6=>{this['focusTracker']['add'](_0x2006f6['element']),this['_updateItemPositionInFocusables'](_0x2006f6);}),this['list']['on']('change',(_0x15494b,_0x3a9345)=>{for(const _0x5b7c20 of _0x3a9345['removed'])this['focusTracker']['remove'](_0x5b7c20['element']),this['focusables']['remove'](_0x5b7c20);for(const _0x32d972 of _0x3a9345['added'])this['focusTracker']['add'](_0x32d972['element']),this['_updateItemPositionInFocusables'](_0x32d972);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5c1e1d){const _0x2eb66e=this['focusables']['getIndex'](_0x5c1e1d);let _0x145d4c,_0x5c495f;for(const _0x23ef08 of this['focusables'])if(_0x5c1e1d['top']<_0x23ef08['top']){_0x145d4c=_0x23ef08;break;}if(_0x5c495f=_0x145d4c?this['focusables']['getIndex'](_0x145d4c):this['focusables']['length'],-0x1!==_0x2eb66e){if(_0x2eb66e===_0x5c495f-0x1)return;this['focusables']['remove'](_0x5c1e1d),_0x5c495f=_0x145d4c?this['focusables']['getIndex'](_0x145d4c):this['focusables']['length'];}this['focusables']['add'](_0x5c1e1d,_0x5c495f);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x2a4021){super(_0x2a4021),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x22b2a5,_0x435bb5)=>_0x22b2a5+_0x435bb5),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xf845f6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xf845f6['to']('isAnimationDisabled',_0x3c4770=>_0x3c4770?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xf845f6['to']('top',_0x5b152a=>Ot(_0x5b152a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xc5a283=this['element']['clientHeight'];_0xc5a283&&(this['height']=_0xc5a283);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x59fa22{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53f608){super(_0x53f608),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 _0x1c5ade=this['context']['config']['get']('sidebar.container');_0x1c5ade&&this['setContainer'](_0x1c5ade);}['setContainer'](_0x4eda23){if(!g(_0x4eda23))throw new _0x44e108('sidebar-setcontainer-invalid-element');this['container']=_0x4eda23;}['_attachToContainer']({viewClass:_0x10c546='',spaceBetweenItems:_0xfdbeaa=0x19}={}){if(!g(this['container']))throw new _0x44e108('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x10c546,this['_spaceBetweenItems']=_0xfdbeaa;}['rearrange']({removedAnnotation:_0xa6692e,previousAnnotation:_0x18d550,nextAnnotation:_0x41e3aa}){const _0x37c67c=this['getSidebarItemView'](_0xa6692e);this['view']['list']['remove'](_0x37c67c),this['_destroySidebarItemView'](_0xa6692e),_0x18d550&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x18d550)),_0x41e3aa&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x41e3aa)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x16e5db,activatedAnnotation:_0x4d14f9,disableAnimationOnActivatedAnnotation:_0x26e797}){if(this['_activeAnnotation']=_0x4d14f9,_0x16e5db){_0x16e5db['isActive']=!0x1;const _0x50221f=this['getSidebarItemView'](_0x16e5db);_0x50221f&&_0x26e797&&(_0x50221f['isAnimationDisabled']=!0x1);}if(_0x4d14f9){const _0x51317f=this['getSidebarItemView'](_0x4d14f9);_0x51317f&&(_0x4d14f9['isActive']=!0x0,_0x26e797&&(_0x51317f['isAnimationDisabled']=!0x0,_0x51317f['top']+=0x1),this['_alignToTargetRect'](_0x51317f));}}['_detachFromContainer'](_0x4e9a36){if(this['view']['element']['remove'](),_0x4e9a36){for(const _0x165a45 of _0x4e9a36)this['_destroySidebarItemView'](_0x165a45);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3f6596,_0x3b4b0a){_0x3b4b0a||(_0x3b4b0a=_0x3f6596['view']);const _0x5978a8=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5978a8,_0x3f6596),this['_annotationToSidebarItemView']['set'](_0x3f6596,_0x5978a8),_0x5978a8['content']['add'](_0x3b4b0a),this['listenTo'](_0x3f6596['view'],'change:targetRect',(_0x31f022,_0x2ef54a,_0x3da3bb)=>{const _0x3c6a12=this['_getTargetTop'](_0x3f6596,_0x3da3bb);_0x5978a8['_targetTop']!=_0x3c6a12&&(_0x5978a8['_targetTop']=_0x3c6a12,this['_setItemTop'](_0x5978a8,_0x3c6a12));}),this['listenTo'](_0x5978a8,'change:top',()=>{this['_recalculate'](_0x5978a8,'top');}),this['listenTo'](_0x5978a8,'change:bottom',()=>{this['_recalculate'](_0x5978a8,'bottom');}),this['_alignToTargetRect'](_0x5978a8);const _0x23fb21=this['_getItemBefore'](_0x5978a8);if(_0x23fb21)this['_alignAfterItem'](_0x23fb21,_0x5978a8)||this['_alignToTargetRect'](_0x5978a8);else this['_alignToTargetRect'](_0x5978a8);return this['_updateLastItem'](),this['view']['list']['add'](_0x5978a8),_0x5978a8;}['_alignForTopChange'](_0x2e1696){if(!_0x2e1696['content']['length'])return;const _0x539344=this['_getItemBefore'](_0x2e1696);if(!_0x539344)return;const _0x5c78a8=this['_sidebarItemViewToAnnotation']['get'](_0x539344),_0x5e11c7=this['_activeAnnotation'];_0x5e11c7&&_0x5e11c7===_0x5c78a8?this['_alignAfterItem'](_0x539344,_0x2e1696):this['_alignBeforeItem'](_0x2e1696,_0x539344);}['_alignForBottomChange'](_0x478df){if(!_0x478df['content']['length'])return;const _0x370482=this['_getItemAfter'](_0x478df);if(!_0x370482)return;const _0x25fb97=this['_sidebarItemViewToAnnotation']['get'](_0x370482),_0x4d10d8=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5db6ec=this['_activeAnnotation'];_0x5db6ec&&_0x5db6ec===_0x25fb97&&_0x4d10d8?(this['_alignBeforeItem'](_0x370482,_0x478df),this['_alignAfterItem'](_0x478df,_0x370482)):_0x5db6ec&&_0x5db6ec===_0x25fb97?this['_alignBeforeItem'](_0x370482,_0x478df):this['_alignAfterItem'](_0x478df,_0x370482);}['_recalculate'](_0x4dfeb6,_0x11dffb){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x176ba3,changedProp:_0x8a0e1c}of this['_recalculateBuffer'])'top'===_0x8a0e1c?this['_alignForTopChange'](_0x176ba3):this['_alignForBottomChange'](_0x176ba3);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4dfeb6,'changedProp':_0x11dffb});}['getSidebarItemView'](_0x2bb5f6){return this['_annotationToSidebarItemView']['get'](_0x2bb5f6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x162a98){const _0x34ab7b=this['getSidebarItemView'](_0x162a98);this['stopListening'](_0x34ab7b),this['stopListening'](_0x162a98['view']),_0x34ab7b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x162a98),this['_sidebarItemViewToAnnotation']['delete'](_0x34ab7b);}['_createSidebarView'](){const _0x44f823=new H(this['context']['locale']);return _0x44f823['render'](),this['on']('change:_lastItem',(_0x491851,_0x1a6aeb,_0x24745d,_0x4cc8df)=>{_0x4cc8df&&_0x44f823['unbind']('minHeight'),_0x24745d?_0x44f823['bind']('minHeight')['to'](_0x24745d,'bottom'):_0x44f823['minHeight']=null;}),_0x44f823;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x27d6cb){const _0x52272b=this['_sidebarItemViewToAnnotation']['get'](_0x27d6cb),_0x4b542e=_0x52272b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x52272b)-0x1);return _0x4b542e&&this['getSidebarItemView'](_0x4b542e)||null;}['_getItemAfter'](_0x46d242){const _0x424ed0=this['_sidebarItemViewToAnnotation']['get'](_0x46d242),_0x255f6e=_0x424ed0&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x424ed0)+0x1);return _0x255f6e&&this['getSidebarItemView'](_0x255f6e)||null;}['_alignBeforeItem'](_0x1d8de7,_0x1f026c){_0x1d8de7['updateHeight']();const _0x536d7e=G(_0x1f026c['bottom']+this['_spaceBetweenItems'],_0x1d8de7['top']);return!!_0x536d7e&&(this['_setItemTop'](_0x1f026c,_0x1f026c['top']-_0x536d7e),!0x0);}['_alignAfterItem'](_0x310f47,_0x4f53de){_0x310f47['updateHeight']();const _0x3f2e3b=G(_0x310f47['bottom']+this['_spaceBetweenItems'],_0x4f53de['top']);return!!_0x3f2e3b&&(this['_setItemTop'](_0x4f53de,_0x4f53de['top']+_0x3f2e3b,!0x1),!0x0);}['_alignToTargetRect'](_0x5d03e7){const _0x208e45=this['_sidebarItemViewToAnnotation']['get'](_0x5d03e7);if(!_0x208e45||!_0x208e45['target']||!_0x208e45['targetRect'])return;const _0x204a8d=this['_getTargetTop'](_0x208e45,_0x208e45['targetRect']);this['_setItemTop'](_0x5d03e7,_0x204a8d);}['_getTargetTop'](_0x4ab33c,_0x59d88d){if(null===_0x59d88d)return 0x0;if(_0x4ab33c['target']instanceof _0x520f72)return _0x59d88d['top'];{const _0x3715c0=new _0x520f72(this['view']['element'])['top'];return _0x59d88d['top']-_0x3715c0;}}['_setItemTop'](_0x581b8d,_0x576d73,_0xac002d=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xac002d&&(_0x576d73=Math['max'](_0x576d73,this['_getMaxAvailableTop'](_0x581b8d))),_0x581b8d['top']=_0x576d73;}['_getMaxAvailableTop'](_0x1b4a31){let _0x4b6753=this['_getItemBefore'](_0x1b4a31),_0x4aa15c=0x0;for(;_0x4b6753;)_0x4b6753['updateHeight'](),_0x4aa15c+=this['_spaceBetweenItems']+_0x4b6753['height'],_0x4b6753=this['_getItemBefore'](_0x4b6753);return _0x4aa15c;}}function G(_0x5a48ef,_0x4ecc11){return Math['max'](_0x5a48ef-_0x4ecc11,0x0);}function g(_0x5d6e64){return null!==_0x5d6e64&&'object'==typeof _0x5d6e64&&0x1===_0x5d6e64['nodeType'];}class e extends _0x59fa22{['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(_0x183fbe){super(_0x183fbe),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xf11332(),this['_refreshPositioningDebounced']=_0x22be3f(()=>{_0x183fbe['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x35aa39=this['context']['plugins']['get'](j),_0x3fdc92=this['context']['plugins']['get'](z);_0x35aa39['register']('wideSidebar',this),_0x3fdc92['container']&&_0x35aa39['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x526e80){if(_0x526e80===this['activeAnnotation'])return;const _0x392d36=this['context']['plugins']['get'](z);_0x392d36['_activeAnnotation']=_0x526e80;const _0x227198=this['activeAnnotation'];_0x392d36['refresh']({'blurredAnnotation':_0x227198,'activatedAnnotation':_0x526e80}),this['activeAnnotation']=_0x526e80;}['attach'](_0xfc2346){this['annotations']=_0xfc2346;const _0x5431fd=this['context']['plugins']['get'](z);if(_0x5431fd['_annotations']=_0xfc2346,this['isAttached'])throw new _0x44e108('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5431fd,'set:container',()=>{this['detach'](),this['listenTo'](_0x5431fd,'change:container',_0x9db919=>{_0x9db919['off'](),this['attach'](_0xfc2346);});}),_0x5431fd['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x49e003=_0x3be6ea=>{_0x3be6ea['updateTargetRect'](),_0x5431fd['addAnnotation'](_0x3be6ea);};for(const _0x461221 of _0xfc2346)_0x49e003(_0x461221);this['listenTo'](_0xfc2346,'add',(_0x5b0310,_0x200d90)=>{_0x49e003(_0x200d90);}),this['listenTo'](_0xfc2346,'remove',(_0x2f8e26,_0x37664f,_0x4ef2d1)=>{_0x5431fd['rearrange']({'removedAnnotation':_0x37664f,'previousAnnotation':_0xfc2346['get'](_0x4ef2d1-0x1),'nextAnnotation':_0xfc2346['get'](_0x4ef2d1+0x1)}),_0x37664f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xfc2346,'focus',(_0x4d584c,_0x31d27b)=>{this['setActiveAnnotation'](_0x31d27b);}),this['listenTo'](_0xfc2346,'blur',()=>{this['setActiveAnnotation'](null);});const _0x552986=this['context']instanceof _0x4109a3?this['context']['editors']:new _0xf11332([this['context']]);for(const _0x1140a2 of _0x552986)this['_integrateWithEditorAnnotations'](_0x1140a2);this['listenTo'](_0x552986,'add',(_0x8a78e4,_0xe38250)=>{this['listenTo'](_0xe38250,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xe38250);});}),this['listenTo'](_0x552986,'remove',(_0x198df7,_0x5cf7cc)=>{_0x5cf7cc['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5cf7cc['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x44e108('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x28089b=this['context']['plugins']['get'](z);_0x28089b['_detachFromContainer'](this['annotations']),this['stopListening'](_0x28089b),this['stopListening'](this['annotations']),this['context']instanceof _0x4109a3&&this['stopListening'](this['context']['editors']);for(const _0x26700f of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x26700f);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x394073){if(!_0x394073['plugins']['has']('EditorAnnotations'))return;const _0x6628a9=_0x394073['plugins']['get']('EditorAnnotations'),_0x17664b=()=>{const _0x182e2e=_0x6628a9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x182e2e[0x0]||null);};this['listenTo'](_0x6628a9,'refresh',_0x17664b),this['listenTo'](_0x6628a9,'blur',(_0xe9442,{isAnnotationTracked:_0x274662})=>{this['activeAnnotation']&&_0x274662(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x6628a9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4d9a1c=>{_0x6628a9['hasDomSelection']()&&(_0x17664b(),_0x4d9a1c['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x6628a9);}['_destroyEditorAnnotationsIntegration'](_0x4165ba){this['stopListening'](_0x4165ba),this['_editorAnnotations']['remove'](_0x4165ba);}}class C extends _0x73e913{['counterView'];constructor(_0x15107d){super(_0x15107d);const _0x46e34f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x44b5bd,_0x3f3027)=>_0x44b5bd?'...':_0x3f3027['toString']()),this['set']('annotationType',''),this['icon']=_0x3a5d19,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x46e34f['to']('annotationType',_0x3a513c=>'ck-annotation-counter__badge--'+_0x3a513c),_0x46e34f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x46e34f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x59fa22{['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(_0x4c1f72){super(_0x4c1f72),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x55947a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xf11332(),this['_refreshPositioningDebounced']=_0x22be3f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x471887(this['context']['locale']),this['balloonPanelView']=new _0x13911b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2f5eb8){this['annotations']=_0x2f5eb8;const _0x4e17ea=this['context']['plugins']['get'](z),_0x1504b8=this['balloonPanelView'];if(_0x4e17ea['_annotations']=_0x2f5eb8,this['isAttached'])throw new _0x44e108('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4e17ea,'set:container',()=>{this['detach'](),this['listenTo'](_0x4e17ea,'change:container',_0x465f=>{_0x465f['off'](),this['attach'](_0x2f5eb8);});}),_0x4e17ea['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1bb1de=_0x377dcf=>{const _0x571fd0=new C(this['context']['locale']);_0x4e17ea['addAnnotation'](_0x377dcf,_0x571fd0),this['_annotationToNarrowView']['set'](_0x377dcf,_0x571fd0),_0x571fd0['bind']('isDirty','annotationType','number')['to'](_0x377dcf['view'],'isDirty','type','length'),_0x571fd0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1504b8['content']['first']!==_0x377dcf['view']?(this['_showBalloon'](_0x377dcf),_0x377dcf['view']['element']['focus'](),this['setActiveAnnotation'](_0x377dcf)):this['setActiveAnnotation'](null);});};for(const _0xce70d of _0x2f5eb8)_0x1bb1de(_0xce70d);this['listenTo'](_0x2f5eb8,'add',(_0x402d42,_0x5ca021)=>{_0x1bb1de(_0x5ca021);}),this['listenTo'](_0x2f5eb8,'remove',(_0x3f4b60,_0x488b92,_0x486b27)=>{this['_annotationToNarrowView']['get'](_0x488b92)['destroy'](),this['_annotationToNarrowView']['delete'](_0x488b92),_0x4e17ea['rearrange']({'removedAnnotation':_0x488b92,'previousAnnotation':_0x2f5eb8['get'](_0x486b27-0x1),'nextAnnotation':_0x2f5eb8['get'](_0x486b27+0x1)}),_0x488b92===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2f5eb8,'focus',(_0x50dd31,_0x54932b)=>{this['setActiveAnnotation'](_0x54932b);}),this['listenTo'](_0x2f5eb8,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4b096e,_0x1059ed)=>{_0x1059ed['keyCode']===_0x3d25c7['esc']&&_0x1504b8['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1504b8['content']['first']),this['_hideBalloon'](),_0x1059ed['stopPropagation'](),_0x1059ed['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x15749a,_0x476072)=>{const _0x4bf359=_0x476072['target'];_0x1504b8['isVisible']&&_0x1504b8['element']['contains'](_0x4bf359)||_0x4e17ea['view']['element']['contains'](_0x4bf359)||_0x15749a['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x48bb52=>_0x48bb52['contains'](_0x4bf359))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5cd548=this['context']instanceof _0x4109a3?this['context']['editors']:new _0xf11332([this['context']]);for(const _0xcf3908 of _0x5cd548)this['_integrateWithEditorAnnotations'](_0xcf3908);this['listenTo'](_0x5cd548,'add',(_0x24362e,_0x3818a8)=>{this['listenTo'](_0x3818a8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3818a8);});}),this['listenTo'](_0x5cd548,'remove',(_0x5c0b36,_0x38d0e9)=>{_0x38d0e9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x38d0e9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x121e7c){if(_0x121e7c===this['activeAnnotation'])return;const _0x481f03=this['context']['plugins']['get'](z);if(_0x481f03['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x121e7c,'disableAnimationOnActivatedAnnotation':!0x0}),_0x121e7c)_0x481f03['getSidebarItemView'](_0x121e7c)?this['_showBalloon'](_0x121e7c):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x121e7c;}['detach'](){if(!this['isAttached'])throw new _0x44e108('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xd11719=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xa97f63=>_0xa97f63['destroy']()),this['_annotationToNarrowView']['clear'](),_0xd11719['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4109a3&&this['stopListening'](this['context']['editors']);for(const _0x39b854 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x39b854);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'](_0x474e83){if(!_0x474e83['plugins']['has']('EditorAnnotations'))return;const _0x49cfe6=_0x474e83['plugins']['get']('EditorAnnotations'),_0x1f8cac=this['context']['plugins']['get'](z),_0x269cdc=this['annotations'],_0x35aafc=this['balloonPanelView'],_0x56b560=()=>{const _0xf054b5=_0x49cfe6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xf054b5),this['setActiveAnnotation'](_0xf054b5[0x0]||null);};this['listenTo'](_0x49cfe6,'refresh',_0x56b560),this['listenTo'](_0x49cfe6,'blur',(_0x58de89,{isAnnotationTracked:_0x9a644})=>{this['activeAnnotation']&&_0x9a644(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x49cfe6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x269cdc,'blur',_0x29949e=>{_0x49cfe6['hasDomSelection']()&&_0x29949e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1e3e4b,_0x2dc1ef)=>{const _0x3185a5=_0x2dc1ef['target'];_0x35aafc['isVisible']&&_0x35aafc['element']['contains'](_0x3185a5)||_0x1f8cac['view']['element']['contains'](_0x3185a5)||this['activeAnnotation']&&_0x49cfe6['hasDomSelection']()&&(_0x56b560(),_0x1e3e4b['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x49cfe6);}['_destroyEditorAnnotationsIntegration'](_0x27eac5){_0x27eac5&&(this['stopListening'](_0x27eac5),this['_editorAnnotations']['remove'](_0x27eac5));}['_setSelectedAnnotations'](_0x162bd3){for(const _0x5b5e3d of this['_selectedAnnotations'])_0x162bd3['includes'](_0x5b5e3d)||this['_manuallyClosedAnnotationViews']['delete'](_0x5b5e3d['view']);this['_selectedAnnotations']=_0x162bd3;}['_refreshPositioning'](){const _0x5a0d6f=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5a0d6f['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x378cba){if(this['_manuallyClosedAnnotationViews']['has'](_0x378cba['view']))return;const _0x12f6e9=this['balloonPanelView']['content']['first'];_0x12f6e9!==_0x378cba['view']?(_0x12f6e9&&this['_detachListeners'](_0x12f6e9),this['_attachListeners'](_0x378cba['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x378cba['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x59a7bf=this['balloonPanelView']['content']['first'],_0x47181d=_0x59a7bf&&this['annotations']['getByView'](_0x59a7bf);if(!_0x47181d||!this['_annotationToNarrowView']['has'](_0x47181d))return;const _0x597709=this['_annotationToNarrowView']['get'](_0x47181d)['element'],_0xb0bea4=(function(){const _0x317d81=_0x13911b['defaultPositions'];return[_0x317d81['southArrowNorthEast'],_0x317d81['northArrowSouthEast'],_0x317d81['southArrowNorth'],_0x317d81['northArrowSouth'],_0x317d81['southArrowNorthWest'],_0x317d81['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x597709,'positions':_0xb0bea4});}['_hideBalloon'](){const _0x2860a9=this['balloonPanelView'],_0x1a58a5=_0x2860a9['content']['first'];_0x1a58a5&&(this['_detachListeners'](_0x1a58a5),_0x2860a9['unpin'](),_0x2860a9['content']['clear']());}['_attachListeners'](_0x508477){this['listenTo'](_0x508477,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x508477,'Esc',(_0x525937,_0x15a80f)=>{this['_manuallyClosedAnnotationViews']['add'](_0x508477),this['_hideBalloon'](),_0x15a80f();});}['_detachListeners'](_0x523b92){this['stopListening'](_0x523b92);}}class c extends _0x3f26c5{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x4c88f1,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46e95b){super(_0x46e95b),_0x46e95b['editing']['view']['addObserver'](_0x1cdacc),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x46e95b['plugins']['get'](_0x4c88f1),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x4c7ef4=this['editor']['plugins']['get'](j);_0x4c7ef4['context']===this['editor']&&(_0x4c7ef4['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x30185a,_0x443932)=>{const _0x478ac7=this['_balloon'];if(this['isAttached']&&_0x478ac7['visibleView']){const _0x5b7a0f=this['annotations']['getByView'](_0x478ac7['visibleView']);_0x5b7a0f&&this['_closeAnnotation'](_0x5b7a0f),_0x443932();}}));}['afterInit'](){const _0x24fdad=this['editor']['plugins']['get'](j);_0x24fdad['context']===this['editor']&&(_0x24fdad['hasActive']()||_0x24fdad['switchTo']('inline'));}['setActiveAnnotation'](_0x556a42){_0x556a42!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x556a42&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x556a42)&&this['_addAnnotationToBalloon'](_0x556a42,!0x0),_0x556a42['isActive']=!0x0),_0x556a42||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x556a42);}['attach'](_0x1ed4ac){this['annotations']=_0x1ed4ac;const _0x3c9df6=this['editor']['plugins']['get'](j),_0x54f44b=this['_balloon'];if(this['isAttached'])throw new _0x44e108('inlineannotations-attach-already-attached',this);if(_0x3c9df6['context']!==this['editor'])throw new _0x44e108('inlineannotations-not-allowed-with-context',this);const _0x22ffb3=this['editor']['plugins']['get'](b);this['listenTo'](_0x22ffb3,'refresh',()=>{const _0x105997=_0x22ffb3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x120672,_0x553c57;!this['_forceRefresh']&&(_0x120672=_0x105997,_0x553c57=this['_selectedAnnotations'],_0x120672['length']===_0x553c57['length']&&_0x120672['every'](_0x2d05ca=>_0x553c57['includes'](_0x2d05ca)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x105997),this['setActiveAnnotation'](_0x105997[0x0]||null));}),this['listenTo'](_0x22ffb3,'blur',(_0x25a659,{isAnnotationTracked:_0x3221be})=>{this['activeAnnotation']&&_0x3221be(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3d5e48,_0x1a303f,_0x15545e)=>{_0x15545e||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1ed4ac,'remove',(_0x37bfa2,_0x2033f8)=>{this['_removeAnnotationFromBalloon'](_0x2033f8),_0x2033f8===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x54f44b,'change:visibleView',(_0x4626b9,_0x43a3b1,_0x51c215,_0x73d1f5)=>{_0x73d1f5&&this['stopListening'](_0x73d1f5);const _0x2ca3da=_0x1ed4ac['getByView'](_0x51c215);_0x51c215&&_0x2ca3da&&(this['listenTo'](_0x51c215,'change:height',()=>{_0x54f44b['updatePosition']();}),this['listenTo'](_0x51c215,'Esc',()=>{this['_closeAnnotation'](_0x2ca3da),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2ca3da&&this['setActiveAnnotation'](_0x2ca3da));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x54f44b['visibleView']&&(_0x1ed4ac['getByView'](_0x54f44b['visibleView'])&&_0x54f44b['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 _0x44e108('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2baa55 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2baa55);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x52d83b){for(const _0x5d5ac1 of this['_selectedAnnotations'])_0x52d83b['includes'](_0x5d5ac1)||this['_manuallyClosed']['delete'](_0x5d5ac1);for(const _0x26761e of this['annotations'])_0x52d83b['includes'](_0x26761e)||this['_removeAnnotationFromBalloon'](_0x26761e);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x363786 of _0x52d83b)this['_addAnnotationToBalloon'](_0x363786);}this['_selectedAnnotations']=_0x52d83b;}['_addAnnotationToBalloon'](_0x5034e7,_0x413784=!0x1){this['_manuallyClosed']['has'](_0x5034e7)||(this['_addedAnnotations']['has'](_0x5034e7)||this['_balloon']['hasView'](_0x5034e7['view'])||(this['_addedAnnotations']['add'](_0x5034e7),this['_balloon']['add']({'stackId':_0x5034e7['view']['id'],'view':_0x5034e7['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5034e7)}})),_0x413784&&this['_balloon']['showStack'](_0x5034e7['view']['id']));}['_getBalloonTargetForAnnotation'](_0x412000){const _0x5e07d2=_0x412000['target'],_0x1f18f0=this['editor']['editing']['view'],_0x985ba5=_0x1f18f0['document']['selection']['getFirstRange'](),_0x3be34a=_0x1f18f0['domConverter']['viewRangeToDom'](_0x985ba5);if(_0x3be34a['collapse'](!0x0),_0x5e07d2){if(_0x5e07d2 instanceof _0x520f72)return _0x5e07d2;let _0xca5d9f=[];for(const _0x4b1024 of _0x5e07d2)_0xca5d9f['push'](...F(_0x4b1024['getClientRects']()));_0xca5d9f=function(_0x4af880){const _0x226bba=[];let _0x23d3ae=_0x4af880[0x0];for(let _0x2b0939=0x1;_0x2b0939<_0x4af880['length'];_0x2b0939++)P(_0x23d3ae,_0x4af880[_0x2b0939])?_0x23d3ae['width']+=_0x4af880[_0x2b0939]['width']:(_0x226bba['push'](_0x23d3ae),_0x23d3ae=_0x4af880[_0x2b0939]);return _0x226bba['push'](_0x23d3ae),_0x226bba;}(_0xca5d9f);const _0x5925a0=_0x3be34a['getBoundingClientRect']();return _0xca5d9f['find'](_0x1cc13d=>_0x1cc13d['top']<=_0x5925a0['top']&&_0x1cc13d['bottom']>=_0x5925a0['bottom']&&_0x1cc13d['left']<=_0x5925a0['left']&&_0x1cc13d['right']>=_0x5925a0['right'])||_0xca5d9f[0x0];}return _0x412000['targetRect']||_0x3be34a;}['_removeAnnotationFromBalloon'](_0x433dbe){this['_addedAnnotations']['has'](_0x433dbe)&&this['_balloon']['hasView'](_0x433dbe['view'])&&(this['_addedAnnotations']['delete'](_0x433dbe),this['_balloon']['remove'](_0x433dbe['view']));}['_closeAnnotation'](_0x3d1c62){this['_manuallyClosed']['add'](_0x3d1c62),this['_removeAnnotationFromBalloon'](_0x3d1c62);}}function F(_0x279696){return Array['from'](_0x279696)['map'](DOMRect['fromRect']);}function P(_0x515b03,_0x3f6aa2){return _0x515b03['top']===_0x3f6aa2['top']&&_0x515b03['bottom']===_0x3f6aa2['bottom']&&_0x515b03['right']===_0x3f6aa2['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x2a8b04,_0x41581b){super(_0x2a8b04),this['set']('isEmpty',!_0x41581b['length']),this['focusTracker']=new _0x158d2e(),this['_annotationViews']=_0x41581b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x56e70d({'focusables':_0x41581b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x41581b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x41581b,'remove',(_0x459e4f,_0x1c9b8c)=>{_0x1c9b8c['isActive']&&this['focus'](),_0x41581b['length']||(this['isEmpty']=!0x0);});const _0xa38537=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x2a8b04,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x41581b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0xa38537['if']('isEmpty','ck-hidden',_0x425973=>!_0x425973)]},'children':[{'text':N(_0x2a8b04,'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 _0xacd29d of this['_annotationViews'])this['focusTracker']['add'](_0xacd29d['element']);this['_annotationViews']['on']('change',(_0x52666a,{added:_0x156f81,removed:_0x490d42})=>{for(const _0x4e66db of _0x156f81)this['focusTracker']['add'](_0x4e66db['element']);for(const _0x45cc49 of _0x490d42)this['focusTracker']['remove'](_0x45cc49['element']);});}}class p extends _0x59fa22{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5600eb){super(_0x5600eb),this['archivedThreads']=new _0xf11332();}['init'](){const _0x58efaa=this['context'],_0x210d0f=_0x58efaa['plugins']['get'](o),_0x410b15=_0x58efaa['plugins']['get'](y);this['listenTo'](_0x210d0f,'addCommentThread',(_0x3c7749,{threadId:_0x5458c8})=>{const _0x529595=_0x210d0f['getCommentThread'](_0x5458c8);_0x529595['archivedAt']&&this['archivedThreads']['add'](_0x529595,this['_calculatePosition'](_0x529595['archivedAt'])),this['listenTo'](_0x529595,'change:archivedAt',(_0x264062,_0x1cba11,_0x42d800)=>{_0x42d800?this['archivedThreads']['has'](_0x529595)||this['archivedThreads']['add'](_0x529595,this['_calculatePosition'](_0x529595['archivedAt'])):this['archivedThreads']['has'](_0x529595)&&this['archivedThreads']['remove'](_0x529595);});}),this['listenTo'](_0x210d0f,'removeCommentThread',(_0x2b3aa5,{threadId:_0x269f09})=>{const _0x1bd094=_0x210d0f['getCommentThread'](_0x269f09);this['stopListening'](_0x1bd094),this['archivedThreads']['has'](_0x1bd094)&&this['archivedThreads']['remove'](_0x1bd094);},{'priority':'highest'}),this['listenTo'](_0x410b15['collection'],'focus',(_0xaca58e,_0x1de55a)=>{_0x1de55a['isVisible']||(_0x1de55a['isActive']=!0x0,_0x410b15['activate'](_0x1de55a));});}['_calculatePosition'](_0x4fa7d0){const _0x364585=[...this['archivedThreads']]['findIndex'](_0x225995=>_0x225995['archivedAt']<_0x4fa7d0);return _0x364585>-0x1?_0x364585:this['archivedThreads']['length'];}}class a extends _0x3f26c5{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1305dc];}constructor(_0x180a1c){super(_0x180a1c),this['annotationViews']=new _0x2989d3(),this['_pendingThreads']=[];}['init'](){const _0x278fd1=this['editor'],_0x213da1=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x278fd1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x73e913,!0x0)),_0x278fd1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x6908be=this['_createCommentsArchiveButton'](_0x216b27);return _0x6908be['set']({'role':'menuitemcheckbox'}),_0x6908be;});const _0xf712af=_0x278fd1['plugins']['get'](p),_0x2daefa=_0x278fd1['plugins']['get']('Annotations'),_0x2449c8=_0x278fd1['plugins']['get']('CommentsRepository');_0xf712af['archivedThreads']['forEach'](_0x31468c=>{this['_handleNewThread'](_0x31468c);}),this['listenTo'](_0xf712af['archivedThreads'],'add',(_0x14cc36,_0x57ee51)=>{this['_handleNewThread'](_0x57ee51);}),this['listenTo'](_0x2daefa['collection'],'add',(_0x1809f5,_0x3ab1b7)=>{const _0xd71ff3=this['_pendingThreads']['find'](_0x583e65=>{const _0x555484=_0x2449c8['_threadToController']['get'](_0x583e65);return _0x555484&&_0x3ab1b7['innerView']===_0x555484['view'];});if(_0xd71ff3){const _0x94baeb=this['_calculatePosition'](_0xd71ff3['archivedAt']);this['_addAnnotationToArchive'](_0x3ab1b7,_0x94baeb),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xd71ff3),0x1);}}),this['listenTo'](_0xf712af['archivedThreads'],'remove',(_0x409c2a,_0x2e29a0)=>{const _0x3be0d9=_0x278fd1['config']['get']('collaboration.channelId');if(!_0x3be0d9||_0x2e29a0['channelId']===_0x3be0d9){if(this['_pendingThreads']['includes'](_0x2e29a0))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2e29a0),0x1);else{const _0x5a0988=_0x2449c8['_threadToController']['get'](_0x2e29a0),_0x4ecbb8=_0x2daefa['getByInnerView'](_0x5a0988['view']);this['annotationViews']['remove'](_0x4ecbb8['view']),this['stopListening'](_0x4ecbb8),this['stopListening'](_0x4ecbb8['focusableElements']);}}}),this['listenTo'](_0x2daefa['collection'],'add',(_0x571794,_0x27fc4f)=>{this['listenTo'](_0x27fc4f,'escape',_0x213da1);}),this['listenTo'](_0x2daefa['collection'],'remove',(_0x231ad4,_0x45cd59)=>{this['stopListening'](_0x45cd59,'escape',_0x213da1);});}['_addAnnotationToArchive'](_0x2337cd,_0x168728){this['listenTo'](_0x2337cd,'set:isVisible',_0x6c8ed6=>{_0x6c8ed6['return']=!0x1,_0x6c8ed6['stop']();}),this['annotationViews']['add'](_0x2337cd['view'],_0x168728);}['_handleNewThread'](_0x338c3c){const _0x5adbda=this['editor']['plugins']['get']('CommentsRepository'),_0x4c2e38=this['editor']['plugins']['get']('Annotations'),_0x40bf10=this['editor']['config']['get']('collaboration.channelId');if(!_0x40bf10||_0x338c3c['channelId']===_0x40bf10){const _0x3ff753=_0x5adbda['_threadToController']['get'](_0x338c3c);if(!_0x3ff753)return void this['_pendingThreads']['push'](_0x338c3c);const _0xe1fd26=this['_calculatePosition'](_0x338c3c['archivedAt']),_0x475042=_0x4c2e38['getByInnerView'](_0x3ff753['view']);_0x475042['isVisible']&&_0x4c2e38['_visibleAnnotations']['remove'](_0x475042),this['_addAnnotationToArchive'](_0x475042,_0xe1fd26);}}['_calculatePosition'](_0x1e71f7){const _0x316d0e=this['editor']['config']['get']('collaboration.channelId'),_0x487876=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x5cfcff=>_0x5cfcff['channelId']===_0x316d0e)['findIndex'](_0x270513=>_0x270513['archivedAt']<_0x1e71f7);return _0x487876<0x0||_0x487876>this['annotationViews']['length']?this['annotationViews']['length']:_0x487876-0x1;}['_toggleDialog'](){const _0x2fcbf1=this['editor'],_0xca7d7e=_0x2fcbf1['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x2fcbf1['locale'],this['annotationViews'])),'commentsArchive'===_0xca7d7e['id']?_0xca7d7e['hide']():_0xca7d7e['show']({'id':'commentsArchive','title':N(_0x2fcbf1['locale'],'COMMENTS_ARCHIVE'),'icon':_0x52296d,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3c3639['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x223443,_0x11d25a=!0x1){const _0xb538f9=this['editor']['locale'],_0x290f30=this['editor']['plugins']['get']('Dialog'),_0x3dd1ca=new _0x223443(_0xb538f9);return _0x3dd1ca['bind']('isEnabled')['to'](this,'isEnabled'),_0x3dd1ca['bind']('isOn')['to'](_0x290f30,'id',_0x18449e=>'commentsArchive'===_0x18449e),_0x3dd1ca['set']({'label':N(_0xb538f9,'COMMENTS_ARCHIVE'),'icon':_0x52296d,'isToggleable':!0x0}),_0x11d25a&&(_0x3dd1ca['tooltip']=!0x0),this['listenTo'](_0x3dd1ca,'execute',()=>this['_toggleDialog']()),_0x3dd1ca;}['_hideDialogOnAnnotationEscape']=_0x3b93cd=>{const _0x1dca00=_0x3b93cd['source'];if(!this['annotationViews']['has'](_0x1dca00['view']))return;const _0x3d547f=this['editor']['plugins']['get']('Dialog');_0x3d547f['isOpen']&&'commentsArchive'===_0x3d547f['id']&&(_0x3d547f['hide'](),_0x3b93cd['stop']());};}class gi extends _0x3f26c5{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};
|