@ckeditor/ckeditor5-comments 46.0.2-alpha.0 → 46.0.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x518b84={}){function _0x564eec(_0x71423e){return _0x71423e['map'](_0xd89761=>String['fromCharCode'](_0xd89761))['join']('');}(_0x518b84=Object['assign']({},_0x518b84))['plugins']||(_0x518b84['plugins']=Rt['defaultPlugins']),super(_0x518b84),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x564eec([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x564eec([0x76,0x69,0x65,0x77])][_0x564eec([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x564eec([0x61,0x75,0x74,0x6f]),this[_0x564eec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x564eec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x564eec([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x564eec([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x564eec([0x6f,0x6b])});}['create'](){const _0x38a115=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x38a115))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x190ed5=>{const _0x504444=this['model']['document']['getRoot'](),_0x4a1d38=_0x504444&&_0x504444['getChild'](_0x504444['childCount']-0x1);_0x190ed5['setSelection'](_0x4a1d38,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5c9fb1=this['editing']['view'],_0x3ad102=_0x5c9fb1['document']['getRoot'](),_0x3d6c2e=_0x3ad102['getChild'](0x0);_0x3ad102['childCount']>0x1||!_0x3d6c2e||'p'!=_0x3d6c2e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x5c9fb1,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3d6c2e['placeholder']=this['placeholder']),St({'view':_0x5c9fb1,'element':_0x3d6c2e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3d6c2e);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x59a49e,_0x4e3019={}){super(_0x59a49e),this['editor']=null,this['_editorConfig']=_0x4e3019,this['set']('value',_0x4e3019['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x59a49e,'Reply...')),this['set']('submitLabel',N(_0x59a49e,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x2daa7e(),this['focusCycler']=new _0x28ff4b({'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',(_0x241e9e,_0x2b2a13)=>{this['cancelButtonView']['fire']('execute'),_0x2b2a13();}),this['keystrokes']['set']('Ctrl+Enter',(_0xafd6a9,_0xcae494)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xcae494());}),this['on']('submit',(_0x1e1eeb,_0x66a014)=>{_0x66a014['length']>0xfde8?(alert(N(_0x59a49e,'TOO_LONG_COMMENT_ALERT',[_0x66a014['length'],0xfde8])),_0x1e1eeb['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2e7f85=this['editor'];this['element']['insertBefore'](_0x2e7f85['ui']['element'],this['element']['firstChild']),_0x2e7f85['model']['document']['on']('change',()=>this['value']=_0x2e7f85['getData']()),_0x2e7f85['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2e7f85['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x28e75d){-0x1===_0x28e75d?(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:_0x44e288}=this,_0x5b5de7=new _0x91c96a(_0x44e288);return _0x5b5de7['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5b5de7['withText']=!0x0,_0x5b5de7['bind']('label')['to'](this,'submitLabel'),_0x5b5de7['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5b5de7['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2c905a,_0x5b30a0)=>!_0x5b30a0&&!!_0x2c905a['trim']()),_0x5b5de7;}['_createCancelButton'](){const {locale:_0xc0b7b}=this,_0x34503d=new _0x91c96a(_0xc0b7b);return _0x34503d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x34503d['label']=N(_0xc0b7b,'Cancel'),_0x34503d['withText']=!0x0,_0x34503d['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x34503d;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x328caf=>{this['focusTracker']['add'](_0x328caf['element']);}),this['focusables']['on']('change',(_0x27cafb,_0xcfb41c)=>{for(const _0x395549 of Array['from'](_0xcfb41c['added'])['reverse']())this['focusTracker']['add'](_0x395549['element']);});}}class ie extends kt{constructor(_0x392c87,_0x5b9099,_0x261c59){super(_0x392c87),this['commentInputView']=new os(_0x392c87,_0x261c59),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1d6153,_0x2d0d1a)=>_0x1d6153||!!_0x2d0d1a),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 _0x42e47f(_0x392c87,_0x5b9099),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'](_0x478604){this['commentInputView']['focus'](_0x478604);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x24ee97,_0x10637d)=>{const {submitButtonView:_0xddfce8,cancelButtonView:_0x92911d,editor:_0x5aa9fb}=this['commentInputView'];[_0xddfce8['element'],_0x92911d['element'],_0x5aa9fb?_0x5aa9fb['editing']['view']['getDomRoot']():null]['filter'](_0x1c6fbb=>_0x1c6fbb)['some'](_0x5b6410=>_0x5b6410['contains'](_0x10637d['target']))||(this['focus'](),_0x10637d['preventDefault']());});}}class rs extends kt{constructor(_0x139481){super(_0x139481);const _0x5dfbf2=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5dfbf2['to']('count',_0x5dafe1=>N(_0x139481,'NUMBER_OF_COMMENTS',_0x5dafe1))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x28c495,_0x5e8e93,_0x1f754e){super(_0x28c495);const _0x1b24bc=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5e8e93['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5e8e93,this['_config']=_0x1f754e,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2daa7e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x28ff4b({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2279c3=>this['commentViews']['map'](_0x213e77=>_0x213e77['element'])['includes'](_0x2279c3['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x28c495),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xeebf76=>_0xeebf76-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5971a9 of _0x5e8e93['comments'])this['_handleNewCommentModel'](_0x5971a9);this['_handleInfoComment'](),this['listenTo'](_0x5e8e93['comments'],'add',(_0x5b3d5e,_0x12320a)=>{const _0x5adccc=this['_calculatePosition'](_0x12320a);this['length']++,this['_handleNewCommentModel'](_0x12320a,_0x5adccc),this['refreshVisibleViews']();}),this['listenTo'](_0x5e8e93['comments'],'remove',(_0x57a000,_0x43a34c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x43a34c),this['refreshVisibleViews']();}),this['listenTo'](_0x5e8e93,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5e8e93,'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',_0x1b24bc['if']('length','ck-hidden',_0x9f5f43=>!_0x9f5f43)],'aria-label':N(_0x28c495,'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'](_0x4b598f){-0x1===_0x4b598f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x376529 of this['commentViews'])_0x376529['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x819706,_0x314d23){const _0x8050fc=new this['_config']['CommentView'](this['locale'],_0x819706,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x8050fc['viewUid']=_0x819706['id'],_0x8050fc['delegate']('removeComment')['to'](this),_0x8050fc['delegate']('updateComment')['to'](this),_0x8050fc['delegate']('resolveCommentThread')['to'](this),_0x8050fc['delegate']('editorReady')['to'](this),_0x8050fc['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x8050fc,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x8050fc,_0x314d23);}['_calculatePosition'](_0x30df81){const _0x48970e=this['_model']['_findOptimalIndex'](_0x30df81);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x30df81['authoredAt']?_0x48970e-0x1:_0x48970e:_0x48970e-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4ed85f={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4ed85f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4ed85f));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x2828c1){const _0x526c6c=this['commentViews']['remove'](_0x2828c1['id']);this['stopListening'](_0x526c6c),_0x526c6c['isEditMode']&&this['_updateHasDirtyComment'](),_0x526c6c['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3509d4=>_0x3509d4['isEditMode']);}['_rearrangeCollapse'](){const _0x21618e=function(_0x4e771b){const _0x36281e=new _0x1bced8();for(const _0x3aa471 of _0x4e771b)_0x36281e['add'](_0x3aa471);return _0x36281e;}(this['commentViews']),_0x25a7ea=this['_collapsedCommentsView']['count'];for(let _0x1515d7=0x1;_0x1515d7<=_0x25a7ea;_0x1515d7++)_0x21618e['remove'](0x1);for(const _0x233037 of _0x21618e)_0x233037['collapse']();_0x25a7ea>0x0&&_0x21618e['add'](this['_collapsedCommentsView'],0x1),ns(_0x42b33f(Array['from'](this['visibleViews']),Array['from'](_0x21618e)),this['visibleViews'],_0x21618e);}['_rearrangeExpand'](){ns(_0x42b33f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x501565 of this['visibleViews'])_0x501565['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1becf2=>{this['focusTracker']['add'](_0x1becf2['element']),this['keystrokes']['listenTo'](_0x1becf2['element']);}),this['commentViews']['on']('change',(_0x3ad172,_0x19b36c)=>{for(const _0x745ff1 of _0x19b36c['removed'])this['focusTracker']['remove'](_0x745ff1['element']),this['keystrokes']['stopListening'](_0x745ff1['element']);for(const _0x39cac4 of Array['from'](_0x19b36c['added'])['reverse']())this['focusTracker']['add'](_0x39cac4['element']),this['keystrokes']['listenTo'](_0x39cac4['element']);});}}function ns(_0x3c9c03,_0x523aac,_0xefea94){let _0x431d1a=0x0;for(const _0x1608dc of _0x3c9c03)switch(_0x1608dc){case'insert':_0x523aac['add'](_0xefea94['get'](_0x431d1a),_0x431d1a),_0x431d1a++;break;case'delete':_0x523aac['remove'](_0x431d1a);break;case'equal':_0x431d1a++;}}class oe extends kt{constructor(_0x3acc26){super(_0x3acc26);const _0x23d122=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x23d122['to']('contextValue',_0x52977d=>N(_0x3acc26,'THREAD_CONTEXT_LABEL',_0x52977d)),'tabindex':-0x1},'children':[{'text':_0x23d122['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x56d4b3,_0x8243c){super(_0x56d4b3);const _0x15f94c=this['bindTemplate'];this['_model']=_0x8243c,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2daa7e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x28ff4b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5e16eb=>!!_0x5e16eb),this['bind']('contextValue')['to'](this['_model'],'context',_0x3c3d81=>_0x3c3d81&&_0x3c3d81['value']?this['_trimContextValue'](_0x3c3d81['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x15f94c['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 _0x41fb05=new _0x91c96a(this['locale']);return _0x41fb05['label']=N(this['locale'],'Reopen'),_0x41fb05['tooltip']=N(this['locale'],'Reopen'),_0x41fb05['icon']=_0x40eb3b,_0x41fb05['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x422654=>!_0x422654),_0x41fb05['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x22b6ac,_0x23ce3e)=>_0x22b6ac&&_0x23ce3e),_0x41fb05['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x41fb05;}['_trimContextValue'](_0xb3c6e6){if(_0xb3c6e6['length']<0x96)return _0xb3c6e6;const _0x5b732d=_0xb3c6e6['lastIndexOf']('\x20',0x93);return _0xb3c6e6['substring'](0x0,_0x5b732d>-0x1?_0x5b732d:0x93)+'...';}['_attachContextActions'](){const _0x5e1ac4=this['element']['querySelector']('.ck-context'),_0x5cb4e4=_0x5e1ac4['querySelector']('.ck-context__value');this['listenTo'](_0x5e1ac4,'mouseenter',()=>{_0x5cb4e4['offsetWidth']<_0x5cb4e4['scrollWidth']&&_0x5e1ac4['classList']['add']('overlay');}),this['listenTo'](_0x5e1ac4,'mouseleave',()=>{_0x5e1ac4['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xb4eee2 of this['focusables'])this['focusTracker']['add'](_0xb4eee2['element']),this['keystrokes']['listenTo'](_0xb4eee2['element']);}['_createContextView'](){const _0x355163=new oe(this['locale']);return _0x355163['bind']('contextValue')['to'](this),_0x355163;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3b4687,_0x397755,_0x5c74ae,_0x2f8789){super(_0x3b4687),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x397755,this['_localUser']=_0x5c74ae,this['_config']=_0x2f8789,this['commentThreadHeaderView']=new Yt(_0x3b4687,_0x397755),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x3b4687,N(_0x3b4687,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3b4687,_0x397755,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2f8789)),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',(_0x57cf59,_0x5b2787)=>_0x57cf59||!!_0x5b2787),this['bind']('isUnlinked')['to'](_0x397755,'unlinkedAt',_0x186553=>!!_0x186553),this['bind']('ariaLabel')['to'](this,'length',_0x2d07c5=>{const _0x5708ca=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2d07c5,_0x5708ca]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2daa7e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x28ff4b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xcd6a5e=>_0xcd6a5e['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x255f3a=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x494b9d=_0x255f3a['commentInputView'];return _0x255f3a['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x494b9d,'value',(_0xa42bc8,_0x586fcb,_0x487c50,_0x2da62b,_0x24f2e2)=>!!_0x24f2e2||!!_0x2da62b&&_0x487c50&&!_0x586fcb||_0xa42bc8&&_0x487c50&&!_0x586fcb),_0x494b9d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x58d8d3,_0x457c4e,_0x1538bc)=>{let _0x24e68b;return _0x24e68b=_0x1538bc&&_0x457c4e?'Reply\x20to\x20reopen\x20discussion...':_0x58d8d3?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x24e68b);}),_0x494b9d['bind']('submitLabel')['to'](this,'length',_0x56bb9e=>N(this['locale'],_0x56bb9e?'Reply':'Comment')),_0x494b9d['on']('submit',(_0x20d045,_0x492110)=>{this['fire']('addComment',_0x492110),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x494b9d['on']('cancel',()=>{this['focus']();}),_0x494b9d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x494b9d['on']('cancel',_0x53017c=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x53017c['stop']());}),this['on']('change:isActive',(_0x579a36,_0xe06dcc,_0x534448)=>{_0x534448||this['length']||_0x494b9d['value']||this['fire']('removeCommentThread');}),_0x255f3a;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x4dcdfa(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x167e6d,target:_0x13456a,type:_0xf4ef25,isVisible:_0x438bc0=!0x0}){super(),this['view']=_0x167e6d,this['view']['element']||this['view']['render'](),this['_type']=_0xf4ef25,this['_target']=_0x13456a,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1bced8([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x22d175,_0x2d7927)=>{this['view']['focusTracker']['add'](_0x2d7927);}),this['focusableElements']['on']('remove',(_0x5f1eed,_0x2fcc9e)=>{this['view']['focusTracker']['remove'](_0x2fcc9e);}),this['set']('isVisible',_0x438bc0);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4ee41d=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x4ee41d),_0x4ee41d;}get['targetRect'](){const _0x3ade09=this['target'];if(null===_0x3ade09)return null;if(_0x3ade09 instanceof _0x23c7a6)return _0x3ade09;const _0x2871ed=_0x3ade09['filter'](_0x3ee0d0=>function(_0x346c42){const _0x3418a3=_0x346c42['offsetParent'];if(_0x3418a3)return!0x0;const _0x2f6bb6=_0x346c42['getClientRects']()['item'](0x0);return!!_0x2f6bb6;}(_0x3ee0d0));return 0x0===_0x2871ed['length']?null:new _0x23c7a6(_0x2871ed[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5ec4f9){this['view']['isActive']=_0x5ec4f9,this['view']['mainView']['isActive']=_0x5ec4f9;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xbffdd){if(!(null===_0xbffdd||_0xbffdd instanceof _0x23c7a6||Array['isArray'](_0xbffdd)&&_0xbffdd['every'](_0x4b85fc=>fi(_0x4b85fc))))throw new _0x23ebbb('annotation-invalid-target',null,{'target':_0xbffdd});}['_getNormalizedTarget'](){const _0x20cb0f='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x20cb0f)?[_0x20cb0f]:_0x20cb0f;}}function fi(_0xa9ded5){return null!==_0xa9ded5&&'object'==typeof _0xa9ded5&&'nodeType'in _0xa9ded5&&0x1===_0xa9ded5['nodeType'];}class S extends _0x1bced8{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x26affa=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2daa7e(),this['_focusTracker']['on']('change:isFocused',(_0x239acc,_0x1852ad,_0x222249)=>{_0x222249||this['fire']('blur');});for(const _0x70f9f5 of _0x26affa)this['add'](_0x70f9f5);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2dd4d8){if(this['has'](_0x2dd4d8))throw new _0x23ebbb('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2dd4d8['innerView'],_0x2dd4d8),this['_viewToAnnotation']['set'](_0x2dd4d8['view'],_0x2dd4d8);for(const _0x55fc84 of _0x2dd4d8['focusableElements'])this['_focusTracker']['add'](_0x55fc84);this['listenTo'](_0x2dd4d8['focusableElements'],'add',(_0x488ecf,_0x379eaa)=>{this['_focusTracker']['add'](_0x379eaa);}),this['listenTo'](_0x2dd4d8['focusableElements'],'remove',(_0x29d055,_0x3dd70b)=>{this['_focusTracker']['remove'](_0x3dd70b);}),this['listenTo'](_0x2dd4d8['view']['focusTracker'],'change:isFocused',(_0x1a5074,_0x5bb2c1,_0x908eb2)=>{_0x908eb2&&this['fire']('focus',_0x2dd4d8);}),_0x2dd4d8['updateTargetRect']();const _0x270e88=this['_getOrderInContent'](_0x2dd4d8['view']['targetRect']);return super['add'](_0x2dd4d8,_0x270e88);}['remove'](_0x634288){if(!this['has'](_0x634288))throw new _0x23ebbb('annotationcollection-not-existing-item',null);this['stopListening'](_0x634288['view']['focusTracker']),this['stopListening'](_0x634288['focusableElements']);for(const _0x4bbf81 of _0x634288['focusableElements'])this['_focusTracker']['remove'](_0x4bbf81);return this['_viewToAnnotation']['delete'](_0x634288['view']),this['_innerViewToAnnotation']['delete'](_0x634288['innerView']),super['remove'](_0x634288);}['getByInnerView'](_0x10d1ee){return this['_innerViewToAnnotation']['get'](_0x10d1ee);}['getByView'](_0x1e79f4){return this['_viewToAnnotation']['get'](_0x1e79f4);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1df8ec of this)_0x1df8ec['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4f0af8=Array['from'](this)['sort']((_0x34ba64,_0x991d3f)=>w(_0x34ba64['view']['targetRect'],_0x991d3f['view']['targetRect']));for(let _0x18013e=_0x4f0af8['length']-0x1;_0x18013e>0x0;_0x18013e--){const _0x2ed498=_0x4f0af8[_0x18013e];_0x18013e!==this['getIndex'](_0x2ed498)&&(this['remove'](_0x2ed498),this['add'](_0x2ed498));}}['_getOrderInContent'](_0x8fd5d2){let _0x49e9e9=0x0;if(!_0x8fd5d2)return this['length'];for(const _0x4dfebb of this){const _0x14c895=_0x4dfebb['view']['targetRect'];if(_0x14c895){if(w(_0x8fd5d2,_0x14c895)<0x0)return _0x49e9e9;_0x49e9e9++;}}return _0x49e9e9;}}function v({source:_0x1cd0f8,target:_0x500130,filter:_0x42278e}){for(const _0x427c13 of _0x1cd0f8)_0x42278e(_0x427c13)&&_0x500130['add'](_0x427c13);_0x500130['listenTo'](_0x1cd0f8,'add',(_0x2ac0ae,_0x1e2ef2)=>{_0x42278e(_0x1e2ef2)&&_0x500130['add'](_0x1e2ef2);}),_0x500130['listenTo'](_0x1cd0f8,'remove',(_0x9204e2,_0x3c4bc7)=>{_0x500130['has'](_0x3c4bc7)&&_0x500130['remove'](_0x3c4bc7);});}function w(_0x358508,_0x292b16){if(null===_0x358508&&null===_0x292b16)return 0x0;if(null===_0x358508)return-0x1;if(null===_0x292b16)return 0x1;const _0x29d8ce=_0x358508['top']-_0x292b16['top'];return 0x0==_0x29d8ce?_0x358508['left']-_0x292b16['left']:_0x29d8ce;}class y extends _0x23a47b{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x444352){if(super(_0x444352),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x444352 instanceof _0x2d5867){const _0x55ed6d=_0x444352['locale'];_0x444352['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x55ed6d,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x55ed6d,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x55ed6d,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x55ed6d,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x55ed6d,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x55ed6d,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x55ed6d,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x448473){this['collection']['add'](_0x448473);}['remove'](_0x13f403){this['collection']['remove'](_0x13f403),_0x13f403['destroy']();}['refreshVisibility'](){for(const _0x46b3af of this['collection'])_0x46b3af['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x556b1b){return this['collection']['getByInnerView'](_0x556b1b);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2e448f of this['collection'])_0x2e448f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x13a85d){this['fire']('_activateAnnotation',_0x13a85d);}['createAnnotation'](_0x2b24ad){return new T(_0x2b24ad);}['createAnnotationView'](_0x5459c5,_0x25a850){return new E(_0x5459c5,_0x25a850);}['_addActiveAnnotation'](_0x93aa3f){const _0x496e2c=new Set(this['activeAnnotations']);_0x496e2c['add'](_0x93aa3f),this['activeAnnotations']=_0x496e2c;}['_removeActiveAnnotation'](_0x59ae47){const _0x563e20=new Set(this['activeAnnotations']);_0x563e20['delete'](_0x59ae47),this['activeAnnotations']=_0x563e20;}['_bindAnnotationsToVisibleAnnotations'](){const _0x34671a=this['collection'],_0x1385a3=this['_visibleAnnotations'];function _0x2eb4d8(_0x5a9478){const _0x8ac440=_0x5a9478['source'];_0x8ac440['isVisible']&&!_0x1385a3['has'](_0x8ac440)?_0x1385a3['add'](_0x8ac440):!_0x8ac440['isVisible']&&_0x1385a3['has'](_0x8ac440)&&_0x1385a3['remove'](_0x8ac440),_0x8ac440['view']['focusTracker']['remove'](_0x8ac440['view']['element']),_0x8ac440['view']['focusTracker']['add'](_0x8ac440['view']['element']);}this['listenTo'](_0x34671a,'add',(_0x3d1e5c,_0xa21923)=>{_0xa21923['isVisible']&&_0x1385a3['add'](_0xa21923),this['listenTo'](_0xa21923,'change:isVisible',_0x2eb4d8);}),this['listenTo'](_0x34671a,'remove',(_0x1e35ea,_0x3ef9ba)=>{_0x1385a3['has'](_0x3ef9ba)&&_0x1385a3['remove'](_0x3ef9ba),this['stopListening'](_0x3ef9ba,'change:isVisible',_0x2eb4d8);});}['_setupEnterAnnotationKeystroke'](){const _0x19f508=_0x348a13=>{_0x348a13['on']('ready',()=>{_0x348a13['keystrokes']['set'](_0x33b152,(_0x4a4e6a,_0x4f8484)=>{const _0x2e9830=_0x3f0c5c(this['activeAnnotations']['values']());_0x2e9830&&(_0x2e9830['view']['focus'](),_0x4f8484());});});};this['context']instanceof _0x2d5867?_0x19f508(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5c486d,_0xbe74ef)=>{_0x19f508(_0xbe74ef);});}['_setupEscapeAnnotationHandling'](){const _0x2a7779=_0x3fa398=>{const _0x40abd6=_0x3fa398['source'],_0x46c0a9=[];let _0xed1653;if(Array['isArray'](_0x40abd6['target'])){_0xed1653=_0x40abd6['target'][0x0],this['context']instanceof _0x2d5867?_0x46c0a9['push'](this['context']):this['context']['editors']&&_0x46c0a9['push'](...this['context']['editors']);for(const _0x328194 of _0x46c0a9)for(const _0x3189c8 of _0x328194['editing']['view']['domRoots']['values']())if(_0x3189c8['contains'](_0xed1653))return void _0x328194['editing']['view']['focus']();_0xed1653['focus']();}};this['listenTo'](this['collection'],'add',(_0x2ef425,_0x14a223)=>{this['listenTo'](_0x14a223,'escape',_0x2a7779,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x28976b,_0x2f486f)=>{this['stopListening'](_0x2f486f,'escape',_0x2a7779);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x23a47b{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2451a2){super(_0x2451a2),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3503c6=this['context']['config'];_0x3503c6['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3503c6['define']('comments.maxThreadTotalWeight',0x1f4),_0x3503c6['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3503c6['define']('comments.CommentThreadView',gt),_0x3503c6['define']('comments.CommentView',Tt),_0x3503c6['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2cd5e7=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1714b4,_0x31bfd3)=>this['_addCommentThread'](_0x31bfd3)),this['on']('submitCommentThread',(_0x83732f,_0x1800eb)=>this['_submitCommentThread'](_0x1800eb)),this['on']('resolveCommentThread',(_0x2d3900,_0x4fb75b)=>this['_resolveCommentThread'](_0x4fb75b)),this['on']('resolveCommentThread',(_0x334734,_0x2f639c)=>this['_updateActiveAnnotation'](_0x2f639c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x53f405,_0x44d550)=>this['_reopenCommentThread'](_0x44d550)),this['on']('reopenCommentThread',(_0x45cd8e,_0x46c1f3)=>this['_updateActiveAnnotation'](_0x46c1f3),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x31ae64,_0x55ec83)=>this['_removeCommentThread'](_0x55ec83)),this['on']('updateCommentThread',(_0x43a93a,_0x597abc)=>this['_updateCommentThread'](_0x597abc)),this['on']('updateCommentThread',(_0x566248,_0x3ff99d)=>this['_updateActiveAnnotation'](_0x3ff99d),{'priority':'lowest'}),this['on']('addComment',(_0x5ccb20,_0x3332f3)=>this['_addComment'](_0x3332f3)),this['on']('updateComment',(_0x39a8d0,_0x21f1f4)=>this['_updateComment'](_0x21f1f4)),this['on']('removeComment',(_0x586a0f,_0x319034)=>this['_removeComment'](_0x319034)),this['on']('addComment',(_0x192ff5,{threadId:_0x21bffb,isFromAdapter:_0x47b919})=>{if(_0x47b919)return;const _0xce18ca=this['getCommentThread'](_0x21bffb),_0x192528=_0xce18ca&&this['_threadToController']['get'](_0xce18ca);_0x192528&&_0x192528['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2cd5e7,'change:activeAnnotations',(_0x1a9034,_0x127e5d,_0x2fc29d)=>{const _0x500cbb=Array['from'](_0x2fc29d)['map'](_0x2482a9=>this['_viewToController']['get'](_0x2482a9['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x500cbb?_0x500cbb['model']:null;});}set['adapter'](_0x163576){if(this['_adapter'])throw new _0x23ebbb('commentsrepository-adapter-already-set');this['_adapter']=_0x163576;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2fabde=_t,threadId:_0x39a178=_0x1ed547(),comments:_0x58dae4=[],unlinkedAt:_0xb07f24=null,resolvedAt:_0x405bef=null,resolvedBy:_0x5828f2=null,target:_0x1f53b2=null,context:_0x5001e8=null,attributes:_0x493c76={},isResolvable:_0x2f2d13=!0x0,isSubmitted:_0x21c215=!0x1,isFromAdapter:_0x1f5083=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x2fabde),{'channelId':_0x2fabde,'threadId':_0x39a178,'comments':_0x58dae4,'unlinkedAt':_0xb07f24,'resolvedAt':_0x405bef,'resolvedBy':_0x5828f2,'target':_0x1f53b2,'context':_0x5001e8,'attributes':_0x493c76,'isFromAdapter':_0x1f5083,'isResolvable':_0x2f2d13,'isSubmitted':_0x21c215}),this['getCommentThread'](_0x39a178);}['openNewCommentThread']({channelId:_0x46b170=_t,threadId:_0x375b59=_0x1ed547(),target:_0x4811f5,context:_0x31c019=null,isResolvable:_0x21d3c6=!0x0}){if(this['_readOnlyChannels']['has'](_0x46b170)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4811f5)throw new _0x23ebbb('commentsrepository-missing-target');const _0xa939c7=this['addCommentThread']({'channelId':_0x46b170,'threadId':_0x375b59,'target':_0x4811f5,'context':_0x31c019,'isResolvable':_0x21d3c6});if(!_0xa939c7)return null;const _0x18423b=this['_threadToController']['get'](_0xa939c7),_0x16e76f=_0x18423b['view']['commentThreadInputView']['commentInputView'],_0x4abed5=this['context']['plugins']['get'](y),_0x57ef4c=_0x4abed5['getByInnerView'](_0x18423b['view']);return _0x4abed5['activate'](_0x57ef4c),_0x16e76f['once']('editorReady',()=>_0x16e76f['focus']()),_0xa939c7;}['hasCommentThread'](_0x1ca149){if('string'!=typeof _0x1ca149)throw new _0x23ebbb('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1ca149);}['updateCommentThread']({channelId:_0x2dc354=_t,threadId:_0x6861f3,context:_0x1125f8,unlinkedAt:_0xe898a1,attributes:_0x547f45,isFromAdapter:_0x3be599=!0x1}){return this['fire'](Nt('updateCommentThread',_0x2dc354),{'channelId':_0x2dc354,'threadId':_0x6861f3,'context':_0x1125f8,'unlinkedAt':_0xe898a1,'attributes':_0x547f45,'isFromAdapter':_0x3be599}),this['getCommentThread'](_0x6861f3);}['getCommentThread'](_0x4dcde4){if('string'!=typeof _0x4dcde4)throw new _0x23ebbb('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4dcde4);}['fetchCommentThread']({channelId:_0x5d5eef,threadId:_0x522a66}={}){const _0x238721=this['getCommentThread'](_0x522a66);if(_0x238721)return Promise['resolve'](_0x238721);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x23ebbb('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5d5eef,'threadId':_0x522a66})['then'](_0x44f6ec=>this['hasCommentThread'](_0x522a66)?this['getCommentThread'](_0x522a66):_0x44f6ec?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5d5eef},_0x44f6ec)):void 0x0)['catch'](_0x346c07=>{throw console['error'](_0x346c07),new _0x23ebbb('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3aef59,skipNotAttached:_0x41c6e9=!0x1,skipEmpty:_0x3a6874=!0x1,toJSON:_0x1cba93=!0x1}={}){const _0x4a7434=[];for(const _0x12a467 of this['_threads']['values']())_0x3aef59&&_0x12a467['channelId']!==_0x3aef59||_0x41c6e9&&!_0x12a467['isAttached']||_0x3a6874&&0x0===_0x12a467['length']||_0x4a7434['push'](_0x12a467);return _0x1cba93?_0x4a7434['map'](_0x2c5c7b=>_0x2c5c7b['toJSON']()):_0x4a7434;}['getAnnotationForCommentThread'](_0x230099){const _0xbc6623=this['_threadToController']['get'](_0x230099);if(!_0xbc6623)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0xbc6623['view'])||null;}['getCommentThreadForAnnotation'](_0x1e5a33){const _0x2d8860=this['_viewToController']['get'](_0x1e5a33['innerView']);return _0x2d8860?_0x2d8860['model']:null;}['setActiveCommentThread'](_0x3d5ff3){const _0x54550a=this['context']['plugins']['get'](y);if(!_0x3d5ff3)return void(this['activeCommentThread']&&_0x54550a['deactivateAll']());const _0x5b028e=this['getCommentThread'](_0x3d5ff3);if(!_0x5b028e)throw new _0x23ebbb('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3d5ff3});if(!this['_threadToController']['has'](_0x5b028e))throw new _0x23ebbb('commentsrepository-active-not-attached',null,{'threadId':_0x3d5ff3});const _0x402d93=_0x54550a['getByInnerView'](this['_threadToController']['get'](_0x5b028e)['view']);_0x54550a['activate'](_0x402d93);}['switchReadOnly'](_0x3c296d,_0x250ea7){_0x3c296d?this['_readOnlyChannels']['add'](_0x250ea7):this['_readOnlyChannels']['delete'](_0x250ea7),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4ea8d4){return this['_readOnlyChannels']['has'](_0x4ea8d4)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5cfc0f,_0xab2ca2){return new vt(_0x5cfc0f,_0xab2ca2);}['setPermissions'](_0x5bf100,_0x437a68=_t){this['_permissions']['set'](_0x437a68,_0x5bf100),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2dfaaf=_t){return this['_permissions']['has'](_0x2dfaaf)?this['_permissions']['get'](_0x2dfaaf):bt;}['_addCommentThread']({channelId:_0x1b0909,threadId:_0x4981ca,comments:_0x366f5d,unlinkedAt:_0x2db7f3,resolvedAt:_0x35498a,resolvedBy:_0x20a145,target:_0x46b4f9,context:_0x56bc9d,attributes:_0x4ea40c,isFromAdapter:_0x3c7b53,isResolvable:_0x17c242,isSubmitted:_0x4c7a2d}){if('string'!=typeof _0x4981ca)throw new _0x23ebbb('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4981ca});if(this['hasCommentThread'](_0x4981ca))throw new _0x23ebbb('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4981ca});const _0x43c27b=new pi(this,{'channelId':_0x1b0909,'id':_0x4981ca,'context':_0x56bc9d,'attributes':_0x4ea40c,'unlinkedAt':_0x2db7f3,'resolvedAt':_0x35498a,'resolvedBy':_0x20a145?this['context']['plugins']['get'](it)['getUser'](_0x20a145):null,'isResolvable':_0x17c242,'isSubmitted':_0x4c7a2d||_0x3c7b53});this['_threads']['set'](_0x4981ca,_0x43c27b);for(const _0x52234c of _0x366f5d)_0x43c27b['_add'](this['_createNewComment']({'threadId':_0x4981ca,..._0x52234c}));return _0x46b4f9&&_0x43c27b['attachTo'](_0x46b4f9),_0x3c7b53||!_0x43c27b['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1b0909,'threadId':_0x4981ca});}['_submitCommentThread']({channelId:_0x10b093,threadId:_0x2a252d}){if(!this['hasCommentThread'](_0x2a252d))throw new _0x23ebbb('commentsrepository-missing-comment-thread',this);const _0xcb54b3=this['getCommentThread'](_0x2a252d);if(_0xcb54b3['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x52a7e9,comments:_0x4bc958,resolvedAt:_0x497cf3,resolvedBy:_0x45958a,context:_0x18a9e7,attributes:_0x1eecc1}=_0xcb54b3,_0x4984b7=this['context']['plugins']['get']('PendingActions'),_0x301a86=_0x4984b7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x10b093,'threadId':_0x52a7e9,'comments':_0x4bc958['map'](_0x1f58bc=>_0x1f58bc['toJSON']()),'resolvedAt':_0x497cf3,'resolvedBy':_0x45958a?_0x45958a['id']:_0x45958a,'context':_0x18a9e7,'attributes':_0x1eecc1})['then'](({comments:_0x305788})=>{_0x4984b7['remove'](_0x301a86);for(const _0x4d8cba of _0x305788)this['_updateComment']({'channelId':_0x10b093,'threadId':_0x2a252d,'commentId':_0x4d8cba['commentId'],'createdAt':_0x4d8cba['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x528ff8=>{throw console['error'](_0x528ff8),new _0x23ebbb('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x26043d,target:_0x3bdbbb}){const _0x1f56eb=this['getCommentThread'](_0x26043d);if(!_0x1f56eb)throw new _0x23ebbb('commentsrepository-attach-missing-comment-thread',this);const _0x4aef1e=this['context']['plugins']['get']('PendingActions'),_0x5b419b=this['context']['plugins']['get'](y),_0x7a1807=this['_createCommentThreadView'](_0x1f56eb),_0x29655d=new vt(_0x1f56eb,_0x7a1807);let _0x21c418=null;_0x7a1807['on']('change:isDirty',(_0x21d27c,_0x49e501,_0x360689)=>{_0x360689?_0x21c418=_0x4aef1e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x21c418&&(_0x4aef1e['remove'](_0x21c418),_0x21c418=null);}),this['_threadToController']['set'](_0x1f56eb,_0x29655d),this['_viewToController']['set'](_0x7a1807,_0x29655d);const _0x55dfa7=new E(this['context']['locale'],_0x7a1807);_0x55dfa7['bind']('length')['to'](_0x7a1807),_0x55dfa7['bind']('isDirty')['to'](_0x7a1807,'isDirty',_0x7a1807,'length',(_0x11a8e7,_0x54fc44)=>_0x11a8e7||!_0x54fc44),_0x55dfa7['bind']('isActive')['to'](_0x7a1807),_0x55dfa7['type']='comment';const _0x1f6e80=new T({'view':_0x55dfa7,'target':_0x3bdbbb,'type':'comment','isVisible':!_0x1f56eb['archivedAt']&&!!('function'==typeof _0x3bdbbb?_0x3bdbbb():_0x3bdbbb)});return _0x7a1807['on']('escape',()=>{_0x1f6e80['fire']('escape');}),this['_bindAnnotationToEditors'](_0x7a1807,_0x1f6e80),_0x5b419b['add'](_0x1f6e80),_0x1f6e80;}['_bindAnnotationToEditors'](_0x302128,_0x1e48f8){this['listenTo'](_0x302128,'editorReady',(_0x4a4ca1,_0x3e0908)=>{const _0x192f91=_0x3e0908['ui']['view']['body']['bodyCollectionContainer'];_0x1e48f8['focusableElements']['add'](_0x192f91),this['context']instanceof _0x2d5867&&this['context']['ui']['focusTracker']['add'](_0x192f91);},{'priority':'highest'}),this['listenTo'](_0x302128,'editorDestroyed',(_0x38d364,_0x5ba6bc)=>{const _0x4ca2c9=_0x5ba6bc['ui']['view']['body']['bodyCollectionContainer'];_0x1e48f8['focusableElements']['has'](_0x4ca2c9)&&_0x1e48f8['focusableElements']['remove'](_0x4ca2c9),this['context']instanceof _0x2d5867&&this['context']['ui']['focusTracker']['remove'](_0x4ca2c9);});}['_unbindEditors'](_0x564b6a){this['stopListening'](_0x564b6a,'editorReady'),this['stopListening'](_0x564b6a,'editorDestroyed');}['_createCommentThreadView'](_0x12709e){const _0x58b832=this['context']['plugins']['get'](it),{config:_0x3ec1da,locale:_0x3ff601}=this['context'],_0x1b8273=pt(_0x3ec1da['get']('locale'),_0x3ff601);return new(0x0,(_0x3ec1da['get']('comments'))['CommentThreadView'])(_0x3ff601,_0x12709e,_0x58b832['me'],{'editorConfig':{..._0x3ec1da['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3ec1da['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3ec1da['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3ec1da['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3ec1da['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1b8273,'CommentView':_0x3ec1da['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x477bc2,channelId:_0x94ffab,resolvedAt:_0x500462,resolvedBy:_0x3a86d0,isFromAdapter:_0x496a63}){if(!this['hasCommentThread'](_0x477bc2))throw new _0x23ebbb('commentsrepository-missing-comment-thread',null,{'threadId':_0x477bc2});const _0x20c7c8=this['getCommentThread'](_0x477bc2);if(_0x20c7c8['isResolved'])throw new _0x23ebbb('commentsrepository-resolved-comment-thread',null,{'threadId':_0x477bc2});const _0x1287c5=this['context']['plugins']['get'](it);if(_0x20c7c8['resolvedBy']=_0x1287c5['getUser'](_0x3a86d0),_0x20c7c8['resolvedAt']=_0x500462,_0x496a63||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x21a78f=this['context']['plugins']['get']('PendingActions'),_0x44b048=_0x21a78f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x94ffab,'threadId':_0x477bc2})['then'](({resolvedAt:_0x64a120,resolvedBy:_0x4fd269})=>{_0x21a78f['remove'](_0x44b048),_0x20c7c8['resolvedBy']['id']!==_0x4fd269&&(_0x20c7c8['resolvedBy']=_0x1287c5['getUser'](_0x4fd269)),_0x20c7c8['resolvedAt']=_0x64a120;})['catch'](_0x4031be=>{throw console['error'](_0x4031be),new _0x23ebbb('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x278628,channelId:_0x5ec0ea,isFromAdapter:_0x2e34a6}){if(!this['hasCommentThread'](_0x278628))throw new _0x23ebbb('commentsrepository-missing-comment-thread',null,{'threadId':_0x278628});const _0x14ec7f=this['getCommentThread'](_0x278628);if(!_0x14ec7f['isResolved'])throw new _0x23ebbb('commentsrepository-reopen-comment-thread',null,{'threadId':_0x278628});if(_0x14ec7f['resolvedBy']=null,_0x14ec7f['resolvedAt']=null,_0x2e34a6||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x463ec4=this['context']['plugins']['get']('PendingActions'),_0x2eb071=_0x463ec4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5ec0ea,'threadId':_0x278628})['then'](()=>_0x463ec4['remove'](_0x2eb071))['catch'](_0x3a64f4=>{throw console['error'](_0x3a64f4),new _0x23ebbb('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x46b778,isFromAdapter:_0x1f22f5}){const _0x22dcc7=this['getCommentThread'](_0x46b778);if(!_0x22dcc7)throw new _0x23ebbb('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x46b778),this['_threads']['delete'](_0x46b778),!_0x22dcc7['isSubmitted']||_0x1f22f5||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5a8a36=this['context']['plugins']['get']('PendingActions'),{channelId:_0x594f7a}=_0x22dcc7,_0x4713f2=_0x5a8a36['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x594f7a,'threadId':_0x46b778})['then'](()=>_0x5a8a36['remove'](_0x4713f2))['catch'](_0x5935f7=>{throw console['error'](_0x5935f7),new _0x23ebbb('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x95dac4,unlinkedAt:_0x427501,context:_0x55cc40,attributes:_0x1ccbe3,isFromAdapter:_0xa2e14d}){if('string'!=typeof _0x95dac4)throw new _0x23ebbb('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x95dac4});if(!this['hasCommentThread'](_0x95dac4))throw new _0x23ebbb('commentsrepository-missing-comment-thread',null,{'threadId':_0x95dac4});const _0x43fa27=this['getCommentThread'](_0x95dac4);let _0x179293=!0x1;if(void 0x0!==_0x55cc40&&_0x43fa27['context']!==_0x55cc40&&(_0x43fa27['context']=_0x55cc40,_0x179293=!0x0),void 0x0!==_0x427501&&_0x43fa27['unlinkedAt']!==_0x427501&&(_0x43fa27['unlinkedAt']=_0x427501,_0x179293=!0x0),_0x1ccbe3&&!At(_0x1ccbe3,_0x43fa27['attributes'])&&(_0x43fa27['attributes']=_0x1ccbe3,_0x179293=!0x0),!_0x179293)return Promise['resolve']();if(!_0x43fa27['isSubmitted']||_0xa2e14d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x53c03d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x6dd240}=_0x43fa27,_0x1ed13b=_0x53c03d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x6dd240,'threadId':_0x95dac4,'context':_0x55cc40,'unlinkedAt':_0x427501,'attributes':_0x1ccbe3})['then'](()=>_0x53c03d['remove'](_0x1ed13b))['catch'](_0x5b19fa=>{throw console['error'](_0x5b19fa),new _0x23ebbb('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4d9619){const _0x1b7e0b=this['context']['plugins']['get'](y),_0x1707a5=this['getCommentThread'](_0x4d9619);if(_0x1707a5['_isAttached']=!0x1,this['_threadToController']['has'](_0x1707a5)){const _0x3bdfbc=this['_threadToController']['get'](_0x1707a5),_0x1bf0b7=_0x3bdfbc['view'],_0x22e49a=_0x1b7e0b['getByInnerView'](_0x1bf0b7);this['_threadToController']['delete'](_0x1707a5),this['_viewToController']['delete'](_0x1bf0b7),_0x22e49a&&_0x1b7e0b['remove'](_0x22e49a),_0x3bdfbc['destroy'](),_0x1bf0b7['destroy']()['then'](()=>{this['_unbindEditors'](_0x1bf0b7);});}}['_updateActiveAnnotation']({threadId:_0x181a4c,resolvedAt:_0x2243e7,unlinkedAt:_0x5b9561}){const _0x1d5862=!!_0x2243e7,_0x5eb650=this['context']['plugins']['get'](y),_0x4b7d7d=this['getCommentThread'](_0x181a4c);if(this['_threadToController']['has'](_0x4b7d7d)){const _0x381626=this['_threadToController']['get'](_0x4b7d7d)['view'],_0x3dcb62=_0x5eb650['getByInnerView'](_0x381626);_0x3dcb62&&(_0x1d5862&&_0x5eb650['_removeActiveAnnotation'](_0x3dcb62),_0x5b9561?_0x3dcb62['isVisible']=!0x1:_0x3dcb62['refreshVisibility']());}}['_getExternalAuthor'](_0x15db40){const _0x3c1c2e=this['context']['plugins']['get'](it),_0x4d0030=It('external:'+_0x15db40),_0x5383f5=_0x3c1c2e['getUser'](_0x4d0030);return _0x5383f5||_0x3c1c2e['addUser']({'id':_0x4d0030,'name':_0x15db40});}['_createNewComment']({threadId:_0x557072,commentId:_0x5cb0a2=_0x1ed547(),content:_0x275870,authorId:_0x157690,createdAt:_0x2c8205,attributes:_0x19d159}){if('string'!=typeof _0x5cb0a2)throw new _0x23ebbb('commentsrepository-invalid-commentid');if('string'!=typeof _0x157690)throw new _0x23ebbb('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x275870||!_0x275870['trim']())throw new _0x23ebbb('commentsrepository-invalid-comment-content');const _0x27c8fd=this['context']['plugins']['get'](it)['getUser'](_0x157690);if(!_0x27c8fd)throw new _0x23ebbb('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x157690});let _0x9b3ec1=null,_0x47de5f=_0x2c8205;return _0x19d159?.['@external']&&(_0x9b3ec1=this['_getExternalAuthor'](_0x19d159['@external']['authorName']),_0x47de5f=new Date(_0x19d159['@external']['createdAt'])),new wi(this,{'threadId':_0x557072,'id':_0x5cb0a2,'author':_0x9b3ec1||_0x27c8fd,'creator':_0x27c8fd,'content':_0x275870,'createdAt':_0x2c8205,'authoredAt':_0x47de5f,'attributes':_0x19d159});}['_addComment'](_0x3ac393){let {threadId:_0x308cf2,content:_0x4dc711,attributes:_0x59038c,isFromAdapter:_0x126f64}=_0x3ac393;const _0x33f980=this['getCommentThread'](_0x3ac393['threadId']);if(!_0x33f980)throw new _0x23ebbb('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3f319f=this['_createNewComment'](_0x3ac393),{id:_0x5c6528}=_0x3f319f;if(_0x33f980['_add'](_0x3f319f),_0x126f64||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x33f980['isSubmitted'])return Promise['resolve']();const _0x5a3c9f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x36a231}=_0x33f980,_0x200e76=_0x5a3c9f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x59038c||(_0x59038c={}),this['adapter']['addComment']({'channelId':_0x36a231,'threadId':_0x308cf2,'commentId':_0x5c6528,'content':_0x4dc711,'attributes':_0x59038c})['then'](_0x3d0257=>{_0x5a3c9f['remove'](_0x200e76),_0x3d0257&&this['_updateComment']({'channelId':_0x36a231,'threadId':_0x308cf2,'commentId':_0x5c6528,'createdAt':_0x3d0257['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3b256a=>{throw console['error'](_0x3b256a),new _0x23ebbb('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x45d567,commentId:_0x1d003b,content:_0x5e076a,createdAt:_0x1fdadb,attributes:_0x2705e8,isFromAdapter:_0x5e0b4c}){if(void 0x0!==_0x5e076a&&('string'!=typeof _0x5e076a||!_0x5e076a['trim']()['length']))throw new _0x23ebbb('commentsrepository-update-comment-invalid-content');const _0x1fb6df=this['getCommentThread'](_0x45d567),_0x3b3c39=_0x1fb6df['getComment'](_0x1d003b);if(!_0x3b3c39)throw new _0x23ebbb('commentsrepository-update-missing-comment',this);let _0x56664a=!0x1;if(_0x5e076a&&_0x5e076a!==_0x3b3c39['content']&&(_0x3b3c39['isEditable']||_0x5e0b4c)&&(_0x3b3c39['content']=_0x5e076a,_0x56664a=!0x0),_0x1fdadb&&_0x1fdadb!==_0x3b3c39['createdAt']&&(_0x3b3c39['createdAt']=_0x1fdadb,_0x3b3c39['attributes']&&_0x3b3c39['attributes']['@external']||(_0x3b3c39['authoredAt']=_0x1fdadb),_0x56664a=!0x0),_0x2705e8&&!At(_0x2705e8,_0x3b3c39['attributes'])&&(_0x3b3c39['attributes']=_0x2705e8,_0x56664a=!0x0),!_0x56664a)return Promise['resolve']();if(_0x1fb6df['fire']('commentUpdated'),_0x5e0b4c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x18e501=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4be68f}=this['getCommentThread'](_0x3b3c39['threadId']),_0x4f742d=_0x18e501['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4be68f,'threadId':_0x45d567,'commentId':_0x1d003b,'content':_0x5e076a,'attributes':_0x2705e8})['then'](()=>_0x18e501['remove'](_0x4f742d))['catch'](_0x56268f=>{throw console['error'](_0x56268f),new _0x23ebbb('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x462f93,commentId:_0x863cff,isFromAdapter:_0x142c74}){const _0x594d4f=this['getCommentThread'](_0x462f93),_0x1bdc5d=_0x594d4f['getComment'](_0x863cff);if(!_0x1bdc5d)throw new _0x23ebbb('commentsrepository-remove-missing-comment',this);if(_0x594d4f['_remove'](_0x1bdc5d),_0x142c74||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x32babc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e7831}=_0x594d4f,_0x29f16c=_0x32babc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1e7831,'threadId':_0x462f93,'commentId':_0x863cff})['then'](()=>_0x32babc['remove'](_0x29f16c))['catch'](_0x57b4fe=>{throw console['error'](_0x57b4fe),new _0x23ebbb('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x4dcdfa(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x26bb05,_0x3b7ac4){super();const _0x1c2802=_0x26bb05['context']['plugins']['get'](it)['me'],_0x162b0d=_0x26bb05['getCommentThread'](_0x3b7ac4['threadId']),_0x52c1dc=0x0===_0x162b0d['comments']['length'],_0x481900=_0x1c2802===_0x3b7ac4['author'];this['id']=_0x3b7ac4['id'],this['threadId']=_0x3b7ac4['threadId'],this['author']=_0x3b7ac4['author'],this['creator']=_0x3b7ac4['creator'],this['isExternal']=Boolean(_0x3b7ac4['attributes']&&_0x3b7ac4['attributes']['@external']),this['set']('content',_0x3b7ac4['content']),this['createdAt']=_0x3b7ac4['createdAt']||new Date(),this['set']('authoredAt',_0x3b7ac4['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x162b0d,'resolvedAt'),this['set']('attributes',_0x3b7ac4['attributes']||{}),this['bind']('isEditable')['to'](_0x26bb05,'_permissions',()=>{const _0x4f9fe7=_0x26bb05['getPermissions'](_0x162b0d['channelId'])['write'],_0x2b9432=_0x26bb05['getPermissions'](_0x162b0d['channelId'])['modifyAll'];return _0x481900&&_0x4f9fe7||!_0x481900&&_0x2b9432;}),this['bind']('isRemovable')['to'](_0x162b0d,'isRemovable',_0x26bb05,'_permissions',_0x944868=>{const _0x231384=_0x26bb05['getPermissions'](_0x162b0d['channelId'])['write'],_0x25097f=_0x26bb05['getPermissions'](_0x162b0d['channelId'])['modifyAll'];return _0x481900&&_0x231384||_0x944868&&_0x52c1dc||!_0x481900&&_0x25097f&&!_0x52c1dc;}),this['bind']('isReadOnly')['to'](_0x162b0d,'isReadOnly'),this['_repository']=_0x26bb05;}get['weight'](){return Math['max'](function(_0x44b977){const _0x3ec678=document['createElement']('div');return _0x3ec678['innerHTML']=_0x44b977,_0x3ec678['textContent']['length'];}(this['content']),0xc8);}['update'](_0xd996f3){const {threadId:_0x2cf728,id:_0x13153f}=this;if(!this['_repository']['hasCommentThread'](_0x2cf728))throw new _0x23ebbb('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x51c677}=this['_repository']['getCommentThread'](_0x2cf728);this['_repository']['fire'](Nt('updateComment',_0x51c677,_0x2cf728),{'channelId':_0x51c677,'threadId':_0x2cf728,'commentId':_0x13153f,..._0xd996f3});}['setAttribute'](_0xfd1921,_0x3aebeb){const _0x53d8da=wt(this['attributes']);yt(_0x53d8da,_0xfd1921,_0x3aebeb),this['update']({'attributes':_0x53d8da});}['removeAttribute'](_0x5d2d46){const _0x33e85e=wt(this['attributes']);Ct(_0x33e85e,_0x5d2d46),this['update']({'attributes':_0x33e85e});}['remove'](_0x4772dc={}){if(!_0x4772dc['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2df29d,id:_0x50cf4f}=this;if(!this['_repository']['hasCommentThread'](_0x2df29d))throw new _0x23ebbb('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x50ea08}=this['_repository']['getCommentThread'](_0x2df29d);this['_repository']['fire'](Nt('removeComment',_0x50ea08,_0x2df29d),{'channelId':_0x50ea08,'threadId':_0x2df29d,'commentId':_0x50cf4f,..._0x4772dc});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x5d8748,..._0x210e57){for(const _0x266d85 of _0x210e57)void 0x0!==_0x266d85&&(_0x5d8748+=':'+String(_0x266d85));return _0x5d8748;}class ot extends _0x429cf5{constructor(_0x5ecdbf){super(_0x5ecdbf),this['set']('hasContent',!0x1);}['refresh'](){const _0x13cbab=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4ca3c of _0x13cbab['getRanges']())if(this['_hasContent'](_0x4ca3c))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x7839f2=_0x1ed547(),ranges:_0x332463,comment:_0x1cb933}={}){const _0x410d72=this['editor']['model'],_0x1e8de5=_0x332463??Array['from'](_0x410d72['document']['selection']['getRanges']()),_0xe7c5d5=[];for(const _0x15d520 of _0x1e8de5)this['_hasContent'](_0x15d520)&&_0xe7c5d5['push'](this['_trimToContent'](_0x15d520));if(!_0xe7c5d5['length'])throw new _0x23ebbb('addcommentthreadcommand-incorrect-ranges',null);_0x1cb933&&this['_createCommentThread'](_0x7839f2,_0x1cb933),this['_createMarkersFromRanges'](_0x7839f2,_0xe7c5d5,!!_0x1cb933);}['_createMarkersFromRanges'](_0x255691,_0x2f674d,_0x3e8513){this['editor']['model']['change'](_0x27453d=>{for(const _0x33b17c of _0x2f674d){const _0x5b32fc=_0x1ed547()['substr'](0x1,0x5),_0x9e9d5d='comment:'+_0x255691+':'+_0x5b32fc;_0x27453d['addMarker'](_0x9e9d5d,{'range':_0x33b17c,'usingOperation':_0x3e8513,'affectsData':_0x3e8513});}});}['_createCommentThread'](_0x102563,_0xdbcebf){const _0x3b0202=this['editor']['plugins']['get']('CommentsRepository'),_0x449044=this['editor']['config']['get']('collaboration.channelId'),_0xf22783=this['editor']['plugins']['get']('Users')['me'];if(!_0xf22783)throw new _0x23ebbb('addcommentthreadcommand-user-not-found',null);_0x3b0202['addCommentThread']({'threadId':_0x102563,'channelId':_0x449044,'comments':[{'authorId':_0xf22783['id'],'content':_0xdbcebf,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x111370){for(const _0x1dc8ec of _0x111370['getItems']())if(this['_itemIsContent'](_0x1dc8ec))return!0x0;return!0x1;}['_itemIsContent'](_0x2c9b8b){return _0x2c9b8b['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x2c9b8b)&&!_0x2c9b8b['is']('element','tableCell');}['_trimToContent'](_0xcddd6){const _0x3d0d24=_0x4564af=>!this['_itemIsContent'](_0x4564af['item']),_0x1ef03f=_0xcddd6['start']['getLastMatchingPosition'](_0x3d0d24),_0x25e752=_0xcddd6['end']['getLastMatchingPosition'](_0x3d0d24,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1ef03f,_0x25e752);}}class b extends _0x568675{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x476495){super(_0x476495),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x599484=this['editor'],_0x4d6f71=_0x599484['model']['document']['selection'],_0x333e5a=_0x3636f3(()=>this['refreshSelectedViews'](),0xa);_0x4d6f71['on']('change:range',(_0x3345b9,_0x140acb)=>{_0x140acb['directChange']&&(_0x333e5a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x599484['editing']['view']['document'],'change:isFocused',(_0x61c7f0,_0x37c148,_0x325ee4)=>{_0x325ee4&&_0x333e5a();}),this['listenTo'](_0x599484['ui']['focusTracker'],'change:isFocused',(_0x59dbfe,_0x116753,_0x742650)=>{_0x742650||this['fire']('blur',{'isAnnotationTracked':_0x2620d1=>this['_editorAnnotationsData']['has'](_0x2620d1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3f9b76){if(this['_editorAnnotations']['has'](_0x3f9b76['view']))return;this['_editorAnnotations']['add'](_0x3f9b76['view']),this['editor']['ui']['focusTracker']['add'](_0x3f9b76['view']['element']);const _0x679152=this['editor']['plugins']['get'](y);this['listenTo'](_0x679152['collection'],'remove',(_0x2658b8,_0x3f3517)=>{this['editor']['ui']['focusTracker']['remove'](_0x3f3517['view']['element']),this['_editorAnnotations']['delete'](_0x3f3517['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5547b2){if('function'!=typeof _0x5547b2)throw new _0x23ebbb('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5547b2);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2a0596,annotations:_0x5481a5}){const _0x3dc3b9=[],_0x276f4b=this['editor']['model']['document']['selection'],_0x58c1da=Array['from'](_0x276f4b['getRanges']());for(const [_0x47be57,_0x5ec537]of this['_editorAnnotationsData']){const _0xfe0140=_0x13a65f(_0x5ec537),_0x17da3e=_0x5481a5['getByInnerView'](_0x47be57);_0xfe0140&&_0x17da3e&&_0x3dc3b9['push']({'annotation':_0x17da3e,'range':_0xfe0140});}function _0x13a65f(_0x565837){for(const _0x2bb568 of _0x565837)for(const _0x2f5b28 of _0x58c1da)if(_0x2bb568['containsRange'](_0x2f5b28,!_0x276f4b['isCollapsed']))return _0x2bb568;return null;}return _0x3dc3b9['sort']((_0x72c994,_0x1f1d03)=>{const _0x11af0b=_0x72c994['range'],_0x41ef54=_0x1f1d03['range'];if(!_0x11af0b['isEqual'](_0x41ef54)){if(_0x11af0b['containsRange'](_0x41ef54,!0x0))return 0x1;if(_0x41ef54['containsRange'](_0x11af0b,!0x0))return-0x1;}return _0x72c994['annotation']==_0x2a0596?-0x1:_0x1f1d03['annotation']==_0x2a0596?0x1:0x0;})['map'](_0x5be25e=>_0x5be25e['annotation']);}get['_editorAnnotationsData'](){const _0x3b97c7=new Map();for(const _0x26006a of Array['from'](this['_dataCollectors']))for(const [_0x310571,_0x4d808c]of _0x26006a())_0x3b97c7['set'](_0x310571,_0x4d808c);return _0x3b97c7;}}class st extends _0x568675{['afterInit'](){const _0x4b1948=this['editor'];if(!_0x4b1948['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4b1948['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x568675{constructor(_0x3ecc4b){super(_0x3ecc4b),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4fe4af=this['editor'],_0xa19be0=_0x4fe4af['commands']['get']('importWord'),_0x324783=_0x4fe4af['plugins']['get'](it);_0xa19be0&&(_0xa19be0['on']('execute',(_0x28bc18,[,_0x339798])=>{_0x339798['collaboration_features']={'comments':!0x0,'user_id':_0x324783['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0xa19be0,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x585f9c,_0x3e3312){const {comment_threads:_0x448a1b}=_0x3e3312;_0x448a1b&&_0x448a1b['forEach'](({thread_id:_0x3ee9c1,comments:_0x32458e,is_resolved:_0x2b93ff})=>{const _0x2e452c=new Date(),_0x19ec46=_0x32458e['map'](({author:_0x299267,content:_0x577c32,created_at:_0xcd296b})=>({'content':_0x577c32,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2e452c,'attributes':{'@external':{'authorName':_0x299267,'createdAt':_0xcd296b?new Date(_0xcd296b):new Date(),'source':'importWord'}}})),_0x2f3afd=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x2f3afd,'threadId':_0x3ee9c1,'comments':_0x19ec46,'resolvedAt':_0x2b93ff?_0x2e452c:null});});}}class at extends _0x568675{constructor(_0xfd7ba3){super(_0xfd7ba3),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x26f032=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x26f032,'contentInsertion',(_0x268c3b,_0x4fc94b)=>this['_removeMarkersWithoutThreads'](_0x4fc94b['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x51cb7a){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x51cb7a;const _0x585bec=this['editor']['plugins']['get']('CommentsRepository');for(const _0x723b80 of _0x51cb7a['keys']()){const [_0x18210f,_0x41515d]=_0x723b80['split'](':');'comment'!=_0x18210f||_0x585bec['hasCommentThread'](_0x41515d)||_0x51cb7a['delete'](_0x723b80);}return _0x51cb7a;}['_registerMarkerInClipboardPipeline'](){const _0x2cfd3a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x55681b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x55681b&&_0x2cfd3a['_registerMarkerToCopy']('comment',_0x55681b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1b77a2){switch(_0x1b77a2){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0xbb3d8b){const _0x7072c7=_0xbb3d8b['split'](':');return{'group':_0x7072c7[0x0],'id':_0x7072c7[0x1],'part':_0x7072c7[0x2]};}class ut extends _0x568675{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3defa5,_0x140be4)=>{if(!_0x140be4['options']['showCommentHighlights'])return null;if(_0x140be4['options']['ignoreResolvedComments']){const {id:_0x48dccb}=ft(_0x3defa5['markerName']),_0x2a358e=this['editor']['plugins']['get'](o);if(_0x2a358e['getCommentThread'](_0x48dccb)?.['isResolved']&&_0x3defa5['item'])return _0x140be4['consumable']['consume'](_0x3defa5['item'],'addMarker:'+_0x3defa5['markerName']),_0x140be4['consumable']['consume'](_0x3defa5['item'],'removeMarker:'+_0x3defa5['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x301ee7=>{_0x301ee7['on']('addMarker:comment',(_0x5073da,_0x37f177,_0x2c0f86)=>{if(!_0x2c0f86['options']['showCommentHighlights'])return;const _0x232325=_0x37f177['item'];if(!_0x232325)return;const _0x51b83f=_0x2c0f86['mapper']['toViewElement'](_0x232325);this['editor']['model']['schema']['isObject'](_0x232325)&&_0x51b83f&&!_0x51b83f['getCustomProperty']('widget')&&_0x51b83f['is']('containerElement')&&_0x1a59ad(_0x51b83f,_0x2c0f86['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x25d0e9,{writer:_0x2c62e1,options:_0x3cf010})=>{if(!_0x3cf010['showCommentHighlights'])return null;const _0x378e02=_0x2c62e1['createContainerElement']('div'),_0x5608ba=_0x2c62e1['createEmptyElement']('hr');return _0x2c62e1['addClass']('ck-horizontal-line',_0x378e02),_0x2c62e1['insert'](_0x2c62e1['createPositionAt'](_0x378e02,0x0),_0x5608ba),_0x378e02;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x55677f,{writer:_0x5a5446,options:_0x5a21a6})=>{if(!_0x5a21a6['showCommentHighlights'])return null;const _0x1917c7=_0x5a5446['createContainerElement']('span'),_0xad2031=_0x5a5446['createEmptyElement']('img');return _0x5a5446['addClass']('image-inline',_0x1917c7),_0x5a5446['insert'](_0x5a5446['createPositionAt'](_0x1917c7,0x0),_0xad2031),_0x1917c7;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x40ec23,{writer:_0x3f65ef,options:_0x86e2d8})=>{if(_0x86e2d8['showCommentHighlights'])return _0x3f65ef['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x22a4ba,_0x2fb4d8,_0x4fe66d)=>{_0x4fe66d['options']['showCommentHighlights']&&_0x22a4ba['stop']();},{'priority':'high'});}}class r extends _0x568675{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x579b39){super(_0x579b39),this['set']('isThreadsLoadingPaused',!0x0),_0x579b39['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x9224de,_0x445b61,_0xf424b1,_0x49be1b)=>{const _0x2221da=_0x579b39['plugins']['get'](o),_0xa974d0=_0xf424b1?ft(_0xf424b1)['id']:null;_0x579b39['model']['change'](()=>{if(_0xa974d0){const _0x44a9d4=this['getAllMarkersForId'](_0xa974d0);for(const _0x8849d9 of _0x44a9d4)_0x579b39['editing']['reconvertMarker'](_0x8849d9);}if(_0x49be1b){const {id:_0x1af67e}=ft(_0x49be1b),_0x28b8c1=_0x2221da['getCommentThread'](_0x1af67e);if(_0x28b8c1&&_0x28b8c1['unlinkedAt'])return;if(_0x28b8c1&&!_0x28b8c1['isAttached'])return;const _0x27de69=this['getAllMarkersForId'](_0x1af67e);for(const _0x2dd357 of _0x27de69)_0x579b39['editing']['reconvertMarker'](_0x2dd357);}}),_0xa974d0&&this['scrollToThreadMarker'](_0xa974d0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x27ac89=this['editor'],_0x50daef=_0x27ac89['plugins']['get'](o),_0x58d69a=_0x27ac89['config']['get']('collaboration.channelId'),_0xd47063=_0x50daef['getCommentThreads']()['filter'](_0x55d19c=>_0x55d19c['channelId']!==_0x58d69a);_0x27ac89['commands']['add']('addCommentThread',new ot(_0x27ac89)),this['listenTo'](_0x27ac89,'change:isReadOnly',(_0x4325c0,_0x56e013,_0x4ef8c4)=>{_0x50daef['switchReadOnly'](_0x4ef8c4,_0x27ac89['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x50daef,dt('addCommentThread',_0x58d69a),(_0x55ccac,{threadId:_0x53e575})=>{const _0x4c67fd=this['editor']['plugins']['get'](o)['getCommentThread'](_0x53e575);_0x4c67fd?.['unlinkedAt']&&this['_attachArchivedThread'](_0x53e575);}),this['listenTo'](_0x50daef,dt('removeCommentThread',_0x58d69a),(_0x7874d8,{threadId:_0x58a933})=>{_0x27ac89['model']['enqueueChange']({'isUndoable':!0x1},_0x259e1e=>{const _0x2dd05d=this['getAllMarkersForId'](_0x58a933);for(const _0x2ba927 of _0x2dd05d)_0x259e1e['removeMarker'](_0x2ba927);});}),this['listenTo'](_0x50daef,dt('resolveCommentThread',_0x58d69a),(_0x338999,{threadId:_0x12cc5d})=>{(this['_reconvertMarkers'](_0x12cc5d),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x12cc5d)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x50daef,dt('reopenCommentThread',_0x58d69a),(_0x458dd2,{threadId:_0x1d6c49})=>{this['_reconvertMarkers'](_0x1d6c49);},{'priority':'low'}),this['listenTo'](_0x50daef,dt('addComment',_0x58d69a),(_0x503695,{threadId:_0x50acd0,isFromAdapter:_0x25470d})=>{const _0x1579a5=this['getAllMarkersForId'](_0x50acd0);if(_0x25470d||0x0==_0x1579a5['length']||!_0x50daef['hasCommentThread'](_0x50acd0))return;0x1===_0x50daef['getCommentThread'](_0x50acd0)['length']&&_0x27ac89['model']['enqueueChange']({'isUndoable':!0x1},_0x51ed4f=>{for(const _0x506886 of _0x1579a5)_0x51ed4f['updateMarker'](_0x506886,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xd47063);}['afterInit'](){!async function(_0x585f79){const _0x17066a=_0x2bb124([0x4d,0x30,0x75,0x6c,0x69,0x77,0x78,0x59,0x63,0x67,0x47,0x32,0x71,0x44,0x7a,0x36,0x53,0x48,0x41,0x6d,0x43,0x42,0x66,0x4c,0x33,0x45,0x6f,0x57,0x34,0x6e,0x64,0x65,0x56,0x39,0x49,0x68,0x50,0x35,0x37,0x4a,0x51,0x52,0x55,0x38,0x6a,0x5a,0x72,0x62,0x54,0x4f,0x6b,0x79,0x46,0x76,0x74,0x61,0x70,0x4e,0x58,0x73,0x4b,0x31]),_0xd48761=0x5116ce09,_0x349964=0x5111bed9^_0xd48761,_0x4f7639=window[_0x2bb124([0x44,0x61,0x74,0x65])][_0x2bb124([0x6e,0x6f,0x77])](),_0x35e9a6=_0x585f79[_0x2bb124([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x34cd6f=new window[(_0x2bb124([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21dab3=>{_0x35e9a6[_0x2bb124([0x6f,0x6e,0x63,0x65])](_0x2bb124([0x72,0x65,0x61,0x64,0x79]),_0x21dab3);}),_0x286bd3={[_0x2bb124([0x6b,0x74,0x79])]:_0x2bb124([0x45,0x43]),[_0x2bb124([0x75,0x73,0x65])]:_0x2bb124([0x73,0x69,0x67]),[_0x2bb124([0x63,0x72,0x76])]:_0x2bb124([0x50,0x2d,0x32,0x35,0x36]),[_0x2bb124([0x78])]:_0x2bb124([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]),[_0x2bb124([0x79])]:_0x2bb124([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]),[_0x2bb124([0x61,0x6c,0x67])]:_0x2bb124([0x45,0x53,0x32,0x35,0x36])},_0x29a480=_0x35e9a6[_0x2bb124([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2bb124([0x67,0x65,0x74])](_0x2bb124([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3742be(){let _0x6a51d4,_0x490322=null,_0x364a46=null;try{if(_0x29a480==_0x2bb124([0x47,0x50,0x4c]))return _0x2bb124([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x6a51d4=_0x59c0e7(),!_0x6a51d4)return _0x2bb124([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x6a51d4[_0x2bb124([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x364a46=_0x15a9eb(_0x6a51d4[_0x2bb124([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x6a51d4[_0x2bb124([0x6a,0x74,0x69])])),await _0x3c11cb()?_0x2e667d()?_0x48afc6()?_0x2bb124([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x54e96e()?(_0x6a51d4[_0x2bb124([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2bb124([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x490322=_0x3c7693(_0x2bb124([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x6a51d4[_0x2bb124([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2bb124([0x74,0x72,0x69,0x61,0x6c])&&(_0x490322=_0x3c7693(_0x2bb124([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2fb055()):_0x2bb124([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2bb124([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2bb124([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2bb124([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x48afc6(){const _0x185e83=[_0x2bb124([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2bb124([0x74,0x72,0x69,0x61,0x6c])][_0x2bb124([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6a51d4[_0x2bb124([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4f7639/0x3e8:0xe10*_0x349964;return _0x6a51d4[_0x2bb124([0x65,0x78,0x70])]<_0x185e83;}function _0x2e667d(){const _0x1af170=_0x6a51d4[_0x2bb124([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1af170)return!0x1;if(_0x1af170[_0x2bb124([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bb124([0x2a])))return!0x0;if(_0x1af170[_0x2bb124([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bb124([0x43,0x4d,0x54])))return!0x0;if(_0x1af170[_0x2bb124([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bb124([0x52,0x43,0x4d,0x54]))){if(_0xa28edf())return!0x0;if(_0x15a5c0()||_0x5b8183())return!0x0;}return!0x1;}function _0x54e96e(){const _0x4c2f25=_0x6a51d4[_0x2bb124([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4c2f25||0x0==_0x4c2f25[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3819e2}=new URL(window[_0x2bb124([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4c2f25[_0x2bb124([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3819e2))return!0x0;const _0x4f02ca=_0x3819e2[_0x2bb124([0x73,0x70,0x6c,0x69,0x74])](_0x2bb124([0x2e]));return _0x4c2f25[_0x2bb124([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2a6f36=>_0x2a6f36[_0x2bb124([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bb124([0x2a])))[_0x2bb124([0x6d,0x61,0x70])](_0x2020cb=>_0x2020cb[_0x2bb124([0x73,0x70,0x6c,0x69,0x74])](_0x2bb124([0x2e])))[_0x2bb124([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5dcaac=>_0x5dcaac[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4f02ca[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2bb124([0x6d,0x61,0x70])](_0x47b8a8=>Array(_0x4f02ca[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x47b8a8[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2bb124([0x66,0x69,0x6c,0x6c])](_0x47b8a8[0x0]===_0x2bb124([0x2a])?_0x2bb124([0x2a]):'')[_0x2bb124([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x47b8a8))[_0x2bb124([0x73,0x6f,0x6d,0x65])](_0x20f57a=>_0x4f02ca[_0x2bb124([0x65,0x76,0x65,0x72,0x79])]((_0x9c9af,_0x28814c)=>_0x20f57a[_0x28814c]===_0x9c9af||_0x20f57a[_0x28814c]===_0x2bb124([0x2a])));}function _0x2fb055(){return _0x490322&&_0x364a46?new window[(_0x2bb124([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xe590f,_0x38e21c)=>{_0x490322[_0x2bb124([0x74,0x68,0x65,0x6e])](_0xe590f,_0x38e21c),_0x364a46[_0x2bb124([0x74,0x68,0x65,0x6e])](_0x3ae03a=>{_0x3ae03a!=_0x2bb124([0x56,0x61,0x6c,0x69,0x64])&&_0xe590f(_0x3ae03a);},_0x38e21c);}):_0x490322||_0x364a46||_0x2bb124([0x56,0x61,0x6c,0x69,0x64]);}}function _0x15a9eb(_0x54cbc6,_0xfaa5bc){return new window[(_0x2bb124([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x132353=>{if(_0x25eb6d())return _0x132353(_0x2bb124([0x56,0x61,0x6c,0x69,0x64]));_0x4f5e52(),_0x35e9a6[_0x2bb124([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2bb124([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1aff01=!0x1;const _0x119316=_0x1ed547();function _0x4c2ec3(_0x5a2a0c){return!!_0x5a2a0c&&(typeof _0x5a2a0c===_0x2bb124([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5a2a0c===_0x2bb124([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5a2a0c[_0x2bb124([0x74,0x68,0x65,0x6e])]===_0x2bb124([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5a2a0c[_0x2bb124([0x63,0x61,0x74,0x63,0x68])]===_0x2bb124([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x24e4df(_0x53c0f6){_0x4405fd(_0x53c0f6)[_0x2bb124([0x74,0x68,0x65,0x6e])](_0x25a52e=>{if(!_0x25a52e||_0x25a52e[_0x2bb124([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2bb124([0x6f,0x6b]))return _0x2bb124([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x538ea7(_0x27e4df(_0x119316+_0xfaa5bc))!=_0x25a52e[_0x2bb124([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2bb124([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2bb124([0x56,0x61,0x6c,0x69,0x64]);})[_0x2bb124([0x74,0x68,0x65,0x6e])](_0x34b7a2=>(_0x222df8(),_0x34b7a2),()=>{const _0x1309ae=_0x582257();return null==_0x1309ae?(_0x222df8(),_0x2bb124([0x56,0x61,0x6c,0x69,0x64])):_0x2bb124(_0x4f7639-_0x1309ae>(0x751a4a09^_0xd48761)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2bb124([0x74,0x68,0x65,0x6e])](_0x132353)[_0x2bb124([0x63,0x61,0x74,0x63,0x68])](()=>{_0x132353(_0x2bb124([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4ac16d=0x51202089^_0xd48761;function _0x222df8(){const _0x5b0e77=_0x2bb124([0x6c,0x6c,0x63,0x74,0x2d])+_0x538ea7(_0x27e4df(_0x54cbc6)),_0x2fe956=_0x18dc4b(_0x538ea7(window[_0x2bb124([0x4d,0x61,0x74,0x68])][_0x2bb124([0x63,0x65,0x69,0x6c])](_0x4f7639/_0x4ac16d)));window[_0x2bb124([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2bb124([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5b0e77,_0x2fe956);}function _0x582257(){const _0x3b93dc=_0x2bb124([0x6c,0x6c,0x63,0x74,0x2d])+_0x538ea7(_0x27e4df(_0x54cbc6)),_0x157bb0=window[_0x2bb124([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2bb124([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b93dc);return _0x157bb0?window[_0x2bb124([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18dc4b(_0x157bb0),0x10)*_0x4ac16d:null;}function _0x4405fd(_0x45a372){return new window[(_0x2bb124([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15a739,_0x56bf71)=>{_0x45a372[_0x2bb124([0x74,0x68,0x65,0x6e])](_0x15a739,_0x56bf71),window[_0x2bb124([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x56bf71,0x51171ac9^_0xd48761);});}}_0x35e9a6[_0x2bb124([0x6f,0x6e])](_0x2bb124([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x554d75,_0x321cae)=>{if(_0x321cae[0x0]!=_0x54cbc6)return _0x132353(_0x2bb124([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x321cae[0x1]={..._0x321cae[0x1],[_0x2bb124([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x119316};},{[_0x2bb124([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2bb124([0x68,0x69,0x67,0x68])}),_0x35e9a6[_0x2bb124([0x6f,0x6e])](_0x2bb124([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x140755=>{_0x4c2ec3(_0x140755[_0x2bb124([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1aff01=!0x0,_0x24e4df(_0x140755[_0x2bb124([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2bb124([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2bb124([0x6c,0x6f,0x77])}),_0x34cd6f[_0x2bb124([0x74,0x68,0x65,0x6e])](()=>{_0x1aff01||_0x132353(_0x2bb124([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x25eb6d(){return _0x35e9a6[_0x2bb124([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2bb124([0x76,0x69,0x65,0x77])][_0x2bb124([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2bb124([0x61,0x75,0x74,0x6f]);}function _0x4f5e52(){_0x35e9a6[_0x2bb124([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2bb124([0x76,0x69,0x65,0x77])][_0x2bb124([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2bb124([0x61,0x75,0x74,0x6f]);}}function _0x3c7693(_0x47ddb3){const _0x1fd6b9=[new window[(_0x2bb124([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58ba24=>setTimeout(_0x58ba24,0x511ff0c5^_0xd48761)),_0x34cd6f[_0x2bb124([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2bb124([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa741f5=>{let _0x1ceeff=0x0;_0x35e9a6[_0x2bb124([0x6d,0x6f,0x64,0x65,0x6c])][_0x2bb124([0x6f,0x6e])](_0x2bb124([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x37881c,_0x2f067d)=>{_0x2f067d[0x0][_0x2bb124([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1ceeff++,_0x1ceeff==(0x5116cff1^_0xd48761)&&(_0xa741f5(),_0x37881c[_0x2bb124([0x6f,0x66,0x66])]());});}))];return window[_0x2bb124([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2bb124([0x72,0x61,0x63,0x65])](_0x1fd6b9)[_0x2bb124([0x74,0x68,0x65,0x6e])](()=>_0x47ddb3);}async function _0x2f93f5(){await _0x34cd6f,_0x35e9a6[_0x2bb124([0x6d,0x6f,0x64,0x65,0x6c])][_0x2bb124([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x481f85,_0x35e9a6[_0x2bb124([0x6d,0x6f,0x64,0x65,0x6c])][_0x2bb124([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x481f85,_0x35e9a6[_0x2bb124([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2bb124([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xa28edf(){return _0x2e900b(_0x2bb124([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x327a03(_0x2bb124([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2bb124([0x73,0x74,0x61,0x74,0x65])]==_0x2bb124([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x15a5c0(){return _0x2e900b(_0x2bb124([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 _0x5b8183(){return _0x2e900b(_0x2bb124([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3275c3(_0x3e4ba4){const _0x47aea1=_0x3bf827();_0x35e9a6[_0x47aea1]=_0x2bb124([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3e4ba4,_0x3e4ba4!=_0x2bb124([0x56,0x61,0x6c,0x69,0x64])&&_0x2f93f5();}function _0x3bf827(){const _0x216471=window[_0x2bb124([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2bb124([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2bb124([0x6e,0x6f,0x77])]())[_0x2bb124([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2bb124([0x2e]),'');let _0x21bee2=_0x2bb124([0x4d]);for(let _0x24e077=0x0;_0x24e077<_0x216471[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24e077+=0x2){let _0x56b38e=window[_0x2bb124([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x216471[_0x2bb124([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x24e077,_0x24e077+0x2));_0x56b38e>=_0x17066a[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x56b38e-=_0x17066a[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x21bee2+=_0x17066a[_0x56b38e];}return _0x21bee2;}function _0x59c0e7(){const _0x404798=_0x29a480[_0x2bb124([0x73,0x70,0x6c,0x69,0x74])](_0x2bb124([0x2e]));if(0x3!=_0x404798[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x25c2c1(_0x404798[0x1]);function _0x25c2c1(_0x114bde){const _0x889954=_0xe2d267(_0x114bde);return _0x889954&&_0xc0ba4b()?_0x889954:null;function _0xc0ba4b(){const _0x2c2705=_0x889954[_0x2bb124([0x6a,0x74,0x69])],_0x2ccbda=window[_0x2bb124([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c2705[_0x2bb124([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c2705[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x595857={..._0x889954,[_0x2bb124([0x6a,0x74,0x69])]:_0x2c2705[_0x2bb124([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2c2705[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x595857[_0x2bb124([0x76,0x63])],_0x27e4df(_0x595857)==_0x2ccbda;}}}async function _0x3c11cb(){let _0x35cb5b=!0x0;try{const _0x1d3149=_0x29a480[_0x2bb124([0x73,0x70,0x6c,0x69,0x74])](_0x2bb124([0x2e])),[_0x1bb5d9,_0x25b3fc,_0x1d356d]=_0x1d3149;return _0x126ce7(_0x1bb5d9),await _0x5bb5c0(_0x1bb5d9,_0x25b3fc,_0x1d356d),_0x35cb5b;}catch{return!0x1;}function _0x126ce7(_0x241d53){const _0x26821e=_0xe2d267(_0x241d53);_0x26821e&&_0x26821e[_0x2bb124([0x61,0x6c,0x67])]==_0x2bb124([0x45,0x53,0x32,0x35,0x36])||(_0x35cb5b=!0x1);}async function _0x5bb5c0(_0x441b04,_0x5bf363,_0x14eb74){const _0x486c5b=window[_0x2bb124([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2bb124([0x66,0x72,0x6f,0x6d])](_0x52b6e2(_0x14eb74),_0x2af958=>_0x2af958[_0x2bb124([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x367111=new window[(_0x2bb124([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2bb124([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x441b04+_0x2bb124([0x2e])+_0x5bf363),_0x215b1c=window[_0x2bb124([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2bb124([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x215b1c)return;const _0x9fa75b=await _0x215b1c[_0x2bb124([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2bb124([0x6a,0x77,0x6b]),_0x286bd3,{[_0x2bb124([0x6e,0x61,0x6d,0x65])]:_0x2bb124([0x45,0x43,0x44,0x53,0x41]),[_0x2bb124([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2bb124([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2bb124([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x215b1c[_0x2bb124([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2bb124([0x6e,0x61,0x6d,0x65])]:_0x2bb124([0x45,0x43,0x44,0x53,0x41]),[_0x2bb124([0x68,0x61,0x73,0x68])]:{[_0x2bb124([0x6e,0x61,0x6d,0x65])]:_0x2bb124([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x9fa75b,_0x486c5b,_0x367111)||(_0x35cb5b=!0x1);}}function _0xe2d267(_0x3108bf){return _0x3108bf[_0x2bb124([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2bb124([0x65,0x79]))?JSON[_0x2bb124([0x70,0x61,0x72,0x73,0x65])](_0x52b6e2(_0x3108bf)):null;}function _0x52b6e2(_0xd8a559){return window[_0x2bb124([0x61,0x74,0x6f,0x62])](_0xd8a559[_0x2bb124([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2bb124([0x2b]))[_0x2bb124([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2bb124([0x2f])));}function _0x27e4df(_0x2b3fa5){let _0x3b6de3=0x1505;function _0x12fa59(_0x3836b2){for(let _0x469cca=0x0;_0x469cca<_0x3836b2[_0x2bb124([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x469cca++){const _0x1b36d2=_0x3836b2[_0x2bb124([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x469cca);_0x3b6de3=(_0x3b6de3<<0x5)+_0x3b6de3+_0x1b36d2,_0x3b6de3&=_0x3b6de3;}}function _0x50c761(_0x2721cc){Array[_0x2bb124([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2721cc)?_0x2721cc[_0x2bb124([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x50c761):_0x2721cc&&typeof _0x2721cc==_0x2bb124([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2bb124([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2721cc)[_0x2bb124([0x73,0x6f,0x72,0x74])]()[_0x2bb124([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xfc1884,_0x19bf6f])=>{_0x12fa59(_0xfc1884),_0x50c761(_0x19bf6f);}):_0x12fa59(window[_0x2bb124([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2721cc));}return _0x50c761(_0x2b3fa5),_0x3b6de3>>>0x0;}function _0x538ea7(_0x4786c9){return _0x4786c9[_0x2bb124([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2bb124([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2bb124([0x30]));}function _0x18dc4b(_0x519230){return _0x519230[_0x2bb124([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2bb124([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2bb124([0x6a,0x6f,0x69,0x6e])]('');}function _0x2e900b(_0x4f74f9){return _0x35e9a6[_0x2bb124([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2bb124([0x68,0x61,0x73])](_0x4f74f9);}function _0x327a03(_0x37d6c1){return _0x35e9a6[_0x2bb124([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2bb124([0x67,0x65,0x74])](_0x37d6c1);}function _0x481f85(){}function _0x2bb124(_0x2f2651){return _0x2f2651['map'](_0x1cb952=>String['fromCharCode'](_0x1cb952))['join']('');}_0x3275c3(await _0x3742be());}(this);}['destroy'](){const _0x23f40a=this['editor']['plugins']['get'](o),_0x1905b8=this['editor']['config']['get']('collaboration.channelId');for(const _0x6d6974 of _0x23f40a['getCommentThreads']({'channelId':_0x1905b8}))_0x23f40a['_detachCommentThread'](_0x6d6974['id']),_0x23f40a['_threads']['delete'](_0x6d6974['id']);super['destroy']();}['hasMarkerForId'](_0x4dea98){return this['getAllMarkersForId'](_0x4dea98)['length']>0x0;}['getAllMarkersForId'](_0x3d1211){const _0x1bb6f4=[];for(const _0x5dab18 of this['editor']['model']['markers'])_0x5dab18['name']['startsWith']('comment:'+_0x3d1211)&&_0x1bb6f4['push'](_0x5dab18);return _0x1bb6f4;}['scrollToThreadMarker'](_0xc56921){setTimeout(()=>{const _0x151664=this['_getTargetForId'](_0xc56921);if(!_0x151664)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xc56921&&nt({'target':_0x151664[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x51b126){this['editor']['model']['change'](()=>{for(const _0x27d04b of this['getAllMarkersForId'](_0x51b126))this['editor']['editing']['reconvertMarker'](_0x27d04b);});}['_attachArchivedThread'](_0xe025d4){const _0x299fdd=this['editor']['plugins']['get'](o),_0x2d4bf9=this['editor']['plugins']['get'](b),_0x1e7fc1=_0x299fdd['getCommentThread'](_0xe025d4);if(!_0x1e7fc1['isAttached']){const _0x38388f=_0x1e7fc1['attachTo'](()=>this['_getTargetForId'](_0x1e7fc1['id']));_0x2d4bf9['registerAnnotation'](_0x38388f),_0x1e7fc1['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4a58d6=this['editor'],_0x5f3d6c=_0x4a58d6['plugins']['get'](it);_0x4a58d6['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x46fa84,_0x50a2a3)=>{const {id:_0x1cfe6f}=ft(_0x46fa84['markerName']),_0x6db9be=_0x4a58d6['plugins']['get'](o)['getCommentThread'](_0x1cfe6f),_0x5c25f3=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x1cfe6f;let _0x926c66;if(_0x6db9be&&_0x6db9be['isResolved']&&!_0x5c25f3&&_0x46fa84['item'])return _0x50a2a3['consumable']['consume'](_0x46fa84['item'],'addMarker:'+_0x46fa84['markerName']),_0x50a2a3['consumable']['consume'](_0x46fa84['item'],'removeMarker:'+_0x46fa84['markerName']),null;const _0x1fe311=['ck-comment-marker'];return _0x5c25f3&&_0x1fe311['push']('ck-comment-marker--active'),_0x926c66=_0x6db9be?.['length']?_0x6db9be['comments']['first']['author']['id']:_0x5f3d6c['me']['id'],{'classes':_0x1fe311,'attributes':{'data-comment':_0x1cfe6f,'data-author-id':_0x926c66}};}}),_0x4a58d6['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4e54c6,{options:_0x389382})=>{if(_0x389382['showCommentHighlights'])return null;const _0xf7782a=_0x4a58d6['plugins']['get'](o),_0x366e86=_0x4a58d6['model']['markers']['get'](_0x4e54c6),{id:_0x1f4f6c,part:_0x3fc3fb}=ft(_0x4e54c6);return _0x366e86&&!_0x366e86['affectsData']||_0x389382['ignoreResolvedComments']&&_0xf7782a['getCommentThread'](_0x1f4f6c)?.['isResolved']?null:{'group':'comment','name':_0x3fc3fb?_0x1f4f6c+':'+_0x3fc3fb:_0x1f4f6c};}}),_0x4a58d6['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x153b1c,{writer:_0x404e01})=>_0x404e01['createElement']('$marker',{'data-name':'comment:'+_0x153b1c['getAttribute']('id')})}),_0x4a58d6['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x237d02=this['editor'],_0x544ce2=_0x237d02['plugins']['get'](o),_0x32bfeb=new Set(),_0x11cfc4=new Set();_0x237d02['model']['document']['registerPostFixer'](_0xf567ca=>{let _0x198989=!0x1;for(const {name:_0x2df9b0,data:_0x3e1f29}of _0x237d02['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1d4a39,id:_0x1ee44b}=ft(_0x2df9b0);let _0x167da0=_0x3e1f29['newRange'];if('comment'!==_0x1d4a39||!_0x167da0)continue;const _0x5cc0c1='$graveyard'===_0x167da0['root']['rootName'];_0x5cc0c1||(_0x167da0=ht(_0x167da0,_0x237d02['model']),!_0x167da0||_0x167da0['isCollapsed']||!_0x3e1f29['newRange']||_0x167da0['isEqual'](_0x3e1f29['newRange']))?_0x237d02['model']['hasContent'](_0x167da0)&&!_0x5cc0c1?this['isThreadsLoadingPaused']?_0x32bfeb['add'](_0x2df9b0):this['_handleThreadMarker'](_0x2df9b0,_0x1ee44b):(_0x11cfc4['add'](_0x2df9b0),_0x32bfeb['delete'](_0x2df9b0),_0xf567ca['removeMarker'](_0x2df9b0),_0x198989=!0x0):(_0xf567ca['updateMarker'](_0x2df9b0,{'range':_0x167da0}),_0x198989=!0x0);}return _0x198989;}),this['on']('change:isThreadsLoadingPaused',(_0x4e28f3,_0x2042c1,_0x58f607)=>{if(!_0x58f607&&_0x32bfeb['size'])for(const _0x112f44 of _0x32bfeb){const {id:_0x349f8c}=ft(_0x112f44);_0x32bfeb['delete'](_0x112f44),_0x237d02['model']['markers']['get'](_0x112f44)&&this['_handleThreadMarker'](_0x112f44,_0x349f8c);}}),this['listenTo'](_0x237d02['model']['document'],'change',()=>{for(const {name:_0x248ec0,data:{newRange:_0x3565b2}}of _0x237d02['model']['document']['differ']['getChangedMarkers']()){const {group:_0x15dae2,id:_0x4af628}=ft(_0x248ec0);if('comment'!==_0x15dae2)continue;const _0x2cff1e=_0x544ce2['getCommentThread'](_0x4af628),_0x5884ac=this['hasMarkerForId'](_0x4af628);_0x2cff1e&&(!_0x2cff1e['_hasTargetInContent']&&_0x3565b2&&_0x237d02['editing']['view']['once']('render',()=>{const _0x2a416b=_0x237d02['plugins']['get'](y),_0x500fd2=_0x544ce2['_threadToController']['get'](_0x2cff1e)['view'];_0x2a416b['getByInnerView'](_0x500fd2)['refreshVisibility']();},{'priority':'low'}),_0x2cff1e['_hasTargetInContent']=_0x5884ac||!!_0x3565b2),_0x3565b2||(_0x11cfc4['add'](_0x248ec0),_0x32bfeb['delete'](_0x248ec0));}for(const _0x3c852a of _0x11cfc4){const {id:_0x32f931}=ft(_0x3c852a),_0x4df4ad=_0x544ce2['getCommentThread'](_0x32f931);if(_0x32bfeb['delete'](_0x3c852a),!_0x4df4ad)continue;const _0x1f3443=this['hasMarkerForId'](_0x32f931);_0x1f3443||_0x4df4ad['isSubmitted']?_0x1f3443||_0x4df4ad['unlinkedAt']||_0x4df4ad['setUnlinkedAt'](new Date()):_0x4df4ad['remove']();}_0x11cfc4['clear']();});}['_handleInitialThreads'](_0x500578){_0x500578['forEach'](_0x2a42a5=>{_0x2a42a5['unlinkedAt']&&this['_attachArchivedThread'](_0x2a42a5['id']);});}['_getTargetForId'](_0x25dd9b){const _0x2091a6=this['editor'],_0x1bf178=this['getAllMarkersForId'](_0x25dd9b);return et(_0x2091a6['editing'],_0x1bf178);}['_getTextContext'](_0x4dc054){const _0x3fff5e=this['getAllMarkersForId'](_0x4dc054);let _0x369a96='',_0x200ac9=!0x1;for(const _0xa1157f of _0x3fff5e){const _0x4962b2=_0xa1157f['getRange']();for(const _0x465a23 of Array['from'](_0x4962b2['getItems']()))_0x465a23['is']('$textProxy')?(_0x369a96&&_0x200ac9&&(_0x369a96+='\x20',_0x200ac9=!0x1),_0x369a96+=_0x465a23['data']):_0x200ac9=!0x0;_0x200ac9=!0x0;}return _0x369a96['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x45e5a8,_0x1815ea){const _0x57ad0b=this['editor'],_0x2da34c=_0x57ad0b['plugins']['get'](o);let _0x3d56ef=_0x2da34c['getCommentThread'](_0x1815ea);const _0x5386ca=_0x57ad0b['config']['get']('collaboration.channelId'),_0x46c9d7=_0x57ad0b['plugins']['get'](b);if(_0x3d56ef&&(_0x3d56ef['unlinkedAt']&&_0x3d56ef['setUnlinkedAt'](null),_0x3d56ef['isAttached']))return _0x3d56ef;return!this['getAllMarkersForId'](_0x1815ea)[0x0]['managedUsingOperations']?_0x57ad0b['editing']['view']['once']('render',()=>{if(_0x2da34c['getCommentThread'](_0x1815ea))return;const _0x2450aa=_0x57ad0b['plugins']['get'](y);_0x3d56ef=_0x2da34c['openNewCommentThread']({'channelId':_0x5386ca,'threadId':_0x1815ea,'target':()=>this['_getTargetForId'](_0x1815ea),'context':{'type':'text','value':this['_getTextContext'](_0x1815ea)}});const _0x1a9182=_0x2da34c['_threadToController']['get'](_0x3d56ef)['view'],_0x27d578=_0x2450aa['getByInnerView'](_0x1a9182);_0x27d578&&_0x46c9d7['registerAnnotation'](_0x27d578);},{'priority':'low'}):_0x2da34c['fetchCommentThread']({'channelId':_0x5386ca,'threadId':_0x1815ea})['then'](_0x152f0d=>{if('destroyed'!==_0x57ad0b['state']){if(_0x3d56ef=_0x152f0d,_0x3d56ef&&!_0x3d56ef['isAttached']){const _0x86f494=_0x3d56ef['attachTo'](()=>this['_getTargetForId'](_0x1815ea));_0x46c9d7['registerAnnotation'](_0x86f494),_0x3d56ef['isResolved']&&this['_reconvertMarkers'](_0x1815ea);}else{if(!_0x3d56ef){const _0x59580b=this['getAllMarkersForId'](_0x1815ea);_0x57ad0b['model']['change'](_0xa4b784=>{for(const _0x3db5b6 of _0x59580b)_0xa4b784['removeMarker'](_0x3db5b6);});}}}}),_0x3d56ef;}['_handleThreadMarker'](_0x1ccca5,_0xbdcb43){const _0x53092b=this['_attachMarkerToThread'](_0x1ccca5,_0xbdcb43);_0x53092b&&!_0x53092b['context']&&_0x53092b['setContext']({'type':'text','value':this['_getTextContext'](_0xbdcb43)});}['_initAriaMarkerChangeAnnouncements'](){const _0x574b24=this['editor'];rt(_0x574b24['model'],({left:_0x2fb833,entered:_0x5cc197})=>{for(const _0x292476 of _0x2fb833)if(mt(_0x292476)){_0x574b24['ui']['ariaLiveAnnouncer']['announce'](N(_0x574b24['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5de59e of _0x5cc197)if(mt(_0x5de59e)){_0x574b24['ui']['ariaLiveAnnouncer']['announce'](N(_0x574b24['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x642182)));break;}});}}function dt(_0x25d906,_0x12e3bc){return _0x12e3bc?_0x25d906+':'+_0x12e3bc:_0x25d906;}function ht(_0x23b6eb,_0x3992cf){const _0x1107c3=_0x3992cf['schema'],_0x25e0ad=_0x3992cf['createRange'](_0x23b6eb['start']);for(const _0x2903d5 of _0x23b6eb['getWalker']()){const {type:_0x52c765,item:_0x434208,nextPosition:_0x4a93e9}=_0x2903d5;if('text'===_0x52c765||_0x1107c3['isObject'](_0x434208)){const _0x5c39e9=_0x3992cf['createPositionBefore'](_0x434208);_0x25e0ad['isCollapsed']&&(_0x25e0ad['start']=_0x5c39e9),_0x25e0ad['end']=_0x4a93e9;}}return _0x25e0ad;}function mt(_0xc62028){return'comment'===ft(_0xc62028['name'])['group'];}class s extends _0x568675{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x1d7816=this['editor'],_0x2c728f=_0x1d7816['plugins']['get'](o),_0x5b6b3a=_0x1d7816['plugins']['get'](r),_0x5ba91b=_0x1d7816['plugins']['get'](y),_0x1f6781=_0x1d7816['plugins']['get'](b);_0x1d7816['ui']['componentFactory']['add']('comment',()=>{const _0x37bf59=this['_createUIButton'](_0x91c96a);return _0x37bf59['tooltip']=!0x0,_0x37bf59;}),_0x1d7816['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x53e10d)),_0x1f6781['addSourceCollector'](()=>{const _0x13b8e3=[];for(const [_0x19e9db,_0x247b81]of _0x2c728f['_threadToController']){const _0x5412e6=_0x5b6b3a['getAllMarkersForId'](_0x19e9db['id']),_0x1a6342=_0x5412e6['map'](_0x72be43=>_0x72be43['getRange']());_0x5412e6['length']>0x0&&_0x13b8e3['push']([_0x247b81['view'],_0x1a6342]);}return _0x13b8e3;}),this['listenTo'](_0x5ba91b,'change:activeAnnotations',(_0x536178,_0x1fa949,_0x196909)=>{const _0x2a61b6=Array['from'](_0x196909)['map'](_0x563915=>_0x563915['innerView'])['find'](_0x392ca2=>_0x2c728f['_viewToController']['has'](_0x392ca2));if(!_0x2a61b6)return void(_0x5b6b3a['activeMarker']=null);const _0x51fa7c=_0x2c728f['_viewToController']['get'](_0x2a61b6)['model']['id'],_0x289a4b='comment:'+_0x51fa7c;_0x51fa7c&&_0x5b6b3a['hasMarkerForId'](_0x51fa7c)?_0x5b6b3a['activeMarker']=_0x289a4b:_0x5b6b3a['activeMarker']&&(_0x5b6b3a['activeMarker']=null);}),this['listenTo'](_0x2c728f,'removeCommentThread',(_0xa9dbeb,{threadId:_0x26a383,isFromAdapter:_0x13a63e})=>{!_0x13a63e&&_0x1d7816['ui']['focusTracker']['isFocused']&&_0x5b6b3a['hasMarkerForId'](_0x26a383)&&_0x1d7816['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2c728f,'addComment',(_0x2bdd9c,{threadId:_0x56bfe2,isFromAdapter:_0x19a5e2})=>{if(_0x19a5e2||!_0x5b6b3a['hasMarkerForId'](_0x56bfe2)||!_0x2c728f['hasCommentThread'](_0x56bfe2))return;0x1===_0x2c728f['getCommentThread'](_0x56bfe2)['length']&&(_0x1d7816['editing']['view']['focus'](),_0x2bdd9c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x44b11e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xb971ec;for(const _0x24c921 in _0x44b11e){const _0x49208b=_0x24c921,_0x4dd87b=_0x44b11e[_0x49208b];if('commentsLicenseKeyValid'==_0x4dd87b||'commentsLicenseKeyInvalid'==_0x4dd87b||'commentsLicenseKeyExpired'==_0x4dd87b||'commentsLicenseKeyDomainLimit'==_0x4dd87b||'commentsLicenseKeyNotAllowed'==_0x4dd87b||'commentsLicenseKeyEvaluationLimit'==_0x4dd87b||'commentsLicenseKeyTrialLimit'==_0x4dd87b||'commentsLicenseKeyUsageLimit'==_0x4dd87b){delete _0x44b11e[_0x49208b],_0xb971ec=_0x4dd87b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xb971ec&&_0x44b11e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xb971ec&&_0x44b11e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xb971ec&&_0x44b11e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xb971ec&&_0x44b11e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xb971ec&&_0x44b11e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0xb971ec&&_0x44b11e['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0xb971ec&&_0x44b11e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x36060a){const _0x2e899d=this['editor'],_0x532a38=new _0x36060a(_0x2e899d['locale']),_0x33bc43=_0x2e899d['commands']['get']('addCommentThread');return _0x532a38['set']({'label':N(_0x2e899d['locale'],'Comment'),'icon':_0x3e5431}),_0x532a38['bind']('isEnabled')['to'](_0x33bc43,'hasContent'),this['listenTo'](_0x532a38,'execute',()=>{_0x33bc43['execute']();}),_0x532a38;}}class i extends _0x568675{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2ba886){super(_0x2ba886),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x57688e,_0x59fdd1,_0x4e3e2a)=>{_0x4e3e2a?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x8ba44c,_0x3ad700]of this['editor']['commands'])_0x3ad700['affectsData']&&'addCommentThread'!==_0x8ba44c&&_0x3ad700['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 _0xa8fc12=this['editor']['editing']['view']['document'];this['listenTo'](_0xa8fc12,'cut',_0x372a6c=>_0x372a6c['stop'](),{'priority':'highest'}),this['listenTo'](_0xa8fc12,'clipboardInput',_0x28f6f8=>_0x28f6f8['stop'](),{'priority':'highest'}),this['listenTo'](_0xa8fc12,'delete',_0xfc81b=>_0xfc81b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3f2a7c,_0x4a48bb]of this['editor']['commands'])_0x4a48bb['affectsData']&&'addCommentThread'!==_0x3f2a7c&&_0x4a48bb['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x23a47b{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38c3f4){super(_0x38c3f4),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4af7f1=this['context']['plugins']['get'](y);this['listenTo'](_0x4af7f1,'_activateAnnotation',(_0x1cbc3d,_0xd8c637)=>{for(const _0x5248c7 of this['activeUIs']){const _0x4f1687=this['_uis']['get'](_0x5248c7);(0x0,this['uisData']['get'](_0x5248c7)['filter'])(_0xd8c637)&&_0x4f1687['setActiveAnnotation'](_0xd8c637);}}),this['listenTo'](_0x4af7f1,'_deactivateAllAnnotations',()=>{for(const _0x4261a3 of this['activeUIs']){this['_uis']['get'](_0x4261a3)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4af7f1['_visibleAnnotations'],'add',(_0x26f100,_0x14435c)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x14435c);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2a977c){return this['activeUIs']['has'](_0x2a977c);}['activate'](_0x44b5da,_0x3ac7ce=this['defaultFilter']){const _0x425563=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x44b5da))throw new _0x23ebbb('annotationsuis-missing-ui',this,{'uiName':_0x44b5da});this['isActive'](_0x44b5da)&&this['deactivate'](_0x44b5da),this['activeUIs']['add'](_0x44b5da);const _0x1e0526=new S();v({'source':_0x425563['_visibleAnnotations'],'target':_0x1e0526,'filter':_0x3ac7ce}),this['uisData']['set'](_0x44b5da,{'collection':_0x1e0526,'filter':_0x3ac7ce});const _0x20c67c=this['_uis']['get'](_0x44b5da);_0x20c67c['attach'](_0x1e0526),this['listenTo'](_0x20c67c,'change:activeAnnotation',(_0x135533,_0x534111,_0x48bbb1,_0x43a253)=>{_0x43a253&&_0x425563['_removeActiveAnnotation'](_0x43a253),_0x48bbb1&&_0x425563['_addActiveAnnotation'](_0x48bbb1);});}['deactivate'](_0x4c7210){if(this['activeUIs']['delete'](_0x4c7210),!this['_uis']['has'](_0x4c7210))throw new _0x23ebbb('annotationsuis-missing-ui',this,{'uiName':_0x4c7210});const _0x26023b=this['_uis']['get'](_0x4c7210);_0x26023b['detach'](),this['stopListening'](_0x26023b),this['uisData']['get'](_0x4c7210)['collection']['destroy'](),this['uisData']['delete'](_0x4c7210);}['switchTo'](_0x530de2){if(!this['_uis']['has'](_0x530de2))throw new _0x23ebbb('annotationsuis-missing-ui',this,{'uiName':_0x530de2});const _0x59ae6b=this['context']['plugins']['get'](y),_0xdf1e9f=Array['from'](_0x59ae6b['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x530de2);const _0x15b438=this['_uis']['get'](_0x530de2);_0x15b438['setActiveAnnotation'](_0xdf1e9f),_0x15b438['_setSelectedAnnotations']&&_0xdf1e9f&&_0x15b438['_setSelectedAnnotations']([_0xdf1e9f]);}['deactivateAll'](){for(const _0x36cbfb of this['activeUIs'])this['deactivate'](_0x36cbfb);}['register'](_0x3148fb,_0x39f8a6){if(this['_uis']['has'](_0x3148fb))throw new _0x23ebbb('annotationsuis-register-already-registered');if('function'!=typeof _0x39f8a6['attach']||'function'!=typeof _0x39f8a6['detach']||'function'!=typeof _0x39f8a6['setActiveAnnotation'])throw new _0x23ebbb('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3148fb,_0x39f8a6);}['refilterAnnotations'](){const _0x3e8dae=this['context']['plugins']['get'](y)['collection'],_0x50e2ee=new Map(),_0x1f3714=Array['from'](this['activeUIs']);for(const _0x20cac1 of this['activeUIs']){const _0x11e964=this['uisData']['get'](_0x20cac1)['collection'];for(const _0x11492c of _0x11e964)_0x50e2ee['set'](_0x11492c,_0x20cac1);}for(const _0x97b54b of _0x3e8dae){const _0x4a7a76=_0x50e2ee['get'](_0x97b54b);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x97b54b);const _0x274128=_0x1f3714['find'](_0x144133=>this['uisData']['get'](_0x144133)['filter'](_0x97b54b));_0x4a7a76!==_0x274128&&(_0x4a7a76&&this['uisData']['get'](_0x4a7a76)['collection']['remove'](_0x97b54b),_0x274128&&this['uisData']['get'](_0x274128)['collection']['add'](_0x97b54b));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x221600){const _0x25c2ec=[];for(const _0x21ca7c of this['activeUIs']){(0x0,this['uisData']['get'](_0x21ca7c)['filter'])(_0x221600)&&_0x25c2ec['push'](_0x21ca7c);}if(_0x25c2ec['length']>0x1)throw new _0x23ebbb('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x25c2ec,'annotationType':_0x221600['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5bcbfa){super(_0x5bcbfa),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x38c802,_0x59e4f8)=>_0x38c802+_0x59e4f8),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4c678c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4c678c['to']('isAnimationDisabled',_0x4c06ea=>_0x4c06ea?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4c678c['to']('top',_0x5abbad=>Ot(_0x5abbad))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x33b5a9=this['element']['clientHeight'];_0x33b5a9&&(this['height']=_0x33b5a9);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x23a47b{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35cc39){super(_0x35cc39),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 _0x20e684=this['context']['config']['get']('sidebar.container');_0x20e684&&this['setContainer'](_0x20e684);}['setContainer'](_0x288e64){if(!g(_0x288e64))throw new _0x23ebbb('sidebar-setcontainer-invalid-element');this['container']=_0x288e64;}['_attachToContainer']({viewClass:_0x402b7e='',spaceBetweenItems:_0x2398c6=0x19}={}){if(!g(this['container']))throw new _0x23ebbb('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x402b7e,this['_spaceBetweenItems']=_0x2398c6;}['rearrange']({removedAnnotation:_0x43d541,previousAnnotation:_0x3d94b7,nextAnnotation:_0x46fec2}){const _0x158d61=this['getSidebarItemView'](_0x43d541);this['view']['list']['remove'](_0x158d61),this['_destroySidebarItemView'](_0x43d541),_0x3d94b7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3d94b7)),_0x46fec2&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x46fec2)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4f25f1,activatedAnnotation:_0x1df181,disableAnimationOnActivatedAnnotation:_0x4e1a13}){if(this['_activeAnnotation']=_0x1df181,_0x4f25f1){_0x4f25f1['isActive']=!0x1;const _0x45a6ec=this['getSidebarItemView'](_0x4f25f1);_0x45a6ec&&_0x4e1a13&&(_0x45a6ec['isAnimationDisabled']=!0x1);}if(_0x1df181){const _0x44c225=this['getSidebarItemView'](_0x1df181);_0x44c225&&(_0x1df181['isActive']=!0x0,_0x4e1a13&&(_0x44c225['isAnimationDisabled']=!0x0,_0x44c225['top']+=0x1),this['_alignToTargetRect'](_0x44c225));}}['_detachFromContainer'](_0x5c13af){if(this['view']['element']['remove'](),_0x5c13af){for(const _0x11f3dd of _0x5c13af)this['_destroySidebarItemView'](_0x11f3dd);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x14eed2,_0x4c4610){_0x4c4610||(_0x4c4610=_0x14eed2['view']);const _0x27a24b=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x27a24b,_0x14eed2),this['_annotationToSidebarItemView']['set'](_0x14eed2,_0x27a24b),_0x27a24b['content']['add'](_0x4c4610),this['listenTo'](_0x14eed2['view'],'change:targetRect',(_0x36b8d4,_0x231aad,_0x10904a)=>{const _0x5a708c=this['_getTargetTop'](_0x14eed2,_0x10904a);_0x27a24b['_targetTop']!=_0x5a708c&&(_0x27a24b['_targetTop']=_0x5a708c,this['_setItemTop'](_0x27a24b,_0x5a708c));}),this['listenTo'](_0x27a24b,'change:top',()=>{this['_recalculate'](_0x27a24b,'top');}),this['listenTo'](_0x27a24b,'change:bottom',()=>{this['_recalculate'](_0x27a24b,'bottom');}),this['_alignToTargetRect'](_0x27a24b);const _0xb82a31=this['_getItemBefore'](_0x27a24b);if(_0xb82a31)this['_alignAfterItem'](_0xb82a31,_0x27a24b)||this['_alignToTargetRect'](_0x27a24b);else this['_alignToTargetRect'](_0x27a24b);return this['_updateLastItem'](),this['view']['list']['add'](_0x27a24b),_0x27a24b;}['_alignForTopChange'](_0x203dfc){if(!_0x203dfc['content']['length'])return;const _0x4dd85b=this['_getItemBefore'](_0x203dfc);if(!_0x4dd85b)return;const _0x30ffba=this['_sidebarItemViewToAnnotation']['get'](_0x4dd85b),_0x34ffb0=this['_activeAnnotation'];_0x34ffb0&&_0x34ffb0===_0x30ffba?this['_alignAfterItem'](_0x4dd85b,_0x203dfc):this['_alignBeforeItem'](_0x203dfc,_0x4dd85b);}['_alignForBottomChange'](_0x116452){if(!_0x116452['content']['length'])return;const _0x1e5e1d=this['_getItemAfter'](_0x116452);if(!_0x1e5e1d)return;const _0x20d83f=this['_sidebarItemViewToAnnotation']['get'](_0x1e5e1d),_0x350ed3=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x51f378=this['_activeAnnotation'];_0x51f378&&_0x51f378===_0x20d83f&&_0x350ed3?(this['_alignBeforeItem'](_0x1e5e1d,_0x116452),this['_alignAfterItem'](_0x116452,_0x1e5e1d)):_0x51f378&&_0x51f378===_0x20d83f?this['_alignBeforeItem'](_0x1e5e1d,_0x116452):this['_alignAfterItem'](_0x116452,_0x1e5e1d);}['_recalculate'](_0xf0c6a8,_0x3cdff9){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x40d526,changedProp:_0x3f6a3e}of this['_recalculateBuffer'])'top'===_0x3f6a3e?this['_alignForTopChange'](_0x40d526):this['_alignForBottomChange'](_0x40d526);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xf0c6a8,'changedProp':_0x3cdff9});}['getSidebarItemView'](_0x5846af){return this['_annotationToSidebarItemView']['get'](_0x5846af);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3f4bea){const _0x558736=this['getSidebarItemView'](_0x3f4bea);this['stopListening'](_0x558736),this['stopListening'](_0x3f4bea['view']),_0x558736['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3f4bea),this['_sidebarItemViewToAnnotation']['delete'](_0x558736);}['_createSidebarView'](){const _0x27fa1e=new H(this['context']['locale']);return _0x27fa1e['render'](),this['on']('change:_lastItem',(_0x512530,_0x3f90f3,_0x237ab2,_0x4bde12)=>{_0x4bde12&&_0x27fa1e['unbind']('minHeight'),_0x237ab2?_0x27fa1e['bind']('minHeight')['to'](_0x237ab2,'bottom'):_0x27fa1e['minHeight']=null;}),_0x27fa1e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0xb2df20){const _0x1a35e8=this['_sidebarItemViewToAnnotation']['get'](_0xb2df20),_0x1af04a=_0x1a35e8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1a35e8)-0x1);return _0x1af04a&&this['getSidebarItemView'](_0x1af04a)||null;}['_getItemAfter'](_0x15889f){const _0x2211a9=this['_sidebarItemViewToAnnotation']['get'](_0x15889f),_0x54d392=_0x2211a9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2211a9)+0x1);return _0x54d392&&this['getSidebarItemView'](_0x54d392)||null;}['_alignBeforeItem'](_0x3fa6d3,_0x40c095){_0x3fa6d3['updateHeight']();const _0x5c9c9c=G(_0x40c095['bottom']+this['_spaceBetweenItems'],_0x3fa6d3['top']);return!!_0x5c9c9c&&(this['_setItemTop'](_0x40c095,_0x40c095['top']-_0x5c9c9c),!0x0);}['_alignAfterItem'](_0xce956c,_0x4cd14f){_0xce956c['updateHeight']();const _0x34c608=G(_0xce956c['bottom']+this['_spaceBetweenItems'],_0x4cd14f['top']);return!!_0x34c608&&(this['_setItemTop'](_0x4cd14f,_0x4cd14f['top']+_0x34c608,!0x1),!0x0);}['_alignToTargetRect'](_0x402609){const _0x524369=this['_sidebarItemViewToAnnotation']['get'](_0x402609);if(!_0x524369||!_0x524369['target']||!_0x524369['targetRect'])return;const _0x4cf8f8=this['_getTargetTop'](_0x524369,_0x524369['targetRect']);this['_setItemTop'](_0x402609,_0x4cf8f8);}['_getTargetTop'](_0x46671e,_0x190d60){if(null===_0x190d60)return 0x0;if(_0x46671e['target']instanceof _0x23c7a6)return _0x190d60['top'];{const _0x4acc3a=new _0x23c7a6(this['view']['element'])['top'];return _0x190d60['top']-_0x4acc3a;}}['_setItemTop'](_0x5e2e15,_0x455bae,_0x2531f0=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2531f0&&(_0x455bae=Math['max'](_0x455bae,this['_getMaxAvailableTop'](_0x5e2e15))),_0x5e2e15['top']=_0x455bae;}['_getMaxAvailableTop'](_0x49f494){let _0x3f3f07=this['_getItemBefore'](_0x49f494),_0x267385=0x0;for(;_0x3f3f07;)_0x3f3f07['updateHeight'](),_0x267385+=this['_spaceBetweenItems']+_0x3f3f07['height'],_0x3f3f07=this['_getItemBefore'](_0x3f3f07);return _0x267385;}}function G(_0x2ab68a,_0x180c76){return Math['max'](_0x2ab68a-_0x180c76,0x0);}function g(_0x53640b){return null!==_0x53640b&&'object'==typeof _0x53640b&&0x1===_0x53640b['nodeType'];}class e extends _0x23a47b{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x164677){super(_0x164677),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1bced8(),this['_refreshPositioningDebounced']=_0x3636f3(()=>{_0x164677['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4bd6ad=this['context']['plugins']['get'](j),_0x1f1334=this['context']['plugins']['get'](z);_0x4bd6ad['register']('wideSidebar',this),_0x1f1334['container']&&_0x4bd6ad['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4c4649){if(_0x4c4649===this['activeAnnotation'])return;const _0x23762c=this['context']['plugins']['get'](z);_0x23762c['_activeAnnotation']=_0x4c4649;const _0x568db6=this['activeAnnotation'];_0x23762c['refresh']({'blurredAnnotation':_0x568db6,'activatedAnnotation':_0x4c4649}),this['activeAnnotation']=_0x4c4649;}['attach'](_0x5bba05){this['annotations']=_0x5bba05;const _0x22f078=this['context']['plugins']['get'](z);if(_0x22f078['_annotations']=_0x5bba05,this['isAttached'])throw new _0x23ebbb('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x22f078,'set:container',()=>{this['detach'](),this['listenTo'](_0x22f078,'change:container',_0x19afd2=>{_0x19afd2['off'](),this['attach'](_0x5bba05);});}),_0x22f078['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3cd912=_0x3fc047=>{_0x3fc047['updateTargetRect'](),_0x22f078['addAnnotation'](_0x3fc047);};for(const _0x3443de of _0x5bba05)_0x3cd912(_0x3443de);this['listenTo'](_0x5bba05,'add',(_0x5e4d3b,_0x17c8ab)=>{_0x3cd912(_0x17c8ab);}),this['listenTo'](_0x5bba05,'remove',(_0x2d0952,_0x30093c,_0x3879fd)=>{_0x22f078['rearrange']({'removedAnnotation':_0x30093c,'previousAnnotation':_0x5bba05['get'](_0x3879fd-0x1),'nextAnnotation':_0x5bba05['get'](_0x3879fd+0x1)}),_0x30093c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5bba05,'focus',(_0x45ab94,_0x478ee0)=>{this['setActiveAnnotation'](_0x478ee0);}),this['listenTo'](_0x5bba05,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3c1761=this['context']instanceof _0x4c7f09?this['context']['editors']:new _0x1bced8([this['context']]);for(const _0x4c8ce9 of _0x3c1761)this['_integrateWithEditorAnnotations'](_0x4c8ce9);this['listenTo'](_0x3c1761,'add',(_0x1039ba,_0x2dde8c)=>{this['listenTo'](_0x2dde8c,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2dde8c);});}),this['listenTo'](_0x3c1761,'remove',(_0x193a42,_0x3fe343)=>{_0x3fe343['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3fe343['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x23ebbb('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x185191=this['context']['plugins']['get'](z);_0x185191['_detachFromContainer'](this['annotations']),this['stopListening'](_0x185191),this['stopListening'](this['annotations']),this['context']instanceof _0x4c7f09&&this['stopListening'](this['context']['editors']);for(const _0x534aea of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x534aea);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x87f8d3){if(!_0x87f8d3['plugins']['has']('EditorAnnotations'))return;const _0x270a53=_0x87f8d3['plugins']['get']('EditorAnnotations'),_0x9d66f4=()=>{const _0x38043d=_0x270a53['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x38043d[0x0]||null);};this['listenTo'](_0x270a53,'refresh',_0x9d66f4),this['listenTo'](_0x270a53,'blur',(_0x52d8f6,{isAnnotationTracked:_0x8e48a5})=>{this['activeAnnotation']&&_0x8e48a5(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x270a53,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x56f878=>{_0x270a53['hasDomSelection']()&&(_0x9d66f4(),_0x56f878['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x270a53);}['_destroyEditorAnnotationsIntegration'](_0x18d09f){this['stopListening'](_0x18d09f),this['_editorAnnotations']['remove'](_0x18d09f);}}class C extends _0x91c96a{['counterView'];constructor(_0x36e3a1){super(_0x36e3a1);const _0x414821=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3c6be5,_0x3a0c1c)=>_0x3c6be5?'...':_0x3a0c1c['toString']()),this['set']('annotationType',''),this['icon']=_0x3e5431,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x414821['to']('annotationType',_0x698f28=>'ck-annotation-counter__badge--'+_0x698f28),_0x414821['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x414821['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x23a47b{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x41da0d){super(_0x41da0d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x38222e())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1bced8(),this['_refreshPositioningDebounced']=_0x3636f3(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x55c7c8(this['context']['locale']),this['balloonPanelView']=new _0x1ad1e9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x25397a){this['annotations']=_0x25397a;const _0x22b5d4=this['context']['plugins']['get'](z),_0x353aeb=this['balloonPanelView'];if(_0x22b5d4['_annotations']=_0x25397a,this['isAttached'])throw new _0x23ebbb('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x22b5d4,'set:container',()=>{this['detach'](),this['listenTo'](_0x22b5d4,'change:container',_0x40388e=>{_0x40388e['off'](),this['attach'](_0x25397a);});}),_0x22b5d4['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x351d50=_0x292853=>{const _0x2c81bd=new C(this['context']['locale']);_0x22b5d4['addAnnotation'](_0x292853,_0x2c81bd),this['_annotationToNarrowView']['set'](_0x292853,_0x2c81bd),_0x2c81bd['bind']('isDirty','annotationType','number')['to'](_0x292853['view'],'isDirty','type','length'),_0x2c81bd['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x353aeb['content']['first']!==_0x292853['view']?(this['_showBalloon'](_0x292853),_0x292853['view']['element']['focus'](),this['setActiveAnnotation'](_0x292853)):this['setActiveAnnotation'](null);});};for(const _0x3a2d1e of _0x25397a)_0x351d50(_0x3a2d1e);this['listenTo'](_0x25397a,'add',(_0x105945,_0x98d456)=>{_0x351d50(_0x98d456);}),this['listenTo'](_0x25397a,'remove',(_0x5338d6,_0x335dc6,_0x523f73)=>{this['_annotationToNarrowView']['get'](_0x335dc6)['destroy'](),this['_annotationToNarrowView']['delete'](_0x335dc6),_0x22b5d4['rearrange']({'removedAnnotation':_0x335dc6,'previousAnnotation':_0x25397a['get'](_0x523f73-0x1),'nextAnnotation':_0x25397a['get'](_0x523f73+0x1)}),_0x335dc6===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x25397a,'focus',(_0x28e4c8,_0x3f5161)=>{this['setActiveAnnotation'](_0x3f5161);}),this['listenTo'](_0x25397a,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x5126dd,_0x2e5576)=>{_0x2e5576['keyCode']===_0x17e95f['esc']&&_0x353aeb['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x353aeb['content']['first']),this['_hideBalloon'](),_0x2e5576['stopPropagation'](),_0x2e5576['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3ec700,_0x3a5f29)=>{const _0x2eab1d=_0x3a5f29['target'];_0x353aeb['isVisible']&&_0x353aeb['element']['contains'](_0x2eab1d)||_0x22b5d4['view']['element']['contains'](_0x2eab1d)||_0x3ec700['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1417ad=>_0x1417ad['contains'](_0x2eab1d))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x33a12f=this['context']instanceof _0x4c7f09?this['context']['editors']:new _0x1bced8([this['context']]);for(const _0x55e3b9 of _0x33a12f)this['_integrateWithEditorAnnotations'](_0x55e3b9);this['listenTo'](_0x33a12f,'add',(_0x4a8c84,_0x532b14)=>{this['listenTo'](_0x532b14,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x532b14);});}),this['listenTo'](_0x33a12f,'remove',(_0x56d37d,_0x5e93b7)=>{_0x5e93b7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5e93b7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0xeaa69b){if(_0xeaa69b===this['activeAnnotation'])return;const _0x10213b=this['context']['plugins']['get'](z);if(_0x10213b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0xeaa69b,'disableAnimationOnActivatedAnnotation':!0x0}),_0xeaa69b)_0x10213b['getSidebarItemView'](_0xeaa69b)?this['_showBalloon'](_0xeaa69b):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0xeaa69b;}['detach'](){if(!this['isAttached'])throw new _0x23ebbb('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x8a1df5=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x12ff4c=>_0x12ff4c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x8a1df5['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4c7f09&&this['stopListening'](this['context']['editors']);for(const _0x5cc6dd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5cc6dd);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'](_0x17d295){if(!_0x17d295['plugins']['has']('EditorAnnotations'))return;const _0x21e814=_0x17d295['plugins']['get']('EditorAnnotations'),_0x403b7d=this['context']['plugins']['get'](z),_0x144be3=this['annotations'],_0x2ecfe5=this['balloonPanelView'],_0x479fbb=()=>{const _0x4cff15=_0x21e814['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4cff15),this['setActiveAnnotation'](_0x4cff15[0x0]||null);};this['listenTo'](_0x21e814,'refresh',_0x479fbb),this['listenTo'](_0x21e814,'blur',(_0x5cccaf,{isAnnotationTracked:_0x4fb4f5})=>{this['activeAnnotation']&&_0x4fb4f5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x21e814,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x144be3,'blur',_0x48c5c4=>{_0x21e814['hasDomSelection']()&&_0x48c5c4['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5eb2fc,_0x2ab7aa)=>{const _0x4e7f5d=_0x2ab7aa['target'];_0x2ecfe5['isVisible']&&_0x2ecfe5['element']['contains'](_0x4e7f5d)||_0x403b7d['view']['element']['contains'](_0x4e7f5d)||this['activeAnnotation']&&_0x21e814['hasDomSelection']()&&(_0x479fbb(),_0x5eb2fc['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x21e814);}['_destroyEditorAnnotationsIntegration'](_0xabd1b3){_0xabd1b3&&(this['stopListening'](_0xabd1b3),this['_editorAnnotations']['remove'](_0xabd1b3));}['_setSelectedAnnotations'](_0x5d31f8){for(const _0x2fff25 of this['_selectedAnnotations'])_0x5d31f8['includes'](_0x2fff25)||this['_manuallyClosedAnnotationViews']['delete'](_0x2fff25['view']);this['_selectedAnnotations']=_0x5d31f8;}['_refreshPositioning'](){const _0x50b1d6=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x50b1d6['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1d4635){if(this['_manuallyClosedAnnotationViews']['has'](_0x1d4635['view']))return;const _0x2d2e2a=this['balloonPanelView']['content']['first'];_0x2d2e2a!==_0x1d4635['view']?(_0x2d2e2a&&this['_detachListeners'](_0x2d2e2a),this['_attachListeners'](_0x1d4635['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1d4635['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x64a73b=this['balloonPanelView']['content']['first'],_0x493e01=_0x64a73b&&this['annotations']['getByView'](_0x64a73b);if(!_0x493e01||!this['_annotationToNarrowView']['has'](_0x493e01))return;const _0xb14abc=this['_annotationToNarrowView']['get'](_0x493e01)['element'],_0x2b2549=(function(){const _0x217497=_0x1ad1e9['defaultPositions'];return[_0x217497['southArrowNorthEast'],_0x217497['northArrowSouthEast'],_0x217497['southArrowNorth'],_0x217497['northArrowSouth'],_0x217497['southArrowNorthWest'],_0x217497['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xb14abc,'positions':_0x2b2549});}['_hideBalloon'](){const _0x9cb2b4=this['balloonPanelView'],_0x2cfbbd=_0x9cb2b4['content']['first'];_0x2cfbbd&&(this['_detachListeners'](_0x2cfbbd),_0x9cb2b4['unpin'](),_0x9cb2b4['content']['clear']());}['_attachListeners'](_0x49dbd9){this['listenTo'](_0x49dbd9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x49dbd9,'Esc',(_0x5c2bb3,_0x25f4f2)=>{this['_manuallyClosedAnnotationViews']['add'](_0x49dbd9),this['_hideBalloon'](),_0x25f4f2();});}['_detachListeners'](_0x3bc7de){this['stopListening'](_0x3bc7de);}}class c extends _0x568675{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x28a60e,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b6b11){super(_0x1b6b11),_0x1b6b11['editing']['view']['addObserver'](_0x1366e1),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1b6b11['plugins']['get'](_0x28a60e),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x1dfe12=this['editor']['plugins']['get'](j);_0x1dfe12['context']===this['editor']&&(_0x1dfe12['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x38d391,_0x58364d)=>{const _0x411727=this['_balloon'];if(this['isAttached']&&_0x411727['visibleView']){const _0x447780=this['annotations']['getByView'](_0x411727['visibleView']);_0x447780&&this['_closeAnnotation'](_0x447780),_0x58364d();}}));}['afterInit'](){const _0x1148da=this['editor']['plugins']['get'](j);_0x1148da['context']===this['editor']&&(_0x1148da['hasActive']()||_0x1148da['switchTo']('inline'));}['setActiveAnnotation'](_0x4781ce){_0x4781ce!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4781ce&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4781ce)&&this['_addAnnotationToBalloon'](_0x4781ce,!0x0),_0x4781ce['isActive']=!0x0),_0x4781ce||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4781ce);}['attach'](_0x3f4d57){this['annotations']=_0x3f4d57;const _0x33374=this['editor']['plugins']['get'](j),_0x767ba7=this['_balloon'];if(this['isAttached'])throw new _0x23ebbb('inlineannotations-attach-already-attached',this);if(_0x33374['context']!==this['editor'])throw new _0x23ebbb('inlineannotations-not-allowed-with-context',this);const _0x43c08d=this['editor']['plugins']['get'](b);this['listenTo'](_0x43c08d,'refresh',()=>{const _0x48487e=_0x43c08d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x15f2f8,_0x32193a;!this['_forceRefresh']&&(_0x15f2f8=_0x48487e,_0x32193a=this['_selectedAnnotations'],_0x15f2f8['length']===_0x32193a['length']&&_0x15f2f8['every'](_0x53fd7f=>_0x32193a['includes'](_0x53fd7f)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x48487e),this['setActiveAnnotation'](_0x48487e[0x0]||null));}),this['listenTo'](_0x43c08d,'blur',(_0x3eef03,{isAnnotationTracked:_0x2c2aba})=>{this['activeAnnotation']&&_0x2c2aba(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4d9cb1,_0x142fca,_0x23c5ba)=>{_0x23c5ba||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3f4d57,'remove',(_0x209ce3,_0x512e97)=>{this['_removeAnnotationFromBalloon'](_0x512e97),_0x512e97===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x767ba7,'change:visibleView',(_0x348411,_0x2af58d,_0x446444,_0x493ed2)=>{_0x493ed2&&this['stopListening'](_0x493ed2);const _0xbf2283=_0x3f4d57['getByView'](_0x446444);_0x446444&&_0xbf2283&&(this['listenTo'](_0x446444,'change:height',()=>{_0x767ba7['updatePosition']();}),this['listenTo'](_0x446444,'Esc',()=>{this['_closeAnnotation'](_0xbf2283),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xbf2283&&this['setActiveAnnotation'](_0xbf2283));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x767ba7['visibleView']&&(_0x3f4d57['getByView'](_0x767ba7['visibleView'])&&_0x767ba7['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 _0x23ebbb('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3b8e22 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3b8e22);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x48e47e){for(const _0x107b13 of this['_selectedAnnotations'])_0x48e47e['includes'](_0x107b13)||this['_manuallyClosed']['delete'](_0x107b13);for(const _0x2e408d of this['annotations'])_0x48e47e['includes'](_0x2e408d)||this['_removeAnnotationFromBalloon'](_0x2e408d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1afc85 of _0x48e47e)this['_addAnnotationToBalloon'](_0x1afc85);}this['_selectedAnnotations']=_0x48e47e;}['_addAnnotationToBalloon'](_0x126875,_0x10d1f7=!0x1){this['_manuallyClosed']['has'](_0x126875)||(this['_addedAnnotations']['has'](_0x126875)||this['_balloon']['hasView'](_0x126875['view'])||(this['_addedAnnotations']['add'](_0x126875),this['_balloon']['add']({'stackId':_0x126875['view']['id'],'view':_0x126875['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x126875)}})),_0x10d1f7&&this['_balloon']['showStack'](_0x126875['view']['id']));}['_getBalloonTargetForAnnotation'](_0x396dec){const _0x5b3887=_0x396dec['target'],_0x4aaa5d=this['editor']['editing']['view'],_0x293f47=_0x4aaa5d['document']['selection']['getFirstRange'](),_0x1589fc=_0x4aaa5d['domConverter']['viewRangeToDom'](_0x293f47);if(_0x1589fc['collapse'](!0x0),_0x5b3887){if(_0x5b3887 instanceof _0x23c7a6)return _0x5b3887;let _0x5b2e04=[];for(const _0x4c0116 of _0x5b3887)_0x5b2e04['push'](...F(_0x4c0116['getClientRects']()));_0x5b2e04=function(_0x8d873b){const _0x5ded22=[];let _0x473c37=_0x8d873b[0x0];for(let _0x4d2ec3=0x1;_0x4d2ec3<_0x8d873b['length'];_0x4d2ec3++)P(_0x473c37,_0x8d873b[_0x4d2ec3])?_0x473c37['width']+=_0x8d873b[_0x4d2ec3]['width']:(_0x5ded22['push'](_0x473c37),_0x473c37=_0x8d873b[_0x4d2ec3]);return _0x5ded22['push'](_0x473c37),_0x5ded22;}(_0x5b2e04);const _0x3e03be=_0x1589fc['getBoundingClientRect']();return _0x5b2e04['find'](_0x52e27c=>_0x52e27c['top']<=_0x3e03be['top']&&_0x52e27c['bottom']>=_0x3e03be['bottom']&&_0x52e27c['left']<=_0x3e03be['left']&&_0x52e27c['right']>=_0x3e03be['right'])||_0x5b2e04[0x0];}return _0x396dec['targetRect']||_0x1589fc;}['_removeAnnotationFromBalloon'](_0x5dadeb){this['_addedAnnotations']['has'](_0x5dadeb)&&this['_balloon']['hasView'](_0x5dadeb['view'])&&(this['_addedAnnotations']['delete'](_0x5dadeb),this['_balloon']['remove'](_0x5dadeb['view']));}['_closeAnnotation'](_0x25be09){this['_manuallyClosed']['add'](_0x25be09),this['_removeAnnotationFromBalloon'](_0x25be09);}}function F(_0x5db6b4){return Array['from'](_0x5db6b4)['map'](DOMRect['fromRect']);}function P(_0x1719e0,_0xd23f0c){return _0x1719e0['top']===_0xd23f0c['top']&&_0x1719e0['bottom']===_0xd23f0c['bottom']&&_0x1719e0['right']===_0xd23f0c['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x3eb574,_0x368a3b){super(_0x3eb574),this['set']('isEmpty',!_0x368a3b['length']),this['focusTracker']=new _0x2daa7e(),this['_annotationViews']=_0x368a3b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x28ff4b({'focusables':_0x368a3b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x368a3b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x368a3b,'remove',(_0x1ce5e5,_0x5106fb)=>{_0x5106fb['isActive']&&this['focus'](),_0x368a3b['length']||(this['isEmpty']=!0x0);});const _0x1c3eb5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x3eb574,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x368a3b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1c3eb5['if']('isEmpty','ck-hidden',_0x31957d=>!_0x31957d)]},'children':[{'text':N(_0x3eb574,'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 _0x4a9bdd of this['_annotationViews'])this['focusTracker']['add'](_0x4a9bdd['element']);this['_annotationViews']['on']('change',(_0x4b7a26,{added:_0x2f50fd,removed:_0x24e93a})=>{for(const _0x327d61 of _0x2f50fd)this['focusTracker']['add'](_0x327d61['element']);for(const _0x56a593 of _0x24e93a)this['focusTracker']['remove'](_0x56a593['element']);});}}class p extends _0x23a47b{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x380164){super(_0x380164),this['archivedThreads']=new _0x1bced8();}['init'](){const _0xc678a8=this['context'],_0x2f4686=_0xc678a8['plugins']['get'](o),_0x5f113d=_0xc678a8['plugins']['get'](y);this['listenTo'](_0x2f4686,'addCommentThread',(_0x38a9f5,{threadId:_0xc0b0b0})=>{const _0x49124a=_0x2f4686['getCommentThread'](_0xc0b0b0);_0x49124a['archivedAt']&&this['archivedThreads']['add'](_0x49124a,this['_calculatePosition'](_0x49124a['archivedAt'])),this['listenTo'](_0x49124a,'change:archivedAt',(_0x424442,_0x2d9a52,_0x284c96)=>{_0x284c96?this['archivedThreads']['has'](_0x49124a)||this['archivedThreads']['add'](_0x49124a,this['_calculatePosition'](_0x49124a['archivedAt'])):this['archivedThreads']['has'](_0x49124a)&&this['archivedThreads']['remove'](_0x49124a);});}),this['listenTo'](_0x2f4686,'removeCommentThread',(_0x59763e,{threadId:_0x36f283})=>{const _0xbc3f0d=_0x2f4686['getCommentThread'](_0x36f283);this['stopListening'](_0xbc3f0d),this['archivedThreads']['has'](_0xbc3f0d)&&this['archivedThreads']['remove'](_0xbc3f0d);},{'priority':'highest'}),this['listenTo'](_0x5f113d['collection'],'focus',(_0x422f1a,_0x2fbb6c)=>{_0x2fbb6c['isVisible']||(_0x2fbb6c['isActive']=!0x0,_0x5f113d['activate'](_0x2fbb6c));});}['_calculatePosition'](_0x3961aa){const _0x343ade=[...this['archivedThreads']]['findIndex'](_0x4d73e9=>_0x4d73e9['archivedAt']<_0x3961aa);return _0x343ade>-0x1?_0x343ade:this['archivedThreads']['length'];}}class a extends _0x568675{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x8e0028];}constructor(_0x72af23){super(_0x72af23),this['annotationViews']=new _0x3f9619(),this['_pendingThreads']=[];}['init'](){const _0x2b0e22=this['editor'],_0x3ac054=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2b0e22['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x91c96a,!0x0)),_0x2b0e22['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xc092da=this['_createCommentsArchiveButton'](_0x53e10d);return _0xc092da['set']({'role':'menuitemcheckbox'}),_0xc092da;});const _0x4eac02=_0x2b0e22['plugins']['get'](p),_0x551728=_0x2b0e22['plugins']['get']('Annotations'),_0x54e465=_0x2b0e22['plugins']['get']('CommentsRepository');_0x4eac02['archivedThreads']['forEach'](_0x4303f8=>{this['_handleNewThread'](_0x4303f8);}),this['listenTo'](_0x4eac02['archivedThreads'],'add',(_0x8945ef,_0x19b2b9)=>{this['_handleNewThread'](_0x19b2b9);}),this['listenTo'](_0x551728['collection'],'add',(_0x47e73b,_0x4ba875)=>{const _0x1d1d85=this['_pendingThreads']['find'](_0x2e2152=>{const _0x5caa96=_0x54e465['_threadToController']['get'](_0x2e2152);return _0x5caa96&&_0x4ba875['innerView']===_0x5caa96['view'];});if(_0x1d1d85){const _0x3a5274=this['_calculatePosition'](_0x1d1d85['archivedAt']);this['_addAnnotationToArchive'](_0x4ba875,_0x3a5274),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1d1d85),0x1);}}),this['listenTo'](_0x4eac02['archivedThreads'],'remove',(_0x44aa0d,_0x24cd83)=>{const _0x58c430=_0x2b0e22['config']['get']('collaboration.channelId');if(!_0x58c430||_0x24cd83['channelId']===_0x58c430){if(this['_pendingThreads']['includes'](_0x24cd83))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x24cd83),0x1);else{const _0x35da3a=_0x54e465['_threadToController']['get'](_0x24cd83),_0x1b48db=_0x551728['getByInnerView'](_0x35da3a['view']);this['annotationViews']['remove'](_0x1b48db['view']),this['stopListening'](_0x1b48db),this['stopListening'](_0x1b48db['focusableElements']);}}}),this['listenTo'](_0x551728['collection'],'add',(_0x19884f,_0x334276)=>{this['listenTo'](_0x334276,'escape',_0x3ac054);}),this['listenTo'](_0x551728['collection'],'remove',(_0x2564fa,_0x453114)=>{this['stopListening'](_0x453114,'escape',_0x3ac054);});}['_addAnnotationToArchive'](_0x4cfd2e,_0x5c2aab){this['listenTo'](_0x4cfd2e,'set:isVisible',_0x4684ad=>{_0x4684ad['return']=!0x1,_0x4684ad['stop']();}),this['annotationViews']['add'](_0x4cfd2e['view'],_0x5c2aab);}['_handleNewThread'](_0x263d89){const _0x455d20=this['editor']['plugins']['get']('CommentsRepository'),_0x26cf7f=this['editor']['plugins']['get']('Annotations'),_0x372b22=this['editor']['config']['get']('collaboration.channelId');if(!_0x372b22||_0x263d89['channelId']===_0x372b22){const _0x5b1671=_0x455d20['_threadToController']['get'](_0x263d89);if(!_0x5b1671)return void this['_pendingThreads']['push'](_0x263d89);const _0x36bb1a=this['_calculatePosition'](_0x263d89['archivedAt']),_0x346b53=_0x26cf7f['getByInnerView'](_0x5b1671['view']);_0x346b53['isVisible']&&_0x26cf7f['_visibleAnnotations']['remove'](_0x346b53),this['_addAnnotationToArchive'](_0x346b53,_0x36bb1a);}}['_calculatePosition'](_0x36eb0d){const _0x4f1efe=this['editor']['config']['get']('collaboration.channelId'),_0x21bb37=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x1ea4f7=>_0x1ea4f7['channelId']===_0x4f1efe)['findIndex'](_0x3d26c8=>_0x3d26c8['archivedAt']<_0x36eb0d);return _0x21bb37<0x0||_0x21bb37>this['annotationViews']['length']?this['annotationViews']['length']:_0x21bb37-0x1;}['_toggleDialog'](){const _0x4d314d=this['editor'],_0x17e2ae=_0x4d314d['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x4d314d['locale'],this['annotationViews'])),'commentsArchive'===_0x17e2ae['id']?_0x17e2ae['hide']():_0x17e2ae['show']({'id':'commentsArchive','title':N(_0x4d314d['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1823db,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x258b53['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x8a3aa1,_0x24059c=!0x1){const _0x3ea1d0=this['editor']['locale'],_0x410645=this['editor']['plugins']['get']('Dialog'),_0x5792f6=new _0x8a3aa1(_0x3ea1d0);return _0x5792f6['bind']('isEnabled')['to'](this,'isEnabled'),_0x5792f6['bind']('isOn')['to'](_0x410645,'id',_0x5db7cc=>'commentsArchive'===_0x5db7cc),_0x5792f6['set']({'label':N(_0x3ea1d0,'COMMENTS_ARCHIVE'),'icon':_0x1823db,'isToggleable':!0x0}),_0x24059c&&(_0x5792f6['tooltip']=!0x0),this['listenTo'](_0x5792f6,'execute',()=>this['_toggleDialog']()),_0x5792f6;}['_hideDialogOnAnnotationEscape']=_0x5caaf2=>{const _0x13b265=_0x5caaf2['source'];if(!this['annotationViews']['has'](_0x13b265['view']))return;const _0x58ee74=this['editor']['plugins']['get']('Dialog');_0x58ee74['isOpen']&&'commentsArchive'===_0x58ee74['id']&&(_0x58ee74['hide'](),_0x5caaf2['stop']());};}class gi extends _0x568675{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x2f7d5f,ContextPlugin as _0xff025c,PendingActions as lt,Command as _0x4db124,Plugin as _0x317aa9,Context as _0xda5f60}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x4a10d3,uid as _0x354fd4,KeystrokeHandler as jt,FocusTracker as _0xa2d4f2,diff as _0x5d41e5,Collection as _0x578894,Rect as _0x2ff513,CKEditorError as _0x208a6e,first as _0x1fdc4d,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x29ee4d,keyCodes as _0xf9b1f4}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x4c4da9,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x497630,trimHtml as _0x30a015,LateFocusDropdownButtonView as _0x2f33a3,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x364ee3}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x166ba6}from'es-toolkit/compat';import{IconUndo as _0x4dfc2b,IconCheck as _0x1c456e,IconPencil as _0x455456,IconRemoveComment as _0x2f8d27,IconThreeVerticalDots as _0x52e144,IconAddComment as _0x15271d,IconCommentsArchive as _0x46581f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x23c2f1,ButtonView as _0x37ad8c,ViewCollection as _0x72f64a,createDropdown as _0x4e6238,ListView as _0x19dbf5,focusChildOnDropdownOpen as _0x2a38df,ListItemView as _0x4cf369,MenuBarMenuListItemButtonView as _0x2210b1,BodyCollection as _0x4f67b9,BalloonPanelView as _0x4e99ca,ContextualBalloon as _0x1c004d,Dialog as _0x10ac76,DialogViewPosition as _0x41ea57}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x2a7006}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x3e2e04}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x5546d7}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4a10d3(){['model'];['view'];constructor(_0x5b5d18,_0x42f098){super(),this['model']=_0x5b5d18,this['model']['_isAttached']=!0x0,this['view']=_0x42f098,this['listenTo'](_0x42f098,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x42f098,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x42f098,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x42f098,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x42f098,'addComment',(_0x2d6036,_0x2cf635)=>this['addComment'](_0x2cf635)),this['listenTo'](_0x42f098,'updateComment',(_0x3c36f5,_0x5782ba,_0x4cd09c)=>this['updateComment'](_0x5782ba,_0x4cd09c)),this['listenTo'](_0x42f098,'removeComment',(_0x3586c4,_0x2db39a)=>this['removeComment'](_0x2db39a));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x36e185){this['model']['addComment']({'content':_0x36e185,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2fba56,_0x261153){this['model']['getComment'](_0x2fba56)['update']({'content':_0x261153});}['removeComment'](_0x4b12bc){this['model']['getComment'](_0x4b12bc)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x29e8f0,_0x57906e,_0x19804b){const t=_0x29e8f0['t'];switch(_0x57906e){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'},_0x19804b);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'},_0x19804b);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'},_0x19804b);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'},_0x19804b);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x19804b);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'},_0x19804b);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'},_0x19804b);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'},_0x19804b);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x50e824,_0x5d86e4){super(_0x50e824);const _0x20c211=_0x354fd4();this['main']=this['createCollection'](),this['editable']=new $t(_0x50e824,_0x5d86e4,void 0x0,{'label':()=>N(_0x50e824,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x50e824['uiLanguageDirection'],'lang':_0x50e824['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x20c211},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x5a5676){super(_0x5a5676),this['view']=new Vt(_0x5a5676['locale'],_0x5a5676['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x200cc4=this['editor']['editing']['view'],_0x4ae950=this['view']['editable'],_0x19d7ce=_0x200cc4['document']['getRoot']();_0x4ae950['name']=_0x19d7ce['rootName'],this['view']['render']();const _0x5c0213=_0x4ae950['element'];this['setEditableElement'](_0x4ae950['name'],_0x5c0213),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x200cc4['attachDomRoot'](_0x5c0213),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4a10d3(_0x2f7d5f){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x28d019={}){function _0x5bde82(_0x427205){return _0x427205['map'](_0x318e73=>String['fromCharCode'](_0x318e73))['join']('');}(_0x28d019=Object['assign']({},_0x28d019))['plugins']||(_0x28d019['plugins']=Rt['defaultPlugins']),super(_0x28d019),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x5bde82([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5bde82([0x76,0x69,0x65,0x77])][_0x5bde82([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5bde82([0x61,0x75,0x74,0x6f]),this[_0x5bde82([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5bde82([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5bde82([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5bde82([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5bde82([0x6f,0x6b])});}['create'](){const _0x403b56=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x403b56))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xbc61d4=>{const _0x5ced75=this['model']['document']['getRoot'](),_0x228c94=_0x5ced75&&_0x5ced75['getChild'](_0x5ced75['childCount']-0x1);_0xbc61d4['setSelection'](_0x228c94,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x586056=this['editing']['view'],_0x1c8825=_0x586056['document']['getRoot'](),_0x1aef0d=_0x1c8825['getChild'](0x0);_0x1c8825['childCount']>0x1||!_0x1aef0d||'p'!=_0x1aef0d['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x586056,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1aef0d['placeholder']=this['placeholder']),St({'view':_0x586056,'element':_0x1aef0d,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1aef0d);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4b1b86,_0x1e766e={}){super(_0x4b1b86),this['editor']=null,this['_editorConfig']=_0x1e766e,this['set']('value',_0x1e766e['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x4b1b86,'Reply...')),this['set']('submitLabel',N(_0x4b1b86,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xa2d4f2(),this['focusCycler']=new _0x23c2f1({'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',(_0x5770c7,_0x45e5e0)=>{this['cancelButtonView']['fire']('execute'),_0x45e5e0();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4c225c,_0x3c7874)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3c7874());}),this['on']('submit',(_0xe54e82,_0xd326d7)=>{_0xd326d7['length']>0xfde8?(alert(N(_0x4b1b86,'TOO_LONG_COMMENT_ALERT',[_0xd326d7['length'],0xfde8])),_0xe54e82['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x5c7193=this['editor'];this['element']['insertBefore'](_0x5c7193['ui']['element'],this['element']['firstChild']),_0x5c7193['model']['document']['on']('change',()=>this['value']=_0x5c7193['getData']()),_0x5c7193['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5c7193['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5890db){-0x1===_0x5890db?(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:_0x4b02a1}=this,_0x4d2686=new _0x37ad8c(_0x4b02a1);return _0x4d2686['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4d2686['withText']=!0x0,_0x4d2686['bind']('label')['to'](this,'submitLabel'),_0x4d2686['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4d2686['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4ded33,_0x437662)=>!_0x437662&&!!_0x4ded33['trim']()),_0x4d2686;}['_createCancelButton'](){const {locale:_0x4fb15f}=this,_0x1a0ea2=new _0x37ad8c(_0x4fb15f);return _0x1a0ea2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1a0ea2['label']=N(_0x4fb15f,'Cancel'),_0x1a0ea2['withText']=!0x0,_0x1a0ea2['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1a0ea2;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xb3d18=>{this['focusTracker']['add'](_0xb3d18['element']);}),this['focusables']['on']('change',(_0xd5f136,_0x1801d8)=>{for(const _0x1e629e of Array['from'](_0x1801d8['added'])['reverse']())this['focusTracker']['add'](_0x1e629e['element']);});}}class ie extends kt{constructor(_0x474101,_0x5c510c,_0x491657){super(_0x474101),this['commentInputView']=new os(_0x474101,_0x491657),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0xcefcbd,_0x4a2ad9)=>_0xcefcbd||!!_0x4a2ad9),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 _0x4c4da9(_0x474101,_0x5c510c),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'](_0x48acae){this['commentInputView']['focus'](_0x48acae);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x508bb9,_0x66000a)=>{const {submitButtonView:_0x14f8a8,cancelButtonView:_0x1c27b7,editor:_0x307e0e}=this['commentInputView'];[_0x14f8a8['element'],_0x1c27b7['element'],_0x307e0e?_0x307e0e['editing']['view']['getDomRoot']():null]['filter'](_0x205ef5=>_0x205ef5)['some'](_0x3f6d4e=>_0x3f6d4e['contains'](_0x66000a['target']))||(this['focus'](),_0x66000a['preventDefault']());});}}class rs extends kt{constructor(_0x4175a0){super(_0x4175a0);const _0x1ad466=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1ad466['to']('count',_0x780975=>N(_0x4175a0,'NUMBER_OF_COMMENTS',_0x780975))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x57104f,_0x4100a0,_0x3e4618){super(_0x57104f);const _0x1ecf96=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4100a0['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4100a0,this['_config']=_0x3e4618,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xa2d4f2(),this['keystrokes']=new jt(),this['focusCycler']=new _0x23c2f1({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1e2f6e=>this['commentViews']['map'](_0x17bd3e=>_0x17bd3e['element'])['includes'](_0x1e2f6e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x57104f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x31b123=>_0x31b123-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3e66c5 of _0x4100a0['comments'])this['_handleNewCommentModel'](_0x3e66c5);this['_handleInfoComment'](),this['listenTo'](_0x4100a0['comments'],'add',(_0x438d65,_0x35f85f)=>{const _0x4232e7=this['_calculatePosition'](_0x35f85f);this['length']++,this['_handleNewCommentModel'](_0x35f85f,_0x4232e7),this['refreshVisibleViews']();}),this['listenTo'](_0x4100a0['comments'],'remove',(_0x42926b,_0x50f9b9)=>{this['length']--,this['_handleRemoveCommentModel'](_0x50f9b9),this['refreshVisibleViews']();}),this['listenTo'](_0x4100a0,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4100a0,'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',_0x1ecf96['if']('length','ck-hidden',_0xaa0cb7=>!_0xaa0cb7)],'aria-label':N(_0x57104f,'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'](_0x275c28){-0x1===_0x275c28?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x584e75 of this['commentViews'])_0x584e75['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2eecec,_0x555461){const _0x2463a8=new this['_config']['CommentView'](this['locale'],_0x2eecec,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2463a8['viewUid']=_0x2eecec['id'],_0x2463a8['delegate']('removeComment')['to'](this),_0x2463a8['delegate']('updateComment')['to'](this),_0x2463a8['delegate']('resolveCommentThread')['to'](this),_0x2463a8['delegate']('editorReady')['to'](this),_0x2463a8['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2463a8,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2463a8,_0x555461);}['_calculatePosition'](_0x30f4b7){const _0x3ae021=this['_model']['_findOptimalIndex'](_0x30f4b7);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x30f4b7['authoredAt']?_0x3ae021-0x1:_0x3ae021:_0x3ae021-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3bbfe1={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3bbfe1,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3bbfe1));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x82c296){const _0x5eb5de=this['commentViews']['remove'](_0x82c296['id']);this['stopListening'](_0x5eb5de),_0x5eb5de['isEditMode']&&this['_updateHasDirtyComment'](),_0x5eb5de['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x102109=>_0x102109['isEditMode']);}['_rearrangeCollapse'](){const _0xbbb978=function(_0x2d6fc9){const _0x2def7d=new _0x578894();for(const _0x4ead18 of _0x2d6fc9)_0x2def7d['add'](_0x4ead18);return _0x2def7d;}(this['commentViews']),_0x120191=this['_collapsedCommentsView']['count'];for(let _0x3d91fc=0x1;_0x3d91fc<=_0x120191;_0x3d91fc++)_0xbbb978['remove'](0x1);for(const _0x4ff852 of _0xbbb978)_0x4ff852['collapse']();_0x120191>0x0&&_0xbbb978['add'](this['_collapsedCommentsView'],0x1),ns(_0x5d41e5(Array['from'](this['visibleViews']),Array['from'](_0xbbb978)),this['visibleViews'],_0xbbb978);}['_rearrangeExpand'](){ns(_0x5d41e5(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1942c7 of this['visibleViews'])_0x1942c7['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5bf046=>{this['focusTracker']['add'](_0x5bf046['element']),this['keystrokes']['listenTo'](_0x5bf046['element']);}),this['commentViews']['on']('change',(_0x2710a1,_0x388643)=>{for(const _0x4e7921 of _0x388643['removed'])this['focusTracker']['remove'](_0x4e7921['element']),this['keystrokes']['stopListening'](_0x4e7921['element']);for(const _0x23a930 of Array['from'](_0x388643['added'])['reverse']())this['focusTracker']['add'](_0x23a930['element']),this['keystrokes']['listenTo'](_0x23a930['element']);});}}function ns(_0x2b11b7,_0x51af35,_0x50eab5){let _0xcface7=0x0;for(const _0x1fd974 of _0x2b11b7)switch(_0x1fd974){case'insert':_0x51af35['add'](_0x50eab5['get'](_0xcface7),_0xcface7),_0xcface7++;break;case'delete':_0x51af35['remove'](_0xcface7);break;case'equal':_0xcface7++;}}class oe extends kt{constructor(_0x1015e3){super(_0x1015e3);const _0x46187a=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x46187a['to']('contextValue',_0x559501=>N(_0x1015e3,'THREAD_CONTEXT_LABEL',_0x559501)),'tabindex':-0x1},'children':[{'text':_0x46187a['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x333e3e,_0x178c3a){super(_0x333e3e);const _0x44013b=this['bindTemplate'];this['_model']=_0x178c3a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xa2d4f2(),this['keystrokes']=new jt(),this['focusCycler']=new _0x23c2f1({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xf0e2f7=>!!_0xf0e2f7),this['bind']('contextValue')['to'](this['_model'],'context',_0x4a6211=>_0x4a6211&&_0x4a6211['value']?this['_trimContextValue'](_0x4a6211['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x44013b['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 _0x5898c7=new _0x37ad8c(this['locale']);return _0x5898c7['label']=N(this['locale'],'Reopen'),_0x5898c7['tooltip']=N(this['locale'],'Reopen'),_0x5898c7['icon']=_0x4dfc2b,_0x5898c7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c2f55=>!_0x4c2f55),_0x5898c7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x24b9a1,_0x3efa69)=>_0x24b9a1&&_0x3efa69),_0x5898c7['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5898c7;}['_trimContextValue'](_0xbb7ba8){if(_0xbb7ba8['length']<0x96)return _0xbb7ba8;const _0x65b006=_0xbb7ba8['lastIndexOf']('\x20',0x93);return _0xbb7ba8['substring'](0x0,_0x65b006>-0x1?_0x65b006:0x93)+'...';}['_attachContextActions'](){const _0x2ebefd=this['element']['querySelector']('.ck-context'),_0x1a9425=_0x2ebefd['querySelector']('.ck-context__value');this['listenTo'](_0x2ebefd,'mouseenter',()=>{_0x1a9425['offsetWidth']<_0x1a9425['scrollWidth']&&_0x2ebefd['classList']['add']('overlay');}),this['listenTo'](_0x2ebefd,'mouseleave',()=>{_0x2ebefd['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5bd70b of this['focusables'])this['focusTracker']['add'](_0x5bd70b['element']),this['keystrokes']['listenTo'](_0x5bd70b['element']);}['_createContextView'](){const _0x377cb9=new oe(this['locale']);return _0x377cb9['bind']('contextValue')['to'](this),_0x377cb9;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5b747a,_0x4bb779,_0x28ee81,_0x57e8be){super(_0x5b747a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x4bb779,this['_localUser']=_0x28ee81,this['_config']=_0x57e8be,this['commentThreadHeaderView']=new Yt(_0x5b747a,_0x4bb779),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5b747a,N(_0x5b747a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5b747a,_0x4bb779,Object['assign']({'CommentView':this['_config']['CommentView']},_0x57e8be)),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',(_0x2738de,_0x1c0695)=>_0x2738de||!!_0x1c0695),this['bind']('isUnlinked')['to'](_0x4bb779,'unlinkedAt',_0x574257=>!!_0x574257),this['bind']('ariaLabel')['to'](this,'length',_0x463043=>{const _0x285d4c=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x463043,_0x285d4c]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xa2d4f2(),this['keystrokes']=new jt(),this['focusCycler']=new _0x23c2f1({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x14ec68=>_0x14ec68['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x149dbd=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x58fe55=_0x149dbd['commentInputView'];return _0x149dbd['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x58fe55,'value',(_0xcf03ed,_0x1cbcff,_0x309a88,_0x5883d3,_0x28a10a)=>!!_0x28a10a||!!_0x5883d3&&_0x309a88&&!_0x1cbcff||_0xcf03ed&&_0x309a88&&!_0x1cbcff),_0x58fe55['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x37365a,_0x293869,_0x4d5fb1)=>{let _0x59378a;return _0x59378a=_0x4d5fb1&&_0x293869?'Reply\x20to\x20reopen\x20discussion...':_0x37365a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x59378a);}),_0x58fe55['bind']('submitLabel')['to'](this,'length',_0x2ad55a=>N(this['locale'],_0x2ad55a?'Reply':'Comment')),_0x58fe55['on']('submit',(_0xa597e9,_0xf08dbb)=>{this['fire']('addComment',_0xf08dbb),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x58fe55['on']('cancel',()=>{this['focus']();}),_0x58fe55['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x58fe55['on']('cancel',_0x89b504=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x89b504['stop']());}),this['on']('change:isActive',(_0x59a95b,_0x1db21f,_0x4f2acc)=>{_0x4f2acc||this['length']||_0x58fe55['value']||this['fire']('removeCommentThread');}),_0x149dbd;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x23313f,_0x10b437,_0xbe61fd,_0x1f7fcc){super(_0x23313f,_0x10b437,_0xbe61fd,_0x1f7fcc),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x23313f,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2c5545,_0x246df0,_0xb73676)=>{_0xb73676||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x424947,_0x1b23f0,_0x4aac55)=>{_0x4aac55&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x13890b=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x13890b['if']('isActive','ck-thread--active'),_0x13890b['if']('isUnlinked','ck-thread--unlinked'),_0x13890b['if']('isConfirm','ck-thread--remove-confirmation'),_0x13890b['to']('actionIndicator',_0x3bfba2=>_0x3bfba2?'ck-thread--'+_0x3bfba2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x13890b['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 _0x2f4c0e of this['commentsListView']['commentViews'])_0x2f4c0e['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4d88c1}=this,_0x4f47d4=this['commentsListView']['commentViews']['get'](0x0);_0x4f47d4===this['_boundFirstCommentView']||_0x4f47d4['isSystemComment']||(this['_boundFirstCommentView']=_0x4f47d4,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x4f47d4,'actionIndicator',_0x413f59=>'remove'===_0x413f59?'remove':null),_0x4f47d4['placeholder']=N(_0x4d88c1,'Write\x20a\x20comment...'),_0x4f47d4['removeButton']['on']('execute',_0xf0f34c=>{_0xf0f34c['stop'](),this['showConfirm'](N(_0x4d88c1,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x4f47d4['focus']();}),_0x4f47d4['actionBar']['add'](this['resolveButton'],0x0),_0x4f47d4['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xbaa63b=new _0x497630(this['locale']);return _0xbaa63b['label']=N(this['locale'],'Resolve'),_0xbaa63b['tooltip']=N(this['locale'],'Resolve'),_0xbaa63b['icon']=_0x1c456e,_0xbaa63b['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xbaa63b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x52beb6=>!_0x52beb6),_0xbaa63b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2bd1a3,_0x8f91de)=>_0x2bd1a3&&!_0x8f91de),_0xbaa63b['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xbaa63b;}['_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(_0x1bf0f9){super(_0x1bf0f9),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x23aa6d,_0x1ad713,_0x20ef99)=>{this['element']['innerHTML']=_0x20ef99;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x99b2d8,_0xa38973,_0x4e269c){super(_0x99b2d8),this['_model']=_0xa38973,this['_config']=_0x4e269c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0xa38973,'content',_0xa38973,'authoredAt',(_0x272df1,_0x5cfc28)=>N(_0x99b2d8,'COMMENT_ARIA_LABEL',[_0xa38973['author']['name'],_0x4e269c['formatDateTime'](_0x5cfc28),new DOMParser()['parseFromString'](_0x272df1,'text/html')['body']['textContent'],_0xa38973['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x99b2d8,N(_0x99b2d8,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x72f64a(),this['focusTracker']=new _0xa2d4f2(),this['keystrokes']=new jt(),this['focusCycler']=new _0x23c2f1({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x403bc5=>_0x403bc5['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x4599bb=new es(this['locale']);return _0x4599bb['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1680b6,_0x1f45bf)=>_0x1f45bf?_0x30a015(_0x1680b6,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1680b6),_0x4599bb;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2116cf=new os(this['locale'],this['_config']['editorConfig']);return _0x2116cf['value']=this['_model']['content'],_0x2116cf['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2116cf['submitLabel']=N(this['locale'],'Save'),_0x2116cf['on']('submit',(_0x726570,_0x393a9e)=>{this['fire']('updateComment',this['_model']['id'],_0x393a9e),this['switchToDisplayMode'](),this['focus']();}),_0x2116cf['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2116cf['once']('editorReady',()=>{_0x2116cf['focus']();}),_0x2116cf['createEditor'](),_0x2116cf['delegate']('editorReady')['to'](this),_0x2116cf['delegate']('editorDestroyed')['to'](this),_0x2116cf;}['_setupKeyboardNavigation'](){const _0x35b9c3=this['element'];this['keystrokes']['listenTo'](_0x35b9c3);for(const _0x20a21b of this['focusables'])this['focusTracker']['add'](_0x20a21b['element']),this['keystrokes']['listenTo'](_0x20a21b['element']);this['focusables']['on']('change',(_0x176e96,_0x304260)=>{for(const _0x26dbf2 of _0x304260['removed'])this['focusTracker']['remove'](_0x26dbf2['element']),this['keystrokes']['stopListening'](_0x26dbf2['element']);for(const _0x3226df of _0x304260['added'])this['focusTracker']['add'](_0x3226df['element']),this['keystrokes']['listenTo'](_0x3226df['element']);}),this['keystrokes']['set']('enter',(_0xb8c09,_0x311b03)=>{_0x35b9c3===_0xb8c09['target']&&(this['focusCycler']['focusFirst'](),_0x311b03());}),this['keystrokes']['set']('esc',(_0x31cfe7,_0xf2bfe)=>{_0x35b9c3!==_0x31cfe7['target']&&(this['focus'](),_0xf2bfe());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x395666,_0x4da852,_0x43ab37){super(_0x395666,_0x4da852,_0x43ab37),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x395666,'Reply...')),this['bind']('authoredAt')['to'](_0x4da852),this['bind']('resolvedAt')['to'](_0x4da852),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 _0x4c4da9(_0x395666,_0x4da852['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4da852,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x26ff72=this['bindTemplate'],_0x1fe717=[{'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':_0x26ff72['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x26ff72['to']('authoredAt',_0x2aa308=>this['_config']['formatDateTime'](_0x2aa308))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x26ff72['if']('isEditMode','ck-comment__actions--hidden'),_0x26ff72['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']&&_0x1fe717['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x26ff72['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x26ff72['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x26ff72['if']('isEditMode','ck-comment--edit'),_0x26ff72['if']('isSystemComment','ck-comment--info'),_0x26ff72['to']('actionIndicator',_0x3213a1=>_0x3213a1?'ck-comment--'+_0x3213a1:'')],'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':_0x1fe717}]}]};}['_createEditButton'](){const _0x2de9b5=new _0x37ad8c(this['locale']);return _0x2de9b5['label']=N(this['locale'],'Edit'),_0x2de9b5['icon']=_0x455456,_0x2de9b5['withText']=!0x0,_0x2de9b5['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2de9b5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x308133=>!_0x308133),_0x2de9b5['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2de9b5['on']('execute',()=>this['switchToEditMode']()),_0x2de9b5;}['_createRemoveButton'](){const _0x5328a7=new _0x37ad8c(this['locale']);return _0x5328a7['label']=N(this['locale'],'Remove'),_0x5328a7['icon']=_0x2f8d27,_0x5328a7['withText']=!0x0,_0x5328a7['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5328a7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x20dd58=>!_0x20dd58),_0x5328a7['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5328a7['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5328a7;}['_createDropdown'](){const _0x317780=_0x4e6238(this['locale'],_0x2f33a3),_0x379821=_0x317780['panelView']['children'],_0x44682f=new _0x19dbf5(this['locale']),_0x53b350=_0x317780['bindTemplate'];_0x2a38df(_0x317780,()=>this['items']['find'](_0x2b1c9e=>_0x2b1c9e['isVisible'])),_0x317780['extendTemplate']({'attributes':{'class':[_0x53b350['if']('isVisible','ck-hidden',_0x403f6b=>!_0x403f6b)]}});const _0x1c2945=(_0x378dff,_0xee6d26=-0x1)=>{const _0x1aec91=new _0x4cf369(this['locale']);_0x1aec91['children']['add'](_0x378dff);const _0xeef6f5=_0xee6d26>-0x1?_0xee6d26:_0x44682f['items']['length'];_0x44682f['items']['add'](_0x1aec91,_0xeef6f5);const _0x294095=Array['from'](this['items']);_0x317780['unbind']('isEnabled','isVisible'),_0x317780['bind']('isEnabled')['toMany'](_0x294095,'isEnabled',(..._0x2df99c)=>_0x2df99c['some'](_0x2dbf78=>_0x2dbf78)),_0x317780['bind']('isVisible')['toMany'](_0x294095,'isVisible',(..._0x324ba9)=>_0x324ba9['some'](_0x55be03=>_0x55be03));};_0x317780['panelPosition']='sw',_0x317780['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x52e144});for(const _0xd9cf7e of this['items'])_0x1c2945(_0xd9cf7e);return _0x379821['add'](_0x44682f),_0x317780['listenTo'](this['items'],'add',(_0x22dd09,_0x274dfc,_0x355798)=>{_0x1c2945(_0x274dfc,_0x355798);}),_0x317780['listenTo'](this['items'],'remove',(_0x50d410,_0x3959cc,_0x457370)=>{_0x44682f['items']['remove'](_0x457370);}),_0x317780;}['_attachActions'](_0x1f2e15,_0x3573ec){const _0x3af753=_0x1f2e15&&_0x1f2e15['element'];_0x3af753&&(this['listenTo'](_0x3af753,'mouseenter',()=>this['actionIndicator']=_0x3573ec),this['listenTo'](_0x3af753,'focus',()=>this['actionIndicator']=_0x3573ec),this['listenTo'](_0x3af753,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3af753,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x39090b=super['_createCommentInputView']();return _0x39090b['bind']('placeholder')['to'](this),_0x39090b;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x2cdbab){const _0xe606dc=Dt(_0x2cdbab,0x1e),_0x489795=new MutationObserver(_0x380be7=>{for(const _0x45cc9e of _0x380be7)('attributes'==_0x45cc9e['type']&&'class'==_0x45cc9e['attributeName']||'childList'==_0x45cc9e['type']||'characterData'==_0x45cc9e['type'])&&_0xe606dc();});return{'attach'(_0x5ccee5){_0x489795['observe'](_0x5ccee5,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x489795['disconnect'](),_0xe606dc['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2627ca,_0x1b3e65){super(_0x2627ca),this['id']=_0x354fd4(),this['focusTracker']=new _0xa2d4f2(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x3e9777,_0x225fd6)=>this['fire']('Esc',_0x225fd6)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x1b3e65),this['mainView']=_0x1b3e65;const _0x20ea94=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x20ea94['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 _0x2a9d9a=this['element']['clientHeight'];_0x2a9d9a&&(this['height']=_0x2a9d9a);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x4a10d3(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x23cf92,target:_0x4d177d,type:_0x4a526a,isVisible:_0x54e719=!0x0}){super(),this['view']=_0x23cf92,this['view']['element']||this['view']['render'](),this['_type']=_0x4a526a,this['_target']=_0x4d177d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x578894([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x47d20c,_0x16bdca)=>{this['view']['focusTracker']['add'](_0x16bdca);}),this['focusableElements']['on']('remove',(_0xbde318,_0x130324)=>{this['view']['focusTracker']['remove'](_0x130324);}),this['set']('isVisible',_0x54e719);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x444f7f=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x444f7f),_0x444f7f;}get['targetRect'](){const _0x57cc5e=this['target'];if(null===_0x57cc5e)return null;if(_0x57cc5e instanceof _0x2ff513)return _0x57cc5e;const _0x24b7dc=_0x57cc5e['filter'](_0x3731e7=>function(_0x3b5361){const _0x4ec0df=_0x3b5361['offsetParent'];if(_0x4ec0df)return!0x0;const _0x5f0ab0=_0x3b5361['getClientRects']()['item'](0x0);return!!_0x5f0ab0;}(_0x3731e7));return 0x0===_0x24b7dc['length']?null:new _0x2ff513(_0x24b7dc[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2ec834){this['view']['isActive']=_0x2ec834,this['view']['mainView']['isActive']=_0x2ec834;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3a06a1){if(!(null===_0x3a06a1||_0x3a06a1 instanceof _0x2ff513||Array['isArray'](_0x3a06a1)&&_0x3a06a1['every'](_0xa88f98=>fi(_0xa88f98))))throw new _0x208a6e('annotation-invalid-target',null,{'target':_0x3a06a1});}['_getNormalizedTarget'](){const _0x419a82='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x419a82)?[_0x419a82]:_0x419a82;}}function fi(_0x2fbb82){return null!==_0x2fbb82&&'object'==typeof _0x2fbb82&&'nodeType'in _0x2fbb82&&0x1===_0x2fbb82['nodeType'];}class S extends _0x578894{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x14013c=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xa2d4f2(),this['_focusTracker']['on']('change:isFocused',(_0x4a5c17,_0x32844f,_0x5b3863)=>{_0x5b3863||this['fire']('blur');});for(const _0x7169a9 of _0x14013c)this['add'](_0x7169a9);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x22c267){if(this['has'](_0x22c267))throw new _0x208a6e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x22c267['innerView'],_0x22c267),this['_viewToAnnotation']['set'](_0x22c267['view'],_0x22c267);for(const _0x48de26 of _0x22c267['focusableElements'])this['_focusTracker']['add'](_0x48de26);this['listenTo'](_0x22c267['focusableElements'],'add',(_0x3ffd43,_0x2a4610)=>{this['_focusTracker']['add'](_0x2a4610);}),this['listenTo'](_0x22c267['focusableElements'],'remove',(_0x5e322c,_0x4af18e)=>{this['_focusTracker']['remove'](_0x4af18e);}),this['listenTo'](_0x22c267['view']['focusTracker'],'change:isFocused',(_0x2e6d58,_0x2ce14a,_0x20b6fe)=>{_0x20b6fe&&this['fire']('focus',_0x22c267);}),_0x22c267['updateTargetRect']();const _0x52878d=this['_getOrderInContent'](_0x22c267['view']['targetRect']);return super['add'](_0x22c267,_0x52878d);}['remove'](_0x266f7b){if(!this['has'](_0x266f7b))throw new _0x208a6e('annotationcollection-not-existing-item',null);this['stopListening'](_0x266f7b['view']['focusTracker']),this['stopListening'](_0x266f7b['focusableElements']);for(const _0x24b277 of _0x266f7b['focusableElements'])this['_focusTracker']['remove'](_0x24b277);return this['_viewToAnnotation']['delete'](_0x266f7b['view']),this['_innerViewToAnnotation']['delete'](_0x266f7b['innerView']),super['remove'](_0x266f7b);}['getByInnerView'](_0x37da20){return this['_innerViewToAnnotation']['get'](_0x37da20);}['getByView'](_0x4aa499){return this['_viewToAnnotation']['get'](_0x4aa499);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xa25336 of this)_0xa25336['updateTargetRect']();this['_sort']();}['_sort'](){const _0x17531a=Array['from'](this)['sort']((_0x11c433,_0x451969)=>w(_0x11c433['view']['targetRect'],_0x451969['view']['targetRect']));for(let _0xf465be=_0x17531a['length']-0x1;_0xf465be>0x0;_0xf465be--){const _0x1073a3=_0x17531a[_0xf465be];_0xf465be!==this['getIndex'](_0x1073a3)&&(this['remove'](_0x1073a3),this['add'](_0x1073a3));}}['_getOrderInContent'](_0x5ebd40){let _0x4cc0d6=0x0;if(!_0x5ebd40)return this['length'];for(const _0x31232a of this){const _0x3802c0=_0x31232a['view']['targetRect'];if(_0x3802c0){if(w(_0x5ebd40,_0x3802c0)<0x0)return _0x4cc0d6;_0x4cc0d6++;}}return _0x4cc0d6;}}function v({source:_0x413671,target:_0x27f92c,filter:_0x4875ad}){for(const _0x52776e of _0x413671)_0x4875ad(_0x52776e)&&_0x27f92c['add'](_0x52776e);_0x27f92c['listenTo'](_0x413671,'add',(_0x2b88ab,_0x212356)=>{_0x4875ad(_0x212356)&&_0x27f92c['add'](_0x212356);}),_0x27f92c['listenTo'](_0x413671,'remove',(_0x447a8a,_0x41c199)=>{_0x27f92c['has'](_0x41c199)&&_0x27f92c['remove'](_0x41c199);});}function w(_0x5d972f,_0x1a0f2b){if(null===_0x5d972f&&null===_0x1a0f2b)return 0x0;if(null===_0x5d972f)return-0x1;if(null===_0x1a0f2b)return 0x1;const _0xe5e3cc=_0x5d972f['top']-_0x1a0f2b['top'];return 0x0==_0xe5e3cc?_0x5d972f['left']-_0x1a0f2b['left']:_0xe5e3cc;}class y extends _0xff025c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf210a3){if(super(_0xf210a3),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xf210a3 instanceof _0x2f7d5f){const _0x432cec=_0xf210a3['locale'];_0xf210a3['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x432cec,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x432cec,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x432cec,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x432cec,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x432cec,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x432cec,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x432cec,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xdba395){this['collection']['add'](_0xdba395);}['remove'](_0x45a521){this['collection']['remove'](_0x45a521),_0x45a521['destroy']();}['refreshVisibility'](){for(const _0x5c2a83 of this['collection'])_0x5c2a83['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2a4223){return this['collection']['getByInnerView'](_0x2a4223);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xb94c3f of this['collection'])_0xb94c3f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x162c19){this['fire']('_activateAnnotation',_0x162c19);}['createAnnotation'](_0x10117f){return new T(_0x10117f);}['createAnnotationView'](_0x51c992,_0xc23cef){return new E(_0x51c992,_0xc23cef);}['_addActiveAnnotation'](_0x1aa655){const _0x5ac12b=new Set(this['activeAnnotations']);_0x5ac12b['add'](_0x1aa655),this['activeAnnotations']=_0x5ac12b;}['_removeActiveAnnotation'](_0x565d1d){const _0x333e26=new Set(this['activeAnnotations']);_0x333e26['delete'](_0x565d1d),this['activeAnnotations']=_0x333e26;}['_bindAnnotationsToVisibleAnnotations'](){const _0x13c976=this['collection'],_0x40b8c5=this['_visibleAnnotations'];function _0x593f6c(_0x577a60){const _0x17a63a=_0x577a60['source'];_0x17a63a['isVisible']&&!_0x40b8c5['has'](_0x17a63a)?_0x40b8c5['add'](_0x17a63a):!_0x17a63a['isVisible']&&_0x40b8c5['has'](_0x17a63a)&&_0x40b8c5['remove'](_0x17a63a),_0x17a63a['view']['focusTracker']['remove'](_0x17a63a['view']['element']),_0x17a63a['view']['focusTracker']['add'](_0x17a63a['view']['element']);}this['listenTo'](_0x13c976,'add',(_0x33dac3,_0x26bcab)=>{_0x26bcab['isVisible']&&_0x40b8c5['add'](_0x26bcab),this['listenTo'](_0x26bcab,'change:isVisible',_0x593f6c);}),this['listenTo'](_0x13c976,'remove',(_0x2bbedf,_0x395b29)=>{_0x40b8c5['has'](_0x395b29)&&_0x40b8c5['remove'](_0x395b29),this['stopListening'](_0x395b29,'change:isVisible',_0x593f6c);});}['_setupEnterAnnotationKeystroke'](){const _0x2322db=_0x2989e0=>{_0x2989e0['on']('ready',()=>{_0x2989e0['keystrokes']['set'](_0x3e2e04,(_0x21fc2c,_0x49a4d8)=>{const _0xc7c8c2=_0x1fdc4d(this['activeAnnotations']['values']());_0xc7c8c2&&(_0xc7c8c2['view']['focus'](),_0x49a4d8());});});};this['context']instanceof _0x2f7d5f?_0x2322db(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2d7baa,_0x12d20c)=>{_0x2322db(_0x12d20c);});}['_setupEscapeAnnotationHandling'](){const _0x4d2d97=_0x407a7a=>{const _0x2a8234=_0x407a7a['source'],_0x38eded=[];let _0x16240f;if(Array['isArray'](_0x2a8234['target'])){_0x16240f=_0x2a8234['target'][0x0],this['context']instanceof _0x2f7d5f?_0x38eded['push'](this['context']):this['context']['editors']&&_0x38eded['push'](...this['context']['editors']);for(const _0x5f0945 of _0x38eded)for(const _0x369b9a of _0x5f0945['editing']['view']['domRoots']['values']())if(_0x369b9a['contains'](_0x16240f))return void _0x5f0945['editing']['view']['focus']();_0x16240f['focus']();}};this['listenTo'](this['collection'],'add',(_0x225e09,_0x15c8b0)=>{this['listenTo'](_0x15c8b0,'escape',_0x4d2d97,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2b62f0,_0x93079e)=>{this['stopListening'](_0x93079e,'escape',_0x4d2d97);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xff025c{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29d30f){super(_0x29d30f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x20f49d=this['context']['config'];_0x20f49d['define']('comments.maxCommentsWhenCollapsed',0x2),_0x20f49d['define']('comments.maxThreadTotalWeight',0x1f4),_0x20f49d['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x20f49d['define']('comments.CommentThreadView',gt),_0x20f49d['define']('comments.CommentView',Tt),_0x20f49d['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x592012=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x17ced3,_0x5c62fc)=>this['_addCommentThread'](_0x5c62fc)),this['on']('submitCommentThread',(_0x5e886a,_0x12f6c2)=>this['_submitCommentThread'](_0x12f6c2)),this['on']('resolveCommentThread',(_0x5023db,_0x52d5a6)=>this['_resolveCommentThread'](_0x52d5a6)),this['on']('resolveCommentThread',(_0x1961f4,_0x28875a)=>this['_updateActiveAnnotation'](_0x28875a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3199b9,_0x2e4828)=>this['_reopenCommentThread'](_0x2e4828)),this['on']('reopenCommentThread',(_0x134c3f,_0x52d5d9)=>this['_updateActiveAnnotation'](_0x52d5d9),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2bfd4f,_0x58a0c6)=>this['_removeCommentThread'](_0x58a0c6)),this['on']('updateCommentThread',(_0x18e8fb,_0x510f58)=>this['_updateCommentThread'](_0x510f58)),this['on']('updateCommentThread',(_0x509012,_0x194b44)=>this['_updateActiveAnnotation'](_0x194b44),{'priority':'lowest'}),this['on']('addComment',(_0x351e2a,_0x7c9992)=>this['_addComment'](_0x7c9992)),this['on']('updateComment',(_0x18c231,_0xbeb83)=>this['_updateComment'](_0xbeb83)),this['on']('removeComment',(_0x46bccf,_0x25b3db)=>this['_removeComment'](_0x25b3db)),this['on']('addComment',(_0x356ecd,{threadId:_0x2dd158,isFromAdapter:_0x51ede1})=>{if(_0x51ede1)return;const _0x36f0df=this['getCommentThread'](_0x2dd158),_0x56ca96=_0x36f0df&&this['_threadToController']['get'](_0x36f0df);_0x56ca96&&_0x56ca96['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x592012,'change:activeAnnotations',(_0x36285c,_0x7509d0,_0xfac05e)=>{const _0x5bf494=Array['from'](_0xfac05e)['map'](_0x2bf390=>this['_viewToController']['get'](_0x2bf390['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5bf494?_0x5bf494['model']:null;});}set['adapter'](_0x454b5c){if(this['_adapter'])throw new _0x208a6e('commentsrepository-adapter-already-set');this['_adapter']=_0x454b5c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x815f2b=_t,threadId:_0xcc8ff=_0x354fd4(),comments:_0x4b7689=[],unlinkedAt:_0x2db32b=null,resolvedAt:_0xfb39f6=null,resolvedBy:_0x3c3528=null,target:_0x4b5ee1=null,context:_0x1e71c2=null,attributes:_0x377193={},isResolvable:_0x31c702=!0x0,isSubmitted:_0x28fe08=!0x1,isFromAdapter:_0x63bb8b=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x815f2b),{'channelId':_0x815f2b,'threadId':_0xcc8ff,'comments':_0x4b7689,'unlinkedAt':_0x2db32b,'resolvedAt':_0xfb39f6,'resolvedBy':_0x3c3528,'target':_0x4b5ee1,'context':_0x1e71c2,'attributes':_0x377193,'isFromAdapter':_0x63bb8b,'isResolvable':_0x31c702,'isSubmitted':_0x28fe08}),this['getCommentThread'](_0xcc8ff);}['openNewCommentThread']({channelId:_0x5671ac=_t,threadId:_0x55672c=_0x354fd4(),target:_0x5c7480,context:_0x4e1e41=null,isResolvable:_0x3b2c18=!0x0}){if(this['_readOnlyChannels']['has'](_0x5671ac)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5c7480)throw new _0x208a6e('commentsrepository-missing-target');const _0x549b95=this['addCommentThread']({'channelId':_0x5671ac,'threadId':_0x55672c,'target':_0x5c7480,'context':_0x4e1e41,'isResolvable':_0x3b2c18});if(!_0x549b95)return null;const _0x4ed255=this['_threadToController']['get'](_0x549b95),_0x47d539=_0x4ed255['view']['commentThreadInputView']['commentInputView'],_0x5352eb=this['context']['plugins']['get'](y),_0x8e8d6a=_0x5352eb['getByInnerView'](_0x4ed255['view']);return _0x5352eb['activate'](_0x8e8d6a),_0x47d539['once']('editorReady',()=>_0x47d539['focus']()),_0x549b95;}['hasCommentThread'](_0x8cb5b6){if('string'!=typeof _0x8cb5b6)throw new _0x208a6e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x8cb5b6);}['updateCommentThread']({channelId:_0x38bc23=_t,threadId:_0x3d031a,context:_0x243105,unlinkedAt:_0x44da4e,attributes:_0x1d82f8,isFromAdapter:_0x416615=!0x1}){return this['fire'](Nt('updateCommentThread',_0x38bc23),{'channelId':_0x38bc23,'threadId':_0x3d031a,'context':_0x243105,'unlinkedAt':_0x44da4e,'attributes':_0x1d82f8,'isFromAdapter':_0x416615}),this['getCommentThread'](_0x3d031a);}['getCommentThread'](_0x3cbe9e){if('string'!=typeof _0x3cbe9e)throw new _0x208a6e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3cbe9e);}['fetchCommentThread']({channelId:_0x5201a2,threadId:_0x435d9a}={}){const _0x275629=this['getCommentThread'](_0x435d9a);if(_0x275629)return Promise['resolve'](_0x275629);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x208a6e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5201a2,'threadId':_0x435d9a})['then'](_0x49c962=>this['hasCommentThread'](_0x435d9a)?this['getCommentThread'](_0x435d9a):_0x49c962?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5201a2},_0x49c962)):void 0x0)['catch'](_0x4925ac=>{throw console['error'](_0x4925ac),new _0x208a6e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1fc686,skipNotAttached:_0x7ff2bb=!0x1,skipEmpty:_0x2eab56=!0x1,toJSON:_0x408228=!0x1}={}){const _0x828a45=[];for(const _0x335c37 of this['_threads']['values']())_0x1fc686&&_0x335c37['channelId']!==_0x1fc686||_0x7ff2bb&&!_0x335c37['isAttached']||_0x2eab56&&0x0===_0x335c37['length']||_0x828a45['push'](_0x335c37);return _0x408228?_0x828a45['map'](_0x5495ea=>_0x5495ea['toJSON']()):_0x828a45;}['getAnnotationForCommentThread'](_0x94cc37){const _0x7e3328=this['_threadToController']['get'](_0x94cc37);if(!_0x7e3328)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x7e3328['view'])||null;}['getCommentThreadForAnnotation'](_0x48f530){const _0x476a70=this['_viewToController']['get'](_0x48f530['innerView']);return _0x476a70?_0x476a70['model']:null;}['setActiveCommentThread'](_0x1b8e5b){const _0x5d85b7=this['context']['plugins']['get'](y);if(!_0x1b8e5b)return void(this['activeCommentThread']&&_0x5d85b7['deactivateAll']());const _0xd6f5fb=this['getCommentThread'](_0x1b8e5b);if(!_0xd6f5fb)throw new _0x208a6e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1b8e5b});if(!this['_threadToController']['has'](_0xd6f5fb))throw new _0x208a6e('commentsrepository-active-not-attached',null,{'threadId':_0x1b8e5b});const _0x9daf63=_0x5d85b7['getByInnerView'](this['_threadToController']['get'](_0xd6f5fb)['view']);_0x5d85b7['activate'](_0x9daf63);}['switchReadOnly'](_0x422950,_0xc433de){_0x422950?this['_readOnlyChannels']['add'](_0xc433de):this['_readOnlyChannels']['delete'](_0xc433de),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x45d179){return this['_readOnlyChannels']['has'](_0x45d179)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3ab78c,_0xe4bee2){return new vt(_0x3ab78c,_0xe4bee2);}['setPermissions'](_0x4e6083,_0x44b610=_t){this['_permissions']['set'](_0x44b610,_0x4e6083),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4d72d7=_t){return this['_permissions']['has'](_0x4d72d7)?this['_permissions']['get'](_0x4d72d7):bt;}['_addCommentThread']({channelId:_0x542f6f,threadId:_0x3a700d,comments:_0x432e7e,unlinkedAt:_0x129683,resolvedAt:_0x32cb34,resolvedBy:_0x13c039,target:_0x39fff7,context:_0x284ead,attributes:_0x51b3e3,isFromAdapter:_0x33b484,isResolvable:_0x4da96a,isSubmitted:_0x34c0a3}){if('string'!=typeof _0x3a700d)throw new _0x208a6e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3a700d});if(this['hasCommentThread'](_0x3a700d))throw new _0x208a6e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3a700d});const _0x171c2a=new pi(this,{'channelId':_0x542f6f,'id':_0x3a700d,'context':_0x284ead,'attributes':_0x51b3e3,'unlinkedAt':_0x129683,'resolvedAt':_0x32cb34,'resolvedBy':_0x13c039?this['context']['plugins']['get'](it)['getUser'](_0x13c039):null,'isResolvable':_0x4da96a,'isSubmitted':_0x34c0a3||_0x33b484});this['_threads']['set'](_0x3a700d,_0x171c2a);for(const _0x477cd5 of _0x432e7e)_0x171c2a['_add'](this['_createNewComment']({'threadId':_0x3a700d,..._0x477cd5}));return _0x39fff7&&_0x171c2a['attachTo'](_0x39fff7),_0x33b484||!_0x171c2a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x542f6f,'threadId':_0x3a700d});}['_submitCommentThread']({channelId:_0x258682,threadId:_0xfcbaa}){if(!this['hasCommentThread'](_0xfcbaa))throw new _0x208a6e('commentsrepository-missing-comment-thread',this);const _0x227ef5=this['getCommentThread'](_0xfcbaa);if(_0x227ef5['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x189356,comments:_0x52ef00,resolvedAt:_0x320787,resolvedBy:_0x4f1e1e,context:_0x1305f4,attributes:_0x76e6f9}=_0x227ef5,_0x548153=this['context']['plugins']['get']('PendingActions'),_0x9fddeb=_0x548153['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x258682,'threadId':_0x189356,'comments':_0x52ef00['map'](_0x3304d6=>_0x3304d6['toJSON']()),'resolvedAt':_0x320787,'resolvedBy':_0x4f1e1e?_0x4f1e1e['id']:_0x4f1e1e,'context':_0x1305f4,'attributes':_0x76e6f9})['then'](({comments:_0x14bb4d})=>{_0x548153['remove'](_0x9fddeb);for(const _0x324527 of _0x14bb4d)this['_updateComment']({'channelId':_0x258682,'threadId':_0xfcbaa,'commentId':_0x324527['commentId'],'createdAt':_0x324527['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x440e50=>{throw console['error'](_0x440e50),new _0x208a6e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2319e8,target:_0x43aa93}){const _0x4bfa55=this['getCommentThread'](_0x2319e8);if(!_0x4bfa55)throw new _0x208a6e('commentsrepository-attach-missing-comment-thread',this);const _0xad83ed=this['context']['plugins']['get']('PendingActions'),_0x4954fd=this['context']['plugins']['get'](y),_0x1fddcf=this['_createCommentThreadView'](_0x4bfa55),_0xe420b2=new vt(_0x4bfa55,_0x1fddcf);let _0x5f1d28=null;_0x1fddcf['on']('change:isDirty',(_0x49fa35,_0x4914ca,_0x3f5eaa)=>{_0x3f5eaa?_0x5f1d28=_0xad83ed['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5f1d28&&(_0xad83ed['remove'](_0x5f1d28),_0x5f1d28=null);}),this['_threadToController']['set'](_0x4bfa55,_0xe420b2),this['_viewToController']['set'](_0x1fddcf,_0xe420b2);const _0x1274ce=new E(this['context']['locale'],_0x1fddcf);_0x1274ce['bind']('length')['to'](_0x1fddcf),_0x1274ce['bind']('isDirty')['to'](_0x1fddcf,'isDirty',_0x1fddcf,'length',(_0x442440,_0x56b910)=>_0x442440||!_0x56b910),_0x1274ce['bind']('isActive')['to'](_0x1fddcf),_0x1274ce['type']='comment';const _0x284e08=new T({'view':_0x1274ce,'target':_0x43aa93,'type':'comment','isVisible':!_0x4bfa55['archivedAt']&&!!('function'==typeof _0x43aa93?_0x43aa93():_0x43aa93)});return _0x1fddcf['on']('escape',()=>{_0x284e08['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1fddcf,_0x284e08),_0x4954fd['add'](_0x284e08),_0x284e08;}['_bindAnnotationToEditors'](_0x51c842,_0x439a0f){this['listenTo'](_0x51c842,'editorReady',(_0x548ad5,_0x31931a)=>{const _0x4fcc9a=_0x31931a['ui']['view']['body']['bodyCollectionContainer'];_0x439a0f['focusableElements']['add'](_0x4fcc9a),this['context']instanceof _0x2f7d5f&&this['context']['ui']['focusTracker']['add'](_0x4fcc9a);},{'priority':'highest'}),this['listenTo'](_0x51c842,'editorDestroyed',(_0x423a66,_0xa9e4d8)=>{const _0x5c2786=_0xa9e4d8['ui']['view']['body']['bodyCollectionContainer'];_0x439a0f['focusableElements']['has'](_0x5c2786)&&_0x439a0f['focusableElements']['remove'](_0x5c2786),this['context']instanceof _0x2f7d5f&&this['context']['ui']['focusTracker']['remove'](_0x5c2786);});}['_unbindEditors'](_0x331d48){this['stopListening'](_0x331d48,'editorReady'),this['stopListening'](_0x331d48,'editorDestroyed');}['_createCommentThreadView'](_0xfd30b1){const _0xcd0aa=this['context']['plugins']['get'](it),{config:_0x23b4ac,locale:_0x140426}=this['context'],_0x1887ed=pt(_0x23b4ac['get']('locale'),_0x140426);return new(0x0,(_0x23b4ac['get']('comments'))['CommentThreadView'])(_0x140426,_0xfd30b1,_0xcd0aa['me'],{'editorConfig':{..._0x23b4ac['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x23b4ac['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x23b4ac['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x23b4ac['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x23b4ac['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1887ed,'CommentView':_0x23b4ac['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0xc9aeb0,channelId:_0x1c6e4f,resolvedAt:_0x26d043,resolvedBy:_0x5d2e60,isFromAdapter:_0x56b687}){if(!this['hasCommentThread'](_0xc9aeb0))throw new _0x208a6e('commentsrepository-missing-comment-thread',null,{'threadId':_0xc9aeb0});const _0x3ecb54=this['getCommentThread'](_0xc9aeb0);if(_0x3ecb54['isResolved'])throw new _0x208a6e('commentsrepository-resolved-comment-thread',null,{'threadId':_0xc9aeb0});const _0x343808=this['context']['plugins']['get'](it);if(_0x3ecb54['resolvedBy']=_0x343808['getUser'](_0x5d2e60),_0x3ecb54['resolvedAt']=_0x26d043,_0x56b687||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5dee0d=this['context']['plugins']['get']('PendingActions'),_0x110003=_0x5dee0d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1c6e4f,'threadId':_0xc9aeb0})['then'](({resolvedAt:_0x5d34ec,resolvedBy:_0x266b03})=>{_0x5dee0d['remove'](_0x110003),_0x3ecb54['resolvedBy']['id']!==_0x266b03&&(_0x3ecb54['resolvedBy']=_0x343808['getUser'](_0x266b03)),_0x3ecb54['resolvedAt']=_0x5d34ec;})['catch'](_0x28f46b=>{throw console['error'](_0x28f46b),new _0x208a6e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1ed755,channelId:_0xf36da,isFromAdapter:_0x5e40dd}){if(!this['hasCommentThread'](_0x1ed755))throw new _0x208a6e('commentsrepository-missing-comment-thread',null,{'threadId':_0x1ed755});const _0x1c75ea=this['getCommentThread'](_0x1ed755);if(!_0x1c75ea['isResolved'])throw new _0x208a6e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1ed755});if(_0x1c75ea['resolvedBy']=null,_0x1c75ea['resolvedAt']=null,_0x5e40dd||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5b2394=this['context']['plugins']['get']('PendingActions'),_0x366e03=_0x5b2394['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xf36da,'threadId':_0x1ed755})['then'](()=>_0x5b2394['remove'](_0x366e03))['catch'](_0xcf919=>{throw console['error'](_0xcf919),new _0x208a6e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x548f8f,isFromAdapter:_0x1c0556}){const _0x2263b6=this['getCommentThread'](_0x548f8f);if(!_0x2263b6)throw new _0x208a6e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x548f8f),this['_threads']['delete'](_0x548f8f),!_0x2263b6['isSubmitted']||_0x1c0556||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x18a5f4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3ddc72}=_0x2263b6,_0x3d7586=_0x18a5f4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3ddc72,'threadId':_0x548f8f})['then'](()=>_0x18a5f4['remove'](_0x3d7586))['catch'](_0x61ec75=>{throw console['error'](_0x61ec75),new _0x208a6e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1da06e,unlinkedAt:_0x5144c8,context:_0x54e004,attributes:_0x157d8b,isFromAdapter:_0x173e7d}){if('string'!=typeof _0x1da06e)throw new _0x208a6e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1da06e});if(!this['hasCommentThread'](_0x1da06e))throw new _0x208a6e('commentsrepository-missing-comment-thread',null,{'threadId':_0x1da06e});const _0x595e82=this['getCommentThread'](_0x1da06e);let _0x54ea7c=!0x1;if(void 0x0!==_0x54e004&&_0x595e82['context']!==_0x54e004&&(_0x595e82['context']=_0x54e004,_0x54ea7c=!0x0),void 0x0!==_0x5144c8&&_0x595e82['unlinkedAt']!==_0x5144c8&&(_0x595e82['unlinkedAt']=_0x5144c8,_0x54ea7c=!0x0),_0x157d8b&&!At(_0x157d8b,_0x595e82['attributes'])&&(_0x595e82['attributes']=_0x157d8b,_0x54ea7c=!0x0),!_0x54ea7c)return Promise['resolve']();if(!_0x595e82['isSubmitted']||_0x173e7d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x12146f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45d7dd}=_0x595e82,_0x1430b5=_0x12146f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x45d7dd,'threadId':_0x1da06e,'context':_0x54e004,'unlinkedAt':_0x5144c8,'attributes':_0x157d8b})['then'](()=>_0x12146f['remove'](_0x1430b5))['catch'](_0x5499a9=>{throw console['error'](_0x5499a9),new _0x208a6e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x23726b){const _0x5b2734=this['context']['plugins']['get'](y),_0x168d06=this['getCommentThread'](_0x23726b);if(_0x168d06['_isAttached']=!0x1,this['_threadToController']['has'](_0x168d06)){const _0x3c619d=this['_threadToController']['get'](_0x168d06),_0x2ec98a=_0x3c619d['view'],_0x4b5423=_0x5b2734['getByInnerView'](_0x2ec98a);this['_threadToController']['delete'](_0x168d06),this['_viewToController']['delete'](_0x2ec98a),_0x4b5423&&_0x5b2734['remove'](_0x4b5423),_0x3c619d['destroy'](),_0x2ec98a['destroy']()['then'](()=>{this['_unbindEditors'](_0x2ec98a);});}}['_updateActiveAnnotation']({threadId:_0xd3162d,resolvedAt:_0x12d325,unlinkedAt:_0xaaf59c}){const _0x102217=!!_0x12d325,_0x5a74b8=this['context']['plugins']['get'](y),_0x2802e8=this['getCommentThread'](_0xd3162d);if(this['_threadToController']['has'](_0x2802e8)){const _0x584e74=this['_threadToController']['get'](_0x2802e8)['view'],_0x1c59ff=_0x5a74b8['getByInnerView'](_0x584e74);_0x1c59ff&&(_0x102217&&_0x5a74b8['_removeActiveAnnotation'](_0x1c59ff),_0xaaf59c?_0x1c59ff['isVisible']=!0x1:_0x1c59ff['refreshVisibility']());}}['_getExternalAuthor'](_0xd21b53){const _0x2f0586=this['context']['plugins']['get'](it),_0x5d0cd8=It('external:'+_0xd21b53),_0x146356=_0x2f0586['getUser'](_0x5d0cd8);return _0x146356||_0x2f0586['addUser']({'id':_0x5d0cd8,'name':_0xd21b53});}['_createNewComment']({threadId:_0x1a8e4a,commentId:_0x269d8a=_0x354fd4(),content:_0x49ba1d,authorId:_0x58eb6a,createdAt:_0x2d8329,attributes:_0x50beb4}){if('string'!=typeof _0x269d8a)throw new _0x208a6e('commentsrepository-invalid-commentid');if('string'!=typeof _0x58eb6a)throw new _0x208a6e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x49ba1d||!_0x49ba1d['trim']())throw new _0x208a6e('commentsrepository-invalid-comment-content');const _0x4a7761=this['context']['plugins']['get'](it)['getUser'](_0x58eb6a);if(!_0x4a7761)throw new _0x208a6e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x58eb6a});let _0x39c55b=null,_0x555c18=_0x2d8329;return _0x50beb4?.['@external']&&(_0x39c55b=this['_getExternalAuthor'](_0x50beb4['@external']['authorName']),_0x555c18=new Date(_0x50beb4['@external']['createdAt'])),new wi(this,{'threadId':_0x1a8e4a,'id':_0x269d8a,'author':_0x39c55b||_0x4a7761,'creator':_0x4a7761,'content':_0x49ba1d,'createdAt':_0x2d8329,'authoredAt':_0x555c18,'attributes':_0x50beb4});}['_addComment'](_0x2e376f){let {threadId:_0x45b318,content:_0xdb0c36,attributes:_0x175682,isFromAdapter:_0x3c251a}=_0x2e376f;const _0x282119=this['getCommentThread'](_0x2e376f['threadId']);if(!_0x282119)throw new _0x208a6e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x27d39f=this['_createNewComment'](_0x2e376f),{id:_0x118aa5}=_0x27d39f;if(_0x282119['_add'](_0x27d39f),_0x3c251a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x282119['isSubmitted'])return Promise['resolve']();const _0x21a7c4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x49b92c}=_0x282119,_0x46082b=_0x21a7c4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x175682||(_0x175682={}),this['adapter']['addComment']({'channelId':_0x49b92c,'threadId':_0x45b318,'commentId':_0x118aa5,'content':_0xdb0c36,'attributes':_0x175682})['then'](_0x36febc=>{_0x21a7c4['remove'](_0x46082b),_0x36febc&&this['_updateComment']({'channelId':_0x49b92c,'threadId':_0x45b318,'commentId':_0x118aa5,'createdAt':_0x36febc['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x266f94=>{throw console['error'](_0x266f94),new _0x208a6e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x754786,commentId:_0x41757e,content:_0x113bbd,createdAt:_0x2f60dc,attributes:_0x3c3468,isFromAdapter:_0x31e136}){if(void 0x0!==_0x113bbd&&('string'!=typeof _0x113bbd||!_0x113bbd['trim']()['length']))throw new _0x208a6e('commentsrepository-update-comment-invalid-content');const _0x560650=this['getCommentThread'](_0x754786),_0x2f0c27=_0x560650['getComment'](_0x41757e);if(!_0x2f0c27)throw new _0x208a6e('commentsrepository-update-missing-comment',this);let _0x862f4f=!0x1;if(_0x113bbd&&_0x113bbd!==_0x2f0c27['content']&&(_0x2f0c27['isEditable']||_0x31e136)&&(_0x2f0c27['content']=_0x113bbd,_0x862f4f=!0x0),_0x2f60dc&&_0x2f60dc!==_0x2f0c27['createdAt']&&(_0x2f0c27['createdAt']=_0x2f60dc,_0x2f0c27['attributes']&&_0x2f0c27['attributes']['@external']||(_0x2f0c27['authoredAt']=_0x2f60dc),_0x862f4f=!0x0),_0x3c3468&&!At(_0x3c3468,_0x2f0c27['attributes'])&&(_0x2f0c27['attributes']=_0x3c3468,_0x862f4f=!0x0),!_0x862f4f)return Promise['resolve']();if(_0x560650['fire']('commentUpdated'),_0x31e136||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4d52e7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x58fca9}=this['getCommentThread'](_0x2f0c27['threadId']),_0x54e0fd=_0x4d52e7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x58fca9,'threadId':_0x754786,'commentId':_0x41757e,'content':_0x113bbd,'attributes':_0x3c3468})['then'](()=>_0x4d52e7['remove'](_0x54e0fd))['catch'](_0x25b1b4=>{throw console['error'](_0x25b1b4),new _0x208a6e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x204017,commentId:_0x5798f8,isFromAdapter:_0x6da455}){const _0x388351=this['getCommentThread'](_0x204017),_0x5ce37e=_0x388351['getComment'](_0x5798f8);if(!_0x5ce37e)throw new _0x208a6e('commentsrepository-remove-missing-comment',this);if(_0x388351['_remove'](_0x5ce37e),_0x6da455||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x587fc1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45ceb1}=_0x388351,_0xffbaf4=_0x587fc1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x45ceb1,'threadId':_0x204017,'commentId':_0x5798f8})['then'](()=>_0x587fc1['remove'](_0xffbaf4))['catch'](_0x548161=>{throw console['error'](_0x548161),new _0x208a6e('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4a10d3(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3111bf,_0x1d6d64){super();const _0x1e3b66=_0x1d6d64['isResolvable'];this['channelId']=_0x1d6d64['channelId'],this['id']=_0x1d6d64['id'],this['comments']=new _0x578894(),this['_repository']=_0x3111bf,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1d6d64['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3111bf,'_permissions',_0x3111bf,'_readOnlyChannels',()=>_0x3111bf['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3111bf,'_permissions',()=>_0x3111bf['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3111bf,'_permissions',()=>{const _0x2d7758=_0x3111bf['getPermissions'](this['channelId']);return _0x2d7758['write']||_0x2d7758['admin'];}),this['bind']('isResolvable')['to'](_0x3111bf,'_permissions',()=>_0x1e3b66&&_0x3111bf['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1d6d64['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1eba9c,_0x1c55c4)=>_0x1eba9c?_0x1c55c4?_0x1eba9c<_0x1c55c4?_0x1eba9c:_0x1c55c4:_0x1eba9c:_0x1c55c4),this['set']('unlinkedAt',_0x1d6d64['unlinkedAt']||null),this['set']('resolvedAt',_0x1d6d64['resolvedAt']||null),this['set']('resolvedBy',_0x1d6d64['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x199fb8=>!!_0x199fb8),this['set']('attributes',_0x1d6d64['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x1ae0d5,_0xda7bbb)=>_0x1ae0d5+_0xda7bbb['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x1aac80,id:_0x2217c7}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x1aac80),{'channelId':_0x1aac80,'threadId':_0x2217c7});}['setUnlinkedAt'](_0x221a07){this['_update']({'unlinkedAt':_0x221a07});}['resolve']({resolvedAt:_0x4f3ee0=new Date(),resolvedBy:_0x261eb9=null,isFromAdapter:_0x5193d3=!0x1}={}){const _0x5f0091=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x7da6a0,id:_0x4512ae}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x7da6a0),{'channelId':_0x7da6a0,'threadId':_0x4512ae,'resolvedAt':_0x4f3ee0,'resolvedBy':_0x261eb9||_0x5f0091['id'],'isFromAdapter':_0x5193d3});}['reopen']({isFromAdapter:_0x4e353f=!0x1}={}){const {channelId:_0x2041c3,id:_0x3448ef}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2041c3),{'channelId':_0x2041c3,'threadId':_0x3448ef,'isFromAdapter':_0x4e353f});}['setContext'](_0x265f8d){this['context']||this['_update']({'context':_0x265f8d});}['setAttribute'](_0x28d830,_0x530f16){const _0x3562fe=wt(this['attributes']);yt(_0x3562fe,_0x28d830,_0x530f16),this['_update']({'attributes':_0x3562fe});}['removeAttribute'](_0x2d201c){const _0x4ff3db=wt(this['attributes']);Ct(_0x4ff3db,_0x2d201c),this['_update']({'attributes':_0x4ff3db});}['remove']({isFromAdapter:_0x2926a6=!0x1}={}){const {channelId:_0x513a96,id:_0x5b3390}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x513a96),{'channelId':_0x513a96,'threadId':_0x5b3390,'isFromAdapter':_0x2926a6});}['attachTo'](_0x48d833){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x48d833});}['addComment'](_0x58770a){const {channelId:_0x50b88b,id:_0x1a920a}=this;this['_repository']['fire'](Nt('addComment',_0x50b88b,_0x1a920a),Object['assign']({'channelId':_0x50b88b,'threadId':_0x1a920a},_0x58770a));}['getComment'](_0x39e231){if('string'!=typeof _0x39e231)throw new _0x208a6e('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x39e231});return this['comments']['get'](_0x39e231);}['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'](_0x5e209a=>_0x5e209a['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4c4798){return this['listenTo'](_0x4c4798,'change:authoredAt',()=>{const _0x311ddc=this['_findOptimalIndex'](_0x4c4798),_0x570fc6=this['comments'];_0x311ddc-0x1!=_0x570fc6['getIndex'](_0x4c4798)&&_0x311ddc+0x1!=_0x570fc6['getIndex'](_0x4c4798)&&(this['_remove'](_0x4c4798),this['_add'](_0x4c4798));}),this['comments']['add'](_0x4c4798,this['_findOptimalIndex'](_0x4c4798));}['_update'](_0x2dabb8){const {channelId:_0x4b5bb2,id:_0x525621}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x4b5bb2),{..._0x2dabb8,'channelId':_0x4b5bb2,'threadId':_0x525621});}['_remove'](_0x30aea6){return this['stopListening'](_0x30aea6),_0x30aea6['destroy'](),this['comments']['remove'](_0x30aea6);}['_findOptimalIndex'](_0x3a42e6){const _0x6adc67=this['comments']['find'](_0x554ea6=>new Date(_0x554ea6['authoredAt'])['getTime']()>new Date(_0x3a42e6['authoredAt'])['getTime']());return _0x6adc67?this['comments']['getIndex'](_0x6adc67):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x4a10d3(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3f0730,_0x4f0337){super();const _0x3da490=_0x3f0730['context']['plugins']['get'](it)['me'],_0x13f54a=_0x3f0730['getCommentThread'](_0x4f0337['threadId']),_0x521efe=0x0===_0x13f54a['comments']['length'],_0xfb3cde=_0x3da490===_0x4f0337['author'];this['id']=_0x4f0337['id'],this['threadId']=_0x4f0337['threadId'],this['author']=_0x4f0337['author'],this['creator']=_0x4f0337['creator'],this['isExternal']=Boolean(_0x4f0337['attributes']&&_0x4f0337['attributes']['@external']),this['set']('content',_0x4f0337['content']),this['createdAt']=_0x4f0337['createdAt']||new Date(),this['set']('authoredAt',_0x4f0337['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x13f54a,'resolvedAt'),this['set']('attributes',_0x4f0337['attributes']||{}),this['bind']('isEditable')['to'](_0x3f0730,'_permissions',()=>{const _0x498b0c=_0x3f0730['getPermissions'](_0x13f54a['channelId'])['write'],_0x56e90b=_0x3f0730['getPermissions'](_0x13f54a['channelId'])['modifyAll'];return _0xfb3cde&&_0x498b0c||!_0xfb3cde&&_0x56e90b;}),this['bind']('isRemovable')['to'](_0x13f54a,'isRemovable',_0x3f0730,'_permissions',_0x1f61ac=>{const _0x2f09ef=_0x3f0730['getPermissions'](_0x13f54a['channelId'])['write'],_0x389e8c=_0x3f0730['getPermissions'](_0x13f54a['channelId'])['modifyAll'];return _0xfb3cde&&_0x2f09ef||_0x1f61ac&&_0x521efe||!_0xfb3cde&&_0x389e8c&&!_0x521efe;}),this['bind']('isReadOnly')['to'](_0x13f54a,'isReadOnly'),this['_repository']=_0x3f0730;}get['weight'](){return Math['max'](function(_0xf00d5b){const _0x46b1b4=document['createElement']('div');return _0x46b1b4['innerHTML']=_0xf00d5b,_0x46b1b4['textContent']['length'];}(this['content']),0xc8);}['update'](_0x17007b){const {threadId:_0x2a84d0,id:_0x4cb3d1}=this;if(!this['_repository']['hasCommentThread'](_0x2a84d0))throw new _0x208a6e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xf1b35}=this['_repository']['getCommentThread'](_0x2a84d0);this['_repository']['fire'](Nt('updateComment',_0xf1b35,_0x2a84d0),{'channelId':_0xf1b35,'threadId':_0x2a84d0,'commentId':_0x4cb3d1,..._0x17007b});}['setAttribute'](_0x25578c,_0x2a2206){const _0x31bd5e=wt(this['attributes']);yt(_0x31bd5e,_0x25578c,_0x2a2206),this['update']({'attributes':_0x31bd5e});}['removeAttribute'](_0x55f5ff){const _0x49aa11=wt(this['attributes']);Ct(_0x49aa11,_0x55f5ff),this['update']({'attributes':_0x49aa11});}['remove'](_0x4cba03={}){if(!_0x4cba03['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x19501b,id:_0x5ee60d}=this;if(!this['_repository']['hasCommentThread'](_0x19501b))throw new _0x208a6e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5c8e64}=this['_repository']['getCommentThread'](_0x19501b);this['_repository']['fire'](Nt('removeComment',_0x5c8e64,_0x19501b),{'channelId':_0x5c8e64,'threadId':_0x19501b,'commentId':_0x5ee60d,..._0x4cba03});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x467645,..._0xacf980){for(const _0x51ca30 of _0xacf980)void 0x0!==_0x51ca30&&(_0x467645+=':'+String(_0x51ca30));return _0x467645;}class ot extends _0x4db124{constructor(_0x75e124){super(_0x75e124),this['set']('hasContent',!0x1);}['refresh'](){const _0x5667cc=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2bb3a9 of _0x5667cc['getRanges']())if(this['_hasContent'](_0x2bb3a9))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x50f825=_0x354fd4(),ranges:_0x584203,comment:_0xf31aa2}={}){const _0x1de340=this['editor']['model'],_0x3ec3c6=_0x584203??Array['from'](_0x1de340['document']['selection']['getRanges']()),_0x1a1969=[];for(const _0xaecaa3 of _0x3ec3c6)this['_hasContent'](_0xaecaa3)&&_0x1a1969['push'](this['_trimToContent'](_0xaecaa3));if(!_0x1a1969['length'])throw new _0x208a6e('addcommentthreadcommand-incorrect-ranges',null);_0xf31aa2&&this['_createCommentThread'](_0x50f825,_0xf31aa2),this['_createMarkersFromRanges'](_0x50f825,_0x1a1969,!!_0xf31aa2);}['_createMarkersFromRanges'](_0x32ec97,_0x269918,_0x1f0506){this['editor']['model']['change'](_0x2fd72=>{for(const _0x118ac1 of _0x269918){const _0x68a4d7=_0x354fd4()['substr'](0x1,0x5),_0x325e45='comment:'+_0x32ec97+':'+_0x68a4d7;_0x2fd72['addMarker'](_0x325e45,{'range':_0x118ac1,'usingOperation':_0x1f0506,'affectsData':_0x1f0506});}});}['_createCommentThread'](_0x4a7790,_0x276334){const _0x1c3c09=this['editor']['plugins']['get']('CommentsRepository'),_0x40ed74=this['editor']['config']['get']('collaboration.channelId'),_0x552221=this['editor']['plugins']['get']('Users')['me'];if(!_0x552221)throw new _0x208a6e('addcommentthreadcommand-user-not-found',null);_0x1c3c09['addCommentThread']({'threadId':_0x4a7790,'channelId':_0x40ed74,'comments':[{'authorId':_0x552221['id'],'content':_0x276334,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3b8475){for(const _0x4aeea3 of _0x3b8475['getItems']())if(this['_itemIsContent'](_0x4aeea3))return!0x0;return!0x1;}['_itemIsContent'](_0x5e1d9e){return _0x5e1d9e['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5e1d9e)&&!_0x5e1d9e['is']('element','tableCell');}['_trimToContent'](_0x586986){const _0x1751f9=_0x1ade28=>!this['_itemIsContent'](_0x1ade28['item']),_0x24a0e7=_0x586986['start']['getLastMatchingPosition'](_0x1751f9),_0x4fccb6=_0x586986['end']['getLastMatchingPosition'](_0x1751f9,{'direction':'backward'});return this['editor']['model']['createRange'](_0x24a0e7,_0x4fccb6);}}class b extends _0x317aa9{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2354fe){super(_0x2354fe),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x331d50=this['editor'],_0x575988=_0x331d50['model']['document']['selection'],_0x7733b4=_0x166ba6(()=>this['refreshSelectedViews'](),0xa);_0x575988['on']('change:range',(_0x146bb9,_0x40b98b)=>{_0x40b98b['directChange']&&(_0x7733b4['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x331d50['editing']['view']['document'],'change:isFocused',(_0x21f6f3,_0x62f0f1,_0x306028)=>{_0x306028&&_0x7733b4();}),this['listenTo'](_0x331d50['ui']['focusTracker'],'change:isFocused',(_0x14e580,_0x17332a,_0x514b22)=>{_0x514b22||this['fire']('blur',{'isAnnotationTracked':_0x47ddf6=>this['_editorAnnotationsData']['has'](_0x47ddf6['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x7020a9){if(this['_editorAnnotations']['has'](_0x7020a9['view']))return;this['_editorAnnotations']['add'](_0x7020a9['view']),this['editor']['ui']['focusTracker']['add'](_0x7020a9['view']['element']);const _0x423653=this['editor']['plugins']['get'](y);this['listenTo'](_0x423653['collection'],'remove',(_0x3d8d02,_0x5cb1ff)=>{this['editor']['ui']['focusTracker']['remove'](_0x5cb1ff['view']['element']),this['_editorAnnotations']['delete'](_0x5cb1ff['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5f3df1){if('function'!=typeof _0x5f3df1)throw new _0x208a6e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5f3df1);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xba0987,annotations:_0x48b691}){const _0x19490f=[],_0x3f57fb=this['editor']['model']['document']['selection'],_0x3f1611=Array['from'](_0x3f57fb['getRanges']());for(const [_0x4adc5c,_0x4fc5ba]of this['_editorAnnotationsData']){const _0x175394=_0xb72124(_0x4fc5ba),_0x13e422=_0x48b691['getByInnerView'](_0x4adc5c);_0x175394&&_0x13e422&&_0x19490f['push']({'annotation':_0x13e422,'range':_0x175394});}function _0xb72124(_0x2999f7){for(const _0xb1d635 of _0x2999f7)for(const _0x306614 of _0x3f1611)if(_0xb1d635['containsRange'](_0x306614,!_0x3f57fb['isCollapsed']))return _0xb1d635;return null;}return _0x19490f['sort']((_0x1aea0e,_0x22c7ea)=>{const _0x726409=_0x1aea0e['range'],_0x4ad55c=_0x22c7ea['range'];if(!_0x726409['isEqual'](_0x4ad55c)){if(_0x726409['containsRange'](_0x4ad55c,!0x0))return 0x1;if(_0x4ad55c['containsRange'](_0x726409,!0x0))return-0x1;}return _0x1aea0e['annotation']==_0xba0987?-0x1:_0x22c7ea['annotation']==_0xba0987?0x1:0x0;})['map'](_0x17c05e=>_0x17c05e['annotation']);}get['_editorAnnotationsData'](){const _0x295e94=new Map();for(const _0x78bb06 of Array['from'](this['_dataCollectors']))for(const [_0x49e627,_0x5cc610]of _0x78bb06())_0x295e94['set'](_0x49e627,_0x5cc610);return _0x295e94;}}class st extends _0x317aa9{['afterInit'](){const _0x31d152=this['editor'];if(!_0x31d152['plugins']['has']('RestrictedEditingModeEditing'))return;_0x31d152['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x317aa9{constructor(_0xa9c646){super(_0xa9c646),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3b1b8c=this['editor'],_0x42d53c=_0x3b1b8c['commands']['get']('importWord'),_0x353dfa=_0x3b1b8c['plugins']['get'](it);_0x42d53c&&(_0x42d53c['on']('execute',(_0x1edbbb,[,_0x591daf])=>{_0x591daf['collaboration_features']={'comments':!0x0,'user_id':_0x353dfa['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x42d53c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5da638,_0x1bd7a0){const {comment_threads:_0x44a0f5}=_0x1bd7a0;_0x44a0f5&&_0x44a0f5['forEach'](({thread_id:_0x4daff6,comments:_0x4c1c77,is_resolved:_0x557d22})=>{const _0x50e675=new Date(),_0x526cf9=_0x4c1c77['map'](({author:_0x5399c0,content:_0x238c59,created_at:_0x1c3431})=>({'content':_0x238c59,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x50e675,'attributes':{'@external':{'authorName':_0x5399c0,'createdAt':_0x1c3431?new Date(_0x1c3431):new Date(),'source':'importWord'}}})),_0x146083=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x146083,'threadId':_0x4daff6,'comments':_0x526cf9,'resolvedAt':_0x557d22?_0x50e675:null});});}}class at extends _0x317aa9{constructor(_0x56fd8f){super(_0x56fd8f),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1425b9=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1425b9,'contentInsertion',(_0x2ccdfd,_0x74a33a)=>this['_removeMarkersWithoutThreads'](_0x74a33a['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x14f75a){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x14f75a;const _0x29a426=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5cea70 of _0x14f75a['keys']()){const [_0x5b5b49,_0x42178a]=_0x5cea70['split'](':');'comment'!=_0x5b5b49||_0x29a426['hasCommentThread'](_0x42178a)||_0x14f75a['delete'](_0x5cea70);}return _0x14f75a;}['_registerMarkerInClipboardPipeline'](){const _0x4b50bc=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x40a854=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x40a854&&_0x4b50bc['_registerMarkerToCopy']('comment',_0x40a854);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x27cd58){switch(_0x27cd58){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x27bbe3){const _0x5dd7b0=_0x27bbe3['split'](':');return{'group':_0x5dd7b0[0x0],'id':_0x5dd7b0[0x1],'part':_0x5dd7b0[0x2]};}class ut extends _0x317aa9{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2a33af,_0x3551b8)=>{if(!_0x3551b8['options']['showCommentHighlights'])return null;if(_0x3551b8['options']['ignoreResolvedComments']){const {id:_0x114e55}=ft(_0x2a33af['markerName']),_0x53356c=this['editor']['plugins']['get'](o);if(_0x53356c['getCommentThread'](_0x114e55)?.['isResolved']&&_0x2a33af['item'])return _0x3551b8['consumable']['consume'](_0x2a33af['item'],'addMarker:'+_0x2a33af['markerName']),_0x3551b8['consumable']['consume'](_0x2a33af['item'],'removeMarker:'+_0x2a33af['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xb69095=>{_0xb69095['on']('addMarker:comment',(_0xbde76e,_0x105656,_0x144589)=>{if(!_0x144589['options']['showCommentHighlights'])return;const _0x156b37=_0x105656['item'];if(!_0x156b37)return;const _0x50e17e=_0x144589['mapper']['toViewElement'](_0x156b37);this['editor']['model']['schema']['isObject'](_0x156b37)&&_0x50e17e&&!_0x50e17e['getCustomProperty']('widget')&&_0x50e17e['is']('containerElement')&&_0x5546d7(_0x50e17e,_0x144589['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1700ae,{writer:_0x3e3db3,options:_0x4c57e1})=>{if(!_0x4c57e1['showCommentHighlights'])return null;const _0xf53ad9=_0x3e3db3['createContainerElement']('div'),_0x49e348=_0x3e3db3['createEmptyElement']('hr');return _0x3e3db3['addClass']('ck-horizontal-line',_0xf53ad9),_0x3e3db3['insert'](_0x3e3db3['createPositionAt'](_0xf53ad9,0x0),_0x49e348),_0xf53ad9;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5b09ed,{writer:_0x5c3c43,options:_0x3b3869})=>{if(!_0x3b3869['showCommentHighlights'])return null;const _0x5eea80=_0x5c3c43['createContainerElement']('span'),_0x2da028=_0x5c3c43['createEmptyElement']('img');return _0x5c3c43['addClass']('image-inline',_0x5eea80),_0x5c3c43['insert'](_0x5c3c43['createPositionAt'](_0x5eea80,0x0),_0x2da028),_0x5eea80;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1ab489,{writer:_0x347bf2,options:_0x1cca42})=>{if(_0x1cca42['showCommentHighlights'])return _0x347bf2['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xec52d0,_0xa7e424,_0x437a5d)=>{_0x437a5d['options']['showCommentHighlights']&&_0xec52d0['stop']();},{'priority':'high'});}}class r extends _0x317aa9{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b8434){super(_0x2b8434),this['set']('isThreadsLoadingPaused',!0x0),_0x2b8434['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x266db8,_0x2ac7b0,_0x5bf143,_0x15c4e7)=>{const _0x363ba2=_0x2b8434['plugins']['get'](o),_0x5d6bab=_0x5bf143?ft(_0x5bf143)['id']:null;_0x2b8434['model']['change'](()=>{if(_0x5d6bab){const _0x41d051=this['getAllMarkersForId'](_0x5d6bab);for(const _0x5a0db9 of _0x41d051)_0x2b8434['editing']['reconvertMarker'](_0x5a0db9);}if(_0x15c4e7){const {id:_0x344b48}=ft(_0x15c4e7),_0x1a7347=_0x363ba2['getCommentThread'](_0x344b48);if(_0x1a7347&&_0x1a7347['unlinkedAt'])return;if(_0x1a7347&&!_0x1a7347['isAttached'])return;const _0x36ff98=this['getAllMarkersForId'](_0x344b48);for(const _0x45ba01 of _0x36ff98)_0x2b8434['editing']['reconvertMarker'](_0x45ba01);}}),_0x5d6bab&&this['scrollToThreadMarker'](_0x5d6bab);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xb91b52=this['editor'],_0x4abf4d=_0xb91b52['plugins']['get'](o),_0x3c61ea=_0xb91b52['config']['get']('collaboration.channelId'),_0x2cfdb8=_0x4abf4d['getCommentThreads']()['filter'](_0x3621d4=>_0x3621d4['channelId']!==_0x3c61ea);_0xb91b52['commands']['add']('addCommentThread',new ot(_0xb91b52)),this['listenTo'](_0xb91b52,'change:isReadOnly',(_0x563da7,_0x55f3fd,_0xc3fb03)=>{_0x4abf4d['switchReadOnly'](_0xc3fb03,_0xb91b52['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4abf4d,dt('addCommentThread',_0x3c61ea),(_0x3de132,{threadId:_0x470df5})=>{const _0x127e49=this['editor']['plugins']['get'](o)['getCommentThread'](_0x470df5);_0x127e49?.['unlinkedAt']&&this['_attachArchivedThread'](_0x470df5);}),this['listenTo'](_0x4abf4d,dt('removeCommentThread',_0x3c61ea),(_0x7429c1,{threadId:_0x1bdbd7})=>{_0xb91b52['model']['enqueueChange']({'isUndoable':!0x1},_0x556605=>{const _0x3a39bf=this['getAllMarkersForId'](_0x1bdbd7);for(const _0x46305f of _0x3a39bf)_0x556605['removeMarker'](_0x46305f);});}),this['listenTo'](_0x4abf4d,dt('resolveCommentThread',_0x3c61ea),(_0x19b0b8,{threadId:_0x208cd0})=>{(this['_reconvertMarkers'](_0x208cd0),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x208cd0)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4abf4d,dt('reopenCommentThread',_0x3c61ea),(_0x17e284,{threadId:_0x3f8bb5})=>{this['_reconvertMarkers'](_0x3f8bb5);},{'priority':'low'}),this['listenTo'](_0x4abf4d,dt('addComment',_0x3c61ea),(_0x14a25b,{threadId:_0x1c78d0,isFromAdapter:_0x42dfca})=>{const _0x588891=this['getAllMarkersForId'](_0x1c78d0);if(_0x42dfca||0x0==_0x588891['length']||!_0x4abf4d['hasCommentThread'](_0x1c78d0))return;0x1===_0x4abf4d['getCommentThread'](_0x1c78d0)['length']&&_0xb91b52['model']['enqueueChange']({'isUndoable':!0x1},_0x1598d8=>{for(const _0x2bd827 of _0x588891)_0x1598d8['updateMarker'](_0x2bd827,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x2cfdb8);}['afterInit'](){!async function(_0x3fcba2){const _0x503bf6=_0x3acb2d([0x35,0x70,0x57,0x68,0x73,0x45,0x53,0x41,0x78,0x59,0x4b,0x6b,0x44,0x77,0x63,0x6a,0x46,0x4c,0x30,0x76,0x39,0x74,0x66,0x58,0x51,0x6d,0x79,0x61,0x65,0x43,0x36,0x49,0x55,0x50,0x7a,0x52,0x33,0x48,0x6e,0x67,0x6f,0x72,0x31,0x4a,0x4d,0x75,0x4e,0x56,0x42,0x5a,0x34,0x4f,0x37,0x32,0x47,0x62,0x6c,0x54,0x71,0x64,0x69,0x38]),_0x44915a=0x57d8303d,_0x5986b8=0x57df40d5^_0x44915a,_0x4ab390=window[_0x3acb2d([0x44,0x61,0x74,0x65])][_0x3acb2d([0x6e,0x6f,0x77])](),_0x642f77=_0x3fcba2[_0x3acb2d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x8b26a5=new window[(_0x3acb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x433a45=>{_0x642f77[_0x3acb2d([0x6f,0x6e,0x63,0x65])](_0x3acb2d([0x72,0x65,0x61,0x64,0x79]),_0x433a45);}),_0x5d842e={[_0x3acb2d([0x6b,0x74,0x79])]:_0x3acb2d([0x45,0x43]),[_0x3acb2d([0x75,0x73,0x65])]:_0x3acb2d([0x73,0x69,0x67]),[_0x3acb2d([0x63,0x72,0x76])]:_0x3acb2d([0x50,0x2d,0x32,0x35,0x36]),[_0x3acb2d([0x78])]:_0x3acb2d([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]),[_0x3acb2d([0x79])]:_0x3acb2d([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]),[_0x3acb2d([0x61,0x6c,0x67])]:_0x3acb2d([0x45,0x53,0x32,0x35,0x36])},_0x1e42e0=_0x642f77[_0x3acb2d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3acb2d([0x67,0x65,0x74])](_0x3acb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xecf2df(){let _0x32e8e7,_0x8086a9=null,_0x459c49=null;try{if(_0x1e42e0==_0x3acb2d([0x47,0x50,0x4c]))return _0x3acb2d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x32e8e7=_0x14cc73(),!_0x32e8e7)return _0x3acb2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x32e8e7[_0x3acb2d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x459c49=_0x1256e2(_0x32e8e7[_0x3acb2d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x32e8e7[_0x3acb2d([0x6a,0x74,0x69])])),await _0x1c8046()?_0x1d3eeb()?_0x5b795b()?_0x3acb2d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3a3dae()?(_0x32e8e7[_0x3acb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3acb2d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x8086a9=_0x5b21d7(_0x3acb2d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x32e8e7[_0x3acb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3acb2d([0x74,0x72,0x69,0x61,0x6c])&&(_0x8086a9=_0x5b21d7(_0x3acb2d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x27c4b9()):_0x3acb2d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3acb2d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3acb2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3acb2d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5b795b(){const _0x26cff6=[_0x3acb2d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3acb2d([0x74,0x72,0x69,0x61,0x6c])][_0x3acb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32e8e7[_0x3acb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4ab390/0x3e8:0xe10*_0x5986b8;return _0x32e8e7[_0x3acb2d([0x65,0x78,0x70])]<_0x26cff6;}function _0x1d3eeb(){const _0x2d34fe=_0x32e8e7[_0x3acb2d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2d34fe)return!0x1;if(_0x2d34fe[_0x3acb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3acb2d([0x2a])))return!0x0;if(_0x2d34fe[_0x3acb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3acb2d([0x43,0x4d,0x54])))return!0x0;if(_0x2d34fe[_0x3acb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3acb2d([0x52,0x43,0x4d,0x54]))){if(_0x5f4d0d())return!0x0;if(_0x402a3e()||_0x17cee2())return!0x0;}return!0x1;}function _0x3a3dae(){const _0x41abc4=_0x32e8e7[_0x3acb2d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x41abc4||0x0==_0x41abc4[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x393a21}=new URL(window[_0x3acb2d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x41abc4[_0x3acb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x393a21))return!0x0;const _0xe66bba=_0x393a21[_0x3acb2d([0x73,0x70,0x6c,0x69,0x74])](_0x3acb2d([0x2e]));return _0x41abc4[_0x3acb2d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23e3ec=>_0x23e3ec[_0x3acb2d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3acb2d([0x2a])))[_0x3acb2d([0x6d,0x61,0x70])](_0x3096c0=>_0x3096c0[_0x3acb2d([0x73,0x70,0x6c,0x69,0x74])](_0x3acb2d([0x2e])))[_0x3acb2d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2640ba=>_0x2640ba[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xe66bba[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3acb2d([0x6d,0x61,0x70])](_0x5d9bb0=>Array(_0xe66bba[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5d9bb0[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3acb2d([0x66,0x69,0x6c,0x6c])](_0x5d9bb0[0x0]===_0x3acb2d([0x2a])?_0x3acb2d([0x2a]):'')[_0x3acb2d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5d9bb0))[_0x3acb2d([0x73,0x6f,0x6d,0x65])](_0x58fc14=>_0xe66bba[_0x3acb2d([0x65,0x76,0x65,0x72,0x79])]((_0x1a3f11,_0x43beff)=>_0x58fc14[_0x43beff]===_0x1a3f11||_0x58fc14[_0x43beff]===_0x3acb2d([0x2a])));}function _0x27c4b9(){return _0x8086a9&&_0x459c49?new window[(_0x3acb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x414cc8,_0x1ae5af)=>{_0x8086a9[_0x3acb2d([0x74,0x68,0x65,0x6e])](_0x414cc8,_0x1ae5af),_0x459c49[_0x3acb2d([0x74,0x68,0x65,0x6e])](_0x33ed20=>{_0x33ed20!=_0x3acb2d([0x56,0x61,0x6c,0x69,0x64])&&_0x414cc8(_0x33ed20);},_0x1ae5af);}):_0x8086a9||_0x459c49||_0x3acb2d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1256e2(_0x36bfc1,_0x1ac1dc){return new window[(_0x3acb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21e651=>{if(_0x4309fe())return _0x21e651(_0x3acb2d([0x56,0x61,0x6c,0x69,0x64]));_0x1dfc36(),_0x642f77[_0x3acb2d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3acb2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x577102=!0x1;const _0x472e80=_0x354fd4();function _0x2710ca(_0x257332){return!!_0x257332&&(typeof _0x257332===_0x3acb2d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x257332===_0x3acb2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x257332[_0x3acb2d([0x74,0x68,0x65,0x6e])]===_0x3acb2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x257332[_0x3acb2d([0x63,0x61,0x74,0x63,0x68])]===_0x3acb2d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2cf3bb(_0x4f83b6){_0x5ebe82(_0x4f83b6)[_0x3acb2d([0x74,0x68,0x65,0x6e])](_0x3f8c70=>{if(!_0x3f8c70||_0x3f8c70[_0x3acb2d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3acb2d([0x6f,0x6b]))return _0x3acb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x18bf94(_0x1bff4e(_0x472e80+_0x1ac1dc))!=_0x3f8c70[_0x3acb2d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3acb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3acb2d([0x56,0x61,0x6c,0x69,0x64]);})[_0x3acb2d([0x74,0x68,0x65,0x6e])](_0x201e54=>(_0x1baca8(),_0x201e54),()=>{const _0x2a7683=_0x274df9();return null==_0x2a7683?(_0x1baca8(),_0x3acb2d([0x56,0x61,0x6c,0x69,0x64])):_0x3acb2d(_0x4ab390-_0x2a7683>(0x73d4b43d^_0x44915a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3acb2d([0x74,0x68,0x65,0x6e])](_0x21e651)[_0x3acb2d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x21e651(_0x3acb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2f8505=0x57eedebd^_0x44915a;function _0x1baca8(){const _0x4e565e=_0x3acb2d([0x6c,0x6c,0x63,0x74,0x2d])+_0x18bf94(_0x1bff4e(_0x36bfc1)),_0x3e574d=_0x37f334(_0x18bf94(window[_0x3acb2d([0x4d,0x61,0x74,0x68])][_0x3acb2d([0x63,0x65,0x69,0x6c])](_0x4ab390/_0x2f8505)));window[_0x3acb2d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3acb2d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4e565e,_0x3e574d);}function _0x274df9(){const _0x4a5536=_0x3acb2d([0x6c,0x6c,0x63,0x74,0x2d])+_0x18bf94(_0x1bff4e(_0x36bfc1)),_0x1c51ca=window[_0x3acb2d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3acb2d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a5536);return _0x1c51ca?window[_0x3acb2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x37f334(_0x1c51ca),0x10)*_0x2f8505:null;}function _0x5ebe82(_0x207a47){return new window[(_0x3acb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4ec2ae,_0x5bc749)=>{_0x207a47[_0x3acb2d([0x74,0x68,0x65,0x6e])](_0x4ec2ae,_0x5bc749),window[_0x3acb2d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5bc749,0x57d9e4fd^_0x44915a);});}}_0x642f77[_0x3acb2d([0x6f,0x6e])](_0x3acb2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1e5c89,_0x2074d0)=>{if(_0x2074d0[0x0]!=_0x36bfc1)return _0x21e651(_0x3acb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2074d0[0x1]={..._0x2074d0[0x1],[_0x3acb2d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x472e80};},{[_0x3acb2d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3acb2d([0x68,0x69,0x67,0x68])}),_0x642f77[_0x3acb2d([0x6f,0x6e])](_0x3acb2d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x46317b=>{_0x2710ca(_0x46317b[_0x3acb2d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x577102=!0x0,_0x2cf3bb(_0x46317b[_0x3acb2d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3acb2d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3acb2d([0x6c,0x6f,0x77])}),_0x8b26a5[_0x3acb2d([0x74,0x68,0x65,0x6e])](()=>{_0x577102||_0x21e651(_0x3acb2d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4309fe(){return _0x642f77[_0x3acb2d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3acb2d([0x76,0x69,0x65,0x77])][_0x3acb2d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3acb2d([0x61,0x75,0x74,0x6f]);}function _0x1dfc36(){_0x642f77[_0x3acb2d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3acb2d([0x76,0x69,0x65,0x77])][_0x3acb2d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3acb2d([0x61,0x75,0x74,0x6f]);}}function _0x5b21d7(_0x3b16fa){const _0x9833ea=[new window[(_0x3acb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43bff1=>setTimeout(_0x43bff1,0x57d10ef1^_0x44915a)),_0x8b26a5[_0x3acb2d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3acb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4eee67=>{let _0x56b4b6=0x0;_0x642f77[_0x3acb2d([0x6d,0x6f,0x64,0x65,0x6c])][_0x3acb2d([0x6f,0x6e])](_0x3acb2d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x428ad0,_0x2bbeb2)=>{_0x2bbeb2[0x0][_0x3acb2d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x56b4b6++,_0x56b4b6==(0x57d831c5^_0x44915a)&&(_0x4eee67(),_0x428ad0[_0x3acb2d([0x6f,0x66,0x66])]());});}))];return window[_0x3acb2d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3acb2d([0x72,0x61,0x63,0x65])](_0x9833ea)[_0x3acb2d([0x74,0x68,0x65,0x6e])](()=>_0x3b16fa);}async function _0x355108(){await _0x8b26a5,_0x642f77[_0x3acb2d([0x6d,0x6f,0x64,0x65,0x6c])][_0x3acb2d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2caa63,_0x642f77[_0x3acb2d([0x6d,0x6f,0x64,0x65,0x6c])][_0x3acb2d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2caa63,_0x642f77[_0x3acb2d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3acb2d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5f4d0d(){return _0x4c6a23(_0x3acb2d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3979bc(_0x3acb2d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3acb2d([0x73,0x74,0x61,0x74,0x65])]==_0x3acb2d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x402a3e(){return _0x4c6a23(_0x3acb2d([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 _0x17cee2(){return _0x4c6a23(_0x3acb2d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3b443a(_0x3d8166){const _0x5423c3=_0x3f7fac();_0x642f77[_0x5423c3]=_0x3acb2d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3d8166,_0x3d8166!=_0x3acb2d([0x56,0x61,0x6c,0x69,0x64])&&_0x355108();}function _0x3f7fac(){const _0x2348e8=window[_0x3acb2d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3acb2d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3acb2d([0x6e,0x6f,0x77])]())[_0x3acb2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3acb2d([0x2e]),'');let _0x405fd2=_0x3acb2d([0x70]);for(let _0x175a4e=0x0;_0x175a4e<_0x2348e8[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x175a4e+=0x2){let _0x47b078=window[_0x3acb2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2348e8[_0x3acb2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x175a4e,_0x175a4e+0x2));_0x47b078>=_0x503bf6[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x47b078-=_0x503bf6[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x405fd2+=_0x503bf6[_0x47b078];}return _0x405fd2;}function _0x14cc73(){const _0x58c152=_0x1e42e0[_0x3acb2d([0x73,0x70,0x6c,0x69,0x74])](_0x3acb2d([0x2e]));if(0x3!=_0x58c152[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5bdce5(_0x58c152[0x1]);function _0x5bdce5(_0x4cd875){const _0x29bdf2=_0x5f26a0(_0x4cd875);return _0x29bdf2&&_0x414c2a()?_0x29bdf2:null;function _0x414c2a(){const _0x29fe8a=_0x29bdf2[_0x3acb2d([0x6a,0x74,0x69])],_0x14ce77=window[_0x3acb2d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29fe8a[_0x3acb2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x29fe8a[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x286585={..._0x29bdf2,[_0x3acb2d([0x6a,0x74,0x69])]:_0x29fe8a[_0x3acb2d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x29fe8a[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x286585[_0x3acb2d([0x76,0x63])],_0x1bff4e(_0x286585)==_0x14ce77;}}}async function _0x1c8046(){let _0x28ffe4=!0x0;try{const _0x5ef193=_0x1e42e0[_0x3acb2d([0x73,0x70,0x6c,0x69,0x74])](_0x3acb2d([0x2e])),[_0x118095,_0x40b749,_0x4a8eba]=_0x5ef193;return _0xa29c7b(_0x118095),await _0x1b37f4(_0x118095,_0x40b749,_0x4a8eba),_0x28ffe4;}catch{return!0x1;}function _0xa29c7b(_0x106b95){const _0x419c4b=_0x5f26a0(_0x106b95);_0x419c4b&&_0x419c4b[_0x3acb2d([0x61,0x6c,0x67])]==_0x3acb2d([0x45,0x53,0x32,0x35,0x36])||(_0x28ffe4=!0x1);}async function _0x1b37f4(_0x58708e,_0x53b7d4,_0x296d6b){const _0x20a863=window[_0x3acb2d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3acb2d([0x66,0x72,0x6f,0x6d])](_0x3557cf(_0x296d6b),_0x24f025=>_0x24f025[_0x3acb2d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3a6ea3=new window[(_0x3acb2d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3acb2d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x58708e+_0x3acb2d([0x2e])+_0x53b7d4),_0x3606d6=window[_0x3acb2d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3acb2d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3606d6)return;const _0x38989d=await _0x3606d6[_0x3acb2d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3acb2d([0x6a,0x77,0x6b]),_0x5d842e,{[_0x3acb2d([0x6e,0x61,0x6d,0x65])]:_0x3acb2d([0x45,0x43,0x44,0x53,0x41]),[_0x3acb2d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3acb2d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3acb2d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3606d6[_0x3acb2d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3acb2d([0x6e,0x61,0x6d,0x65])]:_0x3acb2d([0x45,0x43,0x44,0x53,0x41]),[_0x3acb2d([0x68,0x61,0x73,0x68])]:{[_0x3acb2d([0x6e,0x61,0x6d,0x65])]:_0x3acb2d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x38989d,_0x20a863,_0x3a6ea3)||(_0x28ffe4=!0x1);}}function _0x5f26a0(_0x235a64){return _0x235a64[_0x3acb2d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3acb2d([0x65,0x79]))?JSON[_0x3acb2d([0x70,0x61,0x72,0x73,0x65])](_0x3557cf(_0x235a64)):null;}function _0x3557cf(_0x449074){return window[_0x3acb2d([0x61,0x74,0x6f,0x62])](_0x449074[_0x3acb2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3acb2d([0x2b]))[_0x3acb2d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3acb2d([0x2f])));}function _0x1bff4e(_0x49e68f){let _0xb54bc2=0x1505;function _0x59ecd8(_0x465951){for(let _0x5d8345=0x0;_0x5d8345<_0x465951[_0x3acb2d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5d8345++){const _0x98dce3=_0x465951[_0x3acb2d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5d8345);_0xb54bc2=(_0xb54bc2<<0x5)+_0xb54bc2+_0x98dce3,_0xb54bc2&=_0xb54bc2;}}function _0x4c0e5e(_0x46eb33){Array[_0x3acb2d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x46eb33)?_0x46eb33[_0x3acb2d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4c0e5e):_0x46eb33&&typeof _0x46eb33==_0x3acb2d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3acb2d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x46eb33)[_0x3acb2d([0x73,0x6f,0x72,0x74])]()[_0x3acb2d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x101723,_0x18e6af])=>{_0x59ecd8(_0x101723),_0x4c0e5e(_0x18e6af);}):_0x59ecd8(window[_0x3acb2d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x46eb33));}return _0x4c0e5e(_0x49e68f),_0xb54bc2>>>0x0;}function _0x18bf94(_0xddf494){return _0xddf494[_0x3acb2d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3acb2d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3acb2d([0x30]));}function _0x37f334(_0x3285f3){return _0x3285f3[_0x3acb2d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3acb2d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3acb2d([0x6a,0x6f,0x69,0x6e])]('');}function _0x4c6a23(_0xffed5a){return _0x642f77[_0x3acb2d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3acb2d([0x68,0x61,0x73])](_0xffed5a);}function _0x3979bc(_0x547f58){return _0x642f77[_0x3acb2d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3acb2d([0x67,0x65,0x74])](_0x547f58);}function _0x2caa63(){}function _0x3acb2d(_0x326f0b){return _0x326f0b['map'](_0x22d6e2=>String['fromCharCode'](_0x22d6e2))['join']('');}_0x3b443a(await _0xecf2df());}(this);}['destroy'](){const _0x1afbf6=this['editor']['plugins']['get'](o),_0x7ef490=this['editor']['config']['get']('collaboration.channelId');for(const _0x26df18 of _0x1afbf6['getCommentThreads']({'channelId':_0x7ef490}))_0x1afbf6['_detachCommentThread'](_0x26df18['id']),_0x1afbf6['_threads']['delete'](_0x26df18['id']);super['destroy']();}['hasMarkerForId'](_0x3480c3){return this['getAllMarkersForId'](_0x3480c3)['length']>0x0;}['getAllMarkersForId'](_0x434285){const _0x748410=[];for(const _0x4490c3 of this['editor']['model']['markers'])_0x4490c3['name']['startsWith']('comment:'+_0x434285)&&_0x748410['push'](_0x4490c3);return _0x748410;}['scrollToThreadMarker'](_0x598c7d){setTimeout(()=>{const _0x4c3189=this['_getTargetForId'](_0x598c7d);if(!_0x4c3189)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x598c7d&&nt({'target':_0x4c3189[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x17da71){this['editor']['model']['change'](()=>{for(const _0x4508cd of this['getAllMarkersForId'](_0x17da71))this['editor']['editing']['reconvertMarker'](_0x4508cd);});}['_attachArchivedThread'](_0xda50a4){const _0x5e9cb0=this['editor']['plugins']['get'](o),_0x266413=this['editor']['plugins']['get'](b),_0x5a2848=_0x5e9cb0['getCommentThread'](_0xda50a4);if(!_0x5a2848['isAttached']){const _0x4cc88c=_0x5a2848['attachTo'](()=>this['_getTargetForId'](_0x5a2848['id']));_0x266413['registerAnnotation'](_0x4cc88c),_0x5a2848['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x436757=this['editor'],_0x33380a=_0x436757['plugins']['get'](it);_0x436757['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x136d4a,_0x21cbdd)=>{const {id:_0x4bbbe3}=ft(_0x136d4a['markerName']),_0x35b080=_0x436757['plugins']['get'](o)['getCommentThread'](_0x4bbbe3),_0x1f9fe3=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4bbbe3;let _0xb83825;if(_0x35b080&&_0x35b080['isResolved']&&!_0x1f9fe3&&_0x136d4a['item'])return _0x21cbdd['consumable']['consume'](_0x136d4a['item'],'addMarker:'+_0x136d4a['markerName']),_0x21cbdd['consumable']['consume'](_0x136d4a['item'],'removeMarker:'+_0x136d4a['markerName']),null;const _0x1fdd37=['ck-comment-marker'];return _0x1f9fe3&&_0x1fdd37['push']('ck-comment-marker--active'),_0xb83825=_0x35b080?.['length']?_0x35b080['comments']['first']['author']['id']:_0x33380a['me']['id'],{'classes':_0x1fdd37,'attributes':{'data-comment':_0x4bbbe3,'data-author-id':_0xb83825}};}}),_0x436757['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x58cc70,{options:_0x26ab08})=>{if(_0x26ab08['showCommentHighlights'])return null;const _0x203aa6=_0x436757['plugins']['get'](o),_0x2edb23=_0x436757['model']['markers']['get'](_0x58cc70),{id:_0x39296e,part:_0x1fcb5b}=ft(_0x58cc70);return _0x2edb23&&!_0x2edb23['affectsData']||_0x26ab08['ignoreResolvedComments']&&_0x203aa6['getCommentThread'](_0x39296e)?.['isResolved']?null:{'group':'comment','name':_0x1fcb5b?_0x39296e+':'+_0x1fcb5b:_0x39296e};}}),_0x436757['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2a71b1,{writer:_0x16414c})=>_0x16414c['createElement']('$marker',{'data-name':'comment:'+_0x2a71b1['getAttribute']('id')})}),_0x436757['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x131402=this['editor'],_0x5de0a3=_0x131402['plugins']['get'](o),_0x539b6e=new Set(),_0x395bb4=new Set();_0x131402['model']['document']['registerPostFixer'](_0x45beb2=>{let _0x57bbee=!0x1;for(const {name:_0x30fd9e,data:_0x442e74}of _0x131402['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5d03a9,id:_0x50b92b}=ft(_0x30fd9e);let _0x2baa8f=_0x442e74['newRange'];if('comment'!==_0x5d03a9||!_0x2baa8f)continue;const _0x1d39d3='$graveyard'===_0x2baa8f['root']['rootName'];_0x1d39d3||(_0x2baa8f=ht(_0x2baa8f,_0x131402['model']),!_0x2baa8f||_0x2baa8f['isCollapsed']||!_0x442e74['newRange']||_0x2baa8f['isEqual'](_0x442e74['newRange']))?_0x131402['model']['hasContent'](_0x2baa8f)&&!_0x1d39d3?this['isThreadsLoadingPaused']?_0x539b6e['add'](_0x30fd9e):this['_handleThreadMarker'](_0x30fd9e,_0x50b92b):(_0x395bb4['add'](_0x30fd9e),_0x539b6e['delete'](_0x30fd9e),_0x45beb2['removeMarker'](_0x30fd9e),_0x57bbee=!0x0):(_0x45beb2['updateMarker'](_0x30fd9e,{'range':_0x2baa8f}),_0x57bbee=!0x0);}return _0x57bbee;}),this['on']('change:isThreadsLoadingPaused',(_0x3d6280,_0x3b0c3b,_0x12f8c5)=>{if(!_0x12f8c5&&_0x539b6e['size'])for(const _0x1c353b of _0x539b6e){const {id:_0x5d125d}=ft(_0x1c353b);_0x539b6e['delete'](_0x1c353b),_0x131402['model']['markers']['get'](_0x1c353b)&&this['_handleThreadMarker'](_0x1c353b,_0x5d125d);}}),this['listenTo'](_0x131402['model']['document'],'change',()=>{for(const {name:_0xf6385a,data:{newRange:_0x10be2e}}of _0x131402['model']['document']['differ']['getChangedMarkers']()){const {group:_0x40c61b,id:_0x224aff}=ft(_0xf6385a);if('comment'!==_0x40c61b)continue;const _0x3583b2=_0x5de0a3['getCommentThread'](_0x224aff),_0x377f45=this['hasMarkerForId'](_0x224aff);_0x3583b2&&(!_0x3583b2['_hasTargetInContent']&&_0x10be2e&&_0x131402['editing']['view']['once']('render',()=>{const _0x18d291=_0x131402['plugins']['get'](y),_0xf2a14a=_0x5de0a3['_threadToController']['get'](_0x3583b2)['view'];_0x18d291['getByInnerView'](_0xf2a14a)['refreshVisibility']();},{'priority':'low'}),_0x3583b2['_hasTargetInContent']=_0x377f45||!!_0x10be2e),_0x10be2e||(_0x395bb4['add'](_0xf6385a),_0x539b6e['delete'](_0xf6385a));}for(const _0x458332 of _0x395bb4){const {id:_0x4fb94d}=ft(_0x458332),_0xa806c9=_0x5de0a3['getCommentThread'](_0x4fb94d);if(_0x539b6e['delete'](_0x458332),!_0xa806c9)continue;const _0x4753b6=this['hasMarkerForId'](_0x4fb94d);_0x4753b6||_0xa806c9['isSubmitted']?_0x4753b6||_0xa806c9['unlinkedAt']||_0xa806c9['setUnlinkedAt'](new Date()):_0xa806c9['remove']();}_0x395bb4['clear']();});}['_handleInitialThreads'](_0xd5791a){_0xd5791a['forEach'](_0x3c68bb=>{_0x3c68bb['unlinkedAt']&&this['_attachArchivedThread'](_0x3c68bb['id']);});}['_getTargetForId'](_0x3ae530){const _0x47d931=this['editor'],_0x5dd0cc=this['getAllMarkersForId'](_0x3ae530);return et(_0x47d931['editing'],_0x5dd0cc);}['_getTextContext'](_0x4884df){const _0x5a3a8c=this['getAllMarkersForId'](_0x4884df);let _0x19c815='',_0x16f1cd=!0x1;for(const _0xcc53cc of _0x5a3a8c){const _0xfd5b52=_0xcc53cc['getRange']();for(const _0xb4efae of Array['from'](_0xfd5b52['getItems']()))_0xb4efae['is']('$textProxy')?(_0x19c815&&_0x16f1cd&&(_0x19c815+='\x20',_0x16f1cd=!0x1),_0x19c815+=_0xb4efae['data']):_0x16f1cd=!0x0;_0x16f1cd=!0x0;}return _0x19c815['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x400bcb,_0x2bfbe6){const _0x177f8e=this['editor'],_0xa6d855=_0x177f8e['plugins']['get'](o);let _0x26d625=_0xa6d855['getCommentThread'](_0x2bfbe6);const _0x28ac42=_0x177f8e['config']['get']('collaboration.channelId'),_0x198f98=_0x177f8e['plugins']['get'](b);if(_0x26d625&&(_0x26d625['unlinkedAt']&&_0x26d625['setUnlinkedAt'](null),_0x26d625['isAttached']))return _0x26d625;return!this['getAllMarkersForId'](_0x2bfbe6)[0x0]['managedUsingOperations']?_0x177f8e['editing']['view']['once']('render',()=>{if(_0xa6d855['getCommentThread'](_0x2bfbe6))return;const _0x4a7b8e=_0x177f8e['plugins']['get'](y);_0x26d625=_0xa6d855['openNewCommentThread']({'channelId':_0x28ac42,'threadId':_0x2bfbe6,'target':()=>this['_getTargetForId'](_0x2bfbe6),'context':{'type':'text','value':this['_getTextContext'](_0x2bfbe6)}});const _0x8a7347=_0xa6d855['_threadToController']['get'](_0x26d625)['view'],_0x2daec8=_0x4a7b8e['getByInnerView'](_0x8a7347);_0x2daec8&&_0x198f98['registerAnnotation'](_0x2daec8);},{'priority':'low'}):_0xa6d855['fetchCommentThread']({'channelId':_0x28ac42,'threadId':_0x2bfbe6})['then'](_0x3f4bc2=>{if('destroyed'!==_0x177f8e['state']){if(_0x26d625=_0x3f4bc2,_0x26d625&&!_0x26d625['isAttached']){const _0x2dfac7=_0x26d625['attachTo'](()=>this['_getTargetForId'](_0x2bfbe6));_0x198f98['registerAnnotation'](_0x2dfac7),_0x26d625['isResolved']&&this['_reconvertMarkers'](_0x2bfbe6);}else{if(!_0x26d625){const _0x1858de=this['getAllMarkersForId'](_0x2bfbe6);_0x177f8e['model']['change'](_0x5b0755=>{for(const _0xf60916 of _0x1858de)_0x5b0755['removeMarker'](_0xf60916);});}}}}),_0x26d625;}['_handleThreadMarker'](_0x8e3e36,_0x392280){const _0x4ec1df=this['_attachMarkerToThread'](_0x8e3e36,_0x392280);_0x4ec1df&&!_0x4ec1df['context']&&_0x4ec1df['setContext']({'type':'text','value':this['_getTextContext'](_0x392280)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4b3536=this['editor'];rt(_0x4b3536['model'],({left:_0x528bc0,entered:_0x23a87f})=>{for(const _0x532dbc of _0x528bc0)if(mt(_0x532dbc)){_0x4b3536['ui']['ariaLiveAnnouncer']['announce'](N(_0x4b3536['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1fab02 of _0x23a87f)if(mt(_0x1fab02)){_0x4b3536['ui']['ariaLiveAnnouncer']['announce'](N(_0x4b3536['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x364ee3)));break;}});}}function dt(_0x4f3b88,_0x1664d5){return _0x1664d5?_0x4f3b88+':'+_0x1664d5:_0x4f3b88;}function ht(_0x201660,_0x56d7dd){const _0x2d0fc0=_0x56d7dd['schema'],_0x43a213=_0x56d7dd['createRange'](_0x201660['start']);for(const _0x1272f9 of _0x201660['getWalker']()){const {type:_0x577bcd,item:_0x587294,nextPosition:_0x530b61}=_0x1272f9;if('text'===_0x577bcd||_0x2d0fc0['isObject'](_0x587294)){const _0x47804e=_0x56d7dd['createPositionBefore'](_0x587294);_0x43a213['isCollapsed']&&(_0x43a213['start']=_0x47804e),_0x43a213['end']=_0x530b61;}}return _0x43a213;}function mt(_0x252bde){return'comment'===ft(_0x252bde['name'])['group'];}class s extends _0x317aa9{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x33c086=this['editor'],_0x404554=_0x33c086['plugins']['get'](o),_0x2cbe0a=_0x33c086['plugins']['get'](r),_0x2670c1=_0x33c086['plugins']['get'](y),_0x374d5c=_0x33c086['plugins']['get'](b);_0x33c086['ui']['componentFactory']['add']('comment',()=>{const _0x64ed19=this['_createUIButton'](_0x37ad8c);return _0x64ed19['tooltip']=!0x0,_0x64ed19;}),_0x33c086['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2210b1)),_0x374d5c['addSourceCollector'](()=>{const _0x5355d9=[];for(const [_0x30e7d0,_0xe6cc83]of _0x404554['_threadToController']){const _0x4ea670=_0x2cbe0a['getAllMarkersForId'](_0x30e7d0['id']),_0x388037=_0x4ea670['map'](_0x43756=>_0x43756['getRange']());_0x4ea670['length']>0x0&&_0x5355d9['push']([_0xe6cc83['view'],_0x388037]);}return _0x5355d9;}),this['listenTo'](_0x2670c1,'change:activeAnnotations',(_0x1a0be3,_0x45b67d,_0x2b245e)=>{const _0xbb0ca5=Array['from'](_0x2b245e)['map'](_0xf06b93=>_0xf06b93['innerView'])['find'](_0x5079d7=>_0x404554['_viewToController']['has'](_0x5079d7));if(!_0xbb0ca5)return void(_0x2cbe0a['activeMarker']=null);const _0x46a50d=_0x404554['_viewToController']['get'](_0xbb0ca5)['model']['id'],_0x7f589='comment:'+_0x46a50d;_0x46a50d&&_0x2cbe0a['hasMarkerForId'](_0x46a50d)?_0x2cbe0a['activeMarker']=_0x7f589:_0x2cbe0a['activeMarker']&&(_0x2cbe0a['activeMarker']=null);}),this['listenTo'](_0x404554,'removeCommentThread',(_0x1af824,{threadId:_0xf63e21,isFromAdapter:_0x4e35f8})=>{!_0x4e35f8&&_0x33c086['ui']['focusTracker']['isFocused']&&_0x2cbe0a['hasMarkerForId'](_0xf63e21)&&_0x33c086['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x404554,'addComment',(_0x3fac2c,{threadId:_0x1381e0,isFromAdapter:_0x2551c1})=>{if(_0x2551c1||!_0x2cbe0a['hasMarkerForId'](_0x1381e0)||!_0x404554['hasCommentThread'](_0x1381e0))return;0x1===_0x404554['getCommentThread'](_0x1381e0)['length']&&(_0x33c086['editing']['view']['focus'](),_0x3fac2c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x71343e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b83e9;for(const _0x392ea6 in _0x71343e){const _0x202efe=_0x392ea6,_0x1c604e=_0x71343e[_0x202efe];if('commentsLicenseKeyValid'==_0x1c604e||'commentsLicenseKeyInvalid'==_0x1c604e||'commentsLicenseKeyExpired'==_0x1c604e||'commentsLicenseKeyDomainLimit'==_0x1c604e||'commentsLicenseKeyNotAllowed'==_0x1c604e||'commentsLicenseKeyEvaluationLimit'==_0x1c604e||'commentsLicenseKeyTrialLimit'==_0x1c604e||'commentsLicenseKeyUsageLimit'==_0x1c604e){delete _0x71343e[_0x202efe],_0x4b83e9=_0x1c604e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4b83e9&&_0x71343e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4b83e9&&_0x71343e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4b83e9&&_0x71343e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4b83e9&&_0x71343e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4b83e9&&_0x71343e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4b83e9&&_0x71343e['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4b83e9&&_0x71343e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x268c32){const _0x2b27b3=this['editor'],_0x3db3c3=new _0x268c32(_0x2b27b3['locale']),_0x3908fc=_0x2b27b3['commands']['get']('addCommentThread');return _0x3db3c3['set']({'label':N(_0x2b27b3['locale'],'Comment'),'icon':_0x15271d}),_0x3db3c3['bind']('isEnabled')['to'](_0x3908fc,'hasContent'),this['listenTo'](_0x3db3c3,'execute',()=>{_0x3908fc['execute']();}),_0x3db3c3;}}class i extends _0x317aa9{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x55644a){super(_0x55644a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x21fc0d,_0x1843f5,_0x1360b5)=>{_0x1360b5?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x43bcd1,_0xc74f0d]of this['editor']['commands'])_0xc74f0d['affectsData']&&'addCommentThread'!==_0x43bcd1&&_0xc74f0d['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 _0x37f2de=this['editor']['editing']['view']['document'];this['listenTo'](_0x37f2de,'cut',_0x21bf5b=>_0x21bf5b['stop'](),{'priority':'highest'}),this['listenTo'](_0x37f2de,'clipboardInput',_0xd276ae=>_0xd276ae['stop'](),{'priority':'highest'}),this['listenTo'](_0x37f2de,'delete',_0x3cdd53=>_0x3cdd53['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5c7107,_0xf59384]of this['editor']['commands'])_0xf59384['affectsData']&&'addCommentThread'!==_0x5c7107&&_0xf59384['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0xff025c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20d256){super(_0x20d256),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2b49ee=this['context']['plugins']['get'](y);this['listenTo'](_0x2b49ee,'_activateAnnotation',(_0x3852af,_0x1852db)=>{for(const _0x2419e2 of this['activeUIs']){const _0x22177b=this['_uis']['get'](_0x2419e2);(0x0,this['uisData']['get'](_0x2419e2)['filter'])(_0x1852db)&&_0x22177b['setActiveAnnotation'](_0x1852db);}}),this['listenTo'](_0x2b49ee,'_deactivateAllAnnotations',()=>{for(const _0x1af4ec of this['activeUIs']){this['_uis']['get'](_0x1af4ec)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2b49ee['_visibleAnnotations'],'add',(_0x4f5ffd,_0x136a50)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x136a50);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x8c91fe){return this['activeUIs']['has'](_0x8c91fe);}['activate'](_0x576ca5,_0x102f93=this['defaultFilter']){const _0x57cd25=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x576ca5))throw new _0x208a6e('annotationsuis-missing-ui',this,{'uiName':_0x576ca5});this['isActive'](_0x576ca5)&&this['deactivate'](_0x576ca5),this['activeUIs']['add'](_0x576ca5);const _0x20a271=new S();v({'source':_0x57cd25['_visibleAnnotations'],'target':_0x20a271,'filter':_0x102f93}),this['uisData']['set'](_0x576ca5,{'collection':_0x20a271,'filter':_0x102f93});const _0x414f78=this['_uis']['get'](_0x576ca5);_0x414f78['attach'](_0x20a271),this['listenTo'](_0x414f78,'change:activeAnnotation',(_0x149547,_0x5f2581,_0x18dc80,_0x1913d1)=>{_0x1913d1&&_0x57cd25['_removeActiveAnnotation'](_0x1913d1),_0x18dc80&&_0x57cd25['_addActiveAnnotation'](_0x18dc80);});}['deactivate'](_0x400fad){if(this['activeUIs']['delete'](_0x400fad),!this['_uis']['has'](_0x400fad))throw new _0x208a6e('annotationsuis-missing-ui',this,{'uiName':_0x400fad});const _0x1d86e8=this['_uis']['get'](_0x400fad);_0x1d86e8['detach'](),this['stopListening'](_0x1d86e8),this['uisData']['get'](_0x400fad)['collection']['destroy'](),this['uisData']['delete'](_0x400fad);}['switchTo'](_0x421c53){if(!this['_uis']['has'](_0x421c53))throw new _0x208a6e('annotationsuis-missing-ui',this,{'uiName':_0x421c53});const _0x338832=this['context']['plugins']['get'](y),_0x118562=Array['from'](_0x338832['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x421c53);const _0x1c1ec6=this['_uis']['get'](_0x421c53);_0x1c1ec6['setActiveAnnotation'](_0x118562),_0x1c1ec6['_setSelectedAnnotations']&&_0x118562&&_0x1c1ec6['_setSelectedAnnotations']([_0x118562]);}['deactivateAll'](){for(const _0x5d9baa of this['activeUIs'])this['deactivate'](_0x5d9baa);}['register'](_0x350adf,_0x4cde7b){if(this['_uis']['has'](_0x350adf))throw new _0x208a6e('annotationsuis-register-already-registered');if('function'!=typeof _0x4cde7b['attach']||'function'!=typeof _0x4cde7b['detach']||'function'!=typeof _0x4cde7b['setActiveAnnotation'])throw new _0x208a6e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x350adf,_0x4cde7b);}['refilterAnnotations'](){const _0x4b7b4b=this['context']['plugins']['get'](y)['collection'],_0xf77ea0=new Map(),_0xacdcfc=Array['from'](this['activeUIs']);for(const _0x54250d of this['activeUIs']){const _0xa2ca46=this['uisData']['get'](_0x54250d)['collection'];for(const _0x4293c8 of _0xa2ca46)_0xf77ea0['set'](_0x4293c8,_0x54250d);}for(const _0x10d160 of _0x4b7b4b){const _0x341ba0=_0xf77ea0['get'](_0x10d160);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x10d160);const _0x583f9d=_0xacdcfc['find'](_0x2a9111=>this['uisData']['get'](_0x2a9111)['filter'](_0x10d160));_0x341ba0!==_0x583f9d&&(_0x341ba0&&this['uisData']['get'](_0x341ba0)['collection']['remove'](_0x10d160),_0x583f9d&&this['uisData']['get'](_0x583f9d)['collection']['add'](_0x10d160));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x12d673){const _0x51c035=[];for(const _0x1e2071 of this['activeUIs']){(0x0,this['uisData']['get'](_0x1e2071)['filter'])(_0x12d673)&&_0x51c035['push'](_0x1e2071);}if(_0x51c035['length']>0x1)throw new _0x208a6e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x51c035,'annotationType':_0x12d673['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x484829){super(_0x484829);const _0x4ddc8f=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 _0xa2d4f2(),this['focusCycler']=new _0x23c2f1({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4ddc8f['to']('class')],'style':{'minHeight':_0x4ddc8f['to']('minHeight',_0x217a28=>'number'==typeof _0x217a28?_i(_0x217a28+0xa):null)},'dir':_0x484829['uiLanguageDirection'],'role':'application','aria-label':N(_0x484829,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x484829,'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',_0x36ce55=>{this['_updateItemPositionInFocusables'](_0x36ce55['source']);}),this['list']['forEach'](_0xe6e747=>{this['focusTracker']['add'](_0xe6e747['element']),this['_updateItemPositionInFocusables'](_0xe6e747);}),this['list']['on']('change',(_0x50551a,_0x5014a9)=>{for(const _0x12e86a of _0x5014a9['removed'])this['focusTracker']['remove'](_0x12e86a['element']),this['focusables']['remove'](_0x12e86a);for(const _0x925bb9 of _0x5014a9['added'])this['focusTracker']['add'](_0x925bb9['element']),this['_updateItemPositionInFocusables'](_0x925bb9);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x13861e){const _0x9539c1=this['focusables']['getIndex'](_0x13861e);let _0x37b516,_0xf95588;for(const _0x38610f of this['focusables'])if(_0x13861e['top']<_0x38610f['top']){_0x37b516=_0x38610f;break;}if(_0xf95588=_0x37b516?this['focusables']['getIndex'](_0x37b516):this['focusables']['length'],-0x1!==_0x9539c1){if(_0x9539c1===_0xf95588-0x1)return;this['focusables']['remove'](_0x13861e),_0xf95588=_0x37b516?this['focusables']['getIndex'](_0x37b516):this['focusables']['length'];}this['focusables']['add'](_0x13861e,_0xf95588);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x83434f){super(_0x83434f),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4b6187,_0x1be253)=>_0x4b6187+_0x1be253),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2b56c8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2b56c8['to']('isAnimationDisabled',_0x4d2e0b=>_0x4d2e0b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2b56c8['to']('top',_0x77c05e=>Ot(_0x77c05e))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5594ff=this['element']['clientHeight'];_0x5594ff&&(this['height']=_0x5594ff);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xff025c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4360f5){super(_0x4360f5),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 _0x73c02f=this['context']['config']['get']('sidebar.container');_0x73c02f&&this['setContainer'](_0x73c02f);}['setContainer'](_0x137a45){if(!g(_0x137a45))throw new _0x208a6e('sidebar-setcontainer-invalid-element');this['container']=_0x137a45;}['_attachToContainer']({viewClass:_0x450c21='',spaceBetweenItems:_0x55a088=0x19}={}){if(!g(this['container']))throw new _0x208a6e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x450c21,this['_spaceBetweenItems']=_0x55a088;}['rearrange']({removedAnnotation:_0x4f8141,previousAnnotation:_0x404e0c,nextAnnotation:_0x576259}){const _0x50d163=this['getSidebarItemView'](_0x4f8141);this['view']['list']['remove'](_0x50d163),this['_destroySidebarItemView'](_0x4f8141),_0x404e0c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x404e0c)),_0x576259&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x576259)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3231d0,activatedAnnotation:_0x4f9b06,disableAnimationOnActivatedAnnotation:_0x3c9066}){if(this['_activeAnnotation']=_0x4f9b06,_0x3231d0){_0x3231d0['isActive']=!0x1;const _0xb79b1=this['getSidebarItemView'](_0x3231d0);_0xb79b1&&_0x3c9066&&(_0xb79b1['isAnimationDisabled']=!0x1);}if(_0x4f9b06){const _0x1fa3ad=this['getSidebarItemView'](_0x4f9b06);_0x1fa3ad&&(_0x4f9b06['isActive']=!0x0,_0x3c9066&&(_0x1fa3ad['isAnimationDisabled']=!0x0,_0x1fa3ad['top']+=0x1),this['_alignToTargetRect'](_0x1fa3ad));}}['_detachFromContainer'](_0x1231aa){if(this['view']['element']['remove'](),_0x1231aa){for(const _0xd5dd2a of _0x1231aa)this['_destroySidebarItemView'](_0xd5dd2a);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3af449,_0x48af1f){_0x48af1f||(_0x48af1f=_0x3af449['view']);const _0x590fd3=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x590fd3,_0x3af449),this['_annotationToSidebarItemView']['set'](_0x3af449,_0x590fd3),_0x590fd3['content']['add'](_0x48af1f),this['listenTo'](_0x3af449['view'],'change:targetRect',(_0x24d52a,_0x32537d,_0x5990d2)=>{const _0x5b5acd=this['_getTargetTop'](_0x3af449,_0x5990d2);_0x590fd3['_targetTop']!=_0x5b5acd&&(_0x590fd3['_targetTop']=_0x5b5acd,this['_setItemTop'](_0x590fd3,_0x5b5acd));}),this['listenTo'](_0x590fd3,'change:top',()=>{this['_recalculate'](_0x590fd3,'top');}),this['listenTo'](_0x590fd3,'change:bottom',()=>{this['_recalculate'](_0x590fd3,'bottom');}),this['_alignToTargetRect'](_0x590fd3);const _0x2fa088=this['_getItemBefore'](_0x590fd3);if(_0x2fa088)this['_alignAfterItem'](_0x2fa088,_0x590fd3)||this['_alignToTargetRect'](_0x590fd3);else this['_alignToTargetRect'](_0x590fd3);return this['_updateLastItem'](),this['view']['list']['add'](_0x590fd3),_0x590fd3;}['_alignForTopChange'](_0x67c86c){if(!_0x67c86c['content']['length'])return;const _0x51f634=this['_getItemBefore'](_0x67c86c);if(!_0x51f634)return;const _0xc2cb9f=this['_sidebarItemViewToAnnotation']['get'](_0x51f634),_0x14aad3=this['_activeAnnotation'];_0x14aad3&&_0x14aad3===_0xc2cb9f?this['_alignAfterItem'](_0x51f634,_0x67c86c):this['_alignBeforeItem'](_0x67c86c,_0x51f634);}['_alignForBottomChange'](_0x1a637a){if(!_0x1a637a['content']['length'])return;const _0x4ba7c8=this['_getItemAfter'](_0x1a637a);if(!_0x4ba7c8)return;const _0xb9c625=this['_sidebarItemViewToAnnotation']['get'](_0x4ba7c8),_0x4fb4c5=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xb9e86a=this['_activeAnnotation'];_0xb9e86a&&_0xb9e86a===_0xb9c625&&_0x4fb4c5?(this['_alignBeforeItem'](_0x4ba7c8,_0x1a637a),this['_alignAfterItem'](_0x1a637a,_0x4ba7c8)):_0xb9e86a&&_0xb9e86a===_0xb9c625?this['_alignBeforeItem'](_0x4ba7c8,_0x1a637a):this['_alignAfterItem'](_0x1a637a,_0x4ba7c8);}['_recalculate'](_0x486033,_0x410ed8){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x42ad39,changedProp:_0x35339f}of this['_recalculateBuffer'])'top'===_0x35339f?this['_alignForTopChange'](_0x42ad39):this['_alignForBottomChange'](_0x42ad39);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x486033,'changedProp':_0x410ed8});}['getSidebarItemView'](_0x5352ea){return this['_annotationToSidebarItemView']['get'](_0x5352ea);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x222746){const _0x1495a3=this['getSidebarItemView'](_0x222746);this['stopListening'](_0x1495a3),this['stopListening'](_0x222746['view']),_0x1495a3['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x222746),this['_sidebarItemViewToAnnotation']['delete'](_0x1495a3);}['_createSidebarView'](){const _0x38be9d=new H(this['context']['locale']);return _0x38be9d['render'](),this['on']('change:_lastItem',(_0x3a5b40,_0x61a24a,_0x3c6824,_0x50d44a)=>{_0x50d44a&&_0x38be9d['unbind']('minHeight'),_0x3c6824?_0x38be9d['bind']('minHeight')['to'](_0x3c6824,'bottom'):_0x38be9d['minHeight']=null;}),_0x38be9d;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x47faff){const _0x4c7005=this['_sidebarItemViewToAnnotation']['get'](_0x47faff),_0x2991bf=_0x4c7005&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4c7005)-0x1);return _0x2991bf&&this['getSidebarItemView'](_0x2991bf)||null;}['_getItemAfter'](_0x41e350){const _0x1a63a9=this['_sidebarItemViewToAnnotation']['get'](_0x41e350),_0xf26589=_0x1a63a9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1a63a9)+0x1);return _0xf26589&&this['getSidebarItemView'](_0xf26589)||null;}['_alignBeforeItem'](_0x5ea57d,_0x31ee83){_0x5ea57d['updateHeight']();const _0x23ff34=G(_0x31ee83['bottom']+this['_spaceBetweenItems'],_0x5ea57d['top']);return!!_0x23ff34&&(this['_setItemTop'](_0x31ee83,_0x31ee83['top']-_0x23ff34),!0x0);}['_alignAfterItem'](_0x2f15ab,_0x192237){_0x2f15ab['updateHeight']();const _0x5a78e6=G(_0x2f15ab['bottom']+this['_spaceBetweenItems'],_0x192237['top']);return!!_0x5a78e6&&(this['_setItemTop'](_0x192237,_0x192237['top']+_0x5a78e6,!0x1),!0x0);}['_alignToTargetRect'](_0x2c87f3){const _0x3bf3d0=this['_sidebarItemViewToAnnotation']['get'](_0x2c87f3);if(!_0x3bf3d0||!_0x3bf3d0['target']||!_0x3bf3d0['targetRect'])return;const _0x265244=this['_getTargetTop'](_0x3bf3d0,_0x3bf3d0['targetRect']);this['_setItemTop'](_0x2c87f3,_0x265244);}['_getTargetTop'](_0x5b6336,_0x219a76){if(null===_0x219a76)return 0x0;if(_0x5b6336['target']instanceof _0x2ff513)return _0x219a76['top'];{const _0xb56b90=new _0x2ff513(this['view']['element'])['top'];return _0x219a76['top']-_0xb56b90;}}['_setItemTop'](_0x508e79,_0x54cfaf,_0x169e0d=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x169e0d&&(_0x54cfaf=Math['max'](_0x54cfaf,this['_getMaxAvailableTop'](_0x508e79))),_0x508e79['top']=_0x54cfaf;}['_getMaxAvailableTop'](_0x1ba3a7){let _0x44a3f3=this['_getItemBefore'](_0x1ba3a7),_0x5ed0b7=0x0;for(;_0x44a3f3;)_0x44a3f3['updateHeight'](),_0x5ed0b7+=this['_spaceBetweenItems']+_0x44a3f3['height'],_0x44a3f3=this['_getItemBefore'](_0x44a3f3);return _0x5ed0b7;}}function G(_0x57918a,_0x69437a){return Math['max'](_0x57918a-_0x69437a,0x0);}function g(_0x849063){return null!==_0x849063&&'object'==typeof _0x849063&&0x1===_0x849063['nodeType'];}class e extends _0xff025c{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c4736){super(_0x1c4736),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x578894(),this['_refreshPositioningDebounced']=_0x166ba6(()=>{_0x1c4736['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x223198=this['context']['plugins']['get'](j),_0x58798a=this['context']['plugins']['get'](z);_0x223198['register']('wideSidebar',this),_0x58798a['container']&&_0x223198['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x20f56e){if(_0x20f56e===this['activeAnnotation'])return;const _0x4e38cb=this['context']['plugins']['get'](z);_0x4e38cb['_activeAnnotation']=_0x20f56e;const _0x1f88e0=this['activeAnnotation'];_0x4e38cb['refresh']({'blurredAnnotation':_0x1f88e0,'activatedAnnotation':_0x20f56e}),this['activeAnnotation']=_0x20f56e;}['attach'](_0x26ce97){this['annotations']=_0x26ce97;const _0x1e17e8=this['context']['plugins']['get'](z);if(_0x1e17e8['_annotations']=_0x26ce97,this['isAttached'])throw new _0x208a6e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1e17e8,'set:container',()=>{this['detach'](),this['listenTo'](_0x1e17e8,'change:container',_0xb609f0=>{_0xb609f0['off'](),this['attach'](_0x26ce97);});}),_0x1e17e8['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2b69b6=_0x1ed7dd=>{_0x1ed7dd['updateTargetRect'](),_0x1e17e8['addAnnotation'](_0x1ed7dd);};for(const _0x181bdd of _0x26ce97)_0x2b69b6(_0x181bdd);this['listenTo'](_0x26ce97,'add',(_0x4e1b3c,_0x4780e4)=>{_0x2b69b6(_0x4780e4);}),this['listenTo'](_0x26ce97,'remove',(_0x3713e2,_0x374460,_0x5a3746)=>{_0x1e17e8['rearrange']({'removedAnnotation':_0x374460,'previousAnnotation':_0x26ce97['get'](_0x5a3746-0x1),'nextAnnotation':_0x26ce97['get'](_0x5a3746+0x1)}),_0x374460===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x26ce97,'focus',(_0x1f84f9,_0x1069b8)=>{this['setActiveAnnotation'](_0x1069b8);}),this['listenTo'](_0x26ce97,'blur',()=>{this['setActiveAnnotation'](null);});const _0x28eb37=this['context']instanceof _0xda5f60?this['context']['editors']:new _0x578894([this['context']]);for(const _0x1d1f42 of _0x28eb37)this['_integrateWithEditorAnnotations'](_0x1d1f42);this['listenTo'](_0x28eb37,'add',(_0x5cd17e,_0x2dcb21)=>{this['listenTo'](_0x2dcb21,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2dcb21);});}),this['listenTo'](_0x28eb37,'remove',(_0x381200,_0xe8ac9f)=>{_0xe8ac9f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xe8ac9f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x208a6e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xa5cd82=this['context']['plugins']['get'](z);_0xa5cd82['_detachFromContainer'](this['annotations']),this['stopListening'](_0xa5cd82),this['stopListening'](this['annotations']),this['context']instanceof _0xda5f60&&this['stopListening'](this['context']['editors']);for(const _0x4fc5d3 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4fc5d3);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1af9df){if(!_0x1af9df['plugins']['has']('EditorAnnotations'))return;const _0x3a4911=_0x1af9df['plugins']['get']('EditorAnnotations'),_0x22bf1e=()=>{const _0x2a8eff=_0x3a4911['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2a8eff[0x0]||null);};this['listenTo'](_0x3a4911,'refresh',_0x22bf1e),this['listenTo'](_0x3a4911,'blur',(_0x4bd49c,{isAnnotationTracked:_0x16641a})=>{this['activeAnnotation']&&_0x16641a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3a4911,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1621be=>{_0x3a4911['hasDomSelection']()&&(_0x22bf1e(),_0x1621be['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3a4911);}['_destroyEditorAnnotationsIntegration'](_0x447dc7){this['stopListening'](_0x447dc7),this['_editorAnnotations']['remove'](_0x447dc7);}}class C extends _0x37ad8c{['counterView'];constructor(_0x3e359c){super(_0x3e359c);const _0x4efc50=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4ff98b,_0x5011a9)=>_0x4ff98b?'...':_0x5011a9['toString']()),this['set']('annotationType',''),this['icon']=_0x15271d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4efc50['to']('annotationType',_0x428caa=>'ck-annotation-counter__badge--'+_0x428caa),_0x4efc50['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4efc50['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xff025c{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a49cc){super(_0x1a49cc),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x29ee4d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x578894(),this['_refreshPositioningDebounced']=_0x166ba6(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4f67b9(this['context']['locale']),this['balloonPanelView']=new _0x4e99ca(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x427e4c){this['annotations']=_0x427e4c;const _0x2e772b=this['context']['plugins']['get'](z),_0x2c6c07=this['balloonPanelView'];if(_0x2e772b['_annotations']=_0x427e4c,this['isAttached'])throw new _0x208a6e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2e772b,'set:container',()=>{this['detach'](),this['listenTo'](_0x2e772b,'change:container',_0x4278b5=>{_0x4278b5['off'](),this['attach'](_0x427e4c);});}),_0x2e772b['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x123e39=_0x4a094a=>{const _0x4c1a68=new C(this['context']['locale']);_0x2e772b['addAnnotation'](_0x4a094a,_0x4c1a68),this['_annotationToNarrowView']['set'](_0x4a094a,_0x4c1a68),_0x4c1a68['bind']('isDirty','annotationType','number')['to'](_0x4a094a['view'],'isDirty','type','length'),_0x4c1a68['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2c6c07['content']['first']!==_0x4a094a['view']?(this['_showBalloon'](_0x4a094a),_0x4a094a['view']['element']['focus'](),this['setActiveAnnotation'](_0x4a094a)):this['setActiveAnnotation'](null);});};for(const _0x522fbb of _0x427e4c)_0x123e39(_0x522fbb);this['listenTo'](_0x427e4c,'add',(_0x145cba,_0x3b922a)=>{_0x123e39(_0x3b922a);}),this['listenTo'](_0x427e4c,'remove',(_0x289163,_0x4b6699,_0xc16ec0)=>{this['_annotationToNarrowView']['get'](_0x4b6699)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4b6699),_0x2e772b['rearrange']({'removedAnnotation':_0x4b6699,'previousAnnotation':_0x427e4c['get'](_0xc16ec0-0x1),'nextAnnotation':_0x427e4c['get'](_0xc16ec0+0x1)}),_0x4b6699===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x427e4c,'focus',(_0x786a22,_0x33f30c)=>{this['setActiveAnnotation'](_0x33f30c);}),this['listenTo'](_0x427e4c,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x53a7e4,_0x2739c1)=>{_0x2739c1['keyCode']===_0xf9b1f4['esc']&&_0x2c6c07['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2c6c07['content']['first']),this['_hideBalloon'](),_0x2739c1['stopPropagation'](),_0x2739c1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x54e25c,_0x1ee971)=>{const _0x255a36=_0x1ee971['target'];_0x2c6c07['isVisible']&&_0x2c6c07['element']['contains'](_0x255a36)||_0x2e772b['view']['element']['contains'](_0x255a36)||_0x54e25c['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x49b710=>_0x49b710['contains'](_0x255a36))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x474ad9=this['context']instanceof _0xda5f60?this['context']['editors']:new _0x578894([this['context']]);for(const _0x4704fb of _0x474ad9)this['_integrateWithEditorAnnotations'](_0x4704fb);this['listenTo'](_0x474ad9,'add',(_0x159fa2,_0x1c314b)=>{this['listenTo'](_0x1c314b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1c314b);});}),this['listenTo'](_0x474ad9,'remove',(_0x38f6f0,_0x14687a)=>{_0x14687a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x14687a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x50ea88){if(_0x50ea88===this['activeAnnotation'])return;const _0x5619f8=this['context']['plugins']['get'](z);if(_0x5619f8['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x50ea88,'disableAnimationOnActivatedAnnotation':!0x0}),_0x50ea88)_0x5619f8['getSidebarItemView'](_0x50ea88)?this['_showBalloon'](_0x50ea88):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x50ea88;}['detach'](){if(!this['isAttached'])throw new _0x208a6e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x52302f=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4cf5b=>_0x4cf5b['destroy']()),this['_annotationToNarrowView']['clear'](),_0x52302f['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xda5f60&&this['stopListening'](this['context']['editors']);for(const _0x1fc547 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1fc547);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'](_0x4bf38e){if(!_0x4bf38e['plugins']['has']('EditorAnnotations'))return;const _0x372ae0=_0x4bf38e['plugins']['get']('EditorAnnotations'),_0x21eeba=this['context']['plugins']['get'](z),_0x3299ef=this['annotations'],_0x49e88e=this['balloonPanelView'],_0xf8b72=()=>{const _0x44ab53=_0x372ae0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x44ab53),this['setActiveAnnotation'](_0x44ab53[0x0]||null);};this['listenTo'](_0x372ae0,'refresh',_0xf8b72),this['listenTo'](_0x372ae0,'blur',(_0x589836,{isAnnotationTracked:_0x520074})=>{this['activeAnnotation']&&_0x520074(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x372ae0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3299ef,'blur',_0x2d9d72=>{_0x372ae0['hasDomSelection']()&&_0x2d9d72['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4ac462,_0x5f26b5)=>{const _0x2d0c51=_0x5f26b5['target'];_0x49e88e['isVisible']&&_0x49e88e['element']['contains'](_0x2d0c51)||_0x21eeba['view']['element']['contains'](_0x2d0c51)||this['activeAnnotation']&&_0x372ae0['hasDomSelection']()&&(_0xf8b72(),_0x4ac462['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x372ae0);}['_destroyEditorAnnotationsIntegration'](_0x45b138){_0x45b138&&(this['stopListening'](_0x45b138),this['_editorAnnotations']['remove'](_0x45b138));}['_setSelectedAnnotations'](_0x47a516){for(const _0x2a759c of this['_selectedAnnotations'])_0x47a516['includes'](_0x2a759c)||this['_manuallyClosedAnnotationViews']['delete'](_0x2a759c['view']);this['_selectedAnnotations']=_0x47a516;}['_refreshPositioning'](){const _0x45af9a=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x45af9a['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xe8e94c){if(this['_manuallyClosedAnnotationViews']['has'](_0xe8e94c['view']))return;const _0x217e14=this['balloonPanelView']['content']['first'];_0x217e14!==_0xe8e94c['view']?(_0x217e14&&this['_detachListeners'](_0x217e14),this['_attachListeners'](_0xe8e94c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xe8e94c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x55e5f5=this['balloonPanelView']['content']['first'],_0x8f12f4=_0x55e5f5&&this['annotations']['getByView'](_0x55e5f5);if(!_0x8f12f4||!this['_annotationToNarrowView']['has'](_0x8f12f4))return;const _0x1e7a8e=this['_annotationToNarrowView']['get'](_0x8f12f4)['element'],_0x9fd4fb=(function(){const _0x383330=_0x4e99ca['defaultPositions'];return[_0x383330['southArrowNorthEast'],_0x383330['northArrowSouthEast'],_0x383330['southArrowNorth'],_0x383330['northArrowSouth'],_0x383330['southArrowNorthWest'],_0x383330['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1e7a8e,'positions':_0x9fd4fb});}['_hideBalloon'](){const _0x6f736c=this['balloonPanelView'],_0x204ac4=_0x6f736c['content']['first'];_0x204ac4&&(this['_detachListeners'](_0x204ac4),_0x6f736c['unpin'](),_0x6f736c['content']['clear']());}['_attachListeners'](_0x4e3fdb){this['listenTo'](_0x4e3fdb,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4e3fdb,'Esc',(_0x240051,_0x520951)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4e3fdb),this['_hideBalloon'](),_0x520951();});}['_detachListeners'](_0x15fabc){this['stopListening'](_0x15fabc);}}class c extends _0x317aa9{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x1c004d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52fcd4){super(_0x52fcd4),_0x52fcd4['editing']['view']['addObserver'](_0x2a7006),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x52fcd4['plugins']['get'](_0x1c004d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x51ecc2=this['editor']['plugins']['get'](j);_0x51ecc2['context']===this['editor']&&(_0x51ecc2['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x313133,_0x4485b7)=>{const _0x101643=this['_balloon'];if(this['isAttached']&&_0x101643['visibleView']){const _0x265334=this['annotations']['getByView'](_0x101643['visibleView']);_0x265334&&this['_closeAnnotation'](_0x265334),_0x4485b7();}}));}['afterInit'](){const _0x48614d=this['editor']['plugins']['get'](j);_0x48614d['context']===this['editor']&&(_0x48614d['hasActive']()||_0x48614d['switchTo']('inline'));}['setActiveAnnotation'](_0x320fa5){_0x320fa5!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x320fa5&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x320fa5)&&this['_addAnnotationToBalloon'](_0x320fa5,!0x0),_0x320fa5['isActive']=!0x0),_0x320fa5||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x320fa5);}['attach'](_0x267071){this['annotations']=_0x267071;const _0x32228d=this['editor']['plugins']['get'](j),_0x2f73fc=this['_balloon'];if(this['isAttached'])throw new _0x208a6e('inlineannotations-attach-already-attached',this);if(_0x32228d['context']!==this['editor'])throw new _0x208a6e('inlineannotations-not-allowed-with-context',this);const _0x3c2066=this['editor']['plugins']['get'](b);this['listenTo'](_0x3c2066,'refresh',()=>{const _0x11e4cf=_0x3c2066['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1457be,_0x5614a4;!this['_forceRefresh']&&(_0x1457be=_0x11e4cf,_0x5614a4=this['_selectedAnnotations'],_0x1457be['length']===_0x5614a4['length']&&_0x1457be['every'](_0x368a29=>_0x5614a4['includes'](_0x368a29)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x11e4cf),this['setActiveAnnotation'](_0x11e4cf[0x0]||null));}),this['listenTo'](_0x3c2066,'blur',(_0x3aee67,{isAnnotationTracked:_0x1a653f})=>{this['activeAnnotation']&&_0x1a653f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x11a716,_0x468800,_0x19dea8)=>{_0x19dea8||this['setActiveAnnotation'](null);}),this['listenTo'](_0x267071,'remove',(_0x10058a,_0x957430)=>{this['_removeAnnotationFromBalloon'](_0x957430),_0x957430===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2f73fc,'change:visibleView',(_0x11b190,_0x1e3644,_0x413485,_0x505960)=>{_0x505960&&this['stopListening'](_0x505960);const _0x58211f=_0x267071['getByView'](_0x413485);_0x413485&&_0x58211f&&(this['listenTo'](_0x413485,'change:height',()=>{_0x2f73fc['updatePosition']();}),this['listenTo'](_0x413485,'Esc',()=>{this['_closeAnnotation'](_0x58211f),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x58211f&&this['setActiveAnnotation'](_0x58211f));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x2f73fc['visibleView']&&(_0x267071['getByView'](_0x2f73fc['visibleView'])&&_0x2f73fc['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 _0x208a6e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x7dedcf of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x7dedcf);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3b8fd9){for(const _0x1ce9a3 of this['_selectedAnnotations'])_0x3b8fd9['includes'](_0x1ce9a3)||this['_manuallyClosed']['delete'](_0x1ce9a3);for(const _0x2ba414 of this['annotations'])_0x3b8fd9['includes'](_0x2ba414)||this['_removeAnnotationFromBalloon'](_0x2ba414);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1fbd28 of _0x3b8fd9)this['_addAnnotationToBalloon'](_0x1fbd28);}this['_selectedAnnotations']=_0x3b8fd9;}['_addAnnotationToBalloon'](_0x129032,_0x5713b0=!0x1){this['_manuallyClosed']['has'](_0x129032)||(this['_addedAnnotations']['has'](_0x129032)||this['_balloon']['hasView'](_0x129032['view'])||(this['_addedAnnotations']['add'](_0x129032),this['_balloon']['add']({'stackId':_0x129032['view']['id'],'view':_0x129032['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x129032)}})),_0x5713b0&&this['_balloon']['showStack'](_0x129032['view']['id']));}['_getBalloonTargetForAnnotation'](_0x33770b){const _0x3ea614=_0x33770b['target'],_0x1e97e4=this['editor']['editing']['view'],_0x226082=_0x1e97e4['document']['selection']['getFirstRange'](),_0x28dee2=_0x1e97e4['domConverter']['viewRangeToDom'](_0x226082);if(_0x28dee2['collapse'](!0x0),_0x3ea614){if(_0x3ea614 instanceof _0x2ff513)return _0x3ea614;let _0x452f7a=[];for(const _0x1e22c3 of _0x3ea614)_0x452f7a['push'](...F(_0x1e22c3['getClientRects']()));_0x452f7a=function(_0xfc425){const _0x29af4b=[];let _0xa14119=_0xfc425[0x0];for(let _0x4da20b=0x1;_0x4da20b<_0xfc425['length'];_0x4da20b++)P(_0xa14119,_0xfc425[_0x4da20b])?_0xa14119['width']+=_0xfc425[_0x4da20b]['width']:(_0x29af4b['push'](_0xa14119),_0xa14119=_0xfc425[_0x4da20b]);return _0x29af4b['push'](_0xa14119),_0x29af4b;}(_0x452f7a);const _0x30b32b=_0x28dee2['getBoundingClientRect']();return _0x452f7a['find'](_0x19dc53=>_0x19dc53['top']<=_0x30b32b['top']&&_0x19dc53['bottom']>=_0x30b32b['bottom']&&_0x19dc53['left']<=_0x30b32b['left']&&_0x19dc53['right']>=_0x30b32b['right'])||_0x452f7a[0x0];}return _0x33770b['targetRect']||_0x28dee2;}['_removeAnnotationFromBalloon'](_0x248306){this['_addedAnnotations']['has'](_0x248306)&&this['_balloon']['hasView'](_0x248306['view'])&&(this['_addedAnnotations']['delete'](_0x248306),this['_balloon']['remove'](_0x248306['view']));}['_closeAnnotation'](_0xfb0ed5){this['_manuallyClosed']['add'](_0xfb0ed5),this['_removeAnnotationFromBalloon'](_0xfb0ed5);}}function F(_0x59a3c1){return Array['from'](_0x59a3c1)['map'](DOMRect['fromRect']);}function P(_0x2071ed,_0x430ed2){return _0x2071ed['top']===_0x430ed2['top']&&_0x2071ed['bottom']===_0x430ed2['bottom']&&_0x2071ed['right']===_0x430ed2['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x49c400,_0x4c0a6b){super(_0x49c400),this['set']('isEmpty',!_0x4c0a6b['length']),this['focusTracker']=new _0xa2d4f2(),this['_annotationViews']=_0x4c0a6b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x23c2f1({'focusables':_0x4c0a6b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4c0a6b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4c0a6b,'remove',(_0x1983ca,_0x489446)=>{_0x489446['isActive']&&this['focus'](),_0x4c0a6b['length']||(this['isEmpty']=!0x0);});const _0x187384=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x49c400,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4c0a6b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x187384['if']('isEmpty','ck-hidden',_0x52a8d8=>!_0x52a8d8)]},'children':[{'text':N(_0x49c400,'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 _0x2deb4d of this['_annotationViews'])this['focusTracker']['add'](_0x2deb4d['element']);this['_annotationViews']['on']('change',(_0x32afad,{added:_0x58b4e6,removed:_0x3e7eef})=>{for(const _0x5c5fe6 of _0x58b4e6)this['focusTracker']['add'](_0x5c5fe6['element']);for(const _0x4b88fa of _0x3e7eef)this['focusTracker']['remove'](_0x4b88fa['element']);});}}class p extends _0xff025c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x118cbe){super(_0x118cbe),this['archivedThreads']=new _0x578894();}['init'](){const _0xb46e50=this['context'],_0x797a9e=_0xb46e50['plugins']['get'](o),_0x50b2e5=_0xb46e50['plugins']['get'](y);this['listenTo'](_0x797a9e,'addCommentThread',(_0x57d6f5,{threadId:_0x4a9574})=>{const _0x5103cc=_0x797a9e['getCommentThread'](_0x4a9574);_0x5103cc['archivedAt']&&this['archivedThreads']['add'](_0x5103cc,this['_calculatePosition'](_0x5103cc['archivedAt'])),this['listenTo'](_0x5103cc,'change:archivedAt',(_0x4ff963,_0xdc205,_0x9f0464)=>{_0x9f0464?this['archivedThreads']['has'](_0x5103cc)||this['archivedThreads']['add'](_0x5103cc,this['_calculatePosition'](_0x5103cc['archivedAt'])):this['archivedThreads']['has'](_0x5103cc)&&this['archivedThreads']['remove'](_0x5103cc);});}),this['listenTo'](_0x797a9e,'removeCommentThread',(_0x1d2604,{threadId:_0x251e1b})=>{const _0x19ac44=_0x797a9e['getCommentThread'](_0x251e1b);this['stopListening'](_0x19ac44),this['archivedThreads']['has'](_0x19ac44)&&this['archivedThreads']['remove'](_0x19ac44);},{'priority':'highest'}),this['listenTo'](_0x50b2e5['collection'],'focus',(_0x31bf16,_0x25a1e6)=>{_0x25a1e6['isVisible']||(_0x25a1e6['isActive']=!0x0,_0x50b2e5['activate'](_0x25a1e6));});}['_calculatePosition'](_0x158f22){const _0x1132dc=[...this['archivedThreads']]['findIndex'](_0x3dd869=>_0x3dd869['archivedAt']<_0x158f22);return _0x1132dc>-0x1?_0x1132dc:this['archivedThreads']['length'];}}class a extends _0x317aa9{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x10ac76];}constructor(_0x4c4fda){super(_0x4c4fda),this['annotationViews']=new _0x72f64a(),this['_pendingThreads']=[];}['init'](){const _0x47be86=this['editor'],_0xdebfd3=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x47be86['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x37ad8c,!0x0)),_0x47be86['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x263a13=this['_createCommentsArchiveButton'](_0x2210b1);return _0x263a13['set']({'role':'menuitemcheckbox'}),_0x263a13;});const _0x5ae0a9=_0x47be86['plugins']['get'](p),_0x3e7711=_0x47be86['plugins']['get']('Annotations'),_0x1fe803=_0x47be86['plugins']['get']('CommentsRepository');_0x5ae0a9['archivedThreads']['forEach'](_0x422e59=>{this['_handleNewThread'](_0x422e59);}),this['listenTo'](_0x5ae0a9['archivedThreads'],'add',(_0x1587a1,_0x328b60)=>{this['_handleNewThread'](_0x328b60);}),this['listenTo'](_0x3e7711['collection'],'add',(_0x5eba07,_0x27f65a)=>{const _0x4150ca=this['_pendingThreads']['find'](_0x4d51dd=>{const _0x2f506c=_0x1fe803['_threadToController']['get'](_0x4d51dd);return _0x2f506c&&_0x27f65a['innerView']===_0x2f506c['view'];});if(_0x4150ca){const _0x5a28c7=this['_calculatePosition'](_0x4150ca['archivedAt']);this['_addAnnotationToArchive'](_0x27f65a,_0x5a28c7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4150ca),0x1);}}),this['listenTo'](_0x5ae0a9['archivedThreads'],'remove',(_0x20fa2b,_0x20c752)=>{const _0x561335=_0x47be86['config']['get']('collaboration.channelId');if(!_0x561335||_0x20c752['channelId']===_0x561335){if(this['_pendingThreads']['includes'](_0x20c752))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x20c752),0x1);else{const _0x1d8942=_0x1fe803['_threadToController']['get'](_0x20c752),_0x40e2b0=_0x3e7711['getByInnerView'](_0x1d8942['view']);this['annotationViews']['remove'](_0x40e2b0['view']),this['stopListening'](_0x40e2b0),this['stopListening'](_0x40e2b0['focusableElements']);}}}),this['listenTo'](_0x3e7711['collection'],'add',(_0x46748e,_0x415ae6)=>{this['listenTo'](_0x415ae6,'escape',_0xdebfd3);}),this['listenTo'](_0x3e7711['collection'],'remove',(_0x449edb,_0x44a5fa)=>{this['stopListening'](_0x44a5fa,'escape',_0xdebfd3);});}['_addAnnotationToArchive'](_0x4baeab,_0x1679e3){this['listenTo'](_0x4baeab,'set:isVisible',_0x410dc7=>{_0x410dc7['return']=!0x1,_0x410dc7['stop']();}),this['annotationViews']['add'](_0x4baeab['view'],_0x1679e3);}['_handleNewThread'](_0x30296d){const _0x54fce5=this['editor']['plugins']['get']('CommentsRepository'),_0xb7c7f9=this['editor']['plugins']['get']('Annotations'),_0x23bae4=this['editor']['config']['get']('collaboration.channelId');if(!_0x23bae4||_0x30296d['channelId']===_0x23bae4){const _0x533826=_0x54fce5['_threadToController']['get'](_0x30296d);if(!_0x533826)return void this['_pendingThreads']['push'](_0x30296d);const _0x4eaccb=this['_calculatePosition'](_0x30296d['archivedAt']),_0x590209=_0xb7c7f9['getByInnerView'](_0x533826['view']);_0x590209['isVisible']&&_0xb7c7f9['_visibleAnnotations']['remove'](_0x590209),this['_addAnnotationToArchive'](_0x590209,_0x4eaccb);}}['_calculatePosition'](_0x4d4c1c){const _0x5ac880=this['editor']['config']['get']('collaboration.channelId'),_0x4dec8c=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x3ac924=>_0x3ac924['channelId']===_0x5ac880)['findIndex'](_0x50099a=>_0x50099a['archivedAt']<_0x4d4c1c);return _0x4dec8c<0x0||_0x4dec8c>this['annotationViews']['length']?this['annotationViews']['length']:_0x4dec8c-0x1;}['_toggleDialog'](){const _0x14f517=this['editor'],_0x44fa18=_0x14f517['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x14f517['locale'],this['annotationViews'])),'commentsArchive'===_0x44fa18['id']?_0x44fa18['hide']():_0x44fa18['show']({'id':'commentsArchive','title':N(_0x14f517['locale'],'COMMENTS_ARCHIVE'),'icon':_0x46581f,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x41ea57['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x440217,_0x4af764=!0x1){const _0x30f0a0=this['editor']['locale'],_0x32032f=this['editor']['plugins']['get']('Dialog'),_0x4f435f=new _0x440217(_0x30f0a0);return _0x4f435f['bind']('isEnabled')['to'](this,'isEnabled'),_0x4f435f['bind']('isOn')['to'](_0x32032f,'id',_0x5bca7c=>'commentsArchive'===_0x5bca7c),_0x4f435f['set']({'label':N(_0x30f0a0,'COMMENTS_ARCHIVE'),'icon':_0x46581f,'isToggleable':!0x0}),_0x4af764&&(_0x4f435f['tooltip']=!0x0),this['listenTo'](_0x4f435f,'execute',()=>this['_toggleDialog']()),_0x4f435f;}['_hideDialogOnAnnotationEscape']=_0x16e871=>{const _0x5c1263=_0x16e871['source'];if(!this['annotationViews']['has'](_0x5c1263['view']))return;const _0x221598=this['editor']['plugins']['get']('Dialog');_0x221598['isOpen']&&'commentsArchive'===_0x221598['id']&&(_0x221598['hide'](),_0x16e871['stop']());};}class gi extends _0x317aa9{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|