@ckeditor/ckeditor5-comments 45.1.0-alpha.5 → 45.1.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- 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 +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- 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/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x23a8da={}){function _0x36316c(_0x451eaf){return _0x451eaf['map'](_0x3c30be=>String['fromCharCode'](_0x3c30be))['join']('');}(_0x23a8da=Object['assign']({},_0x23a8da))['plugins']||(_0x23a8da['plugins']=Qt['defaultPlugins']),super(_0x23a8da),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x36316c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36316c([0x76,0x69,0x65,0x77])][_0x36316c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36316c([0x61,0x75,0x74,0x6f]),this[_0x36316c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x36316c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36316c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x36316c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x36316c([0x6f,0x6b])});}['create'](){const _0x11d269=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x11d269))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4e2e54=>{const _0x20139a=this['model']['document']['getRoot'](),_0x53aca8=_0x20139a&&_0x20139a['getChild'](_0x20139a['childCount']-0x1);_0x4e2e54['setSelection'](_0x53aca8,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x185bb3=this['editing']['view'],_0x104c89=_0x185bb3['document']['getRoot'](),_0x2f8809=_0x104c89['getChild'](0x0);_0x104c89['childCount']>0x1||!_0x2f8809||'p'!=_0x2f8809['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x185bb3,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2f8809['placeholder']=this['placeholder']),Ft({'view':_0x185bb3,'element':_0x2f8809,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2f8809);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3aeb34,_0x47eb6e={}){super(_0x3aeb34),this['editor']=null,this['_editorConfig']=_0x47eb6e,this['set']('value',_0x47eb6e['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x3aeb34,'Reply...')),this['set']('submitLabel',E(_0x3aeb34,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x6d2edc(),this['focusCycler']=new _0x5bcd58({'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',(_0x177b60,_0x4dde5c)=>{this['cancelButtonView']['fire']('execute'),_0x4dde5c();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5cc041,_0x32ce72)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x32ce72());}),this['on']('submit',(_0x17f016,_0x17d762)=>{_0x17d762['length']>0xfde8?(alert(E(_0x3aeb34,'TOO_LONG_COMMENT_ALERT',[_0x17d762['length'],0xfde8])),_0x17f016['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3049ca=this['editor'];this['element']['insertBefore'](_0x3049ca['ui']['element'],this['element']['firstChild']),_0x3049ca['model']['document']['on']('change',()=>this['value']=_0x3049ca['getData']()),_0x3049ca['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3049ca['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2a4d70){-0x1===_0x2a4d70?(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:_0x12ae46}=this,_0x236c67=new _0x25ab89(_0x12ae46);return _0x236c67['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x236c67['withText']=!0x0,_0x236c67['bind']('label')['to'](this,'submitLabel'),_0x236c67['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x236c67['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x479010,_0x2ed416)=>!_0x2ed416&&!!_0x479010['trim']()),_0x236c67;}['_createCancelButton'](){const {locale:_0x1d30b1}=this,_0x1a53cf=new _0x25ab89(_0x1d30b1);return _0x1a53cf['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1a53cf['label']=E(_0x1d30b1,'Cancel'),_0x1a53cf['withText']=!0x0,_0x1a53cf['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1a53cf;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x9a8f2e=>{this['focusTracker']['add'](_0x9a8f2e['element']);}),this['focusables']['on']('change',(_0x217623,_0x2f2774)=>{for(const _0x1355c3 of Array['from'](_0x2f2774['added'])['reverse']())this['focusTracker']['add'](_0x1355c3['element']);});}}class ie extends kt{constructor(_0x293006,_0x5f3002,_0x33e64d){super(_0x293006),this['commentInputView']=new os(_0x293006,_0x33e64d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x385657,_0x22edaa)=>_0x385657||!!_0x22edaa),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 _0x37fa89(_0x293006,_0x5f3002),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'](_0xfe9a2){this['commentInputView']['focus'](_0xfe9a2);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4ac25,_0x5d9c1f)=>{const {submitButtonView:_0x403f34,cancelButtonView:_0x1a6f0b,editor:_0x2a57f8}=this['commentInputView'];[_0x403f34['element'],_0x1a6f0b['element'],_0x2a57f8?_0x2a57f8['editing']['view']['getDomRoot']():null]['filter'](_0x3a1c0b=>_0x3a1c0b)['some'](_0x2477d1=>_0x2477d1['contains'](_0x5d9c1f['target']))||(this['focus'](),_0x5d9c1f['preventDefault']());});}}class cs extends kt{constructor(_0x27d792){super(_0x27d792);const _0x2165d3=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2165d3['to']('count',_0x179e0f=>E(_0x27d792,'NUMBER_OF_COMMENTS',_0x179e0f))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x40c2df,_0x4e6ad7,_0x27f866){super(_0x40c2df);const _0x107a6e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4e6ad7['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4e6ad7,this['_config']=_0x27f866,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x6d2edc(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5bcd58({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x178a0c=>this['commentViews']['map'](_0x3fb2b7=>_0x3fb2b7['element'])['includes'](_0x178a0c['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x40c2df),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3b9a2c=>_0x3b9a2c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5b8e19 of _0x4e6ad7['comments'])this['_handleNewCommentModel'](_0x5b8e19);this['_handleInfoComment'](),this['listenTo'](_0x4e6ad7['comments'],'add',(_0x22daff,_0x5db4f1)=>{const _0x192247=this['_calculatePosition'](_0x5db4f1);this['length']++,this['_handleNewCommentModel'](_0x5db4f1,_0x192247),this['refreshVisibleViews']();}),this['listenTo'](_0x4e6ad7['comments'],'remove',(_0x4f8057,_0x180abe)=>{this['length']--,this['_handleRemoveCommentModel'](_0x180abe),this['refreshVisibleViews']();}),this['listenTo'](_0x4e6ad7,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4e6ad7,'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',_0x107a6e['if']('length','ck-hidden',_0x35825b=>!_0x35825b)],'aria-label':E(_0x40c2df,'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'](_0x4e5caf){-0x1===_0x4e5caf?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x199fe4 of this['commentViews'])_0x199fe4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2468cc,_0x27fe0c){const _0xfffcd4=new this['_config']['CommentView'](this['locale'],_0x2468cc,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xfffcd4['viewUid']=_0x2468cc['id'],_0xfffcd4['delegate']('removeComment')['to'](this),_0xfffcd4['delegate']('updateComment')['to'](this),_0xfffcd4['delegate']('resolveCommentThread')['to'](this),_0xfffcd4['delegate']('editorReady')['to'](this),_0xfffcd4['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xfffcd4,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xfffcd4,_0x27fe0c);}['_calculatePosition'](_0x31d9b4){const _0x7a4ab3=this['_model']['_findOptimalIndex'](_0x31d9b4);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x31d9b4['authoredAt']?_0x7a4ab3-0x1:_0x7a4ab3:_0x7a4ab3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x217408={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x217408,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x217408));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x53189c){const _0x172989=this['commentViews']['remove'](_0x53189c['id']);this['stopListening'](_0x172989),_0x172989['isEditMode']&&this['_updateHasDirtyComment'](),_0x172989['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x47d6f3=>_0x47d6f3['isEditMode']);}['_rearrangeCollapse'](){const _0x3e3f4d=function(_0x5b5917){const _0x42be53=new _0x1b6511();for(const _0x51be07 of _0x5b5917)_0x42be53['add'](_0x51be07);return _0x42be53;}(this['commentViews']),_0x37d0b8=this['_collapsedCommentsView']['count'];for(let _0x2e0aaa=0x1;_0x2e0aaa<=_0x37d0b8;_0x2e0aaa++)_0x3e3f4d['remove'](0x1);for(const _0x1b7163 of _0x3e3f4d)_0x1b7163['collapse']();_0x37d0b8>0x0&&_0x3e3f4d['add'](this['_collapsedCommentsView'],0x1),ns(_0x2762d4(Array['from'](this['visibleViews']),Array['from'](_0x3e3f4d)),this['visibleViews'],_0x3e3f4d);}['_rearrangeExpand'](){ns(_0x2762d4(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x428ef9 of this['visibleViews'])_0x428ef9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x167936=>{this['focusTracker']['add'](_0x167936['element']),this['keystrokes']['listenTo'](_0x167936['element']);}),this['commentViews']['on']('change',(_0x7bc91b,_0x327fdd)=>{for(const _0x38c328 of _0x327fdd['removed'])this['focusTracker']['remove'](_0x38c328['element']),this['keystrokes']['stopListening'](_0x38c328['element']);for(const _0x20ab0f of Array['from'](_0x327fdd['added'])['reverse']())this['focusTracker']['add'](_0x20ab0f['element']),this['keystrokes']['listenTo'](_0x20ab0f['element']);});}}function ns(_0x160c56,_0x3329b9,_0x33b6aa){let _0x19f264=0x0;for(const _0x3783d7 of _0x160c56)switch(_0x3783d7){case'insert':_0x3329b9['add'](_0x33b6aa['get'](_0x19f264),_0x19f264),_0x19f264++;break;case'delete':_0x3329b9['remove'](_0x19f264);break;case'equal':_0x19f264++;}}class as extends kt{constructor(_0x2f8805){super(_0x2f8805);const _0x321db9=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x321db9['to']('contextValue',_0x2a63da=>E(_0x2f8805,'THREAD_CONTEXT_LABEL',_0x2a63da)),'tabindex':-0x1},'children':[{'text':_0x321db9['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x420925,_0x3928ef){super(_0x420925);const _0x3113a3=this['bindTemplate'];this['_model']=_0x3928ef,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x6d2edc(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5bcd58({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x56301a=>!!_0x56301a),this['bind']('contextValue')['to'](this['_model'],'context',_0x32e9f4=>_0x32e9f4&&_0x32e9f4['value']?this['_trimContextValue'](_0x32e9f4['value']):E(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',_0x3113a3['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 _0x32e81c=new _0x25ab89(this['locale']);return _0x32e81c['label']=E(this['locale'],'Reopen'),_0x32e81c['tooltip']=E(this['locale'],'Reopen'),_0x32e81c['icon']=_0x3cadd7,_0x32e81c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3989ae=>!_0x3989ae),_0x32e81c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x24ceef,_0x15844e)=>_0x24ceef&&_0x15844e),_0x32e81c['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x32e81c;}['_trimContextValue'](_0x397321){if(_0x397321['length']<0x96)return _0x397321;const _0x1557d4=_0x397321['lastIndexOf']('\x20',0x93);return _0x397321['substring'](0x0,_0x1557d4>-0x1?_0x1557d4:0x93)+'...';}['_attachContextActions'](){const _0xe33a6d=this['element']['querySelector']('.ck-context'),_0x1c0dbd=_0xe33a6d['querySelector']('.ck-context__value');this['listenTo'](_0xe33a6d,'mouseenter',()=>{_0x1c0dbd['offsetWidth']<_0x1c0dbd['scrollWidth']&&_0xe33a6d['classList']['add']('overlay');}),this['listenTo'](_0xe33a6d,'mouseleave',()=>{_0xe33a6d['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xf97c99 of this['focusables'])this['focusTracker']['add'](_0xf97c99['element']),this['keystrokes']['listenTo'](_0xf97c99['element']);}['_createContextView'](){const _0x169b85=new as(this['locale']);return _0x169b85['bind']('contextValue')['to'](this),_0x169b85;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xe8fb0b,_0x339eeb,_0x207720,_0x5a3428){super(_0xe8fb0b),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x339eeb,this['_localUser']=_0x207720,this['_config']=_0x5a3428,this['commentThreadHeaderView']=new Xt(_0xe8fb0b,_0x339eeb),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0xe8fb0b,E(_0xe8fb0b,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xe8fb0b,_0x339eeb,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5a3428)),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',(_0x2520a6,_0x45402a)=>_0x2520a6||!!_0x45402a),this['bind']('isUnlinked')['to'](_0x339eeb,'unlinkedAt',_0x329108=>!!_0x329108),this['bind']('ariaLabel')['to'](this,'length',_0x20ee03=>{const _0x28d703=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x20ee03,_0x28d703]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x6d2edc(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5bcd58({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x31ee0a=>_0x31ee0a['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x28f2e7=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x112b15=_0x28f2e7['commentInputView'];return _0x28f2e7['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x112b15,'value',(_0x55715c,_0x3bfffb,_0x1d7fc1,_0x5eb914,_0x5d1434)=>!!_0x5d1434||!!_0x5eb914&&_0x1d7fc1&&!_0x3bfffb||_0x55715c&&_0x1d7fc1&&!_0x3bfffb),_0x112b15['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1b5c60,_0x548a3e,_0x31bdfe)=>{let _0x5db1d1;return _0x5db1d1=_0x31bdfe&&_0x548a3e?'Reply\x20to\x20reopen\x20discussion...':_0x1b5c60?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x5db1d1);}),_0x112b15['bind']('submitLabel')['to'](this,'length',_0x4d802c=>E(this['locale'],_0x4d802c?'Reply':'Comment')),_0x112b15['on']('submit',(_0x381f10,_0x5a5b2a)=>{this['fire']('addComment',_0x5a5b2a),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x112b15['on']('cancel',()=>{this['focus']();}),_0x112b15['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x112b15['on']('cancel',_0x579dbb=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x579dbb['stop']());}),this['on']('change:isActive',(_0x844b53,_0x1f5dfc,_0x5cbe02)=>{_0x5cbe02||this['length']||_0x112b15['value']||this['fire']('removeCommentThread');}),_0x28f2e7;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x2170ff(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2f789d,target:_0x3a9e09,type:_0xbd747d,isVisible:_0x3e9e75=!0x0}){super(),this['view']=_0x2f789d,this['view']['element']||this['view']['render'](),this['_type']=_0xbd747d,this['_target']=_0x3a9e09,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1b6511([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x26f0a4,_0x3121b7)=>{this['view']['focusTracker']['add'](_0x3121b7);}),this['focusableElements']['on']('remove',(_0x3dc66b,_0x1c8b00)=>{this['view']['focusTracker']['remove'](_0x1c8b00);}),this['set']('isVisible',_0x3e9e75);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5b9108=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x5b9108),_0x5b9108;}get['targetRect'](){const _0x229086=this['target'];if(null===_0x229086)return null;if(_0x229086 instanceof _0x197d1d)return _0x229086;const _0x2bba5e=_0x229086['filter'](_0x37176a=>function(_0x4ecae9){const _0x1eca7a=_0x4ecae9['offsetParent'];if(_0x1eca7a)return!0x0;const _0x3b1a7d=_0x4ecae9['getClientRects']()['item'](0x0);return!!_0x3b1a7d;}(_0x37176a));return 0x0===_0x2bba5e['length']?null:new _0x197d1d(_0x2bba5e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2950c9){this['view']['isActive']=_0x2950c9,this['view']['mainView']['isActive']=_0x2950c9;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x19fb8e){if(!(null===_0x19fb8e||_0x19fb8e instanceof _0x197d1d||Array['isArray'](_0x19fb8e)&&_0x19fb8e['every'](_0x1ac292=>li(_0x1ac292))))throw new _0x302412('annotation-invalid-target',null,{'target':_0x19fb8e});}['_getNormalizedTarget'](){const _0xacbbf7='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0xacbbf7)?[_0xacbbf7]:_0xacbbf7;}}function li(_0x4480c7){return null!==_0x4480c7&&'object'==typeof _0x4480c7&&'nodeType'in _0x4480c7&&0x1===_0x4480c7['nodeType'];}class _ extends _0x1b6511{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x43d76b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x6d2edc(),this['_focusTracker']['on']('change:isFocused',(_0x46713a,_0x54c479,_0x31e004)=>{_0x31e004||this['fire']('blur');});for(const _0x17276a of _0x43d76b)this['add'](_0x17276a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x21c823){if(this['has'](_0x21c823))throw new _0x302412('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x21c823['innerView'],_0x21c823),this['_viewToAnnotation']['set'](_0x21c823['view'],_0x21c823);for(const _0x46d122 of _0x21c823['focusableElements'])this['_focusTracker']['add'](_0x46d122);this['listenTo'](_0x21c823['focusableElements'],'add',(_0x171cb8,_0x3d3d2d)=>{this['_focusTracker']['add'](_0x3d3d2d);}),this['listenTo'](_0x21c823['focusableElements'],'remove',(_0x260032,_0x31b7a4)=>{this['_focusTracker']['remove'](_0x31b7a4);}),this['listenTo'](_0x21c823['view']['focusTracker'],'change:isFocused',(_0x308093,_0x4a6aee,_0x2219e1)=>{_0x2219e1&&this['fire']('focus',_0x21c823);}),_0x21c823['updateTargetRect']();const _0x45deb8=this['_getOrderInContent'](_0x21c823['view']['targetRect']);return super['add'](_0x21c823,_0x45deb8);}['remove'](_0x282ca3){if(!this['has'](_0x282ca3))throw new _0x302412('annotationcollection-not-existing-item',null);this['stopListening'](_0x282ca3['view']['focusTracker']),this['stopListening'](_0x282ca3['focusableElements']);for(const _0x264666 of _0x282ca3['focusableElements'])this['_focusTracker']['remove'](_0x264666);return this['_viewToAnnotation']['delete'](_0x282ca3['view']),this['_innerViewToAnnotation']['delete'](_0x282ca3['innerView']),super['remove'](_0x282ca3);}['getByInnerView'](_0x3d3f10){return this['_innerViewToAnnotation']['get'](_0x3d3f10);}['getByView'](_0x2206c8){return this['_viewToAnnotation']['get'](_0x2206c8);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2d071a of this)_0x2d071a['updateTargetRect']();this['_sort']();}['_sort'](){const _0x33620f=Array['from'](this)['sort']((_0x1e81eb,_0x4a0c3e)=>v(_0x1e81eb['view']['targetRect'],_0x4a0c3e['view']['targetRect']));for(let _0x9538ad=_0x33620f['length']-0x1;_0x9538ad>0x0;_0x9538ad--){const _0x1f7b2d=_0x33620f[_0x9538ad];_0x9538ad!==this['getIndex'](_0x1f7b2d)&&(this['remove'](_0x1f7b2d),this['add'](_0x1f7b2d));}}['_getOrderInContent'](_0x20aefa){let _0x2bac11=0x0;if(!_0x20aefa)return this['length'];for(const _0xbe088d of this){const _0x120af6=_0xbe088d['view']['targetRect'];if(_0x120af6){if(v(_0x20aefa,_0x120af6)<0x0)return _0x2bac11;_0x2bac11++;}}return _0x2bac11;}}function v(_0x26b74f,_0xf8b60f){if(null===_0x26b74f&&null===_0xf8b60f)return 0x0;if(null===_0x26b74f)return-0x1;if(null===_0xf8b60f)return 0x1;const _0x164cbd=_0x26b74f['top']-_0xf8b60f['top'];return 0x0==_0x164cbd?_0x26b74f['left']-_0xf8b60f['left']:_0x164cbd;}class O extends _0x149248{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b471e){if(super(_0x5b471e),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5b471e instanceof _0x26ce07){const _0x38b8fc=_0x5b471e['locale'];_0x5b471e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x26f632){this['collection']['add'](_0x26f632);}['remove'](_0x294a21){this['collection']['remove'](_0x294a21),_0x294a21['destroy']();}['refreshVisibility'](){for(const _0x29e326 of this['collection'])_0x29e326['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5d7953){return this['collection']['getByInnerView'](_0x5d7953);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x922a3f of this['collection'])_0x922a3f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x233ad4){this['fire']('_activateAnnotation',_0x233ad4);}['createAnnotation'](_0x40e40e){return new d(_0x40e40e);}['createAnnotationView'](_0x1c7a6d,_0x1549f6){return new S(_0x1c7a6d,_0x1549f6);}['_addActiveAnnotation'](_0x45b75d){const _0x5cd8b3=new Set(this['activeAnnotations']);_0x5cd8b3['add'](_0x45b75d),this['activeAnnotations']=_0x5cd8b3;}['_removeActiveAnnotation'](_0x19fc3d){const _0x26a1eb=new Set(this['activeAnnotations']);_0x26a1eb['delete'](_0x19fc3d),this['activeAnnotations']=_0x26a1eb;}['_bindAnnotationsToVisibleAnnotations'](){const _0x518dd0=this['collection'],_0x328a33=this['_visibleAnnotations'];function _0xb3b617(_0x103234){const _0x3ceffc=_0x103234['source'];_0x3ceffc['isVisible']&&!_0x328a33['has'](_0x3ceffc)?_0x328a33['add'](_0x3ceffc):!_0x3ceffc['isVisible']&&_0x328a33['has'](_0x3ceffc)&&_0x328a33['remove'](_0x3ceffc),_0x3ceffc['view']['focusTracker']['remove'](_0x3ceffc['view']['element']),_0x3ceffc['view']['focusTracker']['add'](_0x3ceffc['view']['element']);}this['listenTo'](_0x518dd0,'add',(_0x3687ca,_0x4d7f32)=>{_0x4d7f32['isVisible']&&_0x328a33['add'](_0x4d7f32),this['listenTo'](_0x4d7f32,'change:isVisible',_0xb3b617);}),this['listenTo'](_0x518dd0,'remove',(_0x52f697,_0x5f1527)=>{_0x328a33['has'](_0x5f1527)&&_0x328a33['remove'](_0x5f1527),this['stopListening'](_0x5f1527,'change:isVisible',_0xb3b617);});}['_setupEnterAnnotationKeystroke'](){const _0x49ce71=_0x2f7e7d=>{_0x2f7e7d['on']('ready',()=>{_0x2f7e7d['keystrokes']['set'](_0x9f19f6,(_0x13b8cd,_0x1f88fb)=>{const _0x37369b=_0x255c30(this['activeAnnotations']['values']());_0x37369b&&(_0x37369b['view']['focus'](),_0x1f88fb());});});};this['context']instanceof _0x26ce07?_0x49ce71(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5784d8,_0x3054b6)=>{_0x49ce71(_0x3054b6);});}['_setupEscapeAnnotationHandling'](){const _0x4cf89b=_0x9f0a78=>{const _0x5f500e=_0x9f0a78['source'],_0x559128=[];let _0x182a69;if(Array['isArray'](_0x5f500e['target'])){_0x182a69=_0x5f500e['target'][0x0],this['context']instanceof _0x26ce07?_0x559128['push'](this['context']):this['context']['editors']&&_0x559128['push'](...this['context']['editors']);for(const _0xc53b1a of _0x559128)for(const _0x547e7d of _0xc53b1a['editing']['view']['domRoots']['values']())if(_0x547e7d['contains'](_0x182a69))return void _0xc53b1a['editing']['view']['focus']();_0x182a69['focus']();}};this['listenTo'](this['collection'],'add',(_0x30b368,_0x566cd6)=>{this['listenTo'](_0x566cd6,'escape',_0x4cf89b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xd1a06c,_0x32314f)=>{this['stopListening'](_0x32314f,'escape',_0x4cf89b);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x149248{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56aeb2){super(_0x56aeb2),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3f6565=this['context']['config'];_0x3f6565['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3f6565['define']('comments.maxThreadTotalWeight',0x1f4),_0x3f6565['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3f6565['define']('comments.CommentThreadView',vt),_0x3f6565['define']('comments.CommentView',gt),_0x3f6565['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4e2025=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x23ea36,_0x208415)=>this['_addCommentThread'](_0x208415)),this['on']('submitCommentThread',(_0x544d6f,_0x13fda9)=>this['_submitCommentThread'](_0x13fda9)),this['on']('resolveCommentThread',(_0x13fe59,_0x489343)=>this['_resolveCommentThread'](_0x489343)),this['on']('resolveCommentThread',(_0x3d66c8,_0x3a0760)=>this['_updateActiveAnnotation'](_0x3a0760),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3bcfdb,_0x392409)=>this['_reopenCommentThread'](_0x392409)),this['on']('reopenCommentThread',(_0x372620,_0x446ce3)=>this['_updateActiveAnnotation'](_0x446ce3),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x131bd0,_0xcee7b1)=>this['_removeCommentThread'](_0xcee7b1)),this['on']('updateCommentThread',(_0x520a0b,_0x4e8b70)=>this['_updateCommentThread'](_0x4e8b70)),this['on']('updateCommentThread',(_0x123571,_0x29f9ff)=>this['_updateActiveAnnotation'](_0x29f9ff),{'priority':'lowest'}),this['on']('addComment',(_0x7624c0,_0x14b8fb)=>this['_addComment'](_0x14b8fb)),this['on']('updateComment',(_0x8a5eb7,_0x76f72b)=>this['_updateComment'](_0x76f72b)),this['on']('removeComment',(_0xa2bbce,_0x405d4a)=>this['_removeComment'](_0x405d4a)),this['on']('addComment',(_0x8a79d0,{threadId:_0x26d01c,isFromAdapter:_0x4bad10})=>{if(_0x4bad10)return;const _0x1ae42c=this['getCommentThread'](_0x26d01c),_0xd03db4=_0x1ae42c&&this['_threadToController']['get'](_0x1ae42c);_0xd03db4&&_0xd03db4['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4e2025,'change:activeAnnotations',(_0x2ad092,_0x47a2c1,_0x3e26b3)=>{const _0x4d473d=Array['from'](_0x3e26b3)['map'](_0x51cfd0=>this['_viewToController']['get'](_0x51cfd0['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4d473d?_0x4d473d['model']:null;});}set['adapter'](_0x15090d){if(this['_adapter'])throw new _0x302412('commentsrepository-adapter-already-set');this['_adapter']=_0x15090d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2fa7d7=Tt,threadId:_0x33e37e=_0x23944b(),comments:_0x863f8f=[],unlinkedAt:_0x506518=null,resolvedAt:_0x4a4aa6=null,resolvedBy:_0xca2f6e=null,target:_0x1de044=null,context:_0xed7e4b=null,attributes:_0x47811b={},isResolvable:_0x2f490c=!0x0,isSubmitted:_0x1b2689=!0x1,isFromAdapter:_0xbcd77e=!0x1}={}){return this['fire'](bt('addCommentThread',_0x2fa7d7),{'channelId':_0x2fa7d7,'threadId':_0x33e37e,'comments':_0x863f8f,'unlinkedAt':_0x506518,'resolvedAt':_0x4a4aa6,'resolvedBy':_0xca2f6e,'target':_0x1de044,'context':_0xed7e4b,'attributes':_0x47811b,'isFromAdapter':_0xbcd77e,'isResolvable':_0x2f490c,'isSubmitted':_0x1b2689}),this['getCommentThread'](_0x33e37e);}['openNewCommentThread']({channelId:_0x405910=Tt,threadId:_0x7778d7=_0x23944b(),target:_0x3b34e6,context:_0x15b78a=null,isResolvable:_0x1ff3c8=!0x0}){if(this['_readOnlyChannels']['has'](_0x405910)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3b34e6)throw new _0x302412('commentsrepository-missing-target');const _0x42df7d=this['addCommentThread']({'channelId':_0x405910,'threadId':_0x7778d7,'target':_0x3b34e6,'context':_0x15b78a,'isResolvable':_0x1ff3c8});if(!_0x42df7d)return null;const _0xfd6f66=this['_threadToController']['get'](_0x42df7d),_0x2366ea=_0xfd6f66['view']['commentThreadInputView']['commentInputView'],_0x37a4c7=this['context']['plugins']['get'](O),_0xa2c212=_0x37a4c7['getByInnerView'](_0xfd6f66['view']);return _0x37a4c7['activate'](_0xa2c212),_0x2366ea['once']('editorReady',()=>_0x2366ea['focus']()),_0x42df7d;}['hasCommentThread'](_0x1c82d3){if('string'!=typeof _0x1c82d3)throw new _0x302412('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1c82d3);}['updateCommentThread']({channelId:_0x4e7131=Tt,threadId:_0x2e73d4,context:_0x69fd92,unlinkedAt:_0x3f24e3,attributes:_0x93d23a,isFromAdapter:_0x463c26=!0x1}){return this['fire'](bt('updateCommentThread',_0x4e7131),{'channelId':_0x4e7131,'threadId':_0x2e73d4,'context':_0x69fd92,'unlinkedAt':_0x3f24e3,'attributes':_0x93d23a,'isFromAdapter':_0x463c26}),this['getCommentThread'](_0x2e73d4);}['getCommentThread'](_0x1ba600){if('string'!=typeof _0x1ba600)throw new _0x302412('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1ba600);}['fetchCommentThread']({channelId:_0x2dd051,threadId:_0x125338}={}){const _0x13ec10=this['getCommentThread'](_0x125338);if(_0x13ec10)return Promise['resolve'](_0x13ec10);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x302412('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2dd051,'threadId':_0x125338})['then'](_0x5c277e=>this['hasCommentThread'](_0x125338)?this['getCommentThread'](_0x125338):_0x5c277e?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2dd051},_0x5c277e)):void 0x0)['catch'](_0x1ac65e=>{throw console['error'](_0x1ac65e),new _0x302412('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4dc0bc,skipNotAttached:_0x50a152=!0x1,skipEmpty:_0x21c560=!0x1,toJSON:_0x2c1278=!0x1}={}){const _0x746ac6=[];for(const _0x344767 of this['_threads']['values']())_0x4dc0bc&&_0x344767['channelId']!==_0x4dc0bc||_0x50a152&&!_0x344767['isAttached']||_0x21c560&&0x0===_0x344767['length']||_0x746ac6['push'](_0x344767);return _0x2c1278?_0x746ac6['map'](_0x53ff12=>_0x53ff12['toJSON']()):_0x746ac6;}['setActiveCommentThread'](_0x44e29c){const _0x5f3b8d=this['context']['plugins']['get'](O);if(!_0x44e29c)return void(this['activeCommentThread']&&_0x5f3b8d['deactivateAll']());const _0x213a4a=this['getCommentThread'](_0x44e29c);if(!_0x213a4a)throw new _0x302412('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x44e29c});if(!this['_threadToController']['has'](_0x213a4a))throw new _0x302412('commentsrepository-active-not-attached',null,{'threadId':_0x44e29c});const _0x47051a=_0x5f3b8d['getByInnerView'](this['_threadToController']['get'](_0x213a4a)['view']);_0x5f3b8d['activate'](_0x47051a);}['switchReadOnly'](_0x2c4f38,_0x2d8ac9){_0x2c4f38?this['_readOnlyChannels']['add'](_0x2d8ac9):this['_readOnlyChannels']['delete'](_0x2d8ac9),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5d20ac){return this['_readOnlyChannels']['has'](_0x5d20ac)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4bdf62,_0x33778d){return new Ct(_0x4bdf62,_0x33778d);}['setPermissions'](_0x36f6f0,_0x580729=Tt){this['_permissions']['set'](_0x580729,_0x36f6f0),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3bd1c6=Tt){return this['_permissions']['has'](_0x3bd1c6)?this['_permissions']['get'](_0x3bd1c6):_t;}['_addCommentThread']({channelId:_0x5b5017,threadId:_0x267632,comments:_0x339a43,unlinkedAt:_0x29c259,resolvedAt:_0x3958fc,resolvedBy:_0x1fcab5,target:_0x52168c,context:_0x23729f,attributes:_0x39e71d,isFromAdapter:_0x43241a,isResolvable:_0x1e0cdf,isSubmitted:_0x585c08}){if('string'!=typeof _0x267632)throw new _0x302412('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x267632});if(this['hasCommentThread'](_0x267632))throw new _0x302412('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x267632});const _0x32d245=new ui(this,{'channelId':_0x5b5017,'id':_0x267632,'context':_0x23729f,'attributes':_0x39e71d,'unlinkedAt':_0x29c259,'resolvedAt':_0x3958fc,'resolvedBy':_0x1fcab5?this['context']['plugins']['get'](it)['getUser'](_0x1fcab5):null,'isResolvable':_0x1e0cdf,'isSubmitted':_0x585c08||_0x43241a});this['_threads']['set'](_0x267632,_0x32d245);for(const _0x4f6391 of _0x339a43)_0x32d245['_add'](this['_createNewComment']({'threadId':_0x267632,..._0x4f6391}));return _0x52168c&&_0x32d245['attachTo'](_0x52168c),_0x43241a||!_0x32d245['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5b5017,'threadId':_0x267632});}['_submitCommentThread']({channelId:_0x4215e1,threadId:_0x1075c2}){if(!this['hasCommentThread'](_0x1075c2))throw new _0x302412('commentsrepository-missing-comment-thread',this);const _0x371838=this['getCommentThread'](_0x1075c2);if(_0x371838['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x25f259,comments:_0x27406a,resolvedAt:_0xebdfbf,resolvedBy:_0x1da5b2,context:_0x857e35,attributes:_0x385d58}=_0x371838,_0x2a897b=this['context']['plugins']['get']('PendingActions'),_0x4c7b4f=_0x2a897b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4215e1,'threadId':_0x25f259,'comments':_0x27406a['map'](_0xff69c1=>_0xff69c1['toJSON']()),'resolvedAt':_0xebdfbf,'resolvedBy':_0x1da5b2?_0x1da5b2['id']:_0x1da5b2,'context':_0x857e35,'attributes':_0x385d58})['then'](({comments:_0x349fe8})=>{_0x2a897b['remove'](_0x4c7b4f);for(const _0xca667a of _0x349fe8)this['_updateComment']({'channelId':_0x4215e1,'threadId':_0x1075c2,'commentId':_0xca667a['commentId'],'createdAt':_0xca667a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xef2d8a=>{throw console['error'](_0xef2d8a),new _0x302412('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2b75e8,target:_0x90590a}){const _0x3b48c1=this['getCommentThread'](_0x2b75e8);if(!_0x3b48c1)throw new _0x302412('commentsrepository-attach-missing-comment-thread',this);const _0x4b6a41=this['context']['plugins']['get']('PendingActions'),_0x1dee30=this['context']['plugins']['get'](O),_0xc5e4b4=this['_createCommentThreadView'](_0x3b48c1),_0x529b62=new Ct(_0x3b48c1,_0xc5e4b4);let _0x29ae82=null;_0xc5e4b4['on']('change:isDirty',(_0x325f79,_0x3559fc,_0x3173b1)=>{_0x3173b1?_0x29ae82=_0x4b6a41['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x29ae82&&(_0x4b6a41['remove'](_0x29ae82),_0x29ae82=null);}),this['_threadToController']['set'](_0x3b48c1,_0x529b62),this['_viewToController']['set'](_0xc5e4b4,_0x529b62);const _0x1b9e84=new S(this['context']['locale'],_0xc5e4b4);_0x1b9e84['bind']('length')['to'](_0xc5e4b4),_0x1b9e84['bind']('isDirty')['to'](_0xc5e4b4,'isDirty',_0xc5e4b4,'length',(_0x404d8b,_0x108050)=>_0x404d8b||!_0x108050),_0x1b9e84['bind']('isActive')['to'](_0xc5e4b4),_0x1b9e84['type']='comment';const _0x34bbb2=new d({'view':_0x1b9e84,'target':_0x90590a,'type':'comment','isVisible':!_0x3b48c1['archivedAt']});return _0xc5e4b4['on']('escape',()=>{_0x34bbb2['fire']('escape');}),this['_bindAnnotationToEditors'](_0xc5e4b4,_0x34bbb2),_0x1dee30['add'](_0x34bbb2),_0x34bbb2;}['_bindAnnotationToEditors'](_0xaca33b,_0x2e8e86){this['listenTo'](_0xaca33b,'editorReady',(_0x308bc9,_0x5a8538)=>{const _0xd6b0bb=_0x5a8538['ui']['view']['body']['bodyCollectionContainer'];_0x2e8e86['focusableElements']['add'](_0xd6b0bb),this['context']instanceof _0x26ce07&&this['context']['ui']['focusTracker']['add'](_0xd6b0bb);},{'priority':'highest'}),this['listenTo'](_0xaca33b,'editorDestroyed',(_0x345724,_0x2dcea1)=>{const _0x87ce51=_0x2dcea1['ui']['view']['body']['bodyCollectionContainer'];_0x2e8e86['focusableElements']['has'](_0x87ce51)&&_0x2e8e86['focusableElements']['remove'](_0x87ce51),this['context']instanceof _0x26ce07&&this['context']['ui']['focusTracker']['remove'](_0x87ce51);});}['_unbindEditors'](_0x94e1dd){this['stopListening'](_0x94e1dd,'editorReady'),this['stopListening'](_0x94e1dd,'editorDestroyed');}['_createCommentThreadView'](_0x1e3953){const _0x5848a7=this['context']['plugins']['get'](it),{config:_0x9c0125,locale:_0x348e8d}=this['context'],_0x24a111=lt(_0x9c0125['get']('locale'),_0x348e8d);return new(0x0,(_0x9c0125['get']('comments'))['CommentThreadView'])(_0x348e8d,_0x1e3953,_0x5848a7['me'],{'editorConfig':{..._0x9c0125['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x9c0125['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x9c0125['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x9c0125['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x9c0125['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x24a111,'CommentView':_0x9c0125['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x376378,channelId:_0x115455,resolvedAt:_0x1af0cd,resolvedBy:_0x5763d9,isFromAdapter:_0x326ea7}){if(!this['hasCommentThread'](_0x376378))throw new _0x302412('commentsrepository-missing-comment-thread',null,{'threadId':_0x376378});const _0x29adfe=this['getCommentThread'](_0x376378);if(_0x29adfe['isResolved'])throw new _0x302412('commentsrepository-resolved-comment-thread',null,{'threadId':_0x376378});const _0x38aee1=this['context']['plugins']['get'](it);if(_0x29adfe['resolvedBy']=_0x38aee1['getUser'](_0x5763d9),_0x29adfe['resolvedAt']=_0x1af0cd,_0x326ea7||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x48116f=this['context']['plugins']['get']('PendingActions'),_0x28aa23=_0x48116f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x115455,'threadId':_0x376378})['then'](({resolvedAt:_0x3b4663,resolvedBy:_0x378146})=>{_0x48116f['remove'](_0x28aa23),_0x29adfe['resolvedBy']['id']!==_0x378146&&(_0x29adfe['resolvedBy']=_0x38aee1['getUser'](_0x378146)),_0x29adfe['resolvedAt']=_0x3b4663;})['catch'](_0x193d78=>{throw console['error'](_0x193d78),new _0x302412('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1ab338,channelId:_0x1a512c,isFromAdapter:_0x2dcdc0}){if(!this['hasCommentThread'](_0x1ab338))throw new _0x302412('commentsrepository-missing-comment-thread',null,{'threadId':_0x1ab338});const _0x36e1ad=this['getCommentThread'](_0x1ab338);if(!_0x36e1ad['isResolved'])throw new _0x302412('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1ab338});if(_0x36e1ad['resolvedBy']=null,_0x36e1ad['resolvedAt']=null,_0x2dcdc0||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2ffc2a=this['context']['plugins']['get']('PendingActions'),_0x8b25dc=_0x2ffc2a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1a512c,'threadId':_0x1ab338})['then'](()=>_0x2ffc2a['remove'](_0x8b25dc))['catch'](_0x1452bf=>{throw console['error'](_0x1452bf),new _0x302412('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3da3f6,isFromAdapter:_0x3fa973}){const _0x32fde9=this['getCommentThread'](_0x3da3f6);if(!_0x32fde9)throw new _0x302412('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3da3f6),this['_threads']['delete'](_0x3da3f6),!_0x32fde9['isSubmitted']||_0x3fa973||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x18be4a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x35ce84}=_0x32fde9,_0x3db0f2=_0x18be4a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x35ce84,'threadId':_0x3da3f6})['then'](()=>_0x18be4a['remove'](_0x3db0f2))['catch'](_0x32159a=>{throw console['error'](_0x32159a),new _0x302412('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5457f0,unlinkedAt:_0x4387ae,context:_0x306947,attributes:_0x55f20e,isFromAdapter:_0x5e1793}){if('string'!=typeof _0x5457f0)throw new _0x302412('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5457f0});if(!this['hasCommentThread'](_0x5457f0))throw new _0x302412('commentsrepository-missing-comment-thread',null,{'threadId':_0x5457f0});const _0x576d19=this['getCommentThread'](_0x5457f0);let _0x4751c4=!0x1;if(void 0x0!==_0x306947&&_0x576d19['context']!==_0x306947&&(_0x576d19['context']=_0x306947,_0x4751c4=!0x0),void 0x0!==_0x4387ae&&_0x576d19['unlinkedAt']!==_0x4387ae&&(_0x576d19['unlinkedAt']=_0x4387ae,_0x4751c4=!0x0),_0x55f20e&&!wt(_0x55f20e,_0x576d19['attributes'])&&(_0x576d19['attributes']=_0x55f20e,_0x4751c4=!0x0),!_0x4751c4)return Promise['resolve']();if(!_0x576d19['isSubmitted']||_0x5e1793||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4b87a3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2650e1}=_0x576d19,_0x44c63c=_0x4b87a3['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2650e1,'threadId':_0x5457f0,'context':_0x306947,'unlinkedAt':_0x4387ae,'attributes':_0x55f20e})['then'](()=>_0x4b87a3['remove'](_0x44c63c))['catch'](_0x24101b=>{throw console['error'](_0x24101b),new _0x302412('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2c9500){const _0x560103=this['context']['plugins']['get'](O),_0x13a5e8=this['getCommentThread'](_0x2c9500);if(_0x13a5e8['_isAttached']=!0x1,this['_threadToController']['has'](_0x13a5e8)){const _0x4ae5ad=this['_threadToController']['get'](_0x13a5e8),_0x235fc6=_0x4ae5ad['view'],_0x355b84=_0x560103['getByInnerView'](_0x235fc6);this['_threadToController']['delete'](_0x13a5e8),this['_viewToController']['delete'](_0x235fc6),_0x355b84&&_0x560103['remove'](_0x355b84),_0x4ae5ad['destroy'](),_0x235fc6['destroy']()['then'](()=>{this['_unbindEditors'](_0x235fc6);});}}['_updateActiveAnnotation']({threadId:_0x238719,resolvedAt:_0x14e7bc,unlinkedAt:_0x27847d}){const _0x432df3=!!_0x14e7bc,_0x122048=this['context']['plugins']['get'](O),_0x13bdb3=this['getCommentThread'](_0x238719);if(this['_threadToController']['has'](_0x13bdb3)){const _0x26481f=this['_threadToController']['get'](_0x13bdb3)['view'],_0x1c39eb=_0x122048['getByInnerView'](_0x26481f);_0x1c39eb&&(_0x432df3&&_0x122048['_removeActiveAnnotation'](_0x1c39eb),_0x27847d?_0x1c39eb['isVisible']=!0x1:_0x1c39eb['refreshVisibility']());}}['_getExternalAuthor'](_0x5dd283){const _0xe43f2e=this['context']['plugins']['get'](it),_0x3b331a=pt('external:'+_0x5dd283),_0x34757e=_0xe43f2e['getUser'](_0x3b331a);return _0x34757e||_0xe43f2e['addUser']({'id':_0x3b331a,'name':_0x5dd283});}['_createNewComment']({threadId:_0x35bdaf,commentId:_0x270aca=_0x23944b(),content:_0x53de20,authorId:_0xec8e06,createdAt:_0x2eb52f,attributes:_0x5816dd}){if('string'!=typeof _0x270aca)throw new _0x302412('commentsrepository-invalid-commentid');if('string'!=typeof _0xec8e06)throw new _0x302412('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x53de20||!_0x53de20['trim']())throw new _0x302412('commentsrepository-invalid-comment-content');const _0x20778e=this['context']['plugins']['get'](it)['getUser'](_0xec8e06);if(!_0x20778e)throw new _0x302412('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xec8e06});let _0x29f852=null,_0x599e88=_0x2eb52f;return _0x5816dd?.['@external']&&(_0x29f852=this['_getExternalAuthor'](_0x5816dd['@external']['authorName']),_0x599e88=new Date(_0x5816dd['@external']['createdAt'])),new fi(this,{'threadId':_0x35bdaf,'id':_0x270aca,'author':_0x29f852||_0x20778e,'creator':_0x20778e,'content':_0x53de20,'createdAt':_0x2eb52f,'authoredAt':_0x599e88,'attributes':_0x5816dd});}['_addComment'](_0xea02da){let {threadId:_0x3e5ea9,content:_0x33166e,attributes:_0x5a218e,isFromAdapter:_0x1c0f88}=_0xea02da;const _0x55b1a4=this['getCommentThread'](_0xea02da['threadId']);if(!_0x55b1a4)throw new _0x302412('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x473219=this['_createNewComment'](_0xea02da),{id:_0x1612db}=_0x473219;if(_0x55b1a4['_add'](_0x473219),_0x1c0f88||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x55b1a4['isSubmitted'])return Promise['resolve']();const _0x25e1f2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x39a7cd}=_0x55b1a4,_0x1dea2c=_0x25e1f2['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5a218e||(_0x5a218e={}),this['adapter']['addComment']({'channelId':_0x39a7cd,'threadId':_0x3e5ea9,'commentId':_0x1612db,'content':_0x33166e,'attributes':_0x5a218e})['then'](_0x5f0dd1=>{_0x25e1f2['remove'](_0x1dea2c),_0x5f0dd1&&this['_updateComment']({'channelId':_0x39a7cd,'threadId':_0x3e5ea9,'commentId':_0x1612db,'createdAt':_0x5f0dd1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x67a355=>{throw console['error'](_0x67a355),new _0x302412('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5b9cc1,commentId:_0x2d46c8,content:_0x5ebf04,createdAt:_0x471478,attributes:_0x48aaf2,isFromAdapter:_0xbc320b}){if(void 0x0!==_0x5ebf04&&('string'!=typeof _0x5ebf04||!_0x5ebf04['trim']()['length']))throw new _0x302412('commentsrepository-update-comment-invalid-content');const _0x581748=this['getCommentThread'](_0x5b9cc1),_0xf2771b=_0x581748['getComment'](_0x2d46c8);if(!_0xf2771b)throw new _0x302412('commentsrepository-update-missing-comment',this);let _0x6bcf55=!0x1;if(_0x5ebf04&&_0x5ebf04!==_0xf2771b['content']&&(_0xf2771b['isEditable']||_0xbc320b)&&(_0xf2771b['content']=_0x5ebf04,_0x6bcf55=!0x0),_0x471478&&_0x471478!==_0xf2771b['createdAt']&&(_0xf2771b['createdAt']=_0x471478,_0xf2771b['attributes']&&_0xf2771b['attributes']['@external']||(_0xf2771b['authoredAt']=_0x471478),_0x6bcf55=!0x0),_0x48aaf2&&!wt(_0x48aaf2,_0xf2771b['attributes'])&&(_0xf2771b['attributes']=_0x48aaf2,_0x6bcf55=!0x0),!_0x6bcf55)return Promise['resolve']();if(_0x581748['fire']('commentUpdated'),_0xbc320b||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2b0ae4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1359a6}=this['getCommentThread'](_0xf2771b['threadId']),_0x16c798=_0x2b0ae4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1359a6,'threadId':_0x5b9cc1,'commentId':_0x2d46c8,'content':_0x5ebf04,'attributes':_0x48aaf2})['then'](()=>_0x2b0ae4['remove'](_0x16c798))['catch'](_0x4036b6=>{throw console['error'](_0x4036b6),new _0x302412('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x583abf,commentId:_0x5d7a9e,isFromAdapter:_0x2f3bd2}){const _0x48b3c0=this['getCommentThread'](_0x583abf),_0x3d0fa4=_0x48b3c0['getComment'](_0x5d7a9e);if(!_0x3d0fa4)throw new _0x302412('commentsrepository-remove-missing-comment',this);if(_0x48b3c0['_remove'](_0x3d0fa4),_0x2f3bd2||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3fcf8e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1dcdf9}=_0x48b3c0,_0x1c64c1=_0x3fcf8e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1dcdf9,'threadId':_0x583abf,'commentId':_0x5d7a9e})['then'](()=>_0x3fcf8e['remove'](_0x1c64c1))['catch'](_0x408d19=>{throw console['error'](_0x408d19),new _0x302412('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x2170ff(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x49a1b5,_0x198407){super();const _0x131fde=_0x49a1b5['context']['plugins']['get'](it)['me'],_0x5093ac=_0x49a1b5['getCommentThread'](_0x198407['threadId']),_0x2e31c2=0x0===_0x5093ac['comments']['length'],_0x1ef602=_0x131fde===_0x198407['author'];this['id']=_0x198407['id'],this['threadId']=_0x198407['threadId'],this['author']=_0x198407['author'],this['creator']=_0x198407['creator'],this['isExternal']=Boolean(_0x198407['attributes']&&_0x198407['attributes']['@external']),this['set']('content',_0x198407['content']),this['createdAt']=_0x198407['createdAt']||new Date(),this['set']('authoredAt',_0x198407['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5093ac,'resolvedAt'),this['set']('attributes',_0x198407['attributes']||{}),this['bind']('isEditable')['to'](_0x49a1b5,'_permissions',()=>{const _0x584186=_0x49a1b5['getPermissions'](_0x5093ac['channelId'])['write'],_0x5cbaaf=_0x49a1b5['getPermissions'](_0x5093ac['channelId'])['modifyAll'];return _0x1ef602&&_0x584186||!_0x1ef602&&_0x5cbaaf;}),this['bind']('isRemovable')['to'](_0x5093ac,'isRemovable',_0x49a1b5,'_permissions',_0x18e01d=>{const _0x281bc8=_0x49a1b5['getPermissions'](_0x5093ac['channelId'])['write'],_0x476cfe=_0x49a1b5['getPermissions'](_0x5093ac['channelId'])['modifyAll'];return _0x1ef602&&_0x281bc8||_0x18e01d&&_0x2e31c2||!_0x1ef602&&_0x476cfe&&!_0x2e31c2;}),this['bind']('isReadOnly')['to'](_0x5093ac,'isReadOnly'),this['_repository']=_0x49a1b5;}get['weight'](){return Math['max'](function(_0x1d2a5e){const _0x4dad14=document['createElement']('div');return _0x4dad14['innerHTML']=_0x1d2a5e,_0x4dad14['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3ddd11){const {threadId:_0x4f8ee8,id:_0x5d6e01}=this;if(!this['_repository']['hasCommentThread'](_0x4f8ee8))throw new _0x302412('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x527a96}=this['_repository']['getCommentThread'](_0x4f8ee8);this['_repository']['fire'](bt('updateComment',_0x527a96,_0x4f8ee8),{'channelId':_0x527a96,'threadId':_0x4f8ee8,'commentId':_0x5d6e01,..._0x3ddd11});}['setAttribute'](_0x249340,_0x4edfe4){const _0x308afb=It(this['attributes']);At(_0x308afb,_0x249340,_0x4edfe4),this['update']({'attributes':_0x308afb});}['removeAttribute'](_0x566f03){const _0x401b1e=It(this['attributes']);yt(_0x401b1e,_0x566f03),this['update']({'attributes':_0x401b1e});}['remove'](_0x103501={}){if(!_0x103501['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1f83ba,id:_0x1fe633}=this;if(!this['_repository']['hasCommentThread'](_0x1f83ba))throw new _0x302412('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3addc3}=this['_repository']['getCommentThread'](_0x1f83ba);this['_repository']['fire'](bt('removeComment',_0x3addc3,_0x1f83ba),{'channelId':_0x3addc3,'threadId':_0x1f83ba,'commentId':_0x1fe633,..._0x103501});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x597c97,..._0x64ecf3){for(const _0x53859e of _0x64ecf3)void 0x0!==_0x53859e&&(_0x597c97+=':'+String(_0x53859e));return _0x597c97;}class J extends _0x116639{['refresh'](){const _0x17edfb=this['editor']['model']['document']['selection'];for(const _0x11c8ef of _0x17edfb['getRanges']())if(this['_hasContent'](_0x11c8ef))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x154683=_0x23944b()}={}){const _0x1db98e=this['editor']['model'],_0x5bb296=[];for(const _0x1f89ef of _0x1db98e['document']['selection']['getRanges']())this['_hasContent'](_0x1f89ef)&&_0x5bb296['push'](this['_trimToContent'](_0x1f89ef));_0x1db98e['change'](_0x1145c5=>{for(const _0x21bc0d of _0x5bb296){const _0x4a34e9=_0x23944b()['substr'](0x1,0x5),_0x2eb1ee='comment:'+_0x154683+':'+_0x4a34e9;_0x1145c5['addMarker'](_0x2eb1ee,{'range':_0x21bc0d,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5c40d1){for(const _0x8d6c6 of _0x5c40d1['getItems']())if(this['_itemIsContent'](_0x8d6c6))return!0x0;return!0x1;}['_itemIsContent'](_0x8a9031){return _0x8a9031['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x8a9031)&&!_0x8a9031['is']('element','tableCell');}['_trimToContent'](_0x111c59){const _0x4504d0=_0x329254=>!this['_itemIsContent'](_0x329254['item']),_0x57f477=_0x111c59['start']['getLastMatchingPosition'](_0x4504d0),_0x3d15c3=_0x111c59['end']['getLastMatchingPosition'](_0x4504d0,{'direction':'backward'});return this['editor']['model']['createRange'](_0x57f477,_0x3d15c3);}}class P extends _0x3e8287{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4008bb){super(_0x4008bb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x290864=this['editor'],_0x4d5ae4=_0x290864['model']['document']['selection'],_0x1276d0=_0x3058e3(()=>this['refreshSelectedViews'](),0xa);_0x4d5ae4['on']('change:range',(_0x5f0a6d,_0x30a39d)=>{_0x30a39d['directChange']&&(_0x1276d0['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x290864['editing']['view']['document'],'change:isFocused',(_0x32f59b,_0x410f60,_0x3d8ebe)=>{_0x3d8ebe&&_0x1276d0();}),this['listenTo'](_0x290864['ui']['focusTracker'],'change:isFocused',(_0x5c015c,_0x26f052,_0x15db43)=>{_0x15db43||_0x290864['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x262ca8=>this['_editorAnnotationsData']['has'](_0x262ca8['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x51e1cc){if(this['_editorAnnotations']['has'](_0x51e1cc['view']))return;this['_editorAnnotations']['add'](_0x51e1cc['view']),this['editor']['ui']['focusTracker']['add'](_0x51e1cc['view']['element']);const _0x496e9b=this['editor']['plugins']['get'](O);this['listenTo'](_0x496e9b['collection'],'remove',(_0x3a3b38,_0x5e6880)=>{this['editor']['ui']['focusTracker']['remove'](_0x5e6880['view']['element']),this['_editorAnnotations']['delete'](_0x5e6880['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x195d9d){if('function'!=typeof _0x195d9d)throw new _0x302412('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x195d9d);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2f3ad0,annotations:_0x500666}){const _0x20d1d5=[],_0x28142d=this['editor']['model']['document']['selection'],_0x56b591=Array['from'](_0x28142d['getRanges']());for(const [_0x520a0c,_0x2907d9]of this['_editorAnnotationsData']){const _0x4e521d=_0x12aaa4(_0x2907d9),_0x43d908=_0x500666['getByInnerView'](_0x520a0c);_0x4e521d&&_0x43d908&&_0x20d1d5['push']({'annotation':_0x43d908,'range':_0x4e521d});}function _0x12aaa4(_0x32900c){for(const _0x44daea of _0x32900c)for(const _0x4f9790 of _0x56b591)if(_0x44daea['containsRange'](_0x4f9790,!_0x28142d['isCollapsed']))return _0x44daea;return null;}return _0x20d1d5['sort']((_0x30d421,_0xb26ead)=>{const _0x413319=_0x30d421['range'],_0x42505e=_0xb26ead['range'];if(!_0x413319['isEqual'](_0x42505e)){if(_0x413319['containsRange'](_0x42505e,!0x0))return 0x1;if(_0x42505e['containsRange'](_0x413319,!0x0))return-0x1;}return _0x30d421['annotation']==_0x2f3ad0?-0x1:_0xb26ead['annotation']==_0x2f3ad0?0x1:0x0;})['map'](_0x22ed8e=>_0x22ed8e['annotation']);}get['_editorAnnotationsData'](){const _0x397875=new Map();for(const _0x5d8482 of Array['from'](this['_dataCollectors']))for(const [_0x24c930,_0x381a17]of _0x5d8482())_0x397875['set'](_0x24c930,_0x381a17);return _0x397875;}}class st extends _0x3e8287{['afterInit'](){const _0x25254d=this['editor'];if(!_0x25254d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x25254d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3e8287{constructor(_0xea5d9c){super(_0xea5d9c),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5ed663=this['editor'],_0x5c4abe=_0x5ed663['commands']['get']('importWord'),_0x3c99a1=_0x5ed663['plugins']['get'](it);_0x5c4abe&&(_0x5c4abe['on']('execute',(_0xdca866,[,_0x2be4ea])=>{_0x2be4ea['collaboration_features']={'comments':!0x0,'user_id':_0x3c99a1['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5c4abe,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x43c9e0,_0xa448e8){const {comment_threads:_0x8bd518}=_0xa448e8;_0x8bd518&&_0x8bd518['forEach'](({thread_id:_0x56ebda,comments:_0x148902,is_resolved:_0x448b23})=>{const _0x5224e1=new Date(),_0x35658d=_0x148902['map'](({author:_0x3e3dd6,content:_0xf22877,created_at:_0x48f81f})=>({'content':_0xf22877,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x5224e1,'attributes':{'@external':{'authorName':_0x3e3dd6,'createdAt':_0x48f81f?new Date(_0x48f81f):new Date(),'source':'importWord'}}})),_0x477b23=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x477b23,'threadId':_0x56ebda,'comments':_0x35658d,'resolvedAt':_0x448b23?_0x5224e1:null});});}}class at extends _0x3e8287{constructor(_0x266d03){super(_0x266d03),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0xfe2b30=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xfe2b30,'contentInsertion',(_0x42acdd,_0x5aab2b)=>this['_removeMarkersWithoutThreads'](_0x5aab2b['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2dda12){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2dda12;const _0x39f2a0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5906ff of _0x2dda12['keys']()){const [_0x2e1edc,_0x205149]=_0x5906ff['split'](':');'comment'!=_0x2e1edc||_0x39f2a0['hasCommentThread'](_0x205149)||_0x2dda12['delete'](_0x5906ff);}return _0x2dda12;}['_registerMarkerInClipboardPipeline'](){const _0x3e2226=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xa54dfd=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xa54dfd&&_0x3e2226['_registerMarkerToCopy']('comment',_0xa54dfd);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x5d6b3b){switch(_0x5d6b3b){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x3e8287{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2ff74f,_0x3d8900)=>{if(!_0x3d8900['options']['showCommentHighlights'])return null;if(_0x3d8900['options']['ignoreResolvedComments']){const {id:_0xf19c7b}=er(_0x2ff74f['markerName']),_0x260244=this['editor']['plugins']['get'](o);if(_0x260244['getCommentThread'](_0xf19c7b)?.['isResolved']&&_0x2ff74f['item'])return _0x3d8900['consumable']['consume'](_0x2ff74f['item'],'addMarker:'+_0x2ff74f['markerName']),_0x3d8900['consumable']['consume'](_0x2ff74f['item'],'removeMarker:'+_0x2ff74f['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x22f851=>{_0x22f851['on']('addMarker:comment',(_0xd1f9ed,_0x5e8ea8,_0x55169c)=>{if(!_0x55169c['options']['showCommentHighlights'])return;const _0xb6e292=_0x5e8ea8['item'];if(!_0xb6e292)return;const _0x477eba=_0x55169c['mapper']['toViewElement'](_0xb6e292);this['editor']['model']['schema']['isObject'](_0xb6e292)&&_0x477eba&&!_0x477eba['getCustomProperty']('widget')&&_0x477eba['is']('containerElement')&&_0xb56482(_0x477eba,_0x55169c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x38f26b,{writer:_0x2359d2,options:_0xab0d9d})=>{if(!_0xab0d9d['showCommentHighlights'])return null;const _0x45e3df=_0x2359d2['createContainerElement']('div'),_0xb309ac=_0x2359d2['createEmptyElement']('hr');return _0x2359d2['addClass']('ck-horizontal-line',_0x45e3df),_0x2359d2['insert'](_0x2359d2['createPositionAt'](_0x45e3df,0x0),_0xb309ac),_0x45e3df;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x42fb65,{writer:_0x90ac91,options:_0x50ed3f})=>{if(!_0x50ed3f['showCommentHighlights'])return null;const _0x3a892f=_0x90ac91['createContainerElement']('span'),_0x4197eb=_0x90ac91['createEmptyElement']('img');return _0x90ac91['addClass']('image-inline',_0x3a892f),_0x90ac91['insert'](_0x90ac91['createPositionAt'](_0x3a892f,0x0),_0x4197eb),_0x3a892f;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x36e561,{writer:_0x549f1c,options:_0x53281a})=>{if(_0x53281a['showCommentHighlights'])return _0x549f1c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5edbdb,_0x1c1f32,_0x4c2015)=>{_0x4c2015['options']['showCommentHighlights']&&_0x5edbdb['stop']();},{'priority':'high'});}}class r extends _0x3e8287{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x336115){super(_0x336115),this['set']('isThreadsLoadingPaused',!0x0),_0x336115['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5cbff3,_0x5930e7,_0x110d50,_0x162280)=>{const _0x72cafc=_0x336115['plugins']['get'](o),_0x12e98c=_0x110d50?er(_0x110d50)['id']:null;_0x336115['model']['change'](()=>{if(_0x12e98c){const _0x3aa6d2=this['getAllMarkersForId'](_0x12e98c);for(const _0x40eab9 of _0x3aa6d2)_0x336115['editing']['reconvertMarker'](_0x40eab9);}if(_0x162280){const {id:_0x42b71e}=er(_0x162280),_0x1adf7a=_0x72cafc['getCommentThread'](_0x42b71e);if(_0x1adf7a&&_0x1adf7a['unlinkedAt'])return;if(_0x1adf7a&&!_0x1adf7a['isAttached'])return;const _0x57ca8b=this['getAllMarkersForId'](_0x42b71e);for(const _0x27ce30 of _0x57ca8b)_0x336115['editing']['reconvertMarker'](_0x27ce30);}}),_0x12e98c&&this['scrollToThreadMarker'](_0x12e98c);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x42f13a=this['editor'],_0x59c335=_0x42f13a['plugins']['get'](o),_0x123154=_0x42f13a['config']['get']('collaboration.channelId'),_0x25f6af=_0x59c335['getCommentThreads']()['filter'](_0x384c6d=>_0x384c6d['channelId']!==_0x123154);_0x42f13a['commands']['add']('addCommentThread',new J(_0x42f13a)),this['listenTo'](_0x42f13a,'change:isReadOnly',(_0x2fb544,_0x3b4c64,_0x5c6f71)=>{_0x59c335['switchReadOnly'](_0x5c6f71,_0x42f13a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x59c335,ft('addCommentThread',_0x123154),(_0x3dcc2a,{threadId:_0x5341d6})=>{const _0x335eff=this['editor']['plugins']['get'](o)['getCommentThread'](_0x5341d6);_0x335eff?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5341d6);}),this['listenTo'](_0x59c335,ft('removeCommentThread',_0x123154),(_0x1b0292,{threadId:_0x4cc0da})=>{_0x42f13a['model']['enqueueChange']({'isUndoable':!0x1},_0x44b1e4=>{const _0x1cb47e=this['getAllMarkersForId'](_0x4cc0da);for(const _0x211640 of _0x1cb47e)_0x44b1e4['removeMarker'](_0x211640);});}),this['listenTo'](_0x59c335,ft('resolveCommentThread',_0x123154),(_0x5a117a,{threadId:_0x3ee658})=>{(this['_reconvertMarkers'](_0x3ee658),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x3ee658)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x59c335,ft('reopenCommentThread',_0x123154),(_0x5c090c,{threadId:_0x244238})=>{this['_reconvertMarkers'](_0x244238);},{'priority':'low'}),this['listenTo'](_0x59c335,ft('addComment',_0x123154),(_0x5bd4e5,{threadId:_0x3b4581,isFromAdapter:_0x7eb7a2})=>{const _0x1bf727=this['getAllMarkersForId'](_0x3b4581);if(_0x7eb7a2||0x0==_0x1bf727['length']||!_0x59c335['hasCommentThread'](_0x3b4581))return;0x1===_0x59c335['getCommentThread'](_0x3b4581)['length']&&_0x42f13a['model']['enqueueChange']({'isUndoable':!0x1},_0x4a749b=>{for(const _0x4df141 of _0x1bf727)_0x4a749b['updateMarker'](_0x4df141,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x25f6af);}['afterInit'](){!async function(_0x2c0163){const _0x3eaeb5=_0x26a695([0x73,0x33,0x43,0x74,0x70,0x76,0x30,0x4c,0x6d,0x6c,0x57,0x5a,0x32,0x7a,0x47,0x31,0x68,0x65,0x71,0x4d,0x41,0x53,0x59,0x38,0x55,0x37,0x61,0x51,0x45,0x6e,0x77,0x64,0x79,0x4e,0x44,0x52,0x78,0x6f,0x56,0x66,0x69,0x48,0x4a,0x46,0x75,0x72,0x35,0x67,0x39,0x54,0x4b,0x50,0x42,0x34,0x6a,0x36,0x63,0x58,0x6b,0x4f,0x62,0x49]),_0x3ec87d=0x15fe099a,_0x378e80=0x15f96e3a^_0x3ec87d,_0x2a1311=window[_0x26a695([0x44,0x61,0x74,0x65])][_0x26a695([0x6e,0x6f,0x77])](),_0x4a757f=_0x2c0163[_0x26a695([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x38b3d1=new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d8614=>{_0x4a757f[_0x26a695([0x6f,0x6e,0x63,0x65])](_0x26a695([0x72,0x65,0x61,0x64,0x79]),_0x5d8614);}),_0x264c35={[_0x26a695([0x6b,0x74,0x79])]:_0x26a695([0x45,0x43]),[_0x26a695([0x75,0x73,0x65])]:_0x26a695([0x73,0x69,0x67]),[_0x26a695([0x63,0x72,0x76])]:_0x26a695([0x50,0x2d,0x32,0x35,0x36]),[_0x26a695([0x78])]:_0x26a695([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]),[_0x26a695([0x79])]:_0x26a695([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]),[_0x26a695([0x61,0x6c,0x67])]:_0x26a695([0x45,0x53,0x32,0x35,0x36])},_0x5131a2=_0x4a757f[_0x26a695([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x26a695([0x67,0x65,0x74])](_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2f4dda(){let _0x18d1a9,_0x3d421c=null,_0x106bae=null;try{if(_0x5131a2==_0x26a695([0x47,0x50,0x4c]))return _0x26a695([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x18d1a9=_0x29342a(),!_0x18d1a9)return _0x26a695([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x18d1a9[_0x26a695([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x106bae=_0xb38a32(_0x18d1a9[_0x26a695([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x18d1a9[_0x26a695([0x6a,0x74,0x69])])),await _0x37e772()?_0x1b9ed1()?_0x56ceea()?_0x26a695([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x51138a()?(_0x18d1a9[_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26a695([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3d421c=_0x484068(_0x26a695([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x18d1a9[_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26a695([0x74,0x72,0x69,0x61,0x6c])&&(_0x3d421c=_0x484068(_0x26a695([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x16fbd6()):_0x26a695([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x26a695([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x26a695([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4435ef){return _0x26a695([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x56ceea(){const _0x315d72=[_0x26a695([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x26a695([0x74,0x72,0x69,0x61,0x6c])][_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18d1a9[_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2a1311/0x3e8:0xe10*_0x378e80;return _0x18d1a9[_0x26a695([0x65,0x78,0x70])]<_0x315d72;}function _0x1b9ed1(){const _0x5902e6=_0x18d1a9[_0x26a695([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5902e6)return!0x1;if(_0x5902e6[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26a695([0x2a])))return!0x0;if(_0x5902e6[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26a695([0x43,0x4d,0x54])))return!0x0;if(_0x5902e6[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26a695([0x52,0x43,0x4d,0x54]))){if(_0x5a4435())return!0x0;if(_0x1bb868()||_0x1de12d())return!0x0;}return!0x1;}function _0x51138a(){const _0x30dd35=_0x18d1a9[_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x30dd35||0x0==_0x30dd35[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x473c3a}=new URL(window[_0x26a695([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x30dd35[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x473c3a))return!0x0;const _0x169203=_0x473c3a[_0x26a695([0x73,0x70,0x6c,0x69,0x74])](_0x26a695([0x2e]));return _0x30dd35[_0x26a695([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d98e4=>_0x2d98e4[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26a695([0x2a])))[_0x26a695([0x6d,0x61,0x70])](_0x436b1d=>_0x436b1d[_0x26a695([0x73,0x70,0x6c,0x69,0x74])](_0x26a695([0x2e])))[_0x26a695([0x73,0x6f,0x6d,0x65])](_0x3218fc=>_0x169203[_0x26a695([0x65,0x76,0x65,0x72,0x79])]((_0x2264fa,_0x347741)=>_0x3218fc[_0x347741]===_0x2264fa||_0x3218fc[_0x347741]===_0x26a695([0x2a])));}function _0x16fbd6(){return _0x3d421c&&_0x106bae?new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x396ab2,_0x398cbb)=>{_0x3d421c[_0x26a695([0x74,0x68,0x65,0x6e])](_0x396ab2,_0x398cbb),_0x106bae[_0x26a695([0x74,0x68,0x65,0x6e])](_0x533f94=>{_0x533f94!=_0x26a695([0x56,0x61,0x6c,0x69,0x64])&&_0x396ab2(_0x533f94);},_0x398cbb);}):_0x3d421c||_0x106bae||_0x26a695([0x56,0x61,0x6c,0x69,0x64]);}}function _0xb38a32(_0x470bcb,_0x58e39c){return new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x437f9e=>{if(_0x9b4d1e())return _0x437f9e(_0x26a695([0x56,0x61,0x6c,0x69,0x64]));_0x3d5b92(),_0x4a757f[_0x26a695([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x26a695([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2128a1=!0x1;const _0x402fa6=_0x23944b();function _0x1ff37e(_0x3bc401){return!!_0x3bc401&&(typeof _0x3bc401===_0x26a695([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3bc401===_0x26a695([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3bc401[_0x26a695([0x74,0x68,0x65,0x6e])]===_0x26a695([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3bc401[_0x26a695([0x63,0x61,0x74,0x63,0x68])]===_0x26a695([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x6afb4c(_0x27c5e5){_0x40ce43(_0x27c5e5)[_0x26a695([0x74,0x68,0x65,0x6e])](_0x3f4cc9=>{if(!_0x3f4cc9||_0x3f4cc9[_0x26a695([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x26a695([0x6f,0x6b]))return _0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x53dc81(_0x10ba43(_0x402fa6+_0x58e39c))!=_0x3f4cc9[_0x26a695([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x26a695([0x56,0x61,0x6c,0x69,0x64]);})[_0x26a695([0x74,0x68,0x65,0x6e])](_0x2c37f7=>(_0xd67601(),_0x2c37f7),()=>{const _0x5f0cc6=_0xda1bff();return null==_0x5f0cc6?(_0xd67601(),_0x26a695([0x56,0x61,0x6c,0x69,0x64])):_0x26a695(_0x2a1311-_0x5f0cc6>(0x31f28d9a^_0x3ec87d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x26a695([0x74,0x68,0x65,0x6e])](_0x437f9e)[_0x26a695([0x63,0x61,0x74,0x63,0x68])](()=>{_0x437f9e(_0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5e453f=0x15c8e71a^_0x3ec87d;function _0xd67601(){const _0x2f48df=_0x26a695([0x6c,0x6c,0x63,0x74,0x2d])+_0x53dc81(_0x10ba43(_0x470bcb)),_0x2a6631=_0x23011a(_0x53dc81(window[_0x26a695([0x4d,0x61,0x74,0x68])][_0x26a695([0x63,0x65,0x69,0x6c])](_0x2a1311/_0x5e453f)));window[_0x26a695([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26a695([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f48df,_0x2a6631);}function _0xda1bff(){const _0x3e1f29=_0x26a695([0x6c,0x6c,0x63,0x74,0x2d])+_0x53dc81(_0x10ba43(_0x470bcb)),_0x75208d=window[_0x26a695([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26a695([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3e1f29);return _0x75208d?window[_0x26a695([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23011a(_0x75208d),0x10)*_0x5e453f:null;}function _0x40ce43(_0x37e703){return new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3b8f93,_0xbd6770)=>{_0x37e703[_0x26a695([0x74,0x68,0x65,0x6e])](_0x3b8f93,_0xbd6770),window[_0x26a695([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xbd6770,0x15ffdd5a^_0x3ec87d);});}}_0x4a757f[_0x26a695([0x6f,0x6e])](_0x26a695([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x153c31,_0x59bfb4)=>{if(_0x59bfb4[0x0]!=_0x470bcb)return _0x437f9e(_0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x59bfb4[0x1]={..._0x59bfb4[0x1],[_0x26a695([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x402fa6};},{[_0x26a695([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26a695([0x68,0x69,0x67,0x68])}),_0x4a757f[_0x26a695([0x6f,0x6e])](_0x26a695([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2478ee=>{_0x1ff37e(_0x2478ee[_0x26a695([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2128a1=!0x0,_0x6afb4c(_0x2478ee[_0x26a695([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x26a695([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26a695([0x6c,0x6f,0x77])}),_0x38b3d1[_0x26a695([0x74,0x68,0x65,0x6e])](()=>{_0x2128a1||_0x437f9e(_0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x9b4d1e(){return _0x4a757f[_0x26a695([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26a695([0x76,0x69,0x65,0x77])][_0x26a695([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x26a695([0x61,0x75,0x74,0x6f]);}function _0x3d5b92(){_0x4a757f[_0x26a695([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26a695([0x76,0x69,0x65,0x77])][_0x26a695([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x26a695([0x61,0x75,0x74,0x6f]);}}function _0x484068(_0x12f4cb){const _0x2e11fb=[new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x417d66=>setTimeout(_0x417d66,0x15f73756^_0x3ec87d)),_0x38b3d1[_0x26a695([0x74,0x68,0x65,0x6e])](()=>new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40de53=>{let _0x540308=0x0;_0x4a757f[_0x26a695([0x6d,0x6f,0x64,0x65,0x6c])][_0x26a695([0x6f,0x6e])](_0x26a695([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5b6053,_0x2bf88f)=>{_0x2bf88f[0x0][_0x26a695([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x540308++,_0x540308==(0x15fe0862^_0x3ec87d)&&(_0x40de53(),_0x5b6053[_0x26a695([0x6f,0x66,0x66])]());});}))];return window[_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x26a695([0x72,0x61,0x63,0x65])](_0x2e11fb)[_0x26a695([0x74,0x68,0x65,0x6e])](()=>_0x12f4cb);}async function _0x33f397(){await _0x38b3d1,_0x4a757f[_0x26a695([0x6d,0x6f,0x64,0x65,0x6c])][_0x26a695([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x9cbc13,_0x4a757f[_0x26a695([0x6d,0x6f,0x64,0x65,0x6c])][_0x26a695([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x9cbc13,_0x4a757f[_0x26a695([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x26a695([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5a4435(){return _0x4ec926(_0x26a695([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5e899(_0x26a695([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x26a695([0x73,0x74,0x61,0x74,0x65])]==_0x26a695([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1bb868(){return _0x4ec926(_0x26a695([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 _0x1de12d(){return _0x4ec926(_0x26a695([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xa8c08a(_0x935a91){const _0x29f1fe=_0x526ea3();_0x4a757f[_0x29f1fe]=_0x26a695([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x935a91,_0x935a91!=_0x26a695([0x56,0x61,0x6c,0x69,0x64])&&_0x33f397();}function _0x526ea3(){const _0x58bd75=window[_0x26a695([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x26a695([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x26a695([0x6e,0x6f,0x77])]())[_0x26a695([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x26a695([0x2e]),'');let _0x11b063=_0x26a695([0x73]);for(let _0x55d390=0x0;_0x55d390<_0x58bd75[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x55d390+=0x2){let _0x155c14=window[_0x26a695([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58bd75[_0x26a695([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x55d390,_0x55d390+0x2));_0x155c14>=_0x3eaeb5[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x155c14-=_0x3eaeb5[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x11b063+=_0x3eaeb5[_0x155c14];}return _0x11b063;}function _0x29342a(){const _0x2e6440=_0x5131a2[_0x26a695([0x73,0x70,0x6c,0x69,0x74])](_0x26a695([0x2e]));if(0x3!=_0x2e6440[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3efac7(_0x2e6440[0x1]);function _0x3efac7(_0x40ba00){const _0x121945=_0x2f00b4(_0x40ba00);return _0x121945&&_0x37d61c()?_0x121945:null;function _0x37d61c(){const _0x521237=_0x121945[_0x26a695([0x6a,0x74,0x69])],_0x355d34=window[_0x26a695([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x521237[_0x26a695([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x521237[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5dd78b={..._0x121945,[_0x26a695([0x6a,0x74,0x69])]:_0x521237[_0x26a695([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x521237[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5dd78b[_0x26a695([0x76,0x63])],_0x10ba43(_0x5dd78b)==_0x355d34;}}}async function _0x37e772(){let _0x4284cf=!0x0;try{const _0x550b4a=_0x5131a2[_0x26a695([0x73,0x70,0x6c,0x69,0x74])](_0x26a695([0x2e])),[_0x4e6c4a,_0x36a3f7,_0x7ac50b]=_0x550b4a;return _0x25a6e4(_0x4e6c4a),await _0x69a009(_0x4e6c4a,_0x36a3f7,_0x7ac50b),_0x4284cf;}catch(_0x34b693){return!0x1;}function _0x25a6e4(_0x9b97ef){const _0x4835c1=_0x2f00b4(_0x9b97ef);_0x4835c1&&_0x4835c1[_0x26a695([0x61,0x6c,0x67])]==_0x26a695([0x45,0x53,0x32,0x35,0x36])||(_0x4284cf=!0x1);}async function _0x69a009(_0x4d58ca,_0xaa4635,_0x201ec3){const _0x5d5b72=window[_0x26a695([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x26a695([0x66,0x72,0x6f,0x6d])](_0x29d48f(_0x201ec3),_0x2ac804=>_0x2ac804[_0x26a695([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3b03e3=new window[(_0x26a695([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x26a695([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4d58ca+_0x26a695([0x2e])+_0xaa4635),_0xc2c809=window[_0x26a695([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x26a695([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc2c809)return;const _0x1e7e3e=await _0xc2c809[_0x26a695([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x26a695([0x6a,0x77,0x6b]),_0x264c35,{[_0x26a695([0x6e,0x61,0x6d,0x65])]:_0x26a695([0x45,0x43,0x44,0x53,0x41]),[_0x26a695([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x26a695([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x26a695([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc2c809[_0x26a695([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x26a695([0x6e,0x61,0x6d,0x65])]:_0x26a695([0x45,0x43,0x44,0x53,0x41]),[_0x26a695([0x68,0x61,0x73,0x68])]:{[_0x26a695([0x6e,0x61,0x6d,0x65])]:_0x26a695([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1e7e3e,_0x5d5b72,_0x3b03e3)||(_0x4284cf=!0x1);}}function _0x2f00b4(_0x517911){return _0x517911[_0x26a695([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x26a695([0x65,0x79]))?JSON[_0x26a695([0x70,0x61,0x72,0x73,0x65])](_0x29d48f(_0x517911)):null;}function _0x29d48f(_0x362eef){return window[_0x26a695([0x61,0x74,0x6f,0x62])](_0x362eef[_0x26a695([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x26a695([0x2b]))[_0x26a695([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x26a695([0x2f])));}function _0x10ba43(_0x92de7c){let _0x5dc984=0x1505;function _0x54059e(_0x52568c){for(let _0x4d5ec5=0x0;_0x4d5ec5<_0x52568c[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d5ec5++){const _0x4ecaf8=_0x52568c[_0x26a695([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d5ec5);_0x5dc984=(_0x5dc984<<0x5)+_0x5dc984+_0x4ecaf8,_0x5dc984&=_0x5dc984;}}function _0x23c561(_0x94f634){Array[_0x26a695([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x94f634)?_0x94f634[_0x26a695([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x23c561):_0x94f634&&typeof _0x94f634==_0x26a695([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x26a695([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x94f634)[_0x26a695([0x73,0x6f,0x72,0x74])]()[_0x26a695([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x34e9b6,_0xcd2280])=>{_0x54059e(_0x34e9b6),_0x23c561(_0xcd2280);}):_0x54059e(window[_0x26a695([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x94f634));}return _0x23c561(_0x92de7c),_0x5dc984>>>0x0;}function _0x53dc81(_0x5a4ed){return _0x5a4ed[_0x26a695([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x26a695([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x26a695([0x30]));}function _0x23011a(_0x35515a){return _0x35515a[_0x26a695([0x73,0x70,0x6c,0x69,0x74])]('')[_0x26a695([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x26a695([0x6a,0x6f,0x69,0x6e])]('');}function _0x4ec926(_0x1fe683){return _0x4a757f[_0x26a695([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x26a695([0x68,0x61,0x73])](_0x1fe683);}function _0x5e899(_0x5c7ded){return _0x4a757f[_0x26a695([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x26a695([0x67,0x65,0x74])](_0x5c7ded);}function _0x9cbc13(){}function _0x26a695(_0x4e709a){return _0x4e709a['map'](_0x117d2c=>String['fromCharCode'](_0x117d2c))['join']('');}_0xa8c08a(await _0x2f4dda());}(this);}['destroy'](){const _0xbeebe0=this['editor']['plugins']['get'](o),_0x360744=this['editor']['config']['get']('collaboration.channelId');for(const _0x254424 of _0xbeebe0['getCommentThreads']({'channelId':_0x360744}))_0xbeebe0['_detachCommentThread'](_0x254424['id']),_0xbeebe0['_threads']['delete'](_0x254424['id']);super['destroy']();}['hasMarkerForId'](_0x18d0bc){return this['getAllMarkersForId'](_0x18d0bc)['length']>0x0;}['getAllMarkersForId'](_0xf05cd0){const _0x1bb556=[];for(const _0x460a77 of this['editor']['model']['markers'])_0x460a77['name']['startsWith']('comment:'+_0xf05cd0)&&_0x1bb556['push'](_0x460a77);return _0x1bb556;}['scrollToThreadMarker'](_0x43da4e){const _0x7e7958=this['_getTargetForId'](_0x43da4e);_0x7e7958&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x43da4e&&rt({'target':_0x7e7958[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x38d5a9){this['editor']['model']['change'](()=>{for(const _0x27cbbd of this['getAllMarkersForId'](_0x38d5a9))this['editor']['editing']['reconvertMarker'](_0x27cbbd);});}['_attachArchivedThread'](_0x10d630){const _0x3fcb5a=this['editor']['plugins']['get'](o),_0x54a7a0=this['editor']['plugins']['get'](P),_0x259d7a=_0x3fcb5a['getCommentThread'](_0x10d630);if(!_0x259d7a['isAttached']){const _0x2918e2=_0x259d7a['attachTo'](()=>this['_getTargetForId'](_0x259d7a['id']));_0x54a7a0['registerAnnotation'](_0x2918e2),_0x259d7a['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x57b8ca=this['editor'],_0x9edd11=_0x57b8ca['plugins']['get'](it);_0x57b8ca['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3905c3,_0x159e6d)=>{const {id:_0x181410}=er(_0x3905c3['markerName']),_0x5752b8=_0x57b8ca['plugins']['get'](o)['getCommentThread'](_0x181410),_0x18f80c=this['activeMarker']&&er(this['activeMarker'])['id']===_0x181410;let _0x2af2b6;if(_0x5752b8&&_0x5752b8['isResolved']&&!_0x18f80c&&_0x3905c3['item'])return _0x159e6d['consumable']['consume'](_0x3905c3['item'],'addMarker:'+_0x3905c3['markerName']),_0x159e6d['consumable']['consume'](_0x3905c3['item'],'removeMarker:'+_0x3905c3['markerName']),null;const _0x275d0e=['ck-comment-marker'];return _0x18f80c&&_0x275d0e['push']('ck-comment-marker--active'),_0x2af2b6=_0x5752b8?.['length']?_0x5752b8['comments']['first']['author']['id']:_0x9edd11['me']['id'],{'classes':_0x275d0e,'attributes':{'data-comment':_0x181410,'data-author-id':_0x2af2b6}};}}),_0x57b8ca['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x196d98,{options:_0x17b185})=>{if(_0x17b185['showCommentHighlights'])return null;const _0x40df45=_0x57b8ca['plugins']['get'](o),_0x51bd8a=_0x57b8ca['model']['markers']['get'](_0x196d98),{id:_0x2bdc89,part:_0x3c4db5}=er(_0x196d98);return _0x51bd8a&&!_0x51bd8a['affectsData']||_0x17b185['ignoreResolvedComments']&&_0x40df45['getCommentThread'](_0x2bdc89)?.['isResolved']?null:{'group':'comment','name':_0x3c4db5?_0x2bdc89+':'+_0x3c4db5:_0x2bdc89};}}),_0x57b8ca['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5b8a54,{writer:_0xb3110d})=>_0xb3110d['createElement']('$marker',{'data-name':'comment:'+_0x5b8a54['getAttribute']('id')})}),_0x57b8ca['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2a3ec9=this['editor'],_0x3d3701=_0x2a3ec9['plugins']['get'](o),_0x3e594c=new Set(),_0x3998ac=new Set();_0x2a3ec9['model']['document']['registerPostFixer'](_0x2f7ac1=>{let _0x555da1=!0x1;for(const {name:_0x3036cc,data:_0x145c5b}of _0x2a3ec9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x43668c,id:_0x525e41}=er(_0x3036cc);let _0x31fd3f=_0x145c5b['newRange'];if('comment'!==_0x43668c||!_0x31fd3f)continue;const _0x52d610='$graveyard'===_0x31fd3f['root']['rootName'];_0x52d610||(_0x31fd3f=dt(_0x31fd3f,_0x2a3ec9['model']),!_0x31fd3f||_0x31fd3f['isCollapsed']||!_0x145c5b['newRange']||_0x31fd3f['isEqual'](_0x145c5b['newRange']))?_0x2a3ec9['model']['hasContent'](_0x31fd3f)&&!_0x52d610?this['isThreadsLoadingPaused']?_0x3e594c['add'](_0x3036cc):this['_handleThreadMarker'](_0x3036cc,_0x525e41):(_0x3998ac['add'](_0x3036cc),_0x3e594c['delete'](_0x3036cc),_0x2f7ac1['removeMarker'](_0x3036cc),_0x555da1=!0x0):(_0x2f7ac1['updateMarker'](_0x3036cc,{'range':_0x31fd3f}),_0x555da1=!0x0);}return _0x555da1;}),this['on']('change:isThreadsLoadingPaused',(_0xc335a8,_0xc2e55d,_0x205e4c)=>{if(!_0x205e4c&&_0x3e594c['size'])for(const _0x3d8ed4 of _0x3e594c){const {id:_0x57933d}=er(_0x3d8ed4);_0x3e594c['delete'](_0x3d8ed4),_0x2a3ec9['model']['markers']['get'](_0x3d8ed4)&&this['_handleThreadMarker'](_0x3d8ed4,_0x57933d);}}),this['listenTo'](_0x2a3ec9['model']['document'],'change',()=>{for(const {name:_0xe8c4dd,data:{newRange:_0x4100f4}}of _0x2a3ec9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d64c0,id:_0x12370d}=er(_0xe8c4dd);if('comment'!==_0x3d64c0)continue;const _0x9d0bfa=_0x3d3701['getCommentThread'](_0x12370d),_0x3d7e62=this['hasMarkerForId'](_0x12370d);_0x9d0bfa&&(!_0x9d0bfa['_hasTargetInContent']&&_0x4100f4&&_0x2a3ec9['editing']['view']['once']('render',()=>{const _0x866e09=_0x2a3ec9['plugins']['get'](O),_0x54276e=_0x3d3701['_threadToController']['get'](_0x9d0bfa)['view'];_0x866e09['getByInnerView'](_0x54276e)['refreshVisibility']();},{'priority':'low'}),_0x9d0bfa['_hasTargetInContent']=_0x3d7e62||!!_0x4100f4),_0x4100f4||(_0x3998ac['add'](_0xe8c4dd),_0x3e594c['delete'](_0xe8c4dd));}for(const _0x328d87 of _0x3998ac){const {id:_0x53b181}=er(_0x328d87),_0x195d5b=_0x3d3701['getCommentThread'](_0x53b181);if(_0x3e594c['delete'](_0x328d87),!_0x195d5b)continue;const _0xc9fdb0=this['hasMarkerForId'](_0x53b181);_0xc9fdb0||_0x195d5b['isSubmitted']?_0xc9fdb0||_0x195d5b['unlinkedAt']||_0x195d5b['setUnlinkedAt'](new Date()):_0x195d5b['remove']();}_0x3998ac['clear']();});}['_handleInitialThreads'](_0x3358f1){_0x3358f1['forEach'](_0x4f00db=>{_0x4f00db['unlinkedAt']&&this['_attachArchivedThread'](_0x4f00db['id']);});}['_getTargetForId'](_0xe05ce2){const _0x490591=this['editor'],_0x22c0a7=this['getAllMarkersForId'](_0xe05ce2);return et(_0x490591['editing'],_0x22c0a7);}['_getTextContext'](_0x44942e){const _0x29ef3d=this['getAllMarkersForId'](_0x44942e);let _0x78d7f8='',_0x50b626=!0x1;for(const _0x30619a of _0x29ef3d){const _0x334685=_0x30619a['getRange']();for(const _0x302257 of Array['from'](_0x334685['getItems']()))_0x302257['is']('$textProxy')?(_0x78d7f8&&_0x50b626&&(_0x78d7f8+='\x20',_0x50b626=!0x1),_0x78d7f8+=_0x302257['data']):_0x50b626=!0x0;_0x50b626=!0x0;}return _0x78d7f8['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x9387bf,_0x2aeeec){const _0x53d33b=this['editor'],_0x30f75b=_0x53d33b['plugins']['get'](o);let _0x293fe0=_0x30f75b['getCommentThread'](_0x2aeeec);const _0x5d151b=_0x53d33b['config']['get']('collaboration.channelId'),_0x2f2623=_0x53d33b['plugins']['get'](P);if(_0x293fe0&&(_0x293fe0['unlinkedAt']&&_0x293fe0['setUnlinkedAt'](null),_0x293fe0['isAttached']))return _0x293fe0;return!this['getAllMarkersForId'](_0x2aeeec)[0x0]['managedUsingOperations']?_0x53d33b['editing']['view']['once']('render',()=>{if(_0x30f75b['getCommentThread'](_0x2aeeec))return;const _0x2d4718=_0x53d33b['plugins']['get'](O);_0x293fe0=_0x30f75b['openNewCommentThread']({'channelId':_0x5d151b,'threadId':_0x2aeeec,'target':()=>this['_getTargetForId'](_0x2aeeec),'context':{'type':'text','value':this['_getTextContext'](_0x2aeeec)}});const _0x39f82a=_0x30f75b['_threadToController']['get'](_0x293fe0)['view'],_0x1ff068=_0x2d4718['getByInnerView'](_0x39f82a);_0x1ff068&&_0x2f2623['registerAnnotation'](_0x1ff068);},{'priority':'low'}):_0x30f75b['fetchCommentThread']({'channelId':_0x5d151b,'threadId':_0x2aeeec})['then'](_0x123798=>{if('destroyed'!==_0x53d33b['state']){if(_0x293fe0=_0x123798,_0x293fe0&&!_0x293fe0['isAttached']){const _0x1d7e14=_0x293fe0['attachTo'](()=>this['_getTargetForId'](_0x2aeeec));_0x2f2623['registerAnnotation'](_0x1d7e14),_0x293fe0['isResolved']&&this['_reconvertMarkers'](_0x2aeeec);}else{if(!_0x293fe0){const _0x22ef93=this['getAllMarkersForId'](_0x2aeeec);_0x53d33b['model']['change'](_0x23c0a7=>{for(const _0x4865a2 of _0x22ef93)_0x23c0a7['removeMarker'](_0x4865a2);});}}}}),_0x293fe0;}['_handleThreadMarker'](_0x3dbca3,_0x288b68){const _0x497193=this['_attachMarkerToThread'](_0x3dbca3,_0x288b68);_0x497193&&!_0x497193['context']&&_0x497193['setContext']({'type':'text','value':this['_getTextContext'](_0x288b68)});}['_initAriaMarkerChangeAnnouncements'](){const _0x42aeac=this['editor'];ot(_0x42aeac['model'],({left:_0x16b00d,entered:_0x47c2d0})=>{for(const _0x576950 of _0x16b00d)if(mt(_0x576950)){_0x42aeac['ui']['ariaLiveAnnouncer']['announce'](E(_0x42aeac['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1bac8f of _0x47c2d0)if(mt(_0x1bac8f)){_0x42aeac['ui']['ariaLiveAnnouncer']['announce'](E(_0x42aeac['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x4c3cf2)));break;}});}}function ft(_0x512560,_0xe3deed){return _0xe3deed?_0x512560+':'+_0xe3deed:_0x512560;}function er(_0x3b3aee){const _0x2882df=_0x3b3aee['split'](':');return{'group':_0x2882df[0x0],'id':_0x2882df[0x1],'part':_0x2882df[0x2]};}function dt(_0x5e0e9b,_0x38bde0){const _0x3b7e70=_0x38bde0['schema'],_0x514e45=_0x38bde0['createRange'](_0x5e0e9b['start']);for(const _0x1ad5ec of _0x5e0e9b['getWalker']()){const {type:_0x10449d,item:_0x2823dc,nextPosition:_0x4ba2a9}=_0x1ad5ec;if('text'===_0x10449d||_0x3b7e70['isObject'](_0x2823dc)){const _0x383bd7=_0x38bde0['createPositionBefore'](_0x2823dc);_0x514e45['isCollapsed']&&(_0x514e45['start']=_0x383bd7),_0x514e45['end']=_0x4ba2a9;}}return _0x514e45;}function mt(_0x2dd2f4){return'comment'===er(_0x2dd2f4['name'])['group'];}class i extends _0x3e8287{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x5ad7e3=this['editor'],_0x39596b=_0x5ad7e3['plugins']['get'](o),_0x4c43b6=_0x5ad7e3['plugins']['get'](r),_0x3b5d8a=_0x5ad7e3['plugins']['get'](O),_0x5be196=_0x5ad7e3['plugins']['get'](P);_0x5ad7e3['ui']['componentFactory']['add']('comment',()=>{const _0x5f3c39=this['_createUIButton'](_0x25ab89);return _0x5f3c39['tooltip']=!0x0,_0x5f3c39;}),_0x5ad7e3['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x508e0d)),_0x5be196['addSourceCollector'](()=>{const _0x402a70=[];for(const [_0xc7f6cb,_0x4e5705]of _0x39596b['_threadToController']){const _0x1fe599=_0x4c43b6['getAllMarkersForId'](_0xc7f6cb['id']),_0x4ea2e4=_0x1fe599['map'](_0x4d6455=>_0x4d6455['getRange']());_0x1fe599['length']>0x0&&_0x402a70['push']([_0x4e5705['view'],_0x4ea2e4]);}return _0x402a70;}),this['listenTo'](_0x3b5d8a,'change:activeAnnotations',(_0x540afb,_0x3f578e,_0x18bd7e)=>{const _0x4fb5bb=Array['from'](_0x18bd7e)['map'](_0x5ccb1e=>_0x5ccb1e['innerView'])['find'](_0x3e604c=>_0x39596b['_viewToController']['has'](_0x3e604c));if(!_0x4fb5bb)return void(_0x4c43b6['activeMarker']=null);const _0x5275fa=_0x39596b['_viewToController']['get'](_0x4fb5bb)['model']['id'],_0x292b1a='comment:'+_0x5275fa;_0x5275fa&&_0x4c43b6['hasMarkerForId'](_0x5275fa)?_0x4c43b6['activeMarker']=_0x292b1a:_0x4c43b6['activeMarker']&&(_0x4c43b6['activeMarker']=null);}),this['listenTo'](_0x39596b,'removeCommentThread',(_0x32481a,{threadId:_0x4345bb,isFromAdapter:_0x2661c0})=>{!_0x2661c0&&_0x5ad7e3['ui']['focusTracker']['isFocused']&&_0x4c43b6['hasMarkerForId'](_0x4345bb)&&_0x5ad7e3['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x39596b,'addComment',(_0x1b071e,{threadId:_0x34f388,isFromAdapter:_0x4f646e})=>{if(_0x4f646e||!_0x4c43b6['hasMarkerForId'](_0x34f388)||!_0x39596b['hasCommentThread'](_0x34f388))return;0x1===_0x39596b['getCommentThread'](_0x34f388)['length']&&(_0x5ad7e3['editing']['view']['focus'](),_0x1b071e['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x23488e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x354f19;for(const _0x351922 in _0x23488e){const _0x3cecef=_0x351922,_0x4f1ec3=_0x23488e[_0x3cecef];if('commentsLicenseKeyValid'==_0x4f1ec3||'commentsLicenseKeyInvalid'==_0x4f1ec3||'commentsLicenseKeyExpired'==_0x4f1ec3||'commentsLicenseKeyDomainLimit'==_0x4f1ec3||'commentsLicenseKeyNotAllowed'==_0x4f1ec3||'commentsLicenseKeyEvaluationLimit'==_0x4f1ec3||'commentsLicenseKeyTrialLimit'==_0x4f1ec3||'commentsLicenseKeyUsageLimit'==_0x4f1ec3){delete _0x23488e[_0x3cecef],_0x354f19=_0x4f1ec3,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x354f19&&_0x23488e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x354f19&&_0x23488e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x354f19&&_0x23488e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x354f19&&_0x23488e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x354f19&&_0x23488e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x354f19&&_0x23488e['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x354f19&&_0x23488e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x422a5a){const _0x43fd50=this['editor'],_0x31d996=new _0x422a5a(_0x43fd50['locale']),_0x205bcd=_0x43fd50['commands']['get']('addCommentThread');return _0x31d996['set']({'label':E(_0x43fd50['locale'],'Comment'),'icon':_0x35c54a}),_0x31d996['bind']('isEnabled')['to'](_0x205bcd),this['listenTo'](_0x31d996,'execute',()=>{_0x205bcd['execute']();}),_0x31d996;}}class s extends _0x3e8287{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x16929c){super(_0x16929c),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2ac349,_0x5702ee,_0x43aca7)=>{_0x43aca7?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x12bce5,_0x10b6ff]of this['editor']['commands'])_0x10b6ff['affectsData']&&'addCommentThread'!==_0x12bce5&&_0x10b6ff['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 _0x5641ad=this['editor']['editing']['view']['document'];this['listenTo'](_0x5641ad,'cut',_0x240659=>_0x240659['stop'](),{'priority':'highest'}),this['listenTo'](_0x5641ad,'clipboardInput',_0x3a17ad=>_0x3a17ad['stop'](),{'priority':'highest'}),this['listenTo'](_0x5641ad,'delete',_0x41bd9d=>_0x41bd9d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4442fb,_0x1f66cf]of this['editor']['commands'])_0x1f66cf['affectsData']&&'addCommentThread'!==_0x4442fb&&_0x1f66cf['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 M extends _0x149248{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x573616){super(_0x573616),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x59c579=this['context']['plugins']['get'](O);this['listenTo'](_0x59c579,'_activateAnnotation',(_0x55ead6,_0x8a1246)=>{for(const _0x520558 of this['activeUIs']){const _0x151b19=this['_uis']['get'](_0x520558);(0x0,this['uisData']['get'](_0x520558)['filter'])(_0x8a1246)&&_0x151b19['setActiveAnnotation'](_0x8a1246);}}),this['listenTo'](_0x59c579,'_deactivateAllAnnotations',()=>{for(const _0x5035c7 of this['activeUIs']){this['_uis']['get'](_0x5035c7)['setActiveAnnotation'](null);}}),this['listenTo'](_0x59c579['_visibleAnnotations'],'add',(_0x4f987d,_0x25ce99)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x25ce99);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1c536f){return this['activeUIs']['has'](_0x1c536f);}['activate'](_0x833c33,_0x2fd706=this['defaultFilter']){const _0x1a5100=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x833c33))throw new _0x302412('annotationsuis-missing-ui',this,{'uiName':_0x833c33});this['isActive'](_0x833c33)&&this['deactivate'](_0x833c33),this['activeUIs']['add'](_0x833c33);const _0x516821=new _();!function({source:_0x36d9c5,target:_0x1c830e,filter:_0x4506ce}){for(const _0x17ddf0 of _0x36d9c5)_0x4506ce(_0x17ddf0)&&_0x1c830e['add'](_0x17ddf0);_0x1c830e['listenTo'](_0x36d9c5,'add',(_0x5a5ad3,_0x2bb261)=>{_0x4506ce(_0x2bb261)&&_0x1c830e['add'](_0x2bb261);}),_0x1c830e['listenTo'](_0x36d9c5,'remove',(_0x60c910,_0x2df722)=>{_0x1c830e['has'](_0x2df722)&&_0x1c830e['remove'](_0x2df722);});}({'source':_0x1a5100['_visibleAnnotations'],'target':_0x516821,'filter':_0x2fd706}),this['uisData']['set'](_0x833c33,{'collection':_0x516821,'filter':_0x2fd706});const _0x571bb2=this['_uis']['get'](_0x833c33);_0x571bb2['attach'](_0x516821),this['listenTo'](_0x571bb2,'change:activeAnnotation',(_0x3f42a5,_0x4912c7,_0x1d156c,_0x341a28)=>{_0x341a28&&_0x1a5100['_removeActiveAnnotation'](_0x341a28),_0x1d156c&&_0x1a5100['_addActiveAnnotation'](_0x1d156c);});}['deactivate'](_0x2f580d){if(this['activeUIs']['delete'](_0x2f580d),!this['_uis']['has'](_0x2f580d))throw new _0x302412('annotationsuis-missing-ui',this,{'uiName':_0x2f580d});const _0x24060f=this['_uis']['get'](_0x2f580d);_0x24060f['detach'](),this['stopListening'](_0x24060f),this['uisData']['get'](_0x2f580d)['collection']['destroy'](),this['uisData']['delete'](_0x2f580d);}['switchTo'](_0x59d745){if(!this['_uis']['has'](_0x59d745))throw new _0x302412('annotationsuis-missing-ui',this,{'uiName':_0x59d745});const _0x3223a6=this['context']['plugins']['get'](O),_0x47df0e=Array['from'](_0x3223a6['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x59d745);const _0x12f34a=this['_uis']['get'](_0x59d745);_0x12f34a['setActiveAnnotation'](_0x47df0e),_0x12f34a['_setSelectedAnnotations']&&_0x47df0e&&_0x12f34a['_setSelectedAnnotations']([_0x47df0e]);}['deactivateAll'](){for(const _0x24f26e of this['activeUIs'])this['deactivate'](_0x24f26e);}['register'](_0x476fdd,_0x20bb51){if(this['_uis']['has'](_0x476fdd))throw new _0x302412('annotationsuis-register-already-registered');if('function'!=typeof _0x20bb51['attach']||'function'!=typeof _0x20bb51['detach']||'function'!=typeof _0x20bb51['setActiveAnnotation'])throw new _0x302412('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x476fdd,_0x20bb51);}['refilterAnnotations'](){const _0xce10c8=this['context']['plugins']['get'](O)['collection'],_0x54389d=new Map(),_0x3b4255=Array['from'](this['activeUIs']);for(const _0x5152e1 of this['activeUIs']){const _0x4c06f4=this['uisData']['get'](_0x5152e1)['collection'];for(const _0x32c5a8 of _0x4c06f4)_0x54389d['set'](_0x32c5a8,_0x5152e1);}for(const _0x12c39f of _0xce10c8){const _0xe288c5=_0x54389d['get'](_0x12c39f);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x12c39f);const _0x5e93c7=_0x3b4255['find'](_0x6f91f7=>this['uisData']['get'](_0x6f91f7)['filter'](_0x12c39f));_0xe288c5!==_0x5e93c7&&(_0xe288c5&&this['uisData']['get'](_0xe288c5)['collection']['remove'](_0x12c39f),_0x5e93c7&&this['uisData']['get'](_0x5e93c7)['collection']['add'](_0x12c39f));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x146c97){const _0xf3c181=[];for(const _0x51caf6 of this['activeUIs']){(0x0,this['uisData']['get'](_0x51caf6)['filter'])(_0x146c97)&&_0xf3c181['push'](_0x51caf6);}if(_0xf3c181['length']>0x1)throw new _0x302412('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xf3c181,'annotationType':_0x146c97['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x510efe){super(_0x510efe);const _0x4feecc=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 _0x6d2edc(),this['focusCycler']=new _0x5bcd58({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4feecc['to']('class')],'style':{'minHeight':_0x4feecc['to']('minHeight',_0x4493b2=>'number'==typeof _0x4493b2?pi(_0x4493b2+0xa):null)},'dir':_0x510efe['uiLanguageDirection'],'role':'application','aria-label':E(_0x510efe,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x510efe,'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',_0x54bbb5=>{this['_updateItemPositionInFocusables'](_0x54bbb5['source']);}),this['list']['forEach'](_0x4451e5=>{this['focusTracker']['add'](_0x4451e5['element']),this['_updateItemPositionInFocusables'](_0x4451e5);}),this['list']['on']('change',(_0x19cce3,_0x9b161d)=>{for(const _0x2525ab of _0x9b161d['removed'])this['focusTracker']['remove'](_0x2525ab['element']),this['focusables']['remove'](_0x2525ab);for(const _0x1243e9 of _0x9b161d['added'])this['focusTracker']['add'](_0x1243e9['element']),this['_updateItemPositionInFocusables'](_0x1243e9);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4ceed4){const _0x4ecfc4=this['focusables']['getIndex'](_0x4ceed4);let _0x7d18e1,_0x1d90f7;for(const _0x17ff35 of this['focusables'])if(_0x4ceed4['top']<_0x17ff35['top']){_0x7d18e1=_0x17ff35;break;}if(_0x1d90f7=_0x7d18e1?this['focusables']['getIndex'](_0x7d18e1):this['focusables']['length'],-0x1!==_0x4ecfc4){if(_0x4ecfc4===_0x1d90f7-0x1)return;this['focusables']['remove'](_0x4ceed4),_0x1d90f7=_0x7d18e1?this['focusables']['getIndex'](_0x7d18e1):this['focusables']['length'];}this['focusables']['add'](_0x4ceed4,_0x1d90f7);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x10b94d){super(_0x10b94d),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x56b144,_0x4f3e3c)=>_0x56b144+_0x4f3e3c),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3ed338=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3ed338['to']('isAnimationDisabled',_0x5f2f1a=>_0x5f2f1a?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3ed338['to']('top',_0x322970=>Ht(_0x322970))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x36845e=this['element']['clientHeight'];_0x36845e&&(this['height']=_0x36845e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x149248{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4bf7df){super(_0x4bf7df),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 _0x157db1=this['context']['config']['get']('sidebar.container');_0x157db1&&this['setContainer'](_0x157db1);}['setContainer'](_0x4e4fd8){if(!y(_0x4e4fd8))throw new _0x302412('sidebar-setcontainer-invalid-element');this['container']=_0x4e4fd8;}['_attachToContainer']({viewClass:_0x4d2624='',spaceBetweenItems:_0x53940f=0x19}={}){if(!y(this['container']))throw new _0x302412('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4d2624,this['_spaceBetweenItems']=_0x53940f;}['rearrange']({removedAnnotation:_0x5c62cf,previousAnnotation:_0x2dee24,nextAnnotation:_0x2fea40}){const _0x164552=this['getSidebarItemView'](_0x5c62cf);this['view']['list']['remove'](_0x164552),this['_destroySidebarItemView'](_0x5c62cf),_0x2dee24&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2dee24)),_0x2fea40&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2fea40)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9f0322,activatedAnnotation:_0x54f327,disableAnimationOnActivatedAnnotation:_0x449b78}){if(this['_activeAnnotation']=_0x54f327,_0x9f0322){_0x9f0322['isActive']=!0x1;const _0xa3e40b=this['getSidebarItemView'](_0x9f0322);_0xa3e40b&&_0x449b78&&(_0xa3e40b['isAnimationDisabled']=!0x1);}if(_0x54f327){const _0x4ea387=this['getSidebarItemView'](_0x54f327);_0x4ea387&&(_0x54f327['isActive']=!0x0,_0x449b78&&(_0x4ea387['isAnimationDisabled']=!0x0,_0x4ea387['top']+=0x1),this['_alignToTargetRect'](_0x4ea387));}}['_detachFromContainer'](_0x16941d){if(this['view']['element']['remove'](),_0x16941d){for(const _0x2437ac of _0x16941d)this['_destroySidebarItemView'](_0x2437ac);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5aba46,_0x307a27){_0x307a27||(_0x307a27=_0x5aba46['view']);const _0x4684e4=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4684e4,_0x5aba46),this['_annotationToSidebarItemView']['set'](_0x5aba46,_0x4684e4),_0x4684e4['content']['add'](_0x307a27),this['listenTo'](_0x5aba46['view'],'change:targetRect',(_0x38c5f4,_0x554931,_0x31bbd4)=>{const _0x465fb0=this['_getTargetTop'](_0x5aba46,_0x31bbd4);_0x4684e4['_targetTop']!=_0x465fb0&&(_0x4684e4['_targetTop']=_0x465fb0,this['_setItemTop'](_0x4684e4,_0x465fb0));}),this['listenTo'](_0x4684e4,'change:top',()=>{this['_recalculate'](_0x4684e4,'top');}),this['listenTo'](_0x4684e4,'change:bottom',()=>{this['_recalculate'](_0x4684e4,'bottom');}),this['_alignToTargetRect'](_0x4684e4);const _0x1b7a15=this['_getItemBefore'](_0x4684e4);if(_0x1b7a15)this['_alignAfterItem'](_0x1b7a15,_0x4684e4)||this['_alignToTargetRect'](_0x4684e4);else this['_alignToTargetRect'](_0x4684e4);return this['_updateLastItem'](),this['view']['list']['add'](_0x4684e4),_0x4684e4;}['_alignForTopChange'](_0x20e4e4){if(!_0x20e4e4['content']['length'])return;const _0xaa409e=this['_getItemBefore'](_0x20e4e4);if(!_0xaa409e)return;const _0x297c53=this['_sidebarItemViewToAnnotation']['get'](_0xaa409e),_0x128411=this['_activeAnnotation'];_0x128411&&_0x128411===_0x297c53?this['_alignAfterItem'](_0xaa409e,_0x20e4e4):this['_alignBeforeItem'](_0x20e4e4,_0xaa409e);}['_alignForBottomChange'](_0x29ae6f){if(!_0x29ae6f['content']['length'])return;const _0x246ddf=this['_getItemAfter'](_0x29ae6f);if(!_0x246ddf)return;const _0x38074d=this['_sidebarItemViewToAnnotation']['get'](_0x246ddf),_0x31c048=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2cfc39=this['_activeAnnotation'];_0x2cfc39&&_0x2cfc39===_0x38074d&&_0x31c048?(this['_alignBeforeItem'](_0x246ddf,_0x29ae6f),this['_alignAfterItem'](_0x29ae6f,_0x246ddf)):_0x2cfc39&&_0x2cfc39===_0x38074d?this['_alignBeforeItem'](_0x246ddf,_0x29ae6f):this['_alignAfterItem'](_0x29ae6f,_0x246ddf);}['_recalculate'](_0x623bc4,_0x49e46a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x153a8f,changedProp:_0x4aa785}of this['_recalculateBuffer'])'top'===_0x4aa785?this['_alignForTopChange'](_0x153a8f):this['_alignForBottomChange'](_0x153a8f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x623bc4,'changedProp':_0x49e46a});}['getSidebarItemView'](_0x3e2be2){return this['_annotationToSidebarItemView']['get'](_0x3e2be2);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5350d0){const _0x9fd86=this['getSidebarItemView'](_0x5350d0);this['stopListening'](_0x9fd86),this['stopListening'](_0x5350d0['view']),_0x9fd86['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5350d0),this['_sidebarItemViewToAnnotation']['delete'](_0x9fd86);}['_createSidebarView'](){const _0x58ed28=new F(this['context']['locale']);return _0x58ed28['render'](),this['on']('change:_lastItem',(_0x35d975,_0x599413,_0x38c3a8,_0xe6e16d)=>{_0xe6e16d&&_0x58ed28['unbind']('minHeight'),_0x38c3a8?_0x58ed28['bind']('minHeight')['to'](_0x38c3a8,'bottom'):_0x58ed28['minHeight']=null;}),_0x58ed28;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2a9a4d){const _0x4014a4=this['_sidebarItemViewToAnnotation']['get'](_0x2a9a4d),_0x10b32a=_0x4014a4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4014a4)-0x1);return _0x10b32a&&this['getSidebarItemView'](_0x10b32a)||null;}['_getItemAfter'](_0x53c018){const _0x3a78af=this['_sidebarItemViewToAnnotation']['get'](_0x53c018),_0x43b17a=_0x3a78af&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3a78af)+0x1);return _0x43b17a&&this['getSidebarItemView'](_0x43b17a)||null;}['_alignBeforeItem'](_0x4376f9,_0x396757){_0x4376f9['updateHeight']();const _0x448179=R(_0x396757['bottom']+this['_spaceBetweenItems'],_0x4376f9['top']);return!!_0x448179&&(this['_setItemTop'](_0x396757,_0x396757['top']-_0x448179),!0x0);}['_alignAfterItem'](_0x549c5e,_0x10f9cc){_0x549c5e['updateHeight']();const _0x288cc7=R(_0x549c5e['bottom']+this['_spaceBetweenItems'],_0x10f9cc['top']);return!!_0x288cc7&&(this['_setItemTop'](_0x10f9cc,_0x10f9cc['top']+_0x288cc7,!0x1),!0x0);}['_alignToTargetRect'](_0x8edda0){const _0x54779f=this['_sidebarItemViewToAnnotation']['get'](_0x8edda0);if(!_0x54779f||!_0x54779f['target']||!_0x54779f['targetRect'])return;const _0x4290ba=this['_getTargetTop'](_0x54779f,_0x54779f['targetRect']);this['_setItemTop'](_0x8edda0,_0x4290ba);}['_getTargetTop'](_0x4ee171,_0x422179){if(null===_0x422179)return 0x0;if(_0x4ee171['target']instanceof _0x197d1d)return _0x422179['top'];{const _0x1006c8=new _0x197d1d(this['view']['element'])['top'];return _0x422179['top']-_0x1006c8;}}['_setItemTop'](_0xdbb244,_0x31aa27,_0x573549=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x573549&&(_0x31aa27=Math['max'](_0x31aa27,this['_getMaxAvailableTop'](_0xdbb244))),_0xdbb244['top']=_0x31aa27;}['_getMaxAvailableTop'](_0x440c84){let _0x52bd8c=this['_getItemBefore'](_0x440c84),_0x50ab10=0x0;for(;_0x52bd8c;)_0x52bd8c['updateHeight'](),_0x50ab10+=this['_spaceBetweenItems']+_0x52bd8c['height'],_0x52bd8c=this['_getItemBefore'](_0x52bd8c);return _0x50ab10;}}function R(_0x512a72,_0x41a3de){return Math['max'](_0x512a72-_0x41a3de,0x0);}function y(_0x153e95){return null!==_0x153e95&&'object'==typeof _0x153e95&&0x1===_0x153e95['nodeType'];}class e extends _0x149248{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x373d41){super(_0x373d41),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1b6511(),this['_refreshPositioningDebounced']=_0x3058e3(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4f408d=this['context']['plugins']['get'](M),_0x41da63=this['context']['plugins']['get'](z);_0x4f408d['register']('wideSidebar',this),_0x41da63['container']&&_0x4f408d['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x714bce){if(_0x714bce===this['activeAnnotation'])return;const _0x473bab=this['context']['plugins']['get'](z);_0x473bab['_activeAnnotation']=_0x714bce;const _0x4f60f3=this['activeAnnotation'];_0x473bab['refresh']({'blurredAnnotation':_0x4f60f3,'activatedAnnotation':_0x714bce}),this['activeAnnotation']=_0x714bce;}['attach'](_0x3c7dd0){this['annotations']=_0x3c7dd0;const _0x525237=this['context']['plugins']['get'](z);if(_0x525237['_annotations']=_0x3c7dd0,this['isAttached'])throw new _0x302412('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x525237,'set:container',()=>{this['detach'](),this['listenTo'](_0x525237,'change:container',_0x297118=>{_0x297118['off'](),this['attach'](_0x3c7dd0);});}),_0x525237['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x545500=_0x23fd5e=>{_0x23fd5e['updateTargetRect'](),_0x525237['addAnnotation'](_0x23fd5e);};for(const _0x4986b3 of _0x3c7dd0)_0x545500(_0x4986b3);this['listenTo'](_0x3c7dd0,'add',(_0x9c9077,_0x3d04ef)=>{_0x545500(_0x3d04ef);}),this['listenTo'](_0x3c7dd0,'remove',(_0x355ced,_0x4b05d8,_0x4c9049)=>{_0x525237['rearrange']({'removedAnnotation':_0x4b05d8,'previousAnnotation':_0x3c7dd0['get'](_0x4c9049-0x1),'nextAnnotation':_0x3c7dd0['get'](_0x4c9049+0x1)}),_0x4b05d8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3c7dd0,'focus',(_0x54a03c,_0x50b82c)=>{this['setActiveAnnotation'](_0x50b82c);}),this['listenTo'](_0x3c7dd0,'blur',()=>{this['setActiveAnnotation'](null);});const _0xdee116=this['context']instanceof _0x5735ba?this['context']['editors']:new _0x1b6511([this['context']]);for(const _0x6f5611 of _0xdee116)this['_integrateWithEditorAnnotations'](_0x6f5611);this['listenTo'](_0xdee116,'add',(_0x2669a3,_0x449708)=>{this['listenTo'](_0x449708,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x449708);});}),this['listenTo'](_0xdee116,'remove',(_0x5356cb,_0x2687a1)=>{_0x2687a1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2687a1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x302412('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x31b7ec=this['context']['plugins']['get'](z);_0x31b7ec['_detachFromContainer'](this['annotations']),this['stopListening'](_0x31b7ec),this['stopListening'](this['annotations']),this['context']instanceof _0x5735ba&&this['stopListening'](this['context']['editors']);for(const _0x566878 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x566878);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1474c2){if(!_0x1474c2['plugins']['has']('EditorAnnotations'))return;const _0x5b0eb5=_0x1474c2['plugins']['get']('EditorAnnotations'),_0x4401fe=()=>{const _0x129c22=_0x5b0eb5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x129c22[0x0]||null);};this['listenTo'](_0x5b0eb5,'refresh',_0x4401fe),this['listenTo'](_0x5b0eb5,'blur',(_0x493507,{isAnnotationTracked:_0x203901})=>{this['activeAnnotation']&&_0x203901(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5b0eb5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x595d06=>{_0x5b0eb5['hasDomSelection']()&&(_0x4401fe(),_0x595d06['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5b0eb5);}['_destroyEditorAnnotationsIntegration'](_0x5adc17){this['stopListening'](_0x5adc17),this['_editorAnnotations']['remove'](_0x5adc17);}}class C extends _0x25ab89{['counterView'];constructor(_0x58ee10){super(_0x58ee10);const _0x36e5a7=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x44579e,_0x50e383)=>_0x44579e?'...':_0x50e383['toString']()),this['set']('annotationType',''),this['icon']=_0x35c54a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x36e5a7['to']('annotationType',_0x1027c1=>'ck-annotation-counter__badge--'+_0x1027c1),_0x36e5a7['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x36e5a7['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x149248{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53b45c){super(_0x53b45c),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x2c8ffe),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1b6511(),this['_refreshPositioningDebounced']=_0x3058e3(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2901be(this['context']['locale']),this['balloonPanelView']=new _0x3c248a(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x237609){this['annotations']=_0x237609;const _0x412053=this['context']['plugins']['get'](z),_0xa78d59=this['balloonPanelView'];if(_0x412053['_annotations']=_0x237609,this['isAttached'])throw new _0x302412('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x412053,'set:container',()=>{this['detach'](),this['listenTo'](_0x412053,'change:container',_0x25ca95=>{_0x25ca95['off'](),this['attach'](_0x237609);});}),_0x412053['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4cdf4b=_0x48153c=>{const _0x3eddb0=new C(this['context']['locale']);_0x412053['addAnnotation'](_0x48153c,_0x3eddb0),this['_annotationToNarrowView']['set'](_0x48153c,_0x3eddb0),_0x3eddb0['bind']('isDirty','annotationType','number')['to'](_0x48153c['view'],'isDirty','type','length'),_0x3eddb0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xa78d59['content']['first']!==_0x48153c['view']?(this['_showBalloon'](_0x48153c),_0x48153c['view']['element']['focus'](),this['setActiveAnnotation'](_0x48153c)):this['setActiveAnnotation'](null);});};for(const _0x48e7b8 of _0x237609)_0x4cdf4b(_0x48e7b8);this['listenTo'](_0x237609,'add',(_0x319347,_0x15bc6f)=>{_0x4cdf4b(_0x15bc6f);}),this['listenTo'](_0x237609,'remove',(_0x55069e,_0x3d4aba,_0x1c5179)=>{this['_annotationToNarrowView']['get'](_0x3d4aba)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3d4aba),_0x412053['rearrange']({'removedAnnotation':_0x3d4aba,'previousAnnotation':_0x237609['get'](_0x1c5179-0x1),'nextAnnotation':_0x237609['get'](_0x1c5179+0x1)}),_0x3d4aba===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x237609,'focus',(_0x4b4aab,_0x436344)=>{this['setActiveAnnotation'](_0x436344);}),this['listenTo'](_0x237609,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x564dd2,_0x2b9794)=>{_0x2b9794['keyCode']===_0x2cd697['esc']&&_0xa78d59['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xa78d59['content']['first']),this['_hideBalloon'](),_0x2b9794['stopPropagation'](),_0x2b9794['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x590289,_0xa3c16a)=>{const _0x2b2d80=_0xa3c16a['target'];_0xa78d59['isVisible']&&_0xa78d59['element']['contains'](_0x2b2d80)||_0x412053['view']['element']['contains'](_0x2b2d80)||_0x590289['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3cb562=>_0x3cb562['contains'](_0x2b2d80))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x45eb6d=this['context']instanceof _0x5735ba?this['context']['editors']:new _0x1b6511([this['context']]);for(const _0x1a03e0 of _0x45eb6d)this['_integrateWithEditorAnnotations'](_0x1a03e0);this['listenTo'](_0x45eb6d,'add',(_0x5f53de,_0x41140b)=>{this['listenTo'](_0x41140b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41140b);});}),this['listenTo'](_0x45eb6d,'remove',(_0x33ae08,_0xabc9d)=>{_0xabc9d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xabc9d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x433ff5){if(_0x433ff5===this['activeAnnotation'])return;const _0x40b0b1=this['context']['plugins']['get'](z);if(_0x40b0b1['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x433ff5,'disableAnimationOnActivatedAnnotation':!0x0}),_0x433ff5)_0x40b0b1['getSidebarItemView'](_0x433ff5)?this['_showBalloon'](_0x433ff5):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x433ff5;}['detach'](){if(!this['isAttached'])throw new _0x302412('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5bfa1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x30c466=>_0x30c466['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5bfa1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5735ba&&this['stopListening'](this['context']['editors']);for(const _0x292dde of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x292dde);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'](_0xd4a532){if(!_0xd4a532['plugins']['has']('EditorAnnotations'))return;const _0x1bbd44=_0xd4a532['plugins']['get']('EditorAnnotations'),_0x2300b1=this['context']['plugins']['get'](z),_0x46150b=this['annotations'],_0x498793=this['balloonPanelView'],_0x53c7fa=()=>{const _0x11f69f=_0x1bbd44['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x11f69f),this['setActiveAnnotation'](_0x11f69f[0x0]||null);};this['listenTo'](_0x1bbd44,'refresh',_0x53c7fa),this['listenTo'](_0x1bbd44,'blur',(_0x434004,{isAnnotationTracked:_0xa0a6e1})=>{this['activeAnnotation']&&_0xa0a6e1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1bbd44,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x46150b,'blur',_0x17d941=>{_0x1bbd44['hasDomSelection']()&&_0x17d941['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x18e3e2,_0x2b68bf)=>{const _0x418840=_0x2b68bf['target'];_0x498793['isVisible']&&_0x498793['element']['contains'](_0x418840)||_0x2300b1['view']['element']['contains'](_0x418840)||this['activeAnnotation']&&_0x1bbd44['hasDomSelection']()&&(_0x53c7fa(),_0x18e3e2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1bbd44);}['_destroyEditorAnnotationsIntegration'](_0x55404e){_0x55404e&&(this['stopListening'](_0x55404e),this['_editorAnnotations']['remove'](_0x55404e));}['_setSelectedAnnotations'](_0x7f39b6){for(const _0x4449c7 of this['_selectedAnnotations'])_0x7f39b6['includes'](_0x4449c7)||this['_manuallyClosedAnnotationViews']['delete'](_0x4449c7['view']);this['_selectedAnnotations']=_0x7f39b6;}['_refreshPositioning'](){const _0x365847=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x365847['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4fcd7e){if(this['_manuallyClosedAnnotationViews']['has'](_0x4fcd7e['view']))return;const _0x5d4013=this['balloonPanelView']['content']['first'];_0x5d4013!==_0x4fcd7e['view']?(_0x5d4013&&this['_detachListeners'](_0x5d4013),this['_attachListeners'](_0x4fcd7e['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4fcd7e['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x470256=this['balloonPanelView']['content']['first'],_0x375a7b=_0x470256&&this['annotations']['getByView'](_0x470256);if(!_0x375a7b||!this['_annotationToNarrowView']['has'](_0x375a7b))return;const _0x13d1ea=this['_annotationToNarrowView']['get'](_0x375a7b)['element'],_0x30f91f=(function(){const _0x2e02cc=_0x3c248a['defaultPositions'];return[_0x2e02cc['southArrowNorthEast'],_0x2e02cc['northArrowSouthEast'],_0x2e02cc['southArrowNorth'],_0x2e02cc['northArrowSouth'],_0x2e02cc['southArrowNorthWest'],_0x2e02cc['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x13d1ea,'positions':_0x30f91f});}['_hideBalloon'](){const _0x2a2aa3=this['balloonPanelView'],_0x1b4857=_0x2a2aa3['content']['first'];_0x1b4857&&(this['_detachListeners'](_0x1b4857),_0x2a2aa3['unpin'](),_0x2a2aa3['content']['clear']());}['_attachListeners'](_0x59adc6){this['listenTo'](_0x59adc6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x59adc6,'Esc',(_0x3568c0,_0x3ea6dc)=>{this['_manuallyClosedAnnotationViews']['add'](_0x59adc6),this['_hideBalloon'](),_0x3ea6dc();});}['_detachListeners'](_0x67186d){this['stopListening'](_0x67186d);}}class c extends _0x3e8287{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x162d8a,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19f525){super(_0x19f525),_0x19f525['editing']['view']['addObserver'](_0x165613),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x19f525['plugins']['get'](_0x162d8a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3440bb=this['editor']['plugins']['get'](M);_0x3440bb['context']===this['editor']&&(_0x3440bb['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3d3f2c,_0x48fd04)=>{const _0x12a2e5=this['_balloon'];if(this['isAttached']&&_0x12a2e5['visibleView']){const _0x28c4c7=this['annotations']['getByView'](_0x12a2e5['visibleView']);_0x28c4c7&&this['_closeAnnotation'](_0x28c4c7),_0x48fd04();}}));}['afterInit'](){const _0x36edd6=this['editor']['plugins']['get'](M);_0x36edd6['context']===this['editor']&&(_0x36edd6['hasActive']()||_0x36edd6['switchTo']('inline'));}['setActiveAnnotation'](_0x35af45){_0x35af45!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x35af45&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x35af45)&&this['_addAnnotationToBalloon'](_0x35af45,!0x0),_0x35af45['isActive']=!0x0),_0x35af45||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x35af45);}['attach'](_0x5be3df){this['annotations']=_0x5be3df;const _0x27977b=this['editor']['plugins']['get'](M),_0x4da14c=this['_balloon'];if(this['isAttached'])throw new _0x302412('inlineannotations-attach-already-attached',this);if(_0x27977b['context']!==this['editor'])throw new _0x302412('inlineannotations-not-allowed-with-context',this);const _0x525a04=this['editor']['plugins']['get'](P);this['listenTo'](_0x525a04,'refresh',()=>{const _0x57f7dd=_0x525a04['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x298ec4,_0x2cece5;!this['_forceRefresh']&&(_0x298ec4=_0x57f7dd,_0x2cece5=this['_selectedAnnotations'],_0x298ec4['length']===_0x2cece5['length']&&_0x298ec4['every'](_0x5e4500=>_0x2cece5['includes'](_0x5e4500)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x57f7dd),this['setActiveAnnotation'](_0x57f7dd[0x0]||null));}),this['listenTo'](_0x525a04,'blur',(_0x3ac4dc,{isAnnotationTracked:_0x586fac})=>{this['activeAnnotation']&&_0x586fac(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5047c2,_0x4fe154,_0x110627)=>{_0x110627||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5be3df,'remove',(_0x197141,_0x303d6e)=>{this['_removeAnnotationFromBalloon'](_0x303d6e),_0x303d6e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4da14c,'change:visibleView',(_0x3f4f1d,_0x169c01,_0x88f5bc,_0x25bc2d)=>{_0x25bc2d&&this['stopListening'](_0x25bc2d);const _0x229de2=_0x5be3df['getByView'](_0x88f5bc);_0x88f5bc&&_0x229de2&&(this['listenTo'](_0x88f5bc,'change:height',()=>{_0x4da14c['updatePosition']();}),this['listenTo'](_0x88f5bc,'Esc',()=>{this['_closeAnnotation'](_0x229de2),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x229de2&&this['setActiveAnnotation'](_0x229de2));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4da14c['visibleView']&&(_0x5be3df['getByView'](_0x4da14c['visibleView'])&&_0x4da14c['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 _0x302412('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x36e460 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x36e460);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x354adb){for(const _0x58c43f of this['_selectedAnnotations'])_0x354adb['includes'](_0x58c43f)||this['_manuallyClosed']['delete'](_0x58c43f);for(const _0x2171be of this['annotations'])_0x354adb['includes'](_0x2171be)||this['_removeAnnotationFromBalloon'](_0x2171be);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3079c0 of _0x354adb)this['_addAnnotationToBalloon'](_0x3079c0);}this['_selectedAnnotations']=_0x354adb;}['_addAnnotationToBalloon'](_0x51e2bb,_0x3ffc79=!0x1){this['_manuallyClosed']['has'](_0x51e2bb)||(this['_addedAnnotations']['has'](_0x51e2bb)||this['_balloon']['hasView'](_0x51e2bb['view'])||(this['_addedAnnotations']['add'](_0x51e2bb),this['_balloon']['add']({'stackId':_0x51e2bb['view']['id'],'view':_0x51e2bb['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x51e2bb)}})),_0x3ffc79&&this['_balloon']['showStack'](_0x51e2bb['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5382cb){const _0x17e2a2=_0x5382cb['target'],_0xc79ba8=this['editor']['editing']['view'],_0x1729a2=_0xc79ba8['document']['selection']['getFirstRange'](),_0x1ce03d=_0xc79ba8['domConverter']['viewRangeToDom'](_0x1729a2);if(_0x1ce03d['collapse'](!0x0),_0x17e2a2){if(_0x17e2a2 instanceof _0x197d1d)return _0x17e2a2;let _0x18f49a=[];for(const _0x9ec0a8 of _0x17e2a2)_0x18f49a['push'](...(_0x7d0ad1=_0x9ec0a8['getClientRects'](),Array['from'](_0x7d0ad1)['map'](DOMRect['fromRect'])));_0x18f49a=function(_0x5138f7){const _0x2244aa=[];let _0x2eb97b=_0x5138f7[0x0];for(let _0x16626b=0x1;_0x16626b<_0x5138f7['length'];_0x16626b++)B(_0x2eb97b,_0x5138f7[_0x16626b])?_0x2eb97b['width']+=_0x5138f7[_0x16626b]['width']:(_0x2244aa['push'](_0x2eb97b),_0x2eb97b=_0x5138f7[_0x16626b]);return _0x2244aa['push'](_0x2eb97b),_0x2244aa;}(_0x18f49a);const _0x4395aa=_0x1ce03d['getBoundingClientRect']();return _0x18f49a['find'](_0x3e52ec=>_0x3e52ec['top']<=_0x4395aa['top']&&_0x3e52ec['bottom']>=_0x4395aa['bottom']&&_0x3e52ec['left']<=_0x4395aa['left']&&_0x3e52ec['right']>=_0x4395aa['right'])||_0x18f49a[0x0];}var _0x7d0ad1;return _0x5382cb['targetRect']||_0x1ce03d;}['_removeAnnotationFromBalloon'](_0x24a3ed){this['_addedAnnotations']['has'](_0x24a3ed)&&this['_balloon']['hasView'](_0x24a3ed['view'])&&(this['_addedAnnotations']['delete'](_0x24a3ed),this['_balloon']['remove'](_0x24a3ed['view']));}['_closeAnnotation'](_0x59d73d){this['_manuallyClosed']['add'](_0x59d73d),this['_removeAnnotationFromBalloon'](_0x59d73d);}}function B(_0x339d6e,_0x5b8447){return _0x339d6e['top']===_0x5b8447['top']&&_0x339d6e['bottom']===_0x5b8447['bottom']&&_0x339d6e['right']===_0x5b8447['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x43d615,_0x2472ce){super(_0x43d615),this['set']('isEmpty',!_0x2472ce['length']),this['focusTracker']=new _0x6d2edc(),this['_annotationViews']=_0x2472ce,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5bcd58({'focusables':_0x2472ce,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2472ce,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2472ce,'remove',(_0x13172f,_0x570cf7)=>{_0x570cf7['isActive']&&this['focus'](),_0x2472ce['length']||(this['isEmpty']=!0x0);});const _0x359f06=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x43d615,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2472ce},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x359f06['if']('isEmpty','ck-hidden',_0x596718=>!_0x596718)]},'children':[{'text':E(_0x43d615,'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 _0x4c7293 of this['_annotationViews'])this['focusTracker']['add'](_0x4c7293['element']);this['_annotationViews']['on']('change',(_0xd67466,{added:_0xb625c4,removed:_0x222eb})=>{for(const _0x10f913 of _0xb625c4)this['focusTracker']['add'](_0x10f913['element']);for(const _0x5002d6 of _0x222eb)this['focusTracker']['remove'](_0x5002d6['element']);});}}class f extends _0x149248{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x178cbc){super(_0x178cbc),this['archivedThreads']=new _0x1b6511();}['init'](){const _0x1ecd4b=this['context'],_0x3738bf=_0x1ecd4b['plugins']['get'](o),_0x49c0d3=_0x1ecd4b['plugins']['get'](O);this['listenTo'](_0x3738bf,'addCommentThread',(_0x3d6206,{threadId:_0x469256})=>{const _0x45f9f6=_0x3738bf['getCommentThread'](_0x469256);_0x45f9f6['archivedAt']&&this['archivedThreads']['add'](_0x45f9f6,this['_calculatePosition'](_0x45f9f6['archivedAt'])),this['listenTo'](_0x45f9f6,'change:archivedAt',(_0xe33347,_0x2f263d,_0x53792b)=>{_0x53792b?this['archivedThreads']['has'](_0x45f9f6)||this['archivedThreads']['add'](_0x45f9f6,this['_calculatePosition'](_0x45f9f6['archivedAt'])):this['archivedThreads']['has'](_0x45f9f6)&&this['archivedThreads']['remove'](_0x45f9f6);});}),this['listenTo'](_0x3738bf,'removeCommentThread',(_0x35ea30,{threadId:_0x49f08e})=>{const _0xd0972=_0x3738bf['getCommentThread'](_0x49f08e);this['stopListening'](_0xd0972),this['archivedThreads']['has'](_0xd0972)&&this['archivedThreads']['remove'](_0xd0972);},{'priority':'highest'}),this['listenTo'](_0x49c0d3['collection'],'focus',(_0x43e5a4,_0x272f60)=>{_0x272f60['isVisible']||(_0x272f60['isActive']=!0x0,_0x49c0d3['activate'](_0x272f60));});}['_calculatePosition'](_0x426fa7){const _0x5f4975=[...this['archivedThreads']]['findIndex'](_0x3853e2=>_0x3853e2['archivedAt']<_0x426fa7);return _0x5f4975>-0x1?_0x5f4975:this['archivedThreads']['length'];}}class a extends _0x3e8287{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x3727d0];}constructor(_0x54ccfb){super(_0x54ccfb),this['annotationViews']=new _0xea1baf(),this['_pendingThreads']=[];}['init'](){const _0x2dc741=this['editor'],_0x47655a=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2dc741['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x25ab89,!0x0)),_0x2dc741['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x543ee3=this['_createCommentsArchiveButton'](_0x508e0d);return _0x543ee3['set']({'role':'menuitemcheckbox'}),_0x543ee3;});const _0x3d7cab=_0x2dc741['plugins']['get'](f),_0x45fa05=_0x2dc741['plugins']['get']('Annotations'),_0x214720=_0x2dc741['plugins']['get']('CommentsRepository');_0x3d7cab['archivedThreads']['forEach'](_0x24c090=>{this['_handleNewThread'](_0x24c090);}),this['listenTo'](_0x3d7cab['archivedThreads'],'add',(_0xcb3f1c,_0x122e02)=>{this['_handleNewThread'](_0x122e02);}),this['listenTo'](_0x45fa05['collection'],'add',(_0x28fce4,_0x427f1b)=>{const _0x4e7ad4=this['_pendingThreads']['find'](_0x2746a9=>{const _0x3c0928=_0x214720['_threadToController']['get'](_0x2746a9);return _0x3c0928&&_0x427f1b['innerView']===_0x3c0928['view'];});if(_0x4e7ad4){const _0x17cf53=this['_calculatePosition'](_0x4e7ad4['archivedAt']);this['annotationViews']['add'](_0x427f1b['view'],_0x17cf53),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4e7ad4),0x1);}}),this['listenTo'](_0x3d7cab['archivedThreads'],'remove',(_0x4ba0f3,_0x176683)=>{const _0x1619a2=_0x2dc741['config']['get']('collaboration.channelId');if(!_0x1619a2||_0x176683['channelId']===_0x1619a2){if(this['_pendingThreads']['includes'](_0x176683))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x176683),0x1);else{const _0x431d90=_0x214720['_threadToController']['get'](_0x176683),_0x5ea73d=_0x45fa05['getByInnerView'](_0x431d90['view']);this['annotationViews']['remove'](_0x5ea73d['view']),this['stopListening'](_0x5ea73d['focusableElements']);}}}),this['listenTo'](_0x45fa05['collection'],'add',(_0x94c398,_0x3952ed)=>{this['listenTo'](_0x3952ed,'escape',_0x47655a);}),this['listenTo'](_0x45fa05['collection'],'remove',(_0x3ac90d,_0x108646)=>{this['stopListening'](_0x108646,'escape',_0x47655a);});}['_handleNewThread'](_0x543a01){const _0x43a6b4=this['editor']['plugins']['get']('CommentsRepository'),_0x248efc=this['editor']['plugins']['get']('Annotations'),_0xb8eae9=this['editor']['config']['get']('collaboration.channelId');if(!_0xb8eae9||_0x543a01['channelId']===_0xb8eae9){const _0x1d6880=_0x43a6b4['_threadToController']['get'](_0x543a01);if(!_0x1d6880)return void this['_pendingThreads']['push'](_0x543a01);const _0xb1783b=this['_calculatePosition'](_0x543a01['archivedAt']),_0x39b1e9=_0x248efc['getByInnerView'](_0x1d6880['view']);_0x39b1e9['isVisible']&&_0x248efc['_visibleAnnotations']['remove'](_0x39b1e9),this['annotationViews']['add'](_0x39b1e9['view'],_0xb1783b);}}['_calculatePosition'](_0xbe3bbd){const _0x44e32b=this['editor']['config']['get']('collaboration.channelId'),_0x21e4dc=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x16cc25=>_0x16cc25['channelId']===_0x44e32b)['findIndex'](_0x5a30ec=>_0x5a30ec['archivedAt']<_0xbe3bbd);return _0x21e4dc<0x0||_0x21e4dc>this['annotationViews']['length']?this['annotationViews']['length']:_0x21e4dc-0x1;}['_toggleDialog'](){const _0x7eb216=this['editor'],_0xa9ca06=_0x7eb216['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x7eb216['locale'],this['annotationViews'])),'commentsArchive'===_0xa9ca06['id']?_0xa9ca06['hide']():_0xa9ca06['show']({'id':'commentsArchive','title':E(_0x7eb216['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1dd5ca,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1e4b9a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4ae750,_0x50ab35=!0x1){const _0x31b21e=this['editor']['locale'],_0x5ec5c3=this['editor']['plugins']['get']('Dialog'),_0x56585d=new _0x4ae750(_0x31b21e);return _0x56585d['bind']('isEnabled')['to'](this,'isEnabled'),_0x56585d['bind']('isOn')['to'](_0x5ec5c3,'id',_0x1c2930=>'commentsArchive'===_0x1c2930),_0x56585d['set']({'label':E(_0x31b21e,'COMMENTS_ARCHIVE'),'icon':_0x1dd5ca,'isToggleable':!0x0}),_0x50ab35&&(_0x56585d['tooltip']=!0x0),this['listenTo'](_0x56585d,'execute',()=>this['_toggleDialog']()),_0x56585d;}['_hideDialogOnAnnotationEscape']=_0x43cd19=>{const _0x1c8946=_0x43cd19['source'];if(!this['annotationViews']['has'](_0x1c8946['view']))return;const _0x3c773c=this['editor']['plugins']['get']('Dialog');_0x3c773c['isOpen']&&'commentsArchive'===_0x3c773c['id']&&(_0x3c773c['hide'](),_0x43cd19['stop']());};}class p extends _0x3e8287{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x255aae,ContextPlugin as _0x154e47,PendingActions as ht,Command as _0x3de137,Plugin as _0x119370,Context as _0x2e6587}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3fc27f,uid as _0x7543b8,KeystrokeHandler as jt,FocusTracker as _0x4e3bb4,diff as _0xfb03d2,Collection as _0x2cece5,Rect as _0x543406,CKEditorError as _0x202340,first as _0x2e4433,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x3f2877,keyCodes as _0x579ced}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x287cbb,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x5ebfbb,trimHtml as _0x664470,LateFocusDropdownButtonView as _0x11fe4b,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x480ff9}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x569f83}from'es-toolkit/compat';import{IconUndo as _0x4b7ac0,IconCheck as _0x1c3d1d,IconPencil as _0xc02268,IconRemoveComment as _0x1fa94d,IconThreeVerticalDots as _0xdcc610,IconAddComment as _0x286001,IconCommentsArchive as _0x34d309}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x591c72,ButtonView as _0x45b47a,ViewCollection as _0x242a87,createDropdown as _0x344c7d,ListView as _0x8b09,focusChildOnDropdownOpen as _0x33c2c0,ListItemView as _0x573093,MenuBarMenuListItemButtonView as _0x3d3e75,BodyCollection as _0x170ade,BalloonPanelView as _0x3d40f4,ContextualBalloon as _0x337f8d,Dialog as _0x474467,DialogViewPosition as _0x4dc751}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0xc369e3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x1a764c}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x210e46}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3fc27f(){['model'];['view'];constructor(_0x3e3b34,_0x1ff3a5){super(),this['model']=_0x3e3b34,this['model']['_isAttached']=!0x0,this['view']=_0x1ff3a5,this['listenTo'](_0x1ff3a5,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1ff3a5,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1ff3a5,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1ff3a5,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1ff3a5,'addComment',(_0x4b3f89,_0x481e5a)=>this['addComment'](_0x481e5a)),this['listenTo'](_0x1ff3a5,'updateComment',(_0x4e8162,_0x5335c8,_0x11d336)=>this['updateComment'](_0x5335c8,_0x11d336)),this['listenTo'](_0x1ff3a5,'removeComment',(_0x5ce931,_0x53b316)=>this['removeComment'](_0x53b316));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0xb359dd){this['model']['addComment']({'content':_0xb359dd,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3c1be7,_0x941bf9){this['model']['getComment'](_0x3c1be7)['update']({'content':_0x941bf9});}['removeComment'](_0x31540c){this['model']['getComment'](_0x31540c)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x337faf,_0x14b0a8,_0x21a8fb){const t=_0x337faf['t'];switch(_0x14b0a8){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'},_0x21a8fb);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'},_0x21a8fb);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'},_0x21a8fb);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'},_0x21a8fb);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x21a8fb);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'},_0x21a8fb);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'},_0x21a8fb);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'},_0x21a8fb);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 Ut extends Vt{['main'];['editable'];constructor(_0x438ed8,_0x1e50d8){super(_0x438ed8);const _0x53b0b2=_0x7543b8();this['main']=this['createCollection'](),this['editable']=new $t(_0x438ed8,_0x1e50d8,void 0x0,{'label':()=>E(_0x438ed8,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x438ed8['uiLanguageDirection'],'lang':_0x438ed8['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x53b0b2},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Rt{['view'];constructor(_0x27c8da){super(_0x27c8da),this['view']=new Ut(_0x27c8da['locale'],_0x27c8da['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x48bb44=this['editor']['editing']['view'],_0x4f2444=this['view']['editable'],_0x6ac4c3=_0x48bb44['document']['getRoot']();_0x4f2444['name']=_0x6ac4c3['rootName'],this['view']['render']();const _0x132465=_0x4f2444['element'];this['setEditableElement'](_0x4f2444['name'],_0x132465),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x48bb44['attachDomRoot'](_0x132465),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3fc27f(_0x255aae){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x20109a={}){function _0xcf2d80(_0x3ecbfb){return _0x3ecbfb['map'](_0x5503f4=>String['fromCharCode'](_0x5503f4))['join']('');}(_0x20109a=Object['assign']({},_0x20109a))['plugins']||(_0x20109a['plugins']=Qt['defaultPlugins']),super(_0x20109a),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xcf2d80([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xcf2d80([0x76,0x69,0x65,0x77])][_0xcf2d80([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xcf2d80([0x61,0x75,0x74,0x6f]),this[_0xcf2d80([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xcf2d80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xcf2d80([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xcf2d80([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xcf2d80([0x6f,0x6b])});}['create'](){const _0x39b22c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x39b22c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1e2436=>{const _0x440f6a=this['model']['document']['getRoot'](),_0x5f1885=_0x440f6a&&_0x440f6a['getChild'](_0x440f6a['childCount']-0x1);_0x1e2436['setSelection'](_0x5f1885,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x105666=this['editing']['view'],_0x3f6cb4=_0x105666['document']['getRoot'](),_0x595ed1=_0x3f6cb4['getChild'](0x0);_0x3f6cb4['childCount']>0x1||!_0x595ed1||'p'!=_0x595ed1['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x105666,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x595ed1['placeholder']=this['placeholder']),Ft({'view':_0x105666,'element':_0x595ed1,'keepOnFocus':!0x0}),this['placeholderElement']=_0x595ed1);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1dbfba,_0x4c4b81={}){super(_0x1dbfba),this['editor']=null,this['_editorConfig']=_0x4c4b81,this['set']('value',_0x4c4b81['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x1dbfba,'Reply...')),this['set']('submitLabel',E(_0x1dbfba,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4e3bb4(),this['focusCycler']=new _0x591c72({'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',(_0x5c62d9,_0x1b291e)=>{this['cancelButtonView']['fire']('execute'),_0x1b291e();}),this['keystrokes']['set']('Ctrl+Enter',(_0x264ddc,_0x859b31)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x859b31());}),this['on']('submit',(_0x118c71,_0x28b4ab)=>{_0x28b4ab['length']>0xfde8?(alert(E(_0x1dbfba,'TOO_LONG_COMMENT_ALERT',[_0x28b4ab['length'],0xfde8])),_0x118c71['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2cbdf6=this['editor'];this['element']['insertBefore'](_0x2cbdf6['ui']['element'],this['element']['firstChild']),_0x2cbdf6['model']['document']['on']('change',()=>this['value']=_0x2cbdf6['getData']()),_0x2cbdf6['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2cbdf6['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4e97b8){-0x1===_0x4e97b8?(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:_0x532f92}=this,_0x3aeec2=new _0x45b47a(_0x532f92);return _0x3aeec2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3aeec2['withText']=!0x0,_0x3aeec2['bind']('label')['to'](this,'submitLabel'),_0x3aeec2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3aeec2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x25260c,_0x1c4019)=>!_0x1c4019&&!!_0x25260c['trim']()),_0x3aeec2;}['_createCancelButton'](){const {locale:_0x431379}=this,_0x20451a=new _0x45b47a(_0x431379);return _0x20451a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x20451a['label']=E(_0x431379,'Cancel'),_0x20451a['withText']=!0x0,_0x20451a['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x20451a;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x45e914=>{this['focusTracker']['add'](_0x45e914['element']);}),this['focusables']['on']('change',(_0x516329,_0x234bca)=>{for(const _0x272b6f of Array['from'](_0x234bca['added'])['reverse']())this['focusTracker']['add'](_0x272b6f['element']);});}}class ie extends kt{constructor(_0x123705,_0xfb0146,_0x41fd8a){super(_0x123705),this['commentInputView']=new os(_0x123705,_0x41fd8a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x381857,_0x1bf086)=>_0x381857||!!_0x1bf086),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 _0x287cbb(_0x123705,_0xfb0146),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'](_0x709ebd){this['commentInputView']['focus'](_0x709ebd);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x20de09,_0x374c7d)=>{const {submitButtonView:_0x3aeaee,cancelButtonView:_0x3568df,editor:_0x253859}=this['commentInputView'];[_0x3aeaee['element'],_0x3568df['element'],_0x253859?_0x253859['editing']['view']['getDomRoot']():null]['filter'](_0xc2cb63=>_0xc2cb63)['some'](_0x595825=>_0x595825['contains'](_0x374c7d['target']))||(this['focus'](),_0x374c7d['preventDefault']());});}}class cs extends kt{constructor(_0x40a06f){super(_0x40a06f);const _0x5e6220=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5e6220['to']('count',_0x1022c7=>E(_0x40a06f,'NUMBER_OF_COMMENTS',_0x1022c7))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3a79a,_0x4d1447,_0x51e8eb){super(_0x3a79a);const _0x44953e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4d1447['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4d1447,this['_config']=_0x51e8eb,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4e3bb4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591c72({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1dce64=>this['commentViews']['map'](_0x183f33=>_0x183f33['element'])['includes'](_0x1dce64['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x3a79a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x558ed4=>_0x558ed4-this['_config']['maxCommentsWhenCollapsed']);for(const _0x245796 of _0x4d1447['comments'])this['_handleNewCommentModel'](_0x245796);this['_handleInfoComment'](),this['listenTo'](_0x4d1447['comments'],'add',(_0x576243,_0x206093)=>{const _0x30e75a=this['_calculatePosition'](_0x206093);this['length']++,this['_handleNewCommentModel'](_0x206093,_0x30e75a),this['refreshVisibleViews']();}),this['listenTo'](_0x4d1447['comments'],'remove',(_0x1b85d7,_0x3ac764)=>{this['length']--,this['_handleRemoveCommentModel'](_0x3ac764),this['refreshVisibleViews']();}),this['listenTo'](_0x4d1447,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4d1447,'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',_0x44953e['if']('length','ck-hidden',_0xf2d24b=>!_0xf2d24b)],'aria-label':E(_0x3a79a,'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'](_0x47a3ba){-0x1===_0x47a3ba?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4d27c5 of this['commentViews'])_0x4d27c5['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2ca780,_0x31a188){const _0x36177c=new this['_config']['CommentView'](this['locale'],_0x2ca780,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x36177c['viewUid']=_0x2ca780['id'],_0x36177c['delegate']('removeComment')['to'](this),_0x36177c['delegate']('updateComment')['to'](this),_0x36177c['delegate']('resolveCommentThread')['to'](this),_0x36177c['delegate']('editorReady')['to'](this),_0x36177c['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x36177c,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x36177c,_0x31a188);}['_calculatePosition'](_0x5c885d){const _0x5772c2=this['_model']['_findOptimalIndex'](_0x5c885d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5c885d['authoredAt']?_0x5772c2-0x1:_0x5772c2:_0x5772c2-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5a07c0={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x5a07c0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5a07c0));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x4aa6c7){const _0x426e3e=this['commentViews']['remove'](_0x4aa6c7['id']);this['stopListening'](_0x426e3e),_0x426e3e['isEditMode']&&this['_updateHasDirtyComment'](),_0x426e3e['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x30a7fa=>_0x30a7fa['isEditMode']);}['_rearrangeCollapse'](){const _0x49dc96=function(_0x31489d){const _0x21a982=new _0x2cece5();for(const _0x2d8ea9 of _0x31489d)_0x21a982['add'](_0x2d8ea9);return _0x21a982;}(this['commentViews']),_0x5067a9=this['_collapsedCommentsView']['count'];for(let _0x3484c8=0x1;_0x3484c8<=_0x5067a9;_0x3484c8++)_0x49dc96['remove'](0x1);for(const _0x1c05a9 of _0x49dc96)_0x1c05a9['collapse']();_0x5067a9>0x0&&_0x49dc96['add'](this['_collapsedCommentsView'],0x1),ns(_0xfb03d2(Array['from'](this['visibleViews']),Array['from'](_0x49dc96)),this['visibleViews'],_0x49dc96);}['_rearrangeExpand'](){ns(_0xfb03d2(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4612ae of this['visibleViews'])_0x4612ae['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2832ee=>{this['focusTracker']['add'](_0x2832ee['element']),this['keystrokes']['listenTo'](_0x2832ee['element']);}),this['commentViews']['on']('change',(_0x48fe05,_0x2be682)=>{for(const _0x2a1d20 of _0x2be682['removed'])this['focusTracker']['remove'](_0x2a1d20['element']),this['keystrokes']['stopListening'](_0x2a1d20['element']);for(const _0x281c12 of Array['from'](_0x2be682['added'])['reverse']())this['focusTracker']['add'](_0x281c12['element']),this['keystrokes']['listenTo'](_0x281c12['element']);});}}function ns(_0x1d0527,_0x5c2aa9,_0x4e64db){let _0x510019=0x0;for(const _0xe4d75f of _0x1d0527)switch(_0xe4d75f){case'insert':_0x5c2aa9['add'](_0x4e64db['get'](_0x510019),_0x510019),_0x510019++;break;case'delete':_0x5c2aa9['remove'](_0x510019);break;case'equal':_0x510019++;}}class as extends kt{constructor(_0x3886d2){super(_0x3886d2);const _0x1fbedd=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1fbedd['to']('contextValue',_0x478848=>E(_0x3886d2,'THREAD_CONTEXT_LABEL',_0x478848)),'tabindex':-0x1},'children':[{'text':_0x1fbedd['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4f5c0a,_0x5a9c15){super(_0x4f5c0a);const _0x48e991=this['bindTemplate'];this['_model']=_0x5a9c15,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4e3bb4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591c72({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x48461b=>!!_0x48461b),this['bind']('contextValue')['to'](this['_model'],'context',_0x5c20a4=>_0x5c20a4&&_0x5c20a4['value']?this['_trimContextValue'](_0x5c20a4['value']):E(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',_0x48e991['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 _0x138a17=new _0x45b47a(this['locale']);return _0x138a17['label']=E(this['locale'],'Reopen'),_0x138a17['tooltip']=E(this['locale'],'Reopen'),_0x138a17['icon']=_0x4b7ac0,_0x138a17['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3d728c=>!_0x3d728c),_0x138a17['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xa039a7,_0x3373a3)=>_0xa039a7&&_0x3373a3),_0x138a17['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x138a17;}['_trimContextValue'](_0x1ab7b5){if(_0x1ab7b5['length']<0x96)return _0x1ab7b5;const _0x598531=_0x1ab7b5['lastIndexOf']('\x20',0x93);return _0x1ab7b5['substring'](0x0,_0x598531>-0x1?_0x598531:0x93)+'...';}['_attachContextActions'](){const _0x3c46d1=this['element']['querySelector']('.ck-context'),_0x5206de=_0x3c46d1['querySelector']('.ck-context__value');this['listenTo'](_0x3c46d1,'mouseenter',()=>{_0x5206de['offsetWidth']<_0x5206de['scrollWidth']&&_0x3c46d1['classList']['add']('overlay');}),this['listenTo'](_0x3c46d1,'mouseleave',()=>{_0x3c46d1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xcf4c4a of this['focusables'])this['focusTracker']['add'](_0xcf4c4a['element']),this['keystrokes']['listenTo'](_0xcf4c4a['element']);}['_createContextView'](){const _0x1268e3=new as(this['locale']);return _0x1268e3['bind']('contextValue')['to'](this),_0x1268e3;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3fff9c,_0x5f6c86,_0x24cd2f,_0x34ffe3){super(_0x3fff9c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5f6c86,this['_localUser']=_0x24cd2f,this['_config']=_0x34ffe3,this['commentThreadHeaderView']=new Xt(_0x3fff9c,_0x5f6c86),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3fff9c,E(_0x3fff9c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3fff9c,_0x5f6c86,Object['assign']({'CommentView':this['_config']['CommentView']},_0x34ffe3)),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',(_0x2620a2,_0x22b8f3)=>_0x2620a2||!!_0x22b8f3),this['bind']('isUnlinked')['to'](_0x5f6c86,'unlinkedAt',_0x2d87e1=>!!_0x2d87e1),this['bind']('ariaLabel')['to'](this,'length',_0x25191a=>{const _0x39e04c=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x25191a,_0x39e04c]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4e3bb4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591c72({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3fd467=>_0x3fd467['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2710e4=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x177455=_0x2710e4['commentInputView'];return _0x2710e4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x177455,'value',(_0x287334,_0x5ad784,_0x25303b,_0xee75e,_0x534d0e)=>!!_0x534d0e||!!_0xee75e&&_0x25303b&&!_0x5ad784||_0x287334&&_0x25303b&&!_0x5ad784),_0x177455['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x29ebeb,_0x37b0b1,_0x3702e4)=>{let _0x5d9da0;return _0x5d9da0=_0x3702e4&&_0x37b0b1?'Reply\x20to\x20reopen\x20discussion...':_0x29ebeb?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x5d9da0);}),_0x177455['bind']('submitLabel')['to'](this,'length',_0xeae993=>E(this['locale'],_0xeae993?'Reply':'Comment')),_0x177455['on']('submit',(_0x3ff48b,_0x52d6ec)=>{this['fire']('addComment',_0x52d6ec),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x177455['on']('cancel',()=>{this['focus']();}),_0x177455['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x177455['on']('cancel',_0x3ce431=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3ce431['stop']());}),this['on']('change:isActive',(_0x13f39e,_0x31be0a,_0x5c0e36)=>{_0x5c0e36||this['length']||_0x177455['value']||this['fire']('removeCommentThread');}),_0x2710e4;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2bc4d5,_0x198751,_0x7a345d,_0x108b81){super(_0x2bc4d5,_0x198751,_0x7a345d,_0x108b81),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2bc4d5,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x30f7fe,_0x5d14b2,_0x5b4afe)=>{_0x5b4afe||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x59fbc8,_0x43f6c2,_0xe09058)=>{_0xe09058&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0xeadc28=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0xeadc28['if']('isActive','ck-thread--active'),_0xeadc28['if']('isUnlinked','ck-thread--unlinked'),_0xeadc28['if']('isConfirm','ck-thread--remove-confirmation'),_0xeadc28['to']('actionIndicator',_0x31b217=>_0x31b217?'ck-thread--'+_0x31b217:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0xeadc28['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 _0x10497a of this['commentsListView']['commentViews'])_0x10497a['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3de769}=this,_0x26dc7d=this['commentsListView']['commentViews']['get'](0x0);_0x26dc7d===this['_boundFirstCommentView']||_0x26dc7d['isSystemComment']||(this['_boundFirstCommentView']=_0x26dc7d,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x26dc7d,'actionIndicator',_0x13086e=>'remove'===_0x13086e?'remove':null),_0x26dc7d['placeholder']=E(_0x3de769,'Write\x20a\x20comment...'),_0x26dc7d['removeButton']['on']('execute',_0x1ed9dd=>{_0x1ed9dd['stop'](),this['showConfirm'](E(_0x3de769,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x26dc7d['focus']();}),_0x26dc7d['actionBar']['add'](this['resolveButton'],0x0),_0x26dc7d['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xf7a524=new _0x5ebfbb(this['locale']);return _0xf7a524['label']=E(this['locale'],'Resolve'),_0xf7a524['tooltip']=E(this['locale'],'Resolve'),_0xf7a524['icon']=_0x1c3d1d,_0xf7a524['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xf7a524['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x38e453=>!_0x38e453),_0xf7a524['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x16c5a0,_0x3ecf9c)=>_0x16c5a0&&!_0x3ecf9c),_0xf7a524['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xf7a524;}['_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(_0x53b32a){super(_0x53b32a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x261701,_0x3fee2a,_0x400c5b)=>{this['element']['innerHTML']=_0x400c5b;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5ad901,_0x384865,_0x332395){super(_0x5ad901),this['_model']=_0x384865,this['_config']=_0x332395,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x384865,'content',_0x384865,'authoredAt',(_0x3f3040,_0x4d13af)=>E(_0x5ad901,'COMMENT_ARIA_LABEL',[_0x384865['author']['name'],_0x332395['formatDateTime'](_0x4d13af),new DOMParser()['parseFromString'](_0x3f3040,'text/html')['body']['textContent'],_0x384865['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x5ad901,E(_0x5ad901,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x242a87(),this['focusTracker']=new _0x4e3bb4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591c72({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x11c080=>_0x11c080['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x407240=new es(this['locale']);return _0x407240['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x43fc46,_0x3e5767)=>_0x3e5767?_0x664470(_0x43fc46,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x43fc46),_0x407240;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2f23b5=new os(this['locale'],this['_config']['editorConfig']);return _0x2f23b5['value']=this['_model']['content'],_0x2f23b5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2f23b5['submitLabel']=E(this['locale'],'Save'),_0x2f23b5['on']('submit',(_0x1f5763,_0x3d4bcf)=>{this['fire']('updateComment',this['_model']['id'],_0x3d4bcf),this['switchToDisplayMode'](),this['focus']();}),_0x2f23b5['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2f23b5['once']('editorReady',()=>{_0x2f23b5['focus']();}),_0x2f23b5['createEditor'](),_0x2f23b5['delegate']('editorReady')['to'](this),_0x2f23b5['delegate']('editorDestroyed')['to'](this),_0x2f23b5;}['_setupKeyboardNavigation'](){const _0xc93404=this['element'];this['keystrokes']['listenTo'](_0xc93404);for(const _0x41eb65 of this['focusables'])this['focusTracker']['add'](_0x41eb65['element']),this['keystrokes']['listenTo'](_0x41eb65['element']);this['focusables']['on']('change',(_0x1ffe03,_0x573eab)=>{for(const _0x278f0c of _0x573eab['removed'])this['focusTracker']['remove'](_0x278f0c['element']),this['keystrokes']['stopListening'](_0x278f0c['element']);for(const _0xa3b468 of _0x573eab['added'])this['focusTracker']['add'](_0xa3b468['element']),this['keystrokes']['listenTo'](_0xa3b468['element']);}),this['keystrokes']['set']('enter',(_0x19faad,_0x10eda4)=>{_0xc93404===_0x19faad['target']&&(this['focusCycler']['focusFirst'](),_0x10eda4());}),this['keystrokes']['set']('esc',(_0x76f4e7,_0x5da388)=>{_0xc93404!==_0x76f4e7['target']&&(this['focus'](),_0x5da388());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x3a9f13,_0x58618e,_0x2dd832){super(_0x3a9f13,_0x58618e,_0x2dd832),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x3a9f13,'Reply...')),this['bind']('authoredAt')['to'](_0x58618e),this['bind']('resolvedAt')['to'](_0x58618e),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 _0x287cbb(_0x3a9f13,_0x58618e['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x58618e,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x591bdb=this['bindTemplate'],_0x222b14=[{'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':_0x591bdb['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x591bdb['to']('authoredAt',_0x4dc7d6=>this['_config']['formatDateTime'](_0x4dc7d6))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x591bdb['if']('isEditMode','ck-comment__actions--hidden'),_0x591bdb['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']&&_0x222b14['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x591bdb['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x591bdb['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x591bdb['if']('isEditMode','ck-comment--edit'),_0x591bdb['if']('isSystemComment','ck-comment--info'),_0x591bdb['to']('actionIndicator',_0x295f82=>_0x295f82?'ck-comment--'+_0x295f82:'')],'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':_0x222b14}]}]};}['_createEditButton'](){const _0x13f369=new _0x45b47a(this['locale']);return _0x13f369['label']=E(this['locale'],'Edit'),_0x13f369['icon']=_0xc02268,_0x13f369['withText']=!0x0,_0x13f369['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x13f369['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xeb0bd9=>!_0xeb0bd9),_0x13f369['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x13f369['on']('execute',()=>this['switchToEditMode']()),_0x13f369;}['_createRemoveButton'](){const _0x1fce97=new _0x45b47a(this['locale']);return _0x1fce97['label']=E(this['locale'],'Remove'),_0x1fce97['icon']=_0x1fa94d,_0x1fce97['withText']=!0x0,_0x1fce97['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1fce97['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xfdedf9=>!_0xfdedf9),_0x1fce97['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1fce97['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1fce97;}['_createDropdown'](){const _0x7f9f61=_0x344c7d(this['locale'],_0x11fe4b),_0x28af27=_0x7f9f61['panelView']['children'],_0x166a64=new _0x8b09(this['locale']),_0x447908=_0x7f9f61['bindTemplate'];_0x33c2c0(_0x7f9f61,()=>this['items']['find'](_0x5738aa=>_0x5738aa['isVisible'])),_0x7f9f61['extendTemplate']({'attributes':{'class':[_0x447908['if']('isVisible','ck-hidden',_0x18bac6=>!_0x18bac6)]}});const _0x3df285=(_0x22bb8d,_0x29e4c0=-0x1)=>{const _0x3675be=new _0x573093(this['locale']);_0x3675be['children']['add'](_0x22bb8d);const _0x440630=_0x29e4c0>-0x1?_0x29e4c0:_0x166a64['items']['length'];_0x166a64['items']['add'](_0x3675be,_0x440630);const _0x5dfbff=Array['from'](this['items']);_0x7f9f61['unbind']('isEnabled','isVisible'),_0x7f9f61['bind']('isEnabled')['toMany'](_0x5dfbff,'isEnabled',(..._0x164ab6)=>_0x164ab6['some'](_0x1bb6ce=>_0x1bb6ce)),_0x7f9f61['bind']('isVisible')['toMany'](_0x5dfbff,'isVisible',(..._0x118dc2)=>_0x118dc2['some'](_0x9c072a=>_0x9c072a));};_0x7f9f61['panelPosition']='sw',_0x7f9f61['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0xdcc610});for(const _0x586ef0 of this['items'])_0x3df285(_0x586ef0);return _0x28af27['add'](_0x166a64),_0x7f9f61['listenTo'](this['items'],'add',(_0xc12c65,_0xb463fe,_0x41d4c9)=>{_0x3df285(_0xb463fe,_0x41d4c9);}),_0x7f9f61['listenTo'](this['items'],'remove',(_0x4ddaca,_0x259bfb,_0x441a4a)=>{_0x166a64['items']['remove'](_0x441a4a);}),_0x7f9f61;}['_attachActions'](_0x1e1685,_0x3d94a6){const _0x5a63be=_0x1e1685&&_0x1e1685['element'];_0x5a63be&&(this['listenTo'](_0x5a63be,'mouseenter',()=>this['actionIndicator']=_0x3d94a6),this['listenTo'](_0x5a63be,'focus',()=>this['actionIndicator']=_0x3d94a6),this['listenTo'](_0x5a63be,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5a63be,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x14f4cf=super['_createCommentInputView']();return _0x14f4cf['bind']('placeholder')['to'](this),_0x14f4cf;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x4a1046){const _0x186adc=Dt(_0x4a1046,0x1e),_0xbd0844=new MutationObserver(_0x30bf93=>{for(const _0x3398fd of _0x30bf93)('attributes'==_0x3398fd['type']&&'class'==_0x3398fd['attributeName']||'childList'==_0x3398fd['type']||'characterData'==_0x3398fd['type'])&&_0x186adc();});return{'attach'(_0xf244c7){_0xbd0844['observe'](_0xf244c7,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xbd0844['disconnect'](),_0x186adc['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x21c539,_0x5b7b35){super(_0x21c539),this['id']=_0x7543b8(),this['focusTracker']=new _0x4e3bb4(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x459a19,_0x10090d)=>this['fire']('Esc',_0x10090d)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x5b7b35),this['mainView']=_0x5b7b35;const _0x1d201e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1d201e['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 _0x5eb096=this['element']['clientHeight'];_0x5eb096&&(this['height']=_0x5eb096);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3fc27f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4a72f5,target:_0x42ccd4,type:_0x349304,isVisible:_0x23d058=!0x0}){super(),this['view']=_0x4a72f5,this['view']['element']||this['view']['render'](),this['_type']=_0x349304,this['_target']=_0x42ccd4,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2cece5([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5737a4,_0x19210b)=>{this['view']['focusTracker']['add'](_0x19210b);}),this['focusableElements']['on']('remove',(_0x4286c5,_0xa8f467)=>{this['view']['focusTracker']['remove'](_0xa8f467);}),this['set']('isVisible',_0x23d058);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x194b65=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x194b65),_0x194b65;}get['targetRect'](){const _0x9e61b4=this['target'];if(null===_0x9e61b4)return null;if(_0x9e61b4 instanceof _0x543406)return _0x9e61b4;const _0x31d8e1=_0x9e61b4['filter'](_0x50a6fc=>function(_0x5e6ee2){const _0xe1c9ef=_0x5e6ee2['offsetParent'];if(_0xe1c9ef)return!0x0;const _0x471b3c=_0x5e6ee2['getClientRects']()['item'](0x0);return!!_0x471b3c;}(_0x50a6fc));return 0x0===_0x31d8e1['length']?null:new _0x543406(_0x31d8e1[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5debe3){this['view']['isActive']=_0x5debe3,this['view']['mainView']['isActive']=_0x5debe3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x481b45){if(!(null===_0x481b45||_0x481b45 instanceof _0x543406||Array['isArray'](_0x481b45)&&_0x481b45['every'](_0x40defb=>li(_0x40defb))))throw new _0x202340('annotation-invalid-target',null,{'target':_0x481b45});}['_getNormalizedTarget'](){const _0x212662='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x212662)?[_0x212662]:_0x212662;}}function li(_0x338af7){return null!==_0x338af7&&'object'==typeof _0x338af7&&'nodeType'in _0x338af7&&0x1===_0x338af7['nodeType'];}class _ extends _0x2cece5{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3687f0=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4e3bb4(),this['_focusTracker']['on']('change:isFocused',(_0x4430fe,_0x1d3ebb,_0x432dba)=>{_0x432dba||this['fire']('blur');});for(const _0x16450d of _0x3687f0)this['add'](_0x16450d);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2387b6){if(this['has'](_0x2387b6))throw new _0x202340('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2387b6['innerView'],_0x2387b6),this['_viewToAnnotation']['set'](_0x2387b6['view'],_0x2387b6);for(const _0x197cde of _0x2387b6['focusableElements'])this['_focusTracker']['add'](_0x197cde);this['listenTo'](_0x2387b6['focusableElements'],'add',(_0x2ad5bc,_0x10f7ef)=>{this['_focusTracker']['add'](_0x10f7ef);}),this['listenTo'](_0x2387b6['focusableElements'],'remove',(_0x436452,_0x47bfb1)=>{this['_focusTracker']['remove'](_0x47bfb1);}),this['listenTo'](_0x2387b6['view']['focusTracker'],'change:isFocused',(_0x1ebe26,_0x39ceff,_0x5ea26d)=>{_0x5ea26d&&this['fire']('focus',_0x2387b6);}),_0x2387b6['updateTargetRect']();const _0x45b2f3=this['_getOrderInContent'](_0x2387b6['view']['targetRect']);return super['add'](_0x2387b6,_0x45b2f3);}['remove'](_0x5444d0){if(!this['has'](_0x5444d0))throw new _0x202340('annotationcollection-not-existing-item',null);this['stopListening'](_0x5444d0['view']['focusTracker']),this['stopListening'](_0x5444d0['focusableElements']);for(const _0x287dee of _0x5444d0['focusableElements'])this['_focusTracker']['remove'](_0x287dee);return this['_viewToAnnotation']['delete'](_0x5444d0['view']),this['_innerViewToAnnotation']['delete'](_0x5444d0['innerView']),super['remove'](_0x5444d0);}['getByInnerView'](_0x548c28){return this['_innerViewToAnnotation']['get'](_0x548c28);}['getByView'](_0x1a30ea){return this['_viewToAnnotation']['get'](_0x1a30ea);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x17297e of this)_0x17297e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x6767de=Array['from'](this)['sort']((_0x579bf5,_0x5a0085)=>v(_0x579bf5['view']['targetRect'],_0x5a0085['view']['targetRect']));for(let _0x184a9f=_0x6767de['length']-0x1;_0x184a9f>0x0;_0x184a9f--){const _0x14b704=_0x6767de[_0x184a9f];_0x184a9f!==this['getIndex'](_0x14b704)&&(this['remove'](_0x14b704),this['add'](_0x14b704));}}['_getOrderInContent'](_0x3fd267){let _0x40e43e=0x0;if(!_0x3fd267)return this['length'];for(const _0x125687 of this){const _0x45220a=_0x125687['view']['targetRect'];if(_0x45220a){if(v(_0x3fd267,_0x45220a)<0x0)return _0x40e43e;_0x40e43e++;}}return _0x40e43e;}}function v(_0x43273d,_0x247e7a){if(null===_0x43273d&&null===_0x247e7a)return 0x0;if(null===_0x43273d)return-0x1;if(null===_0x247e7a)return 0x1;const _0x3b85ef=_0x43273d['top']-_0x247e7a['top'];return 0x0==_0x3b85ef?_0x43273d['left']-_0x247e7a['left']:_0x3b85ef;}class O extends _0x154e47{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f5f87){if(super(_0x4f5f87),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4f5f87 instanceof _0x255aae){const _0x3c5e34=_0x4f5f87['locale'];_0x4f5f87['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x3c5e34,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x47c86c){this['collection']['add'](_0x47c86c);}['remove'](_0x5e5b94){this['collection']['remove'](_0x5e5b94),_0x5e5b94['destroy']();}['refreshVisibility'](){for(const _0x16e155 of this['collection'])_0x16e155['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5d297c){return this['collection']['getByInnerView'](_0x5d297c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x24304b of this['collection'])_0x24304b['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2648ec){this['fire']('_activateAnnotation',_0x2648ec);}['createAnnotation'](_0x1f556f){return new d(_0x1f556f);}['createAnnotationView'](_0x52194b,_0x3b3105){return new S(_0x52194b,_0x3b3105);}['_addActiveAnnotation'](_0x350ac8){const _0x146d6e=new Set(this['activeAnnotations']);_0x146d6e['add'](_0x350ac8),this['activeAnnotations']=_0x146d6e;}['_removeActiveAnnotation'](_0x5adde8){const _0x1e1e6d=new Set(this['activeAnnotations']);_0x1e1e6d['delete'](_0x5adde8),this['activeAnnotations']=_0x1e1e6d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x303993=this['collection'],_0x11e2b1=this['_visibleAnnotations'];function _0x2f4a12(_0x20ea50){const _0x5d729d=_0x20ea50['source'];_0x5d729d['isVisible']&&!_0x11e2b1['has'](_0x5d729d)?_0x11e2b1['add'](_0x5d729d):!_0x5d729d['isVisible']&&_0x11e2b1['has'](_0x5d729d)&&_0x11e2b1['remove'](_0x5d729d),_0x5d729d['view']['focusTracker']['remove'](_0x5d729d['view']['element']),_0x5d729d['view']['focusTracker']['add'](_0x5d729d['view']['element']);}this['listenTo'](_0x303993,'add',(_0x2c6992,_0x12a7eb)=>{_0x12a7eb['isVisible']&&_0x11e2b1['add'](_0x12a7eb),this['listenTo'](_0x12a7eb,'change:isVisible',_0x2f4a12);}),this['listenTo'](_0x303993,'remove',(_0x5ed0b8,_0x26bcb1)=>{_0x11e2b1['has'](_0x26bcb1)&&_0x11e2b1['remove'](_0x26bcb1),this['stopListening'](_0x26bcb1,'change:isVisible',_0x2f4a12);});}['_setupEnterAnnotationKeystroke'](){const _0x489819=_0x4de8bd=>{_0x4de8bd['on']('ready',()=>{_0x4de8bd['keystrokes']['set'](_0x1a764c,(_0x138b21,_0x378397)=>{const _0x474f5d=_0x2e4433(this['activeAnnotations']['values']());_0x474f5d&&(_0x474f5d['view']['focus'](),_0x378397());});});};this['context']instanceof _0x255aae?_0x489819(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x14e62b,_0x22e364)=>{_0x489819(_0x22e364);});}['_setupEscapeAnnotationHandling'](){const _0x53efb5=_0x4ca483=>{const _0x48c01d=_0x4ca483['source'],_0x328bc7=[];let _0x27af38;if(Array['isArray'](_0x48c01d['target'])){_0x27af38=_0x48c01d['target'][0x0],this['context']instanceof _0x255aae?_0x328bc7['push'](this['context']):this['context']['editors']&&_0x328bc7['push'](...this['context']['editors']);for(const _0x58b392 of _0x328bc7)for(const _0x276e06 of _0x58b392['editing']['view']['domRoots']['values']())if(_0x276e06['contains'](_0x27af38))return void _0x58b392['editing']['view']['focus']();_0x27af38['focus']();}};this['listenTo'](this['collection'],'add',(_0x4098d1,_0x401325)=>{this['listenTo'](_0x401325,'escape',_0x53efb5,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x19d071,_0xa62c17)=>{this['stopListening'](_0xa62c17,'escape',_0x53efb5);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x154e47{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38640a){super(_0x38640a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4b0fdf=this['context']['config'];_0x4b0fdf['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4b0fdf['define']('comments.maxThreadTotalWeight',0x1f4),_0x4b0fdf['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4b0fdf['define']('comments.CommentThreadView',vt),_0x4b0fdf['define']('comments.CommentView',gt),_0x4b0fdf['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x41934e=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x31660f,_0x56b9e8)=>this['_addCommentThread'](_0x56b9e8)),this['on']('submitCommentThread',(_0x15c39c,_0x5352bb)=>this['_submitCommentThread'](_0x5352bb)),this['on']('resolveCommentThread',(_0x193f97,_0x5ba9fa)=>this['_resolveCommentThread'](_0x5ba9fa)),this['on']('resolveCommentThread',(_0x131018,_0x1c991a)=>this['_updateActiveAnnotation'](_0x1c991a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x43f8f1,_0x5018b)=>this['_reopenCommentThread'](_0x5018b)),this['on']('reopenCommentThread',(_0x581e10,_0x3cf9bb)=>this['_updateActiveAnnotation'](_0x3cf9bb),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x46d5ec,_0x3d212)=>this['_removeCommentThread'](_0x3d212)),this['on']('updateCommentThread',(_0x18b0f4,_0x4f52b8)=>this['_updateCommentThread'](_0x4f52b8)),this['on']('updateCommentThread',(_0x2ba099,_0x430f9d)=>this['_updateActiveAnnotation'](_0x430f9d),{'priority':'lowest'}),this['on']('addComment',(_0x32240a,_0x509c94)=>this['_addComment'](_0x509c94)),this['on']('updateComment',(_0x77efe3,_0x45acfc)=>this['_updateComment'](_0x45acfc)),this['on']('removeComment',(_0x34b067,_0x4241fe)=>this['_removeComment'](_0x4241fe)),this['on']('addComment',(_0x40acd3,{threadId:_0x1fbc1e,isFromAdapter:_0x1bb04d})=>{if(_0x1bb04d)return;const _0x27836e=this['getCommentThread'](_0x1fbc1e),_0x25a553=_0x27836e&&this['_threadToController']['get'](_0x27836e);_0x25a553&&_0x25a553['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x41934e,'change:activeAnnotations',(_0x2d7617,_0x1915a8,_0x52da5e)=>{const _0x59db6a=Array['from'](_0x52da5e)['map'](_0x4bcb88=>this['_viewToController']['get'](_0x4bcb88['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x59db6a?_0x59db6a['model']:null;});}set['adapter'](_0x3bc536){if(this['_adapter'])throw new _0x202340('commentsrepository-adapter-already-set');this['_adapter']=_0x3bc536;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x35a3ff=Tt,threadId:_0x3f1ae0=_0x7543b8(),comments:_0x2ec158=[],unlinkedAt:_0x581346=null,resolvedAt:_0x5e76c3=null,resolvedBy:_0x450397=null,target:_0x3c5b1c=null,context:_0x4e3566=null,attributes:_0x2cad00={},isResolvable:_0x4c89ca=!0x0,isSubmitted:_0x3cf95f=!0x1,isFromAdapter:_0x375cf7=!0x1}={}){return this['fire'](bt('addCommentThread',_0x35a3ff),{'channelId':_0x35a3ff,'threadId':_0x3f1ae0,'comments':_0x2ec158,'unlinkedAt':_0x581346,'resolvedAt':_0x5e76c3,'resolvedBy':_0x450397,'target':_0x3c5b1c,'context':_0x4e3566,'attributes':_0x2cad00,'isFromAdapter':_0x375cf7,'isResolvable':_0x4c89ca,'isSubmitted':_0x3cf95f}),this['getCommentThread'](_0x3f1ae0);}['openNewCommentThread']({channelId:_0x15313f=Tt,threadId:_0x11fe30=_0x7543b8(),target:_0x100d24,context:_0x475960=null,isResolvable:_0x2ba21e=!0x0}){if(this['_readOnlyChannels']['has'](_0x15313f)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x100d24)throw new _0x202340('commentsrepository-missing-target');const _0x473ea3=this['addCommentThread']({'channelId':_0x15313f,'threadId':_0x11fe30,'target':_0x100d24,'context':_0x475960,'isResolvable':_0x2ba21e});if(!_0x473ea3)return null;const _0x384a9f=this['_threadToController']['get'](_0x473ea3),_0x5cbc56=_0x384a9f['view']['commentThreadInputView']['commentInputView'],_0x45736b=this['context']['plugins']['get'](O),_0x4e6520=_0x45736b['getByInnerView'](_0x384a9f['view']);return _0x45736b['activate'](_0x4e6520),_0x5cbc56['once']('editorReady',()=>_0x5cbc56['focus']()),_0x473ea3;}['hasCommentThread'](_0x59c0b2){if('string'!=typeof _0x59c0b2)throw new _0x202340('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x59c0b2);}['updateCommentThread']({channelId:_0x24b818=Tt,threadId:_0x470cc3,context:_0x2d51f1,unlinkedAt:_0x4932a5,attributes:_0x2e0967,isFromAdapter:_0x2bf095=!0x1}){return this['fire'](bt('updateCommentThread',_0x24b818),{'channelId':_0x24b818,'threadId':_0x470cc3,'context':_0x2d51f1,'unlinkedAt':_0x4932a5,'attributes':_0x2e0967,'isFromAdapter':_0x2bf095}),this['getCommentThread'](_0x470cc3);}['getCommentThread'](_0xce3b00){if('string'!=typeof _0xce3b00)throw new _0x202340('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0xce3b00);}['fetchCommentThread']({channelId:_0x10945e,threadId:_0x117ed0}={}){const _0x59b840=this['getCommentThread'](_0x117ed0);if(_0x59b840)return Promise['resolve'](_0x59b840);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x202340('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x10945e,'threadId':_0x117ed0})['then'](_0x461760=>this['hasCommentThread'](_0x117ed0)?this['getCommentThread'](_0x117ed0):_0x461760?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x10945e},_0x461760)):void 0x0)['catch'](_0x2441ef=>{throw console['error'](_0x2441ef),new _0x202340('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x477ac7,skipNotAttached:_0x3da5dc=!0x1,skipEmpty:_0x557509=!0x1,toJSON:_0x5b7cf3=!0x1}={}){const _0x255ca9=[];for(const _0xdf66da of this['_threads']['values']())_0x477ac7&&_0xdf66da['channelId']!==_0x477ac7||_0x3da5dc&&!_0xdf66da['isAttached']||_0x557509&&0x0===_0xdf66da['length']||_0x255ca9['push'](_0xdf66da);return _0x5b7cf3?_0x255ca9['map'](_0x15c083=>_0x15c083['toJSON']()):_0x255ca9;}['setActiveCommentThread'](_0x2fd98e){const _0x7c8404=this['context']['plugins']['get'](O);if(!_0x2fd98e)return void(this['activeCommentThread']&&_0x7c8404['deactivateAll']());const _0x365617=this['getCommentThread'](_0x2fd98e);if(!_0x365617)throw new _0x202340('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2fd98e});if(!this['_threadToController']['has'](_0x365617))throw new _0x202340('commentsrepository-active-not-attached',null,{'threadId':_0x2fd98e});const _0x100e35=_0x7c8404['getByInnerView'](this['_threadToController']['get'](_0x365617)['view']);_0x7c8404['activate'](_0x100e35);}['switchReadOnly'](_0x947aa4,_0x3772b3){_0x947aa4?this['_readOnlyChannels']['add'](_0x3772b3):this['_readOnlyChannels']['delete'](_0x3772b3),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4af7f8){return this['_readOnlyChannels']['has'](_0x4af7f8)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xdb6ca8,_0x57ce50){return new Ct(_0xdb6ca8,_0x57ce50);}['setPermissions'](_0x55353b,_0x2ed3d8=Tt){this['_permissions']['set'](_0x2ed3d8,_0x55353b),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x512d68=Tt){return this['_permissions']['has'](_0x512d68)?this['_permissions']['get'](_0x512d68):_t;}['_addCommentThread']({channelId:_0x1c26e5,threadId:_0x1c74c2,comments:_0x262781,unlinkedAt:_0x1d331c,resolvedAt:_0x1dccab,resolvedBy:_0x2fe469,target:_0x725d9d,context:_0x398851,attributes:_0x441293,isFromAdapter:_0x753c93,isResolvable:_0x356462,isSubmitted:_0x411529}){if('string'!=typeof _0x1c74c2)throw new _0x202340('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1c74c2});if(this['hasCommentThread'](_0x1c74c2))throw new _0x202340('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1c74c2});const _0x5796b2=new ui(this,{'channelId':_0x1c26e5,'id':_0x1c74c2,'context':_0x398851,'attributes':_0x441293,'unlinkedAt':_0x1d331c,'resolvedAt':_0x1dccab,'resolvedBy':_0x2fe469?this['context']['plugins']['get'](it)['getUser'](_0x2fe469):null,'isResolvable':_0x356462,'isSubmitted':_0x411529||_0x753c93});this['_threads']['set'](_0x1c74c2,_0x5796b2);for(const _0x1e8e15 of _0x262781)_0x5796b2['_add'](this['_createNewComment']({'threadId':_0x1c74c2,..._0x1e8e15}));return _0x725d9d&&_0x5796b2['attachTo'](_0x725d9d),_0x753c93||!_0x5796b2['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1c26e5,'threadId':_0x1c74c2});}['_submitCommentThread']({channelId:_0x38f338,threadId:_0x165a0c}){if(!this['hasCommentThread'](_0x165a0c))throw new _0x202340('commentsrepository-missing-comment-thread',this);const _0xe24cd=this['getCommentThread'](_0x165a0c);if(_0xe24cd['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5afdc2,comments:_0x4b5a40,resolvedAt:_0x68b597,resolvedBy:_0x5a4913,context:_0x53e3a4,attributes:_0x513b9c}=_0xe24cd,_0x3d7124=this['context']['plugins']['get']('PendingActions'),_0x4750da=_0x3d7124['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x38f338,'threadId':_0x5afdc2,'comments':_0x4b5a40['map'](_0x12918a=>_0x12918a['toJSON']()),'resolvedAt':_0x68b597,'resolvedBy':_0x5a4913?_0x5a4913['id']:_0x5a4913,'context':_0x53e3a4,'attributes':_0x513b9c})['then'](({comments:_0x498db4})=>{_0x3d7124['remove'](_0x4750da);for(const _0x3d6b23 of _0x498db4)this['_updateComment']({'channelId':_0x38f338,'threadId':_0x165a0c,'commentId':_0x3d6b23['commentId'],'createdAt':_0x3d6b23['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x21c83f=>{throw console['error'](_0x21c83f),new _0x202340('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x261401,target:_0x20b82a}){const _0x1417eb=this['getCommentThread'](_0x261401);if(!_0x1417eb)throw new _0x202340('commentsrepository-attach-missing-comment-thread',this);const _0x247ff8=this['context']['plugins']['get']('PendingActions'),_0x22e2f8=this['context']['plugins']['get'](O),_0x296bd2=this['_createCommentThreadView'](_0x1417eb),_0x43bd1e=new Ct(_0x1417eb,_0x296bd2);let _0x1bb027=null;_0x296bd2['on']('change:isDirty',(_0x422c4d,_0x4c988f,_0x5cd057)=>{_0x5cd057?_0x1bb027=_0x247ff8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1bb027&&(_0x247ff8['remove'](_0x1bb027),_0x1bb027=null);}),this['_threadToController']['set'](_0x1417eb,_0x43bd1e),this['_viewToController']['set'](_0x296bd2,_0x43bd1e);const _0x218f13=new S(this['context']['locale'],_0x296bd2);_0x218f13['bind']('length')['to'](_0x296bd2),_0x218f13['bind']('isDirty')['to'](_0x296bd2,'isDirty',_0x296bd2,'length',(_0xb47ccb,_0x396adb)=>_0xb47ccb||!_0x396adb),_0x218f13['bind']('isActive')['to'](_0x296bd2),_0x218f13['type']='comment';const _0x505475=new d({'view':_0x218f13,'target':_0x20b82a,'type':'comment','isVisible':!_0x1417eb['archivedAt']});return _0x296bd2['on']('escape',()=>{_0x505475['fire']('escape');}),this['_bindAnnotationToEditors'](_0x296bd2,_0x505475),_0x22e2f8['add'](_0x505475),_0x505475;}['_bindAnnotationToEditors'](_0x3f5bd3,_0xa2bce1){this['listenTo'](_0x3f5bd3,'editorReady',(_0x594395,_0x40e0d6)=>{const _0x44a2e4=_0x40e0d6['ui']['view']['body']['bodyCollectionContainer'];_0xa2bce1['focusableElements']['add'](_0x44a2e4),this['context']instanceof _0x255aae&&this['context']['ui']['focusTracker']['add'](_0x44a2e4);},{'priority':'highest'}),this['listenTo'](_0x3f5bd3,'editorDestroyed',(_0x4aabd0,_0x3df7ab)=>{const _0x1e9583=_0x3df7ab['ui']['view']['body']['bodyCollectionContainer'];_0xa2bce1['focusableElements']['has'](_0x1e9583)&&_0xa2bce1['focusableElements']['remove'](_0x1e9583),this['context']instanceof _0x255aae&&this['context']['ui']['focusTracker']['remove'](_0x1e9583);});}['_unbindEditors'](_0x576d04){this['stopListening'](_0x576d04,'editorReady'),this['stopListening'](_0x576d04,'editorDestroyed');}['_createCommentThreadView'](_0x36641b){const _0x31d9e6=this['context']['plugins']['get'](it),{config:_0x1f3c04,locale:_0x5146cf}=this['context'],_0x2614c7=lt(_0x1f3c04['get']('locale'),_0x5146cf);return new(0x0,(_0x1f3c04['get']('comments'))['CommentThreadView'])(_0x5146cf,_0x36641b,_0x31d9e6['me'],{'editorConfig':{..._0x1f3c04['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1f3c04['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1f3c04['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1f3c04['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1f3c04['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2614c7,'CommentView':_0x1f3c04['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1fc789,channelId:_0x3f0134,resolvedAt:_0x8d66bf,resolvedBy:_0x28dd03,isFromAdapter:_0x40fe76}){if(!this['hasCommentThread'](_0x1fc789))throw new _0x202340('commentsrepository-missing-comment-thread',null,{'threadId':_0x1fc789});const _0x41de99=this['getCommentThread'](_0x1fc789);if(_0x41de99['isResolved'])throw new _0x202340('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1fc789});const _0x213fd3=this['context']['plugins']['get'](it);if(_0x41de99['resolvedBy']=_0x213fd3['getUser'](_0x28dd03),_0x41de99['resolvedAt']=_0x8d66bf,_0x40fe76||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x516538=this['context']['plugins']['get']('PendingActions'),_0x53aaa8=_0x516538['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3f0134,'threadId':_0x1fc789})['then'](({resolvedAt:_0x2549cc,resolvedBy:_0xfda65e})=>{_0x516538['remove'](_0x53aaa8),_0x41de99['resolvedBy']['id']!==_0xfda65e&&(_0x41de99['resolvedBy']=_0x213fd3['getUser'](_0xfda65e)),_0x41de99['resolvedAt']=_0x2549cc;})['catch'](_0x4c1634=>{throw console['error'](_0x4c1634),new _0x202340('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x16295a,channelId:_0x1b4cd1,isFromAdapter:_0x30a8a1}){if(!this['hasCommentThread'](_0x16295a))throw new _0x202340('commentsrepository-missing-comment-thread',null,{'threadId':_0x16295a});const _0x146760=this['getCommentThread'](_0x16295a);if(!_0x146760['isResolved'])throw new _0x202340('commentsrepository-reopen-comment-thread',null,{'threadId':_0x16295a});if(_0x146760['resolvedBy']=null,_0x146760['resolvedAt']=null,_0x30a8a1||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2b851d=this['context']['plugins']['get']('PendingActions'),_0x5d4def=_0x2b851d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1b4cd1,'threadId':_0x16295a})['then'](()=>_0x2b851d['remove'](_0x5d4def))['catch'](_0x218846=>{throw console['error'](_0x218846),new _0x202340('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x10642a,isFromAdapter:_0x186c95}){const _0x2dd3a=this['getCommentThread'](_0x10642a);if(!_0x2dd3a)throw new _0x202340('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x10642a),this['_threads']['delete'](_0x10642a),!_0x2dd3a['isSubmitted']||_0x186c95||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x50ccce=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a0f91}=_0x2dd3a,_0x3640c2=_0x50ccce['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2a0f91,'threadId':_0x10642a})['then'](()=>_0x50ccce['remove'](_0x3640c2))['catch'](_0x571018=>{throw console['error'](_0x571018),new _0x202340('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3e72a5,unlinkedAt:_0x457d9a,context:_0x142590,attributes:_0x2b0f0c,isFromAdapter:_0x2e7ea5}){if('string'!=typeof _0x3e72a5)throw new _0x202340('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3e72a5});if(!this['hasCommentThread'](_0x3e72a5))throw new _0x202340('commentsrepository-missing-comment-thread',null,{'threadId':_0x3e72a5});const _0x31840d=this['getCommentThread'](_0x3e72a5);let _0x2f53a0=!0x1;if(void 0x0!==_0x142590&&_0x31840d['context']!==_0x142590&&(_0x31840d['context']=_0x142590,_0x2f53a0=!0x0),void 0x0!==_0x457d9a&&_0x31840d['unlinkedAt']!==_0x457d9a&&(_0x31840d['unlinkedAt']=_0x457d9a,_0x2f53a0=!0x0),_0x2b0f0c&&!wt(_0x2b0f0c,_0x31840d['attributes'])&&(_0x31840d['attributes']=_0x2b0f0c,_0x2f53a0=!0x0),!_0x2f53a0)return Promise['resolve']();if(!_0x31840d['isSubmitted']||_0x2e7ea5||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1ec490=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1b0ca6}=_0x31840d,_0x5270cb=_0x1ec490['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1b0ca6,'threadId':_0x3e72a5,'context':_0x142590,'unlinkedAt':_0x457d9a,'attributes':_0x2b0f0c})['then'](()=>_0x1ec490['remove'](_0x5270cb))['catch'](_0x56ef67=>{throw console['error'](_0x56ef67),new _0x202340('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x19df96){const _0xb3cff1=this['context']['plugins']['get'](O),_0x553298=this['getCommentThread'](_0x19df96);if(_0x553298['_isAttached']=!0x1,this['_threadToController']['has'](_0x553298)){const _0x21379d=this['_threadToController']['get'](_0x553298),_0x51fb4b=_0x21379d['view'],_0x1bba07=_0xb3cff1['getByInnerView'](_0x51fb4b);this['_threadToController']['delete'](_0x553298),this['_viewToController']['delete'](_0x51fb4b),_0x1bba07&&_0xb3cff1['remove'](_0x1bba07),_0x21379d['destroy'](),_0x51fb4b['destroy']()['then'](()=>{this['_unbindEditors'](_0x51fb4b);});}}['_updateActiveAnnotation']({threadId:_0x50b448,resolvedAt:_0x426b5b,unlinkedAt:_0x1ea7f5}){const _0x52ceef=!!_0x426b5b,_0x3d402f=this['context']['plugins']['get'](O),_0x4d1d0e=this['getCommentThread'](_0x50b448);if(this['_threadToController']['has'](_0x4d1d0e)){const _0x24ac27=this['_threadToController']['get'](_0x4d1d0e)['view'],_0xec3a13=_0x3d402f['getByInnerView'](_0x24ac27);_0xec3a13&&(_0x52ceef&&_0x3d402f['_removeActiveAnnotation'](_0xec3a13),_0x1ea7f5?_0xec3a13['isVisible']=!0x1:_0xec3a13['refreshVisibility']());}}['_getExternalAuthor'](_0x33ae78){const _0x4c8f39=this['context']['plugins']['get'](it),_0x5d1f8b=pt('external:'+_0x33ae78),_0x1d85ad=_0x4c8f39['getUser'](_0x5d1f8b);return _0x1d85ad||_0x4c8f39['addUser']({'id':_0x5d1f8b,'name':_0x33ae78});}['_createNewComment']({threadId:_0x27f687,commentId:_0x309ee1=_0x7543b8(),content:_0x37b483,authorId:_0x2c0fff,createdAt:_0x2435af,attributes:_0x240eb2}){if('string'!=typeof _0x309ee1)throw new _0x202340('commentsrepository-invalid-commentid');if('string'!=typeof _0x2c0fff)throw new _0x202340('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x37b483||!_0x37b483['trim']())throw new _0x202340('commentsrepository-invalid-comment-content');const _0x418ffd=this['context']['plugins']['get'](it)['getUser'](_0x2c0fff);if(!_0x418ffd)throw new _0x202340('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2c0fff});let _0x5612e8=null,_0x29c8da=_0x2435af;return _0x240eb2?.['@external']&&(_0x5612e8=this['_getExternalAuthor'](_0x240eb2['@external']['authorName']),_0x29c8da=new Date(_0x240eb2['@external']['createdAt'])),new fi(this,{'threadId':_0x27f687,'id':_0x309ee1,'author':_0x5612e8||_0x418ffd,'creator':_0x418ffd,'content':_0x37b483,'createdAt':_0x2435af,'authoredAt':_0x29c8da,'attributes':_0x240eb2});}['_addComment'](_0x40e6e5){let {threadId:_0x2aa0a8,content:_0x4eb804,attributes:_0x407621,isFromAdapter:_0x487f35}=_0x40e6e5;const _0x5ac6b9=this['getCommentThread'](_0x40e6e5['threadId']);if(!_0x5ac6b9)throw new _0x202340('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1ee5e6=this['_createNewComment'](_0x40e6e5),{id:_0x555a0f}=_0x1ee5e6;if(_0x5ac6b9['_add'](_0x1ee5e6),_0x487f35||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5ac6b9['isSubmitted'])return Promise['resolve']();const _0x46dcc2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x247f33}=_0x5ac6b9,_0x1eb4f9=_0x46dcc2['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x407621||(_0x407621={}),this['adapter']['addComment']({'channelId':_0x247f33,'threadId':_0x2aa0a8,'commentId':_0x555a0f,'content':_0x4eb804,'attributes':_0x407621})['then'](_0x5e7fc2=>{_0x46dcc2['remove'](_0x1eb4f9),_0x5e7fc2&&this['_updateComment']({'channelId':_0x247f33,'threadId':_0x2aa0a8,'commentId':_0x555a0f,'createdAt':_0x5e7fc2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2bebce=>{throw console['error'](_0x2bebce),new _0x202340('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x43238d,commentId:_0x25b446,content:_0xc5f5b1,createdAt:_0x504057,attributes:_0x5b80a6,isFromAdapter:_0x1d9e7f}){if(void 0x0!==_0xc5f5b1&&('string'!=typeof _0xc5f5b1||!_0xc5f5b1['trim']()['length']))throw new _0x202340('commentsrepository-update-comment-invalid-content');const _0x108af6=this['getCommentThread'](_0x43238d),_0x5f2b0a=_0x108af6['getComment'](_0x25b446);if(!_0x5f2b0a)throw new _0x202340('commentsrepository-update-missing-comment',this);let _0x5cd326=!0x1;if(_0xc5f5b1&&_0xc5f5b1!==_0x5f2b0a['content']&&(_0x5f2b0a['isEditable']||_0x1d9e7f)&&(_0x5f2b0a['content']=_0xc5f5b1,_0x5cd326=!0x0),_0x504057&&_0x504057!==_0x5f2b0a['createdAt']&&(_0x5f2b0a['createdAt']=_0x504057,_0x5f2b0a['attributes']&&_0x5f2b0a['attributes']['@external']||(_0x5f2b0a['authoredAt']=_0x504057),_0x5cd326=!0x0),_0x5b80a6&&!wt(_0x5b80a6,_0x5f2b0a['attributes'])&&(_0x5f2b0a['attributes']=_0x5b80a6,_0x5cd326=!0x0),!_0x5cd326)return Promise['resolve']();if(_0x108af6['fire']('commentUpdated'),_0x1d9e7f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x22bfe1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x36bbe0}=this['getCommentThread'](_0x5f2b0a['threadId']),_0x5933d2=_0x22bfe1['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x36bbe0,'threadId':_0x43238d,'commentId':_0x25b446,'content':_0xc5f5b1,'attributes':_0x5b80a6})['then'](()=>_0x22bfe1['remove'](_0x5933d2))['catch'](_0x10a4ce=>{throw console['error'](_0x10a4ce),new _0x202340('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x29b832,commentId:_0x259625,isFromAdapter:_0x18fe40}){const _0x23f3b9=this['getCommentThread'](_0x29b832),_0x5db75f=_0x23f3b9['getComment'](_0x259625);if(!_0x5db75f)throw new _0x202340('commentsrepository-remove-missing-comment',this);if(_0x23f3b9['_remove'](_0x5db75f),_0x18fe40||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x55fa0f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2ac603}=_0x23f3b9,_0x2d4cf2=_0x55fa0f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2ac603,'threadId':_0x29b832,'commentId':_0x259625})['then'](()=>_0x55fa0f['remove'](_0x2d4cf2))['catch'](_0x3292ba=>{throw console['error'](_0x3292ba),new _0x202340('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3fc27f(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x31b775,_0xafc5ad){super();const _0x162af3=_0xafc5ad['isResolvable'];this['channelId']=_0xafc5ad['channelId'],this['id']=_0xafc5ad['id'],this['comments']=new _0x2cece5(),this['_repository']=_0x31b775,this['_isAttached']=!0x1,this['_isSubmitted']=_0xafc5ad['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x31b775,'_permissions',_0x31b775,'_readOnlyChannels',()=>_0x31b775['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x31b775,'_permissions',()=>_0x31b775['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x31b775,'_permissions',()=>{const _0x4f7674=_0x31b775['getPermissions'](this['channelId']);return _0x4f7674['write']||_0x4f7674['admin'];}),this['bind']('isResolvable')['to'](_0x31b775,'_permissions',()=>_0x162af3&&_0x31b775['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xafc5ad['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4148ec,_0x47f72f)=>_0x4148ec?_0x47f72f?_0x4148ec<_0x47f72f?_0x4148ec:_0x47f72f:_0x4148ec:_0x47f72f),this['set']('unlinkedAt',_0xafc5ad['unlinkedAt']||null),this['set']('resolvedAt',_0xafc5ad['resolvedAt']||null),this['set']('resolvedBy',_0xafc5ad['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x3bfdd7=>!!_0x3bfdd7),this['set']('attributes',_0xafc5ad['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x52177d,_0xc87902)=>_0x52177d+_0xc87902['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x7632f4,id:_0x144c76}=this;this['_repository']['fire'](bt('submitCommentThread',_0x7632f4),{'channelId':_0x7632f4,'threadId':_0x144c76});}['setUnlinkedAt'](_0xca32fc){this['_update']({'unlinkedAt':_0xca32fc});}['resolve']({resolvedAt:_0x133d0f=new Date(),resolvedBy:_0x3e95fc=null,isFromAdapter:_0x20936b=!0x1}={}){const _0x2e99ee=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x185b4e,id:_0x569de8}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x185b4e),{'channelId':_0x185b4e,'threadId':_0x569de8,'resolvedAt':_0x133d0f,'resolvedBy':_0x3e95fc||_0x2e99ee['id'],'isFromAdapter':_0x20936b});}['reopen']({isFromAdapter:_0x1fd668=!0x1}={}){const {channelId:_0x362aa1,id:_0x24a12b}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x362aa1),{'channelId':_0x362aa1,'threadId':_0x24a12b,'isFromAdapter':_0x1fd668});}['setContext'](_0x5193ff){this['context']||this['_update']({'context':_0x5193ff});}['setAttribute'](_0x3b89f2,_0x329881){const _0x1947be=It(this['attributes']);At(_0x1947be,_0x3b89f2,_0x329881),this['_update']({'attributes':_0x1947be});}['removeAttribute'](_0x4afeb9){const _0x4f03bd=It(this['attributes']);yt(_0x4f03bd,_0x4afeb9),this['_update']({'attributes':_0x4f03bd});}['remove']({isFromAdapter:_0x4db09f=!0x1}={}){const {channelId:_0x122c23,id:_0x2fa224}=this;this['_repository']['fire'](bt('removeCommentThread',_0x122c23),{'channelId':_0x122c23,'threadId':_0x2fa224,'isFromAdapter':_0x4db09f});}['attachTo'](_0x4a2de4){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x4a2de4});}['addComment'](_0x4ddb33){const {channelId:_0x484e6e,id:_0x1f18f1}=this;this['_repository']['fire'](bt('addComment',_0x484e6e,_0x1f18f1),Object['assign']({'channelId':_0x484e6e,'threadId':_0x1f18f1},_0x4ddb33));}['getComment'](_0x51b501){if('string'!=typeof _0x51b501)throw new _0x202340('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x51b501});return this['comments']['get'](_0x51b501);}['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'](_0x50c10d=>_0x50c10d['toJSON']()),'attributes':this['attributes']};}['_add'](_0x46998c){return this['listenTo'](_0x46998c,'change:authoredAt',()=>{const _0x46debe=this['_findOptimalIndex'](_0x46998c),_0x15c6f9=this['comments'];_0x46debe-0x1!=_0x15c6f9['getIndex'](_0x46998c)&&_0x46debe+0x1!=_0x15c6f9['getIndex'](_0x46998c)&&(this['_remove'](_0x46998c),this['_add'](_0x46998c));}),this['comments']['add'](_0x46998c,this['_findOptimalIndex'](_0x46998c));}['_update'](_0x581f5a){const {channelId:_0x183f91,id:_0x4944da}=this;this['_repository']['fire'](bt('updateCommentThread',_0x183f91),{..._0x581f5a,'channelId':_0x183f91,'threadId':_0x4944da});}['_remove'](_0x46e398){return this['stopListening'](_0x46e398),_0x46e398['destroy'](),this['comments']['remove'](_0x46e398);}['_findOptimalIndex'](_0x40b5ad){const _0x5ec679=this['comments']['find'](_0x7ebf72=>new Date(_0x7ebf72['authoredAt'])['getTime']()>new Date(_0x40b5ad['authoredAt'])['getTime']());return _0x5ec679?this['comments']['getIndex'](_0x5ec679):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3fc27f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3ed901,_0x589de5){super();const _0x538e51=_0x3ed901['context']['plugins']['get'](it)['me'],_0x3704aa=_0x3ed901['getCommentThread'](_0x589de5['threadId']),_0x1c4bf7=0x0===_0x3704aa['comments']['length'],_0x342a57=_0x538e51===_0x589de5['author'];this['id']=_0x589de5['id'],this['threadId']=_0x589de5['threadId'],this['author']=_0x589de5['author'],this['creator']=_0x589de5['creator'],this['isExternal']=Boolean(_0x589de5['attributes']&&_0x589de5['attributes']['@external']),this['set']('content',_0x589de5['content']),this['createdAt']=_0x589de5['createdAt']||new Date(),this['set']('authoredAt',_0x589de5['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3704aa,'resolvedAt'),this['set']('attributes',_0x589de5['attributes']||{}),this['bind']('isEditable')['to'](_0x3ed901,'_permissions',()=>{const _0x2c6950=_0x3ed901['getPermissions'](_0x3704aa['channelId'])['write'],_0x189ed9=_0x3ed901['getPermissions'](_0x3704aa['channelId'])['modifyAll'];return _0x342a57&&_0x2c6950||!_0x342a57&&_0x189ed9;}),this['bind']('isRemovable')['to'](_0x3704aa,'isRemovable',_0x3ed901,'_permissions',_0xd208a4=>{const _0x5f5b83=_0x3ed901['getPermissions'](_0x3704aa['channelId'])['write'],_0x1e867f=_0x3ed901['getPermissions'](_0x3704aa['channelId'])['modifyAll'];return _0x342a57&&_0x5f5b83||_0xd208a4&&_0x1c4bf7||!_0x342a57&&_0x1e867f&&!_0x1c4bf7;}),this['bind']('isReadOnly')['to'](_0x3704aa,'isReadOnly'),this['_repository']=_0x3ed901;}get['weight'](){return Math['max'](function(_0x4bb306){const _0x3cccf7=document['createElement']('div');return _0x3cccf7['innerHTML']=_0x4bb306,_0x3cccf7['textContent']['length'];}(this['content']),0xc8);}['update'](_0x18bb1b){const {threadId:_0x513333,id:_0x2803b6}=this;if(!this['_repository']['hasCommentThread'](_0x513333))throw new _0x202340('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x52a1fa}=this['_repository']['getCommentThread'](_0x513333);this['_repository']['fire'](bt('updateComment',_0x52a1fa,_0x513333),{'channelId':_0x52a1fa,'threadId':_0x513333,'commentId':_0x2803b6,..._0x18bb1b});}['setAttribute'](_0x59d04b,_0x51e40){const _0x541ae3=It(this['attributes']);At(_0x541ae3,_0x59d04b,_0x51e40),this['update']({'attributes':_0x541ae3});}['removeAttribute'](_0x5344db){const _0x4f08f6=It(this['attributes']);yt(_0x4f08f6,_0x5344db),this['update']({'attributes':_0x4f08f6});}['remove'](_0x4009cf={}){if(!_0x4009cf['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1ef518,id:_0x397dcb}=this;if(!this['_repository']['hasCommentThread'](_0x1ef518))throw new _0x202340('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x190305}=this['_repository']['getCommentThread'](_0x1ef518);this['_repository']['fire'](bt('removeComment',_0x190305,_0x1ef518),{'channelId':_0x190305,'threadId':_0x1ef518,'commentId':_0x397dcb,..._0x4009cf});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x203a5b,..._0xd11504){for(const _0xee7fd of _0xd11504)void 0x0!==_0xee7fd&&(_0x203a5b+=':'+String(_0xee7fd));return _0x203a5b;}class J extends _0x3de137{['refresh'](){const _0x445f59=this['editor']['model']['document']['selection'];for(const _0x42c456 of _0x445f59['getRanges']())if(this['_hasContent'](_0x42c456))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x5d3df1=_0x7543b8()}={}){const _0x5d61c6=this['editor']['model'],_0x1b203b=[];for(const _0x545c10 of _0x5d61c6['document']['selection']['getRanges']())this['_hasContent'](_0x545c10)&&_0x1b203b['push'](this['_trimToContent'](_0x545c10));_0x5d61c6['change'](_0x29f7e4=>{for(const _0x48a6ac of _0x1b203b){const _0x52eb37=_0x7543b8()['substr'](0x1,0x5),_0x1a598e='comment:'+_0x5d3df1+':'+_0x52eb37;_0x29f7e4['addMarker'](_0x1a598e,{'range':_0x48a6ac,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0xdb95a0){for(const _0x3214bc of _0xdb95a0['getItems']())if(this['_itemIsContent'](_0x3214bc))return!0x0;return!0x1;}['_itemIsContent'](_0x304500){return _0x304500['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x304500)&&!_0x304500['is']('element','tableCell');}['_trimToContent'](_0x16e6d8){const _0x1934a1=_0x2c5857=>!this['_itemIsContent'](_0x2c5857['item']),_0xabcde1=_0x16e6d8['start']['getLastMatchingPosition'](_0x1934a1),_0x509195=_0x16e6d8['end']['getLastMatchingPosition'](_0x1934a1,{'direction':'backward'});return this['editor']['model']['createRange'](_0xabcde1,_0x509195);}}class P extends _0x119370{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4aafd8){super(_0x4aafd8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x21d282=this['editor'],_0x51970a=_0x21d282['model']['document']['selection'],_0x1bc2c6=_0x569f83(()=>this['refreshSelectedViews'](),0xa);_0x51970a['on']('change:range',(_0x518766,_0x2ba042)=>{_0x2ba042['directChange']&&(_0x1bc2c6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x21d282['editing']['view']['document'],'change:isFocused',(_0x266102,_0x2a52a6,_0x225a23)=>{_0x225a23&&_0x1bc2c6();}),this['listenTo'](_0x21d282['ui']['focusTracker'],'change:isFocused',(_0x199082,_0x1191f2,_0x3d2f93)=>{_0x3d2f93||_0x21d282['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x5d21b8=>this['_editorAnnotationsData']['has'](_0x5d21b8['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x421aef){if(this['_editorAnnotations']['has'](_0x421aef['view']))return;this['_editorAnnotations']['add'](_0x421aef['view']),this['editor']['ui']['focusTracker']['add'](_0x421aef['view']['element']);const _0x554d18=this['editor']['plugins']['get'](O);this['listenTo'](_0x554d18['collection'],'remove',(_0x23b5b2,_0x4f62e3)=>{this['editor']['ui']['focusTracker']['remove'](_0x4f62e3['view']['element']),this['_editorAnnotations']['delete'](_0x4f62e3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x9ee1b5){if('function'!=typeof _0x9ee1b5)throw new _0x202340('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x9ee1b5);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2f4f03,annotations:_0x1d800c}){const _0x5f4087=[],_0x5449a8=this['editor']['model']['document']['selection'],_0x2ee10f=Array['from'](_0x5449a8['getRanges']());for(const [_0xf89004,_0x5181df]of this['_editorAnnotationsData']){const _0x570df7=_0xaebd1f(_0x5181df),_0x4dc415=_0x1d800c['getByInnerView'](_0xf89004);_0x570df7&&_0x4dc415&&_0x5f4087['push']({'annotation':_0x4dc415,'range':_0x570df7});}function _0xaebd1f(_0x5e20ff){for(const _0x244972 of _0x5e20ff)for(const _0x59953f of _0x2ee10f)if(_0x244972['containsRange'](_0x59953f,!_0x5449a8['isCollapsed']))return _0x244972;return null;}return _0x5f4087['sort']((_0x4d0d94,_0x526e29)=>{const _0x38b9c2=_0x4d0d94['range'],_0x1e39e7=_0x526e29['range'];if(!_0x38b9c2['isEqual'](_0x1e39e7)){if(_0x38b9c2['containsRange'](_0x1e39e7,!0x0))return 0x1;if(_0x1e39e7['containsRange'](_0x38b9c2,!0x0))return-0x1;}return _0x4d0d94['annotation']==_0x2f4f03?-0x1:_0x526e29['annotation']==_0x2f4f03?0x1:0x0;})['map'](_0x3c3763=>_0x3c3763['annotation']);}get['_editorAnnotationsData'](){const _0x19c7e8=new Map();for(const _0x13d768 of Array['from'](this['_dataCollectors']))for(const [_0x40d4a3,_0x330bc1]of _0x13d768())_0x19c7e8['set'](_0x40d4a3,_0x330bc1);return _0x19c7e8;}}class st extends _0x119370{['afterInit'](){const _0x2cccff=this['editor'];if(!_0x2cccff['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2cccff['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x119370{constructor(_0x4ae4e4){super(_0x4ae4e4),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1ad491=this['editor'],_0x2fdf6d=_0x1ad491['commands']['get']('importWord'),_0x3b2f36=_0x1ad491['plugins']['get'](it);_0x2fdf6d&&(_0x2fdf6d['on']('execute',(_0xf395db,[,_0x459d25])=>{_0x459d25['collaboration_features']={'comments':!0x0,'user_id':_0x3b2f36['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2fdf6d,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x213431,_0x442666){const {comment_threads:_0x320b27}=_0x442666;_0x320b27&&_0x320b27['forEach'](({thread_id:_0x424ce1,comments:_0x3a1b51,is_resolved:_0xe922fe})=>{const _0x31e7eb=new Date(),_0x4ea512=_0x3a1b51['map'](({author:_0x5435b8,content:_0x1b6736,created_at:_0x20112f})=>({'content':_0x1b6736,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x31e7eb,'attributes':{'@external':{'authorName':_0x5435b8,'createdAt':_0x20112f?new Date(_0x20112f):new Date(),'source':'importWord'}}})),_0xb37e3a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xb37e3a,'threadId':_0x424ce1,'comments':_0x4ea512,'resolvedAt':_0xe922fe?_0x31e7eb:null});});}}class at extends _0x119370{constructor(_0x3f33a4){super(_0x3f33a4),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x421f54=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x421f54,'contentInsertion',(_0x36ce31,_0x5e3f89)=>this['_removeMarkersWithoutThreads'](_0x5e3f89['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1a5f94){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1a5f94;const _0x3c2235=this['editor']['plugins']['get']('CommentsRepository');for(const _0x40b91d of _0x1a5f94['keys']()){const [_0x2db27a,_0x5c3198]=_0x40b91d['split'](':');'comment'!=_0x2db27a||_0x3c2235['hasCommentThread'](_0x5c3198)||_0x1a5f94['delete'](_0x40b91d);}return _0x1a5f94;}['_registerMarkerInClipboardPipeline'](){const _0x1a3a8b=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4afdb1=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4afdb1&&_0x1a3a8b['_registerMarkerToCopy']('comment',_0x4afdb1);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x57a7ed){switch(_0x57a7ed){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x119370{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x22c172,_0x24f339)=>{if(!_0x24f339['options']['showCommentHighlights'])return null;if(_0x24f339['options']['ignoreResolvedComments']){const {id:_0x5058ca}=er(_0x22c172['markerName']),_0x25039c=this['editor']['plugins']['get'](o);if(_0x25039c['getCommentThread'](_0x5058ca)?.['isResolved']&&_0x22c172['item'])return _0x24f339['consumable']['consume'](_0x22c172['item'],'addMarker:'+_0x22c172['markerName']),_0x24f339['consumable']['consume'](_0x22c172['item'],'removeMarker:'+_0x22c172['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4378aa=>{_0x4378aa['on']('addMarker:comment',(_0xf30ac2,_0xd1458d,_0x38f17c)=>{if(!_0x38f17c['options']['showCommentHighlights'])return;const _0x3ec975=_0xd1458d['item'];if(!_0x3ec975)return;const _0x2a9da5=_0x38f17c['mapper']['toViewElement'](_0x3ec975);this['editor']['model']['schema']['isObject'](_0x3ec975)&&_0x2a9da5&&!_0x2a9da5['getCustomProperty']('widget')&&_0x2a9da5['is']('containerElement')&&_0x210e46(_0x2a9da5,_0x38f17c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xed77c5,{writer:_0x1b606c,options:_0x4faf7f})=>{if(!_0x4faf7f['showCommentHighlights'])return null;const _0x2b3619=_0x1b606c['createContainerElement']('div'),_0x387cff=_0x1b606c['createEmptyElement']('hr');return _0x1b606c['addClass']('ck-horizontal-line',_0x2b3619),_0x1b606c['insert'](_0x1b606c['createPositionAt'](_0x2b3619,0x0),_0x387cff),_0x2b3619;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x48a485,{writer:_0x3015ab,options:_0x3a8bae})=>{if(!_0x3a8bae['showCommentHighlights'])return null;const _0x242f07=_0x3015ab['createContainerElement']('span'),_0x5ab448=_0x3015ab['createEmptyElement']('img');return _0x3015ab['addClass']('image-inline',_0x242f07),_0x3015ab['insert'](_0x3015ab['createPositionAt'](_0x242f07,0x0),_0x5ab448),_0x242f07;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1cbe07,{writer:_0x1fdb20,options:_0x5c02f5})=>{if(_0x5c02f5['showCommentHighlights'])return _0x1fdb20['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4dbb88,_0x2539f9,_0x16c38c)=>{_0x16c38c['options']['showCommentHighlights']&&_0x4dbb88['stop']();},{'priority':'high'});}}class r extends _0x119370{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c32ef){super(_0x2c32ef),this['set']('isThreadsLoadingPaused',!0x0),_0x2c32ef['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x48df98,_0x270e48,_0x2766f7,_0x1ab19f)=>{const _0x383646=_0x2c32ef['plugins']['get'](o),_0x2997a5=_0x2766f7?er(_0x2766f7)['id']:null;_0x2c32ef['model']['change'](()=>{if(_0x2997a5){const _0x3c7241=this['getAllMarkersForId'](_0x2997a5);for(const _0x4d6099 of _0x3c7241)_0x2c32ef['editing']['reconvertMarker'](_0x4d6099);}if(_0x1ab19f){const {id:_0x4628ac}=er(_0x1ab19f),_0x1f4e90=_0x383646['getCommentThread'](_0x4628ac);if(_0x1f4e90&&_0x1f4e90['unlinkedAt'])return;if(_0x1f4e90&&!_0x1f4e90['isAttached'])return;const _0x355235=this['getAllMarkersForId'](_0x4628ac);for(const _0x219237 of _0x355235)_0x2c32ef['editing']['reconvertMarker'](_0x219237);}}),_0x2997a5&&this['scrollToThreadMarker'](_0x2997a5);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x49871a=this['editor'],_0x2f8e68=_0x49871a['plugins']['get'](o),_0x10c7b9=_0x49871a['config']['get']('collaboration.channelId'),_0x323911=_0x2f8e68['getCommentThreads']()['filter'](_0x440c03=>_0x440c03['channelId']!==_0x10c7b9);_0x49871a['commands']['add']('addCommentThread',new J(_0x49871a)),this['listenTo'](_0x49871a,'change:isReadOnly',(_0x14dd8e,_0x5b4a5d,_0x2b5cfb)=>{_0x2f8e68['switchReadOnly'](_0x2b5cfb,_0x49871a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2f8e68,ft('addCommentThread',_0x10c7b9),(_0x22218d,{threadId:_0x19a52c})=>{const _0x5e7f79=this['editor']['plugins']['get'](o)['getCommentThread'](_0x19a52c);_0x5e7f79?.['unlinkedAt']&&this['_attachArchivedThread'](_0x19a52c);}),this['listenTo'](_0x2f8e68,ft('removeCommentThread',_0x10c7b9),(_0x53b955,{threadId:_0x14c583})=>{_0x49871a['model']['enqueueChange']({'isUndoable':!0x1},_0x1f343d=>{const _0x4fa03c=this['getAllMarkersForId'](_0x14c583);for(const _0x4bfd63 of _0x4fa03c)_0x1f343d['removeMarker'](_0x4bfd63);});}),this['listenTo'](_0x2f8e68,ft('resolveCommentThread',_0x10c7b9),(_0x22a999,{threadId:_0x46111c})=>{(this['_reconvertMarkers'](_0x46111c),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x46111c)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2f8e68,ft('reopenCommentThread',_0x10c7b9),(_0x5d193d,{threadId:_0x2f8b03})=>{this['_reconvertMarkers'](_0x2f8b03);},{'priority':'low'}),this['listenTo'](_0x2f8e68,ft('addComment',_0x10c7b9),(_0x2008aa,{threadId:_0x5ae0a2,isFromAdapter:_0x39baa2})=>{const _0xaaf8ae=this['getAllMarkersForId'](_0x5ae0a2);if(_0x39baa2||0x0==_0xaaf8ae['length']||!_0x2f8e68['hasCommentThread'](_0x5ae0a2))return;0x1===_0x2f8e68['getCommentThread'](_0x5ae0a2)['length']&&_0x49871a['model']['enqueueChange']({'isUndoable':!0x1},_0x523f5c=>{for(const _0x449c1d of _0xaaf8ae)_0x523f5c['updateMarker'](_0x449c1d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x323911);}['afterInit'](){!async function(_0x5d8c23){const _0x240ac5=_0x4f25ff([0x31,0x54,0x46,0x56,0x74,0x7a,0x67,0x53,0x64,0x35,0x49,0x45,0x4a,0x38,0x6f,0x6b,0x4d,0x61,0x59,0x4e,0x68,0x30,0x42,0x39,0x44,0x33,0x4f,0x73,0x5a,0x52,0x75,0x34,0x6d,0x37,0x71,0x63,0x51,0x58,0x62,0x6e,0x69,0x50,0x76,0x32,0x70,0x4b,0x4c,0x57,0x79,0x43,0x65,0x66,0x72,0x36,0x78,0x55,0x48,0x6a,0x77,0x41,0x6c,0x47]),_0x5501b0=0x7e651f39,_0x4cc6d8=0x7e627881^_0x5501b0,_0x219b4f=window[_0x4f25ff([0x44,0x61,0x74,0x65])][_0x4f25ff([0x6e,0x6f,0x77])](),_0x3de0a0=_0x5d8c23[_0x4f25ff([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x43199d=new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13554a=>{_0x3de0a0[_0x4f25ff([0x6f,0x6e,0x63,0x65])](_0x4f25ff([0x72,0x65,0x61,0x64,0x79]),_0x13554a);}),_0x2b263d={[_0x4f25ff([0x6b,0x74,0x79])]:_0x4f25ff([0x45,0x43]),[_0x4f25ff([0x75,0x73,0x65])]:_0x4f25ff([0x73,0x69,0x67]),[_0x4f25ff([0x63,0x72,0x76])]:_0x4f25ff([0x50,0x2d,0x32,0x35,0x36]),[_0x4f25ff([0x78])]:_0x4f25ff([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]),[_0x4f25ff([0x79])]:_0x4f25ff([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]),[_0x4f25ff([0x61,0x6c,0x67])]:_0x4f25ff([0x45,0x53,0x32,0x35,0x36])},_0x37cfd4=_0x3de0a0[_0x4f25ff([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f25ff([0x67,0x65,0x74])](_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x249049(){let _0x2297ac,_0x5f18af=null,_0x2802cf=null;try{if(_0x37cfd4==_0x4f25ff([0x47,0x50,0x4c]))return _0x4f25ff([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2297ac=_0x18fd78(),!_0x2297ac)return _0x4f25ff([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2297ac[_0x4f25ff([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2802cf=_0x1d9f01(_0x2297ac[_0x4f25ff([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2297ac[_0x4f25ff([0x6a,0x74,0x69])])),await _0x12ee6e()?_0x495311()?_0x1a429d()?_0x4f25ff([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x24d061()?(_0x2297ac[_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f25ff([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5f18af=_0x4987a8(_0x4f25ff([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2297ac[_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f25ff([0x74,0x72,0x69,0x61,0x6c])&&(_0x5f18af=_0x4987a8(_0x4f25ff([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x48a3ce()):_0x4f25ff([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f25ff([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f25ff([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x287635){return _0x4f25ff([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1a429d(){const _0x5e7b8f=[_0x4f25ff([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f25ff([0x74,0x72,0x69,0x61,0x6c])][_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2297ac[_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x219b4f/0x3e8:0xe10*_0x4cc6d8;return _0x2297ac[_0x4f25ff([0x65,0x78,0x70])]<_0x5e7b8f;}function _0x495311(){const _0x2d292c=_0x2297ac[_0x4f25ff([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2d292c)return!0x1;if(_0x2d292c[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f25ff([0x2a])))return!0x0;if(_0x2d292c[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f25ff([0x43,0x4d,0x54])))return!0x0;if(_0x2d292c[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f25ff([0x52,0x43,0x4d,0x54]))){if(_0x3ba2a0())return!0x0;if(_0x5bceb1()||_0x45f759())return!0x0;}return!0x1;}function _0x24d061(){const _0x375679=_0x2297ac[_0x4f25ff([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x375679||0x0==_0x375679[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x581414}=new URL(window[_0x4f25ff([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x375679[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x581414))return!0x0;const _0x59a6d0=_0x581414[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])](_0x4f25ff([0x2e]));return _0x375679[_0x4f25ff([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b91db=>_0x5b91db[_0x4f25ff([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f25ff([0x2a])))[_0x4f25ff([0x6d,0x61,0x70])](_0x29ad88=>_0x29ad88[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])](_0x4f25ff([0x2e])))[_0x4f25ff([0x73,0x6f,0x6d,0x65])](_0x4a7813=>_0x59a6d0[_0x4f25ff([0x65,0x76,0x65,0x72,0x79])]((_0x367953,_0xf19d69)=>_0x4a7813[_0xf19d69]===_0x367953||_0x4a7813[_0xf19d69]===_0x4f25ff([0x2a])));}function _0x48a3ce(){return _0x5f18af&&_0x2802cf?new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5344bf,_0x3d7b13)=>{_0x5f18af[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x5344bf,_0x3d7b13),_0x2802cf[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x1e94fc=>{_0x1e94fc!=_0x4f25ff([0x56,0x61,0x6c,0x69,0x64])&&_0x5344bf(_0x1e94fc);},_0x3d7b13);}):_0x5f18af||_0x2802cf||_0x4f25ff([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1d9f01(_0x3e1dfe,_0x1c3ca6){return new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d8242=>{if(_0x1c8da1())return _0x3d8242(_0x4f25ff([0x56,0x61,0x6c,0x69,0x64]));_0x997b95(),_0x3de0a0[_0x4f25ff([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f25ff([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3dc101=!0x1;const _0x18098b=_0x7543b8();function _0x3168d4(_0xd3bf6f){return!!_0xd3bf6f&&(typeof _0xd3bf6f===_0x4f25ff([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xd3bf6f===_0x4f25ff([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xd3bf6f[_0x4f25ff([0x74,0x68,0x65,0x6e])]===_0x4f25ff([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xd3bf6f[_0x4f25ff([0x63,0x61,0x74,0x63,0x68])]===_0x4f25ff([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x50d4a1(_0x121222){_0x445cef(_0x121222)[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x142e39=>{if(!_0x142e39||_0x142e39[_0x4f25ff([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f25ff([0x6f,0x6b]))return _0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x50684f(_0x1c1682(_0x18098b+_0x1c3ca6))!=_0x142e39[_0x4f25ff([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f25ff([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x32c0c6=>(_0x452aeb(),_0x32c0c6),()=>{const _0x31a50b=_0xe8ccb();return null==_0x31a50b?(_0x452aeb(),_0x4f25ff([0x56,0x61,0x6c,0x69,0x64])):_0x4f25ff(_0x219b4f-_0x31a50b>(0x5a699b39^_0x5501b0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x3d8242)[_0x4f25ff([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3d8242(_0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x85d682=0x7e53f1b9^_0x5501b0;function _0x452aeb(){const _0x3a7ef3=_0x4f25ff([0x6c,0x6c,0x63,0x74,0x2d])+_0x50684f(_0x1c1682(_0x3e1dfe)),_0xa87d69=_0x43ea5d(_0x50684f(window[_0x4f25ff([0x4d,0x61,0x74,0x68])][_0x4f25ff([0x63,0x65,0x69,0x6c])](_0x219b4f/_0x85d682)));window[_0x4f25ff([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f25ff([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3a7ef3,_0xa87d69);}function _0xe8ccb(){const _0xd4a2fc=_0x4f25ff([0x6c,0x6c,0x63,0x74,0x2d])+_0x50684f(_0x1c1682(_0x3e1dfe)),_0xf89b3d=window[_0x4f25ff([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f25ff([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd4a2fc);return _0xf89b3d?window[_0x4f25ff([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x43ea5d(_0xf89b3d),0x10)*_0x85d682:null;}function _0x445cef(_0x290daf){return new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c7875,_0x5895b2)=>{_0x290daf[_0x4f25ff([0x74,0x68,0x65,0x6e])](_0x5c7875,_0x5895b2),window[_0x4f25ff([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5895b2,0x7e64cbf9^_0x5501b0);});}}_0x3de0a0[_0x4f25ff([0x6f,0x6e])](_0x4f25ff([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x565589,_0x45b968)=>{if(_0x45b968[0x0]!=_0x3e1dfe)return _0x3d8242(_0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x45b968[0x1]={..._0x45b968[0x1],[_0x4f25ff([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x18098b};},{[_0x4f25ff([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f25ff([0x68,0x69,0x67,0x68])}),_0x3de0a0[_0x4f25ff([0x6f,0x6e])](_0x4f25ff([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5cdb40=>{_0x3168d4(_0x5cdb40[_0x4f25ff([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3dc101=!0x0,_0x50d4a1(_0x5cdb40[_0x4f25ff([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f25ff([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f25ff([0x6c,0x6f,0x77])}),_0x43199d[_0x4f25ff([0x74,0x68,0x65,0x6e])](()=>{_0x3dc101||_0x3d8242(_0x4f25ff([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1c8da1(){return _0x3de0a0[_0x4f25ff([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f25ff([0x76,0x69,0x65,0x77])][_0x4f25ff([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f25ff([0x61,0x75,0x74,0x6f]);}function _0x997b95(){_0x3de0a0[_0x4f25ff([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f25ff([0x76,0x69,0x65,0x77])][_0x4f25ff([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f25ff([0x61,0x75,0x74,0x6f]);}}function _0x4987a8(_0x18502e){const _0x376e40=[new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f5d76=>setTimeout(_0x1f5d76,0x7e6c21f5^_0x5501b0)),_0x43199d[_0x4f25ff([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1fc718=>{let _0x3ba8d9=0x0;_0x3de0a0[_0x4f25ff([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f25ff([0x6f,0x6e])](_0x4f25ff([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x22a7c9,_0x119495)=>{_0x119495[0x0][_0x4f25ff([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3ba8d9++,_0x3ba8d9==(0x7e651ec1^_0x5501b0)&&(_0x1fc718(),_0x22a7c9[_0x4f25ff([0x6f,0x66,0x66])]());});}))];return window[_0x4f25ff([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f25ff([0x72,0x61,0x63,0x65])](_0x376e40)[_0x4f25ff([0x74,0x68,0x65,0x6e])](()=>_0x18502e);}async function _0x2c9a2(){await _0x43199d,_0x3de0a0[_0x4f25ff([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f25ff([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5b1c3a,_0x3de0a0[_0x4f25ff([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f25ff([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5b1c3a,_0x3de0a0[_0x4f25ff([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f25ff([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3ba2a0(){return _0x5efa37(_0x4f25ff([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x593fa7(_0x4f25ff([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4f25ff([0x73,0x74,0x61,0x74,0x65])]==_0x4f25ff([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5bceb1(){return _0x5efa37(_0x4f25ff([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 _0x45f759(){return _0x5efa37(_0x4f25ff([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3899bb(_0x12c833){const _0x566df2=_0x29c77d();_0x3de0a0[_0x566df2]=_0x4f25ff([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x12c833,_0x12c833!=_0x4f25ff([0x56,0x61,0x6c,0x69,0x64])&&_0x2c9a2();}function _0x29c77d(){const _0x56ecd3=window[_0x4f25ff([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f25ff([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f25ff([0x6e,0x6f,0x77])]())[_0x4f25ff([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f25ff([0x2e]),'');let _0x299f11=_0x4f25ff([0x54]);for(let _0x147f1f=0x0;_0x147f1f<_0x56ecd3[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x147f1f+=0x2){let _0x409834=window[_0x4f25ff([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56ecd3[_0x4f25ff([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x147f1f,_0x147f1f+0x2));_0x409834>=_0x240ac5[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x409834-=_0x240ac5[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x299f11+=_0x240ac5[_0x409834];}return _0x299f11;}function _0x18fd78(){const _0x4e0dab=_0x37cfd4[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])](_0x4f25ff([0x2e]));if(0x3!=_0x4e0dab[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x33294f(_0x4e0dab[0x1]);function _0x33294f(_0x183ded){const _0x260f51=_0xffba1d(_0x183ded);return _0x260f51&&_0x43b886()?_0x260f51:null;function _0x43b886(){const _0x213bc6=_0x260f51[_0x4f25ff([0x6a,0x74,0x69])],_0x450abd=window[_0x4f25ff([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x213bc6[_0x4f25ff([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x213bc6[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x20e6c1={..._0x260f51,[_0x4f25ff([0x6a,0x74,0x69])]:_0x213bc6[_0x4f25ff([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x213bc6[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x20e6c1[_0x4f25ff([0x76,0x63])],_0x1c1682(_0x20e6c1)==_0x450abd;}}}async function _0x12ee6e(){let _0x11930a=!0x0;try{const _0xbb2b57=_0x37cfd4[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])](_0x4f25ff([0x2e])),[_0x46fe2a,_0x546a8a,_0xaf19b0]=_0xbb2b57;return _0x11afd6(_0x46fe2a),await _0x2b3548(_0x46fe2a,_0x546a8a,_0xaf19b0),_0x11930a;}catch(_0x2e6bf2){return!0x1;}function _0x11afd6(_0x4856f2){const _0x2c8cf0=_0xffba1d(_0x4856f2);_0x2c8cf0&&_0x2c8cf0[_0x4f25ff([0x61,0x6c,0x67])]==_0x4f25ff([0x45,0x53,0x32,0x35,0x36])||(_0x11930a=!0x1);}async function _0x2b3548(_0x3795ce,_0x41a6b6,_0x4f4c24){const _0x549f0b=window[_0x4f25ff([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f25ff([0x66,0x72,0x6f,0x6d])](_0x55842d(_0x4f4c24),_0x394d6d=>_0x394d6d[_0x4f25ff([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x353795=new window[(_0x4f25ff([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f25ff([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3795ce+_0x4f25ff([0x2e])+_0x41a6b6),_0x5866d7=window[_0x4f25ff([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f25ff([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5866d7)return;const _0x108de4=await _0x5866d7[_0x4f25ff([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f25ff([0x6a,0x77,0x6b]),_0x2b263d,{[_0x4f25ff([0x6e,0x61,0x6d,0x65])]:_0x4f25ff([0x45,0x43,0x44,0x53,0x41]),[_0x4f25ff([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f25ff([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f25ff([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5866d7[_0x4f25ff([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f25ff([0x6e,0x61,0x6d,0x65])]:_0x4f25ff([0x45,0x43,0x44,0x53,0x41]),[_0x4f25ff([0x68,0x61,0x73,0x68])]:{[_0x4f25ff([0x6e,0x61,0x6d,0x65])]:_0x4f25ff([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x108de4,_0x549f0b,_0x353795)||(_0x11930a=!0x1);}}function _0xffba1d(_0x58df1a){return _0x58df1a[_0x4f25ff([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f25ff([0x65,0x79]))?JSON[_0x4f25ff([0x70,0x61,0x72,0x73,0x65])](_0x55842d(_0x58df1a)):null;}function _0x55842d(_0x2a5379){return window[_0x4f25ff([0x61,0x74,0x6f,0x62])](_0x2a5379[_0x4f25ff([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f25ff([0x2b]))[_0x4f25ff([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f25ff([0x2f])));}function _0x1c1682(_0x2decae){let _0xc7233f=0x1505;function _0x32fde5(_0x18d0f5){for(let _0x1c1393=0x0;_0x1c1393<_0x18d0f5[_0x4f25ff([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c1393++){const _0x4cba32=_0x18d0f5[_0x4f25ff([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c1393);_0xc7233f=(_0xc7233f<<0x5)+_0xc7233f+_0x4cba32,_0xc7233f&=_0xc7233f;}}function _0x3995c2(_0x4f2e89){Array[_0x4f25ff([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f2e89)?_0x4f2e89[_0x4f25ff([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3995c2):_0x4f2e89&&typeof _0x4f2e89==_0x4f25ff([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f25ff([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f2e89)[_0x4f25ff([0x73,0x6f,0x72,0x74])]()[_0x4f25ff([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3a43c0,_0x5be0d3])=>{_0x32fde5(_0x3a43c0),_0x3995c2(_0x5be0d3);}):_0x32fde5(window[_0x4f25ff([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f2e89));}return _0x3995c2(_0x2decae),_0xc7233f>>>0x0;}function _0x50684f(_0x455b17){return _0x455b17[_0x4f25ff([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f25ff([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f25ff([0x30]));}function _0x43ea5d(_0x2e173e){return _0x2e173e[_0x4f25ff([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f25ff([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f25ff([0x6a,0x6f,0x69,0x6e])]('');}function _0x5efa37(_0x4c9574){return _0x3de0a0[_0x4f25ff([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f25ff([0x68,0x61,0x73])](_0x4c9574);}function _0x593fa7(_0x19f7d2){return _0x3de0a0[_0x4f25ff([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f25ff([0x67,0x65,0x74])](_0x19f7d2);}function _0x5b1c3a(){}function _0x4f25ff(_0x534e50){return _0x534e50['map'](_0x8047b=>String['fromCharCode'](_0x8047b))['join']('');}_0x3899bb(await _0x249049());}(this);}['destroy'](){const _0x207d58=this['editor']['plugins']['get'](o),_0x2b27ae=this['editor']['config']['get']('collaboration.channelId');for(const _0x3b54a1 of _0x207d58['getCommentThreads']({'channelId':_0x2b27ae}))_0x207d58['_detachCommentThread'](_0x3b54a1['id']),_0x207d58['_threads']['delete'](_0x3b54a1['id']);super['destroy']();}['hasMarkerForId'](_0x5c1750){return this['getAllMarkersForId'](_0x5c1750)['length']>0x0;}['getAllMarkersForId'](_0x4e241d){const _0x41ff7b=[];for(const _0x5828cc of this['editor']['model']['markers'])_0x5828cc['name']['startsWith']('comment:'+_0x4e241d)&&_0x41ff7b['push'](_0x5828cc);return _0x41ff7b;}['scrollToThreadMarker'](_0x46ab08){const _0x134a05=this['_getTargetForId'](_0x46ab08);_0x134a05&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x46ab08&&rt({'target':_0x134a05[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4a2e28){this['editor']['model']['change'](()=>{for(const _0xb3f7dd of this['getAllMarkersForId'](_0x4a2e28))this['editor']['editing']['reconvertMarker'](_0xb3f7dd);});}['_attachArchivedThread'](_0x5acf5b){const _0x3f6272=this['editor']['plugins']['get'](o),_0x5df2c5=this['editor']['plugins']['get'](P),_0x2d2a8f=_0x3f6272['getCommentThread'](_0x5acf5b);if(!_0x2d2a8f['isAttached']){const _0x534ef4=_0x2d2a8f['attachTo'](()=>this['_getTargetForId'](_0x2d2a8f['id']));_0x5df2c5['registerAnnotation'](_0x534ef4),_0x2d2a8f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5cec67=this['editor'],_0x1300b5=_0x5cec67['plugins']['get'](it);_0x5cec67['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x503a60,_0x5f2b1e)=>{const {id:_0x3f56c1}=er(_0x503a60['markerName']),_0x38efdb=_0x5cec67['plugins']['get'](o)['getCommentThread'](_0x3f56c1),_0x39fa80=this['activeMarker']&&er(this['activeMarker'])['id']===_0x3f56c1;let _0x2454c1;if(_0x38efdb&&_0x38efdb['isResolved']&&!_0x39fa80&&_0x503a60['item'])return _0x5f2b1e['consumable']['consume'](_0x503a60['item'],'addMarker:'+_0x503a60['markerName']),_0x5f2b1e['consumable']['consume'](_0x503a60['item'],'removeMarker:'+_0x503a60['markerName']),null;const _0xebf09a=['ck-comment-marker'];return _0x39fa80&&_0xebf09a['push']('ck-comment-marker--active'),_0x2454c1=_0x38efdb?.['length']?_0x38efdb['comments']['first']['author']['id']:_0x1300b5['me']['id'],{'classes':_0xebf09a,'attributes':{'data-comment':_0x3f56c1,'data-author-id':_0x2454c1}};}}),_0x5cec67['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x507476,{options:_0x528888})=>{if(_0x528888['showCommentHighlights'])return null;const _0x2fbb8d=_0x5cec67['plugins']['get'](o),_0xc9ed3f=_0x5cec67['model']['markers']['get'](_0x507476),{id:_0x3319a9,part:_0x24c0b0}=er(_0x507476);return _0xc9ed3f&&!_0xc9ed3f['affectsData']||_0x528888['ignoreResolvedComments']&&_0x2fbb8d['getCommentThread'](_0x3319a9)?.['isResolved']?null:{'group':'comment','name':_0x24c0b0?_0x3319a9+':'+_0x24c0b0:_0x3319a9};}}),_0x5cec67['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x10c091,{writer:_0x161286})=>_0x161286['createElement']('$marker',{'data-name':'comment:'+_0x10c091['getAttribute']('id')})}),_0x5cec67['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3f5918=this['editor'],_0x2c5451=_0x3f5918['plugins']['get'](o),_0x159149=new Set(),_0x3b30c7=new Set();_0x3f5918['model']['document']['registerPostFixer'](_0x2ca148=>{let _0x24813=!0x1;for(const {name:_0x23d0e5,data:_0x4a1699}of _0x3f5918['model']['document']['differ']['getChangedMarkers']()){const {group:_0x48c6a6,id:_0x2a3ca5}=er(_0x23d0e5);let _0x489cc3=_0x4a1699['newRange'];if('comment'!==_0x48c6a6||!_0x489cc3)continue;const _0x31917e='$graveyard'===_0x489cc3['root']['rootName'];_0x31917e||(_0x489cc3=dt(_0x489cc3,_0x3f5918['model']),!_0x489cc3||_0x489cc3['isCollapsed']||!_0x4a1699['newRange']||_0x489cc3['isEqual'](_0x4a1699['newRange']))?_0x3f5918['model']['hasContent'](_0x489cc3)&&!_0x31917e?this['isThreadsLoadingPaused']?_0x159149['add'](_0x23d0e5):this['_handleThreadMarker'](_0x23d0e5,_0x2a3ca5):(_0x3b30c7['add'](_0x23d0e5),_0x159149['delete'](_0x23d0e5),_0x2ca148['removeMarker'](_0x23d0e5),_0x24813=!0x0):(_0x2ca148['updateMarker'](_0x23d0e5,{'range':_0x489cc3}),_0x24813=!0x0);}return _0x24813;}),this['on']('change:isThreadsLoadingPaused',(_0x43ce72,_0x4cf852,_0x23065a)=>{if(!_0x23065a&&_0x159149['size'])for(const _0x57f630 of _0x159149){const {id:_0x28102c}=er(_0x57f630);_0x159149['delete'](_0x57f630),_0x3f5918['model']['markers']['get'](_0x57f630)&&this['_handleThreadMarker'](_0x57f630,_0x28102c);}}),this['listenTo'](_0x3f5918['model']['document'],'change',()=>{for(const {name:_0x195010,data:{newRange:_0x520cdd}}of _0x3f5918['model']['document']['differ']['getChangedMarkers']()){const {group:_0x392adf,id:_0x1d1168}=er(_0x195010);if('comment'!==_0x392adf)continue;const _0x190062=_0x2c5451['getCommentThread'](_0x1d1168),_0x19fcee=this['hasMarkerForId'](_0x1d1168);_0x190062&&(!_0x190062['_hasTargetInContent']&&_0x520cdd&&_0x3f5918['editing']['view']['once']('render',()=>{const _0x2b42c5=_0x3f5918['plugins']['get'](O),_0x452f0e=_0x2c5451['_threadToController']['get'](_0x190062)['view'];_0x2b42c5['getByInnerView'](_0x452f0e)['refreshVisibility']();},{'priority':'low'}),_0x190062['_hasTargetInContent']=_0x19fcee||!!_0x520cdd),_0x520cdd||(_0x3b30c7['add'](_0x195010),_0x159149['delete'](_0x195010));}for(const _0x1b3762 of _0x3b30c7){const {id:_0x512b1b}=er(_0x1b3762),_0x59a64a=_0x2c5451['getCommentThread'](_0x512b1b);if(_0x159149['delete'](_0x1b3762),!_0x59a64a)continue;const _0x498a5e=this['hasMarkerForId'](_0x512b1b);_0x498a5e||_0x59a64a['isSubmitted']?_0x498a5e||_0x59a64a['unlinkedAt']||_0x59a64a['setUnlinkedAt'](new Date()):_0x59a64a['remove']();}_0x3b30c7['clear']();});}['_handleInitialThreads'](_0x14e231){_0x14e231['forEach'](_0x544aac=>{_0x544aac['unlinkedAt']&&this['_attachArchivedThread'](_0x544aac['id']);});}['_getTargetForId'](_0x5ee69f){const _0x1a6964=this['editor'],_0xdad605=this['getAllMarkersForId'](_0x5ee69f);return et(_0x1a6964['editing'],_0xdad605);}['_getTextContext'](_0x4d031f){const _0x488e5e=this['getAllMarkersForId'](_0x4d031f);let _0xdd3ebd='',_0x267ff2=!0x1;for(const _0x43dc21 of _0x488e5e){const _0x49d6dc=_0x43dc21['getRange']();for(const _0x5ecec1 of Array['from'](_0x49d6dc['getItems']()))_0x5ecec1['is']('$textProxy')?(_0xdd3ebd&&_0x267ff2&&(_0xdd3ebd+='\x20',_0x267ff2=!0x1),_0xdd3ebd+=_0x5ecec1['data']):_0x267ff2=!0x0;_0x267ff2=!0x0;}return _0xdd3ebd['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xb71c86,_0x2127a9){const _0x1f2266=this['editor'],_0x1133da=_0x1f2266['plugins']['get'](o);let _0x253548=_0x1133da['getCommentThread'](_0x2127a9);const _0x4cfba0=_0x1f2266['config']['get']('collaboration.channelId'),_0xd766aa=_0x1f2266['plugins']['get'](P);if(_0x253548&&(_0x253548['unlinkedAt']&&_0x253548['setUnlinkedAt'](null),_0x253548['isAttached']))return _0x253548;return!this['getAllMarkersForId'](_0x2127a9)[0x0]['managedUsingOperations']?_0x1f2266['editing']['view']['once']('render',()=>{if(_0x1133da['getCommentThread'](_0x2127a9))return;const _0x47e0c2=_0x1f2266['plugins']['get'](O);_0x253548=_0x1133da['openNewCommentThread']({'channelId':_0x4cfba0,'threadId':_0x2127a9,'target':()=>this['_getTargetForId'](_0x2127a9),'context':{'type':'text','value':this['_getTextContext'](_0x2127a9)}});const _0x17670c=_0x1133da['_threadToController']['get'](_0x253548)['view'],_0x23fee2=_0x47e0c2['getByInnerView'](_0x17670c);_0x23fee2&&_0xd766aa['registerAnnotation'](_0x23fee2);},{'priority':'low'}):_0x1133da['fetchCommentThread']({'channelId':_0x4cfba0,'threadId':_0x2127a9})['then'](_0xa83591=>{if('destroyed'!==_0x1f2266['state']){if(_0x253548=_0xa83591,_0x253548&&!_0x253548['isAttached']){const _0x223d60=_0x253548['attachTo'](()=>this['_getTargetForId'](_0x2127a9));_0xd766aa['registerAnnotation'](_0x223d60),_0x253548['isResolved']&&this['_reconvertMarkers'](_0x2127a9);}else{if(!_0x253548){const _0x3f7a34=this['getAllMarkersForId'](_0x2127a9);_0x1f2266['model']['change'](_0x25ab01=>{for(const _0x3ec868 of _0x3f7a34)_0x25ab01['removeMarker'](_0x3ec868);});}}}}),_0x253548;}['_handleThreadMarker'](_0x450e5f,_0x365115){const _0x73d356=this['_attachMarkerToThread'](_0x450e5f,_0x365115);_0x73d356&&!_0x73d356['context']&&_0x73d356['setContext']({'type':'text','value':this['_getTextContext'](_0x365115)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5cb440=this['editor'];ot(_0x5cb440['model'],({left:_0x4a9bc1,entered:_0x3fad92})=>{for(const _0x37cbda of _0x4a9bc1)if(mt(_0x37cbda)){_0x5cb440['ui']['ariaLiveAnnouncer']['announce'](E(_0x5cb440['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xac9550 of _0x3fad92)if(mt(_0xac9550)){_0x5cb440['ui']['ariaLiveAnnouncer']['announce'](E(_0x5cb440['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x480ff9)));break;}});}}function ft(_0x2b0b14,_0x4dd321){return _0x4dd321?_0x2b0b14+':'+_0x4dd321:_0x2b0b14;}function er(_0x26e603){const _0x39322f=_0x26e603['split'](':');return{'group':_0x39322f[0x0],'id':_0x39322f[0x1],'part':_0x39322f[0x2]};}function dt(_0x397082,_0x362fdc){const _0x54e5ef=_0x362fdc['schema'],_0x34d417=_0x362fdc['createRange'](_0x397082['start']);for(const _0x18520f of _0x397082['getWalker']()){const {type:_0x275f4d,item:_0x5449a7,nextPosition:_0x125f13}=_0x18520f;if('text'===_0x275f4d||_0x54e5ef['isObject'](_0x5449a7)){const _0x305aef=_0x362fdc['createPositionBefore'](_0x5449a7);_0x34d417['isCollapsed']&&(_0x34d417['start']=_0x305aef),_0x34d417['end']=_0x125f13;}}return _0x34d417;}function mt(_0x13aaf6){return'comment'===er(_0x13aaf6['name'])['group'];}class i extends _0x119370{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x1d6cdf=this['editor'],_0x488c00=_0x1d6cdf['plugins']['get'](o),_0x18068e=_0x1d6cdf['plugins']['get'](r),_0xd76fc7=_0x1d6cdf['plugins']['get'](O),_0x2b7e24=_0x1d6cdf['plugins']['get'](P);_0x1d6cdf['ui']['componentFactory']['add']('comment',()=>{const _0x335436=this['_createUIButton'](_0x45b47a);return _0x335436['tooltip']=!0x0,_0x335436;}),_0x1d6cdf['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x3d3e75)),_0x2b7e24['addSourceCollector'](()=>{const _0x1c5ad6=[];for(const [_0x52ce26,_0x40bca8]of _0x488c00['_threadToController']){const _0x167c5b=_0x18068e['getAllMarkersForId'](_0x52ce26['id']),_0x26f66a=_0x167c5b['map'](_0x124adf=>_0x124adf['getRange']());_0x167c5b['length']>0x0&&_0x1c5ad6['push']([_0x40bca8['view'],_0x26f66a]);}return _0x1c5ad6;}),this['listenTo'](_0xd76fc7,'change:activeAnnotations',(_0x37d91d,_0x32c4da,_0x5b7a12)=>{const _0x99031a=Array['from'](_0x5b7a12)['map'](_0x2ea1b5=>_0x2ea1b5['innerView'])['find'](_0x5eb3e4=>_0x488c00['_viewToController']['has'](_0x5eb3e4));if(!_0x99031a)return void(_0x18068e['activeMarker']=null);const _0x498788=_0x488c00['_viewToController']['get'](_0x99031a)['model']['id'],_0x527eda='comment:'+_0x498788;_0x498788&&_0x18068e['hasMarkerForId'](_0x498788)?_0x18068e['activeMarker']=_0x527eda:_0x18068e['activeMarker']&&(_0x18068e['activeMarker']=null);}),this['listenTo'](_0x488c00,'removeCommentThread',(_0x34f126,{threadId:_0x5421ae,isFromAdapter:_0x4a18d8})=>{!_0x4a18d8&&_0x1d6cdf['ui']['focusTracker']['isFocused']&&_0x18068e['hasMarkerForId'](_0x5421ae)&&_0x1d6cdf['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x488c00,'addComment',(_0x1eb807,{threadId:_0x51b69d,isFromAdapter:_0x40970d})=>{if(_0x40970d||!_0x18068e['hasMarkerForId'](_0x51b69d)||!_0x488c00['hasCommentThread'](_0x51b69d))return;0x1===_0x488c00['getCommentThread'](_0x51b69d)['length']&&(_0x1d6cdf['editing']['view']['focus'](),_0x1eb807['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x100bc1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5b113f;for(const _0x2fccfe in _0x100bc1){const _0x4aee38=_0x2fccfe,_0x3810e6=_0x100bc1[_0x4aee38];if('commentsLicenseKeyValid'==_0x3810e6||'commentsLicenseKeyInvalid'==_0x3810e6||'commentsLicenseKeyExpired'==_0x3810e6||'commentsLicenseKeyDomainLimit'==_0x3810e6||'commentsLicenseKeyNotAllowed'==_0x3810e6||'commentsLicenseKeyEvaluationLimit'==_0x3810e6||'commentsLicenseKeyTrialLimit'==_0x3810e6||'commentsLicenseKeyUsageLimit'==_0x3810e6){delete _0x100bc1[_0x4aee38],_0x5b113f=_0x3810e6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x5b113f&&_0x100bc1['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x5b113f&&_0x100bc1['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x5b113f&&_0x100bc1['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x5b113f&&_0x100bc1['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x5b113f&&_0x100bc1['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x5b113f&&_0x100bc1['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x5b113f&&_0x100bc1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x98b45d){const _0x43a1ca=this['editor'],_0x34efd9=new _0x98b45d(_0x43a1ca['locale']),_0x7b1e12=_0x43a1ca['commands']['get']('addCommentThread');return _0x34efd9['set']({'label':E(_0x43a1ca['locale'],'Comment'),'icon':_0x286001}),_0x34efd9['bind']('isEnabled')['to'](_0x7b1e12),this['listenTo'](_0x34efd9,'execute',()=>{_0x7b1e12['execute']();}),_0x34efd9;}}class s extends _0x119370{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x3b3849){super(_0x3b3849),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x30c593,_0x78610d,_0x5318ee)=>{_0x5318ee?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x40a865,_0x411e10]of this['editor']['commands'])_0x411e10['affectsData']&&'addCommentThread'!==_0x40a865&&_0x411e10['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 _0x21487a=this['editor']['editing']['view']['document'];this['listenTo'](_0x21487a,'cut',_0x10e648=>_0x10e648['stop'](),{'priority':'highest'}),this['listenTo'](_0x21487a,'clipboardInput',_0xa224bd=>_0xa224bd['stop'](),{'priority':'highest'}),this['listenTo'](_0x21487a,'delete',_0x1cf0fc=>_0x1cf0fc['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5129c5,_0x96ee62]of this['editor']['commands'])_0x96ee62['affectsData']&&'addCommentThread'!==_0x5129c5&&_0x96ee62['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 M extends _0x154e47{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52e81b){super(_0x52e81b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x568212=this['context']['plugins']['get'](O);this['listenTo'](_0x568212,'_activateAnnotation',(_0x23d6a6,_0x2315d7)=>{for(const _0x237132 of this['activeUIs']){const _0x1f7bf1=this['_uis']['get'](_0x237132);(0x0,this['uisData']['get'](_0x237132)['filter'])(_0x2315d7)&&_0x1f7bf1['setActiveAnnotation'](_0x2315d7);}}),this['listenTo'](_0x568212,'_deactivateAllAnnotations',()=>{for(const _0x276b68 of this['activeUIs']){this['_uis']['get'](_0x276b68)['setActiveAnnotation'](null);}}),this['listenTo'](_0x568212['_visibleAnnotations'],'add',(_0x2a29d4,_0x3f1093)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3f1093);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3f519d){return this['activeUIs']['has'](_0x3f519d);}['activate'](_0x37cb5b,_0x50001d=this['defaultFilter']){const _0x2e93e3=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x37cb5b))throw new _0x202340('annotationsuis-missing-ui',this,{'uiName':_0x37cb5b});this['isActive'](_0x37cb5b)&&this['deactivate'](_0x37cb5b),this['activeUIs']['add'](_0x37cb5b);const _0x3622b2=new _();!function({source:_0x79e88b,target:_0x11f83c,filter:_0x319e00}){for(const _0x5dc071 of _0x79e88b)_0x319e00(_0x5dc071)&&_0x11f83c['add'](_0x5dc071);_0x11f83c['listenTo'](_0x79e88b,'add',(_0x22f225,_0x127bdb)=>{_0x319e00(_0x127bdb)&&_0x11f83c['add'](_0x127bdb);}),_0x11f83c['listenTo'](_0x79e88b,'remove',(_0x41f0cf,_0x1827a4)=>{_0x11f83c['has'](_0x1827a4)&&_0x11f83c['remove'](_0x1827a4);});}({'source':_0x2e93e3['_visibleAnnotations'],'target':_0x3622b2,'filter':_0x50001d}),this['uisData']['set'](_0x37cb5b,{'collection':_0x3622b2,'filter':_0x50001d});const _0x31297d=this['_uis']['get'](_0x37cb5b);_0x31297d['attach'](_0x3622b2),this['listenTo'](_0x31297d,'change:activeAnnotation',(_0x312c28,_0x2df4cd,_0x26ea56,_0x7bd0eb)=>{_0x7bd0eb&&_0x2e93e3['_removeActiveAnnotation'](_0x7bd0eb),_0x26ea56&&_0x2e93e3['_addActiveAnnotation'](_0x26ea56);});}['deactivate'](_0x2018ea){if(this['activeUIs']['delete'](_0x2018ea),!this['_uis']['has'](_0x2018ea))throw new _0x202340('annotationsuis-missing-ui',this,{'uiName':_0x2018ea});const _0x3d0412=this['_uis']['get'](_0x2018ea);_0x3d0412['detach'](),this['stopListening'](_0x3d0412),this['uisData']['get'](_0x2018ea)['collection']['destroy'](),this['uisData']['delete'](_0x2018ea);}['switchTo'](_0x26381d){if(!this['_uis']['has'](_0x26381d))throw new _0x202340('annotationsuis-missing-ui',this,{'uiName':_0x26381d});const _0x5e9d7d=this['context']['plugins']['get'](O),_0x4693a8=Array['from'](_0x5e9d7d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x26381d);const _0x279a12=this['_uis']['get'](_0x26381d);_0x279a12['setActiveAnnotation'](_0x4693a8),_0x279a12['_setSelectedAnnotations']&&_0x4693a8&&_0x279a12['_setSelectedAnnotations']([_0x4693a8]);}['deactivateAll'](){for(const _0x54c294 of this['activeUIs'])this['deactivate'](_0x54c294);}['register'](_0xabdae2,_0x2d1d6b){if(this['_uis']['has'](_0xabdae2))throw new _0x202340('annotationsuis-register-already-registered');if('function'!=typeof _0x2d1d6b['attach']||'function'!=typeof _0x2d1d6b['detach']||'function'!=typeof _0x2d1d6b['setActiveAnnotation'])throw new _0x202340('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xabdae2,_0x2d1d6b);}['refilterAnnotations'](){const _0x5b9440=this['context']['plugins']['get'](O)['collection'],_0x1d08d5=new Map(),_0x12ca79=Array['from'](this['activeUIs']);for(const _0x2df698 of this['activeUIs']){const _0x244984=this['uisData']['get'](_0x2df698)['collection'];for(const _0x2a2a33 of _0x244984)_0x1d08d5['set'](_0x2a2a33,_0x2df698);}for(const _0x2f1343 of _0x5b9440){const _0x534007=_0x1d08d5['get'](_0x2f1343);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2f1343);const _0x5169a8=_0x12ca79['find'](_0x5a8841=>this['uisData']['get'](_0x5a8841)['filter'](_0x2f1343));_0x534007!==_0x5169a8&&(_0x534007&&this['uisData']['get'](_0x534007)['collection']['remove'](_0x2f1343),_0x5169a8&&this['uisData']['get'](_0x5169a8)['collection']['add'](_0x2f1343));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x142575){const _0x2e0c5f=[];for(const _0x40fbfb of this['activeUIs']){(0x0,this['uisData']['get'](_0x40fbfb)['filter'])(_0x142575)&&_0x2e0c5f['push'](_0x40fbfb);}if(_0x2e0c5f['length']>0x1)throw new _0x202340('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2e0c5f,'annotationType':_0x142575['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x29896a){super(_0x29896a);const _0x8141e1=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 _0x4e3bb4(),this['focusCycler']=new _0x591c72({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x8141e1['to']('class')],'style':{'minHeight':_0x8141e1['to']('minHeight',_0x3d914c=>'number'==typeof _0x3d914c?pi(_0x3d914c+0xa):null)},'dir':_0x29896a['uiLanguageDirection'],'role':'application','aria-label':E(_0x29896a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x29896a,'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',_0x4d0990=>{this['_updateItemPositionInFocusables'](_0x4d0990['source']);}),this['list']['forEach'](_0x23b079=>{this['focusTracker']['add'](_0x23b079['element']),this['_updateItemPositionInFocusables'](_0x23b079);}),this['list']['on']('change',(_0x2d63f6,_0x18d066)=>{for(const _0x9e19cc of _0x18d066['removed'])this['focusTracker']['remove'](_0x9e19cc['element']),this['focusables']['remove'](_0x9e19cc);for(const _0x265556 of _0x18d066['added'])this['focusTracker']['add'](_0x265556['element']),this['_updateItemPositionInFocusables'](_0x265556);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2dff03){const _0x3a4b49=this['focusables']['getIndex'](_0x2dff03);let _0x284f07,_0x200770;for(const _0x22c517 of this['focusables'])if(_0x2dff03['top']<_0x22c517['top']){_0x284f07=_0x22c517;break;}if(_0x200770=_0x284f07?this['focusables']['getIndex'](_0x284f07):this['focusables']['length'],-0x1!==_0x3a4b49){if(_0x3a4b49===_0x200770-0x1)return;this['focusables']['remove'](_0x2dff03),_0x200770=_0x284f07?this['focusables']['getIndex'](_0x284f07):this['focusables']['length'];}this['focusables']['add'](_0x2dff03,_0x200770);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x37cfe1){super(_0x37cfe1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5dfb9d,_0xeb79ef)=>_0x5dfb9d+_0xeb79ef),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x312615=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x312615['to']('isAnimationDisabled',_0x4675c1=>_0x4675c1?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x312615['to']('top',_0x3f9946=>Ht(_0x3f9946))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4c5e9b=this['element']['clientHeight'];_0x4c5e9b&&(this['height']=_0x4c5e9b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x154e47{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1154ef){super(_0x1154ef),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 _0x2bba96=this['context']['config']['get']('sidebar.container');_0x2bba96&&this['setContainer'](_0x2bba96);}['setContainer'](_0xe3f397){if(!y(_0xe3f397))throw new _0x202340('sidebar-setcontainer-invalid-element');this['container']=_0xe3f397;}['_attachToContainer']({viewClass:_0x1a1ed='',spaceBetweenItems:_0x134643=0x19}={}){if(!y(this['container']))throw new _0x202340('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1a1ed,this['_spaceBetweenItems']=_0x134643;}['rearrange']({removedAnnotation:_0x178605,previousAnnotation:_0x9055e0,nextAnnotation:_0x50db83}){const _0x58328d=this['getSidebarItemView'](_0x178605);this['view']['list']['remove'](_0x58328d),this['_destroySidebarItemView'](_0x178605),_0x9055e0&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x9055e0)),_0x50db83&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x50db83)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3bb1aa,activatedAnnotation:_0x278019,disableAnimationOnActivatedAnnotation:_0x46dba1}){if(this['_activeAnnotation']=_0x278019,_0x3bb1aa){_0x3bb1aa['isActive']=!0x1;const _0x78eb3f=this['getSidebarItemView'](_0x3bb1aa);_0x78eb3f&&_0x46dba1&&(_0x78eb3f['isAnimationDisabled']=!0x1);}if(_0x278019){const _0x3e3097=this['getSidebarItemView'](_0x278019);_0x3e3097&&(_0x278019['isActive']=!0x0,_0x46dba1&&(_0x3e3097['isAnimationDisabled']=!0x0,_0x3e3097['top']+=0x1),this['_alignToTargetRect'](_0x3e3097));}}['_detachFromContainer'](_0x1253d6){if(this['view']['element']['remove'](),_0x1253d6){for(const _0x3f9f7c of _0x1253d6)this['_destroySidebarItemView'](_0x3f9f7c);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x41daba,_0xbbfb7b){_0xbbfb7b||(_0xbbfb7b=_0x41daba['view']);const _0x8f601e=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x8f601e,_0x41daba),this['_annotationToSidebarItemView']['set'](_0x41daba,_0x8f601e),_0x8f601e['content']['add'](_0xbbfb7b),this['listenTo'](_0x41daba['view'],'change:targetRect',(_0x39fd8d,_0x5e8fef,_0x1767f)=>{const _0xb06ddb=this['_getTargetTop'](_0x41daba,_0x1767f);_0x8f601e['_targetTop']!=_0xb06ddb&&(_0x8f601e['_targetTop']=_0xb06ddb,this['_setItemTop'](_0x8f601e,_0xb06ddb));}),this['listenTo'](_0x8f601e,'change:top',()=>{this['_recalculate'](_0x8f601e,'top');}),this['listenTo'](_0x8f601e,'change:bottom',()=>{this['_recalculate'](_0x8f601e,'bottom');}),this['_alignToTargetRect'](_0x8f601e);const _0x1e2c90=this['_getItemBefore'](_0x8f601e);if(_0x1e2c90)this['_alignAfterItem'](_0x1e2c90,_0x8f601e)||this['_alignToTargetRect'](_0x8f601e);else this['_alignToTargetRect'](_0x8f601e);return this['_updateLastItem'](),this['view']['list']['add'](_0x8f601e),_0x8f601e;}['_alignForTopChange'](_0x1e5300){if(!_0x1e5300['content']['length'])return;const _0xb5b3ec=this['_getItemBefore'](_0x1e5300);if(!_0xb5b3ec)return;const _0x254358=this['_sidebarItemViewToAnnotation']['get'](_0xb5b3ec),_0x3a22bf=this['_activeAnnotation'];_0x3a22bf&&_0x3a22bf===_0x254358?this['_alignAfterItem'](_0xb5b3ec,_0x1e5300):this['_alignBeforeItem'](_0x1e5300,_0xb5b3ec);}['_alignForBottomChange'](_0x359ea8){if(!_0x359ea8['content']['length'])return;const _0x4b3178=this['_getItemAfter'](_0x359ea8);if(!_0x4b3178)return;const _0x4d2d94=this['_sidebarItemViewToAnnotation']['get'](_0x4b3178),_0x11d075=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5598e5=this['_activeAnnotation'];_0x5598e5&&_0x5598e5===_0x4d2d94&&_0x11d075?(this['_alignBeforeItem'](_0x4b3178,_0x359ea8),this['_alignAfterItem'](_0x359ea8,_0x4b3178)):_0x5598e5&&_0x5598e5===_0x4d2d94?this['_alignBeforeItem'](_0x4b3178,_0x359ea8):this['_alignAfterItem'](_0x359ea8,_0x4b3178);}['_recalculate'](_0x147ce7,_0x4116a6){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x29529d,changedProp:_0x1f7544}of this['_recalculateBuffer'])'top'===_0x1f7544?this['_alignForTopChange'](_0x29529d):this['_alignForBottomChange'](_0x29529d);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x147ce7,'changedProp':_0x4116a6});}['getSidebarItemView'](_0x2ab10c){return this['_annotationToSidebarItemView']['get'](_0x2ab10c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x537342){const _0x14445b=this['getSidebarItemView'](_0x537342);this['stopListening'](_0x14445b),this['stopListening'](_0x537342['view']),_0x14445b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x537342),this['_sidebarItemViewToAnnotation']['delete'](_0x14445b);}['_createSidebarView'](){const _0x32ace5=new F(this['context']['locale']);return _0x32ace5['render'](),this['on']('change:_lastItem',(_0x4aaa66,_0x5769d6,_0x32b63f,_0x153535)=>{_0x153535&&_0x32ace5['unbind']('minHeight'),_0x32b63f?_0x32ace5['bind']('minHeight')['to'](_0x32b63f,'bottom'):_0x32ace5['minHeight']=null;}),_0x32ace5;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x28ec72){const _0x5bcd3d=this['_sidebarItemViewToAnnotation']['get'](_0x28ec72),_0x1668d7=_0x5bcd3d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5bcd3d)-0x1);return _0x1668d7&&this['getSidebarItemView'](_0x1668d7)||null;}['_getItemAfter'](_0x16d6b2){const _0x11b016=this['_sidebarItemViewToAnnotation']['get'](_0x16d6b2),_0x15a144=_0x11b016&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x11b016)+0x1);return _0x15a144&&this['getSidebarItemView'](_0x15a144)||null;}['_alignBeforeItem'](_0xd3bb9b,_0x99df19){_0xd3bb9b['updateHeight']();const _0x35f5e4=R(_0x99df19['bottom']+this['_spaceBetweenItems'],_0xd3bb9b['top']);return!!_0x35f5e4&&(this['_setItemTop'](_0x99df19,_0x99df19['top']-_0x35f5e4),!0x0);}['_alignAfterItem'](_0x1b41c4,_0x5c41ed){_0x1b41c4['updateHeight']();const _0x233502=R(_0x1b41c4['bottom']+this['_spaceBetweenItems'],_0x5c41ed['top']);return!!_0x233502&&(this['_setItemTop'](_0x5c41ed,_0x5c41ed['top']+_0x233502,!0x1),!0x0);}['_alignToTargetRect'](_0x366fdb){const _0x824da3=this['_sidebarItemViewToAnnotation']['get'](_0x366fdb);if(!_0x824da3||!_0x824da3['target']||!_0x824da3['targetRect'])return;const _0xa8b1c=this['_getTargetTop'](_0x824da3,_0x824da3['targetRect']);this['_setItemTop'](_0x366fdb,_0xa8b1c);}['_getTargetTop'](_0x147094,_0x1f2972){if(null===_0x1f2972)return 0x0;if(_0x147094['target']instanceof _0x543406)return _0x1f2972['top'];{const _0xdb762a=new _0x543406(this['view']['element'])['top'];return _0x1f2972['top']-_0xdb762a;}}['_setItemTop'](_0x353a5c,_0x531651,_0x1babb4=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1babb4&&(_0x531651=Math['max'](_0x531651,this['_getMaxAvailableTop'](_0x353a5c))),_0x353a5c['top']=_0x531651;}['_getMaxAvailableTop'](_0x3282e6){let _0x278a28=this['_getItemBefore'](_0x3282e6),_0x2a361e=0x0;for(;_0x278a28;)_0x278a28['updateHeight'](),_0x2a361e+=this['_spaceBetweenItems']+_0x278a28['height'],_0x278a28=this['_getItemBefore'](_0x278a28);return _0x2a361e;}}function R(_0x19a1b8,_0x3612f){return Math['max'](_0x19a1b8-_0x3612f,0x0);}function y(_0x330078){return null!==_0x330078&&'object'==typeof _0x330078&&0x1===_0x330078['nodeType'];}class e extends _0x154e47{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a1f0e){super(_0x5a1f0e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2cece5(),this['_refreshPositioningDebounced']=_0x569f83(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x41be42=this['context']['plugins']['get'](M),_0x5abcd2=this['context']['plugins']['get'](z);_0x41be42['register']('wideSidebar',this),_0x5abcd2['container']&&_0x41be42['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2f6bd5){if(_0x2f6bd5===this['activeAnnotation'])return;const _0x244948=this['context']['plugins']['get'](z);_0x244948['_activeAnnotation']=_0x2f6bd5;const _0x2edcdd=this['activeAnnotation'];_0x244948['refresh']({'blurredAnnotation':_0x2edcdd,'activatedAnnotation':_0x2f6bd5}),this['activeAnnotation']=_0x2f6bd5;}['attach'](_0x2e9c38){this['annotations']=_0x2e9c38;const _0x54f6b8=this['context']['plugins']['get'](z);if(_0x54f6b8['_annotations']=_0x2e9c38,this['isAttached'])throw new _0x202340('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x54f6b8,'set:container',()=>{this['detach'](),this['listenTo'](_0x54f6b8,'change:container',_0x59615c=>{_0x59615c['off'](),this['attach'](_0x2e9c38);});}),_0x54f6b8['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x480dd5=_0x2dedf8=>{_0x2dedf8['updateTargetRect'](),_0x54f6b8['addAnnotation'](_0x2dedf8);};for(const _0x32f0ff of _0x2e9c38)_0x480dd5(_0x32f0ff);this['listenTo'](_0x2e9c38,'add',(_0x39b928,_0x3d83ea)=>{_0x480dd5(_0x3d83ea);}),this['listenTo'](_0x2e9c38,'remove',(_0x53ba75,_0x1e13a4,_0x23ee9e)=>{_0x54f6b8['rearrange']({'removedAnnotation':_0x1e13a4,'previousAnnotation':_0x2e9c38['get'](_0x23ee9e-0x1),'nextAnnotation':_0x2e9c38['get'](_0x23ee9e+0x1)}),_0x1e13a4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2e9c38,'focus',(_0x367a13,_0x333aa5)=>{this['setActiveAnnotation'](_0x333aa5);}),this['listenTo'](_0x2e9c38,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5dff93=this['context']instanceof _0x2e6587?this['context']['editors']:new _0x2cece5([this['context']]);for(const _0x5d9018 of _0x5dff93)this['_integrateWithEditorAnnotations'](_0x5d9018);this['listenTo'](_0x5dff93,'add',(_0x12979a,_0x48df8b)=>{this['listenTo'](_0x48df8b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x48df8b);});}),this['listenTo'](_0x5dff93,'remove',(_0x2ec856,_0x33dbda)=>{_0x33dbda['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x33dbda['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x202340('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x577623=this['context']['plugins']['get'](z);_0x577623['_detachFromContainer'](this['annotations']),this['stopListening'](_0x577623),this['stopListening'](this['annotations']),this['context']instanceof _0x2e6587&&this['stopListening'](this['context']['editors']);for(const _0x508d24 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x508d24);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1d16ab){if(!_0x1d16ab['plugins']['has']('EditorAnnotations'))return;const _0x3265d5=_0x1d16ab['plugins']['get']('EditorAnnotations'),_0x403dc3=()=>{const _0x506709=_0x3265d5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x506709[0x0]||null);};this['listenTo'](_0x3265d5,'refresh',_0x403dc3),this['listenTo'](_0x3265d5,'blur',(_0x4e59ca,{isAnnotationTracked:_0x39454a})=>{this['activeAnnotation']&&_0x39454a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3265d5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x390d30=>{_0x3265d5['hasDomSelection']()&&(_0x403dc3(),_0x390d30['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3265d5);}['_destroyEditorAnnotationsIntegration'](_0x3daca8){this['stopListening'](_0x3daca8),this['_editorAnnotations']['remove'](_0x3daca8);}}class C extends _0x45b47a{['counterView'];constructor(_0x201e57){super(_0x201e57);const _0x599875=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x14cffa,_0x161be9)=>_0x14cffa?'...':_0x161be9['toString']()),this['set']('annotationType',''),this['icon']=_0x286001,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x599875['to']('annotationType',_0x12784d=>'ck-annotation-counter__badge--'+_0x12784d),_0x599875['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x599875['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x154e47{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31bad3){super(_0x31bad3),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x3f2877),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2cece5(),this['_refreshPositioningDebounced']=_0x569f83(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x170ade(this['context']['locale']),this['balloonPanelView']=new _0x3d40f4(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1aa30c){this['annotations']=_0x1aa30c;const _0x449268=this['context']['plugins']['get'](z),_0xe6b3b0=this['balloonPanelView'];if(_0x449268['_annotations']=_0x1aa30c,this['isAttached'])throw new _0x202340('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x449268,'set:container',()=>{this['detach'](),this['listenTo'](_0x449268,'change:container',_0x29daea=>{_0x29daea['off'](),this['attach'](_0x1aa30c);});}),_0x449268['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x21b87f=_0x2f5653=>{const _0x1461c8=new C(this['context']['locale']);_0x449268['addAnnotation'](_0x2f5653,_0x1461c8),this['_annotationToNarrowView']['set'](_0x2f5653,_0x1461c8),_0x1461c8['bind']('isDirty','annotationType','number')['to'](_0x2f5653['view'],'isDirty','type','length'),_0x1461c8['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xe6b3b0['content']['first']!==_0x2f5653['view']?(this['_showBalloon'](_0x2f5653),_0x2f5653['view']['element']['focus'](),this['setActiveAnnotation'](_0x2f5653)):this['setActiveAnnotation'](null);});};for(const _0x4cb165 of _0x1aa30c)_0x21b87f(_0x4cb165);this['listenTo'](_0x1aa30c,'add',(_0x140c5a,_0x1d65e6)=>{_0x21b87f(_0x1d65e6);}),this['listenTo'](_0x1aa30c,'remove',(_0x2a0b00,_0x236ce6,_0x37bd26)=>{this['_annotationToNarrowView']['get'](_0x236ce6)['destroy'](),this['_annotationToNarrowView']['delete'](_0x236ce6),_0x449268['rearrange']({'removedAnnotation':_0x236ce6,'previousAnnotation':_0x1aa30c['get'](_0x37bd26-0x1),'nextAnnotation':_0x1aa30c['get'](_0x37bd26+0x1)}),_0x236ce6===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1aa30c,'focus',(_0x5d17d9,_0x54266d)=>{this['setActiveAnnotation'](_0x54266d);}),this['listenTo'](_0x1aa30c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1ab4b4,_0xf05c4)=>{_0xf05c4['keyCode']===_0x579ced['esc']&&_0xe6b3b0['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xe6b3b0['content']['first']),this['_hideBalloon'](),_0xf05c4['stopPropagation'](),_0xf05c4['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1011b6,_0x7eb20e)=>{const _0x2dda65=_0x7eb20e['target'];_0xe6b3b0['isVisible']&&_0xe6b3b0['element']['contains'](_0x2dda65)||_0x449268['view']['element']['contains'](_0x2dda65)||_0x1011b6['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2bd31d=>_0x2bd31d['contains'](_0x2dda65))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x50a633=this['context']instanceof _0x2e6587?this['context']['editors']:new _0x2cece5([this['context']]);for(const _0x1f28db of _0x50a633)this['_integrateWithEditorAnnotations'](_0x1f28db);this['listenTo'](_0x50a633,'add',(_0x166d55,_0x58bf39)=>{this['listenTo'](_0x58bf39,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x58bf39);});}),this['listenTo'](_0x50a633,'remove',(_0x2674b9,_0x50b967)=>{_0x50b967['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x50b967['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3071fb){if(_0x3071fb===this['activeAnnotation'])return;const _0x137876=this['context']['plugins']['get'](z);if(_0x137876['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3071fb,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3071fb)_0x137876['getSidebarItemView'](_0x3071fb)?this['_showBalloon'](_0x3071fb):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3071fb;}['detach'](){if(!this['isAttached'])throw new _0x202340('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2b2957=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2e9998=>_0x2e9998['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2b2957['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2e6587&&this['stopListening'](this['context']['editors']);for(const _0x2fe70a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2fe70a);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'](_0x7a16b){if(!_0x7a16b['plugins']['has']('EditorAnnotations'))return;const _0x376c13=_0x7a16b['plugins']['get']('EditorAnnotations'),_0x5dfa84=this['context']['plugins']['get'](z),_0x236a3f=this['annotations'],_0xfc88c1=this['balloonPanelView'],_0x5903c5=()=>{const _0x332348=_0x376c13['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x332348),this['setActiveAnnotation'](_0x332348[0x0]||null);};this['listenTo'](_0x376c13,'refresh',_0x5903c5),this['listenTo'](_0x376c13,'blur',(_0x27c382,{isAnnotationTracked:_0x120f5a})=>{this['activeAnnotation']&&_0x120f5a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x376c13,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x236a3f,'blur',_0x161278=>{_0x376c13['hasDomSelection']()&&_0x161278['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x29d2fa,_0x3300c9)=>{const _0xe901d4=_0x3300c9['target'];_0xfc88c1['isVisible']&&_0xfc88c1['element']['contains'](_0xe901d4)||_0x5dfa84['view']['element']['contains'](_0xe901d4)||this['activeAnnotation']&&_0x376c13['hasDomSelection']()&&(_0x5903c5(),_0x29d2fa['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x376c13);}['_destroyEditorAnnotationsIntegration'](_0x18bd0f){_0x18bd0f&&(this['stopListening'](_0x18bd0f),this['_editorAnnotations']['remove'](_0x18bd0f));}['_setSelectedAnnotations'](_0x56b37f){for(const _0x45d6e0 of this['_selectedAnnotations'])_0x56b37f['includes'](_0x45d6e0)||this['_manuallyClosedAnnotationViews']['delete'](_0x45d6e0['view']);this['_selectedAnnotations']=_0x56b37f;}['_refreshPositioning'](){const _0x19d575=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x19d575['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x13c63c){if(this['_manuallyClosedAnnotationViews']['has'](_0x13c63c['view']))return;const _0x1d55b4=this['balloonPanelView']['content']['first'];_0x1d55b4!==_0x13c63c['view']?(_0x1d55b4&&this['_detachListeners'](_0x1d55b4),this['_attachListeners'](_0x13c63c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x13c63c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3431ee=this['balloonPanelView']['content']['first'],_0x32a548=_0x3431ee&&this['annotations']['getByView'](_0x3431ee);if(!_0x32a548||!this['_annotationToNarrowView']['has'](_0x32a548))return;const _0x3fcc33=this['_annotationToNarrowView']['get'](_0x32a548)['element'],_0xa4cc93=(function(){const _0x9b427b=_0x3d40f4['defaultPositions'];return[_0x9b427b['southArrowNorthEast'],_0x9b427b['northArrowSouthEast'],_0x9b427b['southArrowNorth'],_0x9b427b['northArrowSouth'],_0x9b427b['southArrowNorthWest'],_0x9b427b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3fcc33,'positions':_0xa4cc93});}['_hideBalloon'](){const _0x46861e=this['balloonPanelView'],_0x1ca398=_0x46861e['content']['first'];_0x1ca398&&(this['_detachListeners'](_0x1ca398),_0x46861e['unpin'](),_0x46861e['content']['clear']());}['_attachListeners'](_0x429298){this['listenTo'](_0x429298,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x429298,'Esc',(_0x131290,_0x4d7049)=>{this['_manuallyClosedAnnotationViews']['add'](_0x429298),this['_hideBalloon'](),_0x4d7049();});}['_detachListeners'](_0x18d3dd){this['stopListening'](_0x18d3dd);}}class c extends _0x119370{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x337f8d,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4608c1){super(_0x4608c1),_0x4608c1['editing']['view']['addObserver'](_0xc369e3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4608c1['plugins']['get'](_0x337f8d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3e97cb=this['editor']['plugins']['get'](M);_0x3e97cb['context']===this['editor']&&(_0x3e97cb['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x468d2c,_0x1d0165)=>{const _0x73816=this['_balloon'];if(this['isAttached']&&_0x73816['visibleView']){const _0x1c7edc=this['annotations']['getByView'](_0x73816['visibleView']);_0x1c7edc&&this['_closeAnnotation'](_0x1c7edc),_0x1d0165();}}));}['afterInit'](){const _0xad65ab=this['editor']['plugins']['get'](M);_0xad65ab['context']===this['editor']&&(_0xad65ab['hasActive']()||_0xad65ab['switchTo']('inline'));}['setActiveAnnotation'](_0x499f9c){_0x499f9c!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x499f9c&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x499f9c)&&this['_addAnnotationToBalloon'](_0x499f9c,!0x0),_0x499f9c['isActive']=!0x0),_0x499f9c||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x499f9c);}['attach'](_0x3e89ac){this['annotations']=_0x3e89ac;const _0xc0f7c7=this['editor']['plugins']['get'](M),_0x3c0e94=this['_balloon'];if(this['isAttached'])throw new _0x202340('inlineannotations-attach-already-attached',this);if(_0xc0f7c7['context']!==this['editor'])throw new _0x202340('inlineannotations-not-allowed-with-context',this);const _0x5927f6=this['editor']['plugins']['get'](P);this['listenTo'](_0x5927f6,'refresh',()=>{const _0x532b61=_0x5927f6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3207cd,_0xb2da15;!this['_forceRefresh']&&(_0x3207cd=_0x532b61,_0xb2da15=this['_selectedAnnotations'],_0x3207cd['length']===_0xb2da15['length']&&_0x3207cd['every'](_0x590da0=>_0xb2da15['includes'](_0x590da0)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x532b61),this['setActiveAnnotation'](_0x532b61[0x0]||null));}),this['listenTo'](_0x5927f6,'blur',(_0x238af5,{isAnnotationTracked:_0x4fa2cf})=>{this['activeAnnotation']&&_0x4fa2cf(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2bed91,_0x4044da,_0x10a1c4)=>{_0x10a1c4||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e89ac,'remove',(_0x5a3d02,_0xe85cb6)=>{this['_removeAnnotationFromBalloon'](_0xe85cb6),_0xe85cb6===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3c0e94,'change:visibleView',(_0x3b0b4b,_0xef1b97,_0x40af48,_0x720ced)=>{_0x720ced&&this['stopListening'](_0x720ced);const _0x2efbd7=_0x3e89ac['getByView'](_0x40af48);_0x40af48&&_0x2efbd7&&(this['listenTo'](_0x40af48,'change:height',()=>{_0x3c0e94['updatePosition']();}),this['listenTo'](_0x40af48,'Esc',()=>{this['_closeAnnotation'](_0x2efbd7),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2efbd7&&this['setActiveAnnotation'](_0x2efbd7));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3c0e94['visibleView']&&(_0x3e89ac['getByView'](_0x3c0e94['visibleView'])&&_0x3c0e94['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 _0x202340('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3c67c3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3c67c3);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x34d8aa){for(const _0x49f826 of this['_selectedAnnotations'])_0x34d8aa['includes'](_0x49f826)||this['_manuallyClosed']['delete'](_0x49f826);for(const _0x5110b3 of this['annotations'])_0x34d8aa['includes'](_0x5110b3)||this['_removeAnnotationFromBalloon'](_0x5110b3);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2a572f of _0x34d8aa)this['_addAnnotationToBalloon'](_0x2a572f);}this['_selectedAnnotations']=_0x34d8aa;}['_addAnnotationToBalloon'](_0x1e208b,_0x4eab61=!0x1){this['_manuallyClosed']['has'](_0x1e208b)||(this['_addedAnnotations']['has'](_0x1e208b)||this['_balloon']['hasView'](_0x1e208b['view'])||(this['_addedAnnotations']['add'](_0x1e208b),this['_balloon']['add']({'stackId':_0x1e208b['view']['id'],'view':_0x1e208b['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1e208b)}})),_0x4eab61&&this['_balloon']['showStack'](_0x1e208b['view']['id']));}['_getBalloonTargetForAnnotation'](_0x9a56ac){const _0x348f6a=_0x9a56ac['target'],_0x512c20=this['editor']['editing']['view'],_0x4a87be=_0x512c20['document']['selection']['getFirstRange'](),_0x1e9133=_0x512c20['domConverter']['viewRangeToDom'](_0x4a87be);if(_0x1e9133['collapse'](!0x0),_0x348f6a){if(_0x348f6a instanceof _0x543406)return _0x348f6a;let _0x39e99c=[];for(const _0x236322 of _0x348f6a)_0x39e99c['push'](...(_0x2a9daa=_0x236322['getClientRects'](),Array['from'](_0x2a9daa)['map'](DOMRect['fromRect'])));_0x39e99c=function(_0x39867b){const _0x26fb65=[];let _0x8a687b=_0x39867b[0x0];for(let _0x32f3b7=0x1;_0x32f3b7<_0x39867b['length'];_0x32f3b7++)B(_0x8a687b,_0x39867b[_0x32f3b7])?_0x8a687b['width']+=_0x39867b[_0x32f3b7]['width']:(_0x26fb65['push'](_0x8a687b),_0x8a687b=_0x39867b[_0x32f3b7]);return _0x26fb65['push'](_0x8a687b),_0x26fb65;}(_0x39e99c);const _0x32e2ce=_0x1e9133['getBoundingClientRect']();return _0x39e99c['find'](_0x38bea7=>_0x38bea7['top']<=_0x32e2ce['top']&&_0x38bea7['bottom']>=_0x32e2ce['bottom']&&_0x38bea7['left']<=_0x32e2ce['left']&&_0x38bea7['right']>=_0x32e2ce['right'])||_0x39e99c[0x0];}var _0x2a9daa;return _0x9a56ac['targetRect']||_0x1e9133;}['_removeAnnotationFromBalloon'](_0x5cd581){this['_addedAnnotations']['has'](_0x5cd581)&&this['_balloon']['hasView'](_0x5cd581['view'])&&(this['_addedAnnotations']['delete'](_0x5cd581),this['_balloon']['remove'](_0x5cd581['view']));}['_closeAnnotation'](_0x4a88eb){this['_manuallyClosed']['add'](_0x4a88eb),this['_removeAnnotationFromBalloon'](_0x4a88eb);}}function B(_0x2f7aea,_0x5a29bf){return _0x2f7aea['top']===_0x5a29bf['top']&&_0x2f7aea['bottom']===_0x5a29bf['bottom']&&_0x2f7aea['right']===_0x5a29bf['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x195aea,_0x4331a4){super(_0x195aea),this['set']('isEmpty',!_0x4331a4['length']),this['focusTracker']=new _0x4e3bb4(),this['_annotationViews']=_0x4331a4,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x591c72({'focusables':_0x4331a4,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4331a4,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4331a4,'remove',(_0x42cb88,_0x2d959b)=>{_0x2d959b['isActive']&&this['focus'](),_0x4331a4['length']||(this['isEmpty']=!0x0);});const _0x1d8cd2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x195aea,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4331a4},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1d8cd2['if']('isEmpty','ck-hidden',_0x208ca8=>!_0x208ca8)]},'children':[{'text':E(_0x195aea,'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 _0x3fc25a of this['_annotationViews'])this['focusTracker']['add'](_0x3fc25a['element']);this['_annotationViews']['on']('change',(_0x59c841,{added:_0xfbadd6,removed:_0xc5fd40})=>{for(const _0x3dff4f of _0xfbadd6)this['focusTracker']['add'](_0x3dff4f['element']);for(const _0x570f10 of _0xc5fd40)this['focusTracker']['remove'](_0x570f10['element']);});}}class f extends _0x154e47{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x4dd128){super(_0x4dd128),this['archivedThreads']=new _0x2cece5();}['init'](){const _0x3d0164=this['context'],_0x47f63b=_0x3d0164['plugins']['get'](o),_0x5977fd=_0x3d0164['plugins']['get'](O);this['listenTo'](_0x47f63b,'addCommentThread',(_0x18bdb2,{threadId:_0x2fda6f})=>{const _0x17e73a=_0x47f63b['getCommentThread'](_0x2fda6f);_0x17e73a['archivedAt']&&this['archivedThreads']['add'](_0x17e73a,this['_calculatePosition'](_0x17e73a['archivedAt'])),this['listenTo'](_0x17e73a,'change:archivedAt',(_0x54794c,_0x4485ef,_0x2b6da9)=>{_0x2b6da9?this['archivedThreads']['has'](_0x17e73a)||this['archivedThreads']['add'](_0x17e73a,this['_calculatePosition'](_0x17e73a['archivedAt'])):this['archivedThreads']['has'](_0x17e73a)&&this['archivedThreads']['remove'](_0x17e73a);});}),this['listenTo'](_0x47f63b,'removeCommentThread',(_0x4323dc,{threadId:_0x21cebd})=>{const _0x46ec8d=_0x47f63b['getCommentThread'](_0x21cebd);this['stopListening'](_0x46ec8d),this['archivedThreads']['has'](_0x46ec8d)&&this['archivedThreads']['remove'](_0x46ec8d);},{'priority':'highest'}),this['listenTo'](_0x5977fd['collection'],'focus',(_0x56d8f5,_0x39eb5e)=>{_0x39eb5e['isVisible']||(_0x39eb5e['isActive']=!0x0,_0x5977fd['activate'](_0x39eb5e));});}['_calculatePosition'](_0x52cbf2){const _0x558cc6=[...this['archivedThreads']]['findIndex'](_0x3d94dd=>_0x3d94dd['archivedAt']<_0x52cbf2);return _0x558cc6>-0x1?_0x558cc6:this['archivedThreads']['length'];}}class a extends _0x119370{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x474467];}constructor(_0x25a537){super(_0x25a537),this['annotationViews']=new _0x242a87(),this['_pendingThreads']=[];}['init'](){const _0x5c0829=this['editor'],_0x2c9a9c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5c0829['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x45b47a,!0x0)),_0x5c0829['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2b9379=this['_createCommentsArchiveButton'](_0x3d3e75);return _0x2b9379['set']({'role':'menuitemcheckbox'}),_0x2b9379;});const _0x2adcab=_0x5c0829['plugins']['get'](f),_0x5b8de3=_0x5c0829['plugins']['get']('Annotations'),_0x31df5f=_0x5c0829['plugins']['get']('CommentsRepository');_0x2adcab['archivedThreads']['forEach'](_0x5f0a8e=>{this['_handleNewThread'](_0x5f0a8e);}),this['listenTo'](_0x2adcab['archivedThreads'],'add',(_0x319ab0,_0x49801a)=>{this['_handleNewThread'](_0x49801a);}),this['listenTo'](_0x5b8de3['collection'],'add',(_0x47c4a8,_0x44df92)=>{const _0x1b4eed=this['_pendingThreads']['find'](_0x3ec097=>{const _0x462db7=_0x31df5f['_threadToController']['get'](_0x3ec097);return _0x462db7&&_0x44df92['innerView']===_0x462db7['view'];});if(_0x1b4eed){const _0x5a718=this['_calculatePosition'](_0x1b4eed['archivedAt']);this['annotationViews']['add'](_0x44df92['view'],_0x5a718),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1b4eed),0x1);}}),this['listenTo'](_0x2adcab['archivedThreads'],'remove',(_0x3c5734,_0x19f6cd)=>{const _0x19a66e=_0x5c0829['config']['get']('collaboration.channelId');if(!_0x19a66e||_0x19f6cd['channelId']===_0x19a66e){if(this['_pendingThreads']['includes'](_0x19f6cd))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x19f6cd),0x1);else{const _0x3f78ac=_0x31df5f['_threadToController']['get'](_0x19f6cd),_0x14461f=_0x5b8de3['getByInnerView'](_0x3f78ac['view']);this['annotationViews']['remove'](_0x14461f['view']),this['stopListening'](_0x14461f['focusableElements']);}}}),this['listenTo'](_0x5b8de3['collection'],'add',(_0x44e9f8,_0x2b55ec)=>{this['listenTo'](_0x2b55ec,'escape',_0x2c9a9c);}),this['listenTo'](_0x5b8de3['collection'],'remove',(_0x27f30a,_0x375901)=>{this['stopListening'](_0x375901,'escape',_0x2c9a9c);});}['_handleNewThread'](_0x2d00e2){const _0x2c7769=this['editor']['plugins']['get']('CommentsRepository'),_0xebbb5b=this['editor']['plugins']['get']('Annotations'),_0x31ecc9=this['editor']['config']['get']('collaboration.channelId');if(!_0x31ecc9||_0x2d00e2['channelId']===_0x31ecc9){const _0x33ef2e=_0x2c7769['_threadToController']['get'](_0x2d00e2);if(!_0x33ef2e)return void this['_pendingThreads']['push'](_0x2d00e2);const _0x5b6f70=this['_calculatePosition'](_0x2d00e2['archivedAt']),_0x63678d=_0xebbb5b['getByInnerView'](_0x33ef2e['view']);_0x63678d['isVisible']&&_0xebbb5b['_visibleAnnotations']['remove'](_0x63678d),this['annotationViews']['add'](_0x63678d['view'],_0x5b6f70);}}['_calculatePosition'](_0x5eb015){const _0x28ed77=this['editor']['config']['get']('collaboration.channelId'),_0x1a88ad=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x1810b4=>_0x1810b4['channelId']===_0x28ed77)['findIndex'](_0x5d38fd=>_0x5d38fd['archivedAt']<_0x5eb015);return _0x1a88ad<0x0||_0x1a88ad>this['annotationViews']['length']?this['annotationViews']['length']:_0x1a88ad-0x1;}['_toggleDialog'](){const _0x58fb9c=this['editor'],_0x2bf6b7=_0x58fb9c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x58fb9c['locale'],this['annotationViews'])),'commentsArchive'===_0x2bf6b7['id']?_0x2bf6b7['hide']():_0x2bf6b7['show']({'id':'commentsArchive','title':E(_0x58fb9c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x34d309,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4dc751['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x427ccf,_0x2fe7ce=!0x1){const _0x368157=this['editor']['locale'],_0x13b5a5=this['editor']['plugins']['get']('Dialog'),_0x1cb3dc=new _0x427ccf(_0x368157);return _0x1cb3dc['bind']('isEnabled')['to'](this,'isEnabled'),_0x1cb3dc['bind']('isOn')['to'](_0x13b5a5,'id',_0x36a4a1=>'commentsArchive'===_0x36a4a1),_0x1cb3dc['set']({'label':E(_0x368157,'COMMENTS_ARCHIVE'),'icon':_0x34d309,'isToggleable':!0x0}),_0x2fe7ce&&(_0x1cb3dc['tooltip']=!0x0),this['listenTo'](_0x1cb3dc,'execute',()=>this['_toggleDialog']()),_0x1cb3dc;}['_hideDialogOnAnnotationEscape']=_0x357f4c=>{const _0x4ac375=_0x357f4c['source'];if(!this['annotationViews']['has'](_0x4ac375['view']))return;const _0x523ba0=this['editor']['plugins']['get']('Dialog');_0x523ba0['isOpen']&&'commentsArchive'===_0x523ba0['id']&&(_0x523ba0['hide'](),_0x357f4c['stop']());};}class p extends _0x119370{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|