@ckeditor/ckeditor5-comments 46.0.1-alpha.5 → 46.0.1-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +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(_0x2b8c3a={}){function _0x2b94de(_0x5c5ff1){return _0x5c5ff1['map'](_0x1ae4f9=>String['fromCharCode'](_0x1ae4f9))['join']('');}(_0x2b8c3a=Object['assign']({},_0x2b8c3a))['plugins']||(_0x2b8c3a['plugins']=Rt['defaultPlugins']),super(_0x2b8c3a),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2b94de([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b94de([0x76,0x69,0x65,0x77])][_0x2b94de([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2b94de([0x61,0x75,0x74,0x6f]),this[_0x2b94de([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2b94de([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2b94de([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2b94de([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2b94de([0x6f,0x6b])});}['create'](){const _0x355815=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x355815))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4bffc6=>{const _0x2131a4=this['model']['document']['getRoot'](),_0x398556=_0x2131a4&&_0x2131a4['getChild'](_0x2131a4['childCount']-0x1);_0x4bffc6['setSelection'](_0x398556,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3938bc=this['editing']['view'],_0x39e0e0=_0x3938bc['document']['getRoot'](),_0x4287d2=_0x39e0e0['getChild'](0x0);_0x39e0e0['childCount']>0x1||!_0x4287d2||'p'!=_0x4287d2['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x3938bc,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4287d2['placeholder']=this['placeholder']),St({'view':_0x3938bc,'element':_0x4287d2,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4287d2);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2244d5,_0x470fd1={}){super(_0x2244d5),this['editor']=null,this['_editorConfig']=_0x470fd1,this['set']('value',_0x470fd1['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x2244d5,'Reply...')),this['set']('submitLabel',N(_0x2244d5,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x3ada3a(),this['focusCycler']=new _0x16ebe1({'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',(_0x57f788,_0x2a72f4)=>{this['cancelButtonView']['fire']('execute'),_0x2a72f4();}),this['keystrokes']['set']('Ctrl+Enter',(_0x327884,_0x292698)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x292698());}),this['on']('submit',(_0x54a991,_0x494e03)=>{_0x494e03['length']>0xfde8?(alert(N(_0x2244d5,'TOO_LONG_COMMENT_ALERT',[_0x494e03['length'],0xfde8])),_0x54a991['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1848c4=this['editor'];this['element']['insertBefore'](_0x1848c4['ui']['element'],this['element']['firstChild']),_0x1848c4['model']['document']['on']('change',()=>this['value']=_0x1848c4['getData']()),_0x1848c4['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1848c4['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x56c2ea){-0x1===_0x56c2ea?(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:_0x1f2cca}=this,_0x1e1bf4=new _0x1a5bd1(_0x1f2cca);return _0x1e1bf4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1e1bf4['withText']=!0x0,_0x1e1bf4['bind']('label')['to'](this,'submitLabel'),_0x1e1bf4['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1e1bf4['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2ffa20,_0x134c85)=>!_0x134c85&&!!_0x2ffa20['trim']()),_0x1e1bf4;}['_createCancelButton'](){const {locale:_0x3dcf6b}=this,_0x453926=new _0x1a5bd1(_0x3dcf6b);return _0x453926['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x453926['label']=N(_0x3dcf6b,'Cancel'),_0x453926['withText']=!0x0,_0x453926['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x453926;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2b814d=>{this['focusTracker']['add'](_0x2b814d['element']);}),this['focusables']['on']('change',(_0x2ba4f7,_0x438e59)=>{for(const _0x1b2c52 of Array['from'](_0x438e59['added'])['reverse']())this['focusTracker']['add'](_0x1b2c52['element']);});}}class ie extends kt{constructor(_0x27b365,_0x1017b3,_0x3e5bf4){super(_0x27b365),this['commentInputView']=new os(_0x27b365,_0x3e5bf4),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x255c4d,_0xae410f)=>_0x255c4d||!!_0xae410f),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 _0x3f9ffa(_0x27b365,_0x1017b3),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'](_0x1ef6de){this['commentInputView']['focus'](_0x1ef6de);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1dc154,_0x223c19)=>{const {submitButtonView:_0x3e14db,cancelButtonView:_0x4b7217,editor:_0x3b3986}=this['commentInputView'];[_0x3e14db['element'],_0x4b7217['element'],_0x3b3986?_0x3b3986['editing']['view']['getDomRoot']():null]['filter'](_0x43f28d=>_0x43f28d)['some'](_0x165ce0=>_0x165ce0['contains'](_0x223c19['target']))||(this['focus'](),_0x223c19['preventDefault']());});}}class rs extends kt{constructor(_0x465e22){super(_0x465e22);const _0x518dc6=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x518dc6['to']('count',_0xbfa197=>N(_0x465e22,'NUMBER_OF_COMMENTS',_0xbfa197))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x36ba56,_0x37e68c,_0x5a2940){super(_0x36ba56);const _0x5e1b3c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x37e68c['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x37e68c,this['_config']=_0x5a2940,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3ada3a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x16ebe1({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x52972b=>this['commentViews']['map'](_0xe11d4d=>_0xe11d4d['element'])['includes'](_0x52972b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x36ba56),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4f52b0=>_0x4f52b0-this['_config']['maxCommentsWhenCollapsed']);for(const _0xd28af5 of _0x37e68c['comments'])this['_handleNewCommentModel'](_0xd28af5);this['_handleInfoComment'](),this['listenTo'](_0x37e68c['comments'],'add',(_0x5e5a93,_0xf17471)=>{const _0x5f07c3=this['_calculatePosition'](_0xf17471);this['length']++,this['_handleNewCommentModel'](_0xf17471,_0x5f07c3),this['refreshVisibleViews']();}),this['listenTo'](_0x37e68c['comments'],'remove',(_0x4a9332,_0x358033)=>{this['length']--,this['_handleRemoveCommentModel'](_0x358033),this['refreshVisibleViews']();}),this['listenTo'](_0x37e68c,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x37e68c,'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',_0x5e1b3c['if']('length','ck-hidden',_0x2120a0=>!_0x2120a0)],'aria-label':N(_0x36ba56,'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'](_0x4af8fd){-0x1===_0x4af8fd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x54ef7d of this['commentViews'])_0x54ef7d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x291c5b,_0xfc803d){const _0x390ed2=new this['_config']['CommentView'](this['locale'],_0x291c5b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x390ed2['viewUid']=_0x291c5b['id'],_0x390ed2['delegate']('removeComment')['to'](this),_0x390ed2['delegate']('updateComment')['to'](this),_0x390ed2['delegate']('resolveCommentThread')['to'](this),_0x390ed2['delegate']('editorReady')['to'](this),_0x390ed2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x390ed2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x390ed2,_0xfc803d);}['_calculatePosition'](_0x379d6c){const _0x177afe=this['_model']['_findOptimalIndex'](_0x379d6c);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x379d6c['authoredAt']?_0x177afe-0x1:_0x177afe:_0x177afe-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x202bee={'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'],_0x202bee,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x202bee));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x26df51){const _0x4b3900=this['commentViews']['remove'](_0x26df51['id']);this['stopListening'](_0x4b3900),_0x4b3900['isEditMode']&&this['_updateHasDirtyComment'](),_0x4b3900['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x41d703=>_0x41d703['isEditMode']);}['_rearrangeCollapse'](){const _0x2221ee=function(_0x3ca90d){const _0x247058=new _0x4ca5b9();for(const _0x3a2fc4 of _0x3ca90d)_0x247058['add'](_0x3a2fc4);return _0x247058;}(this['commentViews']),_0x5888b5=this['_collapsedCommentsView']['count'];for(let _0x4f01e5=0x1;_0x4f01e5<=_0x5888b5;_0x4f01e5++)_0x2221ee['remove'](0x1);for(const _0x2721df of _0x2221ee)_0x2721df['collapse']();_0x5888b5>0x0&&_0x2221ee['add'](this['_collapsedCommentsView'],0x1),ns(_0x3cea0c(Array['from'](this['visibleViews']),Array['from'](_0x2221ee)),this['visibleViews'],_0x2221ee);}['_rearrangeExpand'](){ns(_0x3cea0c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4b3ae5 of this['visibleViews'])_0x4b3ae5['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4f6802=>{this['focusTracker']['add'](_0x4f6802['element']),this['keystrokes']['listenTo'](_0x4f6802['element']);}),this['commentViews']['on']('change',(_0x1fddcb,_0x2e5136)=>{for(const _0x545b99 of _0x2e5136['removed'])this['focusTracker']['remove'](_0x545b99['element']),this['keystrokes']['stopListening'](_0x545b99['element']);for(const _0x4217a8 of Array['from'](_0x2e5136['added'])['reverse']())this['focusTracker']['add'](_0x4217a8['element']),this['keystrokes']['listenTo'](_0x4217a8['element']);});}}function ns(_0x3f4b87,_0x1e5566,_0x3c86e4){let _0x1c70aa=0x0;for(const _0x2c4738 of _0x3f4b87)switch(_0x2c4738){case'insert':_0x1e5566['add'](_0x3c86e4['get'](_0x1c70aa),_0x1c70aa),_0x1c70aa++;break;case'delete':_0x1e5566['remove'](_0x1c70aa);break;case'equal':_0x1c70aa++;}}class oe extends kt{constructor(_0x2111cd){super(_0x2111cd);const _0x1be009=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1be009['to']('contextValue',_0x56888d=>N(_0x2111cd,'THREAD_CONTEXT_LABEL',_0x56888d)),'tabindex':-0x1},'children':[{'text':_0x1be009['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x25885a,_0x29c9e7){super(_0x25885a);const _0x1b63d2=this['bindTemplate'];this['_model']=_0x29c9e7,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3ada3a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x16ebe1({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x523f94=>!!_0x523f94),this['bind']('contextValue')['to'](this['_model'],'context',_0x36cb0f=>_0x36cb0f&&_0x36cb0f['value']?this['_trimContextValue'](_0x36cb0f['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',_0x1b63d2['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 _0x4ad058=new _0x1a5bd1(this['locale']);return _0x4ad058['label']=N(this['locale'],'Reopen'),_0x4ad058['tooltip']=N(this['locale'],'Reopen'),_0x4ad058['icon']=_0x1833db,_0x4ad058['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2d9d81=>!_0x2d9d81),_0x4ad058['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4e20d8,_0xd7c158)=>_0x4e20d8&&_0xd7c158),_0x4ad058['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4ad058;}['_trimContextValue'](_0x2bb96c){if(_0x2bb96c['length']<0x96)return _0x2bb96c;const _0x24f6f4=_0x2bb96c['lastIndexOf']('\x20',0x93);return _0x2bb96c['substring'](0x0,_0x24f6f4>-0x1?_0x24f6f4:0x93)+'...';}['_attachContextActions'](){const _0x30a584=this['element']['querySelector']('.ck-context'),_0x379774=_0x30a584['querySelector']('.ck-context__value');this['listenTo'](_0x30a584,'mouseenter',()=>{_0x379774['offsetWidth']<_0x379774['scrollWidth']&&_0x30a584['classList']['add']('overlay');}),this['listenTo'](_0x30a584,'mouseleave',()=>{_0x30a584['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xabcbd0 of this['focusables'])this['focusTracker']['add'](_0xabcbd0['element']),this['keystrokes']['listenTo'](_0xabcbd0['element']);}['_createContextView'](){const _0x147886=new oe(this['locale']);return _0x147886['bind']('contextValue')['to'](this),_0x147886;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3ef8b1,_0x27e660,_0x303f1f,_0x230a8f){super(_0x3ef8b1),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x27e660,this['_localUser']=_0x303f1f,this['_config']=_0x230a8f,this['commentThreadHeaderView']=new Yt(_0x3ef8b1,_0x27e660),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x3ef8b1,N(_0x3ef8b1,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3ef8b1,_0x27e660,Object['assign']({'CommentView':this['_config']['CommentView']},_0x230a8f)),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',(_0x50f456,_0x1ecac8)=>_0x50f456||!!_0x1ecac8),this['bind']('isUnlinked')['to'](_0x27e660,'unlinkedAt',_0x4de54f=>!!_0x4de54f),this['bind']('ariaLabel')['to'](this,'length',_0x5bd551=>{const _0x533586=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x5bd551,_0x533586]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3ada3a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x16ebe1({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x40160b=>_0x40160b['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x14ced6=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5cb8fb=_0x14ced6['commentInputView'];return _0x14ced6['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5cb8fb,'value',(_0xcc1d9e,_0x1bc0ae,_0x129955,_0x500eaa,_0x1e3d40)=>!!_0x1e3d40||!!_0x500eaa&&_0x129955&&!_0x1bc0ae||_0xcc1d9e&&_0x129955&&!_0x1bc0ae),_0x5cb8fb['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xb01332,_0x5241fb,_0x3f8131)=>{let _0x5834fa;return _0x5834fa=_0x3f8131&&_0x5241fb?'Reply\x20to\x20reopen\x20discussion...':_0xb01332?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5834fa);}),_0x5cb8fb['bind']('submitLabel')['to'](this,'length',_0xb0bb94=>N(this['locale'],_0xb0bb94?'Reply':'Comment')),_0x5cb8fb['on']('submit',(_0x485722,_0x159f98)=>{this['fire']('addComment',_0x159f98),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5cb8fb['on']('cancel',()=>{this['focus']();}),_0x5cb8fb['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5cb8fb['on']('cancel',_0x511297=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x511297['stop']());}),this['on']('change:isActive',(_0x4527f1,_0x3afb07,_0x18f318)=>{_0x18f318||this['length']||_0x5cb8fb['value']||this['fire']('removeCommentThread');}),_0x14ced6;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x3b7d3e(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xffc852,target:_0x5e7dad,type:_0x59d4a8,isVisible:_0x1bd2d5=!0x0}){super(),this['view']=_0xffc852,this['view']['element']||this['view']['render'](),this['_type']=_0x59d4a8,this['_target']=_0x5e7dad,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4ca5b9([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4f2939,_0x4252b4)=>{this['view']['focusTracker']['add'](_0x4252b4);}),this['focusableElements']['on']('remove',(_0x1f625c,_0x2b905c)=>{this['view']['focusTracker']['remove'](_0x2b905c);}),this['set']('isVisible',_0x1bd2d5);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x33bbbb=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x33bbbb),_0x33bbbb;}get['targetRect'](){const _0x2ac5ab=this['target'];if(null===_0x2ac5ab)return null;if(_0x2ac5ab instanceof _0x329766)return _0x2ac5ab;const _0x3d69af=_0x2ac5ab['filter'](_0x28bdfb=>function(_0x13c6ef){const _0x2f70cc=_0x13c6ef['offsetParent'];if(_0x2f70cc)return!0x0;const _0x42597b=_0x13c6ef['getClientRects']()['item'](0x0);return!!_0x42597b;}(_0x28bdfb));return 0x0===_0x3d69af['length']?null:new _0x329766(_0x3d69af[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5604ff){this['view']['isActive']=_0x5604ff,this['view']['mainView']['isActive']=_0x5604ff;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x5767f3){if(!(null===_0x5767f3||_0x5767f3 instanceof _0x329766||Array['isArray'](_0x5767f3)&&_0x5767f3['every'](_0x92f225=>fi(_0x92f225))))throw new _0x47ee64('annotation-invalid-target',null,{'target':_0x5767f3});}['_getNormalizedTarget'](){const _0x3a823c='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x3a823c)?[_0x3a823c]:_0x3a823c;}}function fi(_0x31f85f){return null!==_0x31f85f&&'object'==typeof _0x31f85f&&'nodeType'in _0x31f85f&&0x1===_0x31f85f['nodeType'];}class S extends _0x4ca5b9{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x54685f=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3ada3a(),this['_focusTracker']['on']('change:isFocused',(_0x44ce8d,_0x350eea,_0x173f37)=>{_0x173f37||this['fire']('blur');});for(const _0x407e3d of _0x54685f)this['add'](_0x407e3d);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x10e152){if(this['has'](_0x10e152))throw new _0x47ee64('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x10e152['innerView'],_0x10e152),this['_viewToAnnotation']['set'](_0x10e152['view'],_0x10e152);for(const _0x130494 of _0x10e152['focusableElements'])this['_focusTracker']['add'](_0x130494);this['listenTo'](_0x10e152['focusableElements'],'add',(_0x3449b1,_0x396271)=>{this['_focusTracker']['add'](_0x396271);}),this['listenTo'](_0x10e152['focusableElements'],'remove',(_0x3dcb15,_0x5c5458)=>{this['_focusTracker']['remove'](_0x5c5458);}),this['listenTo'](_0x10e152['view']['focusTracker'],'change:isFocused',(_0x1de707,_0x2bdc41,_0x58083e)=>{_0x58083e&&this['fire']('focus',_0x10e152);}),_0x10e152['updateTargetRect']();const _0x58feb7=this['_getOrderInContent'](_0x10e152['view']['targetRect']);return super['add'](_0x10e152,_0x58feb7);}['remove'](_0x1c7f23){if(!this['has'](_0x1c7f23))throw new _0x47ee64('annotationcollection-not-existing-item',null);this['stopListening'](_0x1c7f23['view']['focusTracker']),this['stopListening'](_0x1c7f23['focusableElements']);for(const _0x4466ac of _0x1c7f23['focusableElements'])this['_focusTracker']['remove'](_0x4466ac);return this['_viewToAnnotation']['delete'](_0x1c7f23['view']),this['_innerViewToAnnotation']['delete'](_0x1c7f23['innerView']),super['remove'](_0x1c7f23);}['getByInnerView'](_0x167119){return this['_innerViewToAnnotation']['get'](_0x167119);}['getByView'](_0x380572){return this['_viewToAnnotation']['get'](_0x380572);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x32ccd4 of this)_0x32ccd4['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3ff433=Array['from'](this)['sort']((_0xe8356b,_0x14a536)=>w(_0xe8356b['view']['targetRect'],_0x14a536['view']['targetRect']));for(let _0x3c8e86=_0x3ff433['length']-0x1;_0x3c8e86>0x0;_0x3c8e86--){const _0x481f8a=_0x3ff433[_0x3c8e86];_0x3c8e86!==this['getIndex'](_0x481f8a)&&(this['remove'](_0x481f8a),this['add'](_0x481f8a));}}['_getOrderInContent'](_0x3b5e0b){let _0x1a6c79=0x0;if(!_0x3b5e0b)return this['length'];for(const _0x5fbd2d of this){const _0x471a6c=_0x5fbd2d['view']['targetRect'];if(_0x471a6c){if(w(_0x3b5e0b,_0x471a6c)<0x0)return _0x1a6c79;_0x1a6c79++;}}return _0x1a6c79;}}function v({source:_0x8ce9f4,target:_0x1fa31f,filter:_0x14016c}){for(const _0x1e2a0e of _0x8ce9f4)_0x14016c(_0x1e2a0e)&&_0x1fa31f['add'](_0x1e2a0e);_0x1fa31f['listenTo'](_0x8ce9f4,'add',(_0x257bce,_0x53a732)=>{_0x14016c(_0x53a732)&&_0x1fa31f['add'](_0x53a732);}),_0x1fa31f['listenTo'](_0x8ce9f4,'remove',(_0x28baae,_0x3ebf4f)=>{_0x1fa31f['has'](_0x3ebf4f)&&_0x1fa31f['remove'](_0x3ebf4f);});}function w(_0x22c5e0,_0x36aebe){if(null===_0x22c5e0&&null===_0x36aebe)return 0x0;if(null===_0x22c5e0)return-0x1;if(null===_0x36aebe)return 0x1;const _0xc04a82=_0x22c5e0['top']-_0x36aebe['top'];return 0x0==_0xc04a82?_0x22c5e0['left']-_0x36aebe['left']:_0xc04a82;}class y extends _0x80d5c4{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e50a0){if(super(_0x1e50a0),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1e50a0 instanceof _0x128edd){const _0x55bd1c=_0x1e50a0['locale'];_0x1e50a0['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x55bd1c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4f3d0d){this['collection']['add'](_0x4f3d0d);}['remove'](_0x4b3303){this['collection']['remove'](_0x4b3303),_0x4b3303['destroy']();}['refreshVisibility'](){for(const _0xe2b484 of this['collection'])_0xe2b484['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1c6a5e){return this['collection']['getByInnerView'](_0x1c6a5e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4e8cb7 of this['collection'])_0x4e8cb7['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x587531){this['fire']('_activateAnnotation',_0x587531);}['createAnnotation'](_0x4801d8){return new T(_0x4801d8);}['createAnnotationView'](_0x4b7a7d,_0x141a7e){return new E(_0x4b7a7d,_0x141a7e);}['_addActiveAnnotation'](_0x537ce2){const _0x30069f=new Set(this['activeAnnotations']);_0x30069f['add'](_0x537ce2),this['activeAnnotations']=_0x30069f;}['_removeActiveAnnotation'](_0x5d6d5a){const _0x107608=new Set(this['activeAnnotations']);_0x107608['delete'](_0x5d6d5a),this['activeAnnotations']=_0x107608;}['_bindAnnotationsToVisibleAnnotations'](){const _0x123190=this['collection'],_0x29679c=this['_visibleAnnotations'];function _0x2e40e6(_0x248dfd){const _0x448b46=_0x248dfd['source'];_0x448b46['isVisible']&&!_0x29679c['has'](_0x448b46)?_0x29679c['add'](_0x448b46):!_0x448b46['isVisible']&&_0x29679c['has'](_0x448b46)&&_0x29679c['remove'](_0x448b46),_0x448b46['view']['focusTracker']['remove'](_0x448b46['view']['element']),_0x448b46['view']['focusTracker']['add'](_0x448b46['view']['element']);}this['listenTo'](_0x123190,'add',(_0x335a94,_0x3144bd)=>{_0x3144bd['isVisible']&&_0x29679c['add'](_0x3144bd),this['listenTo'](_0x3144bd,'change:isVisible',_0x2e40e6);}),this['listenTo'](_0x123190,'remove',(_0x5a91a7,_0x15d396)=>{_0x29679c['has'](_0x15d396)&&_0x29679c['remove'](_0x15d396),this['stopListening'](_0x15d396,'change:isVisible',_0x2e40e6);});}['_setupEnterAnnotationKeystroke'](){const _0x8e973a=_0xe87b64=>{_0xe87b64['on']('ready',()=>{_0xe87b64['keystrokes']['set'](_0x217e08,(_0x22ebf9,_0x9b4da0)=>{const _0x58fbaf=_0x804c8(this['activeAnnotations']['values']());_0x58fbaf&&(_0x58fbaf['view']['focus'](),_0x9b4da0());});});};this['context']instanceof _0x128edd?_0x8e973a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x38774e,_0x359e9d)=>{_0x8e973a(_0x359e9d);});}['_setupEscapeAnnotationHandling'](){const _0x25a829=_0x4fa5ae=>{const _0xfac939=_0x4fa5ae['source'],_0x2528ae=[];let _0x2c0c1a;if(Array['isArray'](_0xfac939['target'])){_0x2c0c1a=_0xfac939['target'][0x0],this['context']instanceof _0x128edd?_0x2528ae['push'](this['context']):this['context']['editors']&&_0x2528ae['push'](...this['context']['editors']);for(const _0x30f78a of _0x2528ae)for(const _0x4553a6 of _0x30f78a['editing']['view']['domRoots']['values']())if(_0x4553a6['contains'](_0x2c0c1a))return void _0x30f78a['editing']['view']['focus']();_0x2c0c1a['focus']();}};this['listenTo'](this['collection'],'add',(_0x38571d,_0x1731f)=>{this['listenTo'](_0x1731f,'escape',_0x25a829,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4ee905,_0x1db7e6)=>{this['stopListening'](_0x1db7e6,'escape',_0x25a829);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x80d5c4{['_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(_0x34748d){super(_0x34748d),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1c52f1=this['context']['config'];_0x1c52f1['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1c52f1['define']('comments.maxThreadTotalWeight',0x1f4),_0x1c52f1['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1c52f1['define']('comments.CommentThreadView',gt),_0x1c52f1['define']('comments.CommentView',Tt),_0x1c52f1['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x29b616=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x18b56c,_0x114c43)=>this['_addCommentThread'](_0x114c43)),this['on']('submitCommentThread',(_0x25f73a,_0x16664d)=>this['_submitCommentThread'](_0x16664d)),this['on']('resolveCommentThread',(_0x4f8552,_0x323dd6)=>this['_resolveCommentThread'](_0x323dd6)),this['on']('resolveCommentThread',(_0x492160,_0x32e798)=>this['_updateActiveAnnotation'](_0x32e798),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1d9a42,_0x31757b)=>this['_reopenCommentThread'](_0x31757b)),this['on']('reopenCommentThread',(_0x3b5c3f,_0x5b6f10)=>this['_updateActiveAnnotation'](_0x5b6f10),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1ae5b2,_0x21e74d)=>this['_removeCommentThread'](_0x21e74d)),this['on']('updateCommentThread',(_0x24c196,_0x19645f)=>this['_updateCommentThread'](_0x19645f)),this['on']('updateCommentThread',(_0x111d06,_0x4d38d4)=>this['_updateActiveAnnotation'](_0x4d38d4),{'priority':'lowest'}),this['on']('addComment',(_0x1b7d86,_0x2434ae)=>this['_addComment'](_0x2434ae)),this['on']('updateComment',(_0x2f7a28,_0x749785)=>this['_updateComment'](_0x749785)),this['on']('removeComment',(_0x5487ac,_0x5ce862)=>this['_removeComment'](_0x5ce862)),this['on']('addComment',(_0x55f023,{threadId:_0x4a0321,isFromAdapter:_0x56c0a8})=>{if(_0x56c0a8)return;const _0x469bd4=this['getCommentThread'](_0x4a0321),_0x3049e3=_0x469bd4&&this['_threadToController']['get'](_0x469bd4);_0x3049e3&&_0x3049e3['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x29b616,'change:activeAnnotations',(_0x4917d2,_0x963520,_0x135c19)=>{const _0xab2bed=Array['from'](_0x135c19)['map'](_0x954b66=>this['_viewToController']['get'](_0x954b66['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xab2bed?_0xab2bed['model']:null;});}set['adapter'](_0x514631){if(this['_adapter'])throw new _0x47ee64('commentsrepository-adapter-already-set');this['_adapter']=_0x514631;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4356a7=_t,threadId:_0x420f0f=_0x214e59(),comments:_0x11e205=[],unlinkedAt:_0x1efae6=null,resolvedAt:_0x531ea7=null,resolvedBy:_0x22ce5a=null,target:_0x2660b1=null,context:_0x109184=null,attributes:_0x3929d8={},isResolvable:_0x567892=!0x0,isSubmitted:_0x1fe9ef=!0x1,isFromAdapter:_0x572147=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4356a7),{'channelId':_0x4356a7,'threadId':_0x420f0f,'comments':_0x11e205,'unlinkedAt':_0x1efae6,'resolvedAt':_0x531ea7,'resolvedBy':_0x22ce5a,'target':_0x2660b1,'context':_0x109184,'attributes':_0x3929d8,'isFromAdapter':_0x572147,'isResolvable':_0x567892,'isSubmitted':_0x1fe9ef}),this['getCommentThread'](_0x420f0f);}['openNewCommentThread']({channelId:_0x1268e4=_t,threadId:_0x4cd5e5=_0x214e59(),target:_0x37d3b9,context:_0x17c55e=null,isResolvable:_0x168bc0=!0x0}){if(this['_readOnlyChannels']['has'](_0x1268e4)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x37d3b9)throw new _0x47ee64('commentsrepository-missing-target');const _0x162d52=this['addCommentThread']({'channelId':_0x1268e4,'threadId':_0x4cd5e5,'target':_0x37d3b9,'context':_0x17c55e,'isResolvable':_0x168bc0});if(!_0x162d52)return null;const _0x42ce55=this['_threadToController']['get'](_0x162d52),_0x30fa2c=_0x42ce55['view']['commentThreadInputView']['commentInputView'],_0x516301=this['context']['plugins']['get'](y),_0x1cb9c8=_0x516301['getByInnerView'](_0x42ce55['view']);return _0x516301['activate'](_0x1cb9c8),_0x30fa2c['once']('editorReady',()=>_0x30fa2c['focus']()),_0x162d52;}['hasCommentThread'](_0x1fcbe4){if('string'!=typeof _0x1fcbe4)throw new _0x47ee64('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1fcbe4);}['updateCommentThread']({channelId:_0x41a9f8=_t,threadId:_0x2b6138,context:_0x57c3c1,unlinkedAt:_0x220a93,attributes:_0x8d45cc,isFromAdapter:_0x52dae6=!0x1}){return this['fire'](Nt('updateCommentThread',_0x41a9f8),{'channelId':_0x41a9f8,'threadId':_0x2b6138,'context':_0x57c3c1,'unlinkedAt':_0x220a93,'attributes':_0x8d45cc,'isFromAdapter':_0x52dae6}),this['getCommentThread'](_0x2b6138);}['getCommentThread'](_0x470261){if('string'!=typeof _0x470261)throw new _0x47ee64('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x470261);}['fetchCommentThread']({channelId:_0x4957ea,threadId:_0x412c06}={}){const _0x4c6c3d=this['getCommentThread'](_0x412c06);if(_0x4c6c3d)return Promise['resolve'](_0x4c6c3d);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x47ee64('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4957ea,'threadId':_0x412c06})['then'](_0x4ddbb0=>this['hasCommentThread'](_0x412c06)?this['getCommentThread'](_0x412c06):_0x4ddbb0?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4957ea},_0x4ddbb0)):void 0x0)['catch'](_0x3ce84f=>{throw console['error'](_0x3ce84f),new _0x47ee64('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1f347c,skipNotAttached:_0x3c6807=!0x1,skipEmpty:_0x2f1d28=!0x1,toJSON:_0x4edc72=!0x1}={}){const _0x1a2b89=[];for(const _0x2da0b9 of this['_threads']['values']())_0x1f347c&&_0x2da0b9['channelId']!==_0x1f347c||_0x3c6807&&!_0x2da0b9['isAttached']||_0x2f1d28&&0x0===_0x2da0b9['length']||_0x1a2b89['push'](_0x2da0b9);return _0x4edc72?_0x1a2b89['map'](_0xd08f3a=>_0xd08f3a['toJSON']()):_0x1a2b89;}['getAnnotationForCommentThread'](_0x316a74){const _0x2b16d4=this['_threadToController']['get'](_0x316a74);if(!_0x2b16d4)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2b16d4['view'])||null;}['getCommentThreadForAnnotation'](_0x34e8f0){const _0x41032e=this['_viewToController']['get'](_0x34e8f0['innerView']);return _0x41032e?_0x41032e['model']:null;}['setActiveCommentThread'](_0x21c57e){const _0x445f6d=this['context']['plugins']['get'](y);if(!_0x21c57e)return void(this['activeCommentThread']&&_0x445f6d['deactivateAll']());const _0x3c07e4=this['getCommentThread'](_0x21c57e);if(!_0x3c07e4)throw new _0x47ee64('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x21c57e});if(!this['_threadToController']['has'](_0x3c07e4))throw new _0x47ee64('commentsrepository-active-not-attached',null,{'threadId':_0x21c57e});const _0x2d9e40=_0x445f6d['getByInnerView'](this['_threadToController']['get'](_0x3c07e4)['view']);_0x445f6d['activate'](_0x2d9e40);}['switchReadOnly'](_0x4620ae,_0x4f3904){_0x4620ae?this['_readOnlyChannels']['add'](_0x4f3904):this['_readOnlyChannels']['delete'](_0x4f3904),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x134450){return this['_readOnlyChannels']['has'](_0x134450)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x37f295,_0x3af4d1){return new vt(_0x37f295,_0x3af4d1);}['setPermissions'](_0x51a992,_0x5eb959=_t){this['_permissions']['set'](_0x5eb959,_0x51a992),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x126549=_t){return this['_permissions']['has'](_0x126549)?this['_permissions']['get'](_0x126549):bt;}['_addCommentThread']({channelId:_0x14ef46,threadId:_0x145daa,comments:_0x4126d5,unlinkedAt:_0x2fbe60,resolvedAt:_0x1261d5,resolvedBy:_0x54e219,target:_0x51fafe,context:_0x269158,attributes:_0x4ff9f0,isFromAdapter:_0x2af8b3,isResolvable:_0x389584,isSubmitted:_0x2582de}){if('string'!=typeof _0x145daa)throw new _0x47ee64('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x145daa});if(this['hasCommentThread'](_0x145daa))throw new _0x47ee64('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x145daa});const _0x26194e=new pi(this,{'channelId':_0x14ef46,'id':_0x145daa,'context':_0x269158,'attributes':_0x4ff9f0,'unlinkedAt':_0x2fbe60,'resolvedAt':_0x1261d5,'resolvedBy':_0x54e219?this['context']['plugins']['get'](it)['getUser'](_0x54e219):null,'isResolvable':_0x389584,'isSubmitted':_0x2582de||_0x2af8b3});this['_threads']['set'](_0x145daa,_0x26194e);for(const _0x81fe88 of _0x4126d5)_0x26194e['_add'](this['_createNewComment']({'threadId':_0x145daa,..._0x81fe88}));return _0x51fafe&&_0x26194e['attachTo'](_0x51fafe),_0x2af8b3||!_0x26194e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x14ef46,'threadId':_0x145daa});}['_submitCommentThread']({channelId:_0x5594fb,threadId:_0x2da8fa}){if(!this['hasCommentThread'](_0x2da8fa))throw new _0x47ee64('commentsrepository-missing-comment-thread',this);const _0xcaa227=this['getCommentThread'](_0x2da8fa);if(_0xcaa227['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x1d6987,comments:_0x51c8f4,resolvedAt:_0xaee91e,resolvedBy:_0x1c3cfd,context:_0x18a7e6,attributes:_0x349acc}=_0xcaa227,_0x5bc944=this['context']['plugins']['get']('PendingActions'),_0x1e050d=_0x5bc944['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5594fb,'threadId':_0x1d6987,'comments':_0x51c8f4['map'](_0x57f616=>_0x57f616['toJSON']()),'resolvedAt':_0xaee91e,'resolvedBy':_0x1c3cfd?_0x1c3cfd['id']:_0x1c3cfd,'context':_0x18a7e6,'attributes':_0x349acc})['then'](({comments:_0x31b211})=>{_0x5bc944['remove'](_0x1e050d);for(const _0x209043 of _0x31b211)this['_updateComment']({'channelId':_0x5594fb,'threadId':_0x2da8fa,'commentId':_0x209043['commentId'],'createdAt':_0x209043['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x54d21f=>{throw console['error'](_0x54d21f),new _0x47ee64('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x535387,target:_0x1757a0}){const _0x4a16a1=this['getCommentThread'](_0x535387);if(!_0x4a16a1)throw new _0x47ee64('commentsrepository-attach-missing-comment-thread',this);const _0x5f442d=this['context']['plugins']['get']('PendingActions'),_0x374f20=this['context']['plugins']['get'](y),_0x15fb47=this['_createCommentThreadView'](_0x4a16a1),_0x113975=new vt(_0x4a16a1,_0x15fb47);let _0x1f2d37=null;_0x15fb47['on']('change:isDirty',(_0x101383,_0x559cac,_0x13228e)=>{_0x13228e?_0x1f2d37=_0x5f442d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1f2d37&&(_0x5f442d['remove'](_0x1f2d37),_0x1f2d37=null);}),this['_threadToController']['set'](_0x4a16a1,_0x113975),this['_viewToController']['set'](_0x15fb47,_0x113975);const _0x32bc91=new E(this['context']['locale'],_0x15fb47);_0x32bc91['bind']('length')['to'](_0x15fb47),_0x32bc91['bind']('isDirty')['to'](_0x15fb47,'isDirty',_0x15fb47,'length',(_0x154cd3,_0x2b9129)=>_0x154cd3||!_0x2b9129),_0x32bc91['bind']('isActive')['to'](_0x15fb47),_0x32bc91['type']='comment';const _0x226335=new T({'view':_0x32bc91,'target':_0x1757a0,'type':'comment','isVisible':!_0x4a16a1['archivedAt']&&!!('function'==typeof _0x1757a0?_0x1757a0():_0x1757a0)});return _0x15fb47['on']('escape',()=>{_0x226335['fire']('escape');}),this['_bindAnnotationToEditors'](_0x15fb47,_0x226335),_0x374f20['add'](_0x226335),_0x226335;}['_bindAnnotationToEditors'](_0xf257,_0x1cc332){this['listenTo'](_0xf257,'editorReady',(_0xf1900d,_0x155a8f)=>{const _0x475b51=_0x155a8f['ui']['view']['body']['bodyCollectionContainer'];_0x1cc332['focusableElements']['add'](_0x475b51),this['context']instanceof _0x128edd&&this['context']['ui']['focusTracker']['add'](_0x475b51);},{'priority':'highest'}),this['listenTo'](_0xf257,'editorDestroyed',(_0x5d7f21,_0x42d5b7)=>{const _0x376eec=_0x42d5b7['ui']['view']['body']['bodyCollectionContainer'];_0x1cc332['focusableElements']['has'](_0x376eec)&&_0x1cc332['focusableElements']['remove'](_0x376eec),this['context']instanceof _0x128edd&&this['context']['ui']['focusTracker']['remove'](_0x376eec);});}['_unbindEditors'](_0x4ceaf7){this['stopListening'](_0x4ceaf7,'editorReady'),this['stopListening'](_0x4ceaf7,'editorDestroyed');}['_createCommentThreadView'](_0x323875){const _0x133cd1=this['context']['plugins']['get'](it),{config:_0x1602ea,locale:_0x5e084c}=this['context'],_0x6af9d6=pt(_0x1602ea['get']('locale'),_0x5e084c);return new(0x0,(_0x1602ea['get']('comments'))['CommentThreadView'])(_0x5e084c,_0x323875,_0x133cd1['me'],{'editorConfig':{..._0x1602ea['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1602ea['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1602ea['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1602ea['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1602ea['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x6af9d6,'CommentView':_0x1602ea['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28bcf4,channelId:_0x9a99ac,resolvedAt:_0x391621,resolvedBy:_0x19f334,isFromAdapter:_0x173ca1}){if(!this['hasCommentThread'](_0x28bcf4))throw new _0x47ee64('commentsrepository-missing-comment-thread',null,{'threadId':_0x28bcf4});const _0x46acc3=this['getCommentThread'](_0x28bcf4);if(_0x46acc3['isResolved'])throw new _0x47ee64('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28bcf4});const _0x117529=this['context']['plugins']['get'](it);if(_0x46acc3['resolvedBy']=_0x117529['getUser'](_0x19f334),_0x46acc3['resolvedAt']=_0x391621,_0x173ca1||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2c31a8=this['context']['plugins']['get']('PendingActions'),_0x235b57=_0x2c31a8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x9a99ac,'threadId':_0x28bcf4})['then'](({resolvedAt:_0xbf273,resolvedBy:_0x417a4d})=>{_0x2c31a8['remove'](_0x235b57),_0x46acc3['resolvedBy']['id']!==_0x417a4d&&(_0x46acc3['resolvedBy']=_0x117529['getUser'](_0x417a4d)),_0x46acc3['resolvedAt']=_0xbf273;})['catch'](_0x5252b2=>{throw console['error'](_0x5252b2),new _0x47ee64('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3556b1,channelId:_0x187e8f,isFromAdapter:_0x10fa62}){if(!this['hasCommentThread'](_0x3556b1))throw new _0x47ee64('commentsrepository-missing-comment-thread',null,{'threadId':_0x3556b1});const _0xbf2faa=this['getCommentThread'](_0x3556b1);if(!_0xbf2faa['isResolved'])throw new _0x47ee64('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3556b1});if(_0xbf2faa['resolvedBy']=null,_0xbf2faa['resolvedAt']=null,_0x10fa62||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x293318=this['context']['plugins']['get']('PendingActions'),_0x223454=_0x293318['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x187e8f,'threadId':_0x3556b1})['then'](()=>_0x293318['remove'](_0x223454))['catch'](_0x2f1dbc=>{throw console['error'](_0x2f1dbc),new _0x47ee64('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2eae7a,isFromAdapter:_0x10f26e}){const _0x303917=this['getCommentThread'](_0x2eae7a);if(!_0x303917)throw new _0x47ee64('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2eae7a),this['_threads']['delete'](_0x2eae7a),!_0x303917['isSubmitted']||_0x10f26e||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x42d8b3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1de91c}=_0x303917,_0x216db3=_0x42d8b3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1de91c,'threadId':_0x2eae7a})['then'](()=>_0x42d8b3['remove'](_0x216db3))['catch'](_0x3afcb3=>{throw console['error'](_0x3afcb3),new _0x47ee64('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x215b7b,unlinkedAt:_0x380f36,context:_0x44c504,attributes:_0x2e8a71,isFromAdapter:_0x53943c}){if('string'!=typeof _0x215b7b)throw new _0x47ee64('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x215b7b});if(!this['hasCommentThread'](_0x215b7b))throw new _0x47ee64('commentsrepository-missing-comment-thread',null,{'threadId':_0x215b7b});const _0x4e9c61=this['getCommentThread'](_0x215b7b);let _0x5c1ee3=!0x1;if(void 0x0!==_0x44c504&&_0x4e9c61['context']!==_0x44c504&&(_0x4e9c61['context']=_0x44c504,_0x5c1ee3=!0x0),void 0x0!==_0x380f36&&_0x4e9c61['unlinkedAt']!==_0x380f36&&(_0x4e9c61['unlinkedAt']=_0x380f36,_0x5c1ee3=!0x0),_0x2e8a71&&!At(_0x2e8a71,_0x4e9c61['attributes'])&&(_0x4e9c61['attributes']=_0x2e8a71,_0x5c1ee3=!0x0),!_0x5c1ee3)return Promise['resolve']();if(!_0x4e9c61['isSubmitted']||_0x53943c||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3c7b68=this['context']['plugins']['get']('PendingActions'),{channelId:_0x26e2e0}=_0x4e9c61,_0x964376=_0x3c7b68['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x26e2e0,'threadId':_0x215b7b,'context':_0x44c504,'unlinkedAt':_0x380f36,'attributes':_0x2e8a71})['then'](()=>_0x3c7b68['remove'](_0x964376))['catch'](_0x96f5fa=>{throw console['error'](_0x96f5fa),new _0x47ee64('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x330633){const _0x209e48=this['context']['plugins']['get'](y),_0xc00ae4=this['getCommentThread'](_0x330633);if(_0xc00ae4['_isAttached']=!0x1,this['_threadToController']['has'](_0xc00ae4)){const _0x18dba7=this['_threadToController']['get'](_0xc00ae4),_0x49d61a=_0x18dba7['view'],_0x56cedc=_0x209e48['getByInnerView'](_0x49d61a);this['_threadToController']['delete'](_0xc00ae4),this['_viewToController']['delete'](_0x49d61a),_0x56cedc&&_0x209e48['remove'](_0x56cedc),_0x18dba7['destroy'](),_0x49d61a['destroy']()['then'](()=>{this['_unbindEditors'](_0x49d61a);});}}['_updateActiveAnnotation']({threadId:_0x1db991,resolvedAt:_0x60f7de,unlinkedAt:_0x36f1b7}){const _0x4d68fd=!!_0x60f7de,_0x57b0f1=this['context']['plugins']['get'](y),_0x39bcd3=this['getCommentThread'](_0x1db991);if(this['_threadToController']['has'](_0x39bcd3)){const _0x348c53=this['_threadToController']['get'](_0x39bcd3)['view'],_0x1f17d7=_0x57b0f1['getByInnerView'](_0x348c53);_0x1f17d7&&(_0x4d68fd&&_0x57b0f1['_removeActiveAnnotation'](_0x1f17d7),_0x36f1b7?_0x1f17d7['isVisible']=!0x1:_0x1f17d7['refreshVisibility']());}}['_getExternalAuthor'](_0x277912){const _0x1f4fa8=this['context']['plugins']['get'](it),_0x447641=It('external:'+_0x277912),_0x5e46fc=_0x1f4fa8['getUser'](_0x447641);return _0x5e46fc||_0x1f4fa8['addUser']({'id':_0x447641,'name':_0x277912});}['_createNewComment']({threadId:_0x56de18,commentId:_0x50d808=_0x214e59(),content:_0xb1298a,authorId:_0x4010fb,createdAt:_0x196439,attributes:_0x358e57}){if('string'!=typeof _0x50d808)throw new _0x47ee64('commentsrepository-invalid-commentid');if('string'!=typeof _0x4010fb)throw new _0x47ee64('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xb1298a||!_0xb1298a['trim']())throw new _0x47ee64('commentsrepository-invalid-comment-content');const _0xc9d6fa=this['context']['plugins']['get'](it)['getUser'](_0x4010fb);if(!_0xc9d6fa)throw new _0x47ee64('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4010fb});let _0x335c6b=null,_0xdf2a08=_0x196439;return _0x358e57?.['@external']&&(_0x335c6b=this['_getExternalAuthor'](_0x358e57['@external']['authorName']),_0xdf2a08=new Date(_0x358e57['@external']['createdAt'])),new wi(this,{'threadId':_0x56de18,'id':_0x50d808,'author':_0x335c6b||_0xc9d6fa,'creator':_0xc9d6fa,'content':_0xb1298a,'createdAt':_0x196439,'authoredAt':_0xdf2a08,'attributes':_0x358e57});}['_addComment'](_0x579a65){let {threadId:_0x4992e2,content:_0x8a2a20,attributes:_0x13c1c0,isFromAdapter:_0x2ad035}=_0x579a65;const _0xe7e811=this['getCommentThread'](_0x579a65['threadId']);if(!_0xe7e811)throw new _0x47ee64('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xe0414b=this['_createNewComment'](_0x579a65),{id:_0x36fbd2}=_0xe0414b;if(_0xe7e811['_add'](_0xe0414b),_0x2ad035||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xe7e811['isSubmitted'])return Promise['resolve']();const _0x2e0708=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5a87fa}=_0xe7e811,_0x466375=_0x2e0708['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x13c1c0||(_0x13c1c0={}),this['adapter']['addComment']({'channelId':_0x5a87fa,'threadId':_0x4992e2,'commentId':_0x36fbd2,'content':_0x8a2a20,'attributes':_0x13c1c0})['then'](_0x4e4528=>{_0x2e0708['remove'](_0x466375),_0x4e4528&&this['_updateComment']({'channelId':_0x5a87fa,'threadId':_0x4992e2,'commentId':_0x36fbd2,'createdAt':_0x4e4528['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x26dea0=>{throw console['error'](_0x26dea0),new _0x47ee64('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x40094d,commentId:_0x4cca36,content:_0x62a40b,createdAt:_0x50de94,attributes:_0x1ee6cf,isFromAdapter:_0x182338}){if(void 0x0!==_0x62a40b&&('string'!=typeof _0x62a40b||!_0x62a40b['trim']()['length']))throw new _0x47ee64('commentsrepository-update-comment-invalid-content');const _0x10fc8a=this['getCommentThread'](_0x40094d),_0x4039ca=_0x10fc8a['getComment'](_0x4cca36);if(!_0x4039ca)throw new _0x47ee64('commentsrepository-update-missing-comment',this);let _0x320d10=!0x1;if(_0x62a40b&&_0x62a40b!==_0x4039ca['content']&&(_0x4039ca['isEditable']||_0x182338)&&(_0x4039ca['content']=_0x62a40b,_0x320d10=!0x0),_0x50de94&&_0x50de94!==_0x4039ca['createdAt']&&(_0x4039ca['createdAt']=_0x50de94,_0x4039ca['attributes']&&_0x4039ca['attributes']['@external']||(_0x4039ca['authoredAt']=_0x50de94),_0x320d10=!0x0),_0x1ee6cf&&!At(_0x1ee6cf,_0x4039ca['attributes'])&&(_0x4039ca['attributes']=_0x1ee6cf,_0x320d10=!0x0),!_0x320d10)return Promise['resolve']();if(_0x10fc8a['fire']('commentUpdated'),_0x182338||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5e06a7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3275f2}=this['getCommentThread'](_0x4039ca['threadId']),_0x4d07db=_0x5e06a7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3275f2,'threadId':_0x40094d,'commentId':_0x4cca36,'content':_0x62a40b,'attributes':_0x1ee6cf})['then'](()=>_0x5e06a7['remove'](_0x4d07db))['catch'](_0x930f45=>{throw console['error'](_0x930f45),new _0x47ee64('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1b4976,commentId:_0x5739d9,isFromAdapter:_0xe10555}){const _0x343480=this['getCommentThread'](_0x1b4976),_0x5c8604=_0x343480['getComment'](_0x5739d9);if(!_0x5c8604)throw new _0x47ee64('commentsrepository-remove-missing-comment',this);if(_0x343480['_remove'](_0x5c8604),_0xe10555||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x80996d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x53c0cd}=_0x343480,_0x35a78a=_0x80996d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x53c0cd,'threadId':_0x1b4976,'commentId':_0x5739d9})['then'](()=>_0x80996d['remove'](_0x35a78a))['catch'](_0x1d9857=>{throw console['error'](_0x1d9857),new _0x47ee64('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3b7d3e(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3be1c3,_0x5024d9){super();const _0x549539=_0x3be1c3['context']['plugins']['get'](it)['me'],_0x56da46=_0x3be1c3['getCommentThread'](_0x5024d9['threadId']),_0x1cf6c3=0x0===_0x56da46['comments']['length'],_0xbfbfe6=_0x549539===_0x5024d9['author'];this['id']=_0x5024d9['id'],this['threadId']=_0x5024d9['threadId'],this['author']=_0x5024d9['author'],this['creator']=_0x5024d9['creator'],this['isExternal']=Boolean(_0x5024d9['attributes']&&_0x5024d9['attributes']['@external']),this['set']('content',_0x5024d9['content']),this['createdAt']=_0x5024d9['createdAt']||new Date(),this['set']('authoredAt',_0x5024d9['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x56da46,'resolvedAt'),this['set']('attributes',_0x5024d9['attributes']||{}),this['bind']('isEditable')['to'](_0x3be1c3,'_permissions',()=>{const _0x30574f=_0x3be1c3['getPermissions'](_0x56da46['channelId'])['write'],_0x190a51=_0x3be1c3['getPermissions'](_0x56da46['channelId'])['modifyAll'];return _0xbfbfe6&&_0x30574f||!_0xbfbfe6&&_0x190a51;}),this['bind']('isRemovable')['to'](_0x56da46,'isRemovable',_0x3be1c3,'_permissions',_0x590cea=>{const _0x4254c3=_0x3be1c3['getPermissions'](_0x56da46['channelId'])['write'],_0x16a879=_0x3be1c3['getPermissions'](_0x56da46['channelId'])['modifyAll'];return _0xbfbfe6&&_0x4254c3||_0x590cea&&_0x1cf6c3||!_0xbfbfe6&&_0x16a879&&!_0x1cf6c3;}),this['bind']('isReadOnly')['to'](_0x56da46,'isReadOnly'),this['_repository']=_0x3be1c3;}get['weight'](){return Math['max'](function(_0x155633){const _0xa7093a=document['createElement']('div');return _0xa7093a['innerHTML']=_0x155633,_0xa7093a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x382632){const {threadId:_0x38caf0,id:_0x2b49b3}=this;if(!this['_repository']['hasCommentThread'](_0x38caf0))throw new _0x47ee64('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x546236}=this['_repository']['getCommentThread'](_0x38caf0);this['_repository']['fire'](Nt('updateComment',_0x546236,_0x38caf0),{'channelId':_0x546236,'threadId':_0x38caf0,'commentId':_0x2b49b3,..._0x382632});}['setAttribute'](_0x3ac7ab,_0x2bafa9){const _0x26850a=wt(this['attributes']);yt(_0x26850a,_0x3ac7ab,_0x2bafa9),this['update']({'attributes':_0x26850a});}['removeAttribute'](_0x2d1150){const _0x358226=wt(this['attributes']);Ct(_0x358226,_0x2d1150),this['update']({'attributes':_0x358226});}['remove'](_0xcfe980={}){if(!_0xcfe980['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x425bc2,id:_0x2fc725}=this;if(!this['_repository']['hasCommentThread'](_0x425bc2))throw new _0x47ee64('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x14b41c}=this['_repository']['getCommentThread'](_0x425bc2);this['_repository']['fire'](Nt('removeComment',_0x14b41c,_0x425bc2),{'channelId':_0x14b41c,'threadId':_0x425bc2,'commentId':_0x2fc725,..._0xcfe980});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x122ad2,..._0x4623bf){for(const _0x356ec6 of _0x4623bf)void 0x0!==_0x356ec6&&(_0x122ad2+=':'+String(_0x356ec6));return _0x122ad2;}class ot extends _0x579a2a{constructor(_0x1eff04){super(_0x1eff04),this['set']('hasContent',!0x1);}['refresh'](){const _0x53e842=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x37f309 of _0x53e842['getRanges']())if(this['_hasContent'](_0x37f309))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3a57dd=_0x214e59(),ranges:_0x193d1c,comment:_0x114e1a}={}){const _0x400392=this['editor']['model'],_0x963783=_0x193d1c??Array['from'](_0x400392['document']['selection']['getRanges']()),_0x1eeb73=[];for(const _0x4312e1 of _0x963783)this['_hasContent'](_0x4312e1)&&_0x1eeb73['push'](this['_trimToContent'](_0x4312e1));if(!_0x1eeb73['length'])throw new _0x47ee64('addcommentthreadcommand-incorrect-ranges',null);_0x114e1a&&this['_createCommentThread'](_0x3a57dd,_0x114e1a),this['_createMarkersFromRanges'](_0x3a57dd,_0x1eeb73,!!_0x114e1a);}['_createMarkersFromRanges'](_0x420229,_0x5188cc,_0x244b57){this['editor']['model']['change'](_0x4e3c82=>{for(const _0x50baee of _0x5188cc){const _0x83baf5=_0x214e59()['substr'](0x1,0x5),_0x39aa92='comment:'+_0x420229+':'+_0x83baf5;_0x4e3c82['addMarker'](_0x39aa92,{'range':_0x50baee,'usingOperation':_0x244b57,'affectsData':_0x244b57});}});}['_createCommentThread'](_0x3e93d9,_0x2627be){const _0x4fc4a0=this['editor']['plugins']['get']('CommentsRepository'),_0x3d6327=this['editor']['config']['get']('collaboration.channelId'),_0x54aa55=this['editor']['plugins']['get']('Users')['me'];if(!_0x54aa55)throw new _0x47ee64('addcommentthreadcommand-user-not-found',null);_0x4fc4a0['addCommentThread']({'threadId':_0x3e93d9,'channelId':_0x3d6327,'comments':[{'authorId':_0x54aa55['id'],'content':_0x2627be,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x25295){for(const _0x29339d of _0x25295['getItems']())if(this['_itemIsContent'](_0x29339d))return!0x0;return!0x1;}['_itemIsContent'](_0x47ea49){return _0x47ea49['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x47ea49)&&!_0x47ea49['is']('element','tableCell');}['_trimToContent'](_0x1a0089){const _0x5f493d=_0x511249=>!this['_itemIsContent'](_0x511249['item']),_0x1d59f7=_0x1a0089['start']['getLastMatchingPosition'](_0x5f493d),_0x14fdd1=_0x1a0089['end']['getLastMatchingPosition'](_0x5f493d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1d59f7,_0x14fdd1);}}class b extends _0x226390{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e9fd6){super(_0x4e9fd6),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2e70d9=this['editor'],_0x17dc61=_0x2e70d9['model']['document']['selection'],_0x44908b=_0x241c19(()=>this['refreshSelectedViews'](),0xa);_0x17dc61['on']('change:range',(_0x54d4ed,_0x4f854b)=>{_0x4f854b['directChange']&&(_0x44908b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2e70d9['editing']['view']['document'],'change:isFocused',(_0x2b72ee,_0x5649e2,_0x105859)=>{_0x105859&&_0x44908b();}),this['listenTo'](_0x2e70d9['ui']['focusTracker'],'change:isFocused',(_0x28ef2f,_0x23c51e,_0x520069)=>{_0x520069||this['fire']('blur',{'isAnnotationTracked':_0xc78ba1=>this['_editorAnnotationsData']['has'](_0xc78ba1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0xf2baa9){if(this['_editorAnnotations']['has'](_0xf2baa9['view']))return;this['_editorAnnotations']['add'](_0xf2baa9['view']),this['editor']['ui']['focusTracker']['add'](_0xf2baa9['view']['element']);const _0x4e0e18=this['editor']['plugins']['get'](y);this['listenTo'](_0x4e0e18['collection'],'remove',(_0x5cd343,_0x4464e9)=>{this['editor']['ui']['focusTracker']['remove'](_0x4464e9['view']['element']),this['_editorAnnotations']['delete'](_0x4464e9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x39aee4){if('function'!=typeof _0x39aee4)throw new _0x47ee64('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x39aee4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3f2215,annotations:_0x47f575}){const _0x3512fc=[],_0x144037=this['editor']['model']['document']['selection'],_0x104f26=Array['from'](_0x144037['getRanges']());for(const [_0x2f32ed,_0x2fc98f]of this['_editorAnnotationsData']){const _0x82024e=_0x54e5d2(_0x2fc98f),_0x44322a=_0x47f575['getByInnerView'](_0x2f32ed);_0x82024e&&_0x44322a&&_0x3512fc['push']({'annotation':_0x44322a,'range':_0x82024e});}function _0x54e5d2(_0x449713){for(const _0x385ac1 of _0x449713)for(const _0x4bb574 of _0x104f26)if(_0x385ac1['containsRange'](_0x4bb574,!_0x144037['isCollapsed']))return _0x385ac1;return null;}return _0x3512fc['sort']((_0x24e36e,_0x1e0816)=>{const _0x3aad1b=_0x24e36e['range'],_0x18bff1=_0x1e0816['range'];if(!_0x3aad1b['isEqual'](_0x18bff1)){if(_0x3aad1b['containsRange'](_0x18bff1,!0x0))return 0x1;if(_0x18bff1['containsRange'](_0x3aad1b,!0x0))return-0x1;}return _0x24e36e['annotation']==_0x3f2215?-0x1:_0x1e0816['annotation']==_0x3f2215?0x1:0x0;})['map'](_0xff3e81=>_0xff3e81['annotation']);}get['_editorAnnotationsData'](){const _0x3937b2=new Map();for(const _0x3a2c43 of Array['from'](this['_dataCollectors']))for(const [_0x9209a4,_0x36139a]of _0x3a2c43())_0x3937b2['set'](_0x9209a4,_0x36139a);return _0x3937b2;}}class st extends _0x226390{['afterInit'](){const _0x35c93e=this['editor'];if(!_0x35c93e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x35c93e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x226390{constructor(_0x344806){super(_0x344806),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4634d5=this['editor'],_0x42b891=_0x4634d5['commands']['get']('importWord'),_0xccfd58=_0x4634d5['plugins']['get'](it);_0x42b891&&(_0x42b891['on']('execute',(_0x4886bb,[,_0x4aea52])=>{_0x4aea52['collaboration_features']={'comments':!0x0,'user_id':_0xccfd58['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x42b891,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x191c32,_0x25f4e2){const {comment_threads:_0x4e2095}=_0x25f4e2;_0x4e2095&&_0x4e2095['forEach'](({thread_id:_0x3c4c01,comments:_0x53819d,is_resolved:_0x2209f1})=>{const _0x147187=new Date(),_0xd9936d=_0x53819d['map'](({author:_0x248f93,content:_0xcfac06,created_at:_0x35b31f})=>({'content':_0xcfac06,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x147187,'attributes':{'@external':{'authorName':_0x248f93,'createdAt':_0x35b31f?new Date(_0x35b31f):new Date(),'source':'importWord'}}})),_0x1c9e4f=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1c9e4f,'threadId':_0x3c4c01,'comments':_0xd9936d,'resolvedAt':_0x2209f1?_0x147187:null});});}}class at extends _0x226390{constructor(_0x188f5b){super(_0x188f5b),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x3ca07a=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x3ca07a,'contentInsertion',(_0x10cba9,_0x1977cb)=>this['_removeMarkersWithoutThreads'](_0x1977cb['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3e3f66){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3e3f66;const _0x3b4c5f=this['editor']['plugins']['get']('CommentsRepository');for(const _0x349e06 of _0x3e3f66['keys']()){const [_0x3ff627,_0x120b9c]=_0x349e06['split'](':');'comment'!=_0x3ff627||_0x3b4c5f['hasCommentThread'](_0x120b9c)||_0x3e3f66['delete'](_0x349e06);}return _0x3e3f66;}['_registerMarkerInClipboardPipeline'](){const _0xbdb3b5=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x390c5b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x390c5b&&_0xbdb3b5['_registerMarkerToCopy']('comment',_0x390c5b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x111ae0){switch(_0x111ae0){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x28dbc4){const _0x55e365=_0x28dbc4['split'](':');return{'group':_0x55e365[0x0],'id':_0x55e365[0x1],'part':_0x55e365[0x2]};}class ut extends _0x226390{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3e4d43,_0x22285e)=>{if(!_0x22285e['options']['showCommentHighlights'])return null;if(_0x22285e['options']['ignoreResolvedComments']){const {id:_0x18553e}=ft(_0x3e4d43['markerName']),_0x2c83cc=this['editor']['plugins']['get'](o);if(_0x2c83cc['getCommentThread'](_0x18553e)?.['isResolved']&&_0x3e4d43['item'])return _0x22285e['consumable']['consume'](_0x3e4d43['item'],'addMarker:'+_0x3e4d43['markerName']),_0x22285e['consumable']['consume'](_0x3e4d43['item'],'removeMarker:'+_0x3e4d43['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x355e86=>{_0x355e86['on']('addMarker:comment',(_0x5e6514,_0x26f2c4,_0x572830)=>{if(!_0x572830['options']['showCommentHighlights'])return;const _0x298ffb=_0x26f2c4['item'];if(!_0x298ffb)return;const _0x2192b5=_0x572830['mapper']['toViewElement'](_0x298ffb);this['editor']['model']['schema']['isObject'](_0x298ffb)&&_0x2192b5&&!_0x2192b5['getCustomProperty']('widget')&&_0x2192b5['is']('containerElement')&&_0x2ab450(_0x2192b5,_0x572830['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x414a18,{writer:_0x206782,options:_0x2b0d96})=>{if(!_0x2b0d96['showCommentHighlights'])return null;const _0x52a7c1=_0x206782['createContainerElement']('div'),_0x41cb7f=_0x206782['createEmptyElement']('hr');return _0x206782['addClass']('ck-horizontal-line',_0x52a7c1),_0x206782['insert'](_0x206782['createPositionAt'](_0x52a7c1,0x0),_0x41cb7f),_0x52a7c1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1a41d2,{writer:_0x4bd68d,options:_0x1459e6})=>{if(!_0x1459e6['showCommentHighlights'])return null;const _0x3b6ac9=_0x4bd68d['createContainerElement']('span'),_0x18ee19=_0x4bd68d['createEmptyElement']('img');return _0x4bd68d['addClass']('image-inline',_0x3b6ac9),_0x4bd68d['insert'](_0x4bd68d['createPositionAt'](_0x3b6ac9,0x0),_0x18ee19),_0x3b6ac9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x44e32e,{writer:_0x418645,options:_0x3c3dc2})=>{if(_0x3c3dc2['showCommentHighlights'])return _0x418645['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x485c4b,_0xe64cb6,_0xe6bfad)=>{_0xe6bfad['options']['showCommentHighlights']&&_0x485c4b['stop']();},{'priority':'high'});}}class r extends _0x226390{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(_0x5d5261){super(_0x5d5261),this['set']('isThreadsLoadingPaused',!0x0),_0x5d5261['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5ae2a3,_0x3013aa,_0x104b4d,_0x5a43b6)=>{const _0x19eb1c=_0x5d5261['plugins']['get'](o),_0x442381=_0x104b4d?ft(_0x104b4d)['id']:null;_0x5d5261['model']['change'](()=>{if(_0x442381){const _0x2abddd=this['getAllMarkersForId'](_0x442381);for(const _0x3e29d0 of _0x2abddd)_0x5d5261['editing']['reconvertMarker'](_0x3e29d0);}if(_0x5a43b6){const {id:_0x1867ff}=ft(_0x5a43b6),_0x4cf3ca=_0x19eb1c['getCommentThread'](_0x1867ff);if(_0x4cf3ca&&_0x4cf3ca['unlinkedAt'])return;if(_0x4cf3ca&&!_0x4cf3ca['isAttached'])return;const _0x55a854=this['getAllMarkersForId'](_0x1867ff);for(const _0x17dcaa of _0x55a854)_0x5d5261['editing']['reconvertMarker'](_0x17dcaa);}}),_0x442381&&this['scrollToThreadMarker'](_0x442381);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x48eb04=this['editor'],_0x3c5ef6=_0x48eb04['plugins']['get'](o),_0x4aa199=_0x48eb04['config']['get']('collaboration.channelId'),_0x43c5b6=_0x3c5ef6['getCommentThreads']()['filter'](_0x256733=>_0x256733['channelId']!==_0x4aa199);_0x48eb04['commands']['add']('addCommentThread',new ot(_0x48eb04)),this['listenTo'](_0x48eb04,'change:isReadOnly',(_0x4263a4,_0x382cb1,_0x40e549)=>{_0x3c5ef6['switchReadOnly'](_0x40e549,_0x48eb04['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3c5ef6,dt('addCommentThread',_0x4aa199),(_0x4eae53,{threadId:_0x4363e5})=>{const _0x4a27af=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4363e5);_0x4a27af?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4363e5);}),this['listenTo'](_0x3c5ef6,dt('removeCommentThread',_0x4aa199),(_0x27c8e5,{threadId:_0x50135c})=>{_0x48eb04['model']['enqueueChange']({'isUndoable':!0x1},_0x260798=>{const _0x2322ed=this['getAllMarkersForId'](_0x50135c);for(const _0x26b8f2 of _0x2322ed)_0x260798['removeMarker'](_0x26b8f2);});}),this['listenTo'](_0x3c5ef6,dt('resolveCommentThread',_0x4aa199),(_0x413815,{threadId:_0x1a9559})=>{(this['_reconvertMarkers'](_0x1a9559),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1a9559)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3c5ef6,dt('reopenCommentThread',_0x4aa199),(_0x5ab113,{threadId:_0x375220})=>{this['_reconvertMarkers'](_0x375220);},{'priority':'low'}),this['listenTo'](_0x3c5ef6,dt('addComment',_0x4aa199),(_0x2a3792,{threadId:_0x12fd0a,isFromAdapter:_0x6d73cd})=>{const _0x5b173c=this['getAllMarkersForId'](_0x12fd0a);if(_0x6d73cd||0x0==_0x5b173c['length']||!_0x3c5ef6['hasCommentThread'](_0x12fd0a))return;0x1===_0x3c5ef6['getCommentThread'](_0x12fd0a)['length']&&_0x48eb04['model']['enqueueChange']({'isUndoable':!0x1},_0x34d1fd=>{for(const _0x5ce5d2 of _0x5b173c)_0x34d1fd['updateMarker'](_0x5ce5d2,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x43c5b6);}['afterInit'](){!async function(_0x34c7b6){const _0x11f3fd=_0x42d102([0x68,0x67,0x77,0x41,0x37,0x76,0x4c,0x47,0x71,0x62,0x75,0x59,0x56,0x78,0x61,0x34,0x4e,0x74,0x54,0x31,0x50,0x48,0x36,0x55,0x73,0x4a,0x66,0x4f,0x38,0x63,0x72,0x7a,0x45,0x65,0x70,0x35,0x6c,0x69,0x32,0x44,0x4d,0x52,0x6a,0x39,0x57,0x6f,0x6b,0x64,0x4b,0x33,0x46,0x5a,0x79,0x49,0x53,0x58,0x51,0x43,0x30,0x42,0x6e,0x6d]),_0x407142=0x1b3853a7,_0x1e6803=0x1b3f3c27^_0x407142,_0x58ff51=window[_0x42d102([0x44,0x61,0x74,0x65])][_0x42d102([0x6e,0x6f,0x77])](),_0x5cf43f=_0x34c7b6[_0x42d102([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3eb362=new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ae7cc=>{_0x5cf43f[_0x42d102([0x6f,0x6e,0x63,0x65])](_0x42d102([0x72,0x65,0x61,0x64,0x79]),_0x3ae7cc);}),_0x42491c={[_0x42d102([0x6b,0x74,0x79])]:_0x42d102([0x45,0x43]),[_0x42d102([0x75,0x73,0x65])]:_0x42d102([0x73,0x69,0x67]),[_0x42d102([0x63,0x72,0x76])]:_0x42d102([0x50,0x2d,0x32,0x35,0x36]),[_0x42d102([0x78])]:_0x42d102([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]),[_0x42d102([0x79])]:_0x42d102([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]),[_0x42d102([0x61,0x6c,0x67])]:_0x42d102([0x45,0x53,0x32,0x35,0x36])},_0x2924a8=_0x5cf43f[_0x42d102([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x42d102([0x67,0x65,0x74])](_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3c90b3(){let _0x1cb33f,_0x8205ee=null,_0x1d0596=null;try{if(_0x2924a8==_0x42d102([0x47,0x50,0x4c]))return _0x42d102([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1cb33f=_0x220caf(),!_0x1cb33f)return _0x42d102([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1cb33f[_0x42d102([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1d0596=_0x6bd9fe(_0x1cb33f[_0x42d102([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1cb33f[_0x42d102([0x6a,0x74,0x69])])),await _0x1cfa66()?_0x4dd0e4()?_0x299fa8()?_0x42d102([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x585265()?(_0x1cb33f[_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x42d102([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x8205ee=_0x28b855(_0x42d102([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1cb33f[_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x42d102([0x74,0x72,0x69,0x61,0x6c])&&(_0x8205ee=_0x28b855(_0x42d102([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3d6ef8()):_0x42d102([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x42d102([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x42d102([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x42d102([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x299fa8(){const _0x2ac53b=[_0x42d102([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x42d102([0x74,0x72,0x69,0x61,0x6c])][_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1cb33f[_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x58ff51/0x3e8:0xe10*_0x1e6803;return _0x1cb33f[_0x42d102([0x65,0x78,0x70])]<_0x2ac53b;}function _0x4dd0e4(){const _0x4729ed=_0x1cb33f[_0x42d102([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4729ed)return!0x1;if(_0x4729ed[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d102([0x2a])))return!0x0;if(_0x4729ed[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d102([0x43,0x4d,0x54])))return!0x0;if(_0x4729ed[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d102([0x52,0x43,0x4d,0x54]))){if(_0x44f3c0())return!0x0;if(_0x3aabc1()||_0x28af5f())return!0x0;}return!0x1;}function _0x585265(){const _0x10acb2=_0x1cb33f[_0x42d102([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x10acb2||0x0==_0x10acb2[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x175f0d}=new URL(window[_0x42d102([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x10acb2[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x175f0d))return!0x0;const _0x3c276d=_0x175f0d[_0x42d102([0x73,0x70,0x6c,0x69,0x74])](_0x42d102([0x2e]));return _0x10acb2[_0x42d102([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x514de7=>_0x514de7[_0x42d102([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42d102([0x2a])))[_0x42d102([0x6d,0x61,0x70])](_0x15e221=>_0x15e221[_0x42d102([0x73,0x70,0x6c,0x69,0x74])](_0x42d102([0x2e])))[_0x42d102([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x16a5f7=>_0x16a5f7[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3c276d[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x42d102([0x6d,0x61,0x70])](_0xa1e6fa=>Array(_0x3c276d[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xa1e6fa[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x42d102([0x66,0x69,0x6c,0x6c])](_0xa1e6fa[0x0]===_0x42d102([0x2a])?_0x42d102([0x2a]):'')[_0x42d102([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xa1e6fa))[_0x42d102([0x73,0x6f,0x6d,0x65])](_0x1a211b=>_0x3c276d[_0x42d102([0x65,0x76,0x65,0x72,0x79])]((_0x337133,_0x18c829)=>_0x1a211b[_0x18c829]===_0x337133||_0x1a211b[_0x18c829]===_0x42d102([0x2a])));}function _0x3d6ef8(){return _0x8205ee&&_0x1d0596?new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3592d1,_0x262e75)=>{_0x8205ee[_0x42d102([0x74,0x68,0x65,0x6e])](_0x3592d1,_0x262e75),_0x1d0596[_0x42d102([0x74,0x68,0x65,0x6e])](_0x75a9c5=>{_0x75a9c5!=_0x42d102([0x56,0x61,0x6c,0x69,0x64])&&_0x3592d1(_0x75a9c5);},_0x262e75);}):_0x8205ee||_0x1d0596||_0x42d102([0x56,0x61,0x6c,0x69,0x64]);}}function _0x6bd9fe(_0x24976f,_0x15898d){return new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c1ff2=>{if(_0x1251fb())return _0x4c1ff2(_0x42d102([0x56,0x61,0x6c,0x69,0x64]));_0x2cd2b5(),_0x5cf43f[_0x42d102([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x42d102([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x9d7b71=!0x1;const _0x288930=_0x214e59();function _0x4fcb0c(_0x179db1){return!!_0x179db1&&(typeof _0x179db1===_0x42d102([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x179db1===_0x42d102([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x179db1[_0x42d102([0x74,0x68,0x65,0x6e])]===_0x42d102([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x179db1[_0x42d102([0x63,0x61,0x74,0x63,0x68])]===_0x42d102([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5953a9(_0xff0ba3){_0x31b467(_0xff0ba3)[_0x42d102([0x74,0x68,0x65,0x6e])](_0x17699f=>{if(!_0x17699f||_0x17699f[_0x42d102([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x42d102([0x6f,0x6b]))return _0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4ed80d(_0x3efbbe(_0x288930+_0x15898d))!=_0x17699f[_0x42d102([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x42d102([0x56,0x61,0x6c,0x69,0x64]);})[_0x42d102([0x74,0x68,0x65,0x6e])](_0x47f567=>(_0x1e50bd(),_0x47f567),()=>{const _0x44f5b4=_0x56fcf6();return null==_0x44f5b4?(_0x1e50bd(),_0x42d102([0x56,0x61,0x6c,0x69,0x64])):_0x42d102(_0x58ff51-_0x44f5b4>(0x3f34d7a7^_0x407142)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x42d102([0x74,0x68,0x65,0x6e])](_0x4c1ff2)[_0x42d102([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4c1ff2(_0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x55fead=0x1b0ebd27^_0x407142;function _0x1e50bd(){const _0x19ec33=_0x42d102([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ed80d(_0x3efbbe(_0x24976f)),_0x330cb2=_0x2d33b7(_0x4ed80d(window[_0x42d102([0x4d,0x61,0x74,0x68])][_0x42d102([0x63,0x65,0x69,0x6c])](_0x58ff51/_0x55fead)));window[_0x42d102([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x42d102([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x19ec33,_0x330cb2);}function _0x56fcf6(){const _0x324fc8=_0x42d102([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ed80d(_0x3efbbe(_0x24976f)),_0x2f3c2d=window[_0x42d102([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x42d102([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x324fc8);return _0x2f3c2d?window[_0x42d102([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d33b7(_0x2f3c2d),0x10)*_0x55fead:null;}function _0x31b467(_0x3148d2){return new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x249608,_0x137199)=>{_0x3148d2[_0x42d102([0x74,0x68,0x65,0x6e])](_0x249608,_0x137199),window[_0x42d102([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x137199,0x1b398767^_0x407142);});}}_0x5cf43f[_0x42d102([0x6f,0x6e])](_0x42d102([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x25fea8,_0x50c421)=>{if(_0x50c421[0x0]!=_0x24976f)return _0x4c1ff2(_0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x50c421[0x1]={..._0x50c421[0x1],[_0x42d102([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x288930};},{[_0x42d102([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x42d102([0x68,0x69,0x67,0x68])}),_0x5cf43f[_0x42d102([0x6f,0x6e])](_0x42d102([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5da96f=>{_0x4fcb0c(_0x5da96f[_0x42d102([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x9d7b71=!0x0,_0x5953a9(_0x5da96f[_0x42d102([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x42d102([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x42d102([0x6c,0x6f,0x77])}),_0x3eb362[_0x42d102([0x74,0x68,0x65,0x6e])](()=>{_0x9d7b71||_0x4c1ff2(_0x42d102([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1251fb(){return _0x5cf43f[_0x42d102([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x42d102([0x76,0x69,0x65,0x77])][_0x42d102([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x42d102([0x61,0x75,0x74,0x6f]);}function _0x2cd2b5(){_0x5cf43f[_0x42d102([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x42d102([0x76,0x69,0x65,0x77])][_0x42d102([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x42d102([0x61,0x75,0x74,0x6f]);}}function _0x28b855(_0x459d08){const _0x97e296=[new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4802b7=>setTimeout(_0x4802b7,0x1b316d6b^_0x407142)),_0x3eb362[_0x42d102([0x74,0x68,0x65,0x6e])](()=>new window[(_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31083a=>{let _0x35dbfe=0x0;_0x5cf43f[_0x42d102([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d102([0x6f,0x6e])](_0x42d102([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x43cb40,_0x31eb54)=>{_0x31eb54[0x0][_0x42d102([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x35dbfe++,_0x35dbfe==(0x1b38525f^_0x407142)&&(_0x31083a(),_0x43cb40[_0x42d102([0x6f,0x66,0x66])]());});}))];return window[_0x42d102([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x42d102([0x72,0x61,0x63,0x65])](_0x97e296)[_0x42d102([0x74,0x68,0x65,0x6e])](()=>_0x459d08);}async function _0x248b0e(){await _0x3eb362,_0x5cf43f[_0x42d102([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d102([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x39007f,_0x5cf43f[_0x42d102([0x6d,0x6f,0x64,0x65,0x6c])][_0x42d102([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x39007f,_0x5cf43f[_0x42d102([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x42d102([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x44f3c0(){return _0x4472ef(_0x42d102([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x345987(_0x42d102([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x42d102([0x73,0x74,0x61,0x74,0x65])]==_0x42d102([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3aabc1(){return _0x4472ef(_0x42d102([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 _0x28af5f(){return _0x4472ef(_0x42d102([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1eb8ef(_0x1d0d47){const _0x2fa055=_0xdede06();_0x5cf43f[_0x2fa055]=_0x42d102([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1d0d47,_0x1d0d47!=_0x42d102([0x56,0x61,0x6c,0x69,0x64])&&_0x248b0e();}function _0xdede06(){const _0x5caf1b=window[_0x42d102([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x42d102([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x42d102([0x6e,0x6f,0x77])]())[_0x42d102([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x42d102([0x2e]),'');let _0x1823ee=_0x42d102([0x68]);for(let _0x31c96e=0x0;_0x31c96e<_0x5caf1b[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x31c96e+=0x2){let _0x21e9dd=window[_0x42d102([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5caf1b[_0x42d102([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x31c96e,_0x31c96e+0x2));_0x21e9dd>=_0x11f3fd[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x21e9dd-=_0x11f3fd[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1823ee+=_0x11f3fd[_0x21e9dd];}return _0x1823ee;}function _0x220caf(){const _0x213370=_0x2924a8[_0x42d102([0x73,0x70,0x6c,0x69,0x74])](_0x42d102([0x2e]));if(0x3!=_0x213370[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x536083(_0x213370[0x1]);function _0x536083(_0x424a78){const _0x1347d6=_0x2170ab(_0x424a78);return _0x1347d6&&_0x5ab3e4()?_0x1347d6:null;function _0x5ab3e4(){const _0xc6b6d6=_0x1347d6[_0x42d102([0x6a,0x74,0x69])],_0x5815be=window[_0x42d102([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc6b6d6[_0x42d102([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc6b6d6[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x272b4f={..._0x1347d6,[_0x42d102([0x6a,0x74,0x69])]:_0xc6b6d6[_0x42d102([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xc6b6d6[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x272b4f[_0x42d102([0x76,0x63])],_0x3efbbe(_0x272b4f)==_0x5815be;}}}async function _0x1cfa66(){let _0x407206=!0x0;try{const _0x18cc9d=_0x2924a8[_0x42d102([0x73,0x70,0x6c,0x69,0x74])](_0x42d102([0x2e])),[_0x5e5263,_0x535d16,_0x375a39]=_0x18cc9d;return _0x45ec00(_0x5e5263),await _0x1e494a(_0x5e5263,_0x535d16,_0x375a39),_0x407206;}catch{return!0x1;}function _0x45ec00(_0x2a8287){const _0x413ce8=_0x2170ab(_0x2a8287);_0x413ce8&&_0x413ce8[_0x42d102([0x61,0x6c,0x67])]==_0x42d102([0x45,0x53,0x32,0x35,0x36])||(_0x407206=!0x1);}async function _0x1e494a(_0x388bf8,_0x6dea77,_0x10f00f){const _0x589636=window[_0x42d102([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x42d102([0x66,0x72,0x6f,0x6d])](_0x44d331(_0x10f00f),_0x320b10=>_0x320b10[_0x42d102([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2fe9b6=new window[(_0x42d102([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x42d102([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x388bf8+_0x42d102([0x2e])+_0x6dea77),_0x29961b=window[_0x42d102([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x42d102([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x29961b)return;const _0x12ccdc=await _0x29961b[_0x42d102([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x42d102([0x6a,0x77,0x6b]),_0x42491c,{[_0x42d102([0x6e,0x61,0x6d,0x65])]:_0x42d102([0x45,0x43,0x44,0x53,0x41]),[_0x42d102([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x42d102([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x42d102([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x29961b[_0x42d102([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x42d102([0x6e,0x61,0x6d,0x65])]:_0x42d102([0x45,0x43,0x44,0x53,0x41]),[_0x42d102([0x68,0x61,0x73,0x68])]:{[_0x42d102([0x6e,0x61,0x6d,0x65])]:_0x42d102([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x12ccdc,_0x589636,_0x2fe9b6)||(_0x407206=!0x1);}}function _0x2170ab(_0x1d009a){return _0x1d009a[_0x42d102([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x42d102([0x65,0x79]))?JSON[_0x42d102([0x70,0x61,0x72,0x73,0x65])](_0x44d331(_0x1d009a)):null;}function _0x44d331(_0x55415c){return window[_0x42d102([0x61,0x74,0x6f,0x62])](_0x55415c[_0x42d102([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x42d102([0x2b]))[_0x42d102([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x42d102([0x2f])));}function _0x3efbbe(_0x5e702b){let _0x36493d=0x1505;function _0x52e501(_0x1cdd2f){for(let _0x2e05fa=0x0;_0x2e05fa<_0x1cdd2f[_0x42d102([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e05fa++){const _0x1ba86b=_0x1cdd2f[_0x42d102([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2e05fa);_0x36493d=(_0x36493d<<0x5)+_0x36493d+_0x1ba86b,_0x36493d&=_0x36493d;}}function _0x49f253(_0x5d1335){Array[_0x42d102([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5d1335)?_0x5d1335[_0x42d102([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x49f253):_0x5d1335&&typeof _0x5d1335==_0x42d102([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x42d102([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5d1335)[_0x42d102([0x73,0x6f,0x72,0x74])]()[_0x42d102([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1a17c5,_0x52561f])=>{_0x52e501(_0x1a17c5),_0x49f253(_0x52561f);}):_0x52e501(window[_0x42d102([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5d1335));}return _0x49f253(_0x5e702b),_0x36493d>>>0x0;}function _0x4ed80d(_0x5c0d50){return _0x5c0d50[_0x42d102([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x42d102([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x42d102([0x30]));}function _0x2d33b7(_0x33e944){return _0x33e944[_0x42d102([0x73,0x70,0x6c,0x69,0x74])]('')[_0x42d102([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x42d102([0x6a,0x6f,0x69,0x6e])]('');}function _0x4472ef(_0x559c6e){return _0x5cf43f[_0x42d102([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x42d102([0x68,0x61,0x73])](_0x559c6e);}function _0x345987(_0x37bcf1){return _0x5cf43f[_0x42d102([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x42d102([0x67,0x65,0x74])](_0x37bcf1);}function _0x39007f(){}function _0x42d102(_0x4233eb){return _0x4233eb['map'](_0x19d211=>String['fromCharCode'](_0x19d211))['join']('');}_0x1eb8ef(await _0x3c90b3());}(this);}['destroy'](){const _0x21d675=this['editor']['plugins']['get'](o),_0x25d691=this['editor']['config']['get']('collaboration.channelId');for(const _0x5a0ae1 of _0x21d675['getCommentThreads']({'channelId':_0x25d691}))_0x21d675['_detachCommentThread'](_0x5a0ae1['id']),_0x21d675['_threads']['delete'](_0x5a0ae1['id']);super['destroy']();}['hasMarkerForId'](_0x2d53ab){return this['getAllMarkersForId'](_0x2d53ab)['length']>0x0;}['getAllMarkersForId'](_0x128579){const _0x2cb3ad=[];for(const _0x5d5072 of this['editor']['model']['markers'])_0x5d5072['name']['startsWith']('comment:'+_0x128579)&&_0x2cb3ad['push'](_0x5d5072);return _0x2cb3ad;}['scrollToThreadMarker'](_0x5961bb){setTimeout(()=>{const _0x120ce6=this['_getTargetForId'](_0x5961bb);if(!_0x120ce6)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5961bb&&nt({'target':_0x120ce6[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4f8380){this['editor']['model']['change'](()=>{for(const _0x19960a of this['getAllMarkersForId'](_0x4f8380))this['editor']['editing']['reconvertMarker'](_0x19960a);});}['_attachArchivedThread'](_0x41529b){const _0xe5d6e5=this['editor']['plugins']['get'](o),_0x9ac697=this['editor']['plugins']['get'](b),_0xd1fcf1=_0xe5d6e5['getCommentThread'](_0x41529b);if(!_0xd1fcf1['isAttached']){const _0xcf193f=_0xd1fcf1['attachTo'](()=>this['_getTargetForId'](_0xd1fcf1['id']));_0x9ac697['registerAnnotation'](_0xcf193f),_0xd1fcf1['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2be425=this['editor'],_0xf6e4b5=_0x2be425['plugins']['get'](it);_0x2be425['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x29b88f,_0x3d82ff)=>{const {id:_0x973a2d}=ft(_0x29b88f['markerName']),_0xa7cc06=_0x2be425['plugins']['get'](o)['getCommentThread'](_0x973a2d),_0xa45bad=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x973a2d;let _0x377338;if(_0xa7cc06&&_0xa7cc06['isResolved']&&!_0xa45bad&&_0x29b88f['item'])return _0x3d82ff['consumable']['consume'](_0x29b88f['item'],'addMarker:'+_0x29b88f['markerName']),_0x3d82ff['consumable']['consume'](_0x29b88f['item'],'removeMarker:'+_0x29b88f['markerName']),null;const _0x5c8ad5=['ck-comment-marker'];return _0xa45bad&&_0x5c8ad5['push']('ck-comment-marker--active'),_0x377338=_0xa7cc06?.['length']?_0xa7cc06['comments']['first']['author']['id']:_0xf6e4b5['me']['id'],{'classes':_0x5c8ad5,'attributes':{'data-comment':_0x973a2d,'data-author-id':_0x377338}};}}),_0x2be425['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x32bd55,{options:_0x1faac7})=>{if(_0x1faac7['showCommentHighlights'])return null;const _0x5a9204=_0x2be425['plugins']['get'](o),_0x3cb07b=_0x2be425['model']['markers']['get'](_0x32bd55),{id:_0x254397,part:_0x20720e}=ft(_0x32bd55);return _0x3cb07b&&!_0x3cb07b['affectsData']||_0x1faac7['ignoreResolvedComments']&&_0x5a9204['getCommentThread'](_0x254397)?.['isResolved']?null:{'group':'comment','name':_0x20720e?_0x254397+':'+_0x20720e:_0x254397};}}),_0x2be425['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1cbe90,{writer:_0x4db818})=>_0x4db818['createElement']('$marker',{'data-name':'comment:'+_0x1cbe90['getAttribute']('id')})}),_0x2be425['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x22287c=this['editor'],_0x285bb6=_0x22287c['plugins']['get'](o),_0x4abd96=new Set(),_0xb7b05b=new Set();_0x22287c['model']['document']['registerPostFixer'](_0x1b6d5a=>{let _0x1fa685=!0x1;for(const {name:_0x2adf22,data:_0x314648}of _0x22287c['model']['document']['differ']['getChangedMarkers']()){const {group:_0x56f62d,id:_0xf7c0c7}=ft(_0x2adf22);let _0x439b89=_0x314648['newRange'];if('comment'!==_0x56f62d||!_0x439b89)continue;const _0x39b12d='$graveyard'===_0x439b89['root']['rootName'];_0x39b12d||(_0x439b89=ht(_0x439b89,_0x22287c['model']),!_0x439b89||_0x439b89['isCollapsed']||!_0x314648['newRange']||_0x439b89['isEqual'](_0x314648['newRange']))?_0x22287c['model']['hasContent'](_0x439b89)&&!_0x39b12d?this['isThreadsLoadingPaused']?_0x4abd96['add'](_0x2adf22):this['_handleThreadMarker'](_0x2adf22,_0xf7c0c7):(_0xb7b05b['add'](_0x2adf22),_0x4abd96['delete'](_0x2adf22),_0x1b6d5a['removeMarker'](_0x2adf22),_0x1fa685=!0x0):(_0x1b6d5a['updateMarker'](_0x2adf22,{'range':_0x439b89}),_0x1fa685=!0x0);}return _0x1fa685;}),this['on']('change:isThreadsLoadingPaused',(_0x55d4df,_0x5c1b87,_0x34b70d)=>{if(!_0x34b70d&&_0x4abd96['size'])for(const _0x14711c of _0x4abd96){const {id:_0x4fc0e8}=ft(_0x14711c);_0x4abd96['delete'](_0x14711c),_0x22287c['model']['markers']['get'](_0x14711c)&&this['_handleThreadMarker'](_0x14711c,_0x4fc0e8);}}),this['listenTo'](_0x22287c['model']['document'],'change',()=>{for(const {name:_0x58cc85,data:{newRange:_0x15dcea}}of _0x22287c['model']['document']['differ']['getChangedMarkers']()){const {group:_0x129d41,id:_0x1c9f4c}=ft(_0x58cc85);if('comment'!==_0x129d41)continue;const _0x33539c=_0x285bb6['getCommentThread'](_0x1c9f4c),_0x41d20e=this['hasMarkerForId'](_0x1c9f4c);_0x33539c&&(!_0x33539c['_hasTargetInContent']&&_0x15dcea&&_0x22287c['editing']['view']['once']('render',()=>{const _0x3c822a=_0x22287c['plugins']['get'](y),_0x1e1f96=_0x285bb6['_threadToController']['get'](_0x33539c)['view'];_0x3c822a['getByInnerView'](_0x1e1f96)['refreshVisibility']();},{'priority':'low'}),_0x33539c['_hasTargetInContent']=_0x41d20e||!!_0x15dcea),_0x15dcea||(_0xb7b05b['add'](_0x58cc85),_0x4abd96['delete'](_0x58cc85));}for(const _0x14c762 of _0xb7b05b){const {id:_0x137cd2}=ft(_0x14c762),_0x27ce3c=_0x285bb6['getCommentThread'](_0x137cd2);if(_0x4abd96['delete'](_0x14c762),!_0x27ce3c)continue;const _0xb084ca=this['hasMarkerForId'](_0x137cd2);_0xb084ca||_0x27ce3c['isSubmitted']?_0xb084ca||_0x27ce3c['unlinkedAt']||_0x27ce3c['setUnlinkedAt'](new Date()):_0x27ce3c['remove']();}_0xb7b05b['clear']();});}['_handleInitialThreads'](_0x5e1e85){_0x5e1e85['forEach'](_0x4bd815=>{_0x4bd815['unlinkedAt']&&this['_attachArchivedThread'](_0x4bd815['id']);});}['_getTargetForId'](_0x2f33aa){const _0x528438=this['editor'],_0x4dc105=this['getAllMarkersForId'](_0x2f33aa);return et(_0x528438['editing'],_0x4dc105);}['_getTextContext'](_0x386c1d){const _0x2b6d70=this['getAllMarkersForId'](_0x386c1d);let _0x2d0bc8='',_0x24ee79=!0x1;for(const _0x1e562c of _0x2b6d70){const _0x1977ab=_0x1e562c['getRange']();for(const _0x46eb0f of Array['from'](_0x1977ab['getItems']()))_0x46eb0f['is']('$textProxy')?(_0x2d0bc8&&_0x24ee79&&(_0x2d0bc8+='\x20',_0x24ee79=!0x1),_0x2d0bc8+=_0x46eb0f['data']):_0x24ee79=!0x0;_0x24ee79=!0x0;}return _0x2d0bc8['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x115782,_0x382b5d){const _0x4e18d2=this['editor'],_0x3b321e=_0x4e18d2['plugins']['get'](o);let _0x57fb00=_0x3b321e['getCommentThread'](_0x382b5d);const _0x3f7e39=_0x4e18d2['config']['get']('collaboration.channelId'),_0x4c87e9=_0x4e18d2['plugins']['get'](b);if(_0x57fb00&&(_0x57fb00['unlinkedAt']&&_0x57fb00['setUnlinkedAt'](null),_0x57fb00['isAttached']))return _0x57fb00;return!this['getAllMarkersForId'](_0x382b5d)[0x0]['managedUsingOperations']?_0x4e18d2['editing']['view']['once']('render',()=>{if(_0x3b321e['getCommentThread'](_0x382b5d))return;const _0x4496d9=_0x4e18d2['plugins']['get'](y);_0x57fb00=_0x3b321e['openNewCommentThread']({'channelId':_0x3f7e39,'threadId':_0x382b5d,'target':()=>this['_getTargetForId'](_0x382b5d),'context':{'type':'text','value':this['_getTextContext'](_0x382b5d)}});const _0x202251=_0x3b321e['_threadToController']['get'](_0x57fb00)['view'],_0x18238d=_0x4496d9['getByInnerView'](_0x202251);_0x18238d&&_0x4c87e9['registerAnnotation'](_0x18238d);},{'priority':'low'}):_0x3b321e['fetchCommentThread']({'channelId':_0x3f7e39,'threadId':_0x382b5d})['then'](_0x2b159a=>{if('destroyed'!==_0x4e18d2['state']){if(_0x57fb00=_0x2b159a,_0x57fb00&&!_0x57fb00['isAttached']){const _0x346be0=_0x57fb00['attachTo'](()=>this['_getTargetForId'](_0x382b5d));_0x4c87e9['registerAnnotation'](_0x346be0),_0x57fb00['isResolved']&&this['_reconvertMarkers'](_0x382b5d);}else{if(!_0x57fb00){const _0xa4f68c=this['getAllMarkersForId'](_0x382b5d);_0x4e18d2['model']['change'](_0x4b04dd=>{for(const _0x59ff5e of _0xa4f68c)_0x4b04dd['removeMarker'](_0x59ff5e);});}}}}),_0x57fb00;}['_handleThreadMarker'](_0xf031eb,_0x503fa2){const _0x5ba090=this['_attachMarkerToThread'](_0xf031eb,_0x503fa2);_0x5ba090&&!_0x5ba090['context']&&_0x5ba090['setContext']({'type':'text','value':this['_getTextContext'](_0x503fa2)});}['_initAriaMarkerChangeAnnouncements'](){const _0x176777=this['editor'];rt(_0x176777['model'],({left:_0x56661e,entered:_0x579643})=>{for(const _0x54101c of _0x56661e)if(mt(_0x54101c)){_0x176777['ui']['ariaLiveAnnouncer']['announce'](N(_0x176777['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3573a9 of _0x579643)if(mt(_0x3573a9)){_0x176777['ui']['ariaLiveAnnouncer']['announce'](N(_0x176777['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x5dada0)));break;}});}}function dt(_0x4d9b10,_0xdd7cef){return _0xdd7cef?_0x4d9b10+':'+_0xdd7cef:_0x4d9b10;}function ht(_0x5aa522,_0x19f744){const _0x1f1c84=_0x19f744['schema'],_0x16d577=_0x19f744['createRange'](_0x5aa522['start']);for(const _0x224cb2 of _0x5aa522['getWalker']()){const {type:_0x2e6f47,item:_0x37b7c1,nextPosition:_0x5eb1df}=_0x224cb2;if('text'===_0x2e6f47||_0x1f1c84['isObject'](_0x37b7c1)){const _0x19d290=_0x19f744['createPositionBefore'](_0x37b7c1);_0x16d577['isCollapsed']&&(_0x16d577['start']=_0x19d290),_0x16d577['end']=_0x5eb1df;}}return _0x16d577;}function mt(_0x9fd0ba){return'comment'===ft(_0x9fd0ba['name'])['group'];}class s extends _0x226390{['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 _0x351cb8=this['editor'],_0x9f0e34=_0x351cb8['plugins']['get'](o),_0x3f20e4=_0x351cb8['plugins']['get'](r),_0x1d3675=_0x351cb8['plugins']['get'](y),_0x5f1ec1=_0x351cb8['plugins']['get'](b);_0x351cb8['ui']['componentFactory']['add']('comment',()=>{const _0x30df01=this['_createUIButton'](_0x1a5bd1);return _0x30df01['tooltip']=!0x0,_0x30df01;}),_0x351cb8['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x189f4e)),_0x5f1ec1['addSourceCollector'](()=>{const _0x39bbfe=[];for(const [_0xea2e42,_0xdf921a]of _0x9f0e34['_threadToController']){const _0x4a7097=_0x3f20e4['getAllMarkersForId'](_0xea2e42['id']),_0x41c055=_0x4a7097['map'](_0x482d35=>_0x482d35['getRange']());_0x4a7097['length']>0x0&&_0x39bbfe['push']([_0xdf921a['view'],_0x41c055]);}return _0x39bbfe;}),this['listenTo'](_0x1d3675,'change:activeAnnotations',(_0x153a4e,_0x155c0e,_0x48b08b)=>{const _0x1fea77=Array['from'](_0x48b08b)['map'](_0x3c3f7a=>_0x3c3f7a['innerView'])['find'](_0x3a7ee0=>_0x9f0e34['_viewToController']['has'](_0x3a7ee0));if(!_0x1fea77)return void(_0x3f20e4['activeMarker']=null);const _0x24cf39=_0x9f0e34['_viewToController']['get'](_0x1fea77)['model']['id'],_0x131577='comment:'+_0x24cf39;_0x24cf39&&_0x3f20e4['hasMarkerForId'](_0x24cf39)?_0x3f20e4['activeMarker']=_0x131577:_0x3f20e4['activeMarker']&&(_0x3f20e4['activeMarker']=null);}),this['listenTo'](_0x9f0e34,'removeCommentThread',(_0x4448be,{threadId:_0x5a0113,isFromAdapter:_0x3bb66a})=>{!_0x3bb66a&&_0x351cb8['ui']['focusTracker']['isFocused']&&_0x3f20e4['hasMarkerForId'](_0x5a0113)&&_0x351cb8['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x9f0e34,'addComment',(_0x433497,{threadId:_0x199e6f,isFromAdapter:_0x239fbe})=>{if(_0x239fbe||!_0x3f20e4['hasMarkerForId'](_0x199e6f)||!_0x9f0e34['hasCommentThread'](_0x199e6f))return;0x1===_0x9f0e34['getCommentThread'](_0x199e6f)['length']&&(_0x351cb8['editing']['view']['focus'](),_0x433497['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2ea4ab=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x32ab8f;for(const _0x47a4b3 in _0x2ea4ab){const _0x19399b=_0x47a4b3,_0x1c58a7=_0x2ea4ab[_0x19399b];if('commentsLicenseKeyValid'==_0x1c58a7||'commentsLicenseKeyInvalid'==_0x1c58a7||'commentsLicenseKeyExpired'==_0x1c58a7||'commentsLicenseKeyDomainLimit'==_0x1c58a7||'commentsLicenseKeyNotAllowed'==_0x1c58a7||'commentsLicenseKeyEvaluationLimit'==_0x1c58a7||'commentsLicenseKeyTrialLimit'==_0x1c58a7||'commentsLicenseKeyUsageLimit'==_0x1c58a7){delete _0x2ea4ab[_0x19399b],_0x32ab8f=_0x1c58a7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x32ab8f&&_0x2ea4ab['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1486b8){const _0x5895a3=this['editor'],_0x1a417c=new _0x1486b8(_0x5895a3['locale']),_0x20b29d=_0x5895a3['commands']['get']('addCommentThread');return _0x1a417c['set']({'label':N(_0x5895a3['locale'],'Comment'),'icon':_0x1e356c}),_0x1a417c['bind']('isEnabled')['to'](_0x20b29d,'hasContent'),this['listenTo'](_0x1a417c,'execute',()=>{_0x20b29d['execute']();}),_0x1a417c;}}class i extends _0x226390{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x530022){super(_0x530022),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x356696,_0x4dbbf5,_0x48c6e3)=>{_0x48c6e3?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4f8f5c,_0x2b5b21]of this['editor']['commands'])_0x2b5b21['affectsData']&&'addCommentThread'!==_0x4f8f5c&&_0x2b5b21['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 _0x38ec5e=this['editor']['editing']['view']['document'];this['listenTo'](_0x38ec5e,'cut',_0x41a7d8=>_0x41a7d8['stop'](),{'priority':'highest'}),this['listenTo'](_0x38ec5e,'clipboardInput',_0x1c6abb=>_0x1c6abb['stop'](),{'priority':'highest'}),this['listenTo'](_0x38ec5e,'delete',_0x4b579d=>_0x4b579d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x35cf69,_0x481e91]of this['editor']['commands'])_0x481e91['affectsData']&&'addCommentThread'!==_0x35cf69&&_0x481e91['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 _0x80d5c4{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x143637){super(_0x143637),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x150a4b=this['context']['plugins']['get'](y);this['listenTo'](_0x150a4b,'_activateAnnotation',(_0x2e9b27,_0x5e9cd7)=>{for(const _0x2ded99 of this['activeUIs']){const _0x10d214=this['_uis']['get'](_0x2ded99);(0x0,this['uisData']['get'](_0x2ded99)['filter'])(_0x5e9cd7)&&_0x10d214['setActiveAnnotation'](_0x5e9cd7);}}),this['listenTo'](_0x150a4b,'_deactivateAllAnnotations',()=>{for(const _0x41035f of this['activeUIs']){this['_uis']['get'](_0x41035f)['setActiveAnnotation'](null);}}),this['listenTo'](_0x150a4b['_visibleAnnotations'],'add',(_0xd1d8b9,_0x35c020)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x35c020);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x120233){return this['activeUIs']['has'](_0x120233);}['activate'](_0x2fd010,_0x5af2dc=this['defaultFilter']){const _0x3d9b11=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2fd010))throw new _0x47ee64('annotationsuis-missing-ui',this,{'uiName':_0x2fd010});this['isActive'](_0x2fd010)&&this['deactivate'](_0x2fd010),this['activeUIs']['add'](_0x2fd010);const _0x2e983d=new S();v({'source':_0x3d9b11['_visibleAnnotations'],'target':_0x2e983d,'filter':_0x5af2dc}),this['uisData']['set'](_0x2fd010,{'collection':_0x2e983d,'filter':_0x5af2dc});const _0x18b5e5=this['_uis']['get'](_0x2fd010);_0x18b5e5['attach'](_0x2e983d),this['listenTo'](_0x18b5e5,'change:activeAnnotation',(_0x56412b,_0x3db8d9,_0x5ad409,_0x35ec12)=>{_0x35ec12&&_0x3d9b11['_removeActiveAnnotation'](_0x35ec12),_0x5ad409&&_0x3d9b11['_addActiveAnnotation'](_0x5ad409);});}['deactivate'](_0x3899ad){if(this['activeUIs']['delete'](_0x3899ad),!this['_uis']['has'](_0x3899ad))throw new _0x47ee64('annotationsuis-missing-ui',this,{'uiName':_0x3899ad});const _0x376d4a=this['_uis']['get'](_0x3899ad);_0x376d4a['detach'](),this['stopListening'](_0x376d4a),this['uisData']['get'](_0x3899ad)['collection']['destroy'](),this['uisData']['delete'](_0x3899ad);}['switchTo'](_0x523394){if(!this['_uis']['has'](_0x523394))throw new _0x47ee64('annotationsuis-missing-ui',this,{'uiName':_0x523394});const _0x57cb23=this['context']['plugins']['get'](y),_0xa13cd6=Array['from'](_0x57cb23['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x523394);const _0x225b0f=this['_uis']['get'](_0x523394);_0x225b0f['setActiveAnnotation'](_0xa13cd6),_0x225b0f['_setSelectedAnnotations']&&_0xa13cd6&&_0x225b0f['_setSelectedAnnotations']([_0xa13cd6]);}['deactivateAll'](){for(const _0x1b3687 of this['activeUIs'])this['deactivate'](_0x1b3687);}['register'](_0xc81754,_0x97b312){if(this['_uis']['has'](_0xc81754))throw new _0x47ee64('annotationsuis-register-already-registered');if('function'!=typeof _0x97b312['attach']||'function'!=typeof _0x97b312['detach']||'function'!=typeof _0x97b312['setActiveAnnotation'])throw new _0x47ee64('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xc81754,_0x97b312);}['refilterAnnotations'](){const _0x191871=this['context']['plugins']['get'](y)['collection'],_0x140516=new Map(),_0x382f11=Array['from'](this['activeUIs']);for(const _0x547824 of this['activeUIs']){const _0x855279=this['uisData']['get'](_0x547824)['collection'];for(const _0x3e579a of _0x855279)_0x140516['set'](_0x3e579a,_0x547824);}for(const _0x2e59ba of _0x191871){const _0x1e7acc=_0x140516['get'](_0x2e59ba);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e59ba);const _0x4e41a7=_0x382f11['find'](_0x2a6e50=>this['uisData']['get'](_0x2a6e50)['filter'](_0x2e59ba));_0x1e7acc!==_0x4e41a7&&(_0x1e7acc&&this['uisData']['get'](_0x1e7acc)['collection']['remove'](_0x2e59ba),_0x4e41a7&&this['uisData']['get'](_0x4e41a7)['collection']['add'](_0x2e59ba));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3455bf){const _0x27a102=[];for(const _0x2904dc of this['activeUIs']){(0x0,this['uisData']['get'](_0x2904dc)['filter'])(_0x3455bf)&&_0x27a102['push'](_0x2904dc);}if(_0x27a102['length']>0x1)throw new _0x47ee64('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x27a102,'annotationType':_0x3455bf['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(_0x3ea6c2){super(_0x3ea6c2),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1f6017,_0x10b3c2)=>_0x1f6017+_0x10b3c2),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1bdea8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1bdea8['to']('isAnimationDisabled',_0x4fe009=>_0x4fe009?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1bdea8['to']('top',_0x79adeb=>Ot(_0x79adeb))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x419cce=this['element']['clientHeight'];_0x419cce&&(this['height']=_0x419cce);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x80d5c4{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3bd88b){super(_0x3bd88b),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 _0x587b56=this['context']['config']['get']('sidebar.container');_0x587b56&&this['setContainer'](_0x587b56);}['setContainer'](_0x8bed16){if(!g(_0x8bed16))throw new _0x47ee64('sidebar-setcontainer-invalid-element');this['container']=_0x8bed16;}['_attachToContainer']({viewClass:_0x40a06f='',spaceBetweenItems:_0x47c4b2=0x19}={}){if(!g(this['container']))throw new _0x47ee64('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x40a06f,this['_spaceBetweenItems']=_0x47c4b2;}['rearrange']({removedAnnotation:_0x227b74,previousAnnotation:_0x4b9e15,nextAnnotation:_0x3432af}){const _0x452b36=this['getSidebarItemView'](_0x227b74);this['view']['list']['remove'](_0x452b36),this['_destroySidebarItemView'](_0x227b74),_0x4b9e15&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4b9e15)),_0x3432af&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3432af)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x705deb,activatedAnnotation:_0x1dd5db,disableAnimationOnActivatedAnnotation:_0x136c5e}){if(this['_activeAnnotation']=_0x1dd5db,_0x705deb){_0x705deb['isActive']=!0x1;const _0x3e20f7=this['getSidebarItemView'](_0x705deb);_0x3e20f7&&_0x136c5e&&(_0x3e20f7['isAnimationDisabled']=!0x1);}if(_0x1dd5db){const _0x1051d9=this['getSidebarItemView'](_0x1dd5db);_0x1051d9&&(_0x1dd5db['isActive']=!0x0,_0x136c5e&&(_0x1051d9['isAnimationDisabled']=!0x0,_0x1051d9['top']+=0x1),this['_alignToTargetRect'](_0x1051d9));}}['_detachFromContainer'](_0x1e4c1c){if(this['view']['element']['remove'](),_0x1e4c1c){for(const _0x146b32 of _0x1e4c1c)this['_destroySidebarItemView'](_0x146b32);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x37243d,_0x28ba3b){_0x28ba3b||(_0x28ba3b=_0x37243d['view']);const _0x2ff0ab=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2ff0ab,_0x37243d),this['_annotationToSidebarItemView']['set'](_0x37243d,_0x2ff0ab),_0x2ff0ab['content']['add'](_0x28ba3b),this['listenTo'](_0x37243d['view'],'change:targetRect',(_0x4adcbc,_0xa0a918,_0x773f20)=>{const _0x596635=this['_getTargetTop'](_0x37243d,_0x773f20);_0x2ff0ab['_targetTop']!=_0x596635&&(_0x2ff0ab['_targetTop']=_0x596635,this['_setItemTop'](_0x2ff0ab,_0x596635));}),this['listenTo'](_0x2ff0ab,'change:top',()=>{this['_recalculate'](_0x2ff0ab,'top');}),this['listenTo'](_0x2ff0ab,'change:bottom',()=>{this['_recalculate'](_0x2ff0ab,'bottom');}),this['_alignToTargetRect'](_0x2ff0ab);const _0xaae2f6=this['_getItemBefore'](_0x2ff0ab);if(_0xaae2f6)this['_alignAfterItem'](_0xaae2f6,_0x2ff0ab)||this['_alignToTargetRect'](_0x2ff0ab);else this['_alignToTargetRect'](_0x2ff0ab);return this['_updateLastItem'](),this['view']['list']['add'](_0x2ff0ab),_0x2ff0ab;}['_alignForTopChange'](_0x559218){if(!_0x559218['content']['length'])return;const _0x229d89=this['_getItemBefore'](_0x559218);if(!_0x229d89)return;const _0x543525=this['_sidebarItemViewToAnnotation']['get'](_0x229d89),_0x27e215=this['_activeAnnotation'];_0x27e215&&_0x27e215===_0x543525?this['_alignAfterItem'](_0x229d89,_0x559218):this['_alignBeforeItem'](_0x559218,_0x229d89);}['_alignForBottomChange'](_0x533921){if(!_0x533921['content']['length'])return;const _0x4bb123=this['_getItemAfter'](_0x533921);if(!_0x4bb123)return;const _0x388e95=this['_sidebarItemViewToAnnotation']['get'](_0x4bb123),_0x2619bc=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x220c97=this['_activeAnnotation'];_0x220c97&&_0x220c97===_0x388e95&&_0x2619bc?(this['_alignBeforeItem'](_0x4bb123,_0x533921),this['_alignAfterItem'](_0x533921,_0x4bb123)):_0x220c97&&_0x220c97===_0x388e95?this['_alignBeforeItem'](_0x4bb123,_0x533921):this['_alignAfterItem'](_0x533921,_0x4bb123);}['_recalculate'](_0x322a3f,_0x33e20b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xe26b65,changedProp:_0x33d302}of this['_recalculateBuffer'])'top'===_0x33d302?this['_alignForTopChange'](_0xe26b65):this['_alignForBottomChange'](_0xe26b65);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x322a3f,'changedProp':_0x33e20b});}['getSidebarItemView'](_0x3c54cc){return this['_annotationToSidebarItemView']['get'](_0x3c54cc);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x566a81){const _0x568100=this['getSidebarItemView'](_0x566a81);this['stopListening'](_0x568100),this['stopListening'](_0x566a81['view']),_0x568100['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x566a81),this['_sidebarItemViewToAnnotation']['delete'](_0x568100);}['_createSidebarView'](){const _0x54ca3f=new H(this['context']['locale']);return _0x54ca3f['render'](),this['on']('change:_lastItem',(_0xd2495a,_0x3896e2,_0x36032b,_0x110a25)=>{_0x110a25&&_0x54ca3f['unbind']('minHeight'),_0x36032b?_0x54ca3f['bind']('minHeight')['to'](_0x36032b,'bottom'):_0x54ca3f['minHeight']=null;}),_0x54ca3f;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5e5d1e){const _0x42cc35=this['_sidebarItemViewToAnnotation']['get'](_0x5e5d1e),_0x4e3a07=_0x42cc35&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x42cc35)-0x1);return _0x4e3a07&&this['getSidebarItemView'](_0x4e3a07)||null;}['_getItemAfter'](_0x10a614){const _0x4dac5f=this['_sidebarItemViewToAnnotation']['get'](_0x10a614),_0x55ee05=_0x4dac5f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4dac5f)+0x1);return _0x55ee05&&this['getSidebarItemView'](_0x55ee05)||null;}['_alignBeforeItem'](_0x5d816a,_0x129145){_0x5d816a['updateHeight']();const _0x5a6413=G(_0x129145['bottom']+this['_spaceBetweenItems'],_0x5d816a['top']);return!!_0x5a6413&&(this['_setItemTop'](_0x129145,_0x129145['top']-_0x5a6413),!0x0);}['_alignAfterItem'](_0x4d4cc7,_0x383a22){_0x4d4cc7['updateHeight']();const _0x2affcb=G(_0x4d4cc7['bottom']+this['_spaceBetweenItems'],_0x383a22['top']);return!!_0x2affcb&&(this['_setItemTop'](_0x383a22,_0x383a22['top']+_0x2affcb,!0x1),!0x0);}['_alignToTargetRect'](_0x14c26b){const _0x3c3be8=this['_sidebarItemViewToAnnotation']['get'](_0x14c26b);if(!_0x3c3be8||!_0x3c3be8['target']||!_0x3c3be8['targetRect'])return;const _0x9a26b2=this['_getTargetTop'](_0x3c3be8,_0x3c3be8['targetRect']);this['_setItemTop'](_0x14c26b,_0x9a26b2);}['_getTargetTop'](_0x463714,_0x2434b8){if(null===_0x2434b8)return 0x0;if(_0x463714['target']instanceof _0x329766)return _0x2434b8['top'];{const _0x5f3c05=new _0x329766(this['view']['element'])['top'];return _0x2434b8['top']-_0x5f3c05;}}['_setItemTop'](_0x41e386,_0x3affe5,_0x18cd61=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x18cd61&&(_0x3affe5=Math['max'](_0x3affe5,this['_getMaxAvailableTop'](_0x41e386))),_0x41e386['top']=_0x3affe5;}['_getMaxAvailableTop'](_0x421621){let _0x16a076=this['_getItemBefore'](_0x421621),_0x54bbfd=0x0;for(;_0x16a076;)_0x16a076['updateHeight'](),_0x54bbfd+=this['_spaceBetweenItems']+_0x16a076['height'],_0x16a076=this['_getItemBefore'](_0x16a076);return _0x54bbfd;}}function G(_0x3a7fbd,_0x48a465){return Math['max'](_0x3a7fbd-_0x48a465,0x0);}function g(_0x14bdb7){return null!==_0x14bdb7&&'object'==typeof _0x14bdb7&&0x1===_0x14bdb7['nodeType'];}class e extends _0x80d5c4{['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(_0xfdfd71){super(_0xfdfd71),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4ca5b9(),this['_refreshPositioningDebounced']=_0x241c19(()=>{_0xfdfd71['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x540912=this['context']['plugins']['get'](j),_0x20dd69=this['context']['plugins']['get'](z);_0x540912['register']('wideSidebar',this),_0x20dd69['container']&&_0x540912['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x381c9){if(_0x381c9===this['activeAnnotation'])return;const _0x186b0d=this['context']['plugins']['get'](z);_0x186b0d['_activeAnnotation']=_0x381c9;const _0x17d274=this['activeAnnotation'];_0x186b0d['refresh']({'blurredAnnotation':_0x17d274,'activatedAnnotation':_0x381c9}),this['activeAnnotation']=_0x381c9;}['attach'](_0x30c20e){this['annotations']=_0x30c20e;const _0x259290=this['context']['plugins']['get'](z);if(_0x259290['_annotations']=_0x30c20e,this['isAttached'])throw new _0x47ee64('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x259290,'set:container',()=>{this['detach'](),this['listenTo'](_0x259290,'change:container',_0x5de345=>{_0x5de345['off'](),this['attach'](_0x30c20e);});}),_0x259290['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5089e0=_0x39d0cf=>{_0x39d0cf['updateTargetRect'](),_0x259290['addAnnotation'](_0x39d0cf);};for(const _0x498ac2 of _0x30c20e)_0x5089e0(_0x498ac2);this['listenTo'](_0x30c20e,'add',(_0x1be914,_0x4f17f4)=>{_0x5089e0(_0x4f17f4);}),this['listenTo'](_0x30c20e,'remove',(_0x2bbe77,_0x108cf8,_0x450de2)=>{_0x259290['rearrange']({'removedAnnotation':_0x108cf8,'previousAnnotation':_0x30c20e['get'](_0x450de2-0x1),'nextAnnotation':_0x30c20e['get'](_0x450de2+0x1)}),_0x108cf8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x30c20e,'focus',(_0x55b9fa,_0x20b9be)=>{this['setActiveAnnotation'](_0x20b9be);}),this['listenTo'](_0x30c20e,'blur',()=>{this['setActiveAnnotation'](null);});const _0x36b7b0=this['context']instanceof _0x3cbf37?this['context']['editors']:new _0x4ca5b9([this['context']]);for(const _0x4492bb of _0x36b7b0)this['_integrateWithEditorAnnotations'](_0x4492bb);this['listenTo'](_0x36b7b0,'add',(_0x305d98,_0x4078c8)=>{this['listenTo'](_0x4078c8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4078c8);});}),this['listenTo'](_0x36b7b0,'remove',(_0x6bc8bb,_0x3e4dcb)=>{_0x3e4dcb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3e4dcb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x47ee64('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4e5422=this['context']['plugins']['get'](z);_0x4e5422['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4e5422),this['stopListening'](this['annotations']),this['context']instanceof _0x3cbf37&&this['stopListening'](this['context']['editors']);for(const _0x56cf81 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x56cf81);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x37a069){if(!_0x37a069['plugins']['has']('EditorAnnotations'))return;const _0x173876=_0x37a069['plugins']['get']('EditorAnnotations'),_0x457836=()=>{const _0x44ab3a=_0x173876['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x44ab3a[0x0]||null);};this['listenTo'](_0x173876,'refresh',_0x457836),this['listenTo'](_0x173876,'blur',(_0x472f04,{isAnnotationTracked:_0x17448e})=>{this['activeAnnotation']&&_0x17448e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x173876,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x26aac6=>{_0x173876['hasDomSelection']()&&(_0x457836(),_0x26aac6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x173876);}['_destroyEditorAnnotationsIntegration'](_0x41d55a){this['stopListening'](_0x41d55a),this['_editorAnnotations']['remove'](_0x41d55a);}}class C extends _0x1a5bd1{['counterView'];constructor(_0x2c228c){super(_0x2c228c);const _0x5dca2f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xe6bf34,_0x1832f9)=>_0xe6bf34?'...':_0x1832f9['toString']()),this['set']('annotationType',''),this['icon']=_0x1e356c,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5dca2f['to']('annotationType',_0x14bccf=>'ck-annotation-counter__badge--'+_0x14bccf),_0x5dca2f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5dca2f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x80d5c4{['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(_0x1c765d){super(_0x1c765d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x48908c())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4ca5b9(),this['_refreshPositioningDebounced']=_0x241c19(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x158ef7(this['context']['locale']),this['balloonPanelView']=new _0xeefad1(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x309c60){this['annotations']=_0x309c60;const _0x18fc84=this['context']['plugins']['get'](z),_0x482066=this['balloonPanelView'];if(_0x18fc84['_annotations']=_0x309c60,this['isAttached'])throw new _0x47ee64('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x18fc84,'set:container',()=>{this['detach'](),this['listenTo'](_0x18fc84,'change:container',_0x50ec48=>{_0x50ec48['off'](),this['attach'](_0x309c60);});}),_0x18fc84['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2b2d12=_0xdca863=>{const _0x1751ff=new C(this['context']['locale']);_0x18fc84['addAnnotation'](_0xdca863,_0x1751ff),this['_annotationToNarrowView']['set'](_0xdca863,_0x1751ff),_0x1751ff['bind']('isDirty','annotationType','number')['to'](_0xdca863['view'],'isDirty','type','length'),_0x1751ff['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x482066['content']['first']!==_0xdca863['view']?(this['_showBalloon'](_0xdca863),_0xdca863['view']['element']['focus'](),this['setActiveAnnotation'](_0xdca863)):this['setActiveAnnotation'](null);});};for(const _0x26a01d of _0x309c60)_0x2b2d12(_0x26a01d);this['listenTo'](_0x309c60,'add',(_0x140563,_0x226ef6)=>{_0x2b2d12(_0x226ef6);}),this['listenTo'](_0x309c60,'remove',(_0x28567a,_0x2a7aef,_0x16b392)=>{this['_annotationToNarrowView']['get'](_0x2a7aef)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2a7aef),_0x18fc84['rearrange']({'removedAnnotation':_0x2a7aef,'previousAnnotation':_0x309c60['get'](_0x16b392-0x1),'nextAnnotation':_0x309c60['get'](_0x16b392+0x1)}),_0x2a7aef===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x309c60,'focus',(_0x11b442,_0x5cf07c)=>{this['setActiveAnnotation'](_0x5cf07c);}),this['listenTo'](_0x309c60,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x14d727,_0x1e2ba1)=>{_0x1e2ba1['keyCode']===_0x19dddc['esc']&&_0x482066['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x482066['content']['first']),this['_hideBalloon'](),_0x1e2ba1['stopPropagation'](),_0x1e2ba1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x142c94,_0x10014f)=>{const _0x131d8f=_0x10014f['target'];_0x482066['isVisible']&&_0x482066['element']['contains'](_0x131d8f)||_0x18fc84['view']['element']['contains'](_0x131d8f)||_0x142c94['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xd69957=>_0xd69957['contains'](_0x131d8f))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1e90cb=this['context']instanceof _0x3cbf37?this['context']['editors']:new _0x4ca5b9([this['context']]);for(const _0x427b7b of _0x1e90cb)this['_integrateWithEditorAnnotations'](_0x427b7b);this['listenTo'](_0x1e90cb,'add',(_0x2d1a1a,_0x28ebf5)=>{this['listenTo'](_0x28ebf5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x28ebf5);});}),this['listenTo'](_0x1e90cb,'remove',(_0x3d7fe8,_0x40b3ea)=>{_0x40b3ea['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x40b3ea['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x733932){if(_0x733932===this['activeAnnotation'])return;const _0x249b3b=this['context']['plugins']['get'](z);if(_0x249b3b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x733932,'disableAnimationOnActivatedAnnotation':!0x0}),_0x733932)_0x249b3b['getSidebarItemView'](_0x733932)?this['_showBalloon'](_0x733932):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x733932;}['detach'](){if(!this['isAttached'])throw new _0x47ee64('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x115f67=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xd66d27=>_0xd66d27['destroy']()),this['_annotationToNarrowView']['clear'](),_0x115f67['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3cbf37&&this['stopListening'](this['context']['editors']);for(const _0x52be78 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x52be78);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'](_0x519f39){if(!_0x519f39['plugins']['has']('EditorAnnotations'))return;const _0x376e17=_0x519f39['plugins']['get']('EditorAnnotations'),_0x1084d9=this['context']['plugins']['get'](z),_0x2de254=this['annotations'],_0x2f864d=this['balloonPanelView'],_0x1d8e41=()=>{const _0x254c42=_0x376e17['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x254c42),this['setActiveAnnotation'](_0x254c42[0x0]||null);};this['listenTo'](_0x376e17,'refresh',_0x1d8e41),this['listenTo'](_0x376e17,'blur',(_0x2058e1,{isAnnotationTracked:_0x2c6fe5})=>{this['activeAnnotation']&&_0x2c6fe5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x376e17,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2de254,'blur',_0x4097f1=>{_0x376e17['hasDomSelection']()&&_0x4097f1['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3af462,_0xb8b709)=>{const _0x3862af=_0xb8b709['target'];_0x2f864d['isVisible']&&_0x2f864d['element']['contains'](_0x3862af)||_0x1084d9['view']['element']['contains'](_0x3862af)||this['activeAnnotation']&&_0x376e17['hasDomSelection']()&&(_0x1d8e41(),_0x3af462['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x376e17);}['_destroyEditorAnnotationsIntegration'](_0x4eba78){_0x4eba78&&(this['stopListening'](_0x4eba78),this['_editorAnnotations']['remove'](_0x4eba78));}['_setSelectedAnnotations'](_0x4f2665){for(const _0x342532 of this['_selectedAnnotations'])_0x4f2665['includes'](_0x342532)||this['_manuallyClosedAnnotationViews']['delete'](_0x342532['view']);this['_selectedAnnotations']=_0x4f2665;}['_refreshPositioning'](){const _0x418c30=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x418c30['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x207a40){if(this['_manuallyClosedAnnotationViews']['has'](_0x207a40['view']))return;const _0x3c77b8=this['balloonPanelView']['content']['first'];_0x3c77b8!==_0x207a40['view']?(_0x3c77b8&&this['_detachListeners'](_0x3c77b8),this['_attachListeners'](_0x207a40['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x207a40['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4a2381=this['balloonPanelView']['content']['first'],_0x4853ca=_0x4a2381&&this['annotations']['getByView'](_0x4a2381);if(!_0x4853ca||!this['_annotationToNarrowView']['has'](_0x4853ca))return;const _0x94f052=this['_annotationToNarrowView']['get'](_0x4853ca)['element'],_0x213c29=(function(){const _0x49aaaf=_0xeefad1['defaultPositions'];return[_0x49aaaf['southArrowNorthEast'],_0x49aaaf['northArrowSouthEast'],_0x49aaaf['southArrowNorth'],_0x49aaaf['northArrowSouth'],_0x49aaaf['southArrowNorthWest'],_0x49aaaf['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x94f052,'positions':_0x213c29});}['_hideBalloon'](){const _0x431871=this['balloonPanelView'],_0x17a45a=_0x431871['content']['first'];_0x17a45a&&(this['_detachListeners'](_0x17a45a),_0x431871['unpin'](),_0x431871['content']['clear']());}['_attachListeners'](_0x3a733c){this['listenTo'](_0x3a733c,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3a733c,'Esc',(_0x22df3f,_0x5d87ee)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3a733c),this['_hideBalloon'](),_0x5d87ee();});}['_detachListeners'](_0x27d828){this['stopListening'](_0x27d828);}}class c extends _0x226390{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2e29f3,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe41d8b){super(_0xe41d8b),_0xe41d8b['editing']['view']['addObserver'](_0x28044f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xe41d8b['plugins']['get'](_0x2e29f3),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xb0f365=this['editor']['plugins']['get'](j);_0xb0f365['context']===this['editor']&&(_0xb0f365['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x37451a,_0x263e62)=>{const _0x4e6cd6=this['_balloon'];if(this['isAttached']&&_0x4e6cd6['visibleView']){const _0x3de031=this['annotations']['getByView'](_0x4e6cd6['visibleView']);_0x3de031&&this['_closeAnnotation'](_0x3de031),_0x263e62();}}));}['afterInit'](){const _0x2f4600=this['editor']['plugins']['get'](j);_0x2f4600['context']===this['editor']&&(_0x2f4600['hasActive']()||_0x2f4600['switchTo']('inline'));}['setActiveAnnotation'](_0x27dcb3){_0x27dcb3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x27dcb3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x27dcb3)&&this['_addAnnotationToBalloon'](_0x27dcb3,!0x0),_0x27dcb3['isActive']=!0x0),_0x27dcb3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x27dcb3);}['attach'](_0x56c8ee){this['annotations']=_0x56c8ee;const _0x5f0fc4=this['editor']['plugins']['get'](j),_0x57d267=this['_balloon'];if(this['isAttached'])throw new _0x47ee64('inlineannotations-attach-already-attached',this);if(_0x5f0fc4['context']!==this['editor'])throw new _0x47ee64('inlineannotations-not-allowed-with-context',this);const _0xa4fd27=this['editor']['plugins']['get'](b);this['listenTo'](_0xa4fd27,'refresh',()=>{const _0x3aa87a=_0xa4fd27['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5143c8,_0x4f42c0;!this['_forceRefresh']&&(_0x5143c8=_0x3aa87a,_0x4f42c0=this['_selectedAnnotations'],_0x5143c8['length']===_0x4f42c0['length']&&_0x5143c8['every'](_0x548a37=>_0x4f42c0['includes'](_0x548a37)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3aa87a),this['setActiveAnnotation'](_0x3aa87a[0x0]||null));}),this['listenTo'](_0xa4fd27,'blur',(_0x2feef9,{isAnnotationTracked:_0x3ac260})=>{this['activeAnnotation']&&_0x3ac260(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x202344,_0x1b67de,_0x32ce04)=>{_0x32ce04||this['setActiveAnnotation'](null);}),this['listenTo'](_0x56c8ee,'remove',(_0x546975,_0x4a7a02)=>{this['_removeAnnotationFromBalloon'](_0x4a7a02),_0x4a7a02===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x57d267,'change:visibleView',(_0x3755e,_0x5de3ab,_0x1d6ad5,_0x31d65f)=>{_0x31d65f&&this['stopListening'](_0x31d65f);const _0x2bedf9=_0x56c8ee['getByView'](_0x1d6ad5);_0x1d6ad5&&_0x2bedf9&&(this['listenTo'](_0x1d6ad5,'change:height',()=>{_0x57d267['updatePosition']();}),this['listenTo'](_0x1d6ad5,'Esc',()=>{this['_closeAnnotation'](_0x2bedf9),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2bedf9&&this['setActiveAnnotation'](_0x2bedf9));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x57d267['visibleView']&&(_0x56c8ee['getByView'](_0x57d267['visibleView'])&&_0x57d267['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 _0x47ee64('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1feab8 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1feab8);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x339637){for(const _0x523785 of this['_selectedAnnotations'])_0x339637['includes'](_0x523785)||this['_manuallyClosed']['delete'](_0x523785);for(const _0x34705c of this['annotations'])_0x339637['includes'](_0x34705c)||this['_removeAnnotationFromBalloon'](_0x34705c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3f0d6e of _0x339637)this['_addAnnotationToBalloon'](_0x3f0d6e);}this['_selectedAnnotations']=_0x339637;}['_addAnnotationToBalloon'](_0x508f99,_0x1fc3ea=!0x1){this['_manuallyClosed']['has'](_0x508f99)||(this['_addedAnnotations']['has'](_0x508f99)||this['_balloon']['hasView'](_0x508f99['view'])||(this['_addedAnnotations']['add'](_0x508f99),this['_balloon']['add']({'stackId':_0x508f99['view']['id'],'view':_0x508f99['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x508f99)}})),_0x1fc3ea&&this['_balloon']['showStack'](_0x508f99['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4ec9e2){const _0x13e634=_0x4ec9e2['target'],_0x5bec1b=this['editor']['editing']['view'],_0x3e504b=_0x5bec1b['document']['selection']['getFirstRange'](),_0x37e282=_0x5bec1b['domConverter']['viewRangeToDom'](_0x3e504b);if(_0x37e282['collapse'](!0x0),_0x13e634){if(_0x13e634 instanceof _0x329766)return _0x13e634;let _0x4db6f1=[];for(const _0x32e75d of _0x13e634)_0x4db6f1['push'](...F(_0x32e75d['getClientRects']()));_0x4db6f1=function(_0x4fefe9){const _0x4aa2a7=[];let _0x1ce460=_0x4fefe9[0x0];for(let _0x4aec28=0x1;_0x4aec28<_0x4fefe9['length'];_0x4aec28++)P(_0x1ce460,_0x4fefe9[_0x4aec28])?_0x1ce460['width']+=_0x4fefe9[_0x4aec28]['width']:(_0x4aa2a7['push'](_0x1ce460),_0x1ce460=_0x4fefe9[_0x4aec28]);return _0x4aa2a7['push'](_0x1ce460),_0x4aa2a7;}(_0x4db6f1);const _0x265a04=_0x37e282['getBoundingClientRect']();return _0x4db6f1['find'](_0x599b3e=>_0x599b3e['top']<=_0x265a04['top']&&_0x599b3e['bottom']>=_0x265a04['bottom']&&_0x599b3e['left']<=_0x265a04['left']&&_0x599b3e['right']>=_0x265a04['right'])||_0x4db6f1[0x0];}return _0x4ec9e2['targetRect']||_0x37e282;}['_removeAnnotationFromBalloon'](_0x554ede){this['_addedAnnotations']['has'](_0x554ede)&&this['_balloon']['hasView'](_0x554ede['view'])&&(this['_addedAnnotations']['delete'](_0x554ede),this['_balloon']['remove'](_0x554ede['view']));}['_closeAnnotation'](_0x25811c){this['_manuallyClosed']['add'](_0x25811c),this['_removeAnnotationFromBalloon'](_0x25811c);}}function F(_0x3f3e8b){return Array['from'](_0x3f3e8b)['map'](DOMRect['fromRect']);}function P(_0x451ef3,_0x25aa5d){return _0x451ef3['top']===_0x25aa5d['top']&&_0x451ef3['bottom']===_0x25aa5d['bottom']&&_0x451ef3['right']===_0x25aa5d['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x23a46d,_0x3f45df){super(_0x23a46d),this['set']('isEmpty',!_0x3f45df['length']),this['focusTracker']=new _0x3ada3a(),this['_annotationViews']=_0x3f45df,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x16ebe1({'focusables':_0x3f45df,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3f45df,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3f45df,'remove',(_0x2c7e5b,_0x15d743)=>{_0x15d743['isActive']&&this['focus'](),_0x3f45df['length']||(this['isEmpty']=!0x0);});const _0x702673=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x23a46d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3f45df},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x702673['if']('isEmpty','ck-hidden',_0x1e4d4f=>!_0x1e4d4f)]},'children':[{'text':N(_0x23a46d,'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 _0x375fa4 of this['_annotationViews'])this['focusTracker']['add'](_0x375fa4['element']);this['_annotationViews']['on']('change',(_0x5c0510,{added:_0x13825b,removed:_0x5b8d43})=>{for(const _0xc2dec4 of _0x13825b)this['focusTracker']['add'](_0xc2dec4['element']);for(const _0x3e7727 of _0x5b8d43)this['focusTracker']['remove'](_0x3e7727['element']);});}}class p extends _0x80d5c4{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x1086e5){super(_0x1086e5),this['archivedThreads']=new _0x4ca5b9();}['init'](){const _0x4047df=this['context'],_0x5f2866=_0x4047df['plugins']['get'](o),_0x12d0be=_0x4047df['plugins']['get'](y);this['listenTo'](_0x5f2866,'addCommentThread',(_0x4784a5,{threadId:_0x359ffc})=>{const _0x4478d1=_0x5f2866['getCommentThread'](_0x359ffc);_0x4478d1['archivedAt']&&this['archivedThreads']['add'](_0x4478d1,this['_calculatePosition'](_0x4478d1['archivedAt'])),this['listenTo'](_0x4478d1,'change:archivedAt',(_0x1c669a,_0x41256c,_0x32fc30)=>{_0x32fc30?this['archivedThreads']['has'](_0x4478d1)||this['archivedThreads']['add'](_0x4478d1,this['_calculatePosition'](_0x4478d1['archivedAt'])):this['archivedThreads']['has'](_0x4478d1)&&this['archivedThreads']['remove'](_0x4478d1);});}),this['listenTo'](_0x5f2866,'removeCommentThread',(_0x5a31e4,{threadId:_0x1d8a44})=>{const _0x2eb56f=_0x5f2866['getCommentThread'](_0x1d8a44);this['stopListening'](_0x2eb56f),this['archivedThreads']['has'](_0x2eb56f)&&this['archivedThreads']['remove'](_0x2eb56f);},{'priority':'highest'}),this['listenTo'](_0x12d0be['collection'],'focus',(_0x18ec93,_0x2bfe12)=>{_0x2bfe12['isVisible']||(_0x2bfe12['isActive']=!0x0,_0x12d0be['activate'](_0x2bfe12));});}['_calculatePosition'](_0x2780b7){const _0x5559e9=[...this['archivedThreads']]['findIndex'](_0x48cd3e=>_0x48cd3e['archivedAt']<_0x2780b7);return _0x5559e9>-0x1?_0x5559e9:this['archivedThreads']['length'];}}class a extends _0x226390{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x21aea1];}constructor(_0x37ce81){super(_0x37ce81),this['annotationViews']=new _0xb4f04b(),this['_pendingThreads']=[];}['init'](){const _0x33133d=this['editor'],_0x5bd0d=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x33133d['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1a5bd1,!0x0)),_0x33133d['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x41666c=this['_createCommentsArchiveButton'](_0x189f4e);return _0x41666c['set']({'role':'menuitemcheckbox'}),_0x41666c;});const _0x60578f=_0x33133d['plugins']['get'](p),_0x2f4bf1=_0x33133d['plugins']['get']('Annotations'),_0x343463=_0x33133d['plugins']['get']('CommentsRepository');_0x60578f['archivedThreads']['forEach'](_0x479625=>{this['_handleNewThread'](_0x479625);}),this['listenTo'](_0x60578f['archivedThreads'],'add',(_0x143173,_0x1d9c13)=>{this['_handleNewThread'](_0x1d9c13);}),this['listenTo'](_0x2f4bf1['collection'],'add',(_0x407cb4,_0x354fbb)=>{const _0x586ea7=this['_pendingThreads']['find'](_0x275008=>{const _0x264029=_0x343463['_threadToController']['get'](_0x275008);return _0x264029&&_0x354fbb['innerView']===_0x264029['view'];});if(_0x586ea7){const _0x15e0c7=this['_calculatePosition'](_0x586ea7['archivedAt']);this['annotationViews']['add'](_0x354fbb['view'],_0x15e0c7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x586ea7),0x1);}}),this['listenTo'](_0x60578f['archivedThreads'],'remove',(_0x253f90,_0x3dd931)=>{const _0x555b00=_0x33133d['config']['get']('collaboration.channelId');if(!_0x555b00||_0x3dd931['channelId']===_0x555b00){if(this['_pendingThreads']['includes'](_0x3dd931))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3dd931),0x1);else{const _0x46f0f9=_0x343463['_threadToController']['get'](_0x3dd931),_0x45af7c=_0x2f4bf1['getByInnerView'](_0x46f0f9['view']);this['annotationViews']['remove'](_0x45af7c['view']),this['stopListening'](_0x45af7c['focusableElements']);}}}),this['listenTo'](_0x2f4bf1['collection'],'add',(_0x11e81b,_0x903742)=>{this['listenTo'](_0x903742,'escape',_0x5bd0d);}),this['listenTo'](_0x2f4bf1['collection'],'remove',(_0x8a6303,_0x5eca4a)=>{this['stopListening'](_0x5eca4a,'escape',_0x5bd0d);});}['_handleNewThread'](_0x2761d4){const _0x3af496=this['editor']['plugins']['get']('CommentsRepository'),_0x4e1e58=this['editor']['plugins']['get']('Annotations'),_0x5b33e1=this['editor']['config']['get']('collaboration.channelId');if(!_0x5b33e1||_0x2761d4['channelId']===_0x5b33e1){const _0x49d403=_0x3af496['_threadToController']['get'](_0x2761d4);if(!_0x49d403)return void this['_pendingThreads']['push'](_0x2761d4);const _0x22b55c=this['_calculatePosition'](_0x2761d4['archivedAt']),_0x4a616c=_0x4e1e58['getByInnerView'](_0x49d403['view']);_0x4a616c['isVisible']&&_0x4e1e58['_visibleAnnotations']['remove'](_0x4a616c),this['annotationViews']['add'](_0x4a616c['view'],_0x22b55c);}}['_calculatePosition'](_0x260d57){const _0x345fff=this['editor']['config']['get']('collaboration.channelId'),_0x3f9b34=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x3f1c49=>_0x3f1c49['channelId']===_0x345fff)['findIndex'](_0x825a6d=>_0x825a6d['archivedAt']<_0x260d57);return _0x3f9b34<0x0||_0x3f9b34>this['annotationViews']['length']?this['annotationViews']['length']:_0x3f9b34-0x1;}['_toggleDialog'](){const _0x118732=this['editor'],_0x15e8a8=_0x118732['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x118732['locale'],this['annotationViews'])),'commentsArchive'===_0x15e8a8['id']?_0x15e8a8['hide']():_0x15e8a8['show']({'id':'commentsArchive','title':N(_0x118732['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1d60e9,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x16088a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x252052,_0x96ac01=!0x1){const _0x46cd2f=this['editor']['locale'],_0x403544=this['editor']['plugins']['get']('Dialog'),_0xf0a435=new _0x252052(_0x46cd2f);return _0xf0a435['bind']('isEnabled')['to'](this,'isEnabled'),_0xf0a435['bind']('isOn')['to'](_0x403544,'id',_0xee6e47=>'commentsArchive'===_0xee6e47),_0xf0a435['set']({'label':N(_0x46cd2f,'COMMENTS_ARCHIVE'),'icon':_0x1d60e9,'isToggleable':!0x0}),_0x96ac01&&(_0xf0a435['tooltip']=!0x0),this['listenTo'](_0xf0a435,'execute',()=>this['_toggleDialog']()),_0xf0a435;}['_hideDialogOnAnnotationEscape']=_0x558090=>{const _0x38e0a0=_0x558090['source'];if(!this['annotationViews']['has'](_0x38e0a0['view']))return;const _0x1b7565=this['editor']['plugins']['get']('Dialog');_0x1b7565['isOpen']&&'commentsArchive'===_0x1b7565['id']&&(_0x1b7565['hide'](),_0x558090['stop']());};}class gi extends _0x226390{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 _0x581330,ContextPlugin as _0x1756af,PendingActions as lt,Command as _0xb3b2c2,Plugin as _0xeeaaab,Context as _0x3609be}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0xa31544,uid as _0x1797dc,KeystrokeHandler as jt,FocusTracker as _0x5d97f7,diff as _0x51dad5,Collection as _0x24de43,Rect as _0x2770d5,CKEditorError as _0x55af7e,first as _0x201e2d,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x3faab5,keyCodes as _0xdebc38}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x5290df,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x1e0387,trimHtml as _0x35cceb,LateFocusDropdownButtonView as _0x1662bb,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0xabbee7}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x20001b}from'es-toolkit/compat';import{IconUndo as _0x3961d6,IconCheck as _0x530821,IconPencil as _0x158452,IconRemoveComment as _0x7e5058,IconThreeVerticalDots as _0x3d31ed,IconAddComment as _0x1797e5,IconCommentsArchive as _0x50ad17}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x3261e3,ButtonView as _0x1db6f3,ViewCollection as _0x1f1fea,createDropdown as _0x53c395,ListView as _0x15b6fa,focusChildOnDropdownOpen as _0x3accc2,ListItemView as _0x4363da,MenuBarMenuListItemButtonView as _0x19b513,BodyCollection as _0x9bd70f,BalloonPanelView as _0x580a5d,ContextualBalloon as _0x54b6ce,Dialog as _0x119b5,DialogViewPosition as _0x51e3c0}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x1fb595}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}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 _0x4b75c9}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3f4190}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xa31544(){['model'];['view'];constructor(_0x55187d,_0x1f2e61){super(),this['model']=_0x55187d,this['model']['_isAttached']=!0x0,this['view']=_0x1f2e61,this['listenTo'](_0x1f2e61,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1f2e61,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1f2e61,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1f2e61,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1f2e61,'addComment',(_0x2d88fb,_0x8f8c5e)=>this['addComment'](_0x8f8c5e)),this['listenTo'](_0x1f2e61,'updateComment',(_0x2dd0c2,_0x2456ea,_0x4904f8)=>this['updateComment'](_0x2456ea,_0x4904f8)),this['listenTo'](_0x1f2e61,'removeComment',(_0x2bf660,_0x2fca27)=>this['removeComment'](_0x2fca27));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x4cd590){this['model']['addComment']({'content':_0x4cd590,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2d1775,_0x1559fc){this['model']['getComment'](_0x2d1775)['update']({'content':_0x1559fc});}['removeComment'](_0x358847){this['model']['getComment'](_0x358847)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x2d8173,_0x2567e7,_0x1222ad){const t=_0x2d8173['t'];switch(_0x2567e7){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'},_0x1222ad);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'},_0x1222ad);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'},_0x1222ad);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'},_0x1222ad);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1222ad);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'},_0x1222ad);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'},_0x1222ad);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'},_0x1222ad);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x41da05,_0x5cf713){super(_0x41da05);const _0x3532dc=_0x1797dc();this['main']=this['createCollection'](),this['editable']=new $t(_0x41da05,_0x5cf713,void 0x0,{'label':()=>N(_0x41da05,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x41da05['uiLanguageDirection'],'lang':_0x41da05['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x3532dc},'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 Ft extends Ut{['view'];constructor(_0x1980dd){super(_0x1980dd),this['view']=new Vt(_0x1980dd['locale'],_0x1980dd['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1c31b2=this['editor']['editing']['view'],_0x2fe390=this['view']['editable'],_0x3d07a3=_0x1c31b2['document']['getRoot']();_0x2fe390['name']=_0x3d07a3['rootName'],this['view']['render']();const _0x74a255=_0x2fe390['element'];this['setEditableElement'](_0x2fe390['name'],_0x74a255),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1c31b2['attachDomRoot'](_0x74a255),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xa31544(_0x581330){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x5a83a1={}){function _0x480573(_0x47b86c){return _0x47b86c['map'](_0x45ee7a=>String['fromCharCode'](_0x45ee7a))['join']('');}(_0x5a83a1=Object['assign']({},_0x5a83a1))['plugins']||(_0x5a83a1['plugins']=Rt['defaultPlugins']),super(_0x5a83a1),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x480573([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x480573([0x76,0x69,0x65,0x77])][_0x480573([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x480573([0x61,0x75,0x74,0x6f]),this[_0x480573([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x480573([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x480573([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x480573([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x480573([0x6f,0x6b])});}['create'](){const _0x74f00a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x74f00a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x108b2e=>{const _0x1dd865=this['model']['document']['getRoot'](),_0xaaa0b1=_0x1dd865&&_0x1dd865['getChild'](_0x1dd865['childCount']-0x1);_0x108b2e['setSelection'](_0xaaa0b1,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2ed6c6=this['editing']['view'],_0x12f24a=_0x2ed6c6['document']['getRoot'](),_0xa87f60=_0x12f24a['getChild'](0x0);_0x12f24a['childCount']>0x1||!_0xa87f60||'p'!=_0xa87f60['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x2ed6c6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xa87f60['placeholder']=this['placeholder']),St({'view':_0x2ed6c6,'element':_0xa87f60,'keepOnFocus':!0x0}),this['placeholderElement']=_0xa87f60);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4802cf,_0x3086f0={}){super(_0x4802cf),this['editor']=null,this['_editorConfig']=_0x3086f0,this['set']('value',_0x3086f0['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x4802cf,'Reply...')),this['set']('submitLabel',N(_0x4802cf,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5d97f7(),this['focusCycler']=new _0x3261e3({'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',(_0x5bfb11,_0x518556)=>{this['cancelButtonView']['fire']('execute'),_0x518556();}),this['keystrokes']['set']('Ctrl+Enter',(_0x45c28b,_0x565999)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x565999());}),this['on']('submit',(_0x5f0d84,_0x559bd6)=>{_0x559bd6['length']>0xfde8?(alert(N(_0x4802cf,'TOO_LONG_COMMENT_ALERT',[_0x559bd6['length'],0xfde8])),_0x5f0d84['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x5d697a=this['editor'];this['element']['insertBefore'](_0x5d697a['ui']['element'],this['element']['firstChild']),_0x5d697a['model']['document']['on']('change',()=>this['value']=_0x5d697a['getData']()),_0x5d697a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5d697a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x10c51d){-0x1===_0x10c51d?(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:_0x338784}=this,_0x33e6a5=new _0x1db6f3(_0x338784);return _0x33e6a5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x33e6a5['withText']=!0x0,_0x33e6a5['bind']('label')['to'](this,'submitLabel'),_0x33e6a5['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x33e6a5['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x272db3,_0x506758)=>!_0x506758&&!!_0x272db3['trim']()),_0x33e6a5;}['_createCancelButton'](){const {locale:_0x16cdbb}=this,_0x490f89=new _0x1db6f3(_0x16cdbb);return _0x490f89['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x490f89['label']=N(_0x16cdbb,'Cancel'),_0x490f89['withText']=!0x0,_0x490f89['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x490f89;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x315a0b=>{this['focusTracker']['add'](_0x315a0b['element']);}),this['focusables']['on']('change',(_0x2bffe1,_0x24874e)=>{for(const _0x443103 of Array['from'](_0x24874e['added'])['reverse']())this['focusTracker']['add'](_0x443103['element']);});}}class ie extends kt{constructor(_0xc82ab0,_0x30c2de,_0x319365){super(_0xc82ab0),this['commentInputView']=new os(_0xc82ab0,_0x319365),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x27f42a,_0x10450e)=>_0x27f42a||!!_0x10450e),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 _0x5290df(_0xc82ab0,_0x30c2de),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'](_0x58ef1f){this['commentInputView']['focus'](_0x58ef1f);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xad203,_0x7d6842)=>{const {submitButtonView:_0x4ba747,cancelButtonView:_0x1c9223,editor:_0x1f47d8}=this['commentInputView'];[_0x4ba747['element'],_0x1c9223['element'],_0x1f47d8?_0x1f47d8['editing']['view']['getDomRoot']():null]['filter'](_0x5c399f=>_0x5c399f)['some'](_0xeff76d=>_0xeff76d['contains'](_0x7d6842['target']))||(this['focus'](),_0x7d6842['preventDefault']());});}}class rs extends kt{constructor(_0x5ed0d7){super(_0x5ed0d7);const _0x2f6b67=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2f6b67['to']('count',_0x256fb9=>N(_0x5ed0d7,'NUMBER_OF_COMMENTS',_0x256fb9))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5d7838,_0x339344,_0x58bf82){super(_0x5d7838);const _0x17decc=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x339344['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x339344,this['_config']=_0x58bf82,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5515d4=>this['commentViews']['map'](_0x37c0e4=>_0x37c0e4['element'])['includes'](_0x5515d4['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5d7838),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xb55f42=>_0xb55f42-this['_config']['maxCommentsWhenCollapsed']);for(const _0x14d4f0 of _0x339344['comments'])this['_handleNewCommentModel'](_0x14d4f0);this['_handleInfoComment'](),this['listenTo'](_0x339344['comments'],'add',(_0x2e60c0,_0x5cbcc3)=>{const _0x1ef194=this['_calculatePosition'](_0x5cbcc3);this['length']++,this['_handleNewCommentModel'](_0x5cbcc3,_0x1ef194),this['refreshVisibleViews']();}),this['listenTo'](_0x339344['comments'],'remove',(_0x478d01,_0x47f205)=>{this['length']--,this['_handleRemoveCommentModel'](_0x47f205),this['refreshVisibleViews']();}),this['listenTo'](_0x339344,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x339344,'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',_0x17decc['if']('length','ck-hidden',_0xca6673=>!_0xca6673)],'aria-label':N(_0x5d7838,'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'](_0xd10e3){-0x1===_0xd10e3?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3850da of this['commentViews'])_0x3850da['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1e2174,_0x412ab8){const _0x556716=new this['_config']['CommentView'](this['locale'],_0x1e2174,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x556716['viewUid']=_0x1e2174['id'],_0x556716['delegate']('removeComment')['to'](this),_0x556716['delegate']('updateComment')['to'](this),_0x556716['delegate']('resolveCommentThread')['to'](this),_0x556716['delegate']('editorReady')['to'](this),_0x556716['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x556716,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x556716,_0x412ab8);}['_calculatePosition'](_0x3309ba){const _0x5e14f3=this['_model']['_findOptimalIndex'](_0x3309ba);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3309ba['authoredAt']?_0x5e14f3-0x1:_0x5e14f3:_0x5e14f3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5c20aa={'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'],_0x5c20aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5c20aa));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1c2dc){const _0x48deac=this['commentViews']['remove'](_0x1c2dc['id']);this['stopListening'](_0x48deac),_0x48deac['isEditMode']&&this['_updateHasDirtyComment'](),_0x48deac['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x59df65=>_0x59df65['isEditMode']);}['_rearrangeCollapse'](){const _0x5f021c=function(_0x3fb733){const _0x4094c0=new _0x24de43();for(const _0x3cdbe3 of _0x3fb733)_0x4094c0['add'](_0x3cdbe3);return _0x4094c0;}(this['commentViews']),_0x3178b0=this['_collapsedCommentsView']['count'];for(let _0x56ec34=0x1;_0x56ec34<=_0x3178b0;_0x56ec34++)_0x5f021c['remove'](0x1);for(const _0x5c3270 of _0x5f021c)_0x5c3270['collapse']();_0x3178b0>0x0&&_0x5f021c['add'](this['_collapsedCommentsView'],0x1),ns(_0x51dad5(Array['from'](this['visibleViews']),Array['from'](_0x5f021c)),this['visibleViews'],_0x5f021c);}['_rearrangeExpand'](){ns(_0x51dad5(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1c4422 of this['visibleViews'])_0x1c4422['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1738f9=>{this['focusTracker']['add'](_0x1738f9['element']),this['keystrokes']['listenTo'](_0x1738f9['element']);}),this['commentViews']['on']('change',(_0x553318,_0x4c3da3)=>{for(const _0x4168a0 of _0x4c3da3['removed'])this['focusTracker']['remove'](_0x4168a0['element']),this['keystrokes']['stopListening'](_0x4168a0['element']);for(const _0x1b5571 of Array['from'](_0x4c3da3['added'])['reverse']())this['focusTracker']['add'](_0x1b5571['element']),this['keystrokes']['listenTo'](_0x1b5571['element']);});}}function ns(_0x396ffa,_0x18620c,_0x41f743){let _0x2c7965=0x0;for(const _0x44f287 of _0x396ffa)switch(_0x44f287){case'insert':_0x18620c['add'](_0x41f743['get'](_0x2c7965),_0x2c7965),_0x2c7965++;break;case'delete':_0x18620c['remove'](_0x2c7965);break;case'equal':_0x2c7965++;}}class oe extends kt{constructor(_0x28be6){super(_0x28be6);const _0x43ae17=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x43ae17['to']('contextValue',_0x35eba4=>N(_0x28be6,'THREAD_CONTEXT_LABEL',_0x35eba4)),'tabindex':-0x1},'children':[{'text':_0x43ae17['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x25470f,_0x89f5b7){super(_0x25470f);const _0x2cff99=this['bindTemplate'];this['_model']=_0x89f5b7,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3ddb50=>!!_0x3ddb50),this['bind']('contextValue')['to'](this['_model'],'context',_0x5bc668=>_0x5bc668&&_0x5bc668['value']?this['_trimContextValue'](_0x5bc668['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',_0x2cff99['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 _0x4e65df=new _0x1db6f3(this['locale']);return _0x4e65df['label']=N(this['locale'],'Reopen'),_0x4e65df['tooltip']=N(this['locale'],'Reopen'),_0x4e65df['icon']=_0x3961d6,_0x4e65df['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2cd33a=>!_0x2cd33a),_0x4e65df['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x34db67,_0x5dee67)=>_0x34db67&&_0x5dee67),_0x4e65df['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4e65df;}['_trimContextValue'](_0x42d77b){if(_0x42d77b['length']<0x96)return _0x42d77b;const _0x399bad=_0x42d77b['lastIndexOf']('\x20',0x93);return _0x42d77b['substring'](0x0,_0x399bad>-0x1?_0x399bad:0x93)+'...';}['_attachContextActions'](){const _0xd0d732=this['element']['querySelector']('.ck-context'),_0x2f64a5=_0xd0d732['querySelector']('.ck-context__value');this['listenTo'](_0xd0d732,'mouseenter',()=>{_0x2f64a5['offsetWidth']<_0x2f64a5['scrollWidth']&&_0xd0d732['classList']['add']('overlay');}),this['listenTo'](_0xd0d732,'mouseleave',()=>{_0xd0d732['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x360367 of this['focusables'])this['focusTracker']['add'](_0x360367['element']),this['keystrokes']['listenTo'](_0x360367['element']);}['_createContextView'](){const _0x1811e2=new oe(this['locale']);return _0x1811e2['bind']('contextValue')['to'](this),_0x1811e2;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x29e6ae,_0x1362bb,_0x53494c,_0x14529a){super(_0x29e6ae),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1362bb,this['_localUser']=_0x53494c,this['_config']=_0x14529a,this['commentThreadHeaderView']=new Yt(_0x29e6ae,_0x1362bb),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x29e6ae,N(_0x29e6ae,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x29e6ae,_0x1362bb,Object['assign']({'CommentView':this['_config']['CommentView']},_0x14529a)),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',(_0x25ad24,_0x199b1c)=>_0x25ad24||!!_0x199b1c),this['bind']('isUnlinked')['to'](_0x1362bb,'unlinkedAt',_0x56bbd9=>!!_0x56bbd9),this['bind']('ariaLabel')['to'](this,'length',_0x61bbfe=>{const _0x203801=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x61bbfe,_0x203801]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x550958=>_0x550958['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x14409c=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5adfab=_0x14409c['commentInputView'];return _0x14409c['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5adfab,'value',(_0x52ccf3,_0x189e2b,_0x1273e3,_0x5b2e2a,_0x1ace41)=>!!_0x1ace41||!!_0x5b2e2a&&_0x1273e3&&!_0x189e2b||_0x52ccf3&&_0x1273e3&&!_0x189e2b),_0x5adfab['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xe68c2b,_0x104619,_0x2d518e)=>{let _0xed415c;return _0xed415c=_0x2d518e&&_0x104619?'Reply\x20to\x20reopen\x20discussion...':_0xe68c2b?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xed415c);}),_0x5adfab['bind']('submitLabel')['to'](this,'length',_0x4c8642=>N(this['locale'],_0x4c8642?'Reply':'Comment')),_0x5adfab['on']('submit',(_0x3dd0ce,_0x59c940)=>{this['fire']('addComment',_0x59c940),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5adfab['on']('cancel',()=>{this['focus']();}),_0x5adfab['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5adfab['on']('cancel',_0x2eaeba=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2eaeba['stop']());}),this['on']('change:isActive',(_0x1f84e9,_0x11ce46,_0x21079c)=>{_0x21079c||this['length']||_0x5adfab['value']||this['fire']('removeCommentThread');}),_0x14409c;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x46b373,_0x3d1744,_0x591c3e,_0x61b8eb){super(_0x46b373,_0x3d1744,_0x591c3e,_0x61b8eb),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x46b373,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x55e5cb,_0x265e2a,_0x242512)=>{_0x242512||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x296595,_0x297364,_0x1e2572)=>{_0x1e2572&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x39a61=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x39a61['if']('isActive','ck-thread--active'),_0x39a61['if']('isUnlinked','ck-thread--unlinked'),_0x39a61['if']('isConfirm','ck-thread--remove-confirmation'),_0x39a61['to']('actionIndicator',_0x450276=>_0x450276?'ck-thread--'+_0x450276:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x39a61['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 _0x4c3631 of this['commentsListView']['commentViews'])_0x4c3631['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0xcb20c0}=this,_0x3a7e29=this['commentsListView']['commentViews']['get'](0x0);_0x3a7e29===this['_boundFirstCommentView']||_0x3a7e29['isSystemComment']||(this['_boundFirstCommentView']=_0x3a7e29,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3a7e29,'actionIndicator',_0x4f2357=>'remove'===_0x4f2357?'remove':null),_0x3a7e29['placeholder']=N(_0xcb20c0,'Write\x20a\x20comment...'),_0x3a7e29['removeButton']['on']('execute',_0x487bbc=>{_0x487bbc['stop'](),this['showConfirm'](N(_0xcb20c0,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3a7e29['focus']();}),_0x3a7e29['actionBar']['add'](this['resolveButton'],0x0),_0x3a7e29['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x567fd0=new _0x1e0387(this['locale']);return _0x567fd0['label']=N(this['locale'],'Resolve'),_0x567fd0['tooltip']=N(this['locale'],'Resolve'),_0x567fd0['icon']=_0x530821,_0x567fd0['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x567fd0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1adf21=>!_0x1adf21),_0x567fd0['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3a0f03,_0x35635a)=>_0x3a0f03&&!_0x35635a),_0x567fd0['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x567fd0;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x3a4840){super(_0x3a4840),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x2b7bee,_0x50a882,_0x45c084)=>{this['element']['innerHTML']=_0x45c084;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x18855a,_0x32a39a,_0x17c0c8){super(_0x18855a),this['_model']=_0x32a39a,this['_config']=_0x17c0c8,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x32a39a,'content',_0x32a39a,'authoredAt',(_0x50bb98,_0x3fd181)=>N(_0x18855a,'COMMENT_ARIA_LABEL',[_0x32a39a['author']['name'],_0x17c0c8['formatDateTime'](_0x3fd181),new DOMParser()['parseFromString'](_0x50bb98,'text/html')['body']['textContent'],_0x32a39a['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x18855a,N(_0x18855a,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x1f1fea(),this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x342f22=>_0x342f22['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 _0x1f862d=new es(this['locale']);return _0x1f862d['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4e20e2,_0x15584c)=>_0x15584c?_0x35cceb(_0x4e20e2,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4e20e2),_0x1f862d;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x47bf55=new os(this['locale'],this['_config']['editorConfig']);return _0x47bf55['value']=this['_model']['content'],_0x47bf55['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x47bf55['submitLabel']=N(this['locale'],'Save'),_0x47bf55['on']('submit',(_0x47bbce,_0x4d4cd9)=>{this['fire']('updateComment',this['_model']['id'],_0x4d4cd9),this['switchToDisplayMode'](),this['focus']();}),_0x47bf55['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x47bf55['once']('editorReady',()=>{_0x47bf55['focus']();}),_0x47bf55['createEditor'](),_0x47bf55['delegate']('editorReady')['to'](this),_0x47bf55['delegate']('editorDestroyed')['to'](this),_0x47bf55;}['_setupKeyboardNavigation'](){const _0x3827f1=this['element'];this['keystrokes']['listenTo'](_0x3827f1);for(const _0x478807 of this['focusables'])this['focusTracker']['add'](_0x478807['element']),this['keystrokes']['listenTo'](_0x478807['element']);this['focusables']['on']('change',(_0x49a4c8,_0x4b63b6)=>{for(const _0x28d448 of _0x4b63b6['removed'])this['focusTracker']['remove'](_0x28d448['element']),this['keystrokes']['stopListening'](_0x28d448['element']);for(const _0x2ac5c1 of _0x4b63b6['added'])this['focusTracker']['add'](_0x2ac5c1['element']),this['keystrokes']['listenTo'](_0x2ac5c1['element']);}),this['keystrokes']['set']('enter',(_0x843fc6,_0x7de67a)=>{_0x3827f1===_0x843fc6['target']&&(this['focusCycler']['focusFirst'](),_0x7de67a());}),this['keystrokes']['set']('esc',(_0x2b8c22,_0x3a81fd)=>{_0x3827f1!==_0x2b8c22['target']&&(this['focus'](),_0x3a81fd());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x58834a,_0x27bd7d,_0x5c6002){super(_0x58834a,_0x27bd7d,_0x5c6002),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x58834a,'Reply...')),this['bind']('authoredAt')['to'](_0x27bd7d),this['bind']('resolvedAt')['to'](_0x27bd7d),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 _0x5290df(_0x58834a,_0x27bd7d['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x27bd7d,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x4533ae=this['bindTemplate'],_0x367cf4=[{'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':_0x4533ae['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x4533ae['to']('authoredAt',_0xb69936=>this['_config']['formatDateTime'](_0xb69936))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x4533ae['if']('isEditMode','ck-comment__actions--hidden'),_0x4533ae['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']&&_0x367cf4['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x4533ae['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x4533ae['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x4533ae['if']('isEditMode','ck-comment--edit'),_0x4533ae['if']('isSystemComment','ck-comment--info'),_0x4533ae['to']('actionIndicator',_0x5e1f49=>_0x5e1f49?'ck-comment--'+_0x5e1f49:'')],'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':_0x367cf4}]}]};}['_createEditButton'](){const _0x420b06=new _0x1db6f3(this['locale']);return _0x420b06['label']=N(this['locale'],'Edit'),_0x420b06['icon']=_0x158452,_0x420b06['withText']=!0x0,_0x420b06['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x420b06['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x876cd8=>!_0x876cd8),_0x420b06['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x420b06['on']('execute',()=>this['switchToEditMode']()),_0x420b06;}['_createRemoveButton'](){const _0x3da862=new _0x1db6f3(this['locale']);return _0x3da862['label']=N(this['locale'],'Remove'),_0x3da862['icon']=_0x7e5058,_0x3da862['withText']=!0x0,_0x3da862['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x3da862['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x12e33a=>!_0x12e33a),_0x3da862['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x3da862['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x3da862;}['_createDropdown'](){const _0xb2aced=_0x53c395(this['locale'],_0x1662bb),_0x11c2d5=_0xb2aced['panelView']['children'],_0x4bac7c=new _0x15b6fa(this['locale']),_0x21d740=_0xb2aced['bindTemplate'];_0x3accc2(_0xb2aced,()=>this['items']['find'](_0x396a4=>_0x396a4['isVisible'])),_0xb2aced['extendTemplate']({'attributes':{'class':[_0x21d740['if']('isVisible','ck-hidden',_0x43362e=>!_0x43362e)]}});const _0x260748=(_0x5a25db,_0x10447c=-0x1)=>{const _0x49af36=new _0x4363da(this['locale']);_0x49af36['children']['add'](_0x5a25db);const _0x71f4e6=_0x10447c>-0x1?_0x10447c:_0x4bac7c['items']['length'];_0x4bac7c['items']['add'](_0x49af36,_0x71f4e6);const _0xe2159c=Array['from'](this['items']);_0xb2aced['unbind']('isEnabled','isVisible'),_0xb2aced['bind']('isEnabled')['toMany'](_0xe2159c,'isEnabled',(..._0x276396)=>_0x276396['some'](_0x566a44=>_0x566a44)),_0xb2aced['bind']('isVisible')['toMany'](_0xe2159c,'isVisible',(..._0x1a6ef3)=>_0x1a6ef3['some'](_0xcf5f81=>_0xcf5f81));};_0xb2aced['panelPosition']='sw',_0xb2aced['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x3d31ed});for(const _0x5301ac of this['items'])_0x260748(_0x5301ac);return _0x11c2d5['add'](_0x4bac7c),_0xb2aced['listenTo'](this['items'],'add',(_0x1b34dd,_0x3876ac,_0x33be86)=>{_0x260748(_0x3876ac,_0x33be86);}),_0xb2aced['listenTo'](this['items'],'remove',(_0x460bb6,_0x1f800e,_0x21b115)=>{_0x4bac7c['items']['remove'](_0x21b115);}),_0xb2aced;}['_attachActions'](_0x23382a,_0x421193){const _0x57f42f=_0x23382a&&_0x23382a['element'];_0x57f42f&&(this['listenTo'](_0x57f42f,'mouseenter',()=>this['actionIndicator']=_0x421193),this['listenTo'](_0x57f42f,'focus',()=>this['actionIndicator']=_0x421193),this['listenTo'](_0x57f42f,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x57f42f,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x2d523f=super['_createCommentInputView']();return _0x2d523f['bind']('placeholder')['to'](this),_0x2d523f;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x5845bb){const _0x3adb10=Dt(_0x5845bb,0x1e),_0x470833=new MutationObserver(_0x152b2f=>{for(const _0x27dd01 of _0x152b2f)('attributes'==_0x27dd01['type']&&'class'==_0x27dd01['attributeName']||'childList'==_0x27dd01['type']||'characterData'==_0x27dd01['type'])&&_0x3adb10();});return{'attach'(_0x2acee7){_0x470833['observe'](_0x2acee7,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x470833['disconnect'](),_0x3adb10['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1134e7,_0x1dc3fb){super(_0x1134e7),this['id']=_0x1797dc(),this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x4924d6,_0x1359da)=>this['fire']('Esc',_0x1359da)),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'](_0x1dc3fb),this['mainView']=_0x1dc3fb;const _0x141277=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x141277['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 _0x5b383d=this['element']['clientHeight'];_0x5b383d&&(this['height']=_0x5b383d);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0xa31544(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xb300a7,target:_0x3bf307,type:_0x36e76e,isVisible:_0x16b81c=!0x0}){super(),this['view']=_0xb300a7,this['view']['element']||this['view']['render'](),this['_type']=_0x36e76e,this['_target']=_0x3bf307,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x24de43([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x221ba0,_0x377307)=>{this['view']['focusTracker']['add'](_0x377307);}),this['focusableElements']['on']('remove',(_0x4dc635,_0x496f8e)=>{this['view']['focusTracker']['remove'](_0x496f8e);}),this['set']('isVisible',_0x16b81c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x396aea=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x396aea),_0x396aea;}get['targetRect'](){const _0xc66ee0=this['target'];if(null===_0xc66ee0)return null;if(_0xc66ee0 instanceof _0x2770d5)return _0xc66ee0;const _0x4bdc18=_0xc66ee0['filter'](_0x71011=>function(_0x584235){const _0x12aa5b=_0x584235['offsetParent'];if(_0x12aa5b)return!0x0;const _0x1ed446=_0x584235['getClientRects']()['item'](0x0);return!!_0x1ed446;}(_0x71011));return 0x0===_0x4bdc18['length']?null:new _0x2770d5(_0x4bdc18[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x7a1d2b){this['view']['isActive']=_0x7a1d2b,this['view']['mainView']['isActive']=_0x7a1d2b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x11777f){if(!(null===_0x11777f||_0x11777f instanceof _0x2770d5||Array['isArray'](_0x11777f)&&_0x11777f['every'](_0x5e2f99=>fi(_0x5e2f99))))throw new _0x55af7e('annotation-invalid-target',null,{'target':_0x11777f});}['_getNormalizedTarget'](){const _0x38d8a5='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x38d8a5)?[_0x38d8a5]:_0x38d8a5;}}function fi(_0x3795c3){return null!==_0x3795c3&&'object'==typeof _0x3795c3&&'nodeType'in _0x3795c3&&0x1===_0x3795c3['nodeType'];}class S extends _0x24de43{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x324417=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5d97f7(),this['_focusTracker']['on']('change:isFocused',(_0x4160f4,_0x2b4b1b,_0x452cd1)=>{_0x452cd1||this['fire']('blur');});for(const _0x45cd26 of _0x324417)this['add'](_0x45cd26);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x54f564){if(this['has'](_0x54f564))throw new _0x55af7e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x54f564['innerView'],_0x54f564),this['_viewToAnnotation']['set'](_0x54f564['view'],_0x54f564);for(const _0x2e3773 of _0x54f564['focusableElements'])this['_focusTracker']['add'](_0x2e3773);this['listenTo'](_0x54f564['focusableElements'],'add',(_0x1ca9f0,_0x46ae74)=>{this['_focusTracker']['add'](_0x46ae74);}),this['listenTo'](_0x54f564['focusableElements'],'remove',(_0x5f3a7c,_0x23bc78)=>{this['_focusTracker']['remove'](_0x23bc78);}),this['listenTo'](_0x54f564['view']['focusTracker'],'change:isFocused',(_0x480e60,_0x12f18f,_0x14c27f)=>{_0x14c27f&&this['fire']('focus',_0x54f564);}),_0x54f564['updateTargetRect']();const _0x3989be=this['_getOrderInContent'](_0x54f564['view']['targetRect']);return super['add'](_0x54f564,_0x3989be);}['remove'](_0x3a7981){if(!this['has'](_0x3a7981))throw new _0x55af7e('annotationcollection-not-existing-item',null);this['stopListening'](_0x3a7981['view']['focusTracker']),this['stopListening'](_0x3a7981['focusableElements']);for(const _0x5b843f of _0x3a7981['focusableElements'])this['_focusTracker']['remove'](_0x5b843f);return this['_viewToAnnotation']['delete'](_0x3a7981['view']),this['_innerViewToAnnotation']['delete'](_0x3a7981['innerView']),super['remove'](_0x3a7981);}['getByInnerView'](_0xb2182c){return this['_innerViewToAnnotation']['get'](_0xb2182c);}['getByView'](_0x9f1c45){return this['_viewToAnnotation']['get'](_0x9f1c45);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x198e55 of this)_0x198e55['updateTargetRect']();this['_sort']();}['_sort'](){const _0x145cd6=Array['from'](this)['sort']((_0x442587,_0xe21629)=>w(_0x442587['view']['targetRect'],_0xe21629['view']['targetRect']));for(let _0x361b06=_0x145cd6['length']-0x1;_0x361b06>0x0;_0x361b06--){const _0x5e9a85=_0x145cd6[_0x361b06];_0x361b06!==this['getIndex'](_0x5e9a85)&&(this['remove'](_0x5e9a85),this['add'](_0x5e9a85));}}['_getOrderInContent'](_0x428450){let _0x2d4937=0x0;if(!_0x428450)return this['length'];for(const _0x372abd of this){const _0x32cb2a=_0x372abd['view']['targetRect'];if(_0x32cb2a){if(w(_0x428450,_0x32cb2a)<0x0)return _0x2d4937;_0x2d4937++;}}return _0x2d4937;}}function v({source:_0x445d58,target:_0x329271,filter:_0x49ace2}){for(const _0x1a2915 of _0x445d58)_0x49ace2(_0x1a2915)&&_0x329271['add'](_0x1a2915);_0x329271['listenTo'](_0x445d58,'add',(_0x33d7c8,_0x1293a2)=>{_0x49ace2(_0x1293a2)&&_0x329271['add'](_0x1293a2);}),_0x329271['listenTo'](_0x445d58,'remove',(_0x2a8715,_0x4da704)=>{_0x329271['has'](_0x4da704)&&_0x329271['remove'](_0x4da704);});}function w(_0x19cf2b,_0x11bc84){if(null===_0x19cf2b&&null===_0x11bc84)return 0x0;if(null===_0x19cf2b)return-0x1;if(null===_0x11bc84)return 0x1;const _0x20525f=_0x19cf2b['top']-_0x11bc84['top'];return 0x0==_0x20525f?_0x19cf2b['left']-_0x11bc84['left']:_0x20525f;}class y extends _0x1756af{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3cef63){if(super(_0x3cef63),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3cef63 instanceof _0x581330){const _0x49cde3=_0x3cef63['locale'];_0x3cef63['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x59244d){this['collection']['add'](_0x59244d);}['remove'](_0x5c44c2){this['collection']['remove'](_0x5c44c2),_0x5c44c2['destroy']();}['refreshVisibility'](){for(const _0x6a2f9a of this['collection'])_0x6a2f9a['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x83220b){return this['collection']['getByInnerView'](_0x83220b);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5cbb40 of this['collection'])_0x5cbb40['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x320ac6){this['fire']('_activateAnnotation',_0x320ac6);}['createAnnotation'](_0x6d02b1){return new T(_0x6d02b1);}['createAnnotationView'](_0x2df8e5,_0x282d26){return new E(_0x2df8e5,_0x282d26);}['_addActiveAnnotation'](_0x51f984){const _0x2ba29d=new Set(this['activeAnnotations']);_0x2ba29d['add'](_0x51f984),this['activeAnnotations']=_0x2ba29d;}['_removeActiveAnnotation'](_0x3634c1){const _0x3a5cdc=new Set(this['activeAnnotations']);_0x3a5cdc['delete'](_0x3634c1),this['activeAnnotations']=_0x3a5cdc;}['_bindAnnotationsToVisibleAnnotations'](){const _0x428085=this['collection'],_0x2d768c=this['_visibleAnnotations'];function _0x2a35f0(_0x15837a){const _0x17c6f3=_0x15837a['source'];_0x17c6f3['isVisible']&&!_0x2d768c['has'](_0x17c6f3)?_0x2d768c['add'](_0x17c6f3):!_0x17c6f3['isVisible']&&_0x2d768c['has'](_0x17c6f3)&&_0x2d768c['remove'](_0x17c6f3),_0x17c6f3['view']['focusTracker']['remove'](_0x17c6f3['view']['element']),_0x17c6f3['view']['focusTracker']['add'](_0x17c6f3['view']['element']);}this['listenTo'](_0x428085,'add',(_0x1434c7,_0x34c65e)=>{_0x34c65e['isVisible']&&_0x2d768c['add'](_0x34c65e),this['listenTo'](_0x34c65e,'change:isVisible',_0x2a35f0);}),this['listenTo'](_0x428085,'remove',(_0x47941c,_0x13b0d1)=>{_0x2d768c['has'](_0x13b0d1)&&_0x2d768c['remove'](_0x13b0d1),this['stopListening'](_0x13b0d1,'change:isVisible',_0x2a35f0);});}['_setupEnterAnnotationKeystroke'](){const _0x3ac2e1=_0x215cef=>{_0x215cef['on']('ready',()=>{_0x215cef['keystrokes']['set'](_0x4b75c9,(_0x51b32e,_0x3aea9e)=>{const _0x59bc26=_0x201e2d(this['activeAnnotations']['values']());_0x59bc26&&(_0x59bc26['view']['focus'](),_0x3aea9e());});});};this['context']instanceof _0x581330?_0x3ac2e1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x114350,_0x10d76f)=>{_0x3ac2e1(_0x10d76f);});}['_setupEscapeAnnotationHandling'](){const _0x3319fa=_0x212f10=>{const _0x43bf0a=_0x212f10['source'],_0x4c425f=[];let _0x510efd;if(Array['isArray'](_0x43bf0a['target'])){_0x510efd=_0x43bf0a['target'][0x0],this['context']instanceof _0x581330?_0x4c425f['push'](this['context']):this['context']['editors']&&_0x4c425f['push'](...this['context']['editors']);for(const _0x36c75f of _0x4c425f)for(const _0x2c5497 of _0x36c75f['editing']['view']['domRoots']['values']())if(_0x2c5497['contains'](_0x510efd))return void _0x36c75f['editing']['view']['focus']();_0x510efd['focus']();}};this['listenTo'](this['collection'],'add',(_0x52832b,_0x157c3a)=>{this['listenTo'](_0x157c3a,'escape',_0x3319fa,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3b3082,_0xf61b0e)=>{this['stopListening'](_0xf61b0e,'escape',_0x3319fa);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1756af{['_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(_0x3fb165){super(_0x3fb165),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xf7a537=this['context']['config'];_0xf7a537['define']('comments.maxCommentsWhenCollapsed',0x2),_0xf7a537['define']('comments.maxThreadTotalWeight',0x1f4),_0xf7a537['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xf7a537['define']('comments.CommentThreadView',gt),_0xf7a537['define']('comments.CommentView',Tt),_0xf7a537['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1d83b8=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x19c88d,_0x34bdad)=>this['_addCommentThread'](_0x34bdad)),this['on']('submitCommentThread',(_0x35cc8a,_0x476a43)=>this['_submitCommentThread'](_0x476a43)),this['on']('resolveCommentThread',(_0x2e2e4b,_0x39226a)=>this['_resolveCommentThread'](_0x39226a)),this['on']('resolveCommentThread',(_0x44e62b,_0x1faf23)=>this['_updateActiveAnnotation'](_0x1faf23),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x28218e,_0x34ce4a)=>this['_reopenCommentThread'](_0x34ce4a)),this['on']('reopenCommentThread',(_0x51ebca,_0x43ff7a)=>this['_updateActiveAnnotation'](_0x43ff7a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x29d716,_0x539f16)=>this['_removeCommentThread'](_0x539f16)),this['on']('updateCommentThread',(_0x27fe04,_0x39e386)=>this['_updateCommentThread'](_0x39e386)),this['on']('updateCommentThread',(_0x47fb10,_0x3ff309)=>this['_updateActiveAnnotation'](_0x3ff309),{'priority':'lowest'}),this['on']('addComment',(_0x3fabc2,_0x5b6249)=>this['_addComment'](_0x5b6249)),this['on']('updateComment',(_0x86e168,_0x22ddd9)=>this['_updateComment'](_0x22ddd9)),this['on']('removeComment',(_0x3e147f,_0x106150)=>this['_removeComment'](_0x106150)),this['on']('addComment',(_0x285f3b,{threadId:_0xb164e4,isFromAdapter:_0x28ee2a})=>{if(_0x28ee2a)return;const _0x20021a=this['getCommentThread'](_0xb164e4),_0x5b3802=_0x20021a&&this['_threadToController']['get'](_0x20021a);_0x5b3802&&_0x5b3802['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1d83b8,'change:activeAnnotations',(_0xec4abb,_0x4d4a34,_0x55146e)=>{const _0x47e4d1=Array['from'](_0x55146e)['map'](_0x2ecbc6=>this['_viewToController']['get'](_0x2ecbc6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x47e4d1?_0x47e4d1['model']:null;});}set['adapter'](_0x4a9a32){if(this['_adapter'])throw new _0x55af7e('commentsrepository-adapter-already-set');this['_adapter']=_0x4a9a32;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4009ac=_t,threadId:_0x57e846=_0x1797dc(),comments:_0x1d919c=[],unlinkedAt:_0x471f1c=null,resolvedAt:_0x57b8be=null,resolvedBy:_0xd2774f=null,target:_0x47345c=null,context:_0x42ca05=null,attributes:_0x309bb4={},isResolvable:_0x286ef2=!0x0,isSubmitted:_0x34e263=!0x1,isFromAdapter:_0x4c8852=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4009ac),{'channelId':_0x4009ac,'threadId':_0x57e846,'comments':_0x1d919c,'unlinkedAt':_0x471f1c,'resolvedAt':_0x57b8be,'resolvedBy':_0xd2774f,'target':_0x47345c,'context':_0x42ca05,'attributes':_0x309bb4,'isFromAdapter':_0x4c8852,'isResolvable':_0x286ef2,'isSubmitted':_0x34e263}),this['getCommentThread'](_0x57e846);}['openNewCommentThread']({channelId:_0x160bd=_t,threadId:_0x161c00=_0x1797dc(),target:_0x3e07d7,context:_0x449544=null,isResolvable:_0x219802=!0x0}){if(this['_readOnlyChannels']['has'](_0x160bd)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3e07d7)throw new _0x55af7e('commentsrepository-missing-target');const _0x12c297=this['addCommentThread']({'channelId':_0x160bd,'threadId':_0x161c00,'target':_0x3e07d7,'context':_0x449544,'isResolvable':_0x219802});if(!_0x12c297)return null;const _0x53b49a=this['_threadToController']['get'](_0x12c297),_0x3148dc=_0x53b49a['view']['commentThreadInputView']['commentInputView'],_0xf3061=this['context']['plugins']['get'](y),_0x3b3d39=_0xf3061['getByInnerView'](_0x53b49a['view']);return _0xf3061['activate'](_0x3b3d39),_0x3148dc['once']('editorReady',()=>_0x3148dc['focus']()),_0x12c297;}['hasCommentThread'](_0x324827){if('string'!=typeof _0x324827)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x324827);}['updateCommentThread']({channelId:_0x351ee3=_t,threadId:_0x43c750,context:_0xe06b46,unlinkedAt:_0x26171d,attributes:_0x2cea66,isFromAdapter:_0x8cb60f=!0x1}){return this['fire'](Nt('updateCommentThread',_0x351ee3),{'channelId':_0x351ee3,'threadId':_0x43c750,'context':_0xe06b46,'unlinkedAt':_0x26171d,'attributes':_0x2cea66,'isFromAdapter':_0x8cb60f}),this['getCommentThread'](_0x43c750);}['getCommentThread'](_0x37f39){if('string'!=typeof _0x37f39)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x37f39);}['fetchCommentThread']({channelId:_0x2ec133,threadId:_0x171bcc}={}){const _0x16b69f=this['getCommentThread'](_0x171bcc);if(_0x16b69f)return Promise['resolve'](_0x16b69f);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x55af7e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2ec133,'threadId':_0x171bcc})['then'](_0x27d751=>this['hasCommentThread'](_0x171bcc)?this['getCommentThread'](_0x171bcc):_0x27d751?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2ec133},_0x27d751)):void 0x0)['catch'](_0x27a6eb=>{throw console['error'](_0x27a6eb),new _0x55af7e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x555f95,skipNotAttached:_0x468bc8=!0x1,skipEmpty:_0x4cbe9f=!0x1,toJSON:_0x4fe7c0=!0x1}={}){const _0x1b7de7=[];for(const _0x12f080 of this['_threads']['values']())_0x555f95&&_0x12f080['channelId']!==_0x555f95||_0x468bc8&&!_0x12f080['isAttached']||_0x4cbe9f&&0x0===_0x12f080['length']||_0x1b7de7['push'](_0x12f080);return _0x4fe7c0?_0x1b7de7['map'](_0x4df287=>_0x4df287['toJSON']()):_0x1b7de7;}['getAnnotationForCommentThread'](_0x39dce0){const _0x3c8061=this['_threadToController']['get'](_0x39dce0);if(!_0x3c8061)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3c8061['view'])||null;}['getCommentThreadForAnnotation'](_0x556f2a){const _0x29c5f3=this['_viewToController']['get'](_0x556f2a['innerView']);return _0x29c5f3?_0x29c5f3['model']:null;}['setActiveCommentThread'](_0x154bb3){const _0x477d35=this['context']['plugins']['get'](y);if(!_0x154bb3)return void(this['activeCommentThread']&&_0x477d35['deactivateAll']());const _0x5bcfcf=this['getCommentThread'](_0x154bb3);if(!_0x5bcfcf)throw new _0x55af7e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x154bb3});if(!this['_threadToController']['has'](_0x5bcfcf))throw new _0x55af7e('commentsrepository-active-not-attached',null,{'threadId':_0x154bb3});const _0x17d2d7=_0x477d35['getByInnerView'](this['_threadToController']['get'](_0x5bcfcf)['view']);_0x477d35['activate'](_0x17d2d7);}['switchReadOnly'](_0x291cc1,_0x1930ad){_0x291cc1?this['_readOnlyChannels']['add'](_0x1930ad):this['_readOnlyChannels']['delete'](_0x1930ad),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x39fa13){return this['_readOnlyChannels']['has'](_0x39fa13)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x81e5f4,_0x348203){return new vt(_0x81e5f4,_0x348203);}['setPermissions'](_0x1ced07,_0x4c38a7=_t){this['_permissions']['set'](_0x4c38a7,_0x1ced07),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x18e4d6=_t){return this['_permissions']['has'](_0x18e4d6)?this['_permissions']['get'](_0x18e4d6):bt;}['_addCommentThread']({channelId:_0x100026,threadId:_0x264a18,comments:_0x5e3cc4,unlinkedAt:_0x400150,resolvedAt:_0x2800dc,resolvedBy:_0xbadc0b,target:_0xc37c62,context:_0x3e6382,attributes:_0x1b7977,isFromAdapter:_0x3427eb,isResolvable:_0x5e54d3,isSubmitted:_0x1caa47}){if('string'!=typeof _0x264a18)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x264a18});if(this['hasCommentThread'](_0x264a18))throw new _0x55af7e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x264a18});const _0x263bec=new pi(this,{'channelId':_0x100026,'id':_0x264a18,'context':_0x3e6382,'attributes':_0x1b7977,'unlinkedAt':_0x400150,'resolvedAt':_0x2800dc,'resolvedBy':_0xbadc0b?this['context']['plugins']['get'](it)['getUser'](_0xbadc0b):null,'isResolvable':_0x5e54d3,'isSubmitted':_0x1caa47||_0x3427eb});this['_threads']['set'](_0x264a18,_0x263bec);for(const _0x3fd277 of _0x5e3cc4)_0x263bec['_add'](this['_createNewComment']({'threadId':_0x264a18,..._0x3fd277}));return _0xc37c62&&_0x263bec['attachTo'](_0xc37c62),_0x3427eb||!_0x263bec['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x100026,'threadId':_0x264a18});}['_submitCommentThread']({channelId:_0x105444,threadId:_0x2a7818}){if(!this['hasCommentThread'](_0x2a7818))throw new _0x55af7e('commentsrepository-missing-comment-thread',this);const _0x58e039=this['getCommentThread'](_0x2a7818);if(_0x58e039['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xf025ef,comments:_0x249dd1,resolvedAt:_0x5c859e,resolvedBy:_0x180025,context:_0x54a2df,attributes:_0xabb37d}=_0x58e039,_0x1e29c3=this['context']['plugins']['get']('PendingActions'),_0x3a03df=_0x1e29c3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x105444,'threadId':_0xf025ef,'comments':_0x249dd1['map'](_0x55d436=>_0x55d436['toJSON']()),'resolvedAt':_0x5c859e,'resolvedBy':_0x180025?_0x180025['id']:_0x180025,'context':_0x54a2df,'attributes':_0xabb37d})['then'](({comments:_0x241f0f})=>{_0x1e29c3['remove'](_0x3a03df);for(const _0x260e8f of _0x241f0f)this['_updateComment']({'channelId':_0x105444,'threadId':_0x2a7818,'commentId':_0x260e8f['commentId'],'createdAt':_0x260e8f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x55ed3a=>{throw console['error'](_0x55ed3a),new _0x55af7e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x113690,target:_0x47cc46}){const _0x23a10c=this['getCommentThread'](_0x113690);if(!_0x23a10c)throw new _0x55af7e('commentsrepository-attach-missing-comment-thread',this);const _0x4f1c8f=this['context']['plugins']['get']('PendingActions'),_0x509359=this['context']['plugins']['get'](y),_0x1e0d49=this['_createCommentThreadView'](_0x23a10c),_0x46fe5b=new vt(_0x23a10c,_0x1e0d49);let _0x244cee=null;_0x1e0d49['on']('change:isDirty',(_0x161f2b,_0x32a539,_0x209b81)=>{_0x209b81?_0x244cee=_0x4f1c8f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x244cee&&(_0x4f1c8f['remove'](_0x244cee),_0x244cee=null);}),this['_threadToController']['set'](_0x23a10c,_0x46fe5b),this['_viewToController']['set'](_0x1e0d49,_0x46fe5b);const _0x41fa99=new E(this['context']['locale'],_0x1e0d49);_0x41fa99['bind']('length')['to'](_0x1e0d49),_0x41fa99['bind']('isDirty')['to'](_0x1e0d49,'isDirty',_0x1e0d49,'length',(_0x16c424,_0x133527)=>_0x16c424||!_0x133527),_0x41fa99['bind']('isActive')['to'](_0x1e0d49),_0x41fa99['type']='comment';const _0x4e598d=new T({'view':_0x41fa99,'target':_0x47cc46,'type':'comment','isVisible':!_0x23a10c['archivedAt']&&!!('function'==typeof _0x47cc46?_0x47cc46():_0x47cc46)});return _0x1e0d49['on']('escape',()=>{_0x4e598d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1e0d49,_0x4e598d),_0x509359['add'](_0x4e598d),_0x4e598d;}['_bindAnnotationToEditors'](_0x3af503,_0x31ebb8){this['listenTo'](_0x3af503,'editorReady',(_0x553300,_0x42e676)=>{const _0x3bc0e5=_0x42e676['ui']['view']['body']['bodyCollectionContainer'];_0x31ebb8['focusableElements']['add'](_0x3bc0e5),this['context']instanceof _0x581330&&this['context']['ui']['focusTracker']['add'](_0x3bc0e5);},{'priority':'highest'}),this['listenTo'](_0x3af503,'editorDestroyed',(_0x63e5a7,_0x2619e1)=>{const _0x3aff85=_0x2619e1['ui']['view']['body']['bodyCollectionContainer'];_0x31ebb8['focusableElements']['has'](_0x3aff85)&&_0x31ebb8['focusableElements']['remove'](_0x3aff85),this['context']instanceof _0x581330&&this['context']['ui']['focusTracker']['remove'](_0x3aff85);});}['_unbindEditors'](_0x5e6feb){this['stopListening'](_0x5e6feb,'editorReady'),this['stopListening'](_0x5e6feb,'editorDestroyed');}['_createCommentThreadView'](_0x1d0a75){const _0x109bb4=this['context']['plugins']['get'](it),{config:_0x11e919,locale:_0x420299}=this['context'],_0x1e341b=pt(_0x11e919['get']('locale'),_0x420299);return new(0x0,(_0x11e919['get']('comments'))['CommentThreadView'])(_0x420299,_0x1d0a75,_0x109bb4['me'],{'editorConfig':{..._0x11e919['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x11e919['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x11e919['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x11e919['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x11e919['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1e341b,'CommentView':_0x11e919['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2cba61,channelId:_0x4485de,resolvedAt:_0xbe5b54,resolvedBy:_0x344d72,isFromAdapter:_0x26d400}){if(!this['hasCommentThread'](_0x2cba61))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x2cba61});const _0x2c6f0f=this['getCommentThread'](_0x2cba61);if(_0x2c6f0f['isResolved'])throw new _0x55af7e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2cba61});const _0xb63f54=this['context']['plugins']['get'](it);if(_0x2c6f0f['resolvedBy']=_0xb63f54['getUser'](_0x344d72),_0x2c6f0f['resolvedAt']=_0xbe5b54,_0x26d400||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x54b89d=this['context']['plugins']['get']('PendingActions'),_0x1ab79a=_0x54b89d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4485de,'threadId':_0x2cba61})['then'](({resolvedAt:_0x3246e4,resolvedBy:_0x454cc5})=>{_0x54b89d['remove'](_0x1ab79a),_0x2c6f0f['resolvedBy']['id']!==_0x454cc5&&(_0x2c6f0f['resolvedBy']=_0xb63f54['getUser'](_0x454cc5)),_0x2c6f0f['resolvedAt']=_0x3246e4;})['catch'](_0x523b69=>{throw console['error'](_0x523b69),new _0x55af7e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1f1faf,channelId:_0x4cb1ac,isFromAdapter:_0x276700}){if(!this['hasCommentThread'](_0x1f1faf))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f1faf});const _0x5e7de5=this['getCommentThread'](_0x1f1faf);if(!_0x5e7de5['isResolved'])throw new _0x55af7e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1f1faf});if(_0x5e7de5['resolvedBy']=null,_0x5e7de5['resolvedAt']=null,_0x276700||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x230741=this['context']['plugins']['get']('PendingActions'),_0x1f204d=_0x230741['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4cb1ac,'threadId':_0x1f1faf})['then'](()=>_0x230741['remove'](_0x1f204d))['catch'](_0x20bf65=>{throw console['error'](_0x20bf65),new _0x55af7e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2e4079,isFromAdapter:_0x35c720}){const _0x287ea3=this['getCommentThread'](_0x2e4079);if(!_0x287ea3)throw new _0x55af7e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2e4079),this['_threads']['delete'](_0x2e4079),!_0x287ea3['isSubmitted']||_0x35c720||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4b7752=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3dcead}=_0x287ea3,_0x446da2=_0x4b7752['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3dcead,'threadId':_0x2e4079})['then'](()=>_0x4b7752['remove'](_0x446da2))['catch'](_0xa8dc1f=>{throw console['error'](_0xa8dc1f),new _0x55af7e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x415dc4,unlinkedAt:_0x31b053,context:_0x287eb9,attributes:_0x2d6fd4,isFromAdapter:_0x5219e3}){if('string'!=typeof _0x415dc4)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x415dc4});if(!this['hasCommentThread'](_0x415dc4))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x415dc4});const _0x53443c=this['getCommentThread'](_0x415dc4);let _0x5695f8=!0x1;if(void 0x0!==_0x287eb9&&_0x53443c['context']!==_0x287eb9&&(_0x53443c['context']=_0x287eb9,_0x5695f8=!0x0),void 0x0!==_0x31b053&&_0x53443c['unlinkedAt']!==_0x31b053&&(_0x53443c['unlinkedAt']=_0x31b053,_0x5695f8=!0x0),_0x2d6fd4&&!At(_0x2d6fd4,_0x53443c['attributes'])&&(_0x53443c['attributes']=_0x2d6fd4,_0x5695f8=!0x0),!_0x5695f8)return Promise['resolve']();if(!_0x53443c['isSubmitted']||_0x5219e3||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x12740b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cc0e0}=_0x53443c,_0x409892=_0x12740b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4cc0e0,'threadId':_0x415dc4,'context':_0x287eb9,'unlinkedAt':_0x31b053,'attributes':_0x2d6fd4})['then'](()=>_0x12740b['remove'](_0x409892))['catch'](_0x5b6176=>{throw console['error'](_0x5b6176),new _0x55af7e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x347bd4){const _0x634c98=this['context']['plugins']['get'](y),_0x5cf96e=this['getCommentThread'](_0x347bd4);if(_0x5cf96e['_isAttached']=!0x1,this['_threadToController']['has'](_0x5cf96e)){const _0x3405ae=this['_threadToController']['get'](_0x5cf96e),_0x240ac5=_0x3405ae['view'],_0x53ac15=_0x634c98['getByInnerView'](_0x240ac5);this['_threadToController']['delete'](_0x5cf96e),this['_viewToController']['delete'](_0x240ac5),_0x53ac15&&_0x634c98['remove'](_0x53ac15),_0x3405ae['destroy'](),_0x240ac5['destroy']()['then'](()=>{this['_unbindEditors'](_0x240ac5);});}}['_updateActiveAnnotation']({threadId:_0x198294,resolvedAt:_0x3abc95,unlinkedAt:_0x18fcaf}){const _0x16b2f3=!!_0x3abc95,_0x360e11=this['context']['plugins']['get'](y),_0x519898=this['getCommentThread'](_0x198294);if(this['_threadToController']['has'](_0x519898)){const _0x180074=this['_threadToController']['get'](_0x519898)['view'],_0x338e7b=_0x360e11['getByInnerView'](_0x180074);_0x338e7b&&(_0x16b2f3&&_0x360e11['_removeActiveAnnotation'](_0x338e7b),_0x18fcaf?_0x338e7b['isVisible']=!0x1:_0x338e7b['refreshVisibility']());}}['_getExternalAuthor'](_0x221de8){const _0x5bc5e0=this['context']['plugins']['get'](it),_0x3d4296=It('external:'+_0x221de8),_0x427ae3=_0x5bc5e0['getUser'](_0x3d4296);return _0x427ae3||_0x5bc5e0['addUser']({'id':_0x3d4296,'name':_0x221de8});}['_createNewComment']({threadId:_0x459606,commentId:_0x2c60b4=_0x1797dc(),content:_0x10d9ad,authorId:_0x580a6f,createdAt:_0x20786e,attributes:_0x2a9d55}){if('string'!=typeof _0x2c60b4)throw new _0x55af7e('commentsrepository-invalid-commentid');if('string'!=typeof _0x580a6f)throw new _0x55af7e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x10d9ad||!_0x10d9ad['trim']())throw new _0x55af7e('commentsrepository-invalid-comment-content');const _0x1c1c85=this['context']['plugins']['get'](it)['getUser'](_0x580a6f);if(!_0x1c1c85)throw new _0x55af7e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x580a6f});let _0x2a5d06=null,_0xd4188c=_0x20786e;return _0x2a9d55?.['@external']&&(_0x2a5d06=this['_getExternalAuthor'](_0x2a9d55['@external']['authorName']),_0xd4188c=new Date(_0x2a9d55['@external']['createdAt'])),new wi(this,{'threadId':_0x459606,'id':_0x2c60b4,'author':_0x2a5d06||_0x1c1c85,'creator':_0x1c1c85,'content':_0x10d9ad,'createdAt':_0x20786e,'authoredAt':_0xd4188c,'attributes':_0x2a9d55});}['_addComment'](_0x453e7e){let {threadId:_0x29b957,content:_0x4a3249,attributes:_0x5510df,isFromAdapter:_0x1f4d8e}=_0x453e7e;const _0x13a07d=this['getCommentThread'](_0x453e7e['threadId']);if(!_0x13a07d)throw new _0x55af7e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x28d36b=this['_createNewComment'](_0x453e7e),{id:_0x4fb344}=_0x28d36b;if(_0x13a07d['_add'](_0x28d36b),_0x1f4d8e||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x13a07d['isSubmitted'])return Promise['resolve']();const _0x5977b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4ba61d}=_0x13a07d,_0x29bd39=_0x5977b2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5510df||(_0x5510df={}),this['adapter']['addComment']({'channelId':_0x4ba61d,'threadId':_0x29b957,'commentId':_0x4fb344,'content':_0x4a3249,'attributes':_0x5510df})['then'](_0x5ab5a2=>{_0x5977b2['remove'](_0x29bd39),_0x5ab5a2&&this['_updateComment']({'channelId':_0x4ba61d,'threadId':_0x29b957,'commentId':_0x4fb344,'createdAt':_0x5ab5a2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x530d74=>{throw console['error'](_0x530d74),new _0x55af7e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x18d6f6,commentId:_0xc59b9b,content:_0x3e2961,createdAt:_0x540c75,attributes:_0x1c07d5,isFromAdapter:_0x1bc539}){if(void 0x0!==_0x3e2961&&('string'!=typeof _0x3e2961||!_0x3e2961['trim']()['length']))throw new _0x55af7e('commentsrepository-update-comment-invalid-content');const _0x30198b=this['getCommentThread'](_0x18d6f6),_0xd9e303=_0x30198b['getComment'](_0xc59b9b);if(!_0xd9e303)throw new _0x55af7e('commentsrepository-update-missing-comment',this);let _0x27d7f1=!0x1;if(_0x3e2961&&_0x3e2961!==_0xd9e303['content']&&(_0xd9e303['isEditable']||_0x1bc539)&&(_0xd9e303['content']=_0x3e2961,_0x27d7f1=!0x0),_0x540c75&&_0x540c75!==_0xd9e303['createdAt']&&(_0xd9e303['createdAt']=_0x540c75,_0xd9e303['attributes']&&_0xd9e303['attributes']['@external']||(_0xd9e303['authoredAt']=_0x540c75),_0x27d7f1=!0x0),_0x1c07d5&&!At(_0x1c07d5,_0xd9e303['attributes'])&&(_0xd9e303['attributes']=_0x1c07d5,_0x27d7f1=!0x0),!_0x27d7f1)return Promise['resolve']();if(_0x30198b['fire']('commentUpdated'),_0x1bc539||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5a2fc5=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd37e2a}=this['getCommentThread'](_0xd9e303['threadId']),_0x2914e9=_0x5a2fc5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xd37e2a,'threadId':_0x18d6f6,'commentId':_0xc59b9b,'content':_0x3e2961,'attributes':_0x1c07d5})['then'](()=>_0x5a2fc5['remove'](_0x2914e9))['catch'](_0x1ead1e=>{throw console['error'](_0x1ead1e),new _0x55af7e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x34ec97,commentId:_0x1d2280,isFromAdapter:_0x567597}){const _0x5258fc=this['getCommentThread'](_0x34ec97),_0x2a79b8=_0x5258fc['getComment'](_0x1d2280);if(!_0x2a79b8)throw new _0x55af7e('commentsrepository-remove-missing-comment',this);if(_0x5258fc['_remove'](_0x2a79b8),_0x567597||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x590ea1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x239da6}=_0x5258fc,_0x32b084=_0x590ea1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x239da6,'threadId':_0x34ec97,'commentId':_0x1d2280})['then'](()=>_0x590ea1['remove'](_0x32b084))['catch'](_0x3e2391=>{throw console['error'](_0x3e2391),new _0x55af7e('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0xa31544(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2b0063,_0x57fd96){super();const _0x2b4732=_0x57fd96['isResolvable'];this['channelId']=_0x57fd96['channelId'],this['id']=_0x57fd96['id'],this['comments']=new _0x24de43(),this['_repository']=_0x2b0063,this['_isAttached']=!0x1,this['_isSubmitted']=_0x57fd96['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2b0063,'_permissions',_0x2b0063,'_readOnlyChannels',()=>_0x2b0063['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2b0063,'_permissions',()=>_0x2b0063['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2b0063,'_permissions',()=>{const _0x5cb7e9=_0x2b0063['getPermissions'](this['channelId']);return _0x5cb7e9['write']||_0x5cb7e9['admin'];}),this['bind']('isResolvable')['to'](_0x2b0063,'_permissions',()=>_0x2b4732&&_0x2b0063['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x57fd96['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2a3c28,_0x201fdd)=>_0x2a3c28?_0x201fdd?_0x2a3c28<_0x201fdd?_0x2a3c28:_0x201fdd:_0x2a3c28:_0x201fdd),this['set']('unlinkedAt',_0x57fd96['unlinkedAt']||null),this['set']('resolvedAt',_0x57fd96['resolvedAt']||null),this['set']('resolvedBy',_0x57fd96['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x180234=>!!_0x180234),this['set']('attributes',_0x57fd96['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xdccd38,_0x5ec12e)=>_0xdccd38+_0x5ec12e['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x46b85c,id:_0x1bc6cc}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x46b85c),{'channelId':_0x46b85c,'threadId':_0x1bc6cc});}['setUnlinkedAt'](_0x1b975e){this['_update']({'unlinkedAt':_0x1b975e});}['resolve']({resolvedAt:_0x38b0ff=new Date(),resolvedBy:_0x8d10c4=null,isFromAdapter:_0x1e802c=!0x1}={}){const _0xf35041=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x360bf2,id:_0x58c4dd}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x360bf2),{'channelId':_0x360bf2,'threadId':_0x58c4dd,'resolvedAt':_0x38b0ff,'resolvedBy':_0x8d10c4||_0xf35041['id'],'isFromAdapter':_0x1e802c});}['reopen']({isFromAdapter:_0x30fcf4=!0x1}={}){const {channelId:_0x5ec789,id:_0x4792a5}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x5ec789),{'channelId':_0x5ec789,'threadId':_0x4792a5,'isFromAdapter':_0x30fcf4});}['setContext'](_0x77bd85){this['context']||this['_update']({'context':_0x77bd85});}['setAttribute'](_0x4f65dc,_0x5b5f12){const _0x1a4ad3=wt(this['attributes']);yt(_0x1a4ad3,_0x4f65dc,_0x5b5f12),this['_update']({'attributes':_0x1a4ad3});}['removeAttribute'](_0x3d360b){const _0x5eba17=wt(this['attributes']);Ct(_0x5eba17,_0x3d360b),this['_update']({'attributes':_0x5eba17});}['remove']({isFromAdapter:_0x52f877=!0x1}={}){const {channelId:_0x482d67,id:_0x55f938}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x482d67),{'channelId':_0x482d67,'threadId':_0x55f938,'isFromAdapter':_0x52f877});}['attachTo'](_0x10020e){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x10020e});}['addComment'](_0x2441ea){const {channelId:_0x374534,id:_0x29a7c6}=this;this['_repository']['fire'](Nt('addComment',_0x374534,_0x29a7c6),Object['assign']({'channelId':_0x374534,'threadId':_0x29a7c6},_0x2441ea));}['getComment'](_0x5de766){if('string'!=typeof _0x5de766)throw new _0x55af7e('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5de766});return this['comments']['get'](_0x5de766);}['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'](_0x2ad426=>_0x2ad426['toJSON']()),'attributes':this['attributes']};}['_add'](_0x39b4c2){return this['listenTo'](_0x39b4c2,'change:authoredAt',()=>{const _0x2ae0c6=this['_findOptimalIndex'](_0x39b4c2),_0x462061=this['comments'];_0x2ae0c6-0x1!=_0x462061['getIndex'](_0x39b4c2)&&_0x2ae0c6+0x1!=_0x462061['getIndex'](_0x39b4c2)&&(this['_remove'](_0x39b4c2),this['_add'](_0x39b4c2));}),this['comments']['add'](_0x39b4c2,this['_findOptimalIndex'](_0x39b4c2));}['_update'](_0x544b0e){const {channelId:_0x373bac,id:_0x5d1709}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x373bac),{..._0x544b0e,'channelId':_0x373bac,'threadId':_0x5d1709});}['_remove'](_0x2bea2c){return this['stopListening'](_0x2bea2c),_0x2bea2c['destroy'](),this['comments']['remove'](_0x2bea2c);}['_findOptimalIndex'](_0x4a7a82){const _0x596750=this['comments']['find'](_0x158a5f=>new Date(_0x158a5f['authoredAt'])['getTime']()>new Date(_0x4a7a82['authoredAt'])['getTime']());return _0x596750?this['comments']['getIndex'](_0x596750):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0xa31544(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x25071e,_0x1cd237){super();const _0x1b1c3b=_0x25071e['context']['plugins']['get'](it)['me'],_0x24ce51=_0x25071e['getCommentThread'](_0x1cd237['threadId']),_0x14a9ee=0x0===_0x24ce51['comments']['length'],_0x2ff987=_0x1b1c3b===_0x1cd237['author'];this['id']=_0x1cd237['id'],this['threadId']=_0x1cd237['threadId'],this['author']=_0x1cd237['author'],this['creator']=_0x1cd237['creator'],this['isExternal']=Boolean(_0x1cd237['attributes']&&_0x1cd237['attributes']['@external']),this['set']('content',_0x1cd237['content']),this['createdAt']=_0x1cd237['createdAt']||new Date(),this['set']('authoredAt',_0x1cd237['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x24ce51,'resolvedAt'),this['set']('attributes',_0x1cd237['attributes']||{}),this['bind']('isEditable')['to'](_0x25071e,'_permissions',()=>{const _0x6f757a=_0x25071e['getPermissions'](_0x24ce51['channelId'])['write'],_0x429ad=_0x25071e['getPermissions'](_0x24ce51['channelId'])['modifyAll'];return _0x2ff987&&_0x6f757a||!_0x2ff987&&_0x429ad;}),this['bind']('isRemovable')['to'](_0x24ce51,'isRemovable',_0x25071e,'_permissions',_0x9a4f20=>{const _0x262c3b=_0x25071e['getPermissions'](_0x24ce51['channelId'])['write'],_0x40ec0e=_0x25071e['getPermissions'](_0x24ce51['channelId'])['modifyAll'];return _0x2ff987&&_0x262c3b||_0x9a4f20&&_0x14a9ee||!_0x2ff987&&_0x40ec0e&&!_0x14a9ee;}),this['bind']('isReadOnly')['to'](_0x24ce51,'isReadOnly'),this['_repository']=_0x25071e;}get['weight'](){return Math['max'](function(_0x52bfe4){const _0x16491a=document['createElement']('div');return _0x16491a['innerHTML']=_0x52bfe4,_0x16491a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1a02c2){const {threadId:_0x151f29,id:_0x52a26c}=this;if(!this['_repository']['hasCommentThread'](_0x151f29))throw new _0x55af7e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3c334d}=this['_repository']['getCommentThread'](_0x151f29);this['_repository']['fire'](Nt('updateComment',_0x3c334d,_0x151f29),{'channelId':_0x3c334d,'threadId':_0x151f29,'commentId':_0x52a26c,..._0x1a02c2});}['setAttribute'](_0x3e7021,_0x104957){const _0x34f4fa=wt(this['attributes']);yt(_0x34f4fa,_0x3e7021,_0x104957),this['update']({'attributes':_0x34f4fa});}['removeAttribute'](_0x40b71e){const _0x1e5a0a=wt(this['attributes']);Ct(_0x1e5a0a,_0x40b71e),this['update']({'attributes':_0x1e5a0a});}['remove'](_0x53b2fd={}){if(!_0x53b2fd['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x44ca07,id:_0x11be95}=this;if(!this['_repository']['hasCommentThread'](_0x44ca07))throw new _0x55af7e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x782541}=this['_repository']['getCommentThread'](_0x44ca07);this['_repository']['fire'](Nt('removeComment',_0x782541,_0x44ca07),{'channelId':_0x782541,'threadId':_0x44ca07,'commentId':_0x11be95,..._0x53b2fd});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x309484,..._0x3541cc){for(const _0x214941 of _0x3541cc)void 0x0!==_0x214941&&(_0x309484+=':'+String(_0x214941));return _0x309484;}class ot extends _0xb3b2c2{constructor(_0x4603ae){super(_0x4603ae),this['set']('hasContent',!0x1);}['refresh'](){const _0xa7f1fe=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x592a8b of _0xa7f1fe['getRanges']())if(this['_hasContent'](_0x592a8b))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3c98ca=_0x1797dc(),ranges:_0x40e7d2,comment:_0xc9736f}={}){const _0x371318=this['editor']['model'],_0x254344=_0x40e7d2??Array['from'](_0x371318['document']['selection']['getRanges']()),_0xb8fca7=[];for(const _0x3d1222 of _0x254344)this['_hasContent'](_0x3d1222)&&_0xb8fca7['push'](this['_trimToContent'](_0x3d1222));if(!_0xb8fca7['length'])throw new _0x55af7e('addcommentthreadcommand-incorrect-ranges',null);_0xc9736f&&this['_createCommentThread'](_0x3c98ca,_0xc9736f),this['_createMarkersFromRanges'](_0x3c98ca,_0xb8fca7,!!_0xc9736f);}['_createMarkersFromRanges'](_0x268b1b,_0x175e84,_0x1b1460){this['editor']['model']['change'](_0x4da8ca=>{for(const _0x29c102 of _0x175e84){const _0x164ec8=_0x1797dc()['substr'](0x1,0x5),_0x4bf10e='comment:'+_0x268b1b+':'+_0x164ec8;_0x4da8ca['addMarker'](_0x4bf10e,{'range':_0x29c102,'usingOperation':_0x1b1460,'affectsData':_0x1b1460});}});}['_createCommentThread'](_0x4c6a36,_0x228a28){const _0x3dc3db=this['editor']['plugins']['get']('CommentsRepository'),_0x5aa1a7=this['editor']['config']['get']('collaboration.channelId'),_0x35a17c=this['editor']['plugins']['get']('Users')['me'];if(!_0x35a17c)throw new _0x55af7e('addcommentthreadcommand-user-not-found',null);_0x3dc3db['addCommentThread']({'threadId':_0x4c6a36,'channelId':_0x5aa1a7,'comments':[{'authorId':_0x35a17c['id'],'content':_0x228a28,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x23f60d){for(const _0x1c6a20 of _0x23f60d['getItems']())if(this['_itemIsContent'](_0x1c6a20))return!0x0;return!0x1;}['_itemIsContent'](_0xeaf873){return _0xeaf873['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xeaf873)&&!_0xeaf873['is']('element','tableCell');}['_trimToContent'](_0x3d76ab){const _0x46c137=_0x5c06ef=>!this['_itemIsContent'](_0x5c06ef['item']),_0x2fff9d=_0x3d76ab['start']['getLastMatchingPosition'](_0x46c137),_0x5b939e=_0x3d76ab['end']['getLastMatchingPosition'](_0x46c137,{'direction':'backward'});return this['editor']['model']['createRange'](_0x2fff9d,_0x5b939e);}}class b extends _0xeeaaab{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f967e){super(_0x1f967e),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1a559c=this['editor'],_0x494e57=_0x1a559c['model']['document']['selection'],_0x4ba421=_0x20001b(()=>this['refreshSelectedViews'](),0xa);_0x494e57['on']('change:range',(_0x539513,_0xcc3e43)=>{_0xcc3e43['directChange']&&(_0x4ba421['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1a559c['editing']['view']['document'],'change:isFocused',(_0x5bd7de,_0x11cc68,_0xe452b0)=>{_0xe452b0&&_0x4ba421();}),this['listenTo'](_0x1a559c['ui']['focusTracker'],'change:isFocused',(_0x242c36,_0x314b2f,_0x10f12e)=>{_0x10f12e||this['fire']('blur',{'isAnnotationTracked':_0x5b8ad1=>this['_editorAnnotationsData']['has'](_0x5b8ad1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x50902e){if(this['_editorAnnotations']['has'](_0x50902e['view']))return;this['_editorAnnotations']['add'](_0x50902e['view']),this['editor']['ui']['focusTracker']['add'](_0x50902e['view']['element']);const _0x53e9b2=this['editor']['plugins']['get'](y);this['listenTo'](_0x53e9b2['collection'],'remove',(_0x22367f,_0xf7ea30)=>{this['editor']['ui']['focusTracker']['remove'](_0xf7ea30['view']['element']),this['_editorAnnotations']['delete'](_0xf7ea30['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1a9deb){if('function'!=typeof _0x1a9deb)throw new _0x55af7e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1a9deb);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x43c532,annotations:_0x321c5c}){const _0x5afa67=[],_0x1dfc9c=this['editor']['model']['document']['selection'],_0x3485dc=Array['from'](_0x1dfc9c['getRanges']());for(const [_0x119c62,_0x3cabaf]of this['_editorAnnotationsData']){const _0xfd714d=_0x311012(_0x3cabaf),_0x333705=_0x321c5c['getByInnerView'](_0x119c62);_0xfd714d&&_0x333705&&_0x5afa67['push']({'annotation':_0x333705,'range':_0xfd714d});}function _0x311012(_0x44d97e){for(const _0x41fa4c of _0x44d97e)for(const _0x469423 of _0x3485dc)if(_0x41fa4c['containsRange'](_0x469423,!_0x1dfc9c['isCollapsed']))return _0x41fa4c;return null;}return _0x5afa67['sort']((_0x212513,_0x2bc1fb)=>{const _0x2cc2df=_0x212513['range'],_0x54acd6=_0x2bc1fb['range'];if(!_0x2cc2df['isEqual'](_0x54acd6)){if(_0x2cc2df['containsRange'](_0x54acd6,!0x0))return 0x1;if(_0x54acd6['containsRange'](_0x2cc2df,!0x0))return-0x1;}return _0x212513['annotation']==_0x43c532?-0x1:_0x2bc1fb['annotation']==_0x43c532?0x1:0x0;})['map'](_0x3e1d61=>_0x3e1d61['annotation']);}get['_editorAnnotationsData'](){const _0x4a1a50=new Map();for(const _0x377e0e of Array['from'](this['_dataCollectors']))for(const [_0x42bd4e,_0x575b93]of _0x377e0e())_0x4a1a50['set'](_0x42bd4e,_0x575b93);return _0x4a1a50;}}class st extends _0xeeaaab{['afterInit'](){const _0x1117f5=this['editor'];if(!_0x1117f5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1117f5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xeeaaab{constructor(_0x30b958){super(_0x30b958),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xaf13c7=this['editor'],_0x2007ed=_0xaf13c7['commands']['get']('importWord'),_0x5ef5d8=_0xaf13c7['plugins']['get'](it);_0x2007ed&&(_0x2007ed['on']('execute',(_0x5774ab,[,_0x172d79])=>{_0x172d79['collaboration_features']={'comments':!0x0,'user_id':_0x5ef5d8['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2007ed,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2b2d66,_0x5c534f){const {comment_threads:_0x1ed445}=_0x5c534f;_0x1ed445&&_0x1ed445['forEach'](({thread_id:_0x371747,comments:_0x2341b7,is_resolved:_0x316255})=>{const _0x44cc33=new Date(),_0x235e82=_0x2341b7['map'](({author:_0x3a6ad5,content:_0x597d7c,created_at:_0x45a9c8})=>({'content':_0x597d7c,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x44cc33,'attributes':{'@external':{'authorName':_0x3a6ad5,'createdAt':_0x45a9c8?new Date(_0x45a9c8):new Date(),'source':'importWord'}}})),_0x910d6=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x910d6,'threadId':_0x371747,'comments':_0x235e82,'resolvedAt':_0x316255?_0x44cc33:null});});}}class at extends _0xeeaaab{constructor(_0x4942c6){super(_0x4942c6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x135a44=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x135a44,'contentInsertion',(_0x4f5ed1,_0x59bc38)=>this['_removeMarkersWithoutThreads'](_0x59bc38['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x13863b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x13863b;const _0x4aa4c2=this['editor']['plugins']['get']('CommentsRepository');for(const _0x41de12 of _0x13863b['keys']()){const [_0x2f9555,_0x2233f1]=_0x41de12['split'](':');'comment'!=_0x2f9555||_0x4aa4c2['hasCommentThread'](_0x2233f1)||_0x13863b['delete'](_0x41de12);}return _0x13863b;}['_registerMarkerInClipboardPipeline'](){const _0x239089=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3de1f5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3de1f5&&_0x239089['_registerMarkerToCopy']('comment',_0x3de1f5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4e2f99){switch(_0x4e2f99){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x3b0e2d){const _0x23b081=_0x3b0e2d['split'](':');return{'group':_0x23b081[0x0],'id':_0x23b081[0x1],'part':_0x23b081[0x2]};}class ut extends _0xeeaaab{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3dd554,_0x9e2e29)=>{if(!_0x9e2e29['options']['showCommentHighlights'])return null;if(_0x9e2e29['options']['ignoreResolvedComments']){const {id:_0xc4ddfb}=ft(_0x3dd554['markerName']),_0x58b5a6=this['editor']['plugins']['get'](o);if(_0x58b5a6['getCommentThread'](_0xc4ddfb)?.['isResolved']&&_0x3dd554['item'])return _0x9e2e29['consumable']['consume'](_0x3dd554['item'],'addMarker:'+_0x3dd554['markerName']),_0x9e2e29['consumable']['consume'](_0x3dd554['item'],'removeMarker:'+_0x3dd554['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x25b7fe=>{_0x25b7fe['on']('addMarker:comment',(_0x33df8c,_0x3e7b51,_0x269627)=>{if(!_0x269627['options']['showCommentHighlights'])return;const _0x23a800=_0x3e7b51['item'];if(!_0x23a800)return;const _0x192660=_0x269627['mapper']['toViewElement'](_0x23a800);this['editor']['model']['schema']['isObject'](_0x23a800)&&_0x192660&&!_0x192660['getCustomProperty']('widget')&&_0x192660['is']('containerElement')&&_0x3f4190(_0x192660,_0x269627['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x41212e,{writer:_0x55a5f0,options:_0x364c0a})=>{if(!_0x364c0a['showCommentHighlights'])return null;const _0x3fbf8f=_0x55a5f0['createContainerElement']('div'),_0x343f9f=_0x55a5f0['createEmptyElement']('hr');return _0x55a5f0['addClass']('ck-horizontal-line',_0x3fbf8f),_0x55a5f0['insert'](_0x55a5f0['createPositionAt'](_0x3fbf8f,0x0),_0x343f9f),_0x3fbf8f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x492f5d,{writer:_0x49c368,options:_0x443bb3})=>{if(!_0x443bb3['showCommentHighlights'])return null;const _0xfa06d8=_0x49c368['createContainerElement']('span'),_0x4668f1=_0x49c368['createEmptyElement']('img');return _0x49c368['addClass']('image-inline',_0xfa06d8),_0x49c368['insert'](_0x49c368['createPositionAt'](_0xfa06d8,0x0),_0x4668f1),_0xfa06d8;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x37e7ce,{writer:_0x33e392,options:_0x1bb851})=>{if(_0x1bb851['showCommentHighlights'])return _0x33e392['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2c75e7,_0x183690,_0x4eccce)=>{_0x4eccce['options']['showCommentHighlights']&&_0x2c75e7['stop']();},{'priority':'high'});}}class r extends _0xeeaaab{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(_0x46414a){super(_0x46414a),this['set']('isThreadsLoadingPaused',!0x0),_0x46414a['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5d613f,_0x494293,_0x2e8891,_0x18c217)=>{const _0x3cb53f=_0x46414a['plugins']['get'](o),_0x2ddf41=_0x2e8891?ft(_0x2e8891)['id']:null;_0x46414a['model']['change'](()=>{if(_0x2ddf41){const _0x3b6a9e=this['getAllMarkersForId'](_0x2ddf41);for(const _0x4e3c24 of _0x3b6a9e)_0x46414a['editing']['reconvertMarker'](_0x4e3c24);}if(_0x18c217){const {id:_0x488d53}=ft(_0x18c217),_0x592244=_0x3cb53f['getCommentThread'](_0x488d53);if(_0x592244&&_0x592244['unlinkedAt'])return;if(_0x592244&&!_0x592244['isAttached'])return;const _0x3515b1=this['getAllMarkersForId'](_0x488d53);for(const _0x462b87 of _0x3515b1)_0x46414a['editing']['reconvertMarker'](_0x462b87);}}),_0x2ddf41&&this['scrollToThreadMarker'](_0x2ddf41);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3ea021=this['editor'],_0x2f2c72=_0x3ea021['plugins']['get'](o),_0x57dbd9=_0x3ea021['config']['get']('collaboration.channelId'),_0x532ab8=_0x2f2c72['getCommentThreads']()['filter'](_0x6e5897=>_0x6e5897['channelId']!==_0x57dbd9);_0x3ea021['commands']['add']('addCommentThread',new ot(_0x3ea021)),this['listenTo'](_0x3ea021,'change:isReadOnly',(_0x5deb5c,_0x110b7d,_0x290e9e)=>{_0x2f2c72['switchReadOnly'](_0x290e9e,_0x3ea021['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2f2c72,dt('addCommentThread',_0x57dbd9),(_0x3db4fc,{threadId:_0x28d67e})=>{const _0x13233c=this['editor']['plugins']['get'](o)['getCommentThread'](_0x28d67e);_0x13233c?.['unlinkedAt']&&this['_attachArchivedThread'](_0x28d67e);}),this['listenTo'](_0x2f2c72,dt('removeCommentThread',_0x57dbd9),(_0x5d0d68,{threadId:_0xfefcb1})=>{_0x3ea021['model']['enqueueChange']({'isUndoable':!0x1},_0x4f6af9=>{const _0x588aa0=this['getAllMarkersForId'](_0xfefcb1);for(const _0x4e5377 of _0x588aa0)_0x4f6af9['removeMarker'](_0x4e5377);});}),this['listenTo'](_0x2f2c72,dt('resolveCommentThread',_0x57dbd9),(_0x2fdb44,{threadId:_0x1dafe0})=>{(this['_reconvertMarkers'](_0x1dafe0),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1dafe0)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2f2c72,dt('reopenCommentThread',_0x57dbd9),(_0x1eeae3,{threadId:_0x2a4036})=>{this['_reconvertMarkers'](_0x2a4036);},{'priority':'low'}),this['listenTo'](_0x2f2c72,dt('addComment',_0x57dbd9),(_0x8db919,{threadId:_0x38d1b9,isFromAdapter:_0x52818d})=>{const _0x412773=this['getAllMarkersForId'](_0x38d1b9);if(_0x52818d||0x0==_0x412773['length']||!_0x2f2c72['hasCommentThread'](_0x38d1b9))return;0x1===_0x2f2c72['getCommentThread'](_0x38d1b9)['length']&&_0x3ea021['model']['enqueueChange']({'isUndoable':!0x1},_0x4b00ba=>{for(const _0x53bc29 of _0x412773)_0x4b00ba['updateMarker'](_0x53bc29,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x532ab8);}['afterInit'](){!async function(_0x1091a3){const _0x19e04c=_0x47297d([0x73,0x56,0x35,0x6d,0x52,0x49,0x75,0x53,0x71,0x6b,0x4d,0x7a,0x69,0x61,0x47,0x57,0x62,0x32,0x42,0x45,0x51,0x58,0x70,0x4a,0x63,0x79,0x68,0x30,0x48,0x50,0x55,0x4e,0x6e,0x4f,0x5a,0x54,0x39,0x72,0x33,0x6a,0x65,0x4b,0x67,0x64,0x31,0x76,0x59,0x37,0x41,0x66,0x44,0x43,0x78,0x6c,0x6f,0x34,0x38,0x74,0x77,0x4c,0x36,0x46]),_0x23a496=0x673793ce,_0x454b73=0x6730fc56^_0x23a496,_0x5997f0=window[_0x47297d([0x44,0x61,0x74,0x65])][_0x47297d([0x6e,0x6f,0x77])](),_0x196d72=_0x1091a3[_0x47297d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2ac91e=new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x441df4=>{_0x196d72[_0x47297d([0x6f,0x6e,0x63,0x65])](_0x47297d([0x72,0x65,0x61,0x64,0x79]),_0x441df4);}),_0x6b4286={[_0x47297d([0x6b,0x74,0x79])]:_0x47297d([0x45,0x43]),[_0x47297d([0x75,0x73,0x65])]:_0x47297d([0x73,0x69,0x67]),[_0x47297d([0x63,0x72,0x76])]:_0x47297d([0x50,0x2d,0x32,0x35,0x36]),[_0x47297d([0x78])]:_0x47297d([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]),[_0x47297d([0x79])]:_0x47297d([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]),[_0x47297d([0x61,0x6c,0x67])]:_0x47297d([0x45,0x53,0x32,0x35,0x36])},_0x270f39=_0x196d72[_0x47297d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x47297d([0x67,0x65,0x74])](_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x42627e(){let _0x31f9c8,_0x45af00=null,_0x29fe45=null;try{if(_0x270f39==_0x47297d([0x47,0x50,0x4c]))return _0x47297d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x31f9c8=_0x1d4eba(),!_0x31f9c8)return _0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x31f9c8[_0x47297d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x29fe45=_0x19c5c8(_0x31f9c8[_0x47297d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x31f9c8[_0x47297d([0x6a,0x74,0x69])])),await _0x29a487()?_0x2bad50()?_0x393c8d()?_0x47297d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x539375()?(_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47297d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x45af00=_0x44f89c(_0x47297d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47297d([0x74,0x72,0x69,0x61,0x6c])&&(_0x45af00=_0x44f89c(_0x47297d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x46f0b2()):_0x47297d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x47297d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x393c8d(){const _0x56fd3b=[_0x47297d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x47297d([0x74,0x72,0x69,0x61,0x6c])][_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5997f0/0x3e8:0xe10*_0x454b73;return _0x31f9c8[_0x47297d([0x65,0x78,0x70])]<_0x56fd3b;}function _0x2bad50(){const _0x23e7ab=_0x31f9c8[_0x47297d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x23e7ab)return!0x1;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x2a])))return!0x0;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x43,0x4d,0x54])))return!0x0;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x52,0x43,0x4d,0x54]))){if(_0x5bffd0())return!0x0;if(_0x5b9080()||_0x102683())return!0x0;}return!0x1;}function _0x539375(){const _0x315c83=_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x315c83||0x0==_0x315c83[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2c474c}=new URL(window[_0x47297d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x315c83[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c474c))return!0x0;const _0x5437bf=_0x2c474c[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e]));return _0x315c83[_0x47297d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x54c23c=>_0x54c23c[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x2a])))[_0x47297d([0x6d,0x61,0x70])](_0x69b70e=>_0x69b70e[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e])))[_0x47297d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12c397=>_0x12c397[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5437bf[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47297d([0x6d,0x61,0x70])](_0x461e2d=>Array(_0x5437bf[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x461e2d[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47297d([0x66,0x69,0x6c,0x6c])](_0x461e2d[0x0]===_0x47297d([0x2a])?_0x47297d([0x2a]):'')[_0x47297d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x461e2d))[_0x47297d([0x73,0x6f,0x6d,0x65])](_0x4e3d3d=>_0x5437bf[_0x47297d([0x65,0x76,0x65,0x72,0x79])]((_0x4d3ed1,_0x3ceb67)=>_0x4e3d3d[_0x3ceb67]===_0x4d3ed1||_0x4e3d3d[_0x3ceb67]===_0x47297d([0x2a])));}function _0x46f0b2(){return _0x45af00&&_0x29fe45?new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4c412e,_0x43c633)=>{_0x45af00[_0x47297d([0x74,0x68,0x65,0x6e])](_0x4c412e,_0x43c633),_0x29fe45[_0x47297d([0x74,0x68,0x65,0x6e])](_0x39b3bd=>{_0x39b3bd!=_0x47297d([0x56,0x61,0x6c,0x69,0x64])&&_0x4c412e(_0x39b3bd);},_0x43c633);}):_0x45af00||_0x29fe45||_0x47297d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x19c5c8(_0x4f63e8,_0x4af72b){return new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c5bd0=>{if(_0x359ac5())return _0x5c5bd0(_0x47297d([0x56,0x61,0x6c,0x69,0x64]));_0x17b835(),_0x196d72[_0x47297d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x60d929=!0x1;const _0x2f6b55=_0x1797dc();function _0x114941(_0x5dc021){return!!_0x5dc021&&(typeof _0x5dc021===_0x47297d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5dc021===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5dc021[_0x47297d([0x74,0x68,0x65,0x6e])]===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5dc021[_0x47297d([0x63,0x61,0x74,0x63,0x68])]===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3265e0(_0x1d5684){_0x15b743(_0x1d5684)[_0x47297d([0x74,0x68,0x65,0x6e])](_0x48b3a9=>{if(!_0x48b3a9||_0x48b3a9[_0x47297d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x47297d([0x6f,0x6b]))return _0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x209198(_0x2c7d53(_0x2f6b55+_0x4af72b))!=_0x48b3a9[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x47297d([0x56,0x61,0x6c,0x69,0x64]);})[_0x47297d([0x74,0x68,0x65,0x6e])](_0x38ac4a=>(_0x16d794(),_0x38ac4a),()=>{const _0x2f80ef=_0x14a6cf();return null==_0x2f80ef?(_0x16d794(),_0x47297d([0x56,0x61,0x6c,0x69,0x64])):_0x47297d(_0x5997f0-_0x2f80ef>(0x433b17ce^_0x23a496)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x47297d([0x74,0x68,0x65,0x6e])](_0x5c5bd0)[_0x47297d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x475a3f=0x67017d4e^_0x23a496;function _0x16d794(){const _0x5b3664=_0x47297d([0x6c,0x6c,0x63,0x74,0x2d])+_0x209198(_0x2c7d53(_0x4f63e8)),_0x8a7f6e=_0x3a16ee(_0x209198(window[_0x47297d([0x4d,0x61,0x74,0x68])][_0x47297d([0x63,0x65,0x69,0x6c])](_0x5997f0/_0x475a3f)));window[_0x47297d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47297d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5b3664,_0x8a7f6e);}function _0x14a6cf(){const _0x31275a=_0x47297d([0x6c,0x6c,0x63,0x74,0x2d])+_0x209198(_0x2c7d53(_0x4f63e8)),_0x5e16c3=window[_0x47297d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47297d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31275a);return _0x5e16c3?window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a16ee(_0x5e16c3),0x10)*_0x475a3f:null;}function _0x15b743(_0x175565){return new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x506aba,_0x4819ca)=>{_0x175565[_0x47297d([0x74,0x68,0x65,0x6e])](_0x506aba,_0x4819ca),window[_0x47297d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4819ca,0x6736470e^_0x23a496);});}}_0x196d72[_0x47297d([0x6f,0x6e])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x20d74e,_0x40e332)=>{if(_0x40e332[0x0]!=_0x4f63e8)return _0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x40e332[0x1]={..._0x40e332[0x1],[_0x47297d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2f6b55};},{[_0x47297d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47297d([0x68,0x69,0x67,0x68])}),_0x196d72[_0x47297d([0x6f,0x6e])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x47c573=>{_0x114941(_0x47c573[_0x47297d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x60d929=!0x0,_0x3265e0(_0x47c573[_0x47297d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x47297d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47297d([0x6c,0x6f,0x77])}),_0x2ac91e[_0x47297d([0x74,0x68,0x65,0x6e])](()=>{_0x60d929||_0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x359ac5(){return _0x196d72[_0x47297d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47297d([0x76,0x69,0x65,0x77])][_0x47297d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x47297d([0x61,0x75,0x74,0x6f]);}function _0x17b835(){_0x196d72[_0x47297d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47297d([0x76,0x69,0x65,0x77])][_0x47297d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x47297d([0x61,0x75,0x74,0x6f]);}}function _0x44f89c(_0x3902ff){const _0x5e239d=[new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x422c3a=>setTimeout(_0x422c3a,0x673ead02^_0x23a496)),_0x2ac91e[_0x47297d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25885e=>{let _0x7ed6a2=0x0;_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x6f,0x6e])](_0x47297d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4c1eed,_0x4bbef7)=>{_0x4bbef7[0x0][_0x47297d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x7ed6a2++,_0x7ed6a2==(0x67379236^_0x23a496)&&(_0x25885e(),_0x4c1eed[_0x47297d([0x6f,0x66,0x66])]());});}))];return window[_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x47297d([0x72,0x61,0x63,0x65])](_0x5e239d)[_0x47297d([0x74,0x68,0x65,0x6e])](()=>_0x3902ff);}async function _0x47c860(){await _0x2ac91e,_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4fbe2a,_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4fbe2a,_0x196d72[_0x47297d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x47297d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5bffd0(){return _0x4d4b3b(_0x47297d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4ebb00(_0x47297d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x47297d([0x73,0x74,0x61,0x74,0x65])]==_0x47297d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5b9080(){return _0x4d4b3b(_0x47297d([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 _0x102683(){return _0x4d4b3b(_0x47297d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4eee56(_0x21f1b3){const _0x5d7cab=_0x2bf939();_0x196d72[_0x5d7cab]=_0x47297d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x21f1b3,_0x21f1b3!=_0x47297d([0x56,0x61,0x6c,0x69,0x64])&&_0x47c860();}function _0x2bf939(){const _0x476873=window[_0x47297d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x47297d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x47297d([0x6e,0x6f,0x77])]())[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x47297d([0x2e]),'');let _0x20c3a6=_0x47297d([0x73]);for(let _0x4b4d7c=0x0;_0x4b4d7c<_0x476873[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b4d7c+=0x2){let _0x26e6f3=window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x476873[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b4d7c,_0x4b4d7c+0x2));_0x26e6f3>=_0x19e04c[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x26e6f3-=_0x19e04c[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x20c3a6+=_0x19e04c[_0x26e6f3];}return _0x20c3a6;}function _0x1d4eba(){const _0x3ccfb6=_0x270f39[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e]));if(0x3!=_0x3ccfb6[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4bba35(_0x3ccfb6[0x1]);function _0x4bba35(_0x1ab4ea){const _0x4794b3=_0x17be03(_0x1ab4ea);return _0x4794b3&&_0x19f5a3()?_0x4794b3:null;function _0x19f5a3(){const _0x9caeac=_0x4794b3[_0x47297d([0x6a,0x74,0x69])],_0x1cf747=window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9caeac[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x9caeac[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1207ab={..._0x4794b3,[_0x47297d([0x6a,0x74,0x69])]:_0x9caeac[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x9caeac[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1207ab[_0x47297d([0x76,0x63])],_0x2c7d53(_0x1207ab)==_0x1cf747;}}}async function _0x29a487(){let _0x430279=!0x0;try{const _0x4ec327=_0x270f39[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e])),[_0x397b50,_0xeaa804,_0x149010]=_0x4ec327;return _0x571c00(_0x397b50),await _0x4a9e9a(_0x397b50,_0xeaa804,_0x149010),_0x430279;}catch{return!0x1;}function _0x571c00(_0x4bc900){const _0x756fc0=_0x17be03(_0x4bc900);_0x756fc0&&_0x756fc0[_0x47297d([0x61,0x6c,0x67])]==_0x47297d([0x45,0x53,0x32,0x35,0x36])||(_0x430279=!0x1);}async function _0x4a9e9a(_0x5edf4c,_0x224627,_0x11902f){const _0x249986=window[_0x47297d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x47297d([0x66,0x72,0x6f,0x6d])](_0x1397ff(_0x11902f),_0x4ff612=>_0x4ff612[_0x47297d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5c0318=new window[(_0x47297d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x47297d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5edf4c+_0x47297d([0x2e])+_0x224627),_0x54447c=window[_0x47297d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x47297d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54447c)return;const _0xf6d948=await _0x54447c[_0x47297d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x47297d([0x6a,0x77,0x6b]),_0x6b4286,{[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x45,0x43,0x44,0x53,0x41]),[_0x47297d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x47297d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54447c[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x45,0x43,0x44,0x53,0x41]),[_0x47297d([0x68,0x61,0x73,0x68])]:{[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf6d948,_0x249986,_0x5c0318)||(_0x430279=!0x1);}}function _0x17be03(_0x1910f0){return _0x1910f0[_0x47297d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x47297d([0x65,0x79]))?JSON[_0x47297d([0x70,0x61,0x72,0x73,0x65])](_0x1397ff(_0x1910f0)):null;}function _0x1397ff(_0x5ed6ea){return window[_0x47297d([0x61,0x74,0x6f,0x62])](_0x5ed6ea[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x47297d([0x2b]))[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x47297d([0x2f])));}function _0x2c7d53(_0x25c802){let _0x5876af=0x1505;function _0xf73e1c(_0x185968){for(let _0x3e4ffe=0x0;_0x3e4ffe<_0x185968[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3e4ffe++){const _0x4a180e=_0x185968[_0x47297d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3e4ffe);_0x5876af=(_0x5876af<<0x5)+_0x5876af+_0x4a180e,_0x5876af&=_0x5876af;}}function _0x39d931(_0xe64048){Array[_0x47297d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xe64048)?_0xe64048[_0x47297d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39d931):_0xe64048&&typeof _0xe64048==_0x47297d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x47297d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xe64048)[_0x47297d([0x73,0x6f,0x72,0x74])]()[_0x47297d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x56260d,_0x19a035])=>{_0xf73e1c(_0x56260d),_0x39d931(_0x19a035);}):_0xf73e1c(window[_0x47297d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xe64048));}return _0x39d931(_0x25c802),_0x5876af>>>0x0;}function _0x209198(_0x37e1ae){return _0x37e1ae[_0x47297d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x47297d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x47297d([0x30]));}function _0x3a16ee(_0x282c4e){return _0x282c4e[_0x47297d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x47297d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x47297d([0x6a,0x6f,0x69,0x6e])]('');}function _0x4d4b3b(_0x47d9fc){return _0x196d72[_0x47297d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x47297d([0x68,0x61,0x73])](_0x47d9fc);}function _0x4ebb00(_0x1c9acc){return _0x196d72[_0x47297d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x47297d([0x67,0x65,0x74])](_0x1c9acc);}function _0x4fbe2a(){}function _0x47297d(_0x3f9c18){return _0x3f9c18['map'](_0xfe8966=>String['fromCharCode'](_0xfe8966))['join']('');}_0x4eee56(await _0x42627e());}(this);}['destroy'](){const _0x4ac9af=this['editor']['plugins']['get'](o),_0x40e6ee=this['editor']['config']['get']('collaboration.channelId');for(const _0x5914bb of _0x4ac9af['getCommentThreads']({'channelId':_0x40e6ee}))_0x4ac9af['_detachCommentThread'](_0x5914bb['id']),_0x4ac9af['_threads']['delete'](_0x5914bb['id']);super['destroy']();}['hasMarkerForId'](_0x6d992d){return this['getAllMarkersForId'](_0x6d992d)['length']>0x0;}['getAllMarkersForId'](_0x48cb7e){const _0x1b7145=[];for(const _0x126195 of this['editor']['model']['markers'])_0x126195['name']['startsWith']('comment:'+_0x48cb7e)&&_0x1b7145['push'](_0x126195);return _0x1b7145;}['scrollToThreadMarker'](_0x184485){setTimeout(()=>{const _0x506e36=this['_getTargetForId'](_0x184485);if(!_0x506e36)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x184485&&nt({'target':_0x506e36[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1791fe){this['editor']['model']['change'](()=>{for(const _0x14d275 of this['getAllMarkersForId'](_0x1791fe))this['editor']['editing']['reconvertMarker'](_0x14d275);});}['_attachArchivedThread'](_0x1cee28){const _0x149b6f=this['editor']['plugins']['get'](o),_0x241a54=this['editor']['plugins']['get'](b),_0x4ca328=_0x149b6f['getCommentThread'](_0x1cee28);if(!_0x4ca328['isAttached']){const _0x20ac0b=_0x4ca328['attachTo'](()=>this['_getTargetForId'](_0x4ca328['id']));_0x241a54['registerAnnotation'](_0x20ac0b),_0x4ca328['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1de35c=this['editor'],_0x50597a=_0x1de35c['plugins']['get'](it);_0x1de35c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x34518d,_0x57ac01)=>{const {id:_0x2ce8ea}=ft(_0x34518d['markerName']),_0x12496a=_0x1de35c['plugins']['get'](o)['getCommentThread'](_0x2ce8ea),_0xdf9488=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2ce8ea;let _0x38e5db;if(_0x12496a&&_0x12496a['isResolved']&&!_0xdf9488&&_0x34518d['item'])return _0x57ac01['consumable']['consume'](_0x34518d['item'],'addMarker:'+_0x34518d['markerName']),_0x57ac01['consumable']['consume'](_0x34518d['item'],'removeMarker:'+_0x34518d['markerName']),null;const _0x248993=['ck-comment-marker'];return _0xdf9488&&_0x248993['push']('ck-comment-marker--active'),_0x38e5db=_0x12496a?.['length']?_0x12496a['comments']['first']['author']['id']:_0x50597a['me']['id'],{'classes':_0x248993,'attributes':{'data-comment':_0x2ce8ea,'data-author-id':_0x38e5db}};}}),_0x1de35c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x556d84,{options:_0xadbed8})=>{if(_0xadbed8['showCommentHighlights'])return null;const _0x1cf454=_0x1de35c['plugins']['get'](o),_0x129260=_0x1de35c['model']['markers']['get'](_0x556d84),{id:_0x38d09c,part:_0x52c33f}=ft(_0x556d84);return _0x129260&&!_0x129260['affectsData']||_0xadbed8['ignoreResolvedComments']&&_0x1cf454['getCommentThread'](_0x38d09c)?.['isResolved']?null:{'group':'comment','name':_0x52c33f?_0x38d09c+':'+_0x52c33f:_0x38d09c};}}),_0x1de35c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1f061d,{writer:_0x3ad10d})=>_0x3ad10d['createElement']('$marker',{'data-name':'comment:'+_0x1f061d['getAttribute']('id')})}),_0x1de35c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4189f2=this['editor'],_0x2757da=_0x4189f2['plugins']['get'](o),_0x560391=new Set(),_0x1140b0=new Set();_0x4189f2['model']['document']['registerPostFixer'](_0x259250=>{let _0x35687d=!0x1;for(const {name:_0x2aaf25,data:_0x4e48b9}of _0x4189f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1879ee,id:_0x2d0cf9}=ft(_0x2aaf25);let _0x492a7d=_0x4e48b9['newRange'];if('comment'!==_0x1879ee||!_0x492a7d)continue;const _0x41d83a='$graveyard'===_0x492a7d['root']['rootName'];_0x41d83a||(_0x492a7d=ht(_0x492a7d,_0x4189f2['model']),!_0x492a7d||_0x492a7d['isCollapsed']||!_0x4e48b9['newRange']||_0x492a7d['isEqual'](_0x4e48b9['newRange']))?_0x4189f2['model']['hasContent'](_0x492a7d)&&!_0x41d83a?this['isThreadsLoadingPaused']?_0x560391['add'](_0x2aaf25):this['_handleThreadMarker'](_0x2aaf25,_0x2d0cf9):(_0x1140b0['add'](_0x2aaf25),_0x560391['delete'](_0x2aaf25),_0x259250['removeMarker'](_0x2aaf25),_0x35687d=!0x0):(_0x259250['updateMarker'](_0x2aaf25,{'range':_0x492a7d}),_0x35687d=!0x0);}return _0x35687d;}),this['on']('change:isThreadsLoadingPaused',(_0x3fe157,_0x3e1442,_0x3dcac7)=>{if(!_0x3dcac7&&_0x560391['size'])for(const _0x17149e of _0x560391){const {id:_0xc267b8}=ft(_0x17149e);_0x560391['delete'](_0x17149e),_0x4189f2['model']['markers']['get'](_0x17149e)&&this['_handleThreadMarker'](_0x17149e,_0xc267b8);}}),this['listenTo'](_0x4189f2['model']['document'],'change',()=>{for(const {name:_0x3ca7f6,data:{newRange:_0x189417}}of _0x4189f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5e2e4c,id:_0x118572}=ft(_0x3ca7f6);if('comment'!==_0x5e2e4c)continue;const _0x1817a7=_0x2757da['getCommentThread'](_0x118572),_0x55b07b=this['hasMarkerForId'](_0x118572);_0x1817a7&&(!_0x1817a7['_hasTargetInContent']&&_0x189417&&_0x4189f2['editing']['view']['once']('render',()=>{const _0x4db0dd=_0x4189f2['plugins']['get'](y),_0x1e074d=_0x2757da['_threadToController']['get'](_0x1817a7)['view'];_0x4db0dd['getByInnerView'](_0x1e074d)['refreshVisibility']();},{'priority':'low'}),_0x1817a7['_hasTargetInContent']=_0x55b07b||!!_0x189417),_0x189417||(_0x1140b0['add'](_0x3ca7f6),_0x560391['delete'](_0x3ca7f6));}for(const _0x5e63b6 of _0x1140b0){const {id:_0x1e9800}=ft(_0x5e63b6),_0x32004e=_0x2757da['getCommentThread'](_0x1e9800);if(_0x560391['delete'](_0x5e63b6),!_0x32004e)continue;const _0x5edf69=this['hasMarkerForId'](_0x1e9800);_0x5edf69||_0x32004e['isSubmitted']?_0x5edf69||_0x32004e['unlinkedAt']||_0x32004e['setUnlinkedAt'](new Date()):_0x32004e['remove']();}_0x1140b0['clear']();});}['_handleInitialThreads'](_0x5e071c){_0x5e071c['forEach'](_0x373581=>{_0x373581['unlinkedAt']&&this['_attachArchivedThread'](_0x373581['id']);});}['_getTargetForId'](_0x23431d){const _0x37e8d1=this['editor'],_0x2379ec=this['getAllMarkersForId'](_0x23431d);return et(_0x37e8d1['editing'],_0x2379ec);}['_getTextContext'](_0x2ec90b){const _0x2fdbd2=this['getAllMarkersForId'](_0x2ec90b);let _0x52eff7='',_0x210601=!0x1;for(const _0x1a5780 of _0x2fdbd2){const _0x24c040=_0x1a5780['getRange']();for(const _0x5500b0 of Array['from'](_0x24c040['getItems']()))_0x5500b0['is']('$textProxy')?(_0x52eff7&&_0x210601&&(_0x52eff7+='\x20',_0x210601=!0x1),_0x52eff7+=_0x5500b0['data']):_0x210601=!0x0;_0x210601=!0x0;}return _0x52eff7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x137336,_0x2873be){const _0x1e528b=this['editor'],_0xe98a41=_0x1e528b['plugins']['get'](o);let _0x5af1ca=_0xe98a41['getCommentThread'](_0x2873be);const _0x5a63a5=_0x1e528b['config']['get']('collaboration.channelId'),_0x2f9031=_0x1e528b['plugins']['get'](b);if(_0x5af1ca&&(_0x5af1ca['unlinkedAt']&&_0x5af1ca['setUnlinkedAt'](null),_0x5af1ca['isAttached']))return _0x5af1ca;return!this['getAllMarkersForId'](_0x2873be)[0x0]['managedUsingOperations']?_0x1e528b['editing']['view']['once']('render',()=>{if(_0xe98a41['getCommentThread'](_0x2873be))return;const _0x252b75=_0x1e528b['plugins']['get'](y);_0x5af1ca=_0xe98a41['openNewCommentThread']({'channelId':_0x5a63a5,'threadId':_0x2873be,'target':()=>this['_getTargetForId'](_0x2873be),'context':{'type':'text','value':this['_getTextContext'](_0x2873be)}});const _0x2757ab=_0xe98a41['_threadToController']['get'](_0x5af1ca)['view'],_0x59c01a=_0x252b75['getByInnerView'](_0x2757ab);_0x59c01a&&_0x2f9031['registerAnnotation'](_0x59c01a);},{'priority':'low'}):_0xe98a41['fetchCommentThread']({'channelId':_0x5a63a5,'threadId':_0x2873be})['then'](_0x37e808=>{if('destroyed'!==_0x1e528b['state']){if(_0x5af1ca=_0x37e808,_0x5af1ca&&!_0x5af1ca['isAttached']){const _0x3e713b=_0x5af1ca['attachTo'](()=>this['_getTargetForId'](_0x2873be));_0x2f9031['registerAnnotation'](_0x3e713b),_0x5af1ca['isResolved']&&this['_reconvertMarkers'](_0x2873be);}else{if(!_0x5af1ca){const _0x14f717=this['getAllMarkersForId'](_0x2873be);_0x1e528b['model']['change'](_0x34ea06=>{for(const _0x3cd5e7 of _0x14f717)_0x34ea06['removeMarker'](_0x3cd5e7);});}}}}),_0x5af1ca;}['_handleThreadMarker'](_0x23799d,_0x12ab84){const _0xc7b115=this['_attachMarkerToThread'](_0x23799d,_0x12ab84);_0xc7b115&&!_0xc7b115['context']&&_0xc7b115['setContext']({'type':'text','value':this['_getTextContext'](_0x12ab84)});}['_initAriaMarkerChangeAnnouncements'](){const _0x130426=this['editor'];rt(_0x130426['model'],({left:_0x3f18e1,entered:_0xe0e125})=>{for(const _0xfb7a4a of _0x3f18e1)if(mt(_0xfb7a4a)){_0x130426['ui']['ariaLiveAnnouncer']['announce'](N(_0x130426['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x220d2e of _0xe0e125)if(mt(_0x220d2e)){_0x130426['ui']['ariaLiveAnnouncer']['announce'](N(_0x130426['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0xabbee7)));break;}});}}function dt(_0x34ad36,_0x26f512){return _0x26f512?_0x34ad36+':'+_0x26f512:_0x34ad36;}function ht(_0x44b953,_0x21d751){const _0x1de267=_0x21d751['schema'],_0x21c35f=_0x21d751['createRange'](_0x44b953['start']);for(const _0x2a970d of _0x44b953['getWalker']()){const {type:_0x143686,item:_0x14c3a2,nextPosition:_0x2a8a2e}=_0x2a970d;if('text'===_0x143686||_0x1de267['isObject'](_0x14c3a2)){const _0x37cf51=_0x21d751['createPositionBefore'](_0x14c3a2);_0x21c35f['isCollapsed']&&(_0x21c35f['start']=_0x37cf51),_0x21c35f['end']=_0x2a8a2e;}}return _0x21c35f;}function mt(_0x493f57){return'comment'===ft(_0x493f57['name'])['group'];}class s extends _0xeeaaab{['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 _0x527463=this['editor'],_0x2c96bb=_0x527463['plugins']['get'](o),_0x41b960=_0x527463['plugins']['get'](r),_0x4fd9be=_0x527463['plugins']['get'](y),_0x934580=_0x527463['plugins']['get'](b);_0x527463['ui']['componentFactory']['add']('comment',()=>{const _0x4d13f5=this['_createUIButton'](_0x1db6f3);return _0x4d13f5['tooltip']=!0x0,_0x4d13f5;}),_0x527463['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x19b513)),_0x934580['addSourceCollector'](()=>{const _0x2c65a3=[];for(const [_0x5acf2a,_0x2b72c9]of _0x2c96bb['_threadToController']){const _0x407e04=_0x41b960['getAllMarkersForId'](_0x5acf2a['id']),_0x303c9d=_0x407e04['map'](_0x594c92=>_0x594c92['getRange']());_0x407e04['length']>0x0&&_0x2c65a3['push']([_0x2b72c9['view'],_0x303c9d]);}return _0x2c65a3;}),this['listenTo'](_0x4fd9be,'change:activeAnnotations',(_0x2dfd39,_0x1a0c5e,_0x930944)=>{const _0x3b7be9=Array['from'](_0x930944)['map'](_0xedf1b2=>_0xedf1b2['innerView'])['find'](_0x3f1d83=>_0x2c96bb['_viewToController']['has'](_0x3f1d83));if(!_0x3b7be9)return void(_0x41b960['activeMarker']=null);const _0x4aa1e3=_0x2c96bb['_viewToController']['get'](_0x3b7be9)['model']['id'],_0xff7a47='comment:'+_0x4aa1e3;_0x4aa1e3&&_0x41b960['hasMarkerForId'](_0x4aa1e3)?_0x41b960['activeMarker']=_0xff7a47:_0x41b960['activeMarker']&&(_0x41b960['activeMarker']=null);}),this['listenTo'](_0x2c96bb,'removeCommentThread',(_0x1457c9,{threadId:_0x2ff853,isFromAdapter:_0x9828b8})=>{!_0x9828b8&&_0x527463['ui']['focusTracker']['isFocused']&&_0x41b960['hasMarkerForId'](_0x2ff853)&&_0x527463['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2c96bb,'addComment',(_0x5215e7,{threadId:_0x4f0229,isFromAdapter:_0x109970})=>{if(_0x109970||!_0x41b960['hasMarkerForId'](_0x4f0229)||!_0x2c96bb['hasCommentThread'](_0x4f0229))return;0x1===_0x2c96bb['getCommentThread'](_0x4f0229)['length']&&(_0x527463['editing']['view']['focus'](),_0x5215e7['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x486523=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x108e5e;for(const _0x45ea7e in _0x486523){const _0x2b75b5=_0x45ea7e,_0x20f0c8=_0x486523[_0x2b75b5];if('commentsLicenseKeyValid'==_0x20f0c8||'commentsLicenseKeyInvalid'==_0x20f0c8||'commentsLicenseKeyExpired'==_0x20f0c8||'commentsLicenseKeyDomainLimit'==_0x20f0c8||'commentsLicenseKeyNotAllowed'==_0x20f0c8||'commentsLicenseKeyEvaluationLimit'==_0x20f0c8||'commentsLicenseKeyTrialLimit'==_0x20f0c8||'commentsLicenseKeyUsageLimit'==_0x20f0c8){delete _0x486523[_0x2b75b5],_0x108e5e=_0x20f0c8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x108e5e&&_0x486523['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x108e5e&&_0x486523['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x108e5e&&_0x486523['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x108e5e&&_0x486523['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x108e5e&&_0x486523['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x108e5e&&_0x486523['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x108e5e&&_0x486523['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x48b4ed){const _0x2998cc=this['editor'],_0x37d385=new _0x48b4ed(_0x2998cc['locale']),_0x2199fd=_0x2998cc['commands']['get']('addCommentThread');return _0x37d385['set']({'label':N(_0x2998cc['locale'],'Comment'),'icon':_0x1797e5}),_0x37d385['bind']('isEnabled')['to'](_0x2199fd,'hasContent'),this['listenTo'](_0x37d385,'execute',()=>{_0x2199fd['execute']();}),_0x37d385;}}class i extends _0xeeaaab{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5e404f){super(_0x5e404f),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x79bd6b,_0x320479,_0x4f98c2)=>{_0x4f98c2?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4f6e3a,_0x5c7483]of this['editor']['commands'])_0x5c7483['affectsData']&&'addCommentThread'!==_0x4f6e3a&&_0x5c7483['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 _0x234744=this['editor']['editing']['view']['document'];this['listenTo'](_0x234744,'cut',_0x1a23a0=>_0x1a23a0['stop'](),{'priority':'highest'}),this['listenTo'](_0x234744,'clipboardInput',_0x3fbade=>_0x3fbade['stop'](),{'priority':'highest'}),this['listenTo'](_0x234744,'delete',_0x574840=>_0x574840['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x155740,_0xb0ca35]of this['editor']['commands'])_0xb0ca35['affectsData']&&'addCommentThread'!==_0x155740&&_0xb0ca35['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 _0x1756af{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ee156){super(_0x1ee156),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x354d04=this['context']['plugins']['get'](y);this['listenTo'](_0x354d04,'_activateAnnotation',(_0x45f602,_0x3de5e0)=>{for(const _0x37c615 of this['activeUIs']){const _0x144244=this['_uis']['get'](_0x37c615);(0x0,this['uisData']['get'](_0x37c615)['filter'])(_0x3de5e0)&&_0x144244['setActiveAnnotation'](_0x3de5e0);}}),this['listenTo'](_0x354d04,'_deactivateAllAnnotations',()=>{for(const _0x1a1a6b of this['activeUIs']){this['_uis']['get'](_0x1a1a6b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x354d04['_visibleAnnotations'],'add',(_0x12bce1,_0x2f23fb)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2f23fb);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4ac31f){return this['activeUIs']['has'](_0x4ac31f);}['activate'](_0x27d48d,_0x42acb3=this['defaultFilter']){const _0x31cc44=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x27d48d))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x27d48d});this['isActive'](_0x27d48d)&&this['deactivate'](_0x27d48d),this['activeUIs']['add'](_0x27d48d);const _0x543219=new S();v({'source':_0x31cc44['_visibleAnnotations'],'target':_0x543219,'filter':_0x42acb3}),this['uisData']['set'](_0x27d48d,{'collection':_0x543219,'filter':_0x42acb3});const _0x459e51=this['_uis']['get'](_0x27d48d);_0x459e51['attach'](_0x543219),this['listenTo'](_0x459e51,'change:activeAnnotation',(_0x56697d,_0xf4f923,_0x52b18e,_0x1e2683)=>{_0x1e2683&&_0x31cc44['_removeActiveAnnotation'](_0x1e2683),_0x52b18e&&_0x31cc44['_addActiveAnnotation'](_0x52b18e);});}['deactivate'](_0x13610a){if(this['activeUIs']['delete'](_0x13610a),!this['_uis']['has'](_0x13610a))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x13610a});const _0xf725e1=this['_uis']['get'](_0x13610a);_0xf725e1['detach'](),this['stopListening'](_0xf725e1),this['uisData']['get'](_0x13610a)['collection']['destroy'](),this['uisData']['delete'](_0x13610a);}['switchTo'](_0x5cfa7f){if(!this['_uis']['has'](_0x5cfa7f))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x5cfa7f});const _0x4a4d73=this['context']['plugins']['get'](y),_0x26cd3b=Array['from'](_0x4a4d73['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5cfa7f);const _0xeab352=this['_uis']['get'](_0x5cfa7f);_0xeab352['setActiveAnnotation'](_0x26cd3b),_0xeab352['_setSelectedAnnotations']&&_0x26cd3b&&_0xeab352['_setSelectedAnnotations']([_0x26cd3b]);}['deactivateAll'](){for(const _0x3c2c72 of this['activeUIs'])this['deactivate'](_0x3c2c72);}['register'](_0x353566,_0x22e389){if(this['_uis']['has'](_0x353566))throw new _0x55af7e('annotationsuis-register-already-registered');if('function'!=typeof _0x22e389['attach']||'function'!=typeof _0x22e389['detach']||'function'!=typeof _0x22e389['setActiveAnnotation'])throw new _0x55af7e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x353566,_0x22e389);}['refilterAnnotations'](){const _0x56b483=this['context']['plugins']['get'](y)['collection'],_0x1f8a35=new Map(),_0x335fb7=Array['from'](this['activeUIs']);for(const _0x490b82 of this['activeUIs']){const _0x307bbd=this['uisData']['get'](_0x490b82)['collection'];for(const _0x44802e of _0x307bbd)_0x1f8a35['set'](_0x44802e,_0x490b82);}for(const _0x260750 of _0x56b483){const _0x1446f8=_0x1f8a35['get'](_0x260750);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x260750);const _0x1af900=_0x335fb7['find'](_0x11f166=>this['uisData']['get'](_0x11f166)['filter'](_0x260750));_0x1446f8!==_0x1af900&&(_0x1446f8&&this['uisData']['get'](_0x1446f8)['collection']['remove'](_0x260750),_0x1af900&&this['uisData']['get'](_0x1af900)['collection']['add'](_0x260750));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x11960c){const _0xdeb8d7=[];for(const _0x2e9427 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2e9427)['filter'])(_0x11960c)&&_0xdeb8d7['push'](_0x2e9427);}if(_0xdeb8d7['length']>0x1)throw new _0x55af7e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xdeb8d7,'annotationType':_0x11960c['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x518424){super(_0x518424);const _0x2f147c=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 _0x5d97f7(),this['focusCycler']=new _0x3261e3({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2f147c['to']('class')],'style':{'minHeight':_0x2f147c['to']('minHeight',_0x396dbe=>'number'==typeof _0x396dbe?_i(_0x396dbe+0xa):null)},'dir':_0x518424['uiLanguageDirection'],'role':'application','aria-label':N(_0x518424,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x518424,'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',_0x42deba=>{this['_updateItemPositionInFocusables'](_0x42deba['source']);}),this['list']['forEach'](_0x106664=>{this['focusTracker']['add'](_0x106664['element']),this['_updateItemPositionInFocusables'](_0x106664);}),this['list']['on']('change',(_0x2d2d0d,_0x1a481f)=>{for(const _0x1bd9f8 of _0x1a481f['removed'])this['focusTracker']['remove'](_0x1bd9f8['element']),this['focusables']['remove'](_0x1bd9f8);for(const _0x29564e of _0x1a481f['added'])this['focusTracker']['add'](_0x29564e['element']),this['_updateItemPositionInFocusables'](_0x29564e);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1debe7){const _0x9d115b=this['focusables']['getIndex'](_0x1debe7);let _0x15c804,_0x17a88b;for(const _0x626e03 of this['focusables'])if(_0x1debe7['top']<_0x626e03['top']){_0x15c804=_0x626e03;break;}if(_0x17a88b=_0x15c804?this['focusables']['getIndex'](_0x15c804):this['focusables']['length'],-0x1!==_0x9d115b){if(_0x9d115b===_0x17a88b-0x1)return;this['focusables']['remove'](_0x1debe7),_0x17a88b=_0x15c804?this['focusables']['getIndex'](_0x15c804):this['focusables']['length'];}this['focusables']['add'](_0x1debe7,_0x17a88b);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x33cca4){super(_0x33cca4),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x342e56,_0x1455be)=>_0x342e56+_0x1455be),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39afa3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39afa3['to']('isAnimationDisabled',_0x494958=>_0x494958?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39afa3['to']('top',_0x1a0df3=>Ot(_0x1a0df3))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x45a709=this['element']['clientHeight'];_0x45a709&&(this['height']=_0x45a709);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1756af{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39ccf5){super(_0x39ccf5),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 _0x497d73=this['context']['config']['get']('sidebar.container');_0x497d73&&this['setContainer'](_0x497d73);}['setContainer'](_0x4228c5){if(!g(_0x4228c5))throw new _0x55af7e('sidebar-setcontainer-invalid-element');this['container']=_0x4228c5;}['_attachToContainer']({viewClass:_0x58a1bd='',spaceBetweenItems:_0x173357=0x19}={}){if(!g(this['container']))throw new _0x55af7e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x58a1bd,this['_spaceBetweenItems']=_0x173357;}['rearrange']({removedAnnotation:_0x3634fc,previousAnnotation:_0x5a8072,nextAnnotation:_0x47e7e6}){const _0x5dff1d=this['getSidebarItemView'](_0x3634fc);this['view']['list']['remove'](_0x5dff1d),this['_destroySidebarItemView'](_0x3634fc),_0x5a8072&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5a8072)),_0x47e7e6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x47e7e6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9a2231,activatedAnnotation:_0x58c662,disableAnimationOnActivatedAnnotation:_0x38b6ac}){if(this['_activeAnnotation']=_0x58c662,_0x9a2231){_0x9a2231['isActive']=!0x1;const _0xe79417=this['getSidebarItemView'](_0x9a2231);_0xe79417&&_0x38b6ac&&(_0xe79417['isAnimationDisabled']=!0x1);}if(_0x58c662){const _0x5497a4=this['getSidebarItemView'](_0x58c662);_0x5497a4&&(_0x58c662['isActive']=!0x0,_0x38b6ac&&(_0x5497a4['isAnimationDisabled']=!0x0,_0x5497a4['top']+=0x1),this['_alignToTargetRect'](_0x5497a4));}}['_detachFromContainer'](_0x37559d){if(this['view']['element']['remove'](),_0x37559d){for(const _0x52da46 of _0x37559d)this['_destroySidebarItemView'](_0x52da46);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x280106,_0x3fc45a){_0x3fc45a||(_0x3fc45a=_0x280106['view']);const _0x453d93=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x453d93,_0x280106),this['_annotationToSidebarItemView']['set'](_0x280106,_0x453d93),_0x453d93['content']['add'](_0x3fc45a),this['listenTo'](_0x280106['view'],'change:targetRect',(_0x4d4206,_0xaeddf7,_0x4306cf)=>{const _0x36381c=this['_getTargetTop'](_0x280106,_0x4306cf);_0x453d93['_targetTop']!=_0x36381c&&(_0x453d93['_targetTop']=_0x36381c,this['_setItemTop'](_0x453d93,_0x36381c));}),this['listenTo'](_0x453d93,'change:top',()=>{this['_recalculate'](_0x453d93,'top');}),this['listenTo'](_0x453d93,'change:bottom',()=>{this['_recalculate'](_0x453d93,'bottom');}),this['_alignToTargetRect'](_0x453d93);const _0x125dae=this['_getItemBefore'](_0x453d93);if(_0x125dae)this['_alignAfterItem'](_0x125dae,_0x453d93)||this['_alignToTargetRect'](_0x453d93);else this['_alignToTargetRect'](_0x453d93);return this['_updateLastItem'](),this['view']['list']['add'](_0x453d93),_0x453d93;}['_alignForTopChange'](_0x230b25){if(!_0x230b25['content']['length'])return;const _0x4c3450=this['_getItemBefore'](_0x230b25);if(!_0x4c3450)return;const _0x3cf8ae=this['_sidebarItemViewToAnnotation']['get'](_0x4c3450),_0x7f0d90=this['_activeAnnotation'];_0x7f0d90&&_0x7f0d90===_0x3cf8ae?this['_alignAfterItem'](_0x4c3450,_0x230b25):this['_alignBeforeItem'](_0x230b25,_0x4c3450);}['_alignForBottomChange'](_0x13a8b3){if(!_0x13a8b3['content']['length'])return;const _0x26ad81=this['_getItemAfter'](_0x13a8b3);if(!_0x26ad81)return;const _0x314578=this['_sidebarItemViewToAnnotation']['get'](_0x26ad81),_0x321fae=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4442e4=this['_activeAnnotation'];_0x4442e4&&_0x4442e4===_0x314578&&_0x321fae?(this['_alignBeforeItem'](_0x26ad81,_0x13a8b3),this['_alignAfterItem'](_0x13a8b3,_0x26ad81)):_0x4442e4&&_0x4442e4===_0x314578?this['_alignBeforeItem'](_0x26ad81,_0x13a8b3):this['_alignAfterItem'](_0x13a8b3,_0x26ad81);}['_recalculate'](_0x262288,_0x105b4f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xc574f5,changedProp:_0x3615bb}of this['_recalculateBuffer'])'top'===_0x3615bb?this['_alignForTopChange'](_0xc574f5):this['_alignForBottomChange'](_0xc574f5);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x262288,'changedProp':_0x105b4f});}['getSidebarItemView'](_0x200a3d){return this['_annotationToSidebarItemView']['get'](_0x200a3d);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5534ac){const _0x52cf0f=this['getSidebarItemView'](_0x5534ac);this['stopListening'](_0x52cf0f),this['stopListening'](_0x5534ac['view']),_0x52cf0f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5534ac),this['_sidebarItemViewToAnnotation']['delete'](_0x52cf0f);}['_createSidebarView'](){const _0x4419f4=new H(this['context']['locale']);return _0x4419f4['render'](),this['on']('change:_lastItem',(_0x1e3e1c,_0x1c8d8d,_0x3af26c,_0x872ce9)=>{_0x872ce9&&_0x4419f4['unbind']('minHeight'),_0x3af26c?_0x4419f4['bind']('minHeight')['to'](_0x3af26c,'bottom'):_0x4419f4['minHeight']=null;}),_0x4419f4;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x55a457){const _0x5ed6fd=this['_sidebarItemViewToAnnotation']['get'](_0x55a457),_0x2543b5=_0x5ed6fd&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5ed6fd)-0x1);return _0x2543b5&&this['getSidebarItemView'](_0x2543b5)||null;}['_getItemAfter'](_0x85f748){const _0x5b9e7e=this['_sidebarItemViewToAnnotation']['get'](_0x85f748),_0x23481c=_0x5b9e7e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5b9e7e)+0x1);return _0x23481c&&this['getSidebarItemView'](_0x23481c)||null;}['_alignBeforeItem'](_0x5b6842,_0x2e2ac3){_0x5b6842['updateHeight']();const _0x4fafc0=G(_0x2e2ac3['bottom']+this['_spaceBetweenItems'],_0x5b6842['top']);return!!_0x4fafc0&&(this['_setItemTop'](_0x2e2ac3,_0x2e2ac3['top']-_0x4fafc0),!0x0);}['_alignAfterItem'](_0x2e4464,_0x150e0e){_0x2e4464['updateHeight']();const _0x378244=G(_0x2e4464['bottom']+this['_spaceBetweenItems'],_0x150e0e['top']);return!!_0x378244&&(this['_setItemTop'](_0x150e0e,_0x150e0e['top']+_0x378244,!0x1),!0x0);}['_alignToTargetRect'](_0x1ee0ef){const _0x5b4d24=this['_sidebarItemViewToAnnotation']['get'](_0x1ee0ef);if(!_0x5b4d24||!_0x5b4d24['target']||!_0x5b4d24['targetRect'])return;const _0x81e129=this['_getTargetTop'](_0x5b4d24,_0x5b4d24['targetRect']);this['_setItemTop'](_0x1ee0ef,_0x81e129);}['_getTargetTop'](_0x4d7844,_0x2eb8b2){if(null===_0x2eb8b2)return 0x0;if(_0x4d7844['target']instanceof _0x2770d5)return _0x2eb8b2['top'];{const _0x4e4551=new _0x2770d5(this['view']['element'])['top'];return _0x2eb8b2['top']-_0x4e4551;}}['_setItemTop'](_0x443b55,_0x50f583,_0x53e6ca=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x53e6ca&&(_0x50f583=Math['max'](_0x50f583,this['_getMaxAvailableTop'](_0x443b55))),_0x443b55['top']=_0x50f583;}['_getMaxAvailableTop'](_0x320aad){let _0x3d6d14=this['_getItemBefore'](_0x320aad),_0x3c433d=0x0;for(;_0x3d6d14;)_0x3d6d14['updateHeight'](),_0x3c433d+=this['_spaceBetweenItems']+_0x3d6d14['height'],_0x3d6d14=this['_getItemBefore'](_0x3d6d14);return _0x3c433d;}}function G(_0x5df252,_0x37b2cd){return Math['max'](_0x5df252-_0x37b2cd,0x0);}function g(_0x94c5ec){return null!==_0x94c5ec&&'object'==typeof _0x94c5ec&&0x1===_0x94c5ec['nodeType'];}class e extends _0x1756af{['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(_0x70c59c){super(_0x70c59c),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x24de43(),this['_refreshPositioningDebounced']=_0x20001b(()=>{_0x70c59c['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3bf50b=this['context']['plugins']['get'](j),_0x24480a=this['context']['plugins']['get'](z);_0x3bf50b['register']('wideSidebar',this),_0x24480a['container']&&_0x3bf50b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x6fe44){if(_0x6fe44===this['activeAnnotation'])return;const _0x3a7417=this['context']['plugins']['get'](z);_0x3a7417['_activeAnnotation']=_0x6fe44;const _0xfa4450=this['activeAnnotation'];_0x3a7417['refresh']({'blurredAnnotation':_0xfa4450,'activatedAnnotation':_0x6fe44}),this['activeAnnotation']=_0x6fe44;}['attach'](_0x1a45d4){this['annotations']=_0x1a45d4;const _0x10a5f8=this['context']['plugins']['get'](z);if(_0x10a5f8['_annotations']=_0x1a45d4,this['isAttached'])throw new _0x55af7e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x10a5f8,'set:container',()=>{this['detach'](),this['listenTo'](_0x10a5f8,'change:container',_0x4f472b=>{_0x4f472b['off'](),this['attach'](_0x1a45d4);});}),_0x10a5f8['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0xa99b74=_0x1fdfc8=>{_0x1fdfc8['updateTargetRect'](),_0x10a5f8['addAnnotation'](_0x1fdfc8);};for(const _0x3b7612 of _0x1a45d4)_0xa99b74(_0x3b7612);this['listenTo'](_0x1a45d4,'add',(_0x2e8468,_0xc74631)=>{_0xa99b74(_0xc74631);}),this['listenTo'](_0x1a45d4,'remove',(_0x4d99bb,_0x3ef399,_0x292b7d)=>{_0x10a5f8['rearrange']({'removedAnnotation':_0x3ef399,'previousAnnotation':_0x1a45d4['get'](_0x292b7d-0x1),'nextAnnotation':_0x1a45d4['get'](_0x292b7d+0x1)}),_0x3ef399===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1a45d4,'focus',(_0x452eb5,_0x394402)=>{this['setActiveAnnotation'](_0x394402);}),this['listenTo'](_0x1a45d4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x317d7d=this['context']instanceof _0x3609be?this['context']['editors']:new _0x24de43([this['context']]);for(const _0x317685 of _0x317d7d)this['_integrateWithEditorAnnotations'](_0x317685);this['listenTo'](_0x317d7d,'add',(_0x1df84e,_0x24ffb0)=>{this['listenTo'](_0x24ffb0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x24ffb0);});}),this['listenTo'](_0x317d7d,'remove',(_0x958ec7,_0x2bde9b)=>{_0x2bde9b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2bde9b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x55af7e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x131ed3=this['context']['plugins']['get'](z);_0x131ed3['_detachFromContainer'](this['annotations']),this['stopListening'](_0x131ed3),this['stopListening'](this['annotations']),this['context']instanceof _0x3609be&&this['stopListening'](this['context']['editors']);for(const _0x5dada8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5dada8);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2a89d9){if(!_0x2a89d9['plugins']['has']('EditorAnnotations'))return;const _0x18b4a3=_0x2a89d9['plugins']['get']('EditorAnnotations'),_0x515df2=()=>{const _0x178b6a=_0x18b4a3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x178b6a[0x0]||null);};this['listenTo'](_0x18b4a3,'refresh',_0x515df2),this['listenTo'](_0x18b4a3,'blur',(_0x28ade0,{isAnnotationTracked:_0x4d8db1})=>{this['activeAnnotation']&&_0x4d8db1(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x18b4a3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x21011e=>{_0x18b4a3['hasDomSelection']()&&(_0x515df2(),_0x21011e['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x18b4a3);}['_destroyEditorAnnotationsIntegration'](_0x45cc44){this['stopListening'](_0x45cc44),this['_editorAnnotations']['remove'](_0x45cc44);}}class C extends _0x1db6f3{['counterView'];constructor(_0x2ecdc2){super(_0x2ecdc2);const _0x5b70ce=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5a263b,_0x130001)=>_0x5a263b?'...':_0x130001['toString']()),this['set']('annotationType',''),this['icon']=_0x1797e5,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5b70ce['to']('annotationType',_0x5d8406=>'ck-annotation-counter__badge--'+_0x5d8406),_0x5b70ce['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5b70ce['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1756af{['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(_0x4e6ed1){super(_0x4e6ed1),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3faab5())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x24de43(),this['_refreshPositioningDebounced']=_0x20001b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x9bd70f(this['context']['locale']),this['balloonPanelView']=new _0x580a5d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1e12b3){this['annotations']=_0x1e12b3;const _0x6962e7=this['context']['plugins']['get'](z),_0x5327c1=this['balloonPanelView'];if(_0x6962e7['_annotations']=_0x1e12b3,this['isAttached'])throw new _0x55af7e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x6962e7,'set:container',()=>{this['detach'](),this['listenTo'](_0x6962e7,'change:container',_0x226eac=>{_0x226eac['off'](),this['attach'](_0x1e12b3);});}),_0x6962e7['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x15384d=_0xcff3f6=>{const _0x14f4e4=new C(this['context']['locale']);_0x6962e7['addAnnotation'](_0xcff3f6,_0x14f4e4),this['_annotationToNarrowView']['set'](_0xcff3f6,_0x14f4e4),_0x14f4e4['bind']('isDirty','annotationType','number')['to'](_0xcff3f6['view'],'isDirty','type','length'),_0x14f4e4['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5327c1['content']['first']!==_0xcff3f6['view']?(this['_showBalloon'](_0xcff3f6),_0xcff3f6['view']['element']['focus'](),this['setActiveAnnotation'](_0xcff3f6)):this['setActiveAnnotation'](null);});};for(const _0x458454 of _0x1e12b3)_0x15384d(_0x458454);this['listenTo'](_0x1e12b3,'add',(_0xfdfaa5,_0x45b402)=>{_0x15384d(_0x45b402);}),this['listenTo'](_0x1e12b3,'remove',(_0x5f56d2,_0x5b7de4,_0x5cd2e8)=>{this['_annotationToNarrowView']['get'](_0x5b7de4)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5b7de4),_0x6962e7['rearrange']({'removedAnnotation':_0x5b7de4,'previousAnnotation':_0x1e12b3['get'](_0x5cd2e8-0x1),'nextAnnotation':_0x1e12b3['get'](_0x5cd2e8+0x1)}),_0x5b7de4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1e12b3,'focus',(_0x58be5d,_0x1d17f6)=>{this['setActiveAnnotation'](_0x1d17f6);}),this['listenTo'](_0x1e12b3,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x12247e,_0x365b57)=>{_0x365b57['keyCode']===_0xdebc38['esc']&&_0x5327c1['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5327c1['content']['first']),this['_hideBalloon'](),_0x365b57['stopPropagation'](),_0x365b57['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x105cf7,_0x38460a)=>{const _0x38a970=_0x38460a['target'];_0x5327c1['isVisible']&&_0x5327c1['element']['contains'](_0x38a970)||_0x6962e7['view']['element']['contains'](_0x38a970)||_0x105cf7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x47fce9=>_0x47fce9['contains'](_0x38a970))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5e38c7=this['context']instanceof _0x3609be?this['context']['editors']:new _0x24de43([this['context']]);for(const _0x106fdd of _0x5e38c7)this['_integrateWithEditorAnnotations'](_0x106fdd);this['listenTo'](_0x5e38c7,'add',(_0x473df0,_0x612654)=>{this['listenTo'](_0x612654,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x612654);});}),this['listenTo'](_0x5e38c7,'remove',(_0x1b7b07,_0x59a580)=>{_0x59a580['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x59a580['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x39e7d7){if(_0x39e7d7===this['activeAnnotation'])return;const _0x3c2a37=this['context']['plugins']['get'](z);if(_0x3c2a37['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x39e7d7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x39e7d7)_0x3c2a37['getSidebarItemView'](_0x39e7d7)?this['_showBalloon'](_0x39e7d7):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x39e7d7;}['detach'](){if(!this['isAttached'])throw new _0x55af7e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x333b60=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x38ae8c=>_0x38ae8c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x333b60['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3609be&&this['stopListening'](this['context']['editors']);for(const _0x2c8679 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2c8679);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'](_0x24327a){if(!_0x24327a['plugins']['has']('EditorAnnotations'))return;const _0x52500b=_0x24327a['plugins']['get']('EditorAnnotations'),_0x275802=this['context']['plugins']['get'](z),_0x29dc8e=this['annotations'],_0x4d904b=this['balloonPanelView'],_0x441e7b=()=>{const _0x21c893=_0x52500b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x21c893),this['setActiveAnnotation'](_0x21c893[0x0]||null);};this['listenTo'](_0x52500b,'refresh',_0x441e7b),this['listenTo'](_0x52500b,'blur',(_0x4282f3,{isAnnotationTracked:_0x76c60d})=>{this['activeAnnotation']&&_0x76c60d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x52500b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x29dc8e,'blur',_0x405802=>{_0x52500b['hasDomSelection']()&&_0x405802['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5512c2,_0x3c2654)=>{const _0x273110=_0x3c2654['target'];_0x4d904b['isVisible']&&_0x4d904b['element']['contains'](_0x273110)||_0x275802['view']['element']['contains'](_0x273110)||this['activeAnnotation']&&_0x52500b['hasDomSelection']()&&(_0x441e7b(),_0x5512c2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x52500b);}['_destroyEditorAnnotationsIntegration'](_0x43aa3c){_0x43aa3c&&(this['stopListening'](_0x43aa3c),this['_editorAnnotations']['remove'](_0x43aa3c));}['_setSelectedAnnotations'](_0x3ce406){for(const _0x5673dd of this['_selectedAnnotations'])_0x3ce406['includes'](_0x5673dd)||this['_manuallyClosedAnnotationViews']['delete'](_0x5673dd['view']);this['_selectedAnnotations']=_0x3ce406;}['_refreshPositioning'](){const _0xabd0f2=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xabd0f2['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x59424c){if(this['_manuallyClosedAnnotationViews']['has'](_0x59424c['view']))return;const _0x5a4070=this['balloonPanelView']['content']['first'];_0x5a4070!==_0x59424c['view']?(_0x5a4070&&this['_detachListeners'](_0x5a4070),this['_attachListeners'](_0x59424c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x59424c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x453766=this['balloonPanelView']['content']['first'],_0x4b6975=_0x453766&&this['annotations']['getByView'](_0x453766);if(!_0x4b6975||!this['_annotationToNarrowView']['has'](_0x4b6975))return;const _0xa0d8ab=this['_annotationToNarrowView']['get'](_0x4b6975)['element'],_0x1fc3e2=(function(){const _0x5b46dd=_0x580a5d['defaultPositions'];return[_0x5b46dd['southArrowNorthEast'],_0x5b46dd['northArrowSouthEast'],_0x5b46dd['southArrowNorth'],_0x5b46dd['northArrowSouth'],_0x5b46dd['southArrowNorthWest'],_0x5b46dd['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xa0d8ab,'positions':_0x1fc3e2});}['_hideBalloon'](){const _0x3783f2=this['balloonPanelView'],_0x50d665=_0x3783f2['content']['first'];_0x50d665&&(this['_detachListeners'](_0x50d665),_0x3783f2['unpin'](),_0x3783f2['content']['clear']());}['_attachListeners'](_0x32763d){this['listenTo'](_0x32763d,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x32763d,'Esc',(_0x2cb751,_0x56f01e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x32763d),this['_hideBalloon'](),_0x56f01e();});}['_detachListeners'](_0x516549){this['stopListening'](_0x516549);}}class c extends _0xeeaaab{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x54b6ce,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x172495){super(_0x172495),_0x172495['editing']['view']['addObserver'](_0x1fb595),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x172495['plugins']['get'](_0x54b6ce),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x399563=this['editor']['plugins']['get'](j);_0x399563['context']===this['editor']&&(_0x399563['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x126183,_0x4b8512)=>{const _0x35c8b0=this['_balloon'];if(this['isAttached']&&_0x35c8b0['visibleView']){const _0xdaf4d=this['annotations']['getByView'](_0x35c8b0['visibleView']);_0xdaf4d&&this['_closeAnnotation'](_0xdaf4d),_0x4b8512();}}));}['afterInit'](){const _0xdf20af=this['editor']['plugins']['get'](j);_0xdf20af['context']===this['editor']&&(_0xdf20af['hasActive']()||_0xdf20af['switchTo']('inline'));}['setActiveAnnotation'](_0x212d88){_0x212d88!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x212d88&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x212d88)&&this['_addAnnotationToBalloon'](_0x212d88,!0x0),_0x212d88['isActive']=!0x0),_0x212d88||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x212d88);}['attach'](_0x2fb3d7){this['annotations']=_0x2fb3d7;const _0x22548c=this['editor']['plugins']['get'](j),_0x55b48f=this['_balloon'];if(this['isAttached'])throw new _0x55af7e('inlineannotations-attach-already-attached',this);if(_0x22548c['context']!==this['editor'])throw new _0x55af7e('inlineannotations-not-allowed-with-context',this);const _0x3cd965=this['editor']['plugins']['get'](b);this['listenTo'](_0x3cd965,'refresh',()=>{const _0xee320e=_0x3cd965['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x214d76,_0x415f08;!this['_forceRefresh']&&(_0x214d76=_0xee320e,_0x415f08=this['_selectedAnnotations'],_0x214d76['length']===_0x415f08['length']&&_0x214d76['every'](_0x5b74cf=>_0x415f08['includes'](_0x5b74cf)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xee320e),this['setActiveAnnotation'](_0xee320e[0x0]||null));}),this['listenTo'](_0x3cd965,'blur',(_0x2ffb5e,{isAnnotationTracked:_0x1b5337})=>{this['activeAnnotation']&&_0x1b5337(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2c073e,_0x4fc09b,_0x2747e8)=>{_0x2747e8||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2fb3d7,'remove',(_0x4388bf,_0x24d4bb)=>{this['_removeAnnotationFromBalloon'](_0x24d4bb),_0x24d4bb===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x55b48f,'change:visibleView',(_0x29b071,_0x14031c,_0x17c9e6,_0x123d9d)=>{_0x123d9d&&this['stopListening'](_0x123d9d);const _0x42ea76=_0x2fb3d7['getByView'](_0x17c9e6);_0x17c9e6&&_0x42ea76&&(this['listenTo'](_0x17c9e6,'change:height',()=>{_0x55b48f['updatePosition']();}),this['listenTo'](_0x17c9e6,'Esc',()=>{this['_closeAnnotation'](_0x42ea76),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x42ea76&&this['setActiveAnnotation'](_0x42ea76));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x55b48f['visibleView']&&(_0x2fb3d7['getByView'](_0x55b48f['visibleView'])&&_0x55b48f['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 _0x55af7e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x27abbc of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x27abbc);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2502f6){for(const _0xde2f72 of this['_selectedAnnotations'])_0x2502f6['includes'](_0xde2f72)||this['_manuallyClosed']['delete'](_0xde2f72);for(const _0xdf7d21 of this['annotations'])_0x2502f6['includes'](_0xdf7d21)||this['_removeAnnotationFromBalloon'](_0xdf7d21);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5d3fbd of _0x2502f6)this['_addAnnotationToBalloon'](_0x5d3fbd);}this['_selectedAnnotations']=_0x2502f6;}['_addAnnotationToBalloon'](_0x1111f2,_0x512545=!0x1){this['_manuallyClosed']['has'](_0x1111f2)||(this['_addedAnnotations']['has'](_0x1111f2)||this['_balloon']['hasView'](_0x1111f2['view'])||(this['_addedAnnotations']['add'](_0x1111f2),this['_balloon']['add']({'stackId':_0x1111f2['view']['id'],'view':_0x1111f2['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1111f2)}})),_0x512545&&this['_balloon']['showStack'](_0x1111f2['view']['id']));}['_getBalloonTargetForAnnotation'](_0x561e0f){const _0x2be8b3=_0x561e0f['target'],_0x12b791=this['editor']['editing']['view'],_0x10bf18=_0x12b791['document']['selection']['getFirstRange'](),_0x38fb82=_0x12b791['domConverter']['viewRangeToDom'](_0x10bf18);if(_0x38fb82['collapse'](!0x0),_0x2be8b3){if(_0x2be8b3 instanceof _0x2770d5)return _0x2be8b3;let _0x394d5f=[];for(const _0xff63e3 of _0x2be8b3)_0x394d5f['push'](...F(_0xff63e3['getClientRects']()));_0x394d5f=function(_0x56b292){const _0x4ccb8d=[];let _0x28ae77=_0x56b292[0x0];for(let _0x135017=0x1;_0x135017<_0x56b292['length'];_0x135017++)P(_0x28ae77,_0x56b292[_0x135017])?_0x28ae77['width']+=_0x56b292[_0x135017]['width']:(_0x4ccb8d['push'](_0x28ae77),_0x28ae77=_0x56b292[_0x135017]);return _0x4ccb8d['push'](_0x28ae77),_0x4ccb8d;}(_0x394d5f);const _0x4eee01=_0x38fb82['getBoundingClientRect']();return _0x394d5f['find'](_0x5ceca5=>_0x5ceca5['top']<=_0x4eee01['top']&&_0x5ceca5['bottom']>=_0x4eee01['bottom']&&_0x5ceca5['left']<=_0x4eee01['left']&&_0x5ceca5['right']>=_0x4eee01['right'])||_0x394d5f[0x0];}return _0x561e0f['targetRect']||_0x38fb82;}['_removeAnnotationFromBalloon'](_0x3ee38e){this['_addedAnnotations']['has'](_0x3ee38e)&&this['_balloon']['hasView'](_0x3ee38e['view'])&&(this['_addedAnnotations']['delete'](_0x3ee38e),this['_balloon']['remove'](_0x3ee38e['view']));}['_closeAnnotation'](_0xc038f8){this['_manuallyClosed']['add'](_0xc038f8),this['_removeAnnotationFromBalloon'](_0xc038f8);}}function F(_0x255e52){return Array['from'](_0x255e52)['map'](DOMRect['fromRect']);}function P(_0x10ba29,_0x3f9ece){return _0x10ba29['top']===_0x3f9ece['top']&&_0x10ba29['bottom']===_0x3f9ece['bottom']&&_0x10ba29['right']===_0x3f9ece['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x293dd6,_0x4e336c){super(_0x293dd6),this['set']('isEmpty',!_0x4e336c['length']),this['focusTracker']=new _0x5d97f7(),this['_annotationViews']=_0x4e336c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x3261e3({'focusables':_0x4e336c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4e336c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4e336c,'remove',(_0x25c828,_0x40d4b2)=>{_0x40d4b2['isActive']&&this['focus'](),_0x4e336c['length']||(this['isEmpty']=!0x0);});const _0x22ff13=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x293dd6,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4e336c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x22ff13['if']('isEmpty','ck-hidden',_0x31c32f=>!_0x31c32f)]},'children':[{'text':N(_0x293dd6,'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 _0x3a0e49 of this['_annotationViews'])this['focusTracker']['add'](_0x3a0e49['element']);this['_annotationViews']['on']('change',(_0x1e754e,{added:_0x4a06f5,removed:_0x5d66e1})=>{for(const _0x4550a7 of _0x4a06f5)this['focusTracker']['add'](_0x4550a7['element']);for(const _0x516f61 of _0x5d66e1)this['focusTracker']['remove'](_0x516f61['element']);});}}class p extends _0x1756af{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x24593d){super(_0x24593d),this['archivedThreads']=new _0x24de43();}['init'](){const _0x119177=this['context'],_0x1bd4fd=_0x119177['plugins']['get'](o),_0x29f4ec=_0x119177['plugins']['get'](y);this['listenTo'](_0x1bd4fd,'addCommentThread',(_0xccb168,{threadId:_0x4aeae4})=>{const _0x4907c4=_0x1bd4fd['getCommentThread'](_0x4aeae4);_0x4907c4['archivedAt']&&this['archivedThreads']['add'](_0x4907c4,this['_calculatePosition'](_0x4907c4['archivedAt'])),this['listenTo'](_0x4907c4,'change:archivedAt',(_0x234d90,_0x5a376c,_0x1026ef)=>{_0x1026ef?this['archivedThreads']['has'](_0x4907c4)||this['archivedThreads']['add'](_0x4907c4,this['_calculatePosition'](_0x4907c4['archivedAt'])):this['archivedThreads']['has'](_0x4907c4)&&this['archivedThreads']['remove'](_0x4907c4);});}),this['listenTo'](_0x1bd4fd,'removeCommentThread',(_0x171ca0,{threadId:_0x3802cd})=>{const _0x1b3563=_0x1bd4fd['getCommentThread'](_0x3802cd);this['stopListening'](_0x1b3563),this['archivedThreads']['has'](_0x1b3563)&&this['archivedThreads']['remove'](_0x1b3563);},{'priority':'highest'}),this['listenTo'](_0x29f4ec['collection'],'focus',(_0x1dedb5,_0x144959)=>{_0x144959['isVisible']||(_0x144959['isActive']=!0x0,_0x29f4ec['activate'](_0x144959));});}['_calculatePosition'](_0x4a25d2){const _0x172d36=[...this['archivedThreads']]['findIndex'](_0xaf3c7c=>_0xaf3c7c['archivedAt']<_0x4a25d2);return _0x172d36>-0x1?_0x172d36:this['archivedThreads']['length'];}}class a extends _0xeeaaab{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x119b5];}constructor(_0x83e22a){super(_0x83e22a),this['annotationViews']=new _0x1f1fea(),this['_pendingThreads']=[];}['init'](){const _0x189407=this['editor'],_0x35d22a=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x189407['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1db6f3,!0x0)),_0x189407['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x41365b=this['_createCommentsArchiveButton'](_0x19b513);return _0x41365b['set']({'role':'menuitemcheckbox'}),_0x41365b;});const _0x46a47e=_0x189407['plugins']['get'](p),_0x109115=_0x189407['plugins']['get']('Annotations'),_0x3c2a1e=_0x189407['plugins']['get']('CommentsRepository');_0x46a47e['archivedThreads']['forEach'](_0x2ba123=>{this['_handleNewThread'](_0x2ba123);}),this['listenTo'](_0x46a47e['archivedThreads'],'add',(_0x532984,_0x5951f2)=>{this['_handleNewThread'](_0x5951f2);}),this['listenTo'](_0x109115['collection'],'add',(_0x56083d,_0x15d383)=>{const _0x2ba2bc=this['_pendingThreads']['find'](_0x530f78=>{const _0x552831=_0x3c2a1e['_threadToController']['get'](_0x530f78);return _0x552831&&_0x15d383['innerView']===_0x552831['view'];});if(_0x2ba2bc){const _0x1bad38=this['_calculatePosition'](_0x2ba2bc['archivedAt']);this['annotationViews']['add'](_0x15d383['view'],_0x1bad38),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ba2bc),0x1);}}),this['listenTo'](_0x46a47e['archivedThreads'],'remove',(_0x2f3f7b,_0xff1f43)=>{const _0x5f201b=_0x189407['config']['get']('collaboration.channelId');if(!_0x5f201b||_0xff1f43['channelId']===_0x5f201b){if(this['_pendingThreads']['includes'](_0xff1f43))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xff1f43),0x1);else{const _0x28679a=_0x3c2a1e['_threadToController']['get'](_0xff1f43),_0x569306=_0x109115['getByInnerView'](_0x28679a['view']);this['annotationViews']['remove'](_0x569306['view']),this['stopListening'](_0x569306['focusableElements']);}}}),this['listenTo'](_0x109115['collection'],'add',(_0x5482f4,_0x494291)=>{this['listenTo'](_0x494291,'escape',_0x35d22a);}),this['listenTo'](_0x109115['collection'],'remove',(_0x5f46ee,_0x2343b4)=>{this['stopListening'](_0x2343b4,'escape',_0x35d22a);});}['_handleNewThread'](_0x25cd3b){const _0x51078c=this['editor']['plugins']['get']('CommentsRepository'),_0x37fef5=this['editor']['plugins']['get']('Annotations'),_0xbc4760=this['editor']['config']['get']('collaboration.channelId');if(!_0xbc4760||_0x25cd3b['channelId']===_0xbc4760){const _0xf30281=_0x51078c['_threadToController']['get'](_0x25cd3b);if(!_0xf30281)return void this['_pendingThreads']['push'](_0x25cd3b);const _0x164aeb=this['_calculatePosition'](_0x25cd3b['archivedAt']),_0x4c2535=_0x37fef5['getByInnerView'](_0xf30281['view']);_0x4c2535['isVisible']&&_0x37fef5['_visibleAnnotations']['remove'](_0x4c2535),this['annotationViews']['add'](_0x4c2535['view'],_0x164aeb);}}['_calculatePosition'](_0x282b61){const _0x6e0978=this['editor']['config']['get']('collaboration.channelId'),_0x12ef5b=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x3e3717=>_0x3e3717['channelId']===_0x6e0978)['findIndex'](_0x1e22e6=>_0x1e22e6['archivedAt']<_0x282b61);return _0x12ef5b<0x0||_0x12ef5b>this['annotationViews']['length']?this['annotationViews']['length']:_0x12ef5b-0x1;}['_toggleDialog'](){const _0x36dd35=this['editor'],_0x41104f=_0x36dd35['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x36dd35['locale'],this['annotationViews'])),'commentsArchive'===_0x41104f['id']?_0x41104f['hide']():_0x41104f['show']({'id':'commentsArchive','title':N(_0x36dd35['locale'],'COMMENTS_ARCHIVE'),'icon':_0x50ad17,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x51e3c0['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x76a1b0,_0x526c72=!0x1){const _0x4e11f0=this['editor']['locale'],_0x2a1548=this['editor']['plugins']['get']('Dialog'),_0xf2b936=new _0x76a1b0(_0x4e11f0);return _0xf2b936['bind']('isEnabled')['to'](this,'isEnabled'),_0xf2b936['bind']('isOn')['to'](_0x2a1548,'id',_0x404beb=>'commentsArchive'===_0x404beb),_0xf2b936['set']({'label':N(_0x4e11f0,'COMMENTS_ARCHIVE'),'icon':_0x50ad17,'isToggleable':!0x0}),_0x526c72&&(_0xf2b936['tooltip']=!0x0),this['listenTo'](_0xf2b936,'execute',()=>this['_toggleDialog']()),_0xf2b936;}['_hideDialogOnAnnotationEscape']=_0x22d99f=>{const _0x16f7a1=_0x22d99f['source'];if(!this['annotationViews']['has'](_0x16f7a1['view']))return;const _0x14b9ce=this['editor']['plugins']['get']('Dialog');_0x14b9ce['isOpen']&&'commentsArchive'===_0x14b9ce['id']&&(_0x14b9ce['hide'](),_0x22d99f['stop']());};}class gi extends _0xeeaaab{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};
|