@ckeditor/ckeditor5-comments 47.7.0 → 47.7.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 +19 -19
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x1d5f14={}){function _0x113fea(_0x3eb17b){return _0x3eb17b['map'](_0x3ca5f2=>String['fromCharCode'](_0x3ca5f2))['join']('');}(_0x1d5f14=Object['assign']({},_0x1d5f14))['plugins']||(_0x1d5f14['plugins']=hs['defaultPlugins']),super(_0x1d5f14),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x113fea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x113fea([0x76,0x69,0x65,0x77])][_0x113fea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x113fea([0x61,0x75,0x74,0x6f]),this[_0x113fea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x113fea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x113fea([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x113fea([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x113fea([0x6f,0x6b])});}['create'](){const _0x17ecb1=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x17ecb1))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x594c20=>{const _0x2986e7=this['model']['document']['getRoot'](),_0x126560=_0x2986e7&&_0x2986e7['getChild'](_0x2986e7['childCount']-0x1);_0x594c20['setSelection'](_0x126560,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x35df9d=this['editing']['view'],_0x431358=_0x35df9d['document']['getRoot'](),_0x1d11e8=_0x431358['getChild'](0x0);_0x431358['childCount']>0x1||!_0x1d11e8||'p'!=_0x1d11e8['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x35df9d,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1d11e8['placeholder']=this['placeholder']),Ft({'view':_0x35df9d,'element':_0x1d11e8,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1d11e8);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x25c82b,_0x1105ff={}){super(_0x25c82b),this['editor']=null,this['_editorConfig']=_0x1105ff,this['set']('value',_0x1105ff['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x25c82b,'Reply...')),this['set']('submitLabel',N(_0x25c82b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5dabed(),this['focusCycler']=new _0x437732({'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',(_0x1d70c1,_0x42bb11)=>{this['cancelButtonView']['fire']('execute'),_0x42bb11();}),this['keystrokes']['set']('Ctrl+Enter',(_0x187e56,_0x29be37)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x29be37());}),this['on']('submit',(_0x4fbbc5,_0x46bd44)=>{_0x46bd44['length']>0xfde8?(alert(N(_0x25c82b,'TOO_LONG_COMMENT_ALERT',[_0x46bd44['length'],0xfde8])),_0x4fbbc5['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x40ce93=this['editor'];this['element']['insertBefore'](_0x40ce93['ui']['element'],this['element']['firstChild']),_0x40ce93['model']['document']['on']('change',()=>this['value']=_0x40ce93['getData']()),_0x40ce93['bind']('placeholder')['to'](this),this['focusables']['add'](_0x40ce93['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2a3c57){-0x1===_0x2a3c57?(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:_0x557099}=this,_0x26be27=new _0x3f1bfd(_0x557099);return _0x26be27['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x26be27['withText']=!0x0,_0x26be27['bind']('label')['to'](this,'submitLabel'),_0x26be27['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x26be27['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4e1441,_0x347cd7)=>!_0x347cd7&&!!_0x4e1441['trim']()),_0x26be27;}['_createCancelButton'](){const {locale:_0x2bef1e}=this,_0x500694=new _0x3f1bfd(_0x2bef1e);return _0x500694['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x500694['label']=N(_0x2bef1e,'Cancel'),_0x500694['withText']=!0x0,_0x500694['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x500694;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x464a4c=>{this['focusTracker']['add'](_0x464a4c['element']);}),this['focusables']['on']('change',(_0x2e5c36,_0xbe625d)=>{for(const _0x52cfb9 of Array['from'](_0xbe625d['added'])['reverse']())this['focusTracker']['add'](_0x52cfb9['element']);});}}class ie extends kt{constructor(_0x48fa41,_0x556e03,_0x46c317){super(_0x48fa41),this['commentInputView']=new es(_0x48fa41,_0x46c317),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x28447e,_0x38fadb)=>_0x28447e||!!_0x38fadb),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 _0x57b2f9(_0x48fa41,_0x556e03),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'](_0x46f38d){this['commentInputView']['focus'](_0x46f38d);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1e877d,_0x59f0e6)=>{const {submitButtonView:_0x42a122,cancelButtonView:_0x1168e9,editor:_0x27d203}=this['commentInputView'];[_0x42a122['element'],_0x1168e9['element'],_0x27d203?_0x27d203['editing']['view']['getDomRoot']():null]['filter'](_0x502163=>_0x502163)['some'](_0x4ac750=>_0x4ac750['contains'](_0x59f0e6['target']))||(this['focus'](),_0x59f0e6['preventDefault']());});}}class rs extends kt{constructor(_0x401daf){super(_0x401daf);const _0x4865bd=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4865bd['to']('count',_0x2606f2=>N(_0x401daf,'NUMBER_OF_COMMENTS',_0x2606f2))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x40296c,_0xc4cdcd,_0x26a944){super(_0x40296c);const _0x16e368=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xc4cdcd['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xc4cdcd,this['_config']=_0x26a944,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5dabed(),this['keystrokes']=new jt(),this['focusCycler']=new _0x437732({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x29acb8=>this['commentViews']['map'](_0x1736f9=>_0x1736f9['element'])['includes'](_0x29acb8['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x40296c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x40120d=>_0x40120d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x216032 of _0xc4cdcd['comments'])this['_handleNewCommentModel'](_0x216032);this['_handleInfoComment'](),this['listenTo'](_0xc4cdcd['comments'],'add',(_0x5a703e,_0x338d61)=>{const _0x487daa=this['_calculatePosition'](_0x338d61);this['length']++,this['_handleNewCommentModel'](_0x338d61,_0x487daa),this['refreshVisibleViews']();}),this['listenTo'](_0xc4cdcd['comments'],'remove',(_0x5c5dc1,_0x5bab81)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5bab81),this['refreshVisibleViews']();}),this['listenTo'](_0xc4cdcd,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xc4cdcd,'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',_0x16e368['if']('length','ck-hidden',_0x50a333=>!_0x50a333)],'aria-label':N(_0x40296c,'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'](_0x534c75){-0x1===_0x534c75?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x53c118 of this['commentViews'])_0x53c118['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x5e7c27,_0x3f027c){const _0x5938a2=new this['_config']['CommentView'](this['locale'],_0x5e7c27,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5938a2['viewUid']=_0x5e7c27['id'],_0x5938a2['delegate']('removeComment')['to'](this),_0x5938a2['delegate']('updateComment')['to'](this),_0x5938a2['delegate']('resolveCommentThread')['to'](this),_0x5938a2['delegate']('editorReady')['to'](this),_0x5938a2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5938a2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5938a2,_0x3f027c);}['_calculatePosition'](_0x45df7e){const _0x5f01d6=this['_model']['_findOptimalIndex'](_0x45df7e);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x45df7e['authoredAt']?_0x5f01d6-0x1:_0x5f01d6:_0x5f01d6-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x318da0={'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'],_0x318da0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x318da0));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x4cbdaa){const _0x554157=this['commentViews']['remove'](_0x4cbdaa['id']);this['stopListening'](_0x554157),_0x554157['isEditMode']&&this['_updateHasDirtyComment'](),_0x554157['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x7cff83=>_0x7cff83['isEditMode']);}['_rearrangeCollapse'](){const _0x41a584=function(_0x5da970){const _0x168635=new _0x337452();for(const _0x2c89b4 of _0x5da970)_0x168635['add'](_0x2c89b4);return _0x168635;}(this['commentViews']),_0x361fa7=this['_collapsedCommentsView']['count'];for(let _0x5dabc8=0x1;_0x5dabc8<=_0x361fa7;_0x5dabc8++)_0x41a584['remove'](0x1);for(const _0x206bae of _0x41a584)_0x206bae['collapse']();_0x361fa7>0x0&&_0x41a584['add'](this['_collapsedCommentsView'],0x1),ns(_0x367105(Array['from'](this['visibleViews']),Array['from'](_0x41a584)),this['visibleViews'],_0x41a584);}['_rearrangeExpand'](){ns(_0x367105(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4ef15c of this['visibleViews'])_0x4ef15c['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2f6582=>{this['focusTracker']['add'](_0x2f6582['element']),this['keystrokes']['listenTo'](_0x2f6582['element']);}),this['commentViews']['on']('change',(_0x3edf98,_0x33dd9b)=>{for(const _0x304a5c of _0x33dd9b['removed'])this['focusTracker']['remove'](_0x304a5c['element']),this['keystrokes']['stopListening'](_0x304a5c['element']);for(const _0x2aec23 of Array['from'](_0x33dd9b['added'])['reverse']())this['focusTracker']['add'](_0x2aec23['element']),this['keystrokes']['listenTo'](_0x2aec23['element']);});}}function ns(_0x20644c,_0x32413c,_0x1d9763){let _0x5a4a6d=0x0;for(const _0x22d2e2 of _0x20644c)switch(_0x22d2e2){case'insert':_0x32413c['add'](_0x1d9763['get'](_0x5a4a6d),_0x5a4a6d),_0x5a4a6d++;break;case'delete':_0x32413c['remove'](_0x5a4a6d);break;case'equal':_0x5a4a6d++;}}class oe extends kt{constructor(_0x3c281d){super(_0x3c281d);const _0x571d44=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x571d44['to']('contextValue',_0x5b150c=>N(_0x3c281d,'THREAD_CONTEXT_LABEL',_0x5b150c)),'tabindex':-0x1},'children':[{'text':_0x571d44['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x51e74a,_0x506147){super(_0x51e74a);const _0x58d1ed=this['bindTemplate'];this['_model']=_0x506147,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5dabed(),this['keystrokes']=new jt(),this['focusCycler']=new _0x437732({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3910c6=>!!_0x3910c6),this['bind']('contextValue')['to'](this['_model'],'context',_0x4bb1be=>_0x4bb1be&&_0x4bb1be['value']?this['_trimContextValue'](_0x4bb1be['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',_0x58d1ed['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 _0x2cbe22=new _0x3f1bfd(this['locale']);return _0x2cbe22['label']=N(this['locale'],'Reopen'),_0x2cbe22['tooltip']=N(this['locale'],'Reopen'),_0x2cbe22['icon']=_0x49a5af,_0x2cbe22['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3a3ebe=>!_0x3a3ebe),_0x2cbe22['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4606de,_0x10b869)=>_0x4606de&&_0x10b869),_0x2cbe22['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2cbe22;}['_trimContextValue'](_0x28206d){if(_0x28206d['length']<0x96)return _0x28206d;const _0x572793=_0x28206d['lastIndexOf']('\x20',0x93);return _0x28206d['substring'](0x0,_0x572793>-0x1?_0x572793:0x93)+'...';}['_attachContextActions'](){const _0xa37920=this['element']['querySelector']('.ck-context'),_0x5b69e7=_0xa37920['querySelector']('.ck-context__value');this['listenTo'](_0xa37920,'mouseenter',()=>{_0x5b69e7['offsetWidth']<_0x5b69e7['scrollWidth']&&_0xa37920['classList']['add']('overlay');}),this['listenTo'](_0xa37920,'mouseleave',()=>{_0xa37920['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x764b86 of this['focusables'])this['focusTracker']['add'](_0x764b86['element']),this['keystrokes']['listenTo'](_0x764b86['element']);}['_createContextView'](){const _0x3272c4=new oe(this['locale']);return _0x3272c4['bind']('contextValue')['to'](this),_0x3272c4;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2e58e6,_0x1275cd,_0x1c92bc,_0x50d298){super(_0x2e58e6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1275cd,this['_localUser']=_0x1c92bc,this['_config']=_0x50d298,this['commentThreadHeaderView']=new Xt(_0x2e58e6,_0x1275cd),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x2e58e6,N(_0x2e58e6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2e58e6,_0x1275cd,Object['assign']({'CommentView':this['_config']['CommentView']},_0x50d298)),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',(_0x371542,_0x5af575)=>_0x371542||!!_0x5af575),this['bind']('isUnlinked')['to'](_0x1275cd,'unlinkedAt',_0x1e9b84=>!!_0x1e9b84),this['bind']('ariaLabel')['to'](this,'length',_0x551b7b=>{const _0x14f9c4=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x551b7b,_0x14f9c4]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5dabed(),this['keystrokes']=new jt(),this['focusCycler']=new _0x437732({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2d8f6b=>_0x2d8f6b['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x42d1fd=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x36efc5=_0x42d1fd['commentInputView'];return _0x42d1fd['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x36efc5,'value',(_0x38fd88,_0x537cda,_0x53a89d,_0xa72500,_0x2aa9f1)=>!!_0x2aa9f1||!!_0xa72500&&_0x53a89d&&!_0x537cda||_0x38fd88&&_0x53a89d&&!_0x537cda),_0x36efc5['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x360e2b,_0x231fc0,_0x5e82b4)=>{let _0x4aba1e;return _0x4aba1e=_0x5e82b4&&_0x231fc0?'Reply\x20to\x20reopen\x20discussion...':_0x360e2b?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x4aba1e);}),_0x36efc5['bind']('submitLabel')['to'](this,'length',_0x20de74=>N(this['locale'],_0x20de74?'Reply':'Comment')),_0x36efc5['on']('submit',(_0x50c5d7,_0x4a7a89)=>{this['fire']('addComment',_0x4a7a89),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x36efc5['on']('cancel',()=>{this['focus']();}),_0x36efc5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x36efc5['on']('cancel',_0x10c04e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x10c04e['stop']());}),this['on']('change:isActive',(_0x19eaec,_0x5691ba,_0x41206e)=>{_0x41206e||this['length']||_0x36efc5['value']||this['fire']('removeCommentThread');}),_0x42d1fd;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x4a9e86(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x26976c,target:_0x4f7331,type:_0x19c941,isVisible:_0x194554=!0x0}){super(),this['view']=_0x26976c,this['view']['element']||this['view']['render'](),this['_type']=_0x19c941,this['_target']=_0x4f7331,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x337452([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4c2145,_0x1507b2)=>{this['view']['focusTracker']['add'](_0x1507b2);}),this['focusableElements']['on']('remove',(_0x38f2f4,_0x62a378)=>{this['view']['focusTracker']['remove'](_0x62a378);}),this['set']('isVisible',_0x194554);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x417048=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x417048),_0x417048;}get['targetRect'](){const _0x29d324=this['target'];if(null===_0x29d324)return null;if(_0x29d324 instanceof _0xb25606)return _0x29d324;const _0x341b39=_0x29d324['filter'](_0x3045ee=>function(_0x2c510b){const _0x43bba2=_0x2c510b['offsetParent'];if(_0x43bba2)return!0x0;const _0x363ae1=_0x2c510b['getClientRects']()['item'](0x0);return!!_0x363ae1;}(_0x3045ee));return 0x0===_0x341b39['length']?null:new _0xb25606(_0x341b39[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4732e4){this['view']['isActive']=_0x4732e4,this['view']['mainView']['isActive']=_0x4732e4;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x421bc9){if(!(null===_0x421bc9||_0x421bc9 instanceof _0xb25606||Array['isArray'](_0x421bc9)&&_0x421bc9['every'](_0x4d0c21=>fi(_0x4d0c21))))throw new _0x288e46('annotation-invalid-target',null,{'target':_0x421bc9});}['_getNormalizedTarget'](){const _0x57d4d7='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x57d4d7)?[_0x57d4d7]:_0x57d4d7;}}function fi(_0x168ea8){return null!==_0x168ea8&&'object'==typeof _0x168ea8&&'nodeType'in _0x168ea8&&0x1===_0x168ea8['nodeType'];}class S extends _0x337452{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2fcd47=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5dabed(),this['_focusTracker']['on']('change:isFocused',(_0x19c592,_0x45e351,_0x4ae28b)=>{_0x4ae28b||this['fire']('blur');});for(const _0x3438f2 of _0x2fcd47)this['add'](_0x3438f2);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3aa455){if(this['has'](_0x3aa455))throw new _0x288e46('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3aa455['innerView'],_0x3aa455),this['_viewToAnnotation']['set'](_0x3aa455['view'],_0x3aa455);for(const _0x3ee01b of _0x3aa455['focusableElements'])this['_focusTracker']['add'](_0x3ee01b);this['listenTo'](_0x3aa455['focusableElements'],'add',(_0x2991e2,_0x2f6035)=>{this['_focusTracker']['add'](_0x2f6035);}),this['listenTo'](_0x3aa455['focusableElements'],'remove',(_0x520782,_0x435ea8)=>{this['_focusTracker']['remove'](_0x435ea8);}),this['listenTo'](_0x3aa455['view']['focusTracker'],'change:isFocused',(_0x3a3d1d,_0x5c7d23,_0x59b5d0)=>{_0x59b5d0&&this['fire']('focus',_0x3aa455);}),_0x3aa455['updateTargetRect']();const _0x467ca1=this['_getOrderInContent'](_0x3aa455['view']['targetRect']);return super['add'](_0x3aa455,_0x467ca1);}['remove'](_0x42ee10){if(!this['has'](_0x42ee10))throw new _0x288e46('annotationcollection-not-existing-item',null);this['stopListening'](_0x42ee10['view']['focusTracker']),this['stopListening'](_0x42ee10['focusableElements']);for(const _0x280475 of _0x42ee10['focusableElements'])this['_focusTracker']['remove'](_0x280475);return this['_viewToAnnotation']['delete'](_0x42ee10['view']),this['_innerViewToAnnotation']['delete'](_0x42ee10['innerView']),super['remove'](_0x42ee10);}['getByInnerView'](_0x51303a){return this['_innerViewToAnnotation']['get'](_0x51303a);}['getByView'](_0x2b1c60){return this['_viewToAnnotation']['get'](_0x2b1c60);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1f8cc0 of this)_0x1f8cc0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x34fc5f=Array['from'](this)['sort']((_0x1f28e7,_0x48dc15)=>w(_0x1f28e7['view']['targetRect'],_0x48dc15['view']['targetRect']));for(let _0x1de47a=_0x34fc5f['length']-0x1;_0x1de47a>0x0;_0x1de47a--){const _0x116e60=_0x34fc5f[_0x1de47a];_0x1de47a!==this['getIndex'](_0x116e60)&&(this['remove'](_0x116e60),this['add'](_0x116e60));}}['_getOrderInContent'](_0x5e637f){let _0x23d4b6=0x0;if(!_0x5e637f)return this['length'];for(const _0x4dbb53 of this){const _0x23eb08=_0x4dbb53['view']['targetRect'];if(_0x23eb08){if(w(_0x5e637f,_0x23eb08)<0x0)return _0x23d4b6;_0x23d4b6++;}}return _0x23d4b6;}}function v({source:_0x36af36,target:_0x4fc1ed,filter:_0xe1ca4c}){for(const _0x5986f3 of _0x36af36)_0xe1ca4c(_0x5986f3)&&_0x4fc1ed['add'](_0x5986f3);_0x4fc1ed['listenTo'](_0x36af36,'add',(_0x12787f,_0x1cd8c0)=>{_0xe1ca4c(_0x1cd8c0)&&_0x4fc1ed['add'](_0x1cd8c0);}),_0x4fc1ed['listenTo'](_0x36af36,'remove',(_0x348dff,_0x2152d0)=>{_0x4fc1ed['has'](_0x2152d0)&&_0x4fc1ed['remove'](_0x2152d0);});}function w(_0x2d1051,_0x420bcf){if(null===_0x2d1051&&null===_0x420bcf)return 0x0;if(null===_0x2d1051)return-0x1;if(null===_0x420bcf)return 0x1;const _0x25353a=_0x2d1051['top']-_0x420bcf['top'];return 0x0==_0x25353a?_0x2d1051['left']-_0x420bcf['left']:_0x25353a;}class y extends _0x41a1e4{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x397c41){if(super(_0x397c41),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x397c41 instanceof _0x2cc02f){const _0x4b7473=_0x397c41['locale'];_0x397c41['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x4b7473,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x4b7473,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x4b7473,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x4b7473,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x4b7473,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x4b7473,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x4b7473,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x43e421){this['collection']['add'](_0x43e421);}['remove'](_0x83c9ba){this['collection']['remove'](_0x83c9ba),_0x83c9ba['destroy']();}['refreshVisibility'](){for(const _0x10686b of this['collection'])_0x10686b['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5f3b96){return this['collection']['getByInnerView'](_0x5f3b96);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x16464d of this['collection'])_0x16464d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3f3287){this['fire']('_activateAnnotation',_0x3f3287);}['createAnnotation'](_0x35066e){return new T(_0x35066e);}['createAnnotationView'](_0x41acde,_0x63f786){return new E(_0x41acde,_0x63f786);}['_addActiveAnnotation'](_0x2c7b7f){const _0x240e00=new Set(this['activeAnnotations']);_0x240e00['add'](_0x2c7b7f),this['activeAnnotations']=_0x240e00;}['_removeActiveAnnotation'](_0x38254f){const _0x169950=new Set(this['activeAnnotations']);_0x169950['delete'](_0x38254f),this['activeAnnotations']=_0x169950;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4e26e3=this['collection'],_0x8b7458=this['_visibleAnnotations'];function _0x20a2e2(_0x36e9b8){const _0xcb0546=_0x36e9b8['source'];_0xcb0546['isVisible']&&!_0x8b7458['has'](_0xcb0546)?_0x8b7458['add'](_0xcb0546):!_0xcb0546['isVisible']&&_0x8b7458['has'](_0xcb0546)&&_0x8b7458['remove'](_0xcb0546),_0xcb0546['view']['focusTracker']['remove'](_0xcb0546['view']['element']),_0xcb0546['view']['focusTracker']['add'](_0xcb0546['view']['element']);}this['listenTo'](_0x4e26e3,'add',(_0x3d7491,_0x33f3d3)=>{_0x33f3d3['isVisible']&&_0x8b7458['add'](_0x33f3d3),this['listenTo'](_0x33f3d3,'change:isVisible',_0x20a2e2);}),this['listenTo'](_0x4e26e3,'remove',(_0x113dfc,_0x24836c)=>{_0x8b7458['has'](_0x24836c)&&_0x8b7458['remove'](_0x24836c),this['stopListening'](_0x24836c,'change:isVisible',_0x20a2e2);});}['_setupEnterAnnotationKeystroke'](){const _0x14e2f8=_0x50c347=>{_0x50c347['on']('ready',()=>{_0x50c347['keystrokes']['set'](_0x451005,(_0x4c283d,_0xb12ae0)=>{const _0x24ff23=_0x21c273(this['activeAnnotations']['values']());_0x24ff23&&(_0x24ff23['view']['focus'](),_0xb12ae0());});});};this['context']instanceof _0x2cc02f?_0x14e2f8(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3c095a,_0x36cb96)=>{_0x14e2f8(_0x36cb96);});}['_setupEscapeAnnotationHandling'](){const _0x260373=_0x3caf6b=>{const _0xb20fea=_0x3caf6b['source'],_0x19f215=[];let _0x5f0c5c;if(Array['isArray'](_0xb20fea['target'])){_0x5f0c5c=_0xb20fea['target'][0x0],this['context']instanceof _0x2cc02f?_0x19f215['push'](this['context']):this['context']['editors']&&_0x19f215['push'](...this['context']['editors']);for(const _0x182036 of _0x19f215)for(const _0x54a239 of _0x182036['editing']['view']['domRoots']['values']())if(_0x54a239['contains'](_0x5f0c5c))return void _0x182036['editing']['view']['focus']();_0x5f0c5c['focus']();}};this['listenTo'](this['collection'],'add',(_0xb94693,_0x5dfcfd)=>{this['listenTo'](_0x5dfcfd,'escape',_0x260373,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3573b1,_0x142f99)=>{this['stopListening'](_0x142f99,'escape',_0x260373);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x41a1e4{['_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(_0x41d8c0){super(_0x41d8c0),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5bc773=this['context']['config'];_0x5bc773['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5bc773['define']('comments.maxThreadTotalWeight',0x1f4),_0x5bc773['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5bc773['define']('comments.CommentThreadView',gt),_0x5bc773['define']('comments.CommentView',Tt),_0x5bc773['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x109639=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x246ea8,_0x1a7e5f)=>this['_addCommentThread'](_0x1a7e5f)),this['on']('submitCommentThread',(_0x18143d,_0x19ed27)=>this['_submitCommentThread'](_0x19ed27)),this['on']('resolveCommentThread',(_0x5c703b,_0xc06568)=>this['_resolveCommentThread'](_0xc06568)),this['on']('resolveCommentThread',(_0x1e2d05,_0x1cd027)=>this['_updateActiveAnnotation'](_0x1cd027),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x530b77,_0x1a40ef)=>this['_reopenCommentThread'](_0x1a40ef)),this['on']('reopenCommentThread',(_0x53b9d7,_0x1c6b10)=>this['_updateActiveAnnotation'](_0x1c6b10),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5c7c52,_0x597e0a)=>this['_removeCommentThread'](_0x597e0a)),this['on']('updateCommentThread',(_0x1254d4,_0x2b2aac)=>this['_updateCommentThread'](_0x2b2aac)),this['on']('updateCommentThread',(_0xceea9a,_0x29ba86)=>this['_updateActiveAnnotation'](_0x29ba86),{'priority':'lowest'}),this['on']('addComment',(_0x39a2f2,_0xc29701)=>this['_addComment'](_0xc29701)),this['on']('updateComment',(_0x41f6d9,_0x8fba34)=>this['_updateComment'](_0x8fba34)),this['on']('removeComment',(_0x452125,_0x1420b4)=>this['_removeComment'](_0x1420b4)),this['on']('addComment',(_0x447632,{threadId:_0x7f006c,isFromAdapter:_0x491d1e})=>{if(_0x491d1e)return;const _0x44f6f1=this['getCommentThread'](_0x7f006c),_0x3c8949=_0x44f6f1&&this['_threadToController']['get'](_0x44f6f1);_0x3c8949&&_0x3c8949['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x109639,'change:activeAnnotations',(_0x5a1e1c,_0x347c4b,_0xc8b512)=>{const _0x5c3e2d=Array['from'](_0xc8b512)['map'](_0x2c58cd=>this['_viewToController']['get'](_0x2c58cd['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5c3e2d?_0x5c3e2d['model']:null;});}set['adapter'](_0x25281d){if(this['_adapter'])throw new _0x288e46('commentsrepository-adapter-already-set');this['_adapter']=_0x25281d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4e54ca=_t,threadId:_0x33c983=_0x5a6aba(),comments:_0x1e0e7c=[],unlinkedAt:_0x1d8ad4=null,resolvedAt:_0x2f797a=null,resolvedBy:_0x1359e6=null,target:_0x1f26ca=null,context:_0x5bd8a0=null,attributes:_0x998888={},isResolvable:_0x59dc94=!0x0,isSubmitted:_0x146dc1=!0x1,isFromAdapter:_0x163546=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4e54ca),{'channelId':_0x4e54ca,'threadId':_0x33c983,'comments':_0x1e0e7c,'unlinkedAt':_0x1d8ad4,'resolvedAt':_0x2f797a,'resolvedBy':_0x1359e6,'target':_0x1f26ca,'context':_0x5bd8a0,'attributes':_0x998888,'isFromAdapter':_0x163546,'isResolvable':_0x59dc94,'isSubmitted':_0x146dc1}),this['getCommentThread'](_0x33c983);}['openNewCommentThread']({channelId:_0x27c05d=_t,threadId:_0x4c1316=_0x5a6aba(),target:_0x29facd,context:_0x37d461=null,isResolvable:_0x3fb141=!0x0}){if(this['_readOnlyChannels']['has'](_0x27c05d)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x29facd)throw new _0x288e46('commentsrepository-missing-target');const _0x1ba26f=this['addCommentThread']({'channelId':_0x27c05d,'threadId':_0x4c1316,'target':_0x29facd,'context':_0x37d461,'isResolvable':_0x3fb141});if(!_0x1ba26f)return null;const _0xc7478a=this['_threadToController']['get'](_0x1ba26f),_0x2f1735=_0xc7478a['view']['commentThreadInputView']['commentInputView'],_0x35769e=this['context']['plugins']['get'](y),_0x312357=_0x35769e['getByInnerView'](_0xc7478a['view']);return _0x35769e['activate'](_0x312357),_0x2f1735['once']('editorReady',()=>_0x2f1735['focus']()),_0x1ba26f;}['hasCommentThread'](_0x1949b8){if('string'!=typeof _0x1949b8)throw new _0x288e46('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1949b8);}['updateCommentThread']({channelId:_0x4ba30a=_t,threadId:_0x3c4361,context:_0x3fd93d,unlinkedAt:_0x3c2649,attributes:_0x2c5d64,isFromAdapter:_0xff3d78=!0x1}){return this['fire'](Nt('updateCommentThread',_0x4ba30a),{'channelId':_0x4ba30a,'threadId':_0x3c4361,'context':_0x3fd93d,'unlinkedAt':_0x3c2649,'attributes':_0x2c5d64,'isFromAdapter':_0xff3d78}),this['getCommentThread'](_0x3c4361);}['getCommentThread'](_0x471ce5){if('string'!=typeof _0x471ce5)throw new _0x288e46('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x471ce5);}['fetchCommentThread']({channelId:_0x50437c,threadId:_0x2bef06}={}){const _0x2043a6=this['getCommentThread'](_0x2bef06);if(_0x2043a6)return Promise['resolve'](_0x2043a6);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x288e46('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x50437c,'threadId':_0x2bef06})['then'](_0x52a403=>this['hasCommentThread'](_0x2bef06)?this['getCommentThread'](_0x2bef06):_0x52a403?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x50437c},_0x52a403)):void 0x0)['catch'](_0x3e5b18=>{throw console['error'](_0x3e5b18),new _0x288e46('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x158059,skipNotAttached:_0x47f3e3=!0x1,skipEmpty:_0x2cabcf=!0x1,toJSON:_0x5a7f04=!0x1}={}){const _0x3dfc7f=[];for(const _0xf531df of this['_threads']['values']())_0x158059&&_0xf531df['channelId']!==_0x158059||_0x47f3e3&&!_0xf531df['isAttached']||_0x2cabcf&&0x0===_0xf531df['length']||_0x3dfc7f['push'](_0xf531df);return _0x5a7f04?_0x3dfc7f['map'](_0x36a58e=>_0x36a58e['toJSON']()):_0x3dfc7f;}['getAnnotationForCommentThread'](_0x52bb18){const _0x4857c1=this['_threadToController']['get'](_0x52bb18);if(!_0x4857c1)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x4857c1['view'])||null;}['getCommentThreadForAnnotation'](_0x16d7ef){const _0x2d3158=this['_viewToController']['get'](_0x16d7ef['innerView']);return _0x2d3158?_0x2d3158['model']:null;}['setActiveCommentThread'](_0x26dd3d){const _0x1d1df6=this['context']['plugins']['get'](y);if(!_0x26dd3d)return void(this['activeCommentThread']&&_0x1d1df6['deactivateAll']());const _0x178f19=this['getCommentThread'](_0x26dd3d);if(!_0x178f19)throw new _0x288e46('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x26dd3d});if(!this['_threadToController']['has'](_0x178f19))throw new _0x288e46('commentsrepository-active-not-attached',null,{'threadId':_0x26dd3d});const _0x3f5b08=_0x1d1df6['getByInnerView'](this['_threadToController']['get'](_0x178f19)['view']);_0x1d1df6['activate'](_0x3f5b08);}['switchReadOnly'](_0x38c461,_0x4393f6){_0x38c461?this['_readOnlyChannels']['add'](_0x4393f6):this['_readOnlyChannels']['delete'](_0x4393f6),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2d5c09){return this['_readOnlyChannels']['has'](_0x2d5c09)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4cbc8c,_0x3e5a6c){return new vt(_0x4cbc8c,_0x3e5a6c);}['setPermissions'](_0x2b3133,_0x3e6e64=_t){this['_permissions']['set'](_0x3e6e64,_0x2b3133),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x35e44b=_t){return this['_permissions']['has'](_0x35e44b)?this['_permissions']['get'](_0x35e44b):bt;}['_addCommentThread']({channelId:_0x19f4e0,threadId:_0x41ff3a,comments:_0x3a065d,unlinkedAt:_0x10ee2d,resolvedAt:_0x1f3b54,resolvedBy:_0x43406e,target:_0x2e457d,context:_0xec011,attributes:_0x4c9837,isFromAdapter:_0x392cf3,isResolvable:_0x13fbad,isSubmitted:_0x44b2e6}){if('string'!=typeof _0x41ff3a)throw new _0x288e46('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x41ff3a});if(this['hasCommentThread'](_0x41ff3a))throw new _0x288e46('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x41ff3a});const _0x28d134=new pi(this,{'channelId':_0x19f4e0,'id':_0x41ff3a,'context':_0xec011,'attributes':_0x4c9837,'unlinkedAt':_0x10ee2d,'resolvedAt':_0x1f3b54,'resolvedBy':_0x43406e?this['context']['plugins']['get'](it)['getUser'](_0x43406e):null,'isResolvable':_0x13fbad,'isSubmitted':_0x44b2e6||_0x392cf3});this['_threads']['set'](_0x41ff3a,_0x28d134);for(const _0x4532a5 of _0x3a065d)_0x28d134['_add'](this['_createNewComment']({'threadId':_0x41ff3a,..._0x4532a5}));return _0x2e457d&&_0x28d134['attachTo'](_0x2e457d),_0x392cf3||!_0x28d134['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x19f4e0,'threadId':_0x41ff3a});}['_submitCommentThread']({channelId:_0x19d1f2,threadId:_0x514e51}){if(!this['hasCommentThread'](_0x514e51))throw new _0x288e46('commentsrepository-missing-comment-thread',this);const _0x204652=this['getCommentThread'](_0x514e51);if(_0x204652['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2f96a1,comments:_0x5d6592,resolvedAt:_0x2b0516,resolvedBy:_0x3840f9,context:_0x28e7ca,attributes:_0x55cd6d}=_0x204652,_0xdb8207=this['context']['plugins']['get']('PendingActions'),_0x182ce9=_0xdb8207['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x19d1f2,'threadId':_0x2f96a1,'comments':_0x5d6592['map'](_0x5f53ca=>_0x5f53ca['toJSON']()),'resolvedAt':_0x2b0516,'resolvedBy':_0x3840f9?_0x3840f9['id']:_0x3840f9,'context':_0x28e7ca,'attributes':_0x55cd6d})['then'](({comments:_0xe458e9})=>{_0xdb8207['remove'](_0x182ce9);for(const _0xa613a3 of _0xe458e9)this['_updateComment']({'channelId':_0x19d1f2,'threadId':_0x514e51,'commentId':_0xa613a3['commentId'],'createdAt':_0xa613a3['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4ce05e=>{throw console['error'](_0x4ce05e),new _0x288e46('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x49765b,target:_0x159fda}){const _0x21ce5b=this['getCommentThread'](_0x49765b);if(!_0x21ce5b)throw new _0x288e46('commentsrepository-attach-missing-comment-thread',this);const _0x6d0596=this['context']['plugins']['get']('PendingActions'),_0xfdaa96=this['context']['plugins']['get'](y),_0x45b661=this['_createCommentThreadView'](_0x21ce5b),_0x5eba8c=new vt(_0x21ce5b,_0x45b661);let _0x51972c=null;_0x45b661['on']('change:isDirty',(_0x1700c4,_0x2c170f,_0x150428)=>{_0x150428?_0x51972c=_0x6d0596['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x51972c&&(_0x6d0596['remove'](_0x51972c),_0x51972c=null);}),this['_threadToController']['set'](_0x21ce5b,_0x5eba8c),this['_viewToController']['set'](_0x45b661,_0x5eba8c);const _0x37c6fa=new E(this['context']['locale'],_0x45b661);_0x37c6fa['bind']('length')['to'](_0x45b661),_0x37c6fa['bind']('isDirty')['to'](_0x45b661,'isDirty',_0x45b661,'length',(_0x1caafa,_0x4b6f20)=>_0x1caafa||!_0x4b6f20),_0x37c6fa['bind']('isActive')['to'](_0x45b661),_0x37c6fa['type']='comment';const _0x5ba25a=new T({'view':_0x37c6fa,'target':_0x159fda,'type':'comment','isVisible':!_0x21ce5b['archivedAt']&&!!('function'==typeof _0x159fda?_0x159fda():_0x159fda)});return _0x45b661['on']('escape',()=>{_0x5ba25a['fire']('escape');}),this['_bindAnnotationToEditors'](_0x45b661,_0x5ba25a),_0xfdaa96['add'](_0x5ba25a),_0x5ba25a;}['_bindAnnotationToEditors'](_0x503bc4,_0x7605bc){this['listenTo'](_0x503bc4,'editorReady',(_0x44da1f,_0x38d590)=>{const _0x276b5a=_0x38d590['ui']['view']['body']['bodyCollectionContainer'];_0x7605bc['focusableElements']['add'](_0x276b5a),this['context']instanceof _0x2cc02f&&this['context']['ui']['focusTracker']['add'](_0x276b5a);},{'priority':'highest'}),this['listenTo'](_0x503bc4,'editorDestroyed',(_0x58a0c4,_0xd2b769)=>{const _0x2446d6=_0xd2b769['ui']['view']['body']['bodyCollectionContainer'];_0x7605bc['focusableElements']['has'](_0x2446d6)&&_0x7605bc['focusableElements']['remove'](_0x2446d6),this['context']instanceof _0x2cc02f&&this['context']['ui']['focusTracker']['remove'](_0x2446d6);});}['_unbindEditors'](_0x113645){this['stopListening'](_0x113645,'editorReady'),this['stopListening'](_0x113645,'editorDestroyed');}['_createCommentThreadView'](_0x533a21){const _0x3cc02b=this['context']['plugins']['get'](it),{config:_0x166e01,locale:_0x1ca00e}=this['context'],_0x26e5bf=pt(_0x166e01['get']('locale'),_0x1ca00e);return new(0x0,(_0x166e01['get']('comments'))['CommentThreadView'])(_0x1ca00e,_0x533a21,_0x3cc02b['me'],{'editorConfig':{..._0x166e01['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x166e01['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x166e01['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x166e01['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x166e01['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x26e5bf,'CommentView':_0x166e01['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x73b306,channelId:_0x31258b,resolvedAt:_0x14c896,resolvedBy:_0x5dcc68,isFromAdapter:_0x5bb008}){if(!this['hasCommentThread'](_0x73b306))throw new _0x288e46('commentsrepository-missing-comment-thread',null,{'threadId':_0x73b306});const _0xa098d4=this['getCommentThread'](_0x73b306);if(_0xa098d4['isResolved'])throw new _0x288e46('commentsrepository-resolved-comment-thread',null,{'threadId':_0x73b306});const _0x339d8a=this['context']['plugins']['get'](it);if(_0xa098d4['resolvedBy']=_0x339d8a['getUser'](_0x5dcc68),_0xa098d4['resolvedAt']=_0x14c896,_0x5bb008||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x34239e=this['context']['plugins']['get']('PendingActions'),_0x39a814=_0x34239e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x31258b,'threadId':_0x73b306})['then'](({resolvedAt:_0x1facd2,resolvedBy:_0x1223a8})=>{_0x34239e['remove'](_0x39a814),_0xa098d4['resolvedBy']['id']!==_0x1223a8&&(_0xa098d4['resolvedBy']=_0x339d8a['getUser'](_0x1223a8)),_0xa098d4['resolvedAt']=_0x1facd2;})['catch'](_0x3342dd=>{throw console['error'](_0x3342dd),new _0x288e46('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1a1b3a,channelId:_0x1083c3,isFromAdapter:_0x356601}){if(!this['hasCommentThread'](_0x1a1b3a))throw new _0x288e46('commentsrepository-missing-comment-thread',null,{'threadId':_0x1a1b3a});const _0x53e735=this['getCommentThread'](_0x1a1b3a);if(!_0x53e735['isResolved'])throw new _0x288e46('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1a1b3a});if(_0x53e735['resolvedBy']=null,_0x53e735['resolvedAt']=null,_0x356601||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2ea888=this['context']['plugins']['get']('PendingActions'),_0x189a5d=_0x2ea888['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1083c3,'threadId':_0x1a1b3a})['then'](()=>_0x2ea888['remove'](_0x189a5d))['catch'](_0x1f01b1=>{throw console['error'](_0x1f01b1),new _0x288e46('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5b1d78,isFromAdapter:_0x1d2004}){const _0x723531=this['getCommentThread'](_0x5b1d78);if(!_0x723531)throw new _0x288e46('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5b1d78),this['_threads']['delete'](_0x5b1d78),!_0x723531['isSubmitted']||_0x1d2004||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2156f1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1077a7}=_0x723531,_0x1430a1=_0x2156f1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1077a7,'threadId':_0x5b1d78})['then'](()=>_0x2156f1['remove'](_0x1430a1))['catch'](_0x2ec993=>{throw console['error'](_0x2ec993),new _0x288e46('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x170e3e,unlinkedAt:_0x301e42,context:_0x5670fd,attributes:_0x3116b3,isFromAdapter:_0x50d7f3}){if('string'!=typeof _0x170e3e)throw new _0x288e46('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x170e3e});if(!this['hasCommentThread'](_0x170e3e))throw new _0x288e46('commentsrepository-missing-comment-thread',null,{'threadId':_0x170e3e});const _0x2d0d60=this['getCommentThread'](_0x170e3e);let _0xbe6644=!0x1;if(void 0x0!==_0x5670fd&&_0x2d0d60['context']!==_0x5670fd&&(_0x2d0d60['context']=_0x5670fd,_0xbe6644=!0x0),void 0x0!==_0x301e42&&_0x2d0d60['unlinkedAt']!==_0x301e42&&(_0x2d0d60['unlinkedAt']=_0x301e42,_0xbe6644=!0x0),_0x3116b3&&!At(_0x3116b3,_0x2d0d60['attributes'])&&(_0x2d0d60['attributes']=_0x3116b3,_0xbe6644=!0x0),!_0xbe6644)return Promise['resolve']();if(!_0x2d0d60['isSubmitted']||_0x50d7f3||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3b0ecf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3a2609}=_0x2d0d60,_0x4bcc65=_0x3b0ecf['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3a2609,'threadId':_0x170e3e,'context':_0x5670fd,'unlinkedAt':_0x301e42,'attributes':_0x3116b3})['then'](()=>_0x3b0ecf['remove'](_0x4bcc65))['catch'](_0x1336ba=>{throw console['error'](_0x1336ba),new _0x288e46('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xf2abac){const _0x582eb8=this['context']['plugins']['get'](y),_0x3d9bbf=this['getCommentThread'](_0xf2abac);if(_0x3d9bbf['_isAttached']=!0x1,this['_threadToController']['has'](_0x3d9bbf)){const _0x54c9a7=this['_threadToController']['get'](_0x3d9bbf),_0x3d86d8=_0x54c9a7['view'],_0x5d47fa=_0x582eb8['getByInnerView'](_0x3d86d8);this['_threadToController']['delete'](_0x3d9bbf),this['_viewToController']['delete'](_0x3d86d8),_0x5d47fa&&_0x582eb8['remove'](_0x5d47fa),_0x54c9a7['destroy'](),_0x3d86d8['destroy']()['then'](()=>{this['_unbindEditors'](_0x3d86d8);});}}['_updateActiveAnnotation']({threadId:_0x1994a8,resolvedAt:_0x68d9c5,unlinkedAt:_0x31bd74}){const _0x3a5820=!!_0x68d9c5,_0xff6619=this['context']['plugins']['get'](y),_0x1b1c37=this['getCommentThread'](_0x1994a8);if(this['_threadToController']['has'](_0x1b1c37)){const _0x60c811=this['_threadToController']['get'](_0x1b1c37)['view'],_0x50661b=_0xff6619['getByInnerView'](_0x60c811);_0x50661b&&(_0x3a5820&&_0xff6619['_removeActiveAnnotation'](_0x50661b),_0x31bd74?_0x50661b['isVisible']=!0x1:_0x50661b['refreshVisibility']());}}['_getExternalAuthor'](_0x3ebc8e){const _0x1428f2=this['context']['plugins']['get'](it),_0x4a3a95=It('external:'+_0x3ebc8e),_0x36267d=_0x1428f2['getUser'](_0x4a3a95);return _0x36267d||_0x1428f2['addUser']({'id':_0x4a3a95,'name':_0x3ebc8e});}['_createNewComment']({threadId:_0x197812,commentId:_0xfc0d18=_0x5a6aba(),content:_0x1a7816,authorId:_0x4b3a1b,createdAt:_0xd5474a,attributes:_0x33f3b7}){if('string'!=typeof _0xfc0d18)throw new _0x288e46('commentsrepository-invalid-commentid');if('string'!=typeof _0x4b3a1b)throw new _0x288e46('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1a7816||!_0x1a7816['trim']())throw new _0x288e46('commentsrepository-invalid-comment-content');const _0x2893d9=this['context']['plugins']['get'](it)['getUser'](_0x4b3a1b);if(!_0x2893d9)throw new _0x288e46('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4b3a1b});let _0x379b8f=null,_0x574f87=_0xd5474a;return _0x33f3b7?.['@external']&&(_0x379b8f=this['_getExternalAuthor'](_0x33f3b7['@external']['authorName']),_0x574f87=new Date(_0x33f3b7['@external']['createdAt'])),new wi(this,{'threadId':_0x197812,'id':_0xfc0d18,'author':_0x379b8f||_0x2893d9,'creator':_0x2893d9,'content':_0x1a7816,'createdAt':_0xd5474a,'authoredAt':_0x574f87,'attributes':_0x33f3b7});}['_addComment'](_0x43dd5d){let {threadId:_0x1cc730,content:_0xf3bcc1,attributes:_0x145e69,isFromAdapter:_0x15abbb}=_0x43dd5d;const _0x41d1be=this['getCommentThread'](_0x43dd5d['threadId']);if(!_0x41d1be)throw new _0x288e46('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1eaff0=this['_createNewComment'](_0x43dd5d),{id:_0x2919dc}=_0x1eaff0;if(_0x41d1be['_add'](_0x1eaff0),_0x15abbb||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x41d1be['isSubmitted'])return Promise['resolve']();const _0x444ae9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x466e6e}=_0x41d1be,_0x1305c6=_0x444ae9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x145e69||(_0x145e69={}),this['adapter']['addComment']({'channelId':_0x466e6e,'threadId':_0x1cc730,'commentId':_0x2919dc,'content':_0xf3bcc1,'attributes':_0x145e69})['then'](_0x5e488c=>{_0x444ae9['remove'](_0x1305c6),_0x5e488c&&this['_updateComment']({'channelId':_0x466e6e,'threadId':_0x1cc730,'commentId':_0x2919dc,'createdAt':_0x5e488c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4f5846=>{throw console['error'](_0x4f5846),new _0x288e46('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x13862b,commentId:_0x44fa5c,content:_0x1a6a65,createdAt:_0x2be3f9,attributes:_0x3e97a0,isFromAdapter:_0x31b27c}){if(void 0x0!==_0x1a6a65&&('string'!=typeof _0x1a6a65||!_0x1a6a65['trim']()['length']))throw new _0x288e46('commentsrepository-update-comment-invalid-content');const _0x2b9d24=this['getCommentThread'](_0x13862b),_0x5bcaab=_0x2b9d24['getComment'](_0x44fa5c);if(!_0x5bcaab)throw new _0x288e46('commentsrepository-update-missing-comment',this);let _0x4e48b9=!0x1;if(_0x1a6a65&&_0x1a6a65!==_0x5bcaab['content']&&(_0x5bcaab['isEditable']||_0x31b27c)&&(_0x5bcaab['content']=_0x1a6a65,_0x4e48b9=!0x0),_0x2be3f9&&_0x2be3f9!==_0x5bcaab['createdAt']&&(_0x5bcaab['createdAt']=_0x2be3f9,_0x5bcaab['attributes']&&_0x5bcaab['attributes']['@external']||(_0x5bcaab['authoredAt']=_0x2be3f9),_0x4e48b9=!0x0),_0x3e97a0&&!At(_0x3e97a0,_0x5bcaab['attributes'])&&(_0x5bcaab['attributes']=_0x3e97a0,_0x4e48b9=!0x0),!_0x4e48b9)return Promise['resolve']();if(_0x2b9d24['fire']('commentUpdated'),_0x31b27c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x283628=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42a003}=this['getCommentThread'](_0x5bcaab['threadId']),_0x2a1a56=_0x283628['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x42a003,'threadId':_0x13862b,'commentId':_0x44fa5c,'content':_0x1a6a65,'attributes':_0x3e97a0})['then'](()=>_0x283628['remove'](_0x2a1a56))['catch'](_0x4f383f=>{throw console['error'](_0x4f383f),new _0x288e46('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x463a53,commentId:_0x28c254,isFromAdapter:_0x1fa910}){const _0x537fd=this['getCommentThread'](_0x463a53),_0x4160e9=_0x537fd['getComment'](_0x28c254);if(!_0x4160e9)throw new _0x288e46('commentsrepository-remove-missing-comment',this);if(_0x537fd['_remove'](_0x4160e9),_0x1fa910||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x15b16a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x155f62}=_0x537fd,_0x1279fa=_0x15b16a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x155f62,'threadId':_0x463a53,'commentId':_0x28c254})['then'](()=>_0x15b16a['remove'](_0x1279fa))['catch'](_0x1e62c0=>{throw console['error'](_0x1e62c0),new _0x288e46('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x4a9e86(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2e17bf,_0x52371b){super();const _0xee0887=_0x2e17bf['context']['plugins']['get'](it)['me'],_0x302cad=_0x2e17bf['getCommentThread'](_0x52371b['threadId']),_0x2e7825=0x0===_0x302cad['comments']['length'],_0x4e0bc1=_0xee0887===_0x52371b['author'];this['id']=_0x52371b['id'],this['threadId']=_0x52371b['threadId'],this['author']=_0x52371b['author'],this['creator']=_0x52371b['creator'],this['isExternal']=Boolean(_0x52371b['attributes']&&_0x52371b['attributes']['@external']),this['set']('content',_0x52371b['content']),this['createdAt']=_0x52371b['createdAt']||new Date(),this['set']('authoredAt',_0x52371b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x302cad,'resolvedAt'),this['set']('attributes',_0x52371b['attributes']||{}),this['bind']('isEditable')['to'](_0x2e17bf,'_permissions',()=>{const _0x22f790=_0x2e17bf['getPermissions'](_0x302cad['channelId'])['write'],_0x3cf534=_0x2e17bf['getPermissions'](_0x302cad['channelId'])['modifyAll'];return _0x4e0bc1&&_0x22f790||!_0x4e0bc1&&_0x3cf534;}),this['bind']('isRemovable')['to'](_0x302cad,'isRemovable',_0x2e17bf,'_permissions',_0x322770=>{const _0x599ff8=_0x2e17bf['getPermissions'](_0x302cad['channelId'])['write'],_0x4d2d20=_0x2e17bf['getPermissions'](_0x302cad['channelId'])['modifyAll'];return _0x4e0bc1&&_0x599ff8||_0x322770&&_0x2e7825||!_0x4e0bc1&&_0x4d2d20&&!_0x2e7825;}),this['bind']('isReadOnly')['to'](_0x302cad,'isReadOnly'),this['_repository']=_0x2e17bf;}get['weight'](){return Math['max'](function(_0xf4c630){const _0x39bed2=document['createElement']('div');return _0x39bed2['innerHTML']=_0xf4c630,_0x39bed2['textContent']['length'];}(this['content']),0xc8);}['update'](_0x51b232){const {threadId:_0x3013cd,id:_0xd89f53}=this;if(!this['_repository']['hasCommentThread'](_0x3013cd))throw new _0x288e46('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x171a4d}=this['_repository']['getCommentThread'](_0x3013cd);this['_repository']['fire'](Nt('updateComment',_0x171a4d,_0x3013cd),{'channelId':_0x171a4d,'threadId':_0x3013cd,'commentId':_0xd89f53,..._0x51b232});}['setAttribute'](_0x47a75b,_0x257c6d){const _0x183a11=wt(this['attributes']);yt(_0x183a11,_0x47a75b,_0x257c6d),this['update']({'attributes':_0x183a11});}['removeAttribute'](_0x398484){const _0x3b8a80=wt(this['attributes']);Ct(_0x3b8a80,_0x398484),this['update']({'attributes':_0x3b8a80});}['remove'](_0x2016f={}){if(!_0x2016f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xb9a66c,id:_0x4ad072}=this;if(!this['_repository']['hasCommentThread'](_0xb9a66c))throw new _0x288e46('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x297f31}=this['_repository']['getCommentThread'](_0xb9a66c);this['_repository']['fire'](Nt('removeComment',_0x297f31,_0xb9a66c),{'channelId':_0x297f31,'threadId':_0xb9a66c,'commentId':_0x4ad072,..._0x2016f});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x43906e,..._0x436cb9){for(const _0x42e823 of _0x436cb9)void 0x0!==_0x42e823&&(_0x43906e+=':'+String(_0x42e823));return _0x43906e;}class ot extends _0x1e0b66{constructor(_0x12bda8){super(_0x12bda8),this['set']('hasContent',!0x1);}['refresh'](){const _0xd68f95=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4333a2 of _0xd68f95['getRanges']())if(this['_hasContent'](_0x4333a2))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x21f7d3=_0x5a6aba(),ranges:_0x2e4266,comment:_0x282f88}={}){const _0x3e4798=this['editor']['model'],_0x129a53=_0x2e4266??Array['from'](_0x3e4798['document']['selection']['getRanges']()),_0x25920b=[];for(const _0x4f9f25 of _0x129a53)this['_hasContent'](_0x4f9f25)&&_0x25920b['push'](this['_trimToContent'](_0x4f9f25));if(!_0x25920b['length'])throw new _0x288e46('addcommentthreadcommand-incorrect-ranges',null);_0x282f88&&this['_createCommentThread'](_0x21f7d3,_0x282f88),this['_createMarkersFromRanges'](_0x21f7d3,_0x25920b,!!_0x282f88);}['_createMarkersFromRanges'](_0x51962c,_0x22850c,_0x23fabb){this['editor']['model']['change'](_0x55115c=>{for(const _0x32bc9c of _0x22850c){const _0x1fef35=_0x5a6aba()['substr'](0x1,0x5),_0x1efac3='comment:'+_0x51962c+':'+_0x1fef35;_0x55115c['addMarker'](_0x1efac3,{'range':_0x32bc9c,'usingOperation':_0x23fabb,'affectsData':_0x23fabb});}});}['_createCommentThread'](_0x4f6ce3,_0x608c90){const _0x80d23e=this['editor']['plugins']['get']('CommentsRepository'),_0x73a992=this['editor']['config']['get']('collaboration.channelId'),_0x447679=this['editor']['plugins']['get']('Users')['me'];if(!_0x447679)throw new _0x288e46('addcommentthreadcommand-user-not-found',null);_0x80d23e['addCommentThread']({'threadId':_0x4f6ce3,'channelId':_0x73a992,'comments':[{'authorId':_0x447679['id'],'content':_0x608c90,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xc1ab1d){for(const _0x1eae2e of _0xc1ab1d['getItems']())if(this['_itemIsContent'](_0x1eae2e))return!0x0;return!0x1;}['_itemIsContent'](_0x3b85fb){return _0x3b85fb['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3b85fb)&&!_0x3b85fb['is']('element','tableCell');}['_trimToContent'](_0x4a2d5f){const _0xbad5ee=_0x29a2e1=>!this['_itemIsContent'](_0x29a2e1['item']),_0x170d62=_0x4a2d5f['start']['getLastMatchingPosition'](_0xbad5ee),_0xa75a60=_0x4a2d5f['end']['getLastMatchingPosition'](_0xbad5ee,{'direction':'backward'});return this['editor']['model']['createRange'](_0x170d62,_0xa75a60);}}class b extends _0x42a4ab{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23dda3){super(_0x23dda3),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xd5ca41=this['editor'],_0x528214=_0xd5ca41['model']['document']['selection'],_0x1854ff=_0x1011d4(()=>this['refreshSelectedViews'](),0xa);_0x528214['on']('change:range',(_0x213f96,_0x5705ac)=>{_0x5705ac['directChange']&&(_0x1854ff['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xd5ca41['editing']['view']['document'],'change:isFocused',(_0x3cd1a3,_0x4b535f,_0x4938d2)=>{_0x4938d2&&_0x1854ff();}),this['listenTo'](_0xd5ca41['ui']['focusTracker'],'change:isFocused',(_0x501d62,_0x1cb37c,_0x176f2d)=>{_0x176f2d||this['fire']('blur',{'isAnnotationTracked':_0x433bf1=>this['_editorAnnotationsData']['has'](_0x433bf1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2933ec){if(this['_editorAnnotations']['has'](_0x2933ec['view']))return;this['_editorAnnotations']['add'](_0x2933ec['view']),this['editor']['ui']['focusTracker']['add'](_0x2933ec['view']['element']);const _0x296d24=this['editor']['plugins']['get'](y);this['listenTo'](_0x296d24['collection'],'remove',(_0x39806a,_0x3778f6)=>{this['editor']['ui']['focusTracker']['remove'](_0x3778f6['view']['element']),this['_editorAnnotations']['delete'](_0x3778f6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1683b1){if('function'!=typeof _0x1683b1)throw new _0x288e46('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1683b1);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x940515,annotations:_0xcd327}){const _0x3916ff=[],_0x4e88bb=this['editor']['model']['document']['selection'],_0x2f594b=Array['from'](_0x4e88bb['getRanges']());for(const [_0x98e2e0,_0x16431e]of this['_editorAnnotationsData']){const _0x1955bb=_0x583a8b(_0x16431e),_0x55a9a5=_0xcd327['getByInnerView'](_0x98e2e0);_0x1955bb&&_0x55a9a5&&_0x3916ff['push']({'annotation':_0x55a9a5,'range':_0x1955bb});}function _0x583a8b(_0x5bdfe9){for(const _0x25385f of _0x5bdfe9)for(const _0x5eeee7 of _0x2f594b)if(_0x25385f['containsRange'](_0x5eeee7,!_0x4e88bb['isCollapsed']))return _0x25385f;return null;}return _0x3916ff['sort']((_0x1b7574,_0x158ef0)=>{const _0x17baf0=_0x1b7574['range'],_0xa5accd=_0x158ef0['range'];if(!_0x17baf0['isEqual'](_0xa5accd)){if(_0x17baf0['containsRange'](_0xa5accd,!0x0))return 0x1;if(_0xa5accd['containsRange'](_0x17baf0,!0x0))return-0x1;}return _0x1b7574['annotation']==_0x940515?-0x1:_0x158ef0['annotation']==_0x940515?0x1:0x0;})['map'](_0x1f3860=>_0x1f3860['annotation']);}get['_editorAnnotationsData'](){const _0x10f7ac=new Map();for(const _0x2b5efa of Array['from'](this['_dataCollectors']))for(const [_0x40643f,_0x48339d]of _0x2b5efa())_0x10f7ac['set'](_0x40643f,_0x48339d);return _0x10f7ac;}}class st extends _0x42a4ab{['afterInit'](){const _0x2dbe74=this['editor'];if(!_0x2dbe74['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2dbe74['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x42a4ab{constructor(_0x4fb1d4){super(_0x4fb1d4),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x29ea6a=this['editor'],_0x154886=_0x29ea6a['commands']['get']('importWord'),_0x5f74fa=_0x29ea6a['plugins']['get'](it);_0x154886&&(_0x154886['on']('execute',(_0x34e21f,[,_0x319728])=>{_0x319728['collaboration_features']={'comments':!0x0,'user_id':_0x5f74fa['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x154886,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1eb894,_0x402aab){const {comment_threads:_0x41c8c8}=_0x402aab;_0x41c8c8&&_0x41c8c8['forEach'](({thread_id:_0x587531,comments:_0x53acea,is_resolved:_0x496a96})=>{const _0x31b853=new Date(),_0x423177=_0x53acea['map'](({author:_0x5a5368,content:_0x3562f2,created_at:_0x223ce5})=>({'content':_0x3562f2,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x31b853,'attributes':{'@external':{'authorName':_0x5a5368,'createdAt':_0x223ce5?new Date(_0x223ce5):new Date(),'source':'importWord'}}})),_0x330b6a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x330b6a,'threadId':_0x587531,'comments':_0x423177,'resolvedAt':_0x496a96?_0x31b853:null});});}}class at extends _0x42a4ab{constructor(_0x4d4ae7){super(_0x4d4ae7),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x50efda=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x50efda,'contentInsertion',(_0x4ba74b,_0x117140)=>this['_removeMarkersWithoutThreads'](_0x117140['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x26d8a4){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x26d8a4;const _0x51eeaa=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1e60e2 of _0x26d8a4['keys']()){const [_0xd5d424,_0x393d16]=_0x1e60e2['split'](':');'comment'!=_0xd5d424||_0x51eeaa['hasCommentThread'](_0x393d16)||_0x26d8a4['delete'](_0x1e60e2);}return _0x26d8a4;}['_registerMarkerInClipboardPipeline'](){const _0x218e3d=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1dd1ce=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1dd1ce&&_0x218e3d['_registerMarkerToCopy']('comment',_0x1dd1ce);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x13d3e5){switch(_0x13d3e5){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x3aac7f){const _0x21e851=_0x3aac7f['split'](':');return{'group':_0x21e851[0x0],'id':_0x21e851[0x1],'part':_0x21e851[0x2]};}class ut extends _0x42a4ab{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x18943d,_0x5cd569)=>{if(!_0x5cd569['options']['showCommentHighlights'])return null;if(_0x5cd569['options']['ignoreResolvedComments']){const {id:_0x3f62c2}=ft(_0x18943d['markerName']),_0x118a76=this['editor']['plugins']['get'](o);if(_0x118a76['getCommentThread'](_0x3f62c2)?.['isResolved']&&_0x18943d['item'])return _0x5cd569['consumable']['consume'](_0x18943d['item'],'addMarker:'+_0x18943d['markerName']),_0x5cd569['consumable']['consume'](_0x18943d['item'],'removeMarker:'+_0x18943d['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3ace12=>{_0x3ace12['on']('addMarker:comment',(_0x10db15,_0x395b74,_0x3a5a06)=>{if(!_0x3a5a06['options']['showCommentHighlights'])return;const _0x42797a=_0x395b74['item'];if(!_0x42797a)return;const _0x5874f0=_0x3a5a06['mapper']['toViewElement'](_0x42797a);this['editor']['model']['schema']['isObject'](_0x42797a)&&_0x5874f0&&!_0x5874f0['getCustomProperty']('widget')&&_0x5874f0['is']('containerElement')&&_0x17ce8a(_0x5874f0,_0x3a5a06['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x483ff5,{writer:_0xb93ef5,options:_0xecc770})=>{if(!_0xecc770['showCommentHighlights'])return null;const _0x2b307b=_0xb93ef5['createContainerElement']('div'),_0x1c7b54=_0xb93ef5['createEmptyElement']('hr');return _0xb93ef5['addClass']('ck-horizontal-line',_0x2b307b),_0xb93ef5['insert'](_0xb93ef5['createPositionAt'](_0x2b307b,0x0),_0x1c7b54),_0x2b307b;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1a23f6,{writer:_0x303d73,options:_0x510572})=>{if(!_0x510572['showCommentHighlights'])return null;const _0x1f4b6a=_0x303d73['createContainerElement']('span'),_0x5a952c=_0x303d73['createEmptyElement']('img');return _0x303d73['addClass']('image-inline',_0x1f4b6a),_0x303d73['insert'](_0x303d73['createPositionAt'](_0x1f4b6a,0x0),_0x5a952c),_0x1f4b6a;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x23963c,{writer:_0x3f9fec,options:_0x141ff9})=>{if(_0x141ff9['showCommentHighlights'])return _0x3f9fec['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1da6c3,_0x354603,_0x213750)=>{_0x213750['options']['showCommentHighlights']&&_0x1da6c3['stop']();},{'priority':'high'});}}class r extends _0x42a4ab{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(_0x3269f2){super(_0x3269f2),this['set']('isThreadsLoadingPaused',!0x0),_0x3269f2['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1d98c4,_0x470e38,_0x1e4b4e,_0x4a9465)=>{const _0x50a78d=_0x3269f2['plugins']['get'](o),_0x4f2c48=_0x1e4b4e?ft(_0x1e4b4e)['id']:null;_0x3269f2['model']['change'](()=>{if(_0x4f2c48){const _0x2d71b6=this['getAllMarkersForId'](_0x4f2c48);for(const _0x16910e of _0x2d71b6)_0x3269f2['editing']['reconvertMarker'](_0x16910e);}if(_0x4a9465){const {id:_0x5bcba3}=ft(_0x4a9465),_0x575f71=_0x50a78d['getCommentThread'](_0x5bcba3);if(_0x575f71&&_0x575f71['unlinkedAt'])return;if(_0x575f71&&!_0x575f71['isAttached'])return;const _0x19c640=this['getAllMarkersForId'](_0x5bcba3);for(const _0x14f7fa of _0x19c640)_0x3269f2['editing']['reconvertMarker'](_0x14f7fa);}}),_0x4f2c48&&this['scrollToThreadMarker'](_0x4f2c48);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5c6424=this['editor'],_0x3db1b7=_0x5c6424['plugins']['get'](o),_0x431ddd=_0x5c6424['config']['get']('collaboration.channelId'),_0x3570a7=_0x3db1b7['getCommentThreads']()['filter'](_0x55a855=>_0x55a855['channelId']!==_0x431ddd);_0x5c6424['commands']['add']('addCommentThread',new ot(_0x5c6424)),this['listenTo'](_0x5c6424,'change:isReadOnly',(_0x61765e,_0x26bb5d,_0x23a75f)=>{_0x3db1b7['switchReadOnly'](_0x23a75f,_0x5c6424['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3db1b7,dt('addCommentThread',_0x431ddd),(_0x5dfb86,{threadId:_0x40ecb3})=>{const _0xb75d54=this['editor']['plugins']['get'](o)['getCommentThread'](_0x40ecb3);_0xb75d54?.['unlinkedAt']&&this['_attachArchivedThread'](_0x40ecb3);}),this['listenTo'](_0x3db1b7,dt('removeCommentThread',_0x431ddd),(_0x179b33,{threadId:_0x2cee89})=>{_0x5c6424['model']['enqueueChange']({'isUndoable':!0x1},_0x431ff1=>{const _0x2e12c6=this['getAllMarkersForId'](_0x2cee89);for(const _0x801a28 of _0x2e12c6)_0x431ff1['removeMarker'](_0x801a28);});}),this['listenTo'](_0x3db1b7,dt('resolveCommentThread',_0x431ddd),(_0xfca86f,{threadId:_0xa9353b})=>{(this['_reconvertMarkers'](_0xa9353b),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0xa9353b)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3db1b7,dt('reopenCommentThread',_0x431ddd),(_0x164d7f,{threadId:_0x4110b4})=>{this['_reconvertMarkers'](_0x4110b4);},{'priority':'low'}),this['listenTo'](_0x3db1b7,dt('addComment',_0x431ddd),(_0xaadf06,{threadId:_0x29d93d,isFromAdapter:_0x3a56ad})=>{const _0x482691=this['getAllMarkersForId'](_0x29d93d);if(_0x3a56ad||0x0==_0x482691['length']||!_0x3db1b7['hasCommentThread'](_0x29d93d))return;0x1===_0x3db1b7['getCommentThread'](_0x29d93d)['length']&&_0x5c6424['model']['enqueueChange']({'isUndoable':!0x1},_0x5c0b06=>{for(const _0x384020 of _0x482691)_0x5c0b06['updateMarker'](_0x384020,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3570a7);}['afterInit'](){!async function(_0xda17b1){const _0x51d3f4=_0xc040ce([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x48d403=0x73460ab3,_0xa4bda0=0x73418ddb^_0x48d403,_0x132efa=window[_0xc040ce([0x44,0x61,0x74,0x65])][_0xc040ce([0x6e,0x6f,0x77])](),_0x47ceec=_0xda17b1[_0xc040ce([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x42cb0a=new window[(_0xc040ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44bdaf=>{_0x47ceec[_0xc040ce([0x6f,0x6e,0x63,0x65])](_0xc040ce([0x72,0x65,0x61,0x64,0x79]),_0x44bdaf);}),_0x496c65={[_0xc040ce([0x6b,0x74,0x79])]:_0xc040ce([0x45,0x43]),[_0xc040ce([0x75,0x73,0x65])]:_0xc040ce([0x73,0x69,0x67]),[_0xc040ce([0x63,0x72,0x76])]:_0xc040ce([0x50,0x2d,0x32,0x35,0x36]),[_0xc040ce([0x78])]:_0xc040ce([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]),[_0xc040ce([0x79])]:_0xc040ce([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]),[_0xc040ce([0x61,0x6c,0x67])]:_0xc040ce([0x45,0x53,0x32,0x35,0x36])},_0x17b913=_0x47ceec[_0xc040ce([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xc040ce([0x67,0x65,0x74])](_0xc040ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1d8c81(){let _0x129164,_0x55905e=null,_0x4a90c9=null;try{if(_0x17b913==_0xc040ce([0x47,0x50,0x4c]))return _0xc040ce([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x129164=_0x40c7db(),!_0x129164)return _0xc040ce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x129164[_0xc040ce([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4a90c9=_0x226871(_0x129164[_0xc040ce([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x129164[_0xc040ce([0x6a,0x74,0x69])])),await _0x362660()?_0x1500da()?_0x2e3bdd()?_0xc040ce([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1d35f0()?(_0x129164[_0xc040ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xc040ce([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x55905e=_0x51bef2(_0xc040ce([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3b0ac2()):_0xc040ce([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xc040ce([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xc040ce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xc040ce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2e3bdd(){const _0x74b5e5=[_0xc040ce([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xc040ce([0x74,0x72,0x69,0x61,0x6c])][_0xc040ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x129164[_0xc040ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x132efa/0x3e8:0xe10*_0xa4bda0;return _0x129164[_0xc040ce([0x65,0x78,0x70])]<_0x74b5e5;}function _0x1500da(){const _0x22cf80=_0x129164[_0xc040ce([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x22cf80)return!0x1;if(_0x22cf80[_0xc040ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc040ce([0x2a])))return!0x0;if(_0x22cf80[_0xc040ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc040ce([0x43,0x4d,0x54])))return!0x0;if(_0x22cf80[_0xc040ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc040ce([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4d9627())return!0x0;if(_0x22cf80[_0xc040ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc040ce([0x52,0x43,0x4d,0x54]))){if(_0xda2c83())return!0x0;if(_0x2f575b()||_0x59ecc3())return!0x0;}return!0x1;}function _0x1d35f0(){const _0x4f0264=_0x129164[_0xc040ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4f0264||0x0==_0x4f0264[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5cb25a}=new URL(window[_0xc040ce([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4f0264[_0xc040ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5cb25a))return!0x0;const _0x5750fc=_0x5cb25a[_0xc040ce([0x73,0x70,0x6c,0x69,0x74])](_0xc040ce([0x2e]));return _0x4f0264[_0xc040ce([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4edf87=>_0x4edf87[_0xc040ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc040ce([0x2a])))[_0xc040ce([0x6d,0x61,0x70])](_0x4ac8fe=>_0x4ac8fe[_0xc040ce([0x73,0x70,0x6c,0x69,0x74])](_0xc040ce([0x2e])))[_0xc040ce([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xe464a7=>_0xe464a7[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5750fc[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xc040ce([0x6d,0x61,0x70])](_0x465e69=>Array(_0x5750fc[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x465e69[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xc040ce([0x66,0x69,0x6c,0x6c])](_0x465e69[0x0]===_0xc040ce([0x2a])?_0xc040ce([0x2a]):'')[_0xc040ce([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x465e69))[_0xc040ce([0x73,0x6f,0x6d,0x65])](_0x338a6f=>_0x5750fc[_0xc040ce([0x65,0x76,0x65,0x72,0x79])]((_0x3cce69,_0x4420d4)=>_0x338a6f[_0x4420d4]===_0x3cce69||_0x338a6f[_0x4420d4]===_0xc040ce([0x2a])));}function _0x3b0ac2(){return _0x55905e&&_0x4a90c9?new window[(_0xc040ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1fd5df,_0x7f5af8)=>{_0x55905e[_0xc040ce([0x74,0x68,0x65,0x6e])](_0x1fd5df,_0x7f5af8),_0x4a90c9[_0xc040ce([0x74,0x68,0x65,0x6e])](_0x51e029=>{_0x51e029!=_0xc040ce([0x56,0x61,0x6c,0x69,0x64])&&_0x1fd5df(_0x51e029);},_0x7f5af8);}):_0x55905e||_0x4a90c9||_0xc040ce([0x56,0x61,0x6c,0x69,0x64]);}}function _0x226871(_0x1552ed,_0x4081e3){return new window[(_0xc040ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4201c1=>{if(_0x2a745a())return _0x4201c1(_0xc040ce([0x56,0x61,0x6c,0x69,0x64]));_0x5f3d9f(),_0x47ceec[_0xc040ce([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xc040ce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1f9d4f=!0x1;const _0x58f6af=_0x5a6aba();function _0x2c9523(_0x2d4b5a){return!!_0x2d4b5a&&(typeof _0x2d4b5a===_0xc040ce([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2d4b5a===_0xc040ce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2d4b5a[_0xc040ce([0x74,0x68,0x65,0x6e])]===_0xc040ce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2d4b5a[_0xc040ce([0x63,0x61,0x74,0x63,0x68])]===_0xc040ce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4c6b97(_0x21040d){_0x4dc869(_0x21040d)[_0xc040ce([0x74,0x68,0x65,0x6e])](_0x26225b=>{if(!_0x26225b||_0x26225b[_0xc040ce([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xc040ce([0x6f,0x6b]))return _0xc040ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2c8a7d(_0x35bed3(_0x58f6af+_0x4081e3))!=_0x26225b[_0xc040ce([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xc040ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xc040ce([0x56,0x61,0x6c,0x69,0x64]);})[_0xc040ce([0x74,0x68,0x65,0x6e])](_0x3b090b=>(_0x425e29(),_0x3b090b),()=>{const _0x36cf91=_0x2e194e();return null==_0x36cf91?(_0x425e29(),_0xc040ce([0x56,0x61,0x6c,0x69,0x64])):_0xc040ce(_0x132efa-_0x36cf91>(0x574a8eb3^_0x48d403)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xc040ce([0x74,0x68,0x65,0x6e])](_0x4201c1)[_0xc040ce([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4201c1(_0xc040ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x359fe9=0x7370e433^_0x48d403;function _0x425e29(){const _0x3d0ff5=_0xc040ce([0x6c,0x6c,0x63,0x74,0x2d])+_0x2c8a7d(_0x35bed3(_0x1552ed)),_0x49412d=_0xb04423(_0x2c8a7d(window[_0xc040ce([0x4d,0x61,0x74,0x68])][_0xc040ce([0x63,0x65,0x69,0x6c])](_0x132efa/_0x359fe9)));window[_0xc040ce([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xc040ce([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d0ff5,_0x49412d);}function _0x2e194e(){const _0x121a35=_0xc040ce([0x6c,0x6c,0x63,0x74,0x2d])+_0x2c8a7d(_0x35bed3(_0x1552ed)),_0x325dbe=window[_0xc040ce([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xc040ce([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x121a35);return _0x325dbe?window[_0xc040ce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb04423(_0x325dbe),0x10)*_0x359fe9:null;}function _0x4dc869(_0x5647f9){return new window[(_0xc040ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x18fb39,_0x2f52)=>{_0x5647f9[_0xc040ce([0x74,0x68,0x65,0x6e])](_0x18fb39,_0x2f52),window[_0xc040ce([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2f52,0x7347de73^_0x48d403);});}}_0x47ceec[_0xc040ce([0x6f,0x6e])](_0xc040ce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xc48e4a,_0x2dce0c)=>{if(_0x2dce0c[0x0]!=_0x1552ed)return _0x4201c1(_0xc040ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2dce0c[0x1]={..._0x2dce0c[0x1],[_0xc040ce([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x58f6af};},{[_0xc040ce([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xc040ce([0x68,0x69,0x67,0x68])}),_0x47ceec[_0xc040ce([0x6f,0x6e])](_0xc040ce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xd0537f=>{_0x2c9523(_0xd0537f[_0xc040ce([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1f9d4f=!0x0,_0x4c6b97(_0xd0537f[_0xc040ce([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xc040ce([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xc040ce([0x6c,0x6f,0x77])}),_0x42cb0a[_0xc040ce([0x74,0x68,0x65,0x6e])](()=>{_0x1f9d4f||_0x4201c1(_0xc040ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2a745a(){return _0x47ceec[_0xc040ce([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xc040ce([0x76,0x69,0x65,0x77])][_0xc040ce([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xc040ce([0x61,0x75,0x74,0x6f]);}function _0x5f3d9f(){_0x47ceec[_0xc040ce([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xc040ce([0x76,0x69,0x65,0x77])][_0xc040ce([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xc040ce([0x61,0x75,0x74,0x6f]);}}function _0x51bef2(_0x28fe43){const _0x4ec847=[new window[(_0xc040ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e7f88=>setTimeout(_0x3e7f88,0x734f347f^_0x48d403)),_0x42cb0a[_0xc040ce([0x74,0x68,0x65,0x6e])](()=>new window[(_0xc040ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58311d=>{let _0x5a0af7=0x0;_0x47ceec[_0xc040ce([0x6d,0x6f,0x64,0x65,0x6c])][_0xc040ce([0x6f,0x6e])](_0xc040ce([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xc5ac18,_0x3f093a)=>{_0x3f093a[0x0][_0xc040ce([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5a0af7++,_0x5a0af7==(0x73460f5b^_0x48d403)&&(_0x58311d(),_0xc5ac18[_0xc040ce([0x6f,0x66,0x66])]());});}))];return window[_0xc040ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xc040ce([0x72,0x61,0x63,0x65])](_0x4ec847)[_0xc040ce([0x74,0x68,0x65,0x6e])](()=>_0x28fe43);}async function _0x49324f(){await _0x42cb0a,_0x47ceec[_0xc040ce([0x6d,0x6f,0x64,0x65,0x6c])][_0xc040ce([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16e7ef,_0x47ceec[_0xc040ce([0x6d,0x6f,0x64,0x65,0x6c])][_0xc040ce([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16e7ef,_0x47ceec[_0xc040ce([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xc040ce([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4d9627(){return window[_0xc040ce([0x67,0x6c,0x6f,0x62])]&&window[_0xc040ce([0x67,0x6c,0x6f,0x62])][_0xc040ce([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0xda2c83(){return _0x51d9fd(_0xc040ce([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x43bcff(_0xc040ce([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xc040ce([0x73,0x74,0x61,0x74,0x65])]==_0xc040ce([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2f575b(){return _0x51d9fd(_0xc040ce([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 _0x59ecc3(){return _0x51d9fd(_0xc040ce([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x411725(_0x505d70){const _0x3da860=_0x2d3bc2();_0x47ceec[_0x3da860]=_0xc040ce([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x505d70,_0x505d70!=_0xc040ce([0x56,0x61,0x6c,0x69,0x64])&&_0x49324f();}function _0x2d3bc2(){const _0x13a0d8=window[_0xc040ce([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xc040ce([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xc040ce([0x6e,0x6f,0x77])]())[_0xc040ce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xc040ce([0x2e]),'');let _0x5cb3f8=_0xc040ce([0x4b]);for(let _0x39df09=0x0;_0x39df09<_0x13a0d8[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x39df09+=0x2){let _0x561814=window[_0xc040ce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x13a0d8[_0xc040ce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x39df09,_0x39df09+0x2));_0x561814>=_0x51d3f4[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x561814-=_0x51d3f4[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5cb3f8+=_0x51d3f4[_0x561814];}return _0x5cb3f8;}function _0x40c7db(){const _0x4ea005=_0x17b913[_0xc040ce([0x73,0x70,0x6c,0x69,0x74])](_0xc040ce([0x2e]));if(0x3!=_0x4ea005[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x312868(_0x4ea005[0x1]);function _0x312868(_0x2679ef){const _0x4efba6=_0x5260a4(_0x2679ef);return _0x4efba6&&_0x3879a4()?_0x4efba6:null;function _0x3879a4(){const _0x1826f0=_0x4efba6[_0xc040ce([0x6a,0x74,0x69])],_0x268808=window[_0xc040ce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1826f0[_0xc040ce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1826f0[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2251a0={..._0x4efba6,[_0xc040ce([0x6a,0x74,0x69])]:_0x1826f0[_0xc040ce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1826f0[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2251a0[_0xc040ce([0x76,0x63])],_0x35bed3(_0x2251a0)==_0x268808;}}}async function _0x362660(){let _0x212e0a=!0x0;try{const _0x4625a6=_0x17b913[_0xc040ce([0x73,0x70,0x6c,0x69,0x74])](_0xc040ce([0x2e])),[_0x198f73,_0x14e804,_0x13e46f]=_0x4625a6;return _0x46f005(_0x198f73),await _0x57e440(_0x198f73,_0x14e804,_0x13e46f),_0x212e0a;}catch{return!0x1;}function _0x46f005(_0x390871){const _0x385a7a=_0x5260a4(_0x390871);_0x385a7a&&_0x385a7a[_0xc040ce([0x61,0x6c,0x67])]==_0xc040ce([0x45,0x53,0x32,0x35,0x36])||(_0x212e0a=!0x1);}async function _0x57e440(_0x490b0d,_0x37543b,_0x548e8b){const _0x3706d0=window[_0xc040ce([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xc040ce([0x66,0x72,0x6f,0x6d])](_0x5bb78c(_0x548e8b),_0x2a161b=>_0x2a161b[_0xc040ce([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x25ca4b=new window[(_0xc040ce([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xc040ce([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x490b0d+_0xc040ce([0x2e])+_0x37543b),_0x54c945=window[_0xc040ce([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xc040ce([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54c945)return;const _0xbfeb02=await _0x54c945[_0xc040ce([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xc040ce([0x6a,0x77,0x6b]),_0x496c65,{[_0xc040ce([0x6e,0x61,0x6d,0x65])]:_0xc040ce([0x45,0x43,0x44,0x53,0x41]),[_0xc040ce([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xc040ce([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xc040ce([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54c945[_0xc040ce([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xc040ce([0x6e,0x61,0x6d,0x65])]:_0xc040ce([0x45,0x43,0x44,0x53,0x41]),[_0xc040ce([0x68,0x61,0x73,0x68])]:{[_0xc040ce([0x6e,0x61,0x6d,0x65])]:_0xc040ce([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xbfeb02,_0x3706d0,_0x25ca4b)||(_0x212e0a=!0x1);}}function _0x5260a4(_0xb897b9){return _0xb897b9[_0xc040ce([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xc040ce([0x65,0x79]))?JSON[_0xc040ce([0x70,0x61,0x72,0x73,0x65])](_0x5bb78c(_0xb897b9)):null;}function _0x5bb78c(_0x501177){return window[_0xc040ce([0x61,0x74,0x6f,0x62])](_0x501177[_0xc040ce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xc040ce([0x2b]))[_0xc040ce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xc040ce([0x2f])));}function _0x35bed3(_0x2a5488){let _0x22062a=0x1505;function _0x4be5ca(_0x402e04){for(let _0x41e6a4=0x0;_0x41e6a4<_0x402e04[_0xc040ce([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x41e6a4++){const _0x2ab492=_0x402e04[_0xc040ce([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x41e6a4);_0x22062a=(_0x22062a<<0x5)+_0x22062a+_0x2ab492,_0x22062a&=_0x22062a;}}function _0x4a8f21(_0x5bedeb){Array[_0xc040ce([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5bedeb)?_0x5bedeb[_0xc040ce([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4a8f21):_0x5bedeb&&typeof _0x5bedeb==_0xc040ce([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xc040ce([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5bedeb)[_0xc040ce([0x73,0x6f,0x72,0x74])]()[_0xc040ce([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x8ae354,_0x3cad5c])=>{_0x4be5ca(_0x8ae354),_0x4a8f21(_0x3cad5c);}):_0x4be5ca(window[_0xc040ce([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5bedeb));}return _0x4a8f21(_0x2a5488),_0x22062a>>>0x0;}function _0x2c8a7d(_0x473dcd){return _0x473dcd[_0xc040ce([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xc040ce([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xc040ce([0x30]));}function _0xb04423(_0x40c781){return _0x40c781[_0xc040ce([0x73,0x70,0x6c,0x69,0x74])]('')[_0xc040ce([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xc040ce([0x6a,0x6f,0x69,0x6e])]('');}function _0x51d9fd(_0x444c31){return _0x47ceec[_0xc040ce([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xc040ce([0x68,0x61,0x73])](_0x444c31);}function _0x43bcff(_0x5511ac){return _0x47ceec[_0xc040ce([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xc040ce([0x67,0x65,0x74])](_0x5511ac);}function _0x16e7ef(){}function _0xc040ce(_0x7bf177){return _0x7bf177['map'](_0x32b4b2=>String['fromCharCode'](_0x32b4b2))['join']('');}_0x411725(await _0x1d8c81());}(this);}['destroy'](){const _0x5a367e=this['editor']['plugins']['get'](o),_0x45a347=this['editor']['config']['get']('collaboration.channelId');for(const _0x31cc3b of _0x5a367e['getCommentThreads']({'channelId':_0x45a347}))_0x5a367e['_detachCommentThread'](_0x31cc3b['id']),_0x5a367e['_threads']['delete'](_0x31cc3b['id']);super['destroy']();}['hasMarkerForId'](_0x581cd0){return this['getAllMarkersForId'](_0x581cd0)['length']>0x0;}['getAllMarkersForId'](_0x3b2080){const _0x1fa2a9=[];for(const _0x8e5b1f of this['editor']['model']['markers'])_0x8e5b1f['name']['startsWith']('comment:'+_0x3b2080)&&_0x1fa2a9['push'](_0x8e5b1f);return _0x1fa2a9;}['scrollToThreadMarker'](_0x124659){setTimeout(()=>{const _0x1f0719=this['_getTargetForId'](_0x124659);if(!_0x1f0719)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x124659&&nt({'target':_0x1f0719[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x35f566){this['editor']['model']['change'](()=>{for(const _0x2ec033 of this['getAllMarkersForId'](_0x35f566))this['editor']['editing']['reconvertMarker'](_0x2ec033);});}['_attachArchivedThread'](_0x3139cf){const _0x2008db=this['editor']['plugins']['get'](o),_0x42ae64=this['editor']['plugins']['get'](b),_0x12dc6f=_0x2008db['getCommentThread'](_0x3139cf);if(!_0x12dc6f['isAttached']){const _0x37ea50=_0x12dc6f['attachTo'](()=>this['_getTargetForId'](_0x12dc6f['id']));_0x42ae64['registerAnnotation'](_0x37ea50),_0x12dc6f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1449b7=this['editor'],_0x34049b=_0x1449b7['plugins']['get'](it);_0x1449b7['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3b8067,_0x395ec0)=>{const {id:_0x5b87c5}=ft(_0x3b8067['markerName']),_0x26b6dc=_0x1449b7['plugins']['get'](o)['getCommentThread'](_0x5b87c5),_0x33efd2=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5b87c5;let _0x346678;if(_0x26b6dc&&_0x26b6dc['isResolved']&&!_0x33efd2&&_0x3b8067['item'])return _0x395ec0['consumable']['consume'](_0x3b8067['item'],'addMarker:'+_0x3b8067['markerName']),_0x395ec0['consumable']['consume'](_0x3b8067['item'],'removeMarker:'+_0x3b8067['markerName']),null;const _0xeb48d7=['ck-comment-marker'];return _0x33efd2&&_0xeb48d7['push']('ck-comment-marker--active'),_0x346678=_0x26b6dc?.['length']?_0x26b6dc['comments']['first']['author']['id']:_0x34049b['me']['id'],{'classes':_0xeb48d7,'attributes':{'data-comment':_0x5b87c5,'data-author-id':_0x346678}};}}),_0x1449b7['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xd98039,{options:_0xecd1a7})=>{if(_0xecd1a7['showCommentHighlights'])return null;const _0x2c7d76=_0x1449b7['plugins']['get'](o),_0x3ff684=_0x1449b7['model']['markers']['get'](_0xd98039),{id:_0x2df604,part:_0x45020f}=ft(_0xd98039);return _0x3ff684&&!_0x3ff684['affectsData']||_0xecd1a7['ignoreResolvedComments']&&_0x2c7d76['getCommentThread'](_0x2df604)?.['isResolved']?null:{'group':'comment','name':_0x45020f?_0x2df604+':'+_0x45020f:_0x2df604};}}),_0x1449b7['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x67585,{writer:_0x563661})=>_0x563661['createElement']('$marker',{'data-name':'comment:'+_0x67585['getAttribute']('id')})}),_0x1449b7['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1422de=this['editor'],_0xd10a14=_0x1422de['plugins']['get'](o),_0xdcb641=new Set(),_0x4c1687=new Set();_0x1422de['model']['document']['registerPostFixer'](_0xfa22fa=>{let _0x373d5c=!0x1;for(const {name:_0x226f57,data:_0x2538dc}of _0x1422de['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4cb7b9,id:_0x41a128}=ft(_0x226f57);let _0xb51829=_0x2538dc['newRange'];if('comment'!==_0x4cb7b9||!_0xb51829)continue;const _0x29e87d='$graveyard'===_0xb51829['root']['rootName'];_0x29e87d||(_0xb51829=ht(_0xb51829,_0x1422de['model']),!_0xb51829||_0xb51829['isCollapsed']||!_0x2538dc['newRange']||_0xb51829['isEqual'](_0x2538dc['newRange']))?_0x1422de['model']['hasContent'](_0xb51829)&&!_0x29e87d?this['isThreadsLoadingPaused']?_0xdcb641['add'](_0x226f57):this['_handleThreadMarker'](_0x226f57,_0x41a128):(_0x4c1687['add'](_0x226f57),_0xdcb641['delete'](_0x226f57),_0xfa22fa['removeMarker'](_0x226f57),_0x373d5c=!0x0):(_0xfa22fa['updateMarker'](_0x226f57,{'range':_0xb51829}),_0x373d5c=!0x0);}return _0x373d5c;}),this['on']('change:isThreadsLoadingPaused',(_0x4485fe,_0x421f56,_0x5ed962)=>{if(!_0x5ed962&&_0xdcb641['size'])for(const _0x4fb1a5 of _0xdcb641){const {id:_0x3f2a58}=ft(_0x4fb1a5);_0xdcb641['delete'](_0x4fb1a5),_0x1422de['model']['markers']['get'](_0x4fb1a5)&&this['_handleThreadMarker'](_0x4fb1a5,_0x3f2a58);}}),this['listenTo'](_0x1422de['model']['document'],'change',()=>{for(const {name:_0x2f6d4e,data:{newRange:_0x3a54bc}}of _0x1422de['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1b965d,id:_0x26d301}=ft(_0x2f6d4e);if('comment'!==_0x1b965d)continue;const _0x20482b=_0xd10a14['getCommentThread'](_0x26d301),_0x3a0e6f=this['hasMarkerForId'](_0x26d301);_0x20482b&&(!_0x20482b['_hasTargetInContent']&&_0x3a54bc&&_0x1422de['editing']['view']['once']('render',()=>{const _0x1a81ff=_0x1422de['plugins']['get'](y),_0x14bfdf=_0xd10a14['_threadToController']['get'](_0x20482b)['view'];_0x1a81ff['getByInnerView'](_0x14bfdf)['refreshVisibility']();},{'priority':'low'}),_0x20482b['_hasTargetInContent']=_0x3a0e6f||!!_0x3a54bc),_0x3a54bc||(_0x4c1687['add'](_0x2f6d4e),_0xdcb641['delete'](_0x2f6d4e));}for(const _0x2ab370 of _0x4c1687){const {id:_0x307344}=ft(_0x2ab370),_0x1f7fc5=_0xd10a14['getCommentThread'](_0x307344);if(_0xdcb641['delete'](_0x2ab370),!_0x1f7fc5)continue;const _0x4c729c=this['hasMarkerForId'](_0x307344);_0x4c729c||_0x1f7fc5['isSubmitted']?_0x4c729c||_0x1f7fc5['unlinkedAt']||_0x1f7fc5['setUnlinkedAt'](new Date()):_0x1f7fc5['remove']();}_0x4c1687['clear']();});}['_handleInitialThreads'](_0x3b9cb6){_0x3b9cb6['forEach'](_0x1428c9=>{_0x1428c9['unlinkedAt']&&this['_attachArchivedThread'](_0x1428c9['id']);});}['_getTargetForId'](_0x34d6fd){const _0x5079aa=this['editor'],_0x477b70=this['getAllMarkersForId'](_0x34d6fd);return et(_0x5079aa['editing'],_0x477b70);}['_getTextContext'](_0xdca21c){const _0x3dac2a=this['getAllMarkersForId'](_0xdca21c);let _0x38ed33='',_0x1f5d8f=!0x1;for(const _0x38eb8c of _0x3dac2a){const _0x2cd734=_0x38eb8c['getRange']();for(const _0x26e2d5 of Array['from'](_0x2cd734['getItems']()))_0x26e2d5['is']('$textProxy')?(_0x38ed33&&_0x1f5d8f&&(_0x38ed33+='\x20',_0x1f5d8f=!0x1),_0x38ed33+=_0x26e2d5['data']):_0x1f5d8f=!0x0;_0x1f5d8f=!0x0;}return _0x38ed33['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x79df46,_0x552be4){const _0x2caa6a=this['editor'],_0x246db2=_0x2caa6a['plugins']['get'](o);let _0x1f0df3=_0x246db2['getCommentThread'](_0x552be4);const _0x3b429f=_0x2caa6a['config']['get']('collaboration.channelId'),_0x50f13c=_0x2caa6a['plugins']['get'](b);if(_0x1f0df3&&(_0x1f0df3['unlinkedAt']&&_0x1f0df3['setUnlinkedAt'](null),_0x1f0df3['isAttached']))return _0x1f0df3;return!this['getAllMarkersForId'](_0x552be4)[0x0]['managedUsingOperations']?_0x2caa6a['editing']['view']['once']('render',()=>{if(_0x246db2['getCommentThread'](_0x552be4))return;const _0x1db237=_0x2caa6a['plugins']['get'](y);_0x1f0df3=_0x246db2['openNewCommentThread']({'channelId':_0x3b429f,'threadId':_0x552be4,'target':()=>this['_getTargetForId'](_0x552be4),'context':{'type':'text','value':this['_getTextContext'](_0x552be4)}});const _0x5991ac=_0x246db2['_threadToController']['get'](_0x1f0df3)['view'],_0x33ae05=_0x1db237['getByInnerView'](_0x5991ac);_0x33ae05&&_0x50f13c['registerAnnotation'](_0x33ae05);},{'priority':'low'}):_0x246db2['fetchCommentThread']({'channelId':_0x3b429f,'threadId':_0x552be4})['then'](_0x397edd=>{if('destroyed'!==_0x2caa6a['state']){if(_0x1f0df3=_0x397edd,_0x1f0df3&&!_0x1f0df3['isAttached']){const _0x3257c1=_0x1f0df3['attachTo'](()=>this['_getTargetForId'](_0x552be4));_0x50f13c['registerAnnotation'](_0x3257c1),_0x1f0df3['isResolved']&&this['_reconvertMarkers'](_0x552be4);}else{if(!_0x1f0df3){const _0x12b338=this['getAllMarkersForId'](_0x552be4);_0x2caa6a['model']['change'](_0x3456c1=>{for(const _0x2fa574 of _0x12b338)_0x3456c1['removeMarker'](_0x2fa574);});}}}}),_0x1f0df3;}['_handleThreadMarker'](_0x242dc1,_0x3f5390){const _0x2fbb60=this['_attachMarkerToThread'](_0x242dc1,_0x3f5390);_0x2fbb60&&!_0x2fbb60['context']&&_0x2fbb60['setContext']({'type':'text','value':this['_getTextContext'](_0x3f5390)});}['_initAriaMarkerChangeAnnouncements'](){const _0x55c3a2=this['editor'];rt(_0x55c3a2['model'],({left:_0x495781,entered:_0x1e1996})=>{for(const _0xe802e3 of _0x495781)if(mt(_0xe802e3)){_0x55c3a2['ui']['ariaLiveAnnouncer']['announce'](N(_0x55c3a2['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4090ee of _0x1e1996)if(mt(_0x4090ee)){_0x55c3a2['ui']['ariaLiveAnnouncer']['announce'](N(_0x55c3a2['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x59435a)));break;}});}}function dt(_0x38219a,_0x46ef2d){return _0x46ef2d?_0x38219a+':'+_0x46ef2d:_0x38219a;}function ht(_0x27a894,_0x15d469){const _0x3525ab=_0x15d469['schema'],_0x563ed3=_0x15d469['createRange'](_0x27a894['start']);for(const _0x337c59 of _0x27a894['getWalker']()){const {type:_0x374586,item:_0x14f349,nextPosition:_0x2d98c0}=_0x337c59;if('text'===_0x374586||_0x3525ab['isObject'](_0x14f349)){const _0x1dc7b8=_0x15d469['createPositionBefore'](_0x14f349);_0x563ed3['isCollapsed']&&(_0x563ed3['start']=_0x1dc7b8),_0x563ed3['end']=_0x2d98c0;}}return _0x563ed3;}function mt(_0x58151d){return'comment'===ft(_0x58151d['name'])['group'];}class s extends _0x42a4ab{['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 _0x623924=this['editor'],_0x15e85a=_0x623924['plugins']['get'](o),_0x206a2e=_0x623924['plugins']['get'](r),_0x213036=_0x623924['plugins']['get'](y),_0x46a4ad=_0x623924['plugins']['get'](b);_0x623924['ui']['componentFactory']['add']('comment',()=>{const _0x13b3ba=this['_createUIButton'](_0x3f1bfd);return _0x13b3ba['tooltip']=!0x0,_0x13b3ba;}),_0x623924['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2ed0c5)),_0x46a4ad['addSourceCollector'](()=>{const _0x50f051=[];for(const [_0x1d1eca,_0x8979ad]of _0x15e85a['_threadToController']){const _0x180973=_0x206a2e['getAllMarkersForId'](_0x1d1eca['id']),_0x465b5b=_0x180973['map'](_0x433142=>_0x433142['getRange']());_0x180973['length']>0x0&&_0x50f051['push']([_0x8979ad['view'],_0x465b5b]);}return _0x50f051;}),this['listenTo'](_0x213036,'change:activeAnnotations',(_0x186160,_0x2ace78,_0x36a158)=>{const _0x140704=Array['from'](_0x36a158)['map'](_0x563af3=>_0x563af3['innerView'])['find'](_0x5c6b10=>_0x15e85a['_viewToController']['has'](_0x5c6b10));if(!_0x140704)return void(_0x206a2e['activeMarker']=null);const _0x3dedde=_0x15e85a['_viewToController']['get'](_0x140704)['model']['id'],_0x45b007='comment:'+_0x3dedde;_0x3dedde&&_0x206a2e['hasMarkerForId'](_0x3dedde)?_0x206a2e['activeMarker']=_0x45b007:_0x206a2e['activeMarker']&&(_0x206a2e['activeMarker']=null);}),this['listenTo'](_0x15e85a,'removeCommentThread',(_0x12a5a7,{threadId:_0x3993d5,isFromAdapter:_0x5ca701})=>{!_0x5ca701&&_0x623924['ui']['focusTracker']['isFocused']&&_0x206a2e['hasMarkerForId'](_0x3993d5)&&_0x623924['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x15e85a,'addComment',(_0x22b806,{threadId:_0x5d234f,isFromAdapter:_0x3ff18f})=>{if(_0x3ff18f||!_0x206a2e['hasMarkerForId'](_0x5d234f)||!_0x15e85a['hasCommentThread'](_0x5d234f))return;0x1===_0x15e85a['getCommentThread'](_0x5d234f)['length']&&(_0x623924['editing']['view']['focus'](),_0x22b806['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x130525=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x20946d;for(const _0x240361 in _0x130525){const _0x387af5=_0x240361,_0x30d8dd=_0x130525[_0x387af5];if('commentsLicenseKeyValid'==_0x30d8dd||'commentsLicenseKeyInvalid'==_0x30d8dd||'commentsLicenseKeyExpired'==_0x30d8dd||'commentsLicenseKeyDomainLimit'==_0x30d8dd||'commentsLicenseKeyNotAllowed'==_0x30d8dd||'commentsLicenseKeyEvaluationLimit'==_0x30d8dd||'commentsLicenseKeyUsageLimit'==_0x30d8dd){delete _0x130525[_0x387af5],_0x20946d=_0x30d8dd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x20946d&&_0x130525['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x20946d&&_0x130525['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x20946d&&_0x130525['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x20946d&&_0x130525['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x20946d&&_0x130525['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x20946d&&_0x130525['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x26b48c){const _0x4492ef=this['editor'],_0x2c18e4=new _0x26b48c(_0x4492ef['locale']),_0x669c7e=_0x4492ef['commands']['get']('addCommentThread');return _0x2c18e4['set']({'label':N(_0x4492ef['locale'],'Comment'),'icon':_0x475110}),_0x2c18e4['bind']('isEnabled')['to'](_0x669c7e,'isEnabled',_0x669c7e,'hasContent',(_0x16d70f,_0x158082)=>_0x16d70f&&_0x158082),this['listenTo'](_0x2c18e4,'execute',()=>{_0x669c7e['execute']();}),_0x2c18e4;}}class i extends _0x42a4ab{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0xac95c3){super(_0xac95c3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x309610,_0x2b6d34,_0x2e2fba)=>{_0x2e2fba?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x564596,_0x5aa07e]of this['editor']['commands'])_0x5aa07e['affectsData']&&'addCommentThread'!==_0x564596&&_0x5aa07e['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x176c14=this['editor']['editing']['view']['document'];this['listenTo'](_0x176c14,'cut',_0x395aa4=>_0x395aa4['stop'](),{'priority':'highest'}),this['listenTo'](_0x176c14,'clipboardInput',_0x5a59f2=>_0x5a59f2['stop'](),{'priority':'highest'}),this['listenTo'](_0x176c14,'delete',_0x94ea3d=>_0x94ea3d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x34bb94,_0xcd898d]of this['editor']['commands'])_0xcd898d['affectsData']&&'addCommentThread'!==_0x34bb94&&_0xcd898d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x41a1e4{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x57e643){super(_0x57e643),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x56301d=this['context']['plugins']['get'](y);this['listenTo'](_0x56301d,'_activateAnnotation',(_0x180311,_0x1d47d8)=>{for(const _0x2eddd7 of this['activeUIs']){const _0x32b398=this['_uis']['get'](_0x2eddd7);(0x0,this['uisData']['get'](_0x2eddd7)['filter'])(_0x1d47d8)&&_0x32b398['setActiveAnnotation'](_0x1d47d8);}}),this['listenTo'](_0x56301d,'_deactivateAllAnnotations',()=>{for(const _0x5d4dc7 of this['activeUIs']){this['_uis']['get'](_0x5d4dc7)['setActiveAnnotation'](null);}}),this['listenTo'](_0x56301d['_visibleAnnotations'],'add',(_0x2cd778,_0x2148a9)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2148a9);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1fc02f){return this['activeUIs']['has'](_0x1fc02f);}['activate'](_0x3faa8f,_0x1c3707=this['defaultFilter']){const _0x21fee6=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x3faa8f))throw new _0x288e46('annotationsuis-missing-ui',this,{'uiName':_0x3faa8f});this['isActive'](_0x3faa8f)&&this['deactivate'](_0x3faa8f),this['activeUIs']['add'](_0x3faa8f);const _0xba9818=new S();v({'source':_0x21fee6['_visibleAnnotations'],'target':_0xba9818,'filter':_0x1c3707}),this['uisData']['set'](_0x3faa8f,{'collection':_0xba9818,'filter':_0x1c3707});const _0x32b3d5=this['_uis']['get'](_0x3faa8f);_0x32b3d5['attach'](_0xba9818),this['listenTo'](_0x32b3d5,'change:activeAnnotation',(_0x21f9d1,_0x440da6,_0x5ad2ae,_0x29681b)=>{_0x29681b&&_0x21fee6['_removeActiveAnnotation'](_0x29681b),_0x5ad2ae&&_0x21fee6['_addActiveAnnotation'](_0x5ad2ae);});}['deactivate'](_0x2cebb8){if(this['activeUIs']['delete'](_0x2cebb8),!this['_uis']['has'](_0x2cebb8))throw new _0x288e46('annotationsuis-missing-ui',this,{'uiName':_0x2cebb8});const _0x10564e=this['_uis']['get'](_0x2cebb8);_0x10564e['detach'](),this['stopListening'](_0x10564e),this['uisData']['get'](_0x2cebb8)['collection']['destroy'](),this['uisData']['delete'](_0x2cebb8);}['switchTo'](_0x3ca528){if(!this['_uis']['has'](_0x3ca528))throw new _0x288e46('annotationsuis-missing-ui',this,{'uiName':_0x3ca528});const _0x3a7284=this['context']['plugins']['get'](y),_0x3bd057=Array['from'](_0x3a7284['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3ca528);const _0x40c703=this['_uis']['get'](_0x3ca528);_0x40c703['setActiveAnnotation'](_0x3bd057),_0x40c703['_setSelectedAnnotations']&&_0x3bd057&&_0x40c703['_setSelectedAnnotations']([_0x3bd057]);}['deactivateAll'](){for(const _0x7c6324 of this['activeUIs'])this['deactivate'](_0x7c6324);}['register'](_0x1677fb,_0xbc6396){if(this['_uis']['has'](_0x1677fb))throw new _0x288e46('annotationsuis-register-already-registered');if('function'!=typeof _0xbc6396['attach']||'function'!=typeof _0xbc6396['detach']||'function'!=typeof _0xbc6396['setActiveAnnotation'])throw new _0x288e46('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1677fb,_0xbc6396);}['refilterAnnotations'](){const _0x4df483=this['context']['plugins']['get'](y)['collection'],_0x35795b=new Map(),_0x1b62ad=Array['from'](this['activeUIs']);for(const _0x53ddd9 of this['activeUIs']){const _0x598957=this['uisData']['get'](_0x53ddd9)['collection'];for(const _0x3399a1 of _0x598957)_0x35795b['set'](_0x3399a1,_0x53ddd9);}for(const _0x1ed7d3 of _0x4df483){const _0x55a409=_0x35795b['get'](_0x1ed7d3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1ed7d3);const _0x25e35a=_0x1b62ad['find'](_0x2dc294=>this['uisData']['get'](_0x2dc294)['filter'](_0x1ed7d3));_0x55a409!==_0x25e35a&&(_0x55a409&&this['uisData']['get'](_0x55a409)['collection']['remove'](_0x1ed7d3),_0x25e35a&&this['uisData']['get'](_0x25e35a)['collection']['add'](_0x1ed7d3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x223ca9){const _0x4d5952=[];for(const _0x5adfe3 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5adfe3)['filter'])(_0x223ca9)&&_0x4d5952['push'](_0x5adfe3);}if(_0x4d5952['length']>0x1)throw new _0x288e46('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4d5952,'annotationType':_0x223ca9['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(_0x1ea00c){super(_0x1ea00c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x30cc7b,_0x2b66a2)=>_0x30cc7b+_0x2b66a2),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x404881=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x404881['to']('isAnimationDisabled',_0x346903=>_0x346903?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x404881['to']('top',_0x3e3663=>Ot(_0x3e3663))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x37afe4=this['element']['clientHeight'];_0x37afe4&&(this['height']=_0x37afe4);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x41a1e4{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x37ab14){super(_0x37ab14),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 _0x1f454d=this['context']['config']['get']('sidebar.container');_0x1f454d&&this['setContainer'](_0x1f454d);}['setContainer'](_0x592189){if(!g(_0x592189))throw new _0x288e46('sidebar-setcontainer-invalid-element');this['container']=_0x592189;}['_attachToContainer']({viewClass:_0x3a6c27='',spaceBetweenItems:_0x33f838=0x19}={}){if(!g(this['container']))throw new _0x288e46('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3a6c27,this['_spaceBetweenItems']=_0x33f838;}['rearrange']({removedAnnotation:_0x5ec759,previousAnnotation:_0x1611d2,nextAnnotation:_0x1aceff}){const _0x4e8eaf=this['getSidebarItemView'](_0x5ec759);this['view']['list']['remove'](_0x4e8eaf),this['_destroySidebarItemView'](_0x5ec759),_0x1611d2&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1611d2)),_0x1aceff&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1aceff)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x21210a,activatedAnnotation:_0x15734e,disableAnimationOnActivatedAnnotation:_0x3cb484}){if(this['_activeAnnotation']=_0x15734e,_0x21210a){_0x21210a['isActive']=!0x1;const _0x1254fc=this['getSidebarItemView'](_0x21210a);_0x1254fc&&_0x3cb484&&(_0x1254fc['isAnimationDisabled']=!0x1);}if(_0x15734e){const _0x554d01=this['getSidebarItemView'](_0x15734e);_0x554d01&&(_0x15734e['isActive']=!0x0,_0x3cb484&&(_0x554d01['isAnimationDisabled']=!0x0,_0x554d01['top']+=0x1),this['_alignToTargetRect'](_0x554d01));}}['_detachFromContainer'](_0x22802b){if(this['view']['element']['remove'](),_0x22802b){for(const _0x5eee72 of _0x22802b)this['_destroySidebarItemView'](_0x5eee72);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x58749b,_0x4e3878){_0x4e3878||(_0x4e3878=_0x58749b['view']);const _0x5b161f=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5b161f,_0x58749b),this['_annotationToSidebarItemView']['set'](_0x58749b,_0x5b161f),_0x5b161f['content']['add'](_0x4e3878),this['listenTo'](_0x58749b['view'],'change:targetRect',(_0x283f98,_0x5e2b2f,_0xed2028)=>{const _0x41d1e8=this['_getTargetTop'](_0x58749b,_0xed2028);_0x5b161f['_targetTop']!=_0x41d1e8&&(_0x5b161f['_targetTop']=_0x41d1e8,this['_setItemTop'](_0x5b161f,_0x41d1e8));}),this['listenTo'](_0x5b161f,'change:top',()=>{this['_recalculate'](_0x5b161f,'top');}),this['listenTo'](_0x5b161f,'change:bottom',()=>{this['_recalculate'](_0x5b161f,'bottom');}),this['_alignToTargetRect'](_0x5b161f);const _0x2be42c=this['_getItemBefore'](_0x5b161f);if(_0x2be42c)this['_alignAfterItem'](_0x2be42c,_0x5b161f)||this['_alignToTargetRect'](_0x5b161f);else this['_alignToTargetRect'](_0x5b161f);return this['_updateLastItem'](),this['view']['list']['add'](_0x5b161f),_0x5b161f;}['_alignForTopChange'](_0x1ff478){if(!_0x1ff478['content']['length'])return;const _0x5e718a=this['_getItemBefore'](_0x1ff478);if(!_0x5e718a)return;const _0xa15746=this['_sidebarItemViewToAnnotation']['get'](_0x5e718a),_0x5c862f=this['_activeAnnotation'];_0x5c862f&&_0x5c862f===_0xa15746?this['_alignAfterItem'](_0x5e718a,_0x1ff478):this['_alignBeforeItem'](_0x1ff478,_0x5e718a);}['_alignForBottomChange'](_0x598d01){if(!_0x598d01['content']['length'])return;const _0x49ba9f=this['_getItemAfter'](_0x598d01);if(!_0x49ba9f)return;const _0x28fdc9=this['_sidebarItemViewToAnnotation']['get'](_0x49ba9f),_0xd1fbf7=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xa16a13=this['_activeAnnotation'];_0xa16a13&&_0xa16a13===_0x28fdc9&&_0xd1fbf7?(this['_alignBeforeItem'](_0x49ba9f,_0x598d01),this['_alignAfterItem'](_0x598d01,_0x49ba9f)):_0xa16a13&&_0xa16a13===_0x28fdc9?this['_alignBeforeItem'](_0x49ba9f,_0x598d01):this['_alignAfterItem'](_0x598d01,_0x49ba9f);}['_recalculate'](_0x39711d,_0x5cd593){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xa68378,changedProp:_0x6b2fd1}of this['_recalculateBuffer'])'top'===_0x6b2fd1?this['_alignForTopChange'](_0xa68378):this['_alignForBottomChange'](_0xa68378);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x39711d,'changedProp':_0x5cd593});}['getSidebarItemView'](_0x1ca2aa){return this['_annotationToSidebarItemView']['get'](_0x1ca2aa);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x154596){const _0xad3fb1=this['getSidebarItemView'](_0x154596);this['stopListening'](_0xad3fb1),this['stopListening'](_0x154596['view']),_0xad3fb1['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x154596),this['_sidebarItemViewToAnnotation']['delete'](_0xad3fb1);}['_createSidebarView'](){const _0x4db349=new H(this['context']['locale']);return _0x4db349['render'](),this['on']('change:_lastItem',(_0x301590,_0x3b8b63,_0x5e13bd,_0x549e23)=>{_0x549e23&&_0x4db349['unbind']('minHeight'),_0x5e13bd?_0x4db349['bind']('minHeight')['to'](_0x5e13bd,'bottom'):_0x4db349['minHeight']=null;}),_0x4db349;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x18223c){const _0x36ed47=this['_sidebarItemViewToAnnotation']['get'](_0x18223c),_0x5d5a87=_0x36ed47&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x36ed47)-0x1);return _0x5d5a87&&this['getSidebarItemView'](_0x5d5a87)||null;}['_getItemAfter'](_0x58978d){const _0x4b119d=this['_sidebarItemViewToAnnotation']['get'](_0x58978d),_0x23f312=_0x4b119d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4b119d)+0x1);return _0x23f312&&this['getSidebarItemView'](_0x23f312)||null;}['_alignBeforeItem'](_0x466f14,_0x5ea241){_0x466f14['updateHeight']();const _0x5f4007=G(_0x5ea241['bottom']+this['_spaceBetweenItems'],_0x466f14['top']);return!!_0x5f4007&&(this['_setItemTop'](_0x5ea241,_0x5ea241['top']-_0x5f4007),!0x0);}['_alignAfterItem'](_0xbcc1cb,_0x3c1426){_0xbcc1cb['updateHeight']();const _0x44942b=G(_0xbcc1cb['bottom']+this['_spaceBetweenItems'],_0x3c1426['top']);return!!_0x44942b&&(this['_setItemTop'](_0x3c1426,_0x3c1426['top']+_0x44942b,!0x1),!0x0);}['_alignToTargetRect'](_0x329de4){const _0x1bb00c=this['_sidebarItemViewToAnnotation']['get'](_0x329de4);if(!_0x1bb00c||!_0x1bb00c['target']||!_0x1bb00c['targetRect'])return;const _0x1ef0f9=this['_getTargetTop'](_0x1bb00c,_0x1bb00c['targetRect']);this['_setItemTop'](_0x329de4,_0x1ef0f9);}['_getTargetTop'](_0x2fe99d,_0x42d185){if(null===_0x42d185)return 0x0;if(_0x2fe99d['target']instanceof _0xb25606)return _0x42d185['top'];{const _0x385f3d=new _0xb25606(this['view']['element'])['top'];return _0x42d185['top']-_0x385f3d;}}['_setItemTop'](_0x29c842,_0x387052,_0x5cba3d=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5cba3d&&(_0x387052=Math['max'](_0x387052,this['_getMaxAvailableTop'](_0x29c842))),_0x29c842['top']=_0x387052;}['_getMaxAvailableTop'](_0x52f039){let _0x4ac339=this['_getItemBefore'](_0x52f039),_0x34b09e=0x0;for(;_0x4ac339;)_0x4ac339['updateHeight'](),_0x34b09e+=this['_spaceBetweenItems']+_0x4ac339['height'],_0x4ac339=this['_getItemBefore'](_0x4ac339);return _0x34b09e;}}function G(_0x31cecd,_0x1a2255){return Math['max'](_0x31cecd-_0x1a2255,0x0);}function g(_0x58dd89){return null!==_0x58dd89&&'object'==typeof _0x58dd89&&0x1===_0x58dd89['nodeType'];}class e extends _0x41a1e4{['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(_0x547a48){super(_0x547a48),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x337452(),this['_refreshPositioningDebounced']=_0x1011d4(()=>{_0x547a48['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5efe1d=this['context']['plugins']['get'](j),_0x4d4e80=this['context']['plugins']['get'](z);_0x5efe1d['register']('wideSidebar',this),_0x4d4e80['container']&&_0x5efe1d['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3fd64d){if(_0x3fd64d===this['activeAnnotation'])return;const _0x15c151=this['context']['plugins']['get'](z);_0x15c151['_activeAnnotation']=_0x3fd64d;const _0x2e9f4b=this['activeAnnotation'];_0x15c151['refresh']({'blurredAnnotation':_0x2e9f4b,'activatedAnnotation':_0x3fd64d}),this['activeAnnotation']=_0x3fd64d;}['attach'](_0x5f60be){this['annotations']=_0x5f60be;const _0xbbbd2f=this['context']['plugins']['get'](z);if(_0xbbbd2f['_annotations']=_0x5f60be,this['isAttached'])throw new _0x288e46('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xbbbd2f,'set:container',()=>{this['detach'](),this['listenTo'](_0xbbbd2f,'change:container',_0x5b3d6e=>{_0x5b3d6e['off'](),this['attach'](_0x5f60be);});}),_0xbbbd2f['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x40cf2a=_0x490e3e=>{_0x490e3e['updateTargetRect'](),_0xbbbd2f['addAnnotation'](_0x490e3e);};for(const _0x466784 of _0x5f60be)_0x40cf2a(_0x466784);this['listenTo'](_0x5f60be,'add',(_0x56d43a,_0x5880f2)=>{_0x40cf2a(_0x5880f2);}),this['listenTo'](_0x5f60be,'remove',(_0x4e62e5,_0x4f5125,_0x38fb85)=>{_0xbbbd2f['rearrange']({'removedAnnotation':_0x4f5125,'previousAnnotation':_0x5f60be['get'](_0x38fb85-0x1),'nextAnnotation':_0x5f60be['get'](_0x38fb85+0x1)}),_0x4f5125===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5f60be,'focus',(_0x2127ed,_0x4b1a51)=>{this['setActiveAnnotation'](_0x4b1a51);}),this['listenTo'](_0x5f60be,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5ec09d=this['context']instanceof _0x1cd104?this['context']['editors']:new _0x337452([this['context']]);for(const _0x444502 of _0x5ec09d)this['_integrateWithEditorAnnotations'](_0x444502);this['listenTo'](_0x5ec09d,'add',(_0x1a1a96,_0x5556c2)=>{this['listenTo'](_0x5556c2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5556c2);});}),this['listenTo'](_0x5ec09d,'remove',(_0x3f3773,_0x1a0d0b)=>{_0x1a0d0b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1a0d0b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x288e46('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1c4d6b=this['context']['plugins']['get'](z);_0x1c4d6b['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1c4d6b),this['stopListening'](this['annotations']),this['context']instanceof _0x1cd104&&this['stopListening'](this['context']['editors']);for(const _0x5dbb3e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5dbb3e);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1db35d){if(!_0x1db35d['plugins']['has']('EditorAnnotations'))return;const _0x4521ab=_0x1db35d['plugins']['get']('EditorAnnotations'),_0x27a66f=()=>{const _0x2abb73=_0x4521ab['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2abb73[0x0]||null);};this['listenTo'](_0x4521ab,'refresh',_0x27a66f),this['listenTo'](_0x4521ab,'blur',(_0x4aa247,{isAnnotationTracked:_0x124f5e})=>{this['activeAnnotation']&&_0x124f5e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4521ab,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x16ab06=>{_0x4521ab['hasDomSelection']()&&(_0x27a66f(),_0x16ab06['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4521ab);}['_destroyEditorAnnotationsIntegration'](_0x203b15){this['stopListening'](_0x203b15),this['_editorAnnotations']['remove'](_0x203b15);}}class C extends _0x3f1bfd{['counterView'];constructor(_0x2225a7){super(_0x2225a7);const _0x40adf8=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x203239,_0x2d2281)=>_0x203239?'...':_0x2d2281['toString']()),this['set']('annotationType',''),this['icon']=_0x475110,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x40adf8['to']('annotationType',_0x49ec11=>'ck-annotation-counter__badge--'+_0x49ec11),_0x40adf8['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x40adf8['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x41a1e4{['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(_0xd31a48){super(_0xd31a48),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1d25e0())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x337452(),this['_refreshPositioningDebounced']=_0x1011d4(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x393438(this['context']['locale']),this['balloonPanelView']=new _0xd1b5e1(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x371fb8){this['annotations']=_0x371fb8;const _0x1e3c5d=this['context']['plugins']['get'](z),_0x5d82b6=this['balloonPanelView'];if(_0x1e3c5d['_annotations']=_0x371fb8,this['isAttached'])throw new _0x288e46('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1e3c5d,'set:container',()=>{this['detach'](),this['listenTo'](_0x1e3c5d,'change:container',_0x15f32e=>{_0x15f32e['off'](),this['attach'](_0x371fb8);});}),_0x1e3c5d['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x337f5a=_0x25c378=>{const _0x1f2665=new C(this['context']['locale']);_0x1e3c5d['addAnnotation'](_0x25c378,_0x1f2665),this['_annotationToNarrowView']['set'](_0x25c378,_0x1f2665),_0x1f2665['bind']('isDirty','annotationType','number')['to'](_0x25c378['view'],'isDirty','type','length'),_0x1f2665['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5d82b6['content']['first']!==_0x25c378['view']?(this['_showBalloon'](_0x25c378),_0x25c378['view']['element']['focus'](),this['setActiveAnnotation'](_0x25c378)):this['setActiveAnnotation'](null);});};for(const _0x21f435 of _0x371fb8)_0x337f5a(_0x21f435);this['listenTo'](_0x371fb8,'add',(_0x463854,_0x496f2d)=>{_0x337f5a(_0x496f2d);}),this['listenTo'](_0x371fb8,'remove',(_0x12391b,_0x1abc3f,_0x4a2baf)=>{this['_annotationToNarrowView']['get'](_0x1abc3f)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1abc3f),_0x1e3c5d['rearrange']({'removedAnnotation':_0x1abc3f,'previousAnnotation':_0x371fb8['get'](_0x4a2baf-0x1),'nextAnnotation':_0x371fb8['get'](_0x4a2baf+0x1)}),_0x1abc3f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x371fb8,'focus',(_0x202c1b,_0x1c6836)=>{this['setActiveAnnotation'](_0x1c6836);}),this['listenTo'](_0x371fb8,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x55461f,_0x41551f)=>{_0x41551f['keyCode']===_0x23315c['esc']&&_0x5d82b6['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5d82b6['content']['first']),this['_hideBalloon'](),_0x41551f['stopPropagation'](),_0x41551f['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x12e040,_0x11acba)=>{const _0x5590ae=_0x11acba['target'];_0x5d82b6['isVisible']&&_0x5d82b6['element']['contains'](_0x5590ae)||_0x1e3c5d['view']['element']['contains'](_0x5590ae)||_0x12e040['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x135d60=>_0x135d60['contains'](_0x5590ae))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x39ecf3=this['context']instanceof _0x1cd104?this['context']['editors']:new _0x337452([this['context']]);for(const _0x58e6b6 of _0x39ecf3)this['_integrateWithEditorAnnotations'](_0x58e6b6);this['listenTo'](_0x39ecf3,'add',(_0x5f3eb5,_0x2e6ffc)=>{this['listenTo'](_0x2e6ffc,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2e6ffc);});}),this['listenTo'](_0x39ecf3,'remove',(_0x19f060,_0xcdff25)=>{_0xcdff25['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xcdff25['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3bf6dc){if(_0x3bf6dc===this['activeAnnotation'])return;const _0x4eecd3=this['context']['plugins']['get'](z);if(_0x4eecd3['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3bf6dc,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3bf6dc)_0x4eecd3['getSidebarItemView'](_0x3bf6dc)?this['_showBalloon'](_0x3bf6dc):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3bf6dc;}['detach'](){if(!this['isAttached'])throw new _0x288e46('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x87b7dd=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x51c998=>_0x51c998['destroy']()),this['_annotationToNarrowView']['clear'](),_0x87b7dd['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1cd104&&this['stopListening'](this['context']['editors']);for(const _0x51f151 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x51f151);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'](_0x330e96){if(!_0x330e96['plugins']['has']('EditorAnnotations'))return;const _0x43dd43=_0x330e96['plugins']['get']('EditorAnnotations'),_0x4ce6b8=this['context']['plugins']['get'](z),_0x4a7a35=this['annotations'],_0x2fd98f=this['balloonPanelView'],_0x8cb144=()=>{const _0x5866a2=_0x43dd43['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5866a2),this['setActiveAnnotation'](_0x5866a2[0x0]||null);};this['listenTo'](_0x43dd43,'refresh',_0x8cb144),this['listenTo'](_0x43dd43,'blur',(_0x449098,{isAnnotationTracked:_0x30cfde})=>{this['activeAnnotation']&&_0x30cfde(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x43dd43,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4a7a35,'blur',_0x138911=>{_0x43dd43['hasDomSelection']()&&_0x138911['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1baf03,_0x342413)=>{const _0x2fad2a=_0x342413['target'];_0x2fd98f['isVisible']&&_0x2fd98f['element']['contains'](_0x2fad2a)||_0x4ce6b8['view']['element']['contains'](_0x2fad2a)||this['activeAnnotation']&&_0x43dd43['hasDomSelection']()&&(_0x8cb144(),_0x1baf03['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x43dd43);}['_destroyEditorAnnotationsIntegration'](_0x2ba041){_0x2ba041&&(this['stopListening'](_0x2ba041),this['_editorAnnotations']['remove'](_0x2ba041));}['_setSelectedAnnotations'](_0x125283){for(const _0x5ed032 of this['_selectedAnnotations'])_0x125283['includes'](_0x5ed032)||this['_manuallyClosedAnnotationViews']['delete'](_0x5ed032['view']);this['_selectedAnnotations']=_0x125283;}['_refreshPositioning'](){const _0x4dc8d3=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4dc8d3['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x435a67){if(this['_manuallyClosedAnnotationViews']['has'](_0x435a67['view']))return;const _0x535b5a=this['balloonPanelView']['content']['first'];_0x535b5a!==_0x435a67['view']?(_0x535b5a&&this['_detachListeners'](_0x535b5a),this['_attachListeners'](_0x435a67['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x435a67['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x64bd1b=this['balloonPanelView']['content']['first'],_0x370a6f=_0x64bd1b&&this['annotations']['getByView'](_0x64bd1b);if(!_0x370a6f||!this['_annotationToNarrowView']['has'](_0x370a6f))return;const _0x5c7b89=this['_annotationToNarrowView']['get'](_0x370a6f)['element'],_0x3ad687=(function(){const _0x4d8e91=_0xd1b5e1['defaultPositions'];return[_0x4d8e91['southArrowNorthEast'],_0x4d8e91['northArrowSouthEast'],_0x4d8e91['southArrowNorth'],_0x4d8e91['northArrowSouth'],_0x4d8e91['southArrowNorthWest'],_0x4d8e91['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5c7b89,'positions':_0x3ad687});}['_hideBalloon'](){const _0x405aa3=this['balloonPanelView'],_0x16680c=_0x405aa3['content']['first'];_0x16680c&&(this['_detachListeners'](_0x16680c),_0x405aa3['unpin'](),_0x405aa3['content']['clear']());}['_attachListeners'](_0x50bdb8){this['listenTo'](_0x50bdb8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x50bdb8,'Esc',(_0x2a00c2,_0x2fc590)=>{this['_manuallyClosedAnnotationViews']['add'](_0x50bdb8),this['_hideBalloon'](),_0x2fc590();});}['_detachListeners'](_0x441e51){this['stopListening'](_0x441e51);}}class c extends _0x42a4ab{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x37cf29,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x230e18){super(_0x230e18),_0x230e18['editing']['view']['addObserver'](_0x1b9430),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x230e18['plugins']['get'](_0x37cf29),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x1011d4(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x184b16=this['editor']['plugins']['get'](j);_0x184b16['context']===this['editor']&&(_0x184b16['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x58b0cb,_0x581b18)=>{const _0x45026b=this['_balloon'];if(this['isAttached']&&_0x45026b['visibleView']){const _0x3debd7=this['annotations']['getByView'](_0x45026b['visibleView']);_0x3debd7&&this['_closeAnnotation'](_0x3debd7),_0x581b18();}}));}['afterInit'](){const _0x552db7=this['editor']['plugins']['get'](j);_0x552db7['context']===this['editor']&&(_0x552db7['hasActive']()||_0x552db7['switchTo']('inline'));}['setActiveAnnotation'](_0x31b153){_0x31b153!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x31b153&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x31b153)&&this['_addAnnotationToBalloon'](_0x31b153,!0x0),_0x31b153['isActive']=!0x0),_0x31b153||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x31b153);}['attach'](_0x124e05){this['annotations']=_0x124e05;const _0x234b32=this['editor']['plugins']['get'](j),_0x338c30=this['_balloon'];if(this['isAttached'])throw new _0x288e46('inlineannotations-attach-already-attached',this);if(_0x234b32['context']!==this['editor'])throw new _0x288e46('inlineannotations-not-allowed-with-context',this);const _0x56bc83=this['editor']['plugins']['get'](b);this['listenTo'](_0x56bc83,'refresh',()=>{const _0x56ed98=_0x56bc83['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x189c7b,_0x1ed2b9;!this['_forceRefresh']&&(_0x189c7b=_0x56ed98,_0x1ed2b9=this['_selectedAnnotations'],_0x189c7b['length']===_0x1ed2b9['length']&&_0x189c7b['every'](_0x1423cd=>_0x1ed2b9['includes'](_0x1423cd)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x56ed98),this['setActiveAnnotation'](_0x56ed98[0x0]||null));}),this['listenTo'](_0x56bc83,'blur',(_0xd08574,{isAnnotationTracked:_0x11171e})=>{this['activeAnnotation']&&_0x11171e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x56bc83,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x379a25,_0x568f53,_0x8a697d)=>{_0x8a697d||this['setActiveAnnotation'](null);}),this['listenTo'](_0x124e05,'remove',(_0x29ad21,_0x325c5c)=>{this['_removeAnnotationFromBalloon'](_0x325c5c),_0x325c5c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x338c30,'change:visibleView',(_0x2393cd,_0x2614d0,_0x22a173,_0x417317)=>{_0x417317&&this['stopListening'](_0x417317);const _0x384f71=_0x124e05['getByView'](_0x22a173);_0x22a173&&_0x384f71&&(this['listenTo'](_0x22a173,'change:height',()=>{_0x338c30['updatePosition']();}),this['listenTo'](_0x22a173,'Esc',()=>{this['_closeAnnotation'](_0x384f71),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x384f71&&this['setActiveAnnotation'](_0x384f71));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x338c30['visibleView']&&(_0x124e05['getByView'](_0x338c30['visibleView'])&&_0x338c30['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 _0x288e46('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3d83de of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3d83de);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x46e7f6){for(const _0x1d9e59 of this['_selectedAnnotations'])_0x46e7f6['includes'](_0x1d9e59)||this['_manuallyClosed']['delete'](_0x1d9e59);for(const _0x27e234 of this['annotations'])_0x46e7f6['includes'](_0x27e234)||this['_removeAnnotationFromBalloon'](_0x27e234);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2a3c02 of _0x46e7f6)this['_addAnnotationToBalloon'](_0x2a3c02);}this['_selectedAnnotations']=_0x46e7f6;}['_addAnnotationToBalloon'](_0x12044e,_0x5b4d6=!0x1){this['_manuallyClosed']['has'](_0x12044e)||(this['_addedAnnotations']['has'](_0x12044e)||this['_balloon']['hasView'](_0x12044e['view'])||(this['_addedAnnotations']['add'](_0x12044e),this['_balloon']['add']({'stackId':_0x12044e['view']['id'],'view':_0x12044e['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x12044e)}})),_0x5b4d6&&this['_balloon']['showStack'](_0x12044e['view']['id']));}['_getBalloonTargetForAnnotation'](_0x211a85){const _0x3ddb3a=_0x211a85['target'],_0x366b16=this['editor']['editing']['view'],_0x1768e1=_0x366b16['document']['selection']['getFirstRange'](),_0x57ce74=_0x366b16['domConverter']['viewRangeToDom'](_0x1768e1);if(_0x57ce74['collapse'](!0x0),_0x3ddb3a){if(_0x3ddb3a instanceof _0xb25606)return _0x3ddb3a;let _0xdfd266=[];for(const _0x2a116a of _0x3ddb3a)_0xdfd266['push'](...F(_0x2a116a['getClientRects']()));_0xdfd266=function(_0x5c7c98){const _0x38be5b=[];let _0x49c9c9=_0x5c7c98[0x0];for(let _0x70c99=0x1;_0x70c99<_0x5c7c98['length'];_0x70c99++)P(_0x49c9c9,_0x5c7c98[_0x70c99])?_0x49c9c9['width']+=_0x5c7c98[_0x70c99]['width']:(_0x38be5b['push'](_0x49c9c9),_0x49c9c9=_0x5c7c98[_0x70c99]);return _0x38be5b['push'](_0x49c9c9),_0x38be5b;}(_0xdfd266);const _0x5d18a1=_0x57ce74['getBoundingClientRect']();return _0xdfd266['find'](_0x278153=>_0x278153['top']<=_0x5d18a1['top']&&_0x278153['bottom']>=_0x5d18a1['bottom']&&_0x278153['left']<=_0x5d18a1['left']&&_0x278153['right']>=_0x5d18a1['right'])||_0xdfd266[0x0];}return _0x211a85['targetRect']||_0x57ce74;}['_removeAnnotationFromBalloon'](_0x214ee2){this['_addedAnnotations']['has'](_0x214ee2)&&this['_balloon']['hasView'](_0x214ee2['view'])&&(this['_addedAnnotations']['delete'](_0x214ee2),this['_balloon']['remove'](_0x214ee2['view']));}['_closeAnnotation'](_0x2e4234){this['_manuallyClosed']['add'](_0x2e4234),this['_removeAnnotationFromBalloon'](_0x2e4234);}}function F(_0x177041){return Array['from'](_0x177041)['map'](DOMRect['fromRect']);}function P(_0x43ffdc,_0x37e1d0){return _0x43ffdc['top']===_0x37e1d0['top']&&_0x43ffdc['bottom']===_0x37e1d0['bottom']&&_0x43ffdc['right']===_0x37e1d0['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x114a37,_0x416a1a){super(_0x114a37),this['set']('isEmpty',!_0x416a1a['length']),this['focusTracker']=new _0x5dabed(),this['_annotationViews']=_0x416a1a,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x437732({'focusables':_0x416a1a,'focusTracker':this['focusTracker']}),this['listenTo'](_0x416a1a,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x416a1a,'remove',(_0x5af00a,_0x279027)=>{_0x279027['isActive']&&this['focus'](),_0x416a1a['length']||(this['isEmpty']=!0x0);});const _0x3bdaca=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x114a37,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x416a1a},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3bdaca['if']('isEmpty','ck-hidden',_0x43199c=>!_0x43199c)]},'children':[{'text':N(_0x114a37,'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 _0x2cd25d of this['_annotationViews'])this['focusTracker']['add'](_0x2cd25d['element']);this['_annotationViews']['on']('change',(_0x448a0e,{added:_0xcecd17,removed:_0x4653ea})=>{for(const _0x1bbf3c of _0xcecd17)this['focusTracker']['add'](_0x1bbf3c['element']);for(const _0x5a4f67 of _0x4653ea)this['focusTracker']['remove'](_0x5a4f67['element']);});}}class p extends _0x41a1e4{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x438c3c){super(_0x438c3c),this['archivedThreads']=new _0x337452();}['init'](){const _0x448a39=this['context'],_0x102689=_0x448a39['plugins']['get'](o),_0x1160d3=_0x448a39['plugins']['get'](y);this['listenTo'](_0x102689,'addCommentThread',(_0x37bb3f,{threadId:_0x5ac39b})=>{const _0x443286=_0x102689['getCommentThread'](_0x5ac39b);_0x443286['archivedAt']&&this['archivedThreads']['add'](_0x443286,this['_calculatePosition'](_0x443286['archivedAt'])),this['listenTo'](_0x443286,'change:archivedAt',(_0x115896,_0x3d9cf1,_0x4cc8e2)=>{_0x4cc8e2?this['archivedThreads']['has'](_0x443286)||this['archivedThreads']['add'](_0x443286,this['_calculatePosition'](_0x443286['archivedAt'])):this['archivedThreads']['has'](_0x443286)&&this['archivedThreads']['remove'](_0x443286);});}),this['listenTo'](_0x102689,'removeCommentThread',(_0x591f3b,{threadId:_0x219b62})=>{const _0x4e5568=_0x102689['getCommentThread'](_0x219b62);this['stopListening'](_0x4e5568),this['archivedThreads']['has'](_0x4e5568)&&this['archivedThreads']['remove'](_0x4e5568);},{'priority':'highest'}),this['listenTo'](_0x1160d3['collection'],'focus',(_0x18b480,_0x50d18d)=>{_0x50d18d['isVisible']||(_0x50d18d['isActive']=!0x0,_0x1160d3['activate'](_0x50d18d));});}['_calculatePosition'](_0x5953a1){const _0xdd6308=[...this['archivedThreads']]['findIndex'](_0x1d456e=>_0x1d456e['archivedAt']<_0x5953a1);return _0xdd6308>-0x1?_0xdd6308:this['archivedThreads']['length'];}}class a extends _0x42a4ab{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0xde117e];}constructor(_0x4be37a){super(_0x4be37a),this['annotationViews']=new _0x5b2307(),this['_pendingThreads']=[];}['init'](){const _0x275c5b=this['editor'],_0x24e45c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x275c5b['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3f1bfd,!0x0)),_0x275c5b['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x814aa4=this['_createCommentsArchiveButton'](_0x2ed0c5);return _0x814aa4['set']({'role':'menuitemcheckbox'}),_0x814aa4;});const _0x116c86=_0x275c5b['plugins']['get'](p),_0x4a6b37=_0x275c5b['plugins']['get']('Annotations'),_0x13005c=_0x275c5b['plugins']['get']('CommentsRepository');_0x116c86['archivedThreads']['forEach'](_0x1626a1=>{this['_handleNewThread'](_0x1626a1);}),this['listenTo'](_0x116c86['archivedThreads'],'add',(_0x290b6f,_0x172b55)=>{this['_handleNewThread'](_0x172b55);}),this['listenTo'](_0x4a6b37['collection'],'add',(_0x11882d,_0x3cfd3d)=>{const _0x2b79b0=this['_pendingThreads']['find'](_0x26c251=>{const _0x1a60ab=_0x13005c['_threadToController']['get'](_0x26c251);return _0x1a60ab&&_0x3cfd3d['innerView']===_0x1a60ab['view'];});if(_0x2b79b0){const _0x21a8ec=this['_calculatePosition'](_0x2b79b0['archivedAt']);this['_addAnnotationToArchive'](_0x3cfd3d,_0x21a8ec),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2b79b0),0x1);}}),this['listenTo'](_0x116c86['archivedThreads'],'remove',(_0x357c85,_0x3416d2)=>{const _0x12c052=_0x275c5b['config']['get']('collaboration.channelId');if(!_0x12c052||_0x3416d2['channelId']===_0x12c052){if(this['_pendingThreads']['includes'](_0x3416d2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3416d2),0x1);else{const _0x289798=_0x13005c['_threadToController']['get'](_0x3416d2),_0xad33d=_0x4a6b37['getByInnerView'](_0x289798['view']);this['annotationViews']['remove'](_0xad33d['view']),this['stopListening'](_0xad33d),this['stopListening'](_0xad33d['focusableElements']);}}}),this['listenTo'](_0x4a6b37['collection'],'add',(_0x31cb48,_0x475a2c)=>{this['listenTo'](_0x475a2c,'escape',_0x24e45c);}),this['listenTo'](_0x4a6b37['collection'],'remove',(_0x45edf1,_0x5e76e6)=>{this['stopListening'](_0x5e76e6,'escape',_0x24e45c);});}['_addAnnotationToArchive'](_0x2e8522,_0x2daaa8){this['listenTo'](_0x2e8522,'set:isVisible',_0x2511e5=>{_0x2511e5['return']=!0x1,_0x2511e5['stop']();}),this['annotationViews']['add'](_0x2e8522['view'],_0x2daaa8);}['_handleNewThread'](_0x951b97){const _0x2fbecf=this['editor']['plugins']['get']('CommentsRepository'),_0x536939=this['editor']['plugins']['get']('Annotations'),_0x5a33ca=this['editor']['config']['get']('collaboration.channelId');if(!_0x5a33ca||_0x951b97['channelId']===_0x5a33ca){const _0x552eec=_0x2fbecf['_threadToController']['get'](_0x951b97);if(!_0x552eec)return void this['_pendingThreads']['push'](_0x951b97);const _0x2ee816=this['_calculatePosition'](_0x951b97['archivedAt']),_0x35ea3c=_0x536939['getByInnerView'](_0x552eec['view']);_0x35ea3c['isVisible']&&_0x536939['_visibleAnnotations']['remove'](_0x35ea3c),this['_addAnnotationToArchive'](_0x35ea3c,_0x2ee816);}}['_calculatePosition'](_0x35bf39){const _0x2bf837=this['editor']['config']['get']('collaboration.channelId'),_0x20315c=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x37d4aa=>_0x37d4aa['channelId']===_0x2bf837)['findIndex'](_0x2f52ec=>_0x2f52ec['archivedAt']<_0x35bf39);return _0x20315c<0x0||_0x20315c>this['annotationViews']['length']?this['annotationViews']['length']:_0x20315c-0x1;}['_toggleDialog'](){const _0x871908=this['editor'],_0x281643=_0x871908['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x871908['locale'],this['annotationViews'])),'commentsArchive'===_0x281643['id']?_0x281643['hide']():_0x281643['show']({'id':'commentsArchive','title':N(_0x871908['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1a04b0,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2bece6['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x55998a,_0xd3a5ca=!0x1){const _0x23f07c=this['editor']['locale'],_0x44ce69=this['editor']['plugins']['get']('Dialog'),_0xfcec44=new _0x55998a(_0x23f07c);return _0xfcec44['bind']('isEnabled')['to'](this,'isEnabled'),_0xfcec44['bind']('isOn')['to'](_0x44ce69,'id',_0x154e8c=>'commentsArchive'===_0x154e8c),_0xfcec44['set']({'label':N(_0x23f07c,'COMMENTS_ARCHIVE'),'icon':_0x1a04b0,'isToggleable':!0x0}),_0xd3a5ca&&(_0xfcec44['tooltip']=!0x0),this['listenTo'](_0xfcec44,'execute',()=>this['_toggleDialog']()),_0xfcec44;}['_hideDialogOnAnnotationEscape']=_0x579916=>{const _0x4eca30=_0x579916['source'];if(!this['annotationViews']['has'](_0x4eca30['view']))return;const _0x316039=this['editor']['plugins']['get']('Dialog');_0x316039['isOpen']&&'commentsArchive'===_0x316039['id']&&(_0x316039['hide'](),_0x579916['stop']());};}class gi extends _0x42a4ab{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 _0x45f233,ContextPlugin as _0x1570af,PendingActions as lt,Command as _0x3b02de,Plugin as _0x58c0a0,Context as _0xb1f4b9}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x412ccb,uid as _0x4a8c36,KeystrokeHandler as jt,FocusTracker as _0x58afd6,diff as _0x147a32,Collection as _0x262a30,Rect as _0x55e497,CKEditorError as _0x5425ea,first as _0x31fba4,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x320921,keyCodes as _0x22c2bb}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2e6ce5,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1ffa79,trimHtml as ts,LateFocusDropdownButtonView as _0x282161,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x1104be}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,cloneDeep as wt,set as yt,unset as Ct,isEqual as At,debounce as _0x20bca9}from'es-toolkit/compat';import{IconUndo as _0x24f814,IconCheck as _0x17a7cb,IconPencil as _0x40152c,IconRemoveComment as _0x4247e1,IconThreeVerticalDots as _0x43a357,IconAddComment as _0x919c1b,IconCommentsArchive as _0x2b2f1c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0xb5c97f,ButtonView as _0x3d87f0,ViewCollection as _0x165358,createDropdown as _0x1866dd,ListView as _0xf445f5,focusChildOnDropdownOpen as _0xa983dd,ListItemView as _0x1badf8,MenuBarMenuListItemButtonView as _0x293e2a,BodyCollection as _0x2798f0,BalloonPanelView as _0x211a1f,ContextualBalloon as _0x463d3d,Dialog as _0x44f883,DialogViewPosition as _0x3a90e0}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0xe1ebf1}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0xdc497e}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x369070}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x412ccb(){['model'];['view'];constructor(_0x2a6d17,_0x383a70){super(),this['model']=_0x2a6d17,this['model']['_isAttached']=!0x0,this['view']=_0x383a70,this['listenTo'](_0x383a70,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x383a70,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x383a70,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x383a70,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x383a70,'addComment',(_0x15cc0a,_0x32acb6)=>this['addComment'](_0x32acb6)),this['listenTo'](_0x383a70,'updateComment',(_0x11ee6f,_0x5a733e,_0x27a262)=>this['updateComment'](_0x5a733e,_0x27a262)),this['listenTo'](_0x383a70,'removeComment',(_0x439df9,_0x284224)=>this['removeComment'](_0x284224));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x72d447){this['model']['addComment']({'content':_0x72d447,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x4d30a8,_0x4a3c6a){this['model']['getComment'](_0x4d30a8)['update']({'content':_0x4a3c6a});}['removeComment'](_0x57f212){this['model']['getComment'](_0x57f212)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x4997f4,_0x414cc2,_0x1b6bcc){const t=_0x4997f4['t'];switch(_0x414cc2){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'},_0x1b6bcc);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'},_0x1b6bcc);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'},_0x1b6bcc);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'},_0x1b6bcc);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1b6bcc);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'},_0x1b6bcc);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'},_0x1b6bcc);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'},_0x1b6bcc);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x15ab67,_0x64557b){super(_0x15ab67);const _0x27fc41=_0x4a8c36();this['main']=this['createCollection'](),this['editable']=new Vt(_0x15ab67,_0x64557b,void 0x0,{'label':()=>N(_0x15ab67,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x15ab67['uiLanguageDirection'],'lang':_0x15ab67['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x27fc41},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x341e9d){super(_0x341e9d),this['view']=new Rt(_0x341e9d['locale'],_0x341e9d['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x97ddd5=this['editor']['editing']['view'],_0x3b6b8d=this['view']['editable'],_0x3574ad=_0x97ddd5['document']['getRoot']();_0x3b6b8d['name']=_0x3574ad['rootName'],this['view']['render']();const _0x4f9003=_0x3b6b8d['element'];this['setEditableElement'](_0x3b6b8d['name'],_0x4f9003),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x97ddd5['attachDomRoot'](_0x4f9003),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x412ccb(_0x45f233){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x6d5b15={}){function _0xa7eb76(_0x51616f){return _0x51616f['map'](_0x357625=>String['fromCharCode'](_0x357625))['join']('');}(_0x6d5b15=Object['assign']({},_0x6d5b15))['plugins']||(_0x6d5b15['plugins']=hs['defaultPlugins']),super(_0x6d5b15),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xa7eb76([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa7eb76([0x76,0x69,0x65,0x77])][_0xa7eb76([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xa7eb76([0x61,0x75,0x74,0x6f]),this[_0xa7eb76([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xa7eb76([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xa7eb76([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xa7eb76([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xa7eb76([0x6f,0x6b])});}['create'](){const _0x50b977=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x50b977))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1b63dc=>{const _0x1ee96a=this['model']['document']['getRoot'](),_0x4316dc=_0x1ee96a&&_0x1ee96a['getChild'](_0x1ee96a['childCount']-0x1);_0x1b63dc['setSelection'](_0x4316dc,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x8c4793=this['editing']['view'],_0xf1e31b=_0x8c4793['document']['getRoot'](),_0x47af61=_0xf1e31b['getChild'](0x0);_0xf1e31b['childCount']>0x1||!_0x47af61||'p'!=_0x47af61['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x8c4793,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x47af61['placeholder']=this['placeholder']),Ft({'view':_0x8c4793,'element':_0x47af61,'keepOnFocus':!0x0}),this['placeholderElement']=_0x47af61);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x47bb20,_0x2bd64f={}){super(_0x47bb20),this['editor']=null,this['_editorConfig']=_0x2bd64f,this['set']('value',_0x2bd64f['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x47bb20,'Reply...')),this['set']('submitLabel',N(_0x47bb20,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x58afd6(),this['focusCycler']=new _0xb5c97f({'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',(_0x5c6ea6,_0x4b9e30)=>{this['cancelButtonView']['fire']('execute'),_0x4b9e30();}),this['keystrokes']['set']('Ctrl+Enter',(_0x20b5f0,_0x52d1db)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x52d1db());}),this['on']('submit',(_0x13ab49,_0x2b66d8)=>{_0x2b66d8['length']>0xfde8?(alert(N(_0x47bb20,'TOO_LONG_COMMENT_ALERT',[_0x2b66d8['length'],0xfde8])),_0x13ab49['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x338e98=this['editor'];this['element']['insertBefore'](_0x338e98['ui']['element'],this['element']['firstChild']),_0x338e98['model']['document']['on']('change',()=>this['value']=_0x338e98['getData']()),_0x338e98['bind']('placeholder')['to'](this),this['focusables']['add'](_0x338e98['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x51bd9a){-0x1===_0x51bd9a?(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:_0x38070d}=this,_0x171008=new _0x3d87f0(_0x38070d);return _0x171008['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x171008['withText']=!0x0,_0x171008['bind']('label')['to'](this,'submitLabel'),_0x171008['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x171008['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1cff82,_0x3f1fab)=>!_0x3f1fab&&!!_0x1cff82['trim']()),_0x171008;}['_createCancelButton'](){const {locale:_0x40a897}=this,_0x2e4b82=new _0x3d87f0(_0x40a897);return _0x2e4b82['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2e4b82['label']=N(_0x40a897,'Cancel'),_0x2e4b82['withText']=!0x0,_0x2e4b82['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2e4b82;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3d2e42=>{this['focusTracker']['add'](_0x3d2e42['element']);}),this['focusables']['on']('change',(_0x3b83e7,_0x117247)=>{for(const _0x59812e of Array['from'](_0x117247['added'])['reverse']())this['focusTracker']['add'](_0x59812e['element']);});}}class ie extends kt{constructor(_0x58ca17,_0x28d74b,_0x3ce878){super(_0x58ca17),this['commentInputView']=new es(_0x58ca17,_0x3ce878),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x245c69,_0x2f15f6)=>_0x245c69||!!_0x2f15f6),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 _0x2e6ce5(_0x58ca17,_0x28d74b),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'](_0x51383a){this['commentInputView']['focus'](_0x51383a);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4c3454,_0x42129e)=>{const {submitButtonView:_0x1005f5,cancelButtonView:_0x2a82f7,editor:_0x5964d8}=this['commentInputView'];[_0x1005f5['element'],_0x2a82f7['element'],_0x5964d8?_0x5964d8['editing']['view']['getDomRoot']():null]['filter'](_0x3c4188=>_0x3c4188)['some'](_0x18c63b=>_0x18c63b['contains'](_0x42129e['target']))||(this['focus'](),_0x42129e['preventDefault']());});}}class rs extends kt{constructor(_0x3d343d){super(_0x3d343d);const _0x10af6d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x10af6d['to']('count',_0x235e16=>N(_0x3d343d,'NUMBER_OF_COMMENTS',_0x235e16))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x45cfda,_0x542827,_0x1a47ec){super(_0x45cfda);const _0x254a33=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x542827['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x542827,this['_config']=_0x1a47ec,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['focusCycler']=new _0xb5c97f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x22bb45=>this['commentViews']['map'](_0x40bae1=>_0x40bae1['element'])['includes'](_0x22bb45['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x45cfda),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3118a9=>_0x3118a9-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3c8d6e of _0x542827['comments'])this['_handleNewCommentModel'](_0x3c8d6e);this['_handleInfoComment'](),this['listenTo'](_0x542827['comments'],'add',(_0x100767,_0x55dd9c)=>{const _0x55af6d=this['_calculatePosition'](_0x55dd9c);this['length']++,this['_handleNewCommentModel'](_0x55dd9c,_0x55af6d),this['refreshVisibleViews']();}),this['listenTo'](_0x542827['comments'],'remove',(_0x32c07b,_0x12303c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x12303c),this['refreshVisibleViews']();}),this['listenTo'](_0x542827,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x542827,'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',_0x254a33['if']('length','ck-hidden',_0x244332=>!_0x244332)],'aria-label':N(_0x45cfda,'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'](_0xe0af1a){-0x1===_0xe0af1a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xf03163 of this['commentViews'])_0xf03163['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3405d4,_0x134b6d){const _0x5780e4=new this['_config']['CommentView'](this['locale'],_0x3405d4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5780e4['viewUid']=_0x3405d4['id'],_0x5780e4['delegate']('removeComment')['to'](this),_0x5780e4['delegate']('updateComment')['to'](this),_0x5780e4['delegate']('resolveCommentThread')['to'](this),_0x5780e4['delegate']('editorReady')['to'](this),_0x5780e4['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5780e4,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5780e4,_0x134b6d);}['_calculatePosition'](_0x1495ad){const _0x2684e9=this['_model']['_findOptimalIndex'](_0x1495ad);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1495ad['authoredAt']?_0x2684e9-0x1:_0x2684e9:_0x2684e9-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x45161d={'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'],_0x45161d,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x45161d));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x360f13){const _0x47b2a2=this['commentViews']['remove'](_0x360f13['id']);this['stopListening'](_0x47b2a2),_0x47b2a2['isEditMode']&&this['_updateHasDirtyComment'](),_0x47b2a2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3a60cd=>_0x3a60cd['isEditMode']);}['_rearrangeCollapse'](){const _0x45382f=function(_0x24d65d){const _0x491783=new _0x262a30();for(const _0x231d3e of _0x24d65d)_0x491783['add'](_0x231d3e);return _0x491783;}(this['commentViews']),_0x33ed9d=this['_collapsedCommentsView']['count'];for(let _0x2373a3=0x1;_0x2373a3<=_0x33ed9d;_0x2373a3++)_0x45382f['remove'](0x1);for(const _0x183c9e of _0x45382f)_0x183c9e['collapse']();_0x33ed9d>0x0&&_0x45382f['add'](this['_collapsedCommentsView'],0x1),ns(_0x147a32(Array['from'](this['visibleViews']),Array['from'](_0x45382f)),this['visibleViews'],_0x45382f);}['_rearrangeExpand'](){ns(_0x147a32(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x22eb9c of this['visibleViews'])_0x22eb9c['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x50fc5c=>{this['focusTracker']['add'](_0x50fc5c['element']),this['keystrokes']['listenTo'](_0x50fc5c['element']);}),this['commentViews']['on']('change',(_0xcbb1a0,_0x209e8d)=>{for(const _0x3b2e82 of _0x209e8d['removed'])this['focusTracker']['remove'](_0x3b2e82['element']),this['keystrokes']['stopListening'](_0x3b2e82['element']);for(const _0x3aac7a of Array['from'](_0x209e8d['added'])['reverse']())this['focusTracker']['add'](_0x3aac7a['element']),this['keystrokes']['listenTo'](_0x3aac7a['element']);});}}function ns(_0x440ba4,_0x5249ac,_0xe38a18){let _0x100dd9=0x0;for(const _0x99146d of _0x440ba4)switch(_0x99146d){case'insert':_0x5249ac['add'](_0xe38a18['get'](_0x100dd9),_0x100dd9),_0x100dd9++;break;case'delete':_0x5249ac['remove'](_0x100dd9);break;case'equal':_0x100dd9++;}}class oe extends kt{constructor(_0x25e791){super(_0x25e791);const _0x11f82e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x11f82e['to']('contextValue',_0x4615bb=>N(_0x25e791,'THREAD_CONTEXT_LABEL',_0x4615bb)),'tabindex':-0x1},'children':[{'text':_0x11f82e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4ea1a9,_0x44953f){super(_0x4ea1a9);const _0x2f8714=this['bindTemplate'];this['_model']=_0x44953f,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x32d1f6=>!!_0x32d1f6),this['bind']('contextValue')['to'](this['_model'],'context',_0x47875c=>_0x47875c&&_0x47875c['value']?this['_trimContextValue'](_0x47875c['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',_0x2f8714['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 _0x44352b=new _0x3d87f0(this['locale']);return _0x44352b['label']=N(this['locale'],'Reopen'),_0x44352b['tooltip']=N(this['locale'],'Reopen'),_0x44352b['icon']=_0x24f814,_0x44352b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x52c06f=>!_0x52c06f),_0x44352b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x23031e,_0x4383ef)=>_0x23031e&&_0x4383ef),_0x44352b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x44352b;}['_trimContextValue'](_0x3e8f0c){if(_0x3e8f0c['length']<0x96)return _0x3e8f0c;const _0x5211be=_0x3e8f0c['lastIndexOf']('\x20',0x93);return _0x3e8f0c['substring'](0x0,_0x5211be>-0x1?_0x5211be:0x93)+'...';}['_attachContextActions'](){const _0x80efe1=this['element']['querySelector']('.ck-context'),_0x2e1e31=_0x80efe1['querySelector']('.ck-context__value');this['listenTo'](_0x80efe1,'mouseenter',()=>{_0x2e1e31['offsetWidth']<_0x2e1e31['scrollWidth']&&_0x80efe1['classList']['add']('overlay');}),this['listenTo'](_0x80efe1,'mouseleave',()=>{_0x80efe1['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x47f34f of this['focusables'])this['focusTracker']['add'](_0x47f34f['element']),this['keystrokes']['listenTo'](_0x47f34f['element']);}['_createContextView'](){const _0x3cb51c=new oe(this['locale']);return _0x3cb51c['bind']('contextValue')['to'](this),_0x3cb51c;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c1a90,_0xdeb0a6,_0x504db6,_0x2a03fb){super(_0x3c1a90),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xdeb0a6,this['_localUser']=_0x504db6,this['_config']=_0x2a03fb,this['commentThreadHeaderView']=new Xt(_0x3c1a90,_0xdeb0a6),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3c1a90,N(_0x3c1a90,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3c1a90,_0xdeb0a6,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2a03fb)),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',(_0x13791c,_0x23496b)=>_0x13791c||!!_0x23496b),this['bind']('isUnlinked')['to'](_0xdeb0a6,'unlinkedAt',_0x348d3e=>!!_0x348d3e),this['bind']('ariaLabel')['to'](this,'length',_0x6b2ad2=>{const _0x9e69d8=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x6b2ad2,_0x9e69d8]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x105078=>_0x105078['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x56e965=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2af050=_0x56e965['commentInputView'];return _0x56e965['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2af050,'value',(_0x304a5d,_0x371023,_0x1e22a8,_0x2f0c8a,_0x1ac497)=>!!_0x1ac497||!!_0x2f0c8a&&_0x1e22a8&&!_0x371023||_0x304a5d&&_0x1e22a8&&!_0x371023),_0x2af050['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x15b585,_0x2d4376,_0x42bad0)=>{let _0xe4d123;return _0xe4d123=_0x42bad0&&_0x2d4376?'Reply\x20to\x20reopen\x20discussion...':_0x15b585?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xe4d123);}),_0x2af050['bind']('submitLabel')['to'](this,'length',_0x38e698=>N(this['locale'],_0x38e698?'Reply':'Comment')),_0x2af050['on']('submit',(_0x2d28c4,_0x24b0d3)=>{this['fire']('addComment',_0x24b0d3),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2af050['on']('cancel',()=>{this['focus']();}),_0x2af050['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2af050['on']('cancel',_0x4f3e63=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4f3e63['stop']());}),this['on']('change:isActive',(_0x541840,_0x5561e7,_0x544c0d)=>{_0x544c0d||this['length']||_0x2af050['value']||this['fire']('removeCommentThread');}),_0x56e965;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xd91b1c,_0x221263,_0x5eb819,_0x7e6e7f){super(_0xd91b1c,_0x221263,_0x5eb819,_0x7e6e7f),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xd91b1c,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x5b96a0,_0x2803a8,_0xc94e24)=>{_0xc94e24||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x150612,_0x179a4f,_0x417a1b)=>{_0x417a1b&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5d72ff=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5d72ff['if']('isActive','ck-thread--active'),_0x5d72ff['if']('isUnlinked','ck-thread--unlinked'),_0x5d72ff['to']('actionIndicator',_0x279249=>_0x279249?'ck-thread--'+_0x279249:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5d72ff['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 _0x5ece6f of this['commentsListView']['commentViews'])_0x5ece6f['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1cad02}=this,_0x3839a2=this['commentsListView']['commentViews']['get'](0x0);_0x3839a2===this['_boundFirstCommentView']||_0x3839a2['isSystemComment']||(this['_boundFirstCommentView']=_0x3839a2,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3839a2,'actionIndicator',_0x352b3a=>'remove'===_0x352b3a?'remove':null),_0x3839a2['placeholder']=N(_0x1cad02,'Write\x20a\x20comment...'),_0x3839a2['removeButton']['on']('execute',_0x54b087=>{_0x54b087['stop'](),this['showConfirm'](N(_0x1cad02,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3839a2['focus']();}),_0x3839a2['actionBar']['add'](this['resolveButton'],0x0),_0x3839a2['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x47f0db=new _0x1ffa79(this['locale']);return _0x47f0db['label']=N(this['locale'],'Resolve'),_0x47f0db['tooltip']=N(this['locale'],'Resolve'),_0x47f0db['icon']=_0x17a7cb,_0x47f0db['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x47f0db['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xb35cf6=>!_0xb35cf6),_0x47f0db['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x20e6d7,_0x9ea865)=>_0x20e6d7&&!_0x9ea865),_0x47f0db['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x47f0db;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x1a5dae){super(_0x1a5dae),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5f4e53,_0x34920b,_0xfcdc63)=>{this['element']['innerHTML']=_0xfcdc63;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5a626a,_0x1be3ae,_0x424523){super(_0x5a626a),this['_model']=_0x1be3ae,this['_config']=_0x424523,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1be3ae,'content',_0x1be3ae,'authoredAt',(_0x1f2fdb,_0x3c1348)=>N(_0x5a626a,'COMMENT_ARIA_LABEL',[_0x1be3ae['author']['name'],_0x424523['formatDateTime'](_0x3c1348),new DOMParser()['parseFromString'](_0x1f2fdb,'text/html')['body']['textContent'],_0x1be3ae['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x5a626a,N(_0x5a626a,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x165358(),this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3790df=>_0x3790df['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 _0x54f501=new is(this['locale']);return _0x54f501['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x12080d,_0x169092)=>_0x169092?ts(_0x12080d,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x12080d),_0x54f501;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x98dcd9=new es(this['locale'],this['_config']['editorConfig']);return _0x98dcd9['value']=this['_model']['content'],_0x98dcd9['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x98dcd9['submitLabel']=N(this['locale'],'Save'),_0x98dcd9['on']('submit',(_0x298bec,_0x3e6496)=>{this['fire']('updateComment',this['_model']['id'],_0x3e6496),this['switchToDisplayMode'](),this['focus']();}),_0x98dcd9['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x98dcd9['once']('editorReady',()=>{_0x98dcd9['focus']();}),_0x98dcd9['createEditor'](),_0x98dcd9['delegate']('editorReady')['to'](this),_0x98dcd9['delegate']('editorDestroyed')['to'](this),_0x98dcd9;}['_setupKeyboardNavigation'](){const _0x104700=this['element'];this['keystrokes']['listenTo'](_0x104700);for(const _0x4b0f15 of this['focusables'])this['focusTracker']['add'](_0x4b0f15['element']),this['keystrokes']['listenTo'](_0x4b0f15['element']);this['focusables']['on']('change',(_0x1c3ccf,_0x3fc9fc)=>{for(const _0x3f239a of _0x3fc9fc['removed'])this['focusTracker']['remove'](_0x3f239a['element']),this['keystrokes']['stopListening'](_0x3f239a['element']);for(const _0x9914a1 of _0x3fc9fc['added'])this['focusTracker']['add'](_0x9914a1['element']),this['keystrokes']['listenTo'](_0x9914a1['element']);}),this['keystrokes']['set']('enter',(_0x358e52,_0x44f960)=>{_0x104700===_0x358e52['target']&&(this['focusCycler']['focusFirst'](),_0x44f960());}),this['keystrokes']['set']('esc',(_0x3b2396,_0x268f3b)=>{_0x104700!==_0x3b2396['target']&&(this['focus'](),_0x268f3b());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x3723e8,_0xa74899,_0x4218cd){super(_0x3723e8,_0xa74899,_0x4218cd),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x3723e8,'Reply...')),this['bind']('authoredAt')['to'](_0xa74899),this['bind']('resolvedAt')['to'](_0xa74899),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 _0x2e6ce5(_0x3723e8,_0xa74899['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xa74899,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x109e03=this['bindTemplate'],_0x472215=[{'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':_0x109e03['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x109e03['to']('authoredAt',_0xab7f18=>this['_config']['formatDateTime'](_0xab7f18))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x109e03['if']('isEditMode','ck-comment__actions--hidden'),_0x109e03['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']&&_0x472215['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x109e03['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x109e03['if']('isEditMode','ck-comment--edit'),_0x109e03['if']('isSystemComment','ck-comment--info'),_0x109e03['to']('actionIndicator',_0x305508=>_0x305508?'ck-comment--'+_0x305508:'')],'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':_0x472215}]}]};}['_createEditButton'](){const _0x1cc7c5=new _0x3d87f0(this['locale']);return _0x1cc7c5['label']=N(this['locale'],'Edit'),_0x1cc7c5['icon']=_0x40152c,_0x1cc7c5['withText']=!0x0,_0x1cc7c5['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1cc7c5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1010f5=>!_0x1010f5),_0x1cc7c5['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1cc7c5['on']('execute',()=>this['switchToEditMode']()),_0x1cc7c5;}['_createRemoveButton'](){const _0x21fd4b=new _0x3d87f0(this['locale']);return _0x21fd4b['label']=N(this['locale'],'Remove'),_0x21fd4b['icon']=_0x4247e1,_0x21fd4b['withText']=!0x0,_0x21fd4b['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x21fd4b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3ff6e3=>!_0x3ff6e3),_0x21fd4b['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x21fd4b['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x21fd4b;}['_createDropdown'](){const _0x448c67=_0x1866dd(this['locale'],_0x282161),_0x292724=_0x448c67['panelView']['children'],_0xd02d97=new _0xf445f5(this['locale']),_0x5745a3=_0x448c67['bindTemplate'];_0xa983dd(_0x448c67,()=>this['items']['find'](_0x119d58=>_0x119d58['isVisible'])),_0x448c67['extendTemplate']({'attributes':{'class':[_0x5745a3['if']('isVisible','ck-hidden',_0x159d16=>!_0x159d16)]}});const _0x37cce7=(_0x5f5852,_0x1ab7b4=-0x1)=>{const _0x408123=new _0x1badf8(this['locale']);_0x408123['children']['add'](_0x5f5852);const _0x4dfa98=_0x1ab7b4>-0x1?_0x1ab7b4:_0xd02d97['items']['length'];_0xd02d97['items']['add'](_0x408123,_0x4dfa98);const _0x25f195=Array['from'](this['items']);_0x448c67['unbind']('isEnabled','isVisible'),_0x448c67['bind']('isEnabled')['toMany'](_0x25f195,'isEnabled',(..._0x1bf748)=>_0x1bf748['some'](_0x25ce36=>_0x25ce36)),_0x448c67['bind']('isVisible')['toMany'](_0x25f195,'isVisible',(..._0x4c721b)=>_0x4c721b['some'](_0x2fdba5=>_0x2fdba5));};_0x448c67['panelPosition']='sw',_0x448c67['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x43a357});for(const _0x107fd5 of this['items'])_0x37cce7(_0x107fd5);return _0x292724['add'](_0xd02d97),_0x448c67['listenTo'](this['items'],'add',(_0x37d00b,_0x490e7e,_0x121048)=>{_0x37cce7(_0x490e7e,_0x121048);}),_0x448c67['listenTo'](this['items'],'remove',(_0x53b07d,_0x10e221,_0x145f8b)=>{_0xd02d97['items']['remove'](_0x145f8b);}),_0x448c67;}['_attachActions'](_0x1caaab,_0x1b646e){const _0x164c27=_0x1caaab&&_0x1caaab['element'];_0x164c27&&(this['listenTo'](_0x164c27,'mouseenter',()=>this['actionIndicator']=_0x1b646e),this['listenTo'](_0x164c27,'focus',()=>this['actionIndicator']=_0x1b646e),this['listenTo'](_0x164c27,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x164c27,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4b901d=super['_createCommentInputView']();return _0x4b901d['bind']('placeholder')['to'](this),_0x4b901d;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x687e9d){const _0x1a4e39=Dt(_0x687e9d,0x1e),_0x2f2ae6=new MutationObserver(_0x27cf16=>{for(const _0x667a20 of _0x27cf16)('attributes'==_0x667a20['type']&&'class'==_0x667a20['attributeName']||'childList'==_0x667a20['type']||'characterData'==_0x667a20['type'])&&_0x1a4e39();});return{'attach'(_0x2f5f8f){_0x2f2ae6['observe'](_0x2f5f8f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x2f2ae6['disconnect'](),_0x1a4e39['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2a702b,_0x23292c){super(_0x2a702b),this['id']=_0x4a8c36(),this['focusTracker']=new _0x58afd6(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x4f4e38,_0x415d24)=>this['fire']('Esc',_0x415d24)),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'](_0x23292c),this['mainView']=_0x23292c;const _0x4e3fd4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4e3fd4['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 _0x14d4ac=this['element']['clientHeight'];_0x14d4ac&&(this['height']=_0x14d4ac);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x412ccb(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4f5ac9,target:_0x59a5ee,type:_0x42d494,isVisible:_0x83c921=!0x0}){super(),this['view']=_0x4f5ac9,this['view']['element']||this['view']['render'](),this['_type']=_0x42d494,this['_target']=_0x59a5ee,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x262a30([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x228c3a,_0x3735f5)=>{this['view']['focusTracker']['add'](_0x3735f5);}),this['focusableElements']['on']('remove',(_0x1ec312,_0x4b9722)=>{this['view']['focusTracker']['remove'](_0x4b9722);}),this['set']('isVisible',_0x83c921);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x31dcb5=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x31dcb5),_0x31dcb5;}get['targetRect'](){const _0x5c9cb4=this['target'];if(null===_0x5c9cb4)return null;if(_0x5c9cb4 instanceof _0x55e497)return _0x5c9cb4;const _0x259407=_0x5c9cb4['filter'](_0x5e59ac=>function(_0x5ac3c3){const _0x4cc821=_0x5ac3c3['offsetParent'];if(_0x4cc821)return!0x0;const _0xfc6bc=_0x5ac3c3['getClientRects']()['item'](0x0);return!!_0xfc6bc;}(_0x5e59ac));return 0x0===_0x259407['length']?null:new _0x55e497(_0x259407[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5dfe50){this['view']['isActive']=_0x5dfe50,this['view']['mainView']['isActive']=_0x5dfe50;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x22353e){if(!(null===_0x22353e||_0x22353e instanceof _0x55e497||Array['isArray'](_0x22353e)&&_0x22353e['every'](_0x29867c=>fi(_0x29867c))))throw new _0x5425ea('annotation-invalid-target',null,{'target':_0x22353e});}['_getNormalizedTarget'](){const _0x5771fe='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5771fe)?[_0x5771fe]:_0x5771fe;}}function fi(_0x347c70){return null!==_0x347c70&&'object'==typeof _0x347c70&&'nodeType'in _0x347c70&&0x1===_0x347c70['nodeType'];}class S extends _0x262a30{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x595f4a=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x58afd6(),this['_focusTracker']['on']('change:isFocused',(_0x4984f1,_0x193d42,_0xa5e7a1)=>{_0xa5e7a1||this['fire']('blur');});for(const _0x6ef2ea of _0x595f4a)this['add'](_0x6ef2ea);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2b6cf3){if(this['has'](_0x2b6cf3))throw new _0x5425ea('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2b6cf3['innerView'],_0x2b6cf3),this['_viewToAnnotation']['set'](_0x2b6cf3['view'],_0x2b6cf3);for(const _0x518063 of _0x2b6cf3['focusableElements'])this['_focusTracker']['add'](_0x518063);this['listenTo'](_0x2b6cf3['focusableElements'],'add',(_0x53e39b,_0x441b41)=>{this['_focusTracker']['add'](_0x441b41);}),this['listenTo'](_0x2b6cf3['focusableElements'],'remove',(_0x2f8d13,_0x687836)=>{this['_focusTracker']['remove'](_0x687836);}),this['listenTo'](_0x2b6cf3['view']['focusTracker'],'change:isFocused',(_0x292943,_0x49607d,_0x46fec0)=>{_0x46fec0&&this['fire']('focus',_0x2b6cf3);}),_0x2b6cf3['updateTargetRect']();const _0x336b0c=this['_getOrderInContent'](_0x2b6cf3['view']['targetRect']);return super['add'](_0x2b6cf3,_0x336b0c);}['remove'](_0x3c39b4){if(!this['has'](_0x3c39b4))throw new _0x5425ea('annotationcollection-not-existing-item',null);this['stopListening'](_0x3c39b4['view']['focusTracker']),this['stopListening'](_0x3c39b4['focusableElements']);for(const _0x4f1fdd of _0x3c39b4['focusableElements'])this['_focusTracker']['remove'](_0x4f1fdd);return this['_viewToAnnotation']['delete'](_0x3c39b4['view']),this['_innerViewToAnnotation']['delete'](_0x3c39b4['innerView']),super['remove'](_0x3c39b4);}['getByInnerView'](_0x4792b9){return this['_innerViewToAnnotation']['get'](_0x4792b9);}['getByView'](_0x3f001e){return this['_viewToAnnotation']['get'](_0x3f001e);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x4d5a89 of this)_0x4d5a89['updateTargetRect']();this['_sort']();}['_sort'](){const _0x21ef74=Array['from'](this)['sort']((_0x6ca5fc,_0x197016)=>w(_0x6ca5fc['view']['targetRect'],_0x197016['view']['targetRect']));for(let _0x5baf65=_0x21ef74['length']-0x1;_0x5baf65>0x0;_0x5baf65--){const _0x19a4b6=_0x21ef74[_0x5baf65];_0x5baf65!==this['getIndex'](_0x19a4b6)&&(this['remove'](_0x19a4b6),this['add'](_0x19a4b6));}}['_getOrderInContent'](_0x23fe3d){let _0x4316a2=0x0;if(!_0x23fe3d)return this['length'];for(const _0x24d4dd of this){const _0x36aeeb=_0x24d4dd['view']['targetRect'];if(_0x36aeeb){if(w(_0x23fe3d,_0x36aeeb)<0x0)return _0x4316a2;_0x4316a2++;}}return _0x4316a2;}}function v({source:_0xf49493,target:_0x36161b,filter:_0x300825}){for(const _0x471a78 of _0xf49493)_0x300825(_0x471a78)&&_0x36161b['add'](_0x471a78);_0x36161b['listenTo'](_0xf49493,'add',(_0x43edb3,_0x507cd1)=>{_0x300825(_0x507cd1)&&_0x36161b['add'](_0x507cd1);}),_0x36161b['listenTo'](_0xf49493,'remove',(_0x35c269,_0x514a50)=>{_0x36161b['has'](_0x514a50)&&_0x36161b['remove'](_0x514a50);});}function w(_0x762369,_0x369188){if(null===_0x762369&&null===_0x369188)return 0x0;if(null===_0x762369)return-0x1;if(null===_0x369188)return 0x1;const _0x4b5dae=_0x762369['top']-_0x369188['top'];return 0x0==_0x4b5dae?_0x762369['left']-_0x369188['left']:_0x4b5dae;}class y extends _0x1570af{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x27a6e3){if(super(_0x27a6e3),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x27a6e3 instanceof _0x45f233){const _0x4ab0a1=_0x27a6e3['locale'];_0x27a6e3['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x4ab0a1,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4cd592){this['collection']['add'](_0x4cd592);}['remove'](_0x371323){this['collection']['remove'](_0x371323),_0x371323['destroy']();}['refreshVisibility'](){for(const _0x56d33f of this['collection'])_0x56d33f['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x56f256){return this['collection']['getByInnerView'](_0x56f256);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x24b542 of this['collection'])_0x24b542['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5f297c){this['fire']('_activateAnnotation',_0x5f297c);}['createAnnotation'](_0x505122){return new T(_0x505122);}['createAnnotationView'](_0x18e4ea,_0x5b8445){return new E(_0x18e4ea,_0x5b8445);}['_addActiveAnnotation'](_0x1a4ef4){const _0xccbbe1=new Set(this['activeAnnotations']);_0xccbbe1['add'](_0x1a4ef4),this['activeAnnotations']=_0xccbbe1;}['_removeActiveAnnotation'](_0x2c348c){const _0x716d9e=new Set(this['activeAnnotations']);_0x716d9e['delete'](_0x2c348c),this['activeAnnotations']=_0x716d9e;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2a8e73=this['collection'],_0x254e92=this['_visibleAnnotations'];function _0x5c5086(_0x139512){const _0x312865=_0x139512['source'];_0x312865['isVisible']&&!_0x254e92['has'](_0x312865)?_0x254e92['add'](_0x312865):!_0x312865['isVisible']&&_0x254e92['has'](_0x312865)&&_0x254e92['remove'](_0x312865),_0x312865['view']['focusTracker']['remove'](_0x312865['view']['element']),_0x312865['view']['focusTracker']['add'](_0x312865['view']['element']);}this['listenTo'](_0x2a8e73,'add',(_0x5bf50b,_0x56271e)=>{_0x56271e['isVisible']&&_0x254e92['add'](_0x56271e),this['listenTo'](_0x56271e,'change:isVisible',_0x5c5086);}),this['listenTo'](_0x2a8e73,'remove',(_0x2f2fb3,_0x15e52d)=>{_0x254e92['has'](_0x15e52d)&&_0x254e92['remove'](_0x15e52d),this['stopListening'](_0x15e52d,'change:isVisible',_0x5c5086);});}['_setupEnterAnnotationKeystroke'](){const _0x2912a3=_0x537904=>{_0x537904['on']('ready',()=>{_0x537904['keystrokes']['set'](_0xdc497e,(_0x36cdab,_0x7549df)=>{const _0x4f8da0=_0x31fba4(this['activeAnnotations']['values']());_0x4f8da0&&(_0x4f8da0['view']['focus'](),_0x7549df());});});};this['context']instanceof _0x45f233?_0x2912a3(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2306d6,_0x140ee6)=>{_0x2912a3(_0x140ee6);});}['_setupEscapeAnnotationHandling'](){const _0x237f81=_0x3c0f8c=>{const _0x1c8e4f=_0x3c0f8c['source'],_0x3bbca0=[];let _0x5b80dd;if(Array['isArray'](_0x1c8e4f['target'])){_0x5b80dd=_0x1c8e4f['target'][0x0],this['context']instanceof _0x45f233?_0x3bbca0['push'](this['context']):this['context']['editors']&&_0x3bbca0['push'](...this['context']['editors']);for(const _0x1b7146 of _0x3bbca0)for(const _0x1c5139 of _0x1b7146['editing']['view']['domRoots']['values']())if(_0x1c5139['contains'](_0x5b80dd))return void _0x1b7146['editing']['view']['focus']();_0x5b80dd['focus']();}};this['listenTo'](this['collection'],'add',(_0x5d19d7,_0x3df4d8)=>{this['listenTo'](_0x3df4d8,'escape',_0x237f81,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5cd1d1,_0x1fae6f)=>{this['stopListening'](_0x1fae6f,'escape',_0x237f81);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1570af{['_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(_0x326ed2){super(_0x326ed2),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x15bf57=this['context']['config'];_0x15bf57['define']('comments.maxCommentsWhenCollapsed',0x2),_0x15bf57['define']('comments.maxThreadTotalWeight',0x1f4),_0x15bf57['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x15bf57['define']('comments.CommentThreadView',gt),_0x15bf57['define']('comments.CommentView',Tt),_0x15bf57['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x439079=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4f634e,_0x5ac5d9)=>this['_addCommentThread'](_0x5ac5d9)),this['on']('submitCommentThread',(_0x39e1a8,_0x48a88d)=>this['_submitCommentThread'](_0x48a88d)),this['on']('resolveCommentThread',(_0x35eda5,_0x46e613)=>this['_resolveCommentThread'](_0x46e613)),this['on']('resolveCommentThread',(_0x3a7df2,_0x3491e8)=>this['_updateActiveAnnotation'](_0x3491e8),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xdaa6d5,_0x20af98)=>this['_reopenCommentThread'](_0x20af98)),this['on']('reopenCommentThread',(_0x12221c,_0x3e5b7e)=>this['_updateActiveAnnotation'](_0x3e5b7e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4284b7,_0x45e5cd)=>this['_removeCommentThread'](_0x45e5cd)),this['on']('updateCommentThread',(_0x14ba4f,_0x16858b)=>this['_updateCommentThread'](_0x16858b)),this['on']('updateCommentThread',(_0x5e8a18,_0x4b8ec1)=>this['_updateActiveAnnotation'](_0x4b8ec1),{'priority':'lowest'}),this['on']('addComment',(_0x3db06d,_0x1d47da)=>this['_addComment'](_0x1d47da)),this['on']('updateComment',(_0x59828e,_0x2c77a7)=>this['_updateComment'](_0x2c77a7)),this['on']('removeComment',(_0x23b46f,_0x5ec6aa)=>this['_removeComment'](_0x5ec6aa)),this['on']('addComment',(_0x1df1d1,{threadId:_0x1bc6e3,isFromAdapter:_0x191478})=>{if(_0x191478)return;const _0x4579ca=this['getCommentThread'](_0x1bc6e3),_0x4d49bc=_0x4579ca&&this['_threadToController']['get'](_0x4579ca);_0x4d49bc&&_0x4d49bc['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x439079,'change:activeAnnotations',(_0x392dd1,_0x42c926,_0x52ca2f)=>{const _0x74aeaa=Array['from'](_0x52ca2f)['map'](_0x384c24=>this['_viewToController']['get'](_0x384c24['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x74aeaa?_0x74aeaa['model']:null;});}set['adapter'](_0x360193){if(this['_adapter'])throw new _0x5425ea('commentsrepository-adapter-already-set');this['_adapter']=_0x360193;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x216cd0=_t,threadId:_0x30e2bc=_0x4a8c36(),comments:_0x5ed0b2=[],unlinkedAt:_0x582c6a=null,resolvedAt:_0x11e14d=null,resolvedBy:_0x4a8b2a=null,target:_0x355075=null,context:_0x3b954c=null,attributes:_0x5d72a7={},isResolvable:_0x127984=!0x0,isSubmitted:_0x546e5c=!0x1,isFromAdapter:_0x4bb3e1=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x216cd0),{'channelId':_0x216cd0,'threadId':_0x30e2bc,'comments':_0x5ed0b2,'unlinkedAt':_0x582c6a,'resolvedAt':_0x11e14d,'resolvedBy':_0x4a8b2a,'target':_0x355075,'context':_0x3b954c,'attributes':_0x5d72a7,'isFromAdapter':_0x4bb3e1,'isResolvable':_0x127984,'isSubmitted':_0x546e5c}),this['getCommentThread'](_0x30e2bc);}['openNewCommentThread']({channelId:_0x16ef52=_t,threadId:_0x32e15c=_0x4a8c36(),target:_0x2993f2,context:_0x3a2754=null,isResolvable:_0x33cf6e=!0x0}){if(this['_readOnlyChannels']['has'](_0x16ef52)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2993f2)throw new _0x5425ea('commentsrepository-missing-target');const _0x273ff6=this['addCommentThread']({'channelId':_0x16ef52,'threadId':_0x32e15c,'target':_0x2993f2,'context':_0x3a2754,'isResolvable':_0x33cf6e});if(!_0x273ff6)return null;const _0x8d8a41=this['_threadToController']['get'](_0x273ff6),_0x1fbc81=_0x8d8a41['view']['commentThreadInputView']['commentInputView'],_0x2600b2=this['context']['plugins']['get'](y),_0x247798=_0x2600b2['getByInnerView'](_0x8d8a41['view']);return _0x2600b2['activate'](_0x247798),_0x1fbc81['once']('editorReady',()=>_0x1fbc81['focus']()),_0x273ff6;}['hasCommentThread'](_0xab00ea){if('string'!=typeof _0xab00ea)throw new _0x5425ea('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xab00ea);}['updateCommentThread']({channelId:_0x323b50=_t,threadId:_0x7328ce,context:_0x579156,unlinkedAt:_0x57e737,attributes:_0x26267a,isFromAdapter:_0x23cdbd=!0x1}){return this['fire'](Nt('updateCommentThread',_0x323b50),{'channelId':_0x323b50,'threadId':_0x7328ce,'context':_0x579156,'unlinkedAt':_0x57e737,'attributes':_0x26267a,'isFromAdapter':_0x23cdbd}),this['getCommentThread'](_0x7328ce);}['getCommentThread'](_0x1cb197){if('string'!=typeof _0x1cb197)throw new _0x5425ea('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1cb197);}['fetchCommentThread']({channelId:_0x3662b2,threadId:_0x4d7cde}={}){const _0x5ead9e=this['getCommentThread'](_0x4d7cde);if(_0x5ead9e)return Promise['resolve'](_0x5ead9e);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5425ea('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3662b2,'threadId':_0x4d7cde})['then'](_0x25109b=>this['hasCommentThread'](_0x4d7cde)?this['getCommentThread'](_0x4d7cde):_0x25109b?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3662b2},_0x25109b)):void 0x0)['catch'](_0x5d1033=>{throw console['error'](_0x5d1033),new _0x5425ea('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x380ced,skipNotAttached:_0x5ceda5=!0x1,skipEmpty:_0x562959=!0x1,toJSON:_0x11bbc7=!0x1}={}){const _0x1b3b27=[];for(const _0x50b47a of this['_threads']['values']())_0x380ced&&_0x50b47a['channelId']!==_0x380ced||_0x5ceda5&&!_0x50b47a['isAttached']||_0x562959&&0x0===_0x50b47a['length']||_0x1b3b27['push'](_0x50b47a);return _0x11bbc7?_0x1b3b27['map'](_0x4f2b4b=>_0x4f2b4b['toJSON']()):_0x1b3b27;}['getAnnotationForCommentThread'](_0x2cb871){const _0x1960ab=this['_threadToController']['get'](_0x2cb871);if(!_0x1960ab)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1960ab['view'])||null;}['getCommentThreadForAnnotation'](_0x566de4){const _0x293715=this['_viewToController']['get'](_0x566de4['innerView']);return _0x293715?_0x293715['model']:null;}['setActiveCommentThread'](_0x280d60){const _0x3dd258=this['context']['plugins']['get'](y);if(!_0x280d60)return void(this['activeCommentThread']&&_0x3dd258['deactivateAll']());const _0x1584bb=this['getCommentThread'](_0x280d60);if(!_0x1584bb)throw new _0x5425ea('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x280d60});if(!this['_threadToController']['has'](_0x1584bb))throw new _0x5425ea('commentsrepository-active-not-attached',null,{'threadId':_0x280d60});const _0x40c78e=_0x3dd258['getByInnerView'](this['_threadToController']['get'](_0x1584bb)['view']);_0x3dd258['activate'](_0x40c78e);}['switchReadOnly'](_0xd9b547,_0x269e74){_0xd9b547?this['_readOnlyChannels']['add'](_0x269e74):this['_readOnlyChannels']['delete'](_0x269e74),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x41bee6){return this['_readOnlyChannels']['has'](_0x41bee6)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5bcbf2,_0x25122c){return new vt(_0x5bcbf2,_0x25122c);}['setPermissions'](_0x40d2f5,_0x34ad95=_t){this['_permissions']['set'](_0x34ad95,_0x40d2f5),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x529a2a=_t){return this['_permissions']['has'](_0x529a2a)?this['_permissions']['get'](_0x529a2a):bt;}['_addCommentThread']({channelId:_0x321af4,threadId:_0x7a0897,comments:_0x17c40b,unlinkedAt:_0x3bdf18,resolvedAt:_0xdaac32,resolvedBy:_0x5f6bea,target:_0x4410e1,context:_0x5ef978,attributes:_0x8c41c2,isFromAdapter:_0x3df1e1,isResolvable:_0x450844,isSubmitted:_0x44e512}){if('string'!=typeof _0x7a0897)throw new _0x5425ea('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x7a0897});if(this['hasCommentThread'](_0x7a0897))throw new _0x5425ea('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x7a0897});const _0x3e3cd4=new pi(this,{'channelId':_0x321af4,'id':_0x7a0897,'context':_0x5ef978,'attributes':_0x8c41c2,'unlinkedAt':_0x3bdf18,'resolvedAt':_0xdaac32,'resolvedBy':_0x5f6bea?this['context']['plugins']['get'](it)['getUser'](_0x5f6bea):null,'isResolvable':_0x450844,'isSubmitted':_0x44e512||_0x3df1e1});this['_threads']['set'](_0x7a0897,_0x3e3cd4);for(const _0x10fe36 of _0x17c40b)_0x3e3cd4['_add'](this['_createNewComment']({'threadId':_0x7a0897,..._0x10fe36}));return _0x4410e1&&_0x3e3cd4['attachTo'](_0x4410e1),_0x3df1e1||!_0x3e3cd4['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x321af4,'threadId':_0x7a0897});}['_submitCommentThread']({channelId:_0x14baae,threadId:_0x88b01e}){if(!this['hasCommentThread'](_0x88b01e))throw new _0x5425ea('commentsrepository-missing-comment-thread',this);const _0x1cde3f=this['getCommentThread'](_0x88b01e);if(_0x1cde3f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x321713,comments:_0x2d09d7,resolvedAt:_0x4282a7,resolvedBy:_0x22741a,context:_0x44cb33,attributes:_0x393884}=_0x1cde3f,_0x2974b4=this['context']['plugins']['get']('PendingActions'),_0x394bae=_0x2974b4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x14baae,'threadId':_0x321713,'comments':_0x2d09d7['map'](_0x120a72=>_0x120a72['toJSON']()),'resolvedAt':_0x4282a7,'resolvedBy':_0x22741a?_0x22741a['id']:_0x22741a,'context':_0x44cb33,'attributes':_0x393884})['then'](({comments:_0x422f4a})=>{_0x2974b4['remove'](_0x394bae);for(const _0x1d83d2 of _0x422f4a)this['_updateComment']({'channelId':_0x14baae,'threadId':_0x88b01e,'commentId':_0x1d83d2['commentId'],'createdAt':_0x1d83d2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4e3c49=>{throw console['error'](_0x4e3c49),new _0x5425ea('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2bdd46,target:_0x4f212a}){const _0x3094f4=this['getCommentThread'](_0x2bdd46);if(!_0x3094f4)throw new _0x5425ea('commentsrepository-attach-missing-comment-thread',this);const _0x272814=this['context']['plugins']['get']('PendingActions'),_0x3b2423=this['context']['plugins']['get'](y),_0x4c2b72=this['_createCommentThreadView'](_0x3094f4),_0x403b47=new vt(_0x3094f4,_0x4c2b72);let _0xc8e065=null;_0x4c2b72['on']('change:isDirty',(_0x3ecd75,_0x3733b2,_0x2f5ea6)=>{_0x2f5ea6?_0xc8e065=_0x272814['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xc8e065&&(_0x272814['remove'](_0xc8e065),_0xc8e065=null);}),this['_threadToController']['set'](_0x3094f4,_0x403b47),this['_viewToController']['set'](_0x4c2b72,_0x403b47);const _0x82fb40=new E(this['context']['locale'],_0x4c2b72);_0x82fb40['bind']('length')['to'](_0x4c2b72),_0x82fb40['bind']('isDirty')['to'](_0x4c2b72,'isDirty',_0x4c2b72,'length',(_0x4640dc,_0x37602a)=>_0x4640dc||!_0x37602a),_0x82fb40['bind']('isActive')['to'](_0x4c2b72),_0x82fb40['type']='comment';const _0x3413ca=new T({'view':_0x82fb40,'target':_0x4f212a,'type':'comment','isVisible':!_0x3094f4['archivedAt']&&!!('function'==typeof _0x4f212a?_0x4f212a():_0x4f212a)});return _0x4c2b72['on']('escape',()=>{_0x3413ca['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4c2b72,_0x3413ca),_0x3b2423['add'](_0x3413ca),_0x3413ca;}['_bindAnnotationToEditors'](_0x4f6bb7,_0x50d1ab){this['listenTo'](_0x4f6bb7,'editorReady',(_0x355fa7,_0x1e597b)=>{const _0x464436=_0x1e597b['ui']['view']['body']['bodyCollectionContainer'];_0x50d1ab['focusableElements']['add'](_0x464436),this['context']instanceof _0x45f233&&this['context']['ui']['focusTracker']['add'](_0x464436);},{'priority':'highest'}),this['listenTo'](_0x4f6bb7,'editorDestroyed',(_0x2a4bc3,_0x41866d)=>{const _0x2fa15e=_0x41866d['ui']['view']['body']['bodyCollectionContainer'];_0x50d1ab['focusableElements']['has'](_0x2fa15e)&&_0x50d1ab['focusableElements']['remove'](_0x2fa15e),this['context']instanceof _0x45f233&&this['context']['ui']['focusTracker']['remove'](_0x2fa15e);});}['_unbindEditors'](_0x2937eb){this['stopListening'](_0x2937eb,'editorReady'),this['stopListening'](_0x2937eb,'editorDestroyed');}['_createCommentThreadView'](_0x234c0c){const _0x5a5a0b=this['context']['plugins']['get'](it),{config:_0x23f400,locale:_0x5bc17b}=this['context'],_0x2e3ae9=pt(_0x23f400['get']('locale'),_0x5bc17b);return new(0x0,(_0x23f400['get']('comments'))['CommentThreadView'])(_0x5bc17b,_0x234c0c,_0x5a5a0b['me'],{'editorConfig':{..._0x23f400['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x23f400['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x23f400['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x23f400['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x23f400['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2e3ae9,'CommentView':_0x23f400['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x40388c,channelId:_0xd3db03,resolvedAt:_0x58d3f6,resolvedBy:_0x3f4b78,isFromAdapter:_0x2ed6b9}){if(!this['hasCommentThread'](_0x40388c))throw new _0x5425ea('commentsrepository-missing-comment-thread',null,{'threadId':_0x40388c});const _0x29ff30=this['getCommentThread'](_0x40388c);if(_0x29ff30['isResolved'])throw new _0x5425ea('commentsrepository-resolved-comment-thread',null,{'threadId':_0x40388c});const _0x1c5ef5=this['context']['plugins']['get'](it);if(_0x29ff30['resolvedBy']=_0x1c5ef5['getUser'](_0x3f4b78),_0x29ff30['resolvedAt']=_0x58d3f6,_0x2ed6b9||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x47aa65=this['context']['plugins']['get']('PendingActions'),_0x53e843=_0x47aa65['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xd3db03,'threadId':_0x40388c})['then'](({resolvedAt:_0x213d75,resolvedBy:_0x30221d})=>{_0x47aa65['remove'](_0x53e843),_0x29ff30['resolvedBy']['id']!==_0x30221d&&(_0x29ff30['resolvedBy']=_0x1c5ef5['getUser'](_0x30221d)),_0x29ff30['resolvedAt']=_0x213d75;})['catch'](_0x1f4d64=>{throw console['error'](_0x1f4d64),new _0x5425ea('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x477278,channelId:_0x528752,isFromAdapter:_0x53bebc}){if(!this['hasCommentThread'](_0x477278))throw new _0x5425ea('commentsrepository-missing-comment-thread',null,{'threadId':_0x477278});const _0x40314b=this['getCommentThread'](_0x477278);if(!_0x40314b['isResolved'])throw new _0x5425ea('commentsrepository-reopen-comment-thread',null,{'threadId':_0x477278});if(_0x40314b['resolvedBy']=null,_0x40314b['resolvedAt']=null,_0x53bebc||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x55bfea=this['context']['plugins']['get']('PendingActions'),_0x3b4d26=_0x55bfea['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x528752,'threadId':_0x477278})['then'](()=>_0x55bfea['remove'](_0x3b4d26))['catch'](_0xf2df86=>{throw console['error'](_0xf2df86),new _0x5425ea('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x26cdad,isFromAdapter:_0xaac431}){const _0x5f35e7=this['getCommentThread'](_0x26cdad);if(!_0x5f35e7)throw new _0x5425ea('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x26cdad),this['_threads']['delete'](_0x26cdad),!_0x5f35e7['isSubmitted']||_0xaac431||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1e48b0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x145427}=_0x5f35e7,_0x505dfb=_0x1e48b0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x145427,'threadId':_0x26cdad})['then'](()=>_0x1e48b0['remove'](_0x505dfb))['catch'](_0x46a0e4=>{throw console['error'](_0x46a0e4),new _0x5425ea('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x369507,unlinkedAt:_0x4d65e6,context:_0x4d993a,attributes:_0x47f3e8,isFromAdapter:_0x2e76cb}){if('string'!=typeof _0x369507)throw new _0x5425ea('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x369507});if(!this['hasCommentThread'](_0x369507))throw new _0x5425ea('commentsrepository-missing-comment-thread',null,{'threadId':_0x369507});const _0x178b9e=this['getCommentThread'](_0x369507);let _0x41e810=!0x1;if(void 0x0!==_0x4d993a&&_0x178b9e['context']!==_0x4d993a&&(_0x178b9e['context']=_0x4d993a,_0x41e810=!0x0),void 0x0!==_0x4d65e6&&_0x178b9e['unlinkedAt']!==_0x4d65e6&&(_0x178b9e['unlinkedAt']=_0x4d65e6,_0x41e810=!0x0),_0x47f3e8&&!At(_0x47f3e8,_0x178b9e['attributes'])&&(_0x178b9e['attributes']=_0x47f3e8,_0x41e810=!0x0),!_0x41e810)return Promise['resolve']();if(!_0x178b9e['isSubmitted']||_0x2e76cb||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x587585=this['context']['plugins']['get']('PendingActions'),{channelId:_0x251509}=_0x178b9e,_0x35435c=_0x587585['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x251509,'threadId':_0x369507,'context':_0x4d993a,'unlinkedAt':_0x4d65e6,'attributes':_0x47f3e8})['then'](()=>_0x587585['remove'](_0x35435c))['catch'](_0x5d84d6=>{throw console['error'](_0x5d84d6),new _0x5425ea('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x10003b){const _0x38d991=this['context']['plugins']['get'](y),_0x4f8e67=this['getCommentThread'](_0x10003b);if(_0x4f8e67['_isAttached']=!0x1,this['_threadToController']['has'](_0x4f8e67)){const _0x10a6db=this['_threadToController']['get'](_0x4f8e67),_0x2ba785=_0x10a6db['view'],_0x250c55=_0x38d991['getByInnerView'](_0x2ba785);this['_threadToController']['delete'](_0x4f8e67),this['_viewToController']['delete'](_0x2ba785),_0x250c55&&_0x38d991['remove'](_0x250c55),_0x10a6db['destroy'](),_0x2ba785['destroy']()['then'](()=>{this['_unbindEditors'](_0x2ba785);});}}['_updateActiveAnnotation']({threadId:_0x3f77ed,resolvedAt:_0x261b69,unlinkedAt:_0x4cd02b}){const _0xa10da0=!!_0x261b69,_0x4a532e=this['context']['plugins']['get'](y),_0x11c7b2=this['getCommentThread'](_0x3f77ed);if(this['_threadToController']['has'](_0x11c7b2)){const _0x4a40ef=this['_threadToController']['get'](_0x11c7b2)['view'],_0x295f90=_0x4a532e['getByInnerView'](_0x4a40ef);_0x295f90&&(_0xa10da0&&_0x4a532e['_removeActiveAnnotation'](_0x295f90),_0x4cd02b?_0x295f90['isVisible']=!0x1:_0x295f90['refreshVisibility']());}}['_getExternalAuthor'](_0x530485){const _0x53653e=this['context']['plugins']['get'](it),_0x1a567b=It('external:'+_0x530485),_0x444c3c=_0x53653e['getUser'](_0x1a567b);return _0x444c3c||_0x53653e['addUser']({'id':_0x1a567b,'name':_0x530485});}['_createNewComment']({threadId:_0x39e939,commentId:_0x14c809=_0x4a8c36(),content:_0xd4a9f4,authorId:_0x2bd7c4,createdAt:_0x400213,attributes:_0x53a713}){if('string'!=typeof _0x14c809)throw new _0x5425ea('commentsrepository-invalid-commentid');if('string'!=typeof _0x2bd7c4)throw new _0x5425ea('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xd4a9f4||!_0xd4a9f4['trim']())throw new _0x5425ea('commentsrepository-invalid-comment-content');const _0x2f0185=this['context']['plugins']['get'](it)['getUser'](_0x2bd7c4);if(!_0x2f0185)throw new _0x5425ea('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2bd7c4});let _0x18615e=null,_0x6a11e7=_0x400213;return _0x53a713?.['@external']&&(_0x18615e=this['_getExternalAuthor'](_0x53a713['@external']['authorName']),_0x6a11e7=new Date(_0x53a713['@external']['createdAt'])),new wi(this,{'threadId':_0x39e939,'id':_0x14c809,'author':_0x18615e||_0x2f0185,'creator':_0x2f0185,'content':_0xd4a9f4,'createdAt':_0x400213,'authoredAt':_0x6a11e7,'attributes':_0x53a713});}['_addComment'](_0x35adcb){let {threadId:_0x1c8c6c,content:_0x56196f,attributes:_0x27f7b5,isFromAdapter:_0x269303}=_0x35adcb;const _0x2426d6=this['getCommentThread'](_0x35adcb['threadId']);if(!_0x2426d6)throw new _0x5425ea('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x7f3359=this['_createNewComment'](_0x35adcb),{id:_0x58b0a9}=_0x7f3359;if(_0x2426d6['_add'](_0x7f3359),_0x269303||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2426d6['isSubmitted'])return Promise['resolve']();const _0xc68325=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2258e2}=_0x2426d6,_0xf7d102=_0xc68325['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x27f7b5||(_0x27f7b5={}),this['adapter']['addComment']({'channelId':_0x2258e2,'threadId':_0x1c8c6c,'commentId':_0x58b0a9,'content':_0x56196f,'attributes':_0x27f7b5})['then'](_0x202d3f=>{_0xc68325['remove'](_0xf7d102),_0x202d3f&&this['_updateComment']({'channelId':_0x2258e2,'threadId':_0x1c8c6c,'commentId':_0x58b0a9,'createdAt':_0x202d3f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2903b1=>{throw console['error'](_0x2903b1),new _0x5425ea('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x41d324,commentId:_0x5ad130,content:_0x1b1aaf,createdAt:_0xf2cd14,attributes:_0x44a91d,isFromAdapter:_0x493c3f}){if(void 0x0!==_0x1b1aaf&&('string'!=typeof _0x1b1aaf||!_0x1b1aaf['trim']()['length']))throw new _0x5425ea('commentsrepository-update-comment-invalid-content');const _0x9299a6=this['getCommentThread'](_0x41d324),_0x2a81cb=_0x9299a6['getComment'](_0x5ad130);if(!_0x2a81cb)throw new _0x5425ea('commentsrepository-update-missing-comment',this);let _0xdce575=!0x1;if(_0x1b1aaf&&_0x1b1aaf!==_0x2a81cb['content']&&(_0x2a81cb['isEditable']||_0x493c3f)&&(_0x2a81cb['content']=_0x1b1aaf,_0xdce575=!0x0),_0xf2cd14&&_0xf2cd14!==_0x2a81cb['createdAt']&&(_0x2a81cb['createdAt']=_0xf2cd14,_0x2a81cb['attributes']&&_0x2a81cb['attributes']['@external']||(_0x2a81cb['authoredAt']=_0xf2cd14),_0xdce575=!0x0),_0x44a91d&&!At(_0x44a91d,_0x2a81cb['attributes'])&&(_0x2a81cb['attributes']=_0x44a91d,_0xdce575=!0x0),!_0xdce575)return Promise['resolve']();if(_0x9299a6['fire']('commentUpdated'),_0x493c3f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x28087a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2fe1cb}=this['getCommentThread'](_0x2a81cb['threadId']),_0x38faa8=_0x28087a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2fe1cb,'threadId':_0x41d324,'commentId':_0x5ad130,'content':_0x1b1aaf,'attributes':_0x44a91d})['then'](()=>_0x28087a['remove'](_0x38faa8))['catch'](_0x16df69=>{throw console['error'](_0x16df69),new _0x5425ea('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x9e4b1d,commentId:_0x53d23b,isFromAdapter:_0xb8e84b}){const _0x36279c=this['getCommentThread'](_0x9e4b1d),_0x1c971b=_0x36279c['getComment'](_0x53d23b);if(!_0x1c971b)throw new _0x5425ea('commentsrepository-remove-missing-comment',this);if(_0x36279c['_remove'](_0x1c971b),_0xb8e84b||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x599cb8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16a13e}=_0x36279c,_0x2b419d=_0x599cb8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x16a13e,'threadId':_0x9e4b1d,'commentId':_0x53d23b})['then'](()=>_0x599cb8['remove'](_0x2b419d))['catch'](_0x2fc36b=>{throw console['error'](_0x2fc36b),new _0x5425ea('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x412ccb(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5efed3,_0x460a05){super();const _0x52cf60=_0x460a05['isResolvable'];this['channelId']=_0x460a05['channelId'],this['id']=_0x460a05['id'],this['comments']=new _0x262a30(),this['_repository']=_0x5efed3,this['_isAttached']=!0x1,this['_isSubmitted']=_0x460a05['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5efed3,'_permissions',_0x5efed3,'_readOnlyChannels',()=>_0x5efed3['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5efed3,'_permissions',()=>_0x5efed3['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5efed3,'_permissions',()=>{const _0x4f7343=_0x5efed3['getPermissions'](this['channelId']);return _0x4f7343['write']||_0x4f7343['admin'];}),this['bind']('isResolvable')['to'](_0x5efed3,'_permissions',()=>_0x52cf60&&_0x5efed3['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x460a05['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5d93e4,_0xc8ec8f)=>_0x5d93e4?_0xc8ec8f?_0x5d93e4<_0xc8ec8f?_0x5d93e4:_0xc8ec8f:_0x5d93e4:_0xc8ec8f),this['set']('unlinkedAt',_0x460a05['unlinkedAt']||null),this['set']('resolvedAt',_0x460a05['resolvedAt']||null),this['set']('resolvedBy',_0x460a05['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4a26d2=>!!_0x4a26d2),this['set']('attributes',_0x460a05['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2796fb,_0x3f0c91)=>_0x2796fb+_0x3f0c91['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x32e66e,id:_0x5dc921}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x32e66e),{'channelId':_0x32e66e,'threadId':_0x5dc921});}['setUnlinkedAt'](_0x1b5a29){this['_update']({'unlinkedAt':_0x1b5a29});}['resolve']({resolvedAt:_0x1b22ca=new Date(),resolvedBy:_0x10c4c5='',isFromAdapter:_0xc5f1e3=!0x1}={}){const _0x12e171=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x414eeb,id:_0xb8074c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x414eeb),{'channelId':_0x414eeb,'threadId':_0xb8074c,'resolvedAt':_0x1b22ca,'resolvedBy':_0x10c4c5||_0x12e171['id'],'isFromAdapter':_0xc5f1e3});}['reopen']({isFromAdapter:_0x3d354f=!0x1}={}){const {channelId:_0x58d33e,id:_0x3d4eff}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x58d33e),{'channelId':_0x58d33e,'threadId':_0x3d4eff,'isFromAdapter':_0x3d354f});}['setContext'](_0x492e1a){this['context']||this['_update']({'context':_0x492e1a});}['setAttribute'](_0x1bcca1,_0xd992e7){const _0x1b615a=wt(this['attributes']);yt(_0x1b615a,_0x1bcca1,_0xd992e7),this['_update']({'attributes':_0x1b615a});}['removeAttribute'](_0x5d7d41){const _0x2ea094=wt(this['attributes']);Ct(_0x2ea094,_0x5d7d41),this['_update']({'attributes':_0x2ea094});}['remove']({isFromAdapter:_0xce5a05=!0x1}={}){const {channelId:_0x10b717,id:_0x4a0461}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x10b717),{'channelId':_0x10b717,'threadId':_0x4a0461,'isFromAdapter':_0xce5a05});}['attachTo'](_0x1ee629){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1ee629});}['addComment'](_0x219635){const {channelId:_0x4e338e,id:_0x2512e3}=this;this['_repository']['fire'](Nt('addComment',_0x4e338e,_0x2512e3),Object['assign']({'channelId':_0x4e338e,'threadId':_0x2512e3},_0x219635));}['getComment'](_0x5e6aa1){if('string'!=typeof _0x5e6aa1)throw new _0x5425ea('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5e6aa1});return this['comments']['get'](_0x5e6aa1);}['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'](_0x1825ca=>_0x1825ca['toJSON']()),'attributes':this['attributes']};}['_add'](_0xb31f61){return this['listenTo'](_0xb31f61,'change:authoredAt',()=>{const _0x2256b9=this['_findOptimalIndex'](_0xb31f61),_0x423432=this['comments'];_0x2256b9-0x1!=_0x423432['getIndex'](_0xb31f61)&&_0x2256b9+0x1!=_0x423432['getIndex'](_0xb31f61)&&(this['_remove'](_0xb31f61),this['_add'](_0xb31f61));}),this['comments']['add'](_0xb31f61,this['_findOptimalIndex'](_0xb31f61));}['_update'](_0x1ddd35){const {channelId:_0x5cf875,id:_0x3cf9cd}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x5cf875),{..._0x1ddd35,'channelId':_0x5cf875,'threadId':_0x3cf9cd});}['_remove'](_0x4ed7c4){return this['stopListening'](_0x4ed7c4),_0x4ed7c4['destroy'](),this['comments']['remove'](_0x4ed7c4);}['_findOptimalIndex'](_0x2644c5){const _0x25ad9a=this['comments']['find'](_0x8c0373=>new Date(_0x8c0373['authoredAt'])['getTime']()>new Date(_0x2644c5['authoredAt'])['getTime']());return _0x25ad9a?this['comments']['getIndex'](_0x25ad9a):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x412ccb(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x361c51,_0x14a819){super();const _0xd01de2=_0x361c51['context']['plugins']['get'](it)['me'],_0x15a481=_0x361c51['getCommentThread'](_0x14a819['threadId']),_0x318242=0x0===_0x15a481['comments']['length'],_0x485f8d=_0xd01de2===_0x14a819['author'];this['id']=_0x14a819['id'],this['threadId']=_0x14a819['threadId'],this['author']=_0x14a819['author'],this['creator']=_0x14a819['creator'],this['isExternal']=Boolean(_0x14a819['attributes']&&_0x14a819['attributes']['@external']),this['set']('content',_0x14a819['content']),this['createdAt']=_0x14a819['createdAt']||new Date(),this['set']('authoredAt',_0x14a819['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x15a481,'resolvedAt'),this['set']('attributes',_0x14a819['attributes']||{}),this['bind']('isEditable')['to'](_0x361c51,'_permissions',()=>{const _0x1d6968=_0x361c51['getPermissions'](_0x15a481['channelId'])['write'],_0x4d6916=_0x361c51['getPermissions'](_0x15a481['channelId'])['modifyAll'];return _0x485f8d&&_0x1d6968||!_0x485f8d&&_0x4d6916;}),this['bind']('isRemovable')['to'](_0x15a481,'isRemovable',_0x361c51,'_permissions',_0x32e300=>{const _0x21188b=_0x361c51['getPermissions'](_0x15a481['channelId'])['write'],_0x58d800=_0x361c51['getPermissions'](_0x15a481['channelId'])['modifyAll'];return _0x485f8d&&_0x21188b||_0x32e300&&_0x318242||!_0x485f8d&&_0x58d800&&!_0x318242;}),this['bind']('isReadOnly')['to'](_0x15a481,'isReadOnly'),this['_repository']=_0x361c51;}get['weight'](){return Math['max'](function(_0x5ebec6){const _0x3a8966=document['createElement']('div');return _0x3a8966['innerHTML']=_0x5ebec6,_0x3a8966['textContent']['length'];}(this['content']),0xc8);}['update'](_0x55b7fb){const {threadId:_0x23755e,id:_0x130594}=this;if(!this['_repository']['hasCommentThread'](_0x23755e))throw new _0x5425ea('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4dbdfb}=this['_repository']['getCommentThread'](_0x23755e);this['_repository']['fire'](Nt('updateComment',_0x4dbdfb,_0x23755e),{'channelId':_0x4dbdfb,'threadId':_0x23755e,'commentId':_0x130594,..._0x55b7fb});}['setAttribute'](_0x430f98,_0x29f7e5){const _0x35aa7c=wt(this['attributes']);yt(_0x35aa7c,_0x430f98,_0x29f7e5),this['update']({'attributes':_0x35aa7c});}['removeAttribute'](_0x37775f){const _0x19fa75=wt(this['attributes']);Ct(_0x19fa75,_0x37775f),this['update']({'attributes':_0x19fa75});}['remove'](_0x1e20d9={}){if(!_0x1e20d9['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xe8b2c7,id:_0x30e405}=this;if(!this['_repository']['hasCommentThread'](_0xe8b2c7))throw new _0x5425ea('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x12e2a1}=this['_repository']['getCommentThread'](_0xe8b2c7);this['_repository']['fire'](Nt('removeComment',_0x12e2a1,_0xe8b2c7),{'channelId':_0x12e2a1,'threadId':_0xe8b2c7,'commentId':_0x30e405,..._0x1e20d9});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x12d06f,..._0x337643){for(const _0x5d8205 of _0x337643)void 0x0!==_0x5d8205&&(_0x12d06f+=':'+String(_0x5d8205));return _0x12d06f;}class ot extends _0x3b02de{constructor(_0x43b432){super(_0x43b432),this['set']('hasContent',!0x1);}['refresh'](){const _0x581fad=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xd9eb92 of _0x581fad['getRanges']())if(this['_hasContent'](_0xd9eb92))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x447ec7=_0x4a8c36(),ranges:_0x46c5eb,comment:_0x2820b1}={}){const _0x276401=this['editor']['model'],_0x2d12a7=_0x46c5eb??Array['from'](_0x276401['document']['selection']['getRanges']()),_0x208745=[];for(const _0x2f278d of _0x2d12a7)this['_hasContent'](_0x2f278d)&&_0x208745['push'](this['_trimToContent'](_0x2f278d));if(!_0x208745['length'])throw new _0x5425ea('addcommentthreadcommand-incorrect-ranges',null);_0x2820b1&&this['_createCommentThread'](_0x447ec7,_0x2820b1),this['_createMarkersFromRanges'](_0x447ec7,_0x208745,!!_0x2820b1);}['_createMarkersFromRanges'](_0xfcd9,_0x56fa3f,_0x493cff){this['editor']['model']['change'](_0x5865d0=>{for(const _0xe12ef2 of _0x56fa3f){const _0x3df5e0=_0x4a8c36()['substr'](0x1,0x5),_0x2e2649='comment:'+_0xfcd9+':'+_0x3df5e0;_0x5865d0['addMarker'](_0x2e2649,{'range':_0xe12ef2,'usingOperation':_0x493cff,'affectsData':_0x493cff});}});}['_createCommentThread'](_0x42c7dc,_0x3f3802){const _0x27996f=this['editor']['plugins']['get']('CommentsRepository'),_0x2158d3=this['editor']['config']['get']('collaboration.channelId'),_0x29c76c=this['editor']['plugins']['get']('Users')['me'];if(!_0x29c76c)throw new _0x5425ea('addcommentthreadcommand-user-not-found',null);_0x27996f['addCommentThread']({'threadId':_0x42c7dc,'channelId':_0x2158d3,'comments':[{'authorId':_0x29c76c['id'],'content':_0x3f3802,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4f2171){for(const _0x47bd3e of _0x4f2171['getItems']())if(this['_itemIsContent'](_0x47bd3e))return!0x0;return!0x1;}['_itemIsContent'](_0x851ebc){return _0x851ebc['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x851ebc)&&!_0x851ebc['is']('element','tableCell');}['_trimToContent'](_0x5a6538){const _0x533e76=_0xe1a4e7=>!this['_itemIsContent'](_0xe1a4e7['item']),_0xe43c91=_0x5a6538['start']['getLastMatchingPosition'](_0x533e76),_0x388bff=_0x5a6538['end']['getLastMatchingPosition'](_0x533e76,{'direction':'backward'});return this['editor']['model']['createRange'](_0xe43c91,_0x388bff);}}class b extends _0x58c0a0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d76eb){super(_0x3d76eb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x240072=this['editor'],_0x59b036=_0x240072['model']['document']['selection'],_0x583ed6=_0x20bca9(()=>this['refreshSelectedViews'](),0xa);_0x59b036['on']('change:range',(_0x13325e,_0x264f14)=>{_0x264f14['directChange']&&(_0x583ed6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x240072['editing']['view']['document'],'change:isFocused',(_0x23a1b8,_0x1d321e,_0x42bc2a)=>{_0x42bc2a&&_0x583ed6();}),this['listenTo'](_0x240072['ui']['focusTracker'],'change:isFocused',(_0x3d6475,_0x4f0d53,_0x39739e)=>{_0x39739e||this['fire']('blur',{'isAnnotationTracked':_0x3609d6=>this['_editorAnnotationsData']['has'](_0x3609d6['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x440b52){if(this['_editorAnnotations']['has'](_0x440b52['view']))return;this['_editorAnnotations']['add'](_0x440b52['view']),this['editor']['ui']['focusTracker']['add'](_0x440b52['view']['element']);const _0x1031bf=this['editor']['plugins']['get'](y);this['listenTo'](_0x1031bf['collection'],'remove',(_0x5131f0,_0x5cbaf6)=>{this['editor']['ui']['focusTracker']['remove'](_0x5cbaf6['view']['element']),this['_editorAnnotations']['delete'](_0x5cbaf6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x258865){if('function'!=typeof _0x258865)throw new _0x5425ea('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x258865);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x12685c,annotations:_0x5984dc}){const _0x51265d=[],_0x1ae182=this['editor']['model']['document']['selection'],_0x4c5720=Array['from'](_0x1ae182['getRanges']());for(const [_0x81c87d,_0x4d8ba9]of this['_editorAnnotationsData']){const _0x4646a6=_0x246473(_0x4d8ba9),_0xd04369=_0x5984dc['getByInnerView'](_0x81c87d);_0x4646a6&&_0xd04369&&_0x51265d['push']({'annotation':_0xd04369,'range':_0x4646a6});}function _0x246473(_0x302dfe){for(const _0x22aa77 of _0x302dfe)for(const _0x426da6 of _0x4c5720)if(_0x22aa77['containsRange'](_0x426da6,!_0x1ae182['isCollapsed']))return _0x22aa77;return null;}return _0x51265d['sort']((_0xd39b9e,_0x14d70d)=>{const _0x296e7f=_0xd39b9e['range'],_0x58f6de=_0x14d70d['range'];if(!_0x296e7f['isEqual'](_0x58f6de)){if(_0x296e7f['containsRange'](_0x58f6de,!0x0))return 0x1;if(_0x58f6de['containsRange'](_0x296e7f,!0x0))return-0x1;}return _0xd39b9e['annotation']==_0x12685c?-0x1:_0x14d70d['annotation']==_0x12685c?0x1:0x0;})['map'](_0x615a15=>_0x615a15['annotation']);}get['_editorAnnotationsData'](){const _0x4e01d4=new Map();for(const _0x56aaab of Array['from'](this['_dataCollectors']))for(const [_0x4ad390,_0x4bcadb]of _0x56aaab())_0x4e01d4['set'](_0x4ad390,_0x4bcadb);return _0x4e01d4;}}class st extends _0x58c0a0{['afterInit'](){const _0x58e6cc=this['editor'];if(!_0x58e6cc['plugins']['has']('RestrictedEditingModeEditing'))return;_0x58e6cc['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x58c0a0{constructor(_0x4c36be){super(_0x4c36be),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x31010e=this['editor'],_0x432856=_0x31010e['commands']['get']('importWord'),_0x4253c1=_0x31010e['plugins']['get'](it);_0x432856&&(_0x432856['on']('execute',(_0x3da225,[,_0x4f82e2])=>{_0x4f82e2['collaboration_features']={'comments':!0x0,'user_id':_0x4253c1['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x432856,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x6e3313,_0x1d3d4e){const {comment_threads:_0x16e530}=_0x1d3d4e;_0x16e530&&_0x16e530['forEach'](({thread_id:_0x5d63f1,comments:_0x30b746,is_resolved:_0x108681})=>{const _0x31fe9f=new Date(),_0x471a45=_0x30b746['map'](({author:_0x2b0ace,content:_0x3108c5,created_at:_0x101f37})=>({'content':_0x3108c5,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x31fe9f,'attributes':{'@external':{'authorName':_0x2b0ace,'createdAt':_0x101f37?new Date(_0x101f37):new Date(),'source':'importWord'}}})),_0xad1423=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xad1423,'threadId':_0x5d63f1,'comments':_0x471a45,'resolvedAt':_0x108681?_0x31fe9f:null});});}}class at extends _0x58c0a0{constructor(_0x2fa5d6){super(_0x2fa5d6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x14b843=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x14b843,'contentInsertion',(_0x435a50,_0x3b6c4d)=>this['_removeMarkersWithoutThreads'](_0x3b6c4d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x16c231){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x16c231;const _0x1c0783=this['editor']['plugins']['get']('CommentsRepository');for(const _0xb6fc8b of _0x16c231['keys']()){const [_0xd4955e,_0x30dddc]=_0xb6fc8b['split'](':');'comment'!=_0xd4955e||_0x1c0783['hasCommentThread'](_0x30dddc)||_0x16c231['delete'](_0xb6fc8b);}return _0x16c231;}['_registerMarkerInClipboardPipeline'](){const _0x42215f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x16f6b4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x16f6b4&&_0x42215f['_registerMarkerToCopy']('comment',_0x16f6b4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x38edb6){switch(_0x38edb6){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x43400f){const _0x52b10b=_0x43400f['split'](':');return{'group':_0x52b10b[0x0],'id':_0x52b10b[0x1],'part':_0x52b10b[0x2]};}class ut extends _0x58c0a0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x30b9af,_0x9928ae)=>{if(!_0x9928ae['options']['showCommentHighlights'])return null;if(_0x9928ae['options']['ignoreResolvedComments']){const {id:_0x288940}=ft(_0x30b9af['markerName']),_0xe6e6cd=this['editor']['plugins']['get'](o);if(_0xe6e6cd['getCommentThread'](_0x288940)?.['isResolved']&&_0x30b9af['item'])return _0x9928ae['consumable']['consume'](_0x30b9af['item'],'addMarker:'+_0x30b9af['markerName']),_0x9928ae['consumable']['consume'](_0x30b9af['item'],'removeMarker:'+_0x30b9af['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x323697=>{_0x323697['on']('addMarker:comment',(_0x175a30,_0x384330,_0x46011a)=>{if(!_0x46011a['options']['showCommentHighlights'])return;const _0x2a725a=_0x384330['item'];if(!_0x2a725a)return;const _0x312331=_0x46011a['mapper']['toViewElement'](_0x2a725a);this['editor']['model']['schema']['isObject'](_0x2a725a)&&_0x312331&&!_0x312331['getCustomProperty']('widget')&&_0x312331['is']('containerElement')&&_0x369070(_0x312331,_0x46011a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x335b04,{writer:_0x1fdcf3,options:_0x516a4d})=>{if(!_0x516a4d['showCommentHighlights'])return null;const _0x16b1e7=_0x1fdcf3['createContainerElement']('div'),_0x515405=_0x1fdcf3['createEmptyElement']('hr');return _0x1fdcf3['addClass']('ck-horizontal-line',_0x16b1e7),_0x1fdcf3['insert'](_0x1fdcf3['createPositionAt'](_0x16b1e7,0x0),_0x515405),_0x16b1e7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x26e3de,{writer:_0x5a73f2,options:_0x58d168})=>{if(!_0x58d168['showCommentHighlights'])return null;const _0x50e516=_0x5a73f2['createContainerElement']('span'),_0xade260=_0x5a73f2['createEmptyElement']('img');return _0x5a73f2['addClass']('image-inline',_0x50e516),_0x5a73f2['insert'](_0x5a73f2['createPositionAt'](_0x50e516,0x0),_0xade260),_0x50e516;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3b5fd0,{writer:_0x382ece,options:_0x940541})=>{if(_0x940541['showCommentHighlights'])return _0x382ece['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xc98d98,_0xf91148,_0x2ea3ff)=>{_0x2ea3ff['options']['showCommentHighlights']&&_0xc98d98['stop']();},{'priority':'high'});}}class r extends _0x58c0a0{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(_0x2ea26a){super(_0x2ea26a),this['set']('isThreadsLoadingPaused',!0x0),_0x2ea26a['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xeaa444,_0x327291,_0x418ed3,_0x23e993)=>{const _0x93e8d1=_0x2ea26a['plugins']['get'](o),_0x334b88=_0x418ed3?ft(_0x418ed3)['id']:null;_0x2ea26a['model']['change'](()=>{if(_0x334b88){const _0xbae9ef=this['getAllMarkersForId'](_0x334b88);for(const _0x1f299c of _0xbae9ef)_0x2ea26a['editing']['reconvertMarker'](_0x1f299c);}if(_0x23e993){const {id:_0x25548d}=ft(_0x23e993),_0x5ae6e8=_0x93e8d1['getCommentThread'](_0x25548d);if(_0x5ae6e8&&_0x5ae6e8['unlinkedAt'])return;if(_0x5ae6e8&&!_0x5ae6e8['isAttached'])return;const _0x33fda1=this['getAllMarkersForId'](_0x25548d);for(const _0x40ced7 of _0x33fda1)_0x2ea26a['editing']['reconvertMarker'](_0x40ced7);}}),_0x334b88&&this['scrollToThreadMarker'](_0x334b88);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2e3001=this['editor'],_0x23629f=_0x2e3001['plugins']['get'](o),_0x2f5937=_0x2e3001['config']['get']('collaboration.channelId'),_0x29a3e1=_0x23629f['getCommentThreads']()['filter'](_0x307367=>_0x307367['channelId']!==_0x2f5937);_0x2e3001['commands']['add']('addCommentThread',new ot(_0x2e3001)),this['listenTo'](_0x2e3001,'change:isReadOnly',(_0x79da73,_0x428c15,_0xe0d0d5)=>{_0x23629f['switchReadOnly'](_0xe0d0d5,_0x2e3001['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x23629f,dt('addCommentThread',_0x2f5937),(_0x5d72b8,{threadId:_0x4cba34})=>{const _0x35baa0=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4cba34);_0x35baa0?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4cba34);}),this['listenTo'](_0x23629f,dt('removeCommentThread',_0x2f5937),(_0x2b2b9f,{threadId:_0x49b424})=>{_0x2e3001['model']['enqueueChange']({'isUndoable':!0x1},_0x3664fc=>{const _0x5f000d=this['getAllMarkersForId'](_0x49b424);for(const _0x31eae2 of _0x5f000d)_0x3664fc['removeMarker'](_0x31eae2);});}),this['listenTo'](_0x23629f,dt('resolveCommentThread',_0x2f5937),(_0xc94242,{threadId:_0x1b78f3})=>{(this['_reconvertMarkers'](_0x1b78f3),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1b78f3)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x23629f,dt('reopenCommentThread',_0x2f5937),(_0x558076,{threadId:_0x100a4b})=>{this['_reconvertMarkers'](_0x100a4b);},{'priority':'low'}),this['listenTo'](_0x23629f,dt('addComment',_0x2f5937),(_0x4d4964,{threadId:_0x3c83d8,isFromAdapter:_0x4910f3})=>{const _0x404581=this['getAllMarkersForId'](_0x3c83d8);if(_0x4910f3||0x0==_0x404581['length']||!_0x23629f['hasCommentThread'](_0x3c83d8))return;0x1===_0x23629f['getCommentThread'](_0x3c83d8)['length']&&_0x2e3001['model']['enqueueChange']({'isUndoable':!0x1},_0x2c2061=>{for(const _0x1744d7 of _0x404581)_0x2c2061['updateMarker'](_0x1744d7,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x29a3e1);}['afterInit'](){!async function(_0x1c5d65){const _0x24b13b=_0x5a73e8([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x1e1109=0x73460ab3,_0x51a53c=0x734182a3^_0x1e1109,_0x5ba57a=window[_0x5a73e8([0x44,0x61,0x74,0x65])][_0x5a73e8([0x6e,0x6f,0x77])](),_0x39028f=_0x1c5d65[_0x5a73e8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a7994=new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1766e5=>{_0x39028f[_0x5a73e8([0x6f,0x6e,0x63,0x65])](_0x5a73e8([0x72,0x65,0x61,0x64,0x79]),_0x1766e5);}),_0x27bba2={[_0x5a73e8([0x6b,0x74,0x79])]:_0x5a73e8([0x45,0x43]),[_0x5a73e8([0x75,0x73,0x65])]:_0x5a73e8([0x73,0x69,0x67]),[_0x5a73e8([0x63,0x72,0x76])]:_0x5a73e8([0x50,0x2d,0x32,0x35,0x36]),[_0x5a73e8([0x78])]:_0x5a73e8([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]),[_0x5a73e8([0x79])]:_0x5a73e8([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]),[_0x5a73e8([0x61,0x6c,0x67])]:_0x5a73e8([0x45,0x53,0x32,0x35,0x36])},_0x197b51=_0x39028f[_0x5a73e8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5a73e8([0x67,0x65,0x74])](_0x5a73e8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2e872e(){let _0xf5b03b,_0x4569ae=null,_0x42280f=null;try{if(_0x197b51==_0x5a73e8([0x47,0x50,0x4c]))return _0x5a73e8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xf5b03b=_0x154681(),!_0xf5b03b)return _0x5a73e8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xf5b03b[_0x5a73e8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x42280f=_0x385664(_0xf5b03b[_0x5a73e8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xf5b03b[_0x5a73e8([0x6a,0x74,0x69])])),await _0x534ad4()?_0x157ea8()?_0xd19c32()?_0x5a73e8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x400e66()?(_0xf5b03b[_0x5a73e8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5a73e8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4569ae=_0x3e92f3(_0x5a73e8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x380a52()):_0x5a73e8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5a73e8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5a73e8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5a73e8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xd19c32(){const _0x521015=[_0x5a73e8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5a73e8([0x74,0x72,0x69,0x61,0x6c])][_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf5b03b[_0x5a73e8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5ba57a/0x3e8:0xe10*_0x51a53c;return _0xf5b03b[_0x5a73e8([0x65,0x78,0x70])]<_0x521015;}function _0x157ea8(){const _0x2a7bd6=_0xf5b03b[_0x5a73e8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2a7bd6)return!0x1;if(_0x2a7bd6[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x2a])))return!0x0;if(_0x2a7bd6[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x43,0x4d,0x54])))return!0x0;if(_0x2a7bd6[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x2d7fbc())return!0x0;if(_0x2a7bd6[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x52,0x43,0x4d,0x54]))){if(_0x4fa509())return!0x0;if(_0x43c32a()||_0x39c830())return!0x0;}return!0x1;}function _0x400e66(){const _0x300794=_0xf5b03b[_0x5a73e8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x300794||0x0==_0x300794[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x45c090}=new URL(window[_0x5a73e8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x300794[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45c090))return!0x0;const _0x52a12e=_0x45c090[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])](_0x5a73e8([0x2e]));return _0x300794[_0x5a73e8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x422d2c=>_0x422d2c[_0x5a73e8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a73e8([0x2a])))[_0x5a73e8([0x6d,0x61,0x70])](_0x58861d=>_0x58861d[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])](_0x5a73e8([0x2e])))[_0x5a73e8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x108d9e=>_0x108d9e[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x52a12e[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5a73e8([0x6d,0x61,0x70])](_0x6bde96=>Array(_0x52a12e[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x6bde96[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5a73e8([0x66,0x69,0x6c,0x6c])](_0x6bde96[0x0]===_0x5a73e8([0x2a])?_0x5a73e8([0x2a]):'')[_0x5a73e8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x6bde96))[_0x5a73e8([0x73,0x6f,0x6d,0x65])](_0x346dc0=>_0x52a12e[_0x5a73e8([0x65,0x76,0x65,0x72,0x79])]((_0xde90fa,_0x49447e)=>_0x346dc0[_0x49447e]===_0xde90fa||_0x346dc0[_0x49447e]===_0x5a73e8([0x2a])));}function _0x380a52(){return _0x4569ae&&_0x42280f?new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a2f1a,_0x1b9759)=>{_0x4569ae[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x3a2f1a,_0x1b9759),_0x42280f[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x572a56=>{_0x572a56!=_0x5a73e8([0x56,0x61,0x6c,0x69,0x64])&&_0x3a2f1a(_0x572a56);},_0x1b9759);}):_0x4569ae||_0x42280f||_0x5a73e8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x385664(_0x16cafe,_0x24efff){return new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b0bae=>{if(_0x4d177f())return _0x4b0bae(_0x5a73e8([0x56,0x61,0x6c,0x69,0x64]));_0x3dad99(),_0x39028f[_0x5a73e8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5a73e8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x169795=!0x1;const _0x407392=_0x4a8c36();function _0x56bc13(_0x1899dd){return!!_0x1899dd&&(typeof _0x1899dd===_0x5a73e8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1899dd===_0x5a73e8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1899dd[_0x5a73e8([0x74,0x68,0x65,0x6e])]===_0x5a73e8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1899dd[_0x5a73e8([0x63,0x61,0x74,0x63,0x68])]===_0x5a73e8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2dd7b6(_0x1b6d5b){_0x2be0fa(_0x1b6d5b)[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x42a0c8=>{if(!_0x42a0c8||_0x42a0c8[_0x5a73e8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5a73e8([0x6f,0x6b]))return _0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xc05821(_0x5eafe5(_0x407392+_0x24efff))!=_0x42a0c8[_0x5a73e8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5a73e8([0x56,0x61,0x6c,0x69,0x64]);})[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x503347=>(_0x5bdfec(),_0x503347),()=>{const _0x197e03=_0x56d438();return null==_0x197e03?(_0x5bdfec(),_0x5a73e8([0x56,0x61,0x6c,0x69,0x64])):_0x5a73e8(_0x5ba57a-_0x197e03>(0x574a8eb3^_0x1e1109)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x4b0bae)[_0x5a73e8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4b0bae(_0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x31a9e2=0x7370e433^_0x1e1109;function _0x5bdfec(){const _0x4d0ef1=_0x5a73e8([0x6c,0x6c,0x63,0x74,0x2d])+_0xc05821(_0x5eafe5(_0x16cafe)),_0x2b1b24=_0xb178ab(_0xc05821(window[_0x5a73e8([0x4d,0x61,0x74,0x68])][_0x5a73e8([0x63,0x65,0x69,0x6c])](_0x5ba57a/_0x31a9e2)));window[_0x5a73e8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5a73e8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d0ef1,_0x2b1b24);}function _0x56d438(){const _0x2beb0f=_0x5a73e8([0x6c,0x6c,0x63,0x74,0x2d])+_0xc05821(_0x5eafe5(_0x16cafe)),_0x365af2=window[_0x5a73e8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5a73e8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2beb0f);return _0x365af2?window[_0x5a73e8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb178ab(_0x365af2),0x10)*_0x31a9e2:null;}function _0x2be0fa(_0x34d50b){return new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x52ee56,_0x48a28a)=>{_0x34d50b[_0x5a73e8([0x74,0x68,0x65,0x6e])](_0x52ee56,_0x48a28a),window[_0x5a73e8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x48a28a,0x7347de73^_0x1e1109);});}}_0x39028f[_0x5a73e8([0x6f,0x6e])](_0x5a73e8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5bbad5,_0xef5f98)=>{if(_0xef5f98[0x0]!=_0x16cafe)return _0x4b0bae(_0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xef5f98[0x1]={..._0xef5f98[0x1],[_0x5a73e8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x407392};},{[_0x5a73e8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5a73e8([0x68,0x69,0x67,0x68])}),_0x39028f[_0x5a73e8([0x6f,0x6e])](_0x5a73e8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2f0e13=>{_0x56bc13(_0x2f0e13[_0x5a73e8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x169795=!0x0,_0x2dd7b6(_0x2f0e13[_0x5a73e8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5a73e8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5a73e8([0x6c,0x6f,0x77])}),_0x3a7994[_0x5a73e8([0x74,0x68,0x65,0x6e])](()=>{_0x169795||_0x4b0bae(_0x5a73e8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4d177f(){return _0x39028f[_0x5a73e8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a73e8([0x76,0x69,0x65,0x77])][_0x5a73e8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5a73e8([0x61,0x75,0x74,0x6f]);}function _0x3dad99(){_0x39028f[_0x5a73e8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a73e8([0x76,0x69,0x65,0x77])][_0x5a73e8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5a73e8([0x61,0x75,0x74,0x6f]);}}function _0x3e92f3(_0x2b5706){const _0x4bd914=[new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18feaa=>setTimeout(_0x18feaa,0x734f347f^_0x1e1109)),_0x3a7994[_0x5a73e8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36c4ca=>{let _0x58e0a8=0x0;_0x39028f[_0x5a73e8([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a73e8([0x6f,0x6e])](_0x5a73e8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5eea03,_0x3d4a9a)=>{_0x3d4a9a[0x0][_0x5a73e8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x58e0a8++,_0x58e0a8==(0x73460f5b^_0x1e1109)&&(_0x36c4ca(),_0x5eea03[_0x5a73e8([0x6f,0x66,0x66])]());});}))];return window[_0x5a73e8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5a73e8([0x72,0x61,0x63,0x65])](_0x4bd914)[_0x5a73e8([0x74,0x68,0x65,0x6e])](()=>_0x2b5706);}async function _0x22098a(){await _0x3a7994,_0x39028f[_0x5a73e8([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a73e8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x24de94,_0x39028f[_0x5a73e8([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a73e8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x24de94,_0x39028f[_0x5a73e8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5a73e8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2d7fbc(){return window[_0x5a73e8([0x67,0x6c,0x6f,0x62])]&&window[_0x5a73e8([0x67,0x6c,0x6f,0x62])][_0x5a73e8([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x4fa509(){return _0x4877b4(_0x5a73e8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x27e849(_0x5a73e8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5a73e8([0x73,0x74,0x61,0x74,0x65])]==_0x5a73e8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x43c32a(){return _0x4877b4(_0x5a73e8([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 _0x39c830(){return _0x4877b4(_0x5a73e8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2862ab(_0x1f321e){const _0xa9e15b=_0x521bc1();_0x39028f[_0xa9e15b]=_0x5a73e8([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1f321e,_0x1f321e!=_0x5a73e8([0x56,0x61,0x6c,0x69,0x64])&&_0x22098a();}function _0x521bc1(){const _0x5b4b75=window[_0x5a73e8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5a73e8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5a73e8([0x6e,0x6f,0x77])]())[_0x5a73e8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5a73e8([0x2e]),'');let _0xa418f3=_0x5a73e8([0x4b]);for(let _0x3a2897=0x0;_0x3a2897<_0x5b4b75[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3a2897+=0x2){let _0x3b7fd5=window[_0x5a73e8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5b4b75[_0x5a73e8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3a2897,_0x3a2897+0x2));_0x3b7fd5>=_0x24b13b[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3b7fd5-=_0x24b13b[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xa418f3+=_0x24b13b[_0x3b7fd5];}return _0xa418f3;}function _0x154681(){const _0x351271=_0x197b51[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])](_0x5a73e8([0x2e]));if(0x3!=_0x351271[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xbd6be8(_0x351271[0x1]);function _0xbd6be8(_0x1c8fc4){const _0x298e9e=_0x28328b(_0x1c8fc4);return _0x298e9e&&_0x53adc4()?_0x298e9e:null;function _0x53adc4(){const _0x1122ee=_0x298e9e[_0x5a73e8([0x6a,0x74,0x69])],_0x4c4bfb=window[_0x5a73e8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1122ee[_0x5a73e8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1122ee[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x40d534={..._0x298e9e,[_0x5a73e8([0x6a,0x74,0x69])]:_0x1122ee[_0x5a73e8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1122ee[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x40d534[_0x5a73e8([0x76,0x63])],_0x5eafe5(_0x40d534)==_0x4c4bfb;}}}async function _0x534ad4(){let _0x2458f6=!0x0;try{const _0x251da8=_0x197b51[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])](_0x5a73e8([0x2e])),[_0x562480,_0x1f60e5,_0x11df04]=_0x251da8;return _0x335054(_0x562480),await _0x48c66f(_0x562480,_0x1f60e5,_0x11df04),_0x2458f6;}catch{return!0x1;}function _0x335054(_0x4facd1){const _0x22bd93=_0x28328b(_0x4facd1);_0x22bd93&&_0x22bd93[_0x5a73e8([0x61,0x6c,0x67])]==_0x5a73e8([0x45,0x53,0x32,0x35,0x36])||(_0x2458f6=!0x1);}async function _0x48c66f(_0x1344e1,_0x17ff40,_0x2ab7af){const _0x5777af=window[_0x5a73e8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5a73e8([0x66,0x72,0x6f,0x6d])](_0x405308(_0x2ab7af),_0x401b05=>_0x401b05[_0x5a73e8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x472918=new window[(_0x5a73e8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5a73e8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1344e1+_0x5a73e8([0x2e])+_0x17ff40),_0x2533c0=window[_0x5a73e8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5a73e8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2533c0)return;const _0x238347=await _0x2533c0[_0x5a73e8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5a73e8([0x6a,0x77,0x6b]),_0x27bba2,{[_0x5a73e8([0x6e,0x61,0x6d,0x65])]:_0x5a73e8([0x45,0x43,0x44,0x53,0x41]),[_0x5a73e8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5a73e8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5a73e8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2533c0[_0x5a73e8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5a73e8([0x6e,0x61,0x6d,0x65])]:_0x5a73e8([0x45,0x43,0x44,0x53,0x41]),[_0x5a73e8([0x68,0x61,0x73,0x68])]:{[_0x5a73e8([0x6e,0x61,0x6d,0x65])]:_0x5a73e8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x238347,_0x5777af,_0x472918)||(_0x2458f6=!0x1);}}function _0x28328b(_0x1a9eb7){return _0x1a9eb7[_0x5a73e8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5a73e8([0x65,0x79]))?JSON[_0x5a73e8([0x70,0x61,0x72,0x73,0x65])](_0x405308(_0x1a9eb7)):null;}function _0x405308(_0xb3de00){return window[_0x5a73e8([0x61,0x74,0x6f,0x62])](_0xb3de00[_0x5a73e8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5a73e8([0x2b]))[_0x5a73e8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5a73e8([0x2f])));}function _0x5eafe5(_0x480dee){let _0x5bfc30=0x1505;function _0x5776bb(_0xe1fd86){for(let _0x3e734c=0x0;_0x3e734c<_0xe1fd86[_0x5a73e8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3e734c++){const _0x36c1aa=_0xe1fd86[_0x5a73e8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3e734c);_0x5bfc30=(_0x5bfc30<<0x5)+_0x5bfc30+_0x36c1aa,_0x5bfc30&=_0x5bfc30;}}function _0x5c5163(_0x196f39){Array[_0x5a73e8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x196f39)?_0x196f39[_0x5a73e8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5c5163):_0x196f39&&typeof _0x196f39==_0x5a73e8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5a73e8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x196f39)[_0x5a73e8([0x73,0x6f,0x72,0x74])]()[_0x5a73e8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x273458,_0x46806d])=>{_0x5776bb(_0x273458),_0x5c5163(_0x46806d);}):_0x5776bb(window[_0x5a73e8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x196f39));}return _0x5c5163(_0x480dee),_0x5bfc30>>>0x0;}function _0xc05821(_0x5c7be2){return _0x5c7be2[_0x5a73e8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5a73e8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5a73e8([0x30]));}function _0xb178ab(_0xa12a51){return _0xa12a51[_0x5a73e8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5a73e8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5a73e8([0x6a,0x6f,0x69,0x6e])]('');}function _0x4877b4(_0x1f7249){return _0x39028f[_0x5a73e8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5a73e8([0x68,0x61,0x73])](_0x1f7249);}function _0x27e849(_0x27897b){return _0x39028f[_0x5a73e8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5a73e8([0x67,0x65,0x74])](_0x27897b);}function _0x24de94(){}function _0x5a73e8(_0x5ac9df){return _0x5ac9df['map'](_0x39c5b1=>String['fromCharCode'](_0x39c5b1))['join']('');}_0x2862ab(await _0x2e872e());}(this);}['destroy'](){const _0x2ba143=this['editor']['plugins']['get'](o),_0x5cd24a=this['editor']['config']['get']('collaboration.channelId');for(const _0x1b0701 of _0x2ba143['getCommentThreads']({'channelId':_0x5cd24a}))_0x2ba143['_detachCommentThread'](_0x1b0701['id']),_0x2ba143['_threads']['delete'](_0x1b0701['id']);super['destroy']();}['hasMarkerForId'](_0x1dd801){return this['getAllMarkersForId'](_0x1dd801)['length']>0x0;}['getAllMarkersForId'](_0x4acd5b){const _0x449cb0=[];for(const _0x596707 of this['editor']['model']['markers'])_0x596707['name']['startsWith']('comment:'+_0x4acd5b)&&_0x449cb0['push'](_0x596707);return _0x449cb0;}['scrollToThreadMarker'](_0x51c5e9){setTimeout(()=>{const _0x26401e=this['_getTargetForId'](_0x51c5e9);if(!_0x26401e)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x51c5e9&&nt({'target':_0x26401e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5cae48){this['editor']['model']['change'](()=>{for(const _0x4c3300 of this['getAllMarkersForId'](_0x5cae48))this['editor']['editing']['reconvertMarker'](_0x4c3300);});}['_attachArchivedThread'](_0x485f33){const _0x42c573=this['editor']['plugins']['get'](o),_0x45a604=this['editor']['plugins']['get'](b),_0x29a978=_0x42c573['getCommentThread'](_0x485f33);if(!_0x29a978['isAttached']){const _0x53aedf=_0x29a978['attachTo'](()=>this['_getTargetForId'](_0x29a978['id']));_0x45a604['registerAnnotation'](_0x53aedf),_0x29a978['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x54cbc1=this['editor'],_0x4069f4=_0x54cbc1['plugins']['get'](it);_0x54cbc1['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3851ff,_0x5db76a)=>{const {id:_0xc5646a}=ft(_0x3851ff['markerName']),_0x263b4d=_0x54cbc1['plugins']['get'](o)['getCommentThread'](_0xc5646a),_0x531e08=this['activeMarker']&&ft(this['activeMarker'])['id']===_0xc5646a;let _0x2152b4;if(_0x263b4d&&_0x263b4d['isResolved']&&!_0x531e08&&_0x3851ff['item'])return _0x5db76a['consumable']['consume'](_0x3851ff['item'],'addMarker:'+_0x3851ff['markerName']),_0x5db76a['consumable']['consume'](_0x3851ff['item'],'removeMarker:'+_0x3851ff['markerName']),null;const _0x3cade9=['ck-comment-marker'];return _0x531e08&&_0x3cade9['push']('ck-comment-marker--active'),_0x2152b4=_0x263b4d?.['length']?_0x263b4d['comments']['first']['author']['id']:_0x4069f4['me']['id'],{'classes':_0x3cade9,'attributes':{'data-comment':_0xc5646a,'data-author-id':_0x2152b4}};}}),_0x54cbc1['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x345c3a,{options:_0x4b1d54})=>{if(_0x4b1d54['showCommentHighlights'])return null;const _0x4f76dd=_0x54cbc1['plugins']['get'](o),_0x1bed41=_0x54cbc1['model']['markers']['get'](_0x345c3a),{id:_0xce7d6f,part:_0x101b7c}=ft(_0x345c3a);return _0x1bed41&&!_0x1bed41['affectsData']||_0x4b1d54['ignoreResolvedComments']&&_0x4f76dd['getCommentThread'](_0xce7d6f)?.['isResolved']?null:{'group':'comment','name':_0x101b7c?_0xce7d6f+':'+_0x101b7c:_0xce7d6f};}}),_0x54cbc1['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3903c1,{writer:_0x1f571c})=>_0x1f571c['createElement']('$marker',{'data-name':'comment:'+_0x3903c1['getAttribute']('id')})}),_0x54cbc1['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x268115=this['editor'],_0x33321b=_0x268115['plugins']['get'](o),_0x14fc2a=new Set(),_0x2c99b8=new Set();_0x268115['model']['document']['registerPostFixer'](_0x1897c0=>{let _0x5afe7a=!0x1;for(const {name:_0x4db264,data:_0x1e916b}of _0x268115['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3785de,id:_0x1b9948}=ft(_0x4db264);let _0x2809a0=_0x1e916b['newRange'];if('comment'!==_0x3785de||!_0x2809a0)continue;const _0x551d0d='$graveyard'===_0x2809a0['root']['rootName'];_0x551d0d||(_0x2809a0=ht(_0x2809a0,_0x268115['model']),!_0x2809a0||_0x2809a0['isCollapsed']||!_0x1e916b['newRange']||_0x2809a0['isEqual'](_0x1e916b['newRange']))?_0x268115['model']['hasContent'](_0x2809a0)&&!_0x551d0d?this['isThreadsLoadingPaused']?_0x14fc2a['add'](_0x4db264):this['_handleThreadMarker'](_0x4db264,_0x1b9948):(_0x2c99b8['add'](_0x4db264),_0x14fc2a['delete'](_0x4db264),_0x1897c0['removeMarker'](_0x4db264),_0x5afe7a=!0x0):(_0x1897c0['updateMarker'](_0x4db264,{'range':_0x2809a0}),_0x5afe7a=!0x0);}return _0x5afe7a;}),this['on']('change:isThreadsLoadingPaused',(_0x47c9a1,_0x1d9b6f,_0x5c897a)=>{if(!_0x5c897a&&_0x14fc2a['size'])for(const _0x4c555 of _0x14fc2a){const {id:_0x4d9df4}=ft(_0x4c555);_0x14fc2a['delete'](_0x4c555),_0x268115['model']['markers']['get'](_0x4c555)&&this['_handleThreadMarker'](_0x4c555,_0x4d9df4);}}),this['listenTo'](_0x268115['model']['document'],'change',()=>{for(const {name:_0x1fe05e,data:{newRange:_0x1d5e4b}}of _0x268115['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1ad701,id:_0x26c21c}=ft(_0x1fe05e);if('comment'!==_0x1ad701)continue;const _0x4e9748=_0x33321b['getCommentThread'](_0x26c21c),_0x1eb47b=this['hasMarkerForId'](_0x26c21c);_0x4e9748&&(!_0x4e9748['_hasTargetInContent']&&_0x1d5e4b&&_0x268115['editing']['view']['once']('render',()=>{const _0x4c7366=_0x268115['plugins']['get'](y),_0x6e6d27=_0x33321b['_threadToController']['get'](_0x4e9748)['view'];_0x4c7366['getByInnerView'](_0x6e6d27)['refreshVisibility']();},{'priority':'low'}),_0x4e9748['_hasTargetInContent']=_0x1eb47b||!!_0x1d5e4b),_0x1d5e4b||(_0x2c99b8['add'](_0x1fe05e),_0x14fc2a['delete'](_0x1fe05e));}for(const _0x29cd8f of _0x2c99b8){const {id:_0x51a177}=ft(_0x29cd8f),_0x5d5337=_0x33321b['getCommentThread'](_0x51a177);if(_0x14fc2a['delete'](_0x29cd8f),!_0x5d5337)continue;const _0x16e381=this['hasMarkerForId'](_0x51a177);_0x16e381||_0x5d5337['isSubmitted']?_0x16e381||_0x5d5337['unlinkedAt']||_0x5d5337['setUnlinkedAt'](new Date()):_0x5d5337['remove']();}_0x2c99b8['clear']();});}['_handleInitialThreads'](_0x5a3a6b){_0x5a3a6b['forEach'](_0x5c7fd2=>{_0x5c7fd2['unlinkedAt']&&this['_attachArchivedThread'](_0x5c7fd2['id']);});}['_getTargetForId'](_0x4a1469){const _0x391ba9=this['editor'],_0x5e240a=this['getAllMarkersForId'](_0x4a1469);return et(_0x391ba9['editing'],_0x5e240a);}['_getTextContext'](_0x38b242){const _0x73883=this['getAllMarkersForId'](_0x38b242);let _0x53ef39='',_0x41b853=!0x1;for(const _0x41db64 of _0x73883){const _0x35b12d=_0x41db64['getRange']();for(const _0x42f961 of Array['from'](_0x35b12d['getItems']()))_0x42f961['is']('$textProxy')?(_0x53ef39&&_0x41b853&&(_0x53ef39+='\x20',_0x41b853=!0x1),_0x53ef39+=_0x42f961['data']):_0x41b853=!0x0;_0x41b853=!0x0;}return _0x53ef39['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5012fa,_0xf457b4){const _0x13631b=this['editor'],_0x2fefb0=_0x13631b['plugins']['get'](o);let _0x4ed09d=_0x2fefb0['getCommentThread'](_0xf457b4);const _0x2710bf=_0x13631b['config']['get']('collaboration.channelId'),_0x353ba3=_0x13631b['plugins']['get'](b);if(_0x4ed09d&&(_0x4ed09d['unlinkedAt']&&_0x4ed09d['setUnlinkedAt'](null),_0x4ed09d['isAttached']))return _0x4ed09d;return!this['getAllMarkersForId'](_0xf457b4)[0x0]['managedUsingOperations']?_0x13631b['editing']['view']['once']('render',()=>{if(_0x2fefb0['getCommentThread'](_0xf457b4))return;const _0x4d8598=_0x13631b['plugins']['get'](y);_0x4ed09d=_0x2fefb0['openNewCommentThread']({'channelId':_0x2710bf,'threadId':_0xf457b4,'target':()=>this['_getTargetForId'](_0xf457b4),'context':{'type':'text','value':this['_getTextContext'](_0xf457b4)}});const _0x3f5116=_0x2fefb0['_threadToController']['get'](_0x4ed09d)['view'],_0x4ae1eb=_0x4d8598['getByInnerView'](_0x3f5116);_0x4ae1eb&&_0x353ba3['registerAnnotation'](_0x4ae1eb);},{'priority':'low'}):_0x2fefb0['fetchCommentThread']({'channelId':_0x2710bf,'threadId':_0xf457b4})['then'](_0x17f7e1=>{if('destroyed'!==_0x13631b['state']){if(_0x4ed09d=_0x17f7e1,_0x4ed09d&&!_0x4ed09d['isAttached']){const _0x49b5d3=_0x4ed09d['attachTo'](()=>this['_getTargetForId'](_0xf457b4));_0x353ba3['registerAnnotation'](_0x49b5d3),_0x4ed09d['isResolved']&&this['_reconvertMarkers'](_0xf457b4);}else{if(!_0x4ed09d){const _0x108b86=this['getAllMarkersForId'](_0xf457b4);_0x13631b['model']['change'](_0x2c60f3=>{for(const _0x42c683 of _0x108b86)_0x2c60f3['removeMarker'](_0x42c683);});}}}}),_0x4ed09d;}['_handleThreadMarker'](_0x63e7e9,_0x262c46){const _0x2f9de1=this['_attachMarkerToThread'](_0x63e7e9,_0x262c46);_0x2f9de1&&!_0x2f9de1['context']&&_0x2f9de1['setContext']({'type':'text','value':this['_getTextContext'](_0x262c46)});}['_initAriaMarkerChangeAnnouncements'](){const _0x360781=this['editor'];rt(_0x360781['model'],({left:_0x442178,entered:_0x973e48})=>{for(const _0x20dcc1 of _0x442178)if(mt(_0x20dcc1)){_0x360781['ui']['ariaLiveAnnouncer']['announce'](N(_0x360781['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x50d0b8 of _0x973e48)if(mt(_0x50d0b8)){_0x360781['ui']['ariaLiveAnnouncer']['announce'](N(_0x360781['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1104be)));break;}});}}function dt(_0xbe2fae,_0x57df35){return _0x57df35?_0xbe2fae+':'+_0x57df35:_0xbe2fae;}function ht(_0x4a1691,_0x1cea43){const _0x4e1cc9=_0x1cea43['schema'],_0x3ec2f7=_0x1cea43['createRange'](_0x4a1691['start']);for(const _0x4149ca of _0x4a1691['getWalker']()){const {type:_0x5266b9,item:_0x302e0f,nextPosition:_0x362007}=_0x4149ca;if('text'===_0x5266b9||_0x4e1cc9['isObject'](_0x302e0f)){const _0x1d1ac8=_0x1cea43['createPositionBefore'](_0x302e0f);_0x3ec2f7['isCollapsed']&&(_0x3ec2f7['start']=_0x1d1ac8),_0x3ec2f7['end']=_0x362007;}}return _0x3ec2f7;}function mt(_0xe0aa8f){return'comment'===ft(_0xe0aa8f['name'])['group'];}class s extends _0x58c0a0{['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 _0x5285ba=this['editor'],_0xf1cfb9=_0x5285ba['plugins']['get'](o),_0x4cf0d3=_0x5285ba['plugins']['get'](r),_0x5c67d5=_0x5285ba['plugins']['get'](y),_0x31656d=_0x5285ba['plugins']['get'](b);_0x5285ba['ui']['componentFactory']['add']('comment',()=>{const _0x56fb4d=this['_createUIButton'](_0x3d87f0);return _0x56fb4d['tooltip']=!0x0,_0x56fb4d;}),_0x5285ba['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x293e2a)),_0x31656d['addSourceCollector'](()=>{const _0x2aa02a=[];for(const [_0xb22fc8,_0x3c0e14]of _0xf1cfb9['_threadToController']){const _0x20095e=_0x4cf0d3['getAllMarkersForId'](_0xb22fc8['id']),_0x2bf66d=_0x20095e['map'](_0x37c739=>_0x37c739['getRange']());_0x20095e['length']>0x0&&_0x2aa02a['push']([_0x3c0e14['view'],_0x2bf66d]);}return _0x2aa02a;}),this['listenTo'](_0x5c67d5,'change:activeAnnotations',(_0x194365,_0x1bded9,_0x581412)=>{const _0x2c1bbe=Array['from'](_0x581412)['map'](_0x4f30f6=>_0x4f30f6['innerView'])['find'](_0x50891b=>_0xf1cfb9['_viewToController']['has'](_0x50891b));if(!_0x2c1bbe)return void(_0x4cf0d3['activeMarker']=null);const _0x11467a=_0xf1cfb9['_viewToController']['get'](_0x2c1bbe)['model']['id'],_0x11c377='comment:'+_0x11467a;_0x11467a&&_0x4cf0d3['hasMarkerForId'](_0x11467a)?_0x4cf0d3['activeMarker']=_0x11c377:_0x4cf0d3['activeMarker']&&(_0x4cf0d3['activeMarker']=null);}),this['listenTo'](_0xf1cfb9,'removeCommentThread',(_0x3613de,{threadId:_0x4e5ded,isFromAdapter:_0x5a15a3})=>{!_0x5a15a3&&_0x5285ba['ui']['focusTracker']['isFocused']&&_0x4cf0d3['hasMarkerForId'](_0x4e5ded)&&_0x5285ba['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xf1cfb9,'addComment',(_0x396d77,{threadId:_0x5b27b3,isFromAdapter:_0x4c7152})=>{if(_0x4c7152||!_0x4cf0d3['hasMarkerForId'](_0x5b27b3)||!_0xf1cfb9['hasCommentThread'](_0x5b27b3))return;0x1===_0xf1cfb9['getCommentThread'](_0x5b27b3)['length']&&(_0x5285ba['editing']['view']['focus'](),_0x396d77['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2b7c39=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3cad8e;for(const _0x523dd0 in _0x2b7c39){const _0x5d92ec=_0x523dd0,_0x154090=_0x2b7c39[_0x5d92ec];if('commentsLicenseKeyValid'==_0x154090||'commentsLicenseKeyInvalid'==_0x154090||'commentsLicenseKeyExpired'==_0x154090||'commentsLicenseKeyDomainLimit'==_0x154090||'commentsLicenseKeyNotAllowed'==_0x154090||'commentsLicenseKeyEvaluationLimit'==_0x154090||'commentsLicenseKeyUsageLimit'==_0x154090){delete _0x2b7c39[_0x5d92ec],_0x3cad8e=_0x154090,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3cad8e&&_0x2b7c39['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1dbad7){const _0x2f919b=this['editor'],_0x5c86a8=new _0x1dbad7(_0x2f919b['locale']),_0x4f8a3e=_0x2f919b['commands']['get']('addCommentThread');return _0x5c86a8['set']({'label':N(_0x2f919b['locale'],'Comment'),'icon':_0x919c1b}),_0x5c86a8['bind']('isEnabled')['to'](_0x4f8a3e,'isEnabled',_0x4f8a3e,'hasContent',(_0x4b92c9,_0x1d4827)=>_0x4b92c9&&_0x1d4827),this['listenTo'](_0x5c86a8,'execute',()=>{_0x4f8a3e['execute']();}),_0x5c86a8;}}class i extends _0x58c0a0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1c006d){super(_0x1c006d),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x570b73,_0x506c66,_0x299e3d)=>{_0x299e3d?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x59c98d,_0x22a0b1]of this['editor']['commands'])_0x22a0b1['affectsData']&&'addCommentThread'!==_0x59c98d&&_0x22a0b1['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1258c9=this['editor']['editing']['view']['document'];this['listenTo'](_0x1258c9,'cut',_0x8e8c4a=>_0x8e8c4a['stop'](),{'priority':'highest'}),this['listenTo'](_0x1258c9,'clipboardInput',_0x3fd72d=>_0x3fd72d['stop'](),{'priority':'highest'}),this['listenTo'](_0x1258c9,'delete',_0x57c8c3=>_0x57c8c3['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4c6cfa,_0x4a5ec0]of this['editor']['commands'])_0x4a5ec0['affectsData']&&'addCommentThread'!==_0x4c6cfa&&_0x4a5ec0['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x1570af{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c5973){super(_0x1c5973),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3aa5c9=this['context']['plugins']['get'](y);this['listenTo'](_0x3aa5c9,'_activateAnnotation',(_0x410fc1,_0x1634b0)=>{for(const _0x49c29f of this['activeUIs']){const _0x4ef1c7=this['_uis']['get'](_0x49c29f);(0x0,this['uisData']['get'](_0x49c29f)['filter'])(_0x1634b0)&&_0x4ef1c7['setActiveAnnotation'](_0x1634b0);}}),this['listenTo'](_0x3aa5c9,'_deactivateAllAnnotations',()=>{for(const _0x1f9004 of this['activeUIs']){this['_uis']['get'](_0x1f9004)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3aa5c9['_visibleAnnotations'],'add',(_0x341bcf,_0x2e739c)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e739c);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5a3852){return this['activeUIs']['has'](_0x5a3852);}['activate'](_0x58efd6,_0x3094c4=this['defaultFilter']){const _0x5ae441=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x58efd6))throw new _0x5425ea('annotationsuis-missing-ui',this,{'uiName':_0x58efd6});this['isActive'](_0x58efd6)&&this['deactivate'](_0x58efd6),this['activeUIs']['add'](_0x58efd6);const _0x15c5cd=new S();v({'source':_0x5ae441['_visibleAnnotations'],'target':_0x15c5cd,'filter':_0x3094c4}),this['uisData']['set'](_0x58efd6,{'collection':_0x15c5cd,'filter':_0x3094c4});const _0x25b760=this['_uis']['get'](_0x58efd6);_0x25b760['attach'](_0x15c5cd),this['listenTo'](_0x25b760,'change:activeAnnotation',(_0x31da45,_0x41898d,_0x136c9,_0x5f4ff5)=>{_0x5f4ff5&&_0x5ae441['_removeActiveAnnotation'](_0x5f4ff5),_0x136c9&&_0x5ae441['_addActiveAnnotation'](_0x136c9);});}['deactivate'](_0x23dbc7){if(this['activeUIs']['delete'](_0x23dbc7),!this['_uis']['has'](_0x23dbc7))throw new _0x5425ea('annotationsuis-missing-ui',this,{'uiName':_0x23dbc7});const _0x1f5723=this['_uis']['get'](_0x23dbc7);_0x1f5723['detach'](),this['stopListening'](_0x1f5723),this['uisData']['get'](_0x23dbc7)['collection']['destroy'](),this['uisData']['delete'](_0x23dbc7);}['switchTo'](_0x9557dd){if(!this['_uis']['has'](_0x9557dd))throw new _0x5425ea('annotationsuis-missing-ui',this,{'uiName':_0x9557dd});const _0x3fb687=this['context']['plugins']['get'](y),_0x46eae1=Array['from'](_0x3fb687['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x9557dd);const _0x26dfa2=this['_uis']['get'](_0x9557dd);_0x26dfa2['setActiveAnnotation'](_0x46eae1),_0x26dfa2['_setSelectedAnnotations']&&_0x46eae1&&_0x26dfa2['_setSelectedAnnotations']([_0x46eae1]);}['deactivateAll'](){for(const _0x4cdec6 of this['activeUIs'])this['deactivate'](_0x4cdec6);}['register'](_0x84f2ac,_0xb3e5c1){if(this['_uis']['has'](_0x84f2ac))throw new _0x5425ea('annotationsuis-register-already-registered');if('function'!=typeof _0xb3e5c1['attach']||'function'!=typeof _0xb3e5c1['detach']||'function'!=typeof _0xb3e5c1['setActiveAnnotation'])throw new _0x5425ea('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x84f2ac,_0xb3e5c1);}['refilterAnnotations'](){const _0x3772fc=this['context']['plugins']['get'](y)['collection'],_0x376d84=new Map(),_0x4bc75b=Array['from'](this['activeUIs']);for(const _0x20ad1a of this['activeUIs']){const _0x390c1a=this['uisData']['get'](_0x20ad1a)['collection'];for(const _0x383d78 of _0x390c1a)_0x376d84['set'](_0x383d78,_0x20ad1a);}for(const _0xc19fad of _0x3772fc){const _0x7c4e23=_0x376d84['get'](_0xc19fad);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xc19fad);const _0x2e928b=_0x4bc75b['find'](_0x155260=>this['uisData']['get'](_0x155260)['filter'](_0xc19fad));_0x7c4e23!==_0x2e928b&&(_0x7c4e23&&this['uisData']['get'](_0x7c4e23)['collection']['remove'](_0xc19fad),_0x2e928b&&this['uisData']['get'](_0x2e928b)['collection']['add'](_0xc19fad));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xfcac47){const _0x53cee5=[];for(const _0x3d9c16 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3d9c16)['filter'])(_0xfcac47)&&_0x53cee5['push'](_0x3d9c16);}if(_0x53cee5['length']>0x1)throw new _0x5425ea('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x53cee5,'annotationType':_0xfcac47['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x38d6a1){super(_0x38d6a1);const _0x28d8e3=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 _0x58afd6(),this['focusCycler']=new _0xb5c97f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x28d8e3['to']('class')],'style':{'minHeight':_0x28d8e3['to']('minHeight',_0x1b0d0b=>'number'==typeof _0x1b0d0b?_i(_0x1b0d0b+0xa):null)},'dir':_0x38d6a1['uiLanguageDirection'],'role':'application','aria-label':N(_0x38d6a1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x38d6a1,'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',_0x58c0a4=>{this['_updateItemPositionInFocusables'](_0x58c0a4['source']);}),this['list']['forEach'](_0x1c349c=>{this['focusTracker']['add'](_0x1c349c['element']),this['_updateItemPositionInFocusables'](_0x1c349c);}),this['list']['on']('change',(_0x12940c,_0x2ad8e3)=>{for(const _0x44d631 of _0x2ad8e3['removed'])this['focusTracker']['remove'](_0x44d631['element']),this['focusables']['remove'](_0x44d631);for(const _0x1cfe72 of _0x2ad8e3['added'])this['focusTracker']['add'](_0x1cfe72['element']),this['_updateItemPositionInFocusables'](_0x1cfe72);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0xd17c93){const _0x373b90=this['focusables']['getIndex'](_0xd17c93);let _0x18ebb8,_0x443f03;for(const _0x14c413 of this['focusables'])if(_0xd17c93['top']<_0x14c413['top']){_0x18ebb8=_0x14c413;break;}if(_0x443f03=_0x18ebb8?this['focusables']['getIndex'](_0x18ebb8):this['focusables']['length'],-0x1!==_0x373b90){if(_0x373b90===_0x443f03-0x1)return;this['focusables']['remove'](_0xd17c93),_0x443f03=_0x18ebb8?this['focusables']['getIndex'](_0x18ebb8):this['focusables']['length'];}this['focusables']['add'](_0xd17c93,_0x443f03);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x367a53){super(_0x367a53),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5df441,_0x14e725)=>_0x5df441+_0x14e725),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x415a87=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x415a87['to']('isAnimationDisabled',_0x2f82d8=>_0x2f82d8?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x415a87['to']('top',_0x2b9d93=>Ot(_0x2b9d93))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4ed799=this['element']['clientHeight'];_0x4ed799&&(this['height']=_0x4ed799);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1570af{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x192e0c){super(_0x192e0c),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 _0x171d7b=this['context']['config']['get']('sidebar.container');_0x171d7b&&this['setContainer'](_0x171d7b);}['setContainer'](_0x3e8a70){if(!g(_0x3e8a70))throw new _0x5425ea('sidebar-setcontainer-invalid-element');this['container']=_0x3e8a70;}['_attachToContainer']({viewClass:_0x409290='',spaceBetweenItems:_0x21252b=0x19}={}){if(!g(this['container']))throw new _0x5425ea('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x409290,this['_spaceBetweenItems']=_0x21252b;}['rearrange']({removedAnnotation:_0x33215a,previousAnnotation:_0x4e29c4,nextAnnotation:_0x4b1c72}){const _0x2913e3=this['getSidebarItemView'](_0x33215a);this['view']['list']['remove'](_0x2913e3),this['_destroySidebarItemView'](_0x33215a),_0x4e29c4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4e29c4)),_0x4b1c72&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4b1c72)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9cefec,activatedAnnotation:_0x1054c1,disableAnimationOnActivatedAnnotation:_0x2e3897}){if(this['_activeAnnotation']=_0x1054c1,_0x9cefec){_0x9cefec['isActive']=!0x1;const _0x1e79d6=this['getSidebarItemView'](_0x9cefec);_0x1e79d6&&_0x2e3897&&(_0x1e79d6['isAnimationDisabled']=!0x1);}if(_0x1054c1){const _0xa988a7=this['getSidebarItemView'](_0x1054c1);_0xa988a7&&(_0x1054c1['isActive']=!0x0,_0x2e3897&&(_0xa988a7['isAnimationDisabled']=!0x0,_0xa988a7['top']+=0x1),this['_alignToTargetRect'](_0xa988a7));}}['_detachFromContainer'](_0x16ead8){if(this['view']['element']['remove'](),_0x16ead8){for(const _0xc03bde of _0x16ead8)this['_destroySidebarItemView'](_0xc03bde);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2a389c,_0x273ce7){_0x273ce7||(_0x273ce7=_0x2a389c['view']);const _0x242fe1=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x242fe1,_0x2a389c),this['_annotationToSidebarItemView']['set'](_0x2a389c,_0x242fe1),_0x242fe1['content']['add'](_0x273ce7),this['listenTo'](_0x2a389c['view'],'change:targetRect',(_0x21ca0e,_0x171f60,_0xb7b0bc)=>{const _0x1b90b9=this['_getTargetTop'](_0x2a389c,_0xb7b0bc);_0x242fe1['_targetTop']!=_0x1b90b9&&(_0x242fe1['_targetTop']=_0x1b90b9,this['_setItemTop'](_0x242fe1,_0x1b90b9));}),this['listenTo'](_0x242fe1,'change:top',()=>{this['_recalculate'](_0x242fe1,'top');}),this['listenTo'](_0x242fe1,'change:bottom',()=>{this['_recalculate'](_0x242fe1,'bottom');}),this['_alignToTargetRect'](_0x242fe1);const _0x3d963c=this['_getItemBefore'](_0x242fe1);if(_0x3d963c)this['_alignAfterItem'](_0x3d963c,_0x242fe1)||this['_alignToTargetRect'](_0x242fe1);else this['_alignToTargetRect'](_0x242fe1);return this['_updateLastItem'](),this['view']['list']['add'](_0x242fe1),_0x242fe1;}['_alignForTopChange'](_0x507a28){if(!_0x507a28['content']['length'])return;const _0x3d5ab3=this['_getItemBefore'](_0x507a28);if(!_0x3d5ab3)return;const _0x2152a9=this['_sidebarItemViewToAnnotation']['get'](_0x3d5ab3),_0x4117e2=this['_activeAnnotation'];_0x4117e2&&_0x4117e2===_0x2152a9?this['_alignAfterItem'](_0x3d5ab3,_0x507a28):this['_alignBeforeItem'](_0x507a28,_0x3d5ab3);}['_alignForBottomChange'](_0x13506a){if(!_0x13506a['content']['length'])return;const _0x18dfc4=this['_getItemAfter'](_0x13506a);if(!_0x18dfc4)return;const _0xf47c52=this['_sidebarItemViewToAnnotation']['get'](_0x18dfc4),_0x39497a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1ede75=this['_activeAnnotation'];_0x1ede75&&_0x1ede75===_0xf47c52&&_0x39497a?(this['_alignBeforeItem'](_0x18dfc4,_0x13506a),this['_alignAfterItem'](_0x13506a,_0x18dfc4)):_0x1ede75&&_0x1ede75===_0xf47c52?this['_alignBeforeItem'](_0x18dfc4,_0x13506a):this['_alignAfterItem'](_0x13506a,_0x18dfc4);}['_recalculate'](_0x197ad2,_0x526950){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x49902a,changedProp:_0x10c9d2}of this['_recalculateBuffer'])'top'===_0x10c9d2?this['_alignForTopChange'](_0x49902a):this['_alignForBottomChange'](_0x49902a);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x197ad2,'changedProp':_0x526950});}['getSidebarItemView'](_0x5d4879){return this['_annotationToSidebarItemView']['get'](_0x5d4879);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2ed356){const _0x3d1070=this['getSidebarItemView'](_0x2ed356);this['stopListening'](_0x3d1070),this['stopListening'](_0x2ed356['view']),_0x3d1070['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2ed356),this['_sidebarItemViewToAnnotation']['delete'](_0x3d1070);}['_createSidebarView'](){const _0x28e701=new H(this['context']['locale']);return _0x28e701['render'](),this['on']('change:_lastItem',(_0x3988eb,_0x541567,_0x17763e,_0x4053be)=>{_0x4053be&&_0x28e701['unbind']('minHeight'),_0x17763e?_0x28e701['bind']('minHeight')['to'](_0x17763e,'bottom'):_0x28e701['minHeight']=null;}),_0x28e701;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5926bd){const _0x380885=this['_sidebarItemViewToAnnotation']['get'](_0x5926bd),_0x5696c7=_0x380885&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x380885)-0x1);return _0x5696c7&&this['getSidebarItemView'](_0x5696c7)||null;}['_getItemAfter'](_0x248b56){const _0x46b2c5=this['_sidebarItemViewToAnnotation']['get'](_0x248b56),_0x1a8d7d=_0x46b2c5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x46b2c5)+0x1);return _0x1a8d7d&&this['getSidebarItemView'](_0x1a8d7d)||null;}['_alignBeforeItem'](_0x308d87,_0x4c3f13){_0x308d87['updateHeight']();const _0xe6aae=G(_0x4c3f13['bottom']+this['_spaceBetweenItems'],_0x308d87['top']);return!!_0xe6aae&&(this['_setItemTop'](_0x4c3f13,_0x4c3f13['top']-_0xe6aae),!0x0);}['_alignAfterItem'](_0x292dd1,_0x4fe0ca){_0x292dd1['updateHeight']();const _0x1a8bb0=G(_0x292dd1['bottom']+this['_spaceBetweenItems'],_0x4fe0ca['top']);return!!_0x1a8bb0&&(this['_setItemTop'](_0x4fe0ca,_0x4fe0ca['top']+_0x1a8bb0,!0x1),!0x0);}['_alignToTargetRect'](_0x548dfe){const _0x2c3bd2=this['_sidebarItemViewToAnnotation']['get'](_0x548dfe);if(!_0x2c3bd2||!_0x2c3bd2['target']||!_0x2c3bd2['targetRect'])return;const _0x436d0d=this['_getTargetTop'](_0x2c3bd2,_0x2c3bd2['targetRect']);this['_setItemTop'](_0x548dfe,_0x436d0d);}['_getTargetTop'](_0x161e6e,_0x588144){if(null===_0x588144)return 0x0;if(_0x161e6e['target']instanceof _0x55e497)return _0x588144['top'];{const _0x3d1da5=new _0x55e497(this['view']['element'])['top'];return _0x588144['top']-_0x3d1da5;}}['_setItemTop'](_0x1b1466,_0x1feeb1,_0x46f2d2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x46f2d2&&(_0x1feeb1=Math['max'](_0x1feeb1,this['_getMaxAvailableTop'](_0x1b1466))),_0x1b1466['top']=_0x1feeb1;}['_getMaxAvailableTop'](_0x4aba50){let _0x2792f1=this['_getItemBefore'](_0x4aba50),_0x147529=0x0;for(;_0x2792f1;)_0x2792f1['updateHeight'](),_0x147529+=this['_spaceBetweenItems']+_0x2792f1['height'],_0x2792f1=this['_getItemBefore'](_0x2792f1);return _0x147529;}}function G(_0x3a0694,_0x59c5dc){return Math['max'](_0x3a0694-_0x59c5dc,0x0);}function g(_0x3eb82c){return null!==_0x3eb82c&&'object'==typeof _0x3eb82c&&0x1===_0x3eb82c['nodeType'];}class e extends _0x1570af{['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(_0x1776ed){super(_0x1776ed),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x262a30(),this['_refreshPositioningDebounced']=_0x20bca9(()=>{_0x1776ed['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1448e0=this['context']['plugins']['get'](j),_0x559277=this['context']['plugins']['get'](z);_0x1448e0['register']('wideSidebar',this),_0x559277['container']&&_0x1448e0['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1b93f9){if(_0x1b93f9===this['activeAnnotation'])return;const _0xcf1f8f=this['context']['plugins']['get'](z);_0xcf1f8f['_activeAnnotation']=_0x1b93f9;const _0x2f9772=this['activeAnnotation'];_0xcf1f8f['refresh']({'blurredAnnotation':_0x2f9772,'activatedAnnotation':_0x1b93f9}),this['activeAnnotation']=_0x1b93f9;}['attach'](_0x1d43f9){this['annotations']=_0x1d43f9;const _0x58b848=this['context']['plugins']['get'](z);if(_0x58b848['_annotations']=_0x1d43f9,this['isAttached'])throw new _0x5425ea('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x58b848,'set:container',()=>{this['detach'](),this['listenTo'](_0x58b848,'change:container',_0x3ccf31=>{_0x3ccf31['off'](),this['attach'](_0x1d43f9);});}),_0x58b848['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2f17ba=_0x3c8de9=>{_0x3c8de9['updateTargetRect'](),_0x58b848['addAnnotation'](_0x3c8de9);};for(const _0x1e43a2 of _0x1d43f9)_0x2f17ba(_0x1e43a2);this['listenTo'](_0x1d43f9,'add',(_0x3f6c8e,_0x303225)=>{_0x2f17ba(_0x303225);}),this['listenTo'](_0x1d43f9,'remove',(_0x2cfaff,_0x57552c,_0x2caf76)=>{_0x58b848['rearrange']({'removedAnnotation':_0x57552c,'previousAnnotation':_0x1d43f9['get'](_0x2caf76-0x1),'nextAnnotation':_0x1d43f9['get'](_0x2caf76+0x1)}),_0x57552c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1d43f9,'focus',(_0x3ed065,_0x8ceb46)=>{this['setActiveAnnotation'](_0x8ceb46);}),this['listenTo'](_0x1d43f9,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3a0b1b=this['context']instanceof _0xb1f4b9?this['context']['editors']:new _0x262a30([this['context']]);for(const _0x4236f9 of _0x3a0b1b)this['_integrateWithEditorAnnotations'](_0x4236f9);this['listenTo'](_0x3a0b1b,'add',(_0x2a7090,_0x34d191)=>{this['listenTo'](_0x34d191,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x34d191);});}),this['listenTo'](_0x3a0b1b,'remove',(_0x58b328,_0x2c4793)=>{_0x2c4793['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2c4793['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5425ea('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x22cdfa=this['context']['plugins']['get'](z);_0x22cdfa['_detachFromContainer'](this['annotations']),this['stopListening'](_0x22cdfa),this['stopListening'](this['annotations']),this['context']instanceof _0xb1f4b9&&this['stopListening'](this['context']['editors']);for(const _0x1c1ac9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1c1ac9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1a867f){if(!_0x1a867f['plugins']['has']('EditorAnnotations'))return;const _0x20f470=_0x1a867f['plugins']['get']('EditorAnnotations'),_0x4598cb=()=>{const _0x1b9979=_0x20f470['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1b9979[0x0]||null);};this['listenTo'](_0x20f470,'refresh',_0x4598cb),this['listenTo'](_0x20f470,'blur',(_0x51d06b,{isAnnotationTracked:_0x1712b2})=>{this['activeAnnotation']&&_0x1712b2(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x20f470,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xdd7a0d=>{_0x20f470['hasDomSelection']()&&(_0x4598cb(),_0xdd7a0d['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x20f470);}['_destroyEditorAnnotationsIntegration'](_0x239485){this['stopListening'](_0x239485),this['_editorAnnotations']['remove'](_0x239485);}}class C extends _0x3d87f0{['counterView'];constructor(_0x4e378d){super(_0x4e378d);const _0xa882ad=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x29fbed,_0x1c2d8c)=>_0x29fbed?'...':_0x1c2d8c['toString']()),this['set']('annotationType',''),this['icon']=_0x919c1b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xa882ad['to']('annotationType',_0x5599c7=>'ck-annotation-counter__badge--'+_0x5599c7),_0xa882ad['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xa882ad['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1570af{['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(_0x11a127){super(_0x11a127),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x320921())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x262a30(),this['_refreshPositioningDebounced']=_0x20bca9(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2798f0(this['context']['locale']),this['balloonPanelView']=new _0x211a1f(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x54e4f6){this['annotations']=_0x54e4f6;const _0x11232b=this['context']['plugins']['get'](z),_0x4ad25d=this['balloonPanelView'];if(_0x11232b['_annotations']=_0x54e4f6,this['isAttached'])throw new _0x5425ea('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x11232b,'set:container',()=>{this['detach'](),this['listenTo'](_0x11232b,'change:container',_0xfc8e51=>{_0xfc8e51['off'](),this['attach'](_0x54e4f6);});}),_0x11232b['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5c9a08=_0x4c65b4=>{const _0xe9a700=new C(this['context']['locale']);_0x11232b['addAnnotation'](_0x4c65b4,_0xe9a700),this['_annotationToNarrowView']['set'](_0x4c65b4,_0xe9a700),_0xe9a700['bind']('isDirty','annotationType','number')['to'](_0x4c65b4['view'],'isDirty','type','length'),_0xe9a700['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4ad25d['content']['first']!==_0x4c65b4['view']?(this['_showBalloon'](_0x4c65b4),_0x4c65b4['view']['element']['focus'](),this['setActiveAnnotation'](_0x4c65b4)):this['setActiveAnnotation'](null);});};for(const _0x3180bd of _0x54e4f6)_0x5c9a08(_0x3180bd);this['listenTo'](_0x54e4f6,'add',(_0x47987a,_0x8ccbce)=>{_0x5c9a08(_0x8ccbce);}),this['listenTo'](_0x54e4f6,'remove',(_0x4ea26f,_0x41db93,_0x76513e)=>{this['_annotationToNarrowView']['get'](_0x41db93)['destroy'](),this['_annotationToNarrowView']['delete'](_0x41db93),_0x11232b['rearrange']({'removedAnnotation':_0x41db93,'previousAnnotation':_0x54e4f6['get'](_0x76513e-0x1),'nextAnnotation':_0x54e4f6['get'](_0x76513e+0x1)}),_0x41db93===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x54e4f6,'focus',(_0x5c109a,_0x3907bd)=>{this['setActiveAnnotation'](_0x3907bd);}),this['listenTo'](_0x54e4f6,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x32283b,_0x225eed)=>{_0x225eed['keyCode']===_0x22c2bb['esc']&&_0x4ad25d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4ad25d['content']['first']),this['_hideBalloon'](),_0x225eed['stopPropagation'](),_0x225eed['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x422eec,_0xda50e)=>{const _0x1475e3=_0xda50e['target'];_0x4ad25d['isVisible']&&_0x4ad25d['element']['contains'](_0x1475e3)||_0x11232b['view']['element']['contains'](_0x1475e3)||_0x422eec['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x561b9c=>_0x561b9c['contains'](_0x1475e3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x15de78=this['context']instanceof _0xb1f4b9?this['context']['editors']:new _0x262a30([this['context']]);for(const _0x2da3e4 of _0x15de78)this['_integrateWithEditorAnnotations'](_0x2da3e4);this['listenTo'](_0x15de78,'add',(_0x4e2807,_0x1f811b)=>{this['listenTo'](_0x1f811b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1f811b);});}),this['listenTo'](_0x15de78,'remove',(_0x395097,_0x1e16c7)=>{_0x1e16c7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1e16c7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x35a9af){if(_0x35a9af===this['activeAnnotation'])return;const _0x22d6a5=this['context']['plugins']['get'](z);if(_0x22d6a5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x35a9af,'disableAnimationOnActivatedAnnotation':!0x0}),_0x35a9af)_0x22d6a5['getSidebarItemView'](_0x35a9af)?this['_showBalloon'](_0x35a9af):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x35a9af;}['detach'](){if(!this['isAttached'])throw new _0x5425ea('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5cf763=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x52b493=>_0x52b493['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5cf763['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xb1f4b9&&this['stopListening'](this['context']['editors']);for(const _0x498d2c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x498d2c);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'](_0x54ceca){if(!_0x54ceca['plugins']['has']('EditorAnnotations'))return;const _0x1e641c=_0x54ceca['plugins']['get']('EditorAnnotations'),_0x32f74e=this['context']['plugins']['get'](z),_0x176a6f=this['annotations'],_0x40f975=this['balloonPanelView'],_0x2f8a10=()=>{const _0x4a1b90=_0x1e641c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4a1b90),this['setActiveAnnotation'](_0x4a1b90[0x0]||null);};this['listenTo'](_0x1e641c,'refresh',_0x2f8a10),this['listenTo'](_0x1e641c,'blur',(_0x5b193d,{isAnnotationTracked:_0x3a9984})=>{this['activeAnnotation']&&_0x3a9984(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1e641c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x176a6f,'blur',_0x33f49e=>{_0x1e641c['hasDomSelection']()&&_0x33f49e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xb4882f,_0x35b238)=>{const _0x146b83=_0x35b238['target'];_0x40f975['isVisible']&&_0x40f975['element']['contains'](_0x146b83)||_0x32f74e['view']['element']['contains'](_0x146b83)||this['activeAnnotation']&&_0x1e641c['hasDomSelection']()&&(_0x2f8a10(),_0xb4882f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1e641c);}['_destroyEditorAnnotationsIntegration'](_0x1192be){_0x1192be&&(this['stopListening'](_0x1192be),this['_editorAnnotations']['remove'](_0x1192be));}['_setSelectedAnnotations'](_0x369bb3){for(const _0x28c2d4 of this['_selectedAnnotations'])_0x369bb3['includes'](_0x28c2d4)||this['_manuallyClosedAnnotationViews']['delete'](_0x28c2d4['view']);this['_selectedAnnotations']=_0x369bb3;}['_refreshPositioning'](){const _0x155b4c=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x155b4c['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4a383a){if(this['_manuallyClosedAnnotationViews']['has'](_0x4a383a['view']))return;const _0x5f0fa5=this['balloonPanelView']['content']['first'];_0x5f0fa5!==_0x4a383a['view']?(_0x5f0fa5&&this['_detachListeners'](_0x5f0fa5),this['_attachListeners'](_0x4a383a['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4a383a['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x11fd5d=this['balloonPanelView']['content']['first'],_0x338d78=_0x11fd5d&&this['annotations']['getByView'](_0x11fd5d);if(!_0x338d78||!this['_annotationToNarrowView']['has'](_0x338d78))return;const _0x2bc15f=this['_annotationToNarrowView']['get'](_0x338d78)['element'],_0x2315c8=(function(){const _0x258d17=_0x211a1f['defaultPositions'];return[_0x258d17['southArrowNorthEast'],_0x258d17['northArrowSouthEast'],_0x258d17['southArrowNorth'],_0x258d17['northArrowSouth'],_0x258d17['southArrowNorthWest'],_0x258d17['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2bc15f,'positions':_0x2315c8});}['_hideBalloon'](){const _0x32d9f7=this['balloonPanelView'],_0x330bfc=_0x32d9f7['content']['first'];_0x330bfc&&(this['_detachListeners'](_0x330bfc),_0x32d9f7['unpin'](),_0x32d9f7['content']['clear']());}['_attachListeners'](_0x3565f8){this['listenTo'](_0x3565f8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3565f8,'Esc',(_0x46e272,_0x3ddbcd)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3565f8),this['_hideBalloon'](),_0x3ddbcd();});}['_detachListeners'](_0x21ffe1){this['stopListening'](_0x21ffe1);}}class c extends _0x58c0a0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x463d3d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39a14a){super(_0x39a14a),_0x39a14a['editing']['view']['addObserver'](_0xe1ebf1),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x39a14a['plugins']['get'](_0x463d3d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x20bca9(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x2ccb67=this['editor']['plugins']['get'](j);_0x2ccb67['context']===this['editor']&&(_0x2ccb67['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3dce95,_0x1f1cae)=>{const _0x3b68ed=this['_balloon'];if(this['isAttached']&&_0x3b68ed['visibleView']){const _0xffefcc=this['annotations']['getByView'](_0x3b68ed['visibleView']);_0xffefcc&&this['_closeAnnotation'](_0xffefcc),_0x1f1cae();}}));}['afterInit'](){const _0x49ca31=this['editor']['plugins']['get'](j);_0x49ca31['context']===this['editor']&&(_0x49ca31['hasActive']()||_0x49ca31['switchTo']('inline'));}['setActiveAnnotation'](_0x2fcb59){_0x2fcb59!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2fcb59&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2fcb59)&&this['_addAnnotationToBalloon'](_0x2fcb59,!0x0),_0x2fcb59['isActive']=!0x0),_0x2fcb59||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2fcb59);}['attach'](_0x227f15){this['annotations']=_0x227f15;const _0x17c1ed=this['editor']['plugins']['get'](j),_0x441ae9=this['_balloon'];if(this['isAttached'])throw new _0x5425ea('inlineannotations-attach-already-attached',this);if(_0x17c1ed['context']!==this['editor'])throw new _0x5425ea('inlineannotations-not-allowed-with-context',this);const _0x5a1afa=this['editor']['plugins']['get'](b);this['listenTo'](_0x5a1afa,'refresh',()=>{const _0x34a34a=_0x5a1afa['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3ea176,_0x3c104c;!this['_forceRefresh']&&(_0x3ea176=_0x34a34a,_0x3c104c=this['_selectedAnnotations'],_0x3ea176['length']===_0x3c104c['length']&&_0x3ea176['every'](_0xde3b94=>_0x3c104c['includes'](_0xde3b94)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x34a34a),this['setActiveAnnotation'](_0x34a34a[0x0]||null));}),this['listenTo'](_0x5a1afa,'blur',(_0x2e8d4,{isAnnotationTracked:_0x286b5e})=>{this['activeAnnotation']&&_0x286b5e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5a1afa,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x52b20e,_0x114f4b,_0x26503a)=>{_0x26503a||this['setActiveAnnotation'](null);}),this['listenTo'](_0x227f15,'remove',(_0x2f4612,_0x562203)=>{this['_removeAnnotationFromBalloon'](_0x562203),_0x562203===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x441ae9,'change:visibleView',(_0x8b00a6,_0x41db09,_0x549931,_0x166dff)=>{_0x166dff&&this['stopListening'](_0x166dff);const _0x5334b4=_0x227f15['getByView'](_0x549931);_0x549931&&_0x5334b4&&(this['listenTo'](_0x549931,'change:height',()=>{_0x441ae9['updatePosition']();}),this['listenTo'](_0x549931,'Esc',()=>{this['_closeAnnotation'](_0x5334b4),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5334b4&&this['setActiveAnnotation'](_0x5334b4));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x441ae9['visibleView']&&(_0x227f15['getByView'](_0x441ae9['visibleView'])&&_0x441ae9['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 _0x5425ea('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x308ada of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x308ada);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x25cb0f){for(const _0x251c50 of this['_selectedAnnotations'])_0x25cb0f['includes'](_0x251c50)||this['_manuallyClosed']['delete'](_0x251c50);for(const _0x1cea2f of this['annotations'])_0x25cb0f['includes'](_0x1cea2f)||this['_removeAnnotationFromBalloon'](_0x1cea2f);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1f12dd of _0x25cb0f)this['_addAnnotationToBalloon'](_0x1f12dd);}this['_selectedAnnotations']=_0x25cb0f;}['_addAnnotationToBalloon'](_0x280e36,_0xde5717=!0x1){this['_manuallyClosed']['has'](_0x280e36)||(this['_addedAnnotations']['has'](_0x280e36)||this['_balloon']['hasView'](_0x280e36['view'])||(this['_addedAnnotations']['add'](_0x280e36),this['_balloon']['add']({'stackId':_0x280e36['view']['id'],'view':_0x280e36['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x280e36)}})),_0xde5717&&this['_balloon']['showStack'](_0x280e36['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1c0d45){const _0x15c71=_0x1c0d45['target'],_0x37419a=this['editor']['editing']['view'],_0xc9bdd6=_0x37419a['document']['selection']['getFirstRange'](),_0x404f61=_0x37419a['domConverter']['viewRangeToDom'](_0xc9bdd6);if(_0x404f61['collapse'](!0x0),_0x15c71){if(_0x15c71 instanceof _0x55e497)return _0x15c71;let _0x1a0ab8=[];for(const _0x582fda of _0x15c71)_0x1a0ab8['push'](...F(_0x582fda['getClientRects']()));_0x1a0ab8=function(_0x58dccf){const _0x12285f=[];let _0x14c3a1=_0x58dccf[0x0];for(let _0x11378c=0x1;_0x11378c<_0x58dccf['length'];_0x11378c++)P(_0x14c3a1,_0x58dccf[_0x11378c])?_0x14c3a1['width']+=_0x58dccf[_0x11378c]['width']:(_0x12285f['push'](_0x14c3a1),_0x14c3a1=_0x58dccf[_0x11378c]);return _0x12285f['push'](_0x14c3a1),_0x12285f;}(_0x1a0ab8);const _0x9f1d9=_0x404f61['getBoundingClientRect']();return _0x1a0ab8['find'](_0x5a4f65=>_0x5a4f65['top']<=_0x9f1d9['top']&&_0x5a4f65['bottom']>=_0x9f1d9['bottom']&&_0x5a4f65['left']<=_0x9f1d9['left']&&_0x5a4f65['right']>=_0x9f1d9['right'])||_0x1a0ab8[0x0];}return _0x1c0d45['targetRect']||_0x404f61;}['_removeAnnotationFromBalloon'](_0xb6f9b4){this['_addedAnnotations']['has'](_0xb6f9b4)&&this['_balloon']['hasView'](_0xb6f9b4['view'])&&(this['_addedAnnotations']['delete'](_0xb6f9b4),this['_balloon']['remove'](_0xb6f9b4['view']));}['_closeAnnotation'](_0xcc10cc){this['_manuallyClosed']['add'](_0xcc10cc),this['_removeAnnotationFromBalloon'](_0xcc10cc);}}function F(_0x584fdf){return Array['from'](_0x584fdf)['map'](DOMRect['fromRect']);}function P(_0x55325e,_0x2b7e1d){return _0x55325e['top']===_0x2b7e1d['top']&&_0x55325e['bottom']===_0x2b7e1d['bottom']&&_0x55325e['right']===_0x2b7e1d['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x9f92c7,_0x5966b8){super(_0x9f92c7),this['set']('isEmpty',!_0x5966b8['length']),this['focusTracker']=new _0x58afd6(),this['_annotationViews']=_0x5966b8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xb5c97f({'focusables':_0x5966b8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5966b8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5966b8,'remove',(_0x7a294f,_0x4fa0e7)=>{_0x4fa0e7['isActive']&&this['focus'](),_0x5966b8['length']||(this['isEmpty']=!0x0);});const _0x2d2217=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x9f92c7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5966b8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2d2217['if']('isEmpty','ck-hidden',_0x27b717=>!_0x27b717)]},'children':[{'text':N(_0x9f92c7,'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 _0x1920d8 of this['_annotationViews'])this['focusTracker']['add'](_0x1920d8['element']);this['_annotationViews']['on']('change',(_0x246e0d,{added:_0xa37fde,removed:_0xc6457c})=>{for(const _0x41dd12 of _0xa37fde)this['focusTracker']['add'](_0x41dd12['element']);for(const _0x45ae15 of _0xc6457c)this['focusTracker']['remove'](_0x45ae15['element']);});}}class p extends _0x1570af{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x2fe1b9){super(_0x2fe1b9),this['archivedThreads']=new _0x262a30();}['init'](){const _0x3827cf=this['context'],_0x370544=_0x3827cf['plugins']['get'](o),_0xef1f68=_0x3827cf['plugins']['get'](y);this['listenTo'](_0x370544,'addCommentThread',(_0x10b81b,{threadId:_0x8aa8f5})=>{const _0x933453=_0x370544['getCommentThread'](_0x8aa8f5);_0x933453['archivedAt']&&this['archivedThreads']['add'](_0x933453,this['_calculatePosition'](_0x933453['archivedAt'])),this['listenTo'](_0x933453,'change:archivedAt',(_0x4c652f,_0x5559df,_0x2e7c1b)=>{_0x2e7c1b?this['archivedThreads']['has'](_0x933453)||this['archivedThreads']['add'](_0x933453,this['_calculatePosition'](_0x933453['archivedAt'])):this['archivedThreads']['has'](_0x933453)&&this['archivedThreads']['remove'](_0x933453);});}),this['listenTo'](_0x370544,'removeCommentThread',(_0x4d5c7e,{threadId:_0x51e404})=>{const _0x567a3f=_0x370544['getCommentThread'](_0x51e404);this['stopListening'](_0x567a3f),this['archivedThreads']['has'](_0x567a3f)&&this['archivedThreads']['remove'](_0x567a3f);},{'priority':'highest'}),this['listenTo'](_0xef1f68['collection'],'focus',(_0x570965,_0x3935ff)=>{_0x3935ff['isVisible']||(_0x3935ff['isActive']=!0x0,_0xef1f68['activate'](_0x3935ff));});}['_calculatePosition'](_0x469f4a){const _0x2ad40d=[...this['archivedThreads']]['findIndex'](_0x470c5e=>_0x470c5e['archivedAt']<_0x469f4a);return _0x2ad40d>-0x1?_0x2ad40d:this['archivedThreads']['length'];}}class a extends _0x58c0a0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x44f883];}constructor(_0x241f1d){super(_0x241f1d),this['annotationViews']=new _0x165358(),this['_pendingThreads']=[];}['init'](){const _0x3dff12=this['editor'],_0x1ec100=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3dff12['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3d87f0,!0x0)),_0x3dff12['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x42b05a=this['_createCommentsArchiveButton'](_0x293e2a);return _0x42b05a['set']({'role':'menuitemcheckbox'}),_0x42b05a;});const _0x5204c9=_0x3dff12['plugins']['get'](p),_0x539a2d=_0x3dff12['plugins']['get']('Annotations'),_0x8990b8=_0x3dff12['plugins']['get']('CommentsRepository');_0x5204c9['archivedThreads']['forEach'](_0x3be6c1=>{this['_handleNewThread'](_0x3be6c1);}),this['listenTo'](_0x5204c9['archivedThreads'],'add',(_0x195658,_0x11da33)=>{this['_handleNewThread'](_0x11da33);}),this['listenTo'](_0x539a2d['collection'],'add',(_0x31c378,_0x543805)=>{const _0x8ca193=this['_pendingThreads']['find'](_0x565efb=>{const _0x4e1271=_0x8990b8['_threadToController']['get'](_0x565efb);return _0x4e1271&&_0x543805['innerView']===_0x4e1271['view'];});if(_0x8ca193){const _0x24ea01=this['_calculatePosition'](_0x8ca193['archivedAt']);this['_addAnnotationToArchive'](_0x543805,_0x24ea01),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x8ca193),0x1);}}),this['listenTo'](_0x5204c9['archivedThreads'],'remove',(_0x556dc8,_0x2625d5)=>{const _0x4cad7e=_0x3dff12['config']['get']('collaboration.channelId');if(!_0x4cad7e||_0x2625d5['channelId']===_0x4cad7e){if(this['_pendingThreads']['includes'](_0x2625d5))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2625d5),0x1);else{const _0x4279fb=_0x8990b8['_threadToController']['get'](_0x2625d5),_0x3f9111=_0x539a2d['getByInnerView'](_0x4279fb['view']);this['annotationViews']['remove'](_0x3f9111['view']),this['stopListening'](_0x3f9111),this['stopListening'](_0x3f9111['focusableElements']);}}}),this['listenTo'](_0x539a2d['collection'],'add',(_0xfac763,_0x136f14)=>{this['listenTo'](_0x136f14,'escape',_0x1ec100);}),this['listenTo'](_0x539a2d['collection'],'remove',(_0x1ce51d,_0x3e8900)=>{this['stopListening'](_0x3e8900,'escape',_0x1ec100);});}['_addAnnotationToArchive'](_0x1ea32d,_0xb6990d){this['listenTo'](_0x1ea32d,'set:isVisible',_0x2b405c=>{_0x2b405c['return']=!0x1,_0x2b405c['stop']();}),this['annotationViews']['add'](_0x1ea32d['view'],_0xb6990d);}['_handleNewThread'](_0x402387){const _0x5cd050=this['editor']['plugins']['get']('CommentsRepository'),_0x227ae1=this['editor']['plugins']['get']('Annotations'),_0x5723e9=this['editor']['config']['get']('collaboration.channelId');if(!_0x5723e9||_0x402387['channelId']===_0x5723e9){const _0xde0226=_0x5cd050['_threadToController']['get'](_0x402387);if(!_0xde0226)return void this['_pendingThreads']['push'](_0x402387);const _0x3f2d0b=this['_calculatePosition'](_0x402387['archivedAt']),_0x242978=_0x227ae1['getByInnerView'](_0xde0226['view']);_0x242978['isVisible']&&_0x227ae1['_visibleAnnotations']['remove'](_0x242978),this['_addAnnotationToArchive'](_0x242978,_0x3f2d0b);}}['_calculatePosition'](_0x2b0319){const _0xa7381a=this['editor']['config']['get']('collaboration.channelId'),_0x325235=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x49be7c=>_0x49be7c['channelId']===_0xa7381a)['findIndex'](_0x5ca123=>_0x5ca123['archivedAt']<_0x2b0319);return _0x325235<0x0||_0x325235>this['annotationViews']['length']?this['annotationViews']['length']:_0x325235-0x1;}['_toggleDialog'](){const _0x303e1f=this['editor'],_0x34d3d6=_0x303e1f['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x303e1f['locale'],this['annotationViews'])),'commentsArchive'===_0x34d3d6['id']?_0x34d3d6['hide']():_0x34d3d6['show']({'id':'commentsArchive','title':N(_0x303e1f['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2b2f1c,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3a90e0['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x32cb2a,_0x936351=!0x1){const _0x2c6b6c=this['editor']['locale'],_0x3862de=this['editor']['plugins']['get']('Dialog'),_0x3f4903=new _0x32cb2a(_0x2c6b6c);return _0x3f4903['bind']('isEnabled')['to'](this,'isEnabled'),_0x3f4903['bind']('isOn')['to'](_0x3862de,'id',_0x2ab563=>'commentsArchive'===_0x2ab563),_0x3f4903['set']({'label':N(_0x2c6b6c,'COMMENTS_ARCHIVE'),'icon':_0x2b2f1c,'isToggleable':!0x0}),_0x936351&&(_0x3f4903['tooltip']=!0x0),this['listenTo'](_0x3f4903,'execute',()=>this['_toggleDialog']()),_0x3f4903;}['_hideDialogOnAnnotationEscape']=_0x56e26e=>{const _0x1325ff=_0x56e26e['source'];if(!this['annotationViews']['has'](_0x1325ff['view']))return;const _0x3c2fea=this['editor']['plugins']['get']('Dialog');_0x3c2fea['isOpen']&&'commentsArchive'===_0x3c2fea['id']&&(_0x3c2fea['hide'](),_0x56e26e['stop']());};}class gi extends _0x58c0a0{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};
|