@ckeditor/ckeditor5-comments 46.0.1-alpha.7 → 46.0.1-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x585595={}){function _0x569796(_0x524c3e){return _0x524c3e['map'](_0x56c8bd=>String['fromCharCode'](_0x56c8bd))['join']('');}(_0x585595=Object['assign']({},_0x585595))['plugins']||(_0x585595['plugins']=Rt['defaultPlugins']),super(_0x585595),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x569796([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x569796([0x76,0x69,0x65,0x77])][_0x569796([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x569796([0x61,0x75,0x74,0x6f]),this[_0x569796([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x569796([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x569796([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x569796([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x569796([0x6f,0x6b])});}['create'](){const _0x3a69e7=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3a69e7))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5407b2=>{const _0x58da82=this['model']['document']['getRoot'](),_0x5edc5e=_0x58da82&&_0x58da82['getChild'](_0x58da82['childCount']-0x1);_0x5407b2['setSelection'](_0x5edc5e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x23c555=this['editing']['view'],_0x31151f=_0x23c555['document']['getRoot'](),_0x17f7f5=_0x31151f['getChild'](0x0);_0x31151f['childCount']>0x1||!_0x17f7f5||'p'!=_0x17f7f5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x23c555,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x17f7f5['placeholder']=this['placeholder']),St({'view':_0x23c555,'element':_0x17f7f5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x17f7f5);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x323e11,_0x4abccf={}){super(_0x323e11),this['editor']=null,this['_editorConfig']=_0x4abccf,this['set']('value',_0x4abccf['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x323e11,'Reply...')),this['set']('submitLabel',N(_0x323e11,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5ead02(),this['focusCycler']=new _0x76289f({'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',(_0x3e7260,_0xa67adc)=>{this['cancelButtonView']['fire']('execute'),_0xa67adc();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2879cb,_0x3520f7)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3520f7());}),this['on']('submit',(_0x1f5cc3,_0x53d306)=>{_0x53d306['length']>0xfde8?(alert(N(_0x323e11,'TOO_LONG_COMMENT_ALERT',[_0x53d306['length'],0xfde8])),_0x1f5cc3['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2eba06=this['editor'];this['element']['insertBefore'](_0x2eba06['ui']['element'],this['element']['firstChild']),_0x2eba06['model']['document']['on']('change',()=>this['value']=_0x2eba06['getData']()),_0x2eba06['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2eba06['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x49cbc9){-0x1===_0x49cbc9?(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:_0x51a042}=this,_0x3ddaf7=new _0x8118da(_0x51a042);return _0x3ddaf7['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3ddaf7['withText']=!0x0,_0x3ddaf7['bind']('label')['to'](this,'submitLabel'),_0x3ddaf7['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3ddaf7['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1ca6d9,_0x411410)=>!_0x411410&&!!_0x1ca6d9['trim']()),_0x3ddaf7;}['_createCancelButton'](){const {locale:_0x24778d}=this,_0x393bbc=new _0x8118da(_0x24778d);return _0x393bbc['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x393bbc['label']=N(_0x24778d,'Cancel'),_0x393bbc['withText']=!0x0,_0x393bbc['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x393bbc;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3cfe6a=>{this['focusTracker']['add'](_0x3cfe6a['element']);}),this['focusables']['on']('change',(_0x2a9b33,_0x551666)=>{for(const _0x291871 of Array['from'](_0x551666['added'])['reverse']())this['focusTracker']['add'](_0x291871['element']);});}}class ie extends kt{constructor(_0x4f2220,_0x5f23be,_0x1b581d){super(_0x4f2220),this['commentInputView']=new os(_0x4f2220,_0x1b581d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x793b03,_0x14cb35)=>_0x793b03||!!_0x14cb35),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 _0x38a0c1(_0x4f2220,_0x5f23be),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'](_0x2a3c16){this['commentInputView']['focus'](_0x2a3c16);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xc7bf1a,_0x50e054)=>{const {submitButtonView:_0x19c144,cancelButtonView:_0x1bf23f,editor:_0x457981}=this['commentInputView'];[_0x19c144['element'],_0x1bf23f['element'],_0x457981?_0x457981['editing']['view']['getDomRoot']():null]['filter'](_0x474228=>_0x474228)['some'](_0x15e46a=>_0x15e46a['contains'](_0x50e054['target']))||(this['focus'](),_0x50e054['preventDefault']());});}}class rs extends kt{constructor(_0x2be711){super(_0x2be711);const _0x214225=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x214225['to']('count',_0xfe9641=>N(_0x2be711,'NUMBER_OF_COMMENTS',_0xfe9641))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5acefe,_0x581bbe,_0x2a20df){super(_0x5acefe);const _0x3b4d48=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x581bbe['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x581bbe,this['_config']=_0x2a20df,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5ead02(),this['keystrokes']=new jt(),this['focusCycler']=new _0x76289f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x23dd88=>this['commentViews']['map'](_0x4fa09b=>_0x4fa09b['element'])['includes'](_0x23dd88['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5acefe),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4dbb94=>_0x4dbb94-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2332b1 of _0x581bbe['comments'])this['_handleNewCommentModel'](_0x2332b1);this['_handleInfoComment'](),this['listenTo'](_0x581bbe['comments'],'add',(_0x586efe,_0x599b3e)=>{const _0x5ccf53=this['_calculatePosition'](_0x599b3e);this['length']++,this['_handleNewCommentModel'](_0x599b3e,_0x5ccf53),this['refreshVisibleViews']();}),this['listenTo'](_0x581bbe['comments'],'remove',(_0x2bffde,_0xae65fc)=>{this['length']--,this['_handleRemoveCommentModel'](_0xae65fc),this['refreshVisibleViews']();}),this['listenTo'](_0x581bbe,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x581bbe,'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',_0x3b4d48['if']('length','ck-hidden',_0x2369b9=>!_0x2369b9)],'aria-label':N(_0x5acefe,'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'](_0x33d5b1){-0x1===_0x33d5b1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5af83c of this['commentViews'])_0x5af83c['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x35c63,_0x28a1a3){const _0x3a266d=new this['_config']['CommentView'](this['locale'],_0x35c63,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3a266d['viewUid']=_0x35c63['id'],_0x3a266d['delegate']('removeComment')['to'](this),_0x3a266d['delegate']('updateComment')['to'](this),_0x3a266d['delegate']('resolveCommentThread')['to'](this),_0x3a266d['delegate']('editorReady')['to'](this),_0x3a266d['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3a266d,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3a266d,_0x28a1a3);}['_calculatePosition'](_0x404bb0){const _0x3e2ce5=this['_model']['_findOptimalIndex'](_0x404bb0);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x404bb0['authoredAt']?_0x3e2ce5-0x1:_0x3e2ce5:_0x3e2ce5-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xaef80f={'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'],_0xaef80f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xaef80f));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1da7ad){const _0x4521aa=this['commentViews']['remove'](_0x1da7ad['id']);this['stopListening'](_0x4521aa),_0x4521aa['isEditMode']&&this['_updateHasDirtyComment'](),_0x4521aa['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x48ece5=>_0x48ece5['isEditMode']);}['_rearrangeCollapse'](){const _0x4f077a=function(_0x1cc7b7){const _0xaca55e=new _0x4d4ef2();for(const _0x351b6f of _0x1cc7b7)_0xaca55e['add'](_0x351b6f);return _0xaca55e;}(this['commentViews']),_0x4c2fd0=this['_collapsedCommentsView']['count'];for(let _0x25ae82=0x1;_0x25ae82<=_0x4c2fd0;_0x25ae82++)_0x4f077a['remove'](0x1);for(const _0xbd2e99 of _0x4f077a)_0xbd2e99['collapse']();_0x4c2fd0>0x0&&_0x4f077a['add'](this['_collapsedCommentsView'],0x1),ns(_0x2db00b(Array['from'](this['visibleViews']),Array['from'](_0x4f077a)),this['visibleViews'],_0x4f077a);}['_rearrangeExpand'](){ns(_0x2db00b(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1b5ac4 of this['visibleViews'])_0x1b5ac4['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2b10aa=>{this['focusTracker']['add'](_0x2b10aa['element']),this['keystrokes']['listenTo'](_0x2b10aa['element']);}),this['commentViews']['on']('change',(_0x303d71,_0x587750)=>{for(const _0x1b5c99 of _0x587750['removed'])this['focusTracker']['remove'](_0x1b5c99['element']),this['keystrokes']['stopListening'](_0x1b5c99['element']);for(const _0x440601 of Array['from'](_0x587750['added'])['reverse']())this['focusTracker']['add'](_0x440601['element']),this['keystrokes']['listenTo'](_0x440601['element']);});}}function ns(_0x3666bb,_0x4b49eb,_0x21c7e0){let _0x36cd71=0x0;for(const _0x18362b of _0x3666bb)switch(_0x18362b){case'insert':_0x4b49eb['add'](_0x21c7e0['get'](_0x36cd71),_0x36cd71),_0x36cd71++;break;case'delete':_0x4b49eb['remove'](_0x36cd71);break;case'equal':_0x36cd71++;}}class oe extends kt{constructor(_0x635ba3){super(_0x635ba3);const _0x1c9128=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1c9128['to']('contextValue',_0x424f60=>N(_0x635ba3,'THREAD_CONTEXT_LABEL',_0x424f60)),'tabindex':-0x1},'children':[{'text':_0x1c9128['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x26b159,_0x5db202){super(_0x26b159);const _0x364fe6=this['bindTemplate'];this['_model']=_0x5db202,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5ead02(),this['keystrokes']=new jt(),this['focusCycler']=new _0x76289f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4df7f9=>!!_0x4df7f9),this['bind']('contextValue')['to'](this['_model'],'context',_0x4aacca=>_0x4aacca&&_0x4aacca['value']?this['_trimContextValue'](_0x4aacca['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',_0x364fe6['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 _0x11ee20=new _0x8118da(this['locale']);return _0x11ee20['label']=N(this['locale'],'Reopen'),_0x11ee20['tooltip']=N(this['locale'],'Reopen'),_0x11ee20['icon']=_0x4ffe10,_0x11ee20['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x426de4=>!_0x426de4),_0x11ee20['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x269f75,_0x84a77c)=>_0x269f75&&_0x84a77c),_0x11ee20['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x11ee20;}['_trimContextValue'](_0x5cee1){if(_0x5cee1['length']<0x96)return _0x5cee1;const _0x3391ae=_0x5cee1['lastIndexOf']('\x20',0x93);return _0x5cee1['substring'](0x0,_0x3391ae>-0x1?_0x3391ae:0x93)+'...';}['_attachContextActions'](){const _0x451365=this['element']['querySelector']('.ck-context'),_0x49ecc3=_0x451365['querySelector']('.ck-context__value');this['listenTo'](_0x451365,'mouseenter',()=>{_0x49ecc3['offsetWidth']<_0x49ecc3['scrollWidth']&&_0x451365['classList']['add']('overlay');}),this['listenTo'](_0x451365,'mouseleave',()=>{_0x451365['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x32c97b of this['focusables'])this['focusTracker']['add'](_0x32c97b['element']),this['keystrokes']['listenTo'](_0x32c97b['element']);}['_createContextView'](){const _0x13335a=new oe(this['locale']);return _0x13335a['bind']('contextValue')['to'](this),_0x13335a;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1b89b5,_0x2637d6,_0x107f72,_0x39db8a){super(_0x1b89b5),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2637d6,this['_localUser']=_0x107f72,this['_config']=_0x39db8a,this['commentThreadHeaderView']=new Yt(_0x1b89b5,_0x2637d6),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x1b89b5,N(_0x1b89b5,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1b89b5,_0x2637d6,Object['assign']({'CommentView':this['_config']['CommentView']},_0x39db8a)),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',(_0x37afc0,_0x222a3c)=>_0x37afc0||!!_0x222a3c),this['bind']('isUnlinked')['to'](_0x2637d6,'unlinkedAt',_0xd6ed43=>!!_0xd6ed43),this['bind']('ariaLabel')['to'](this,'length',_0x43987b=>{const _0x28bb6f=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x43987b,_0x28bb6f]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5ead02(),this['keystrokes']=new jt(),this['focusCycler']=new _0x76289f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5322d8=>_0x5322d8['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x56408f=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1aa863=_0x56408f['commentInputView'];return _0x56408f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1aa863,'value',(_0x18ab3c,_0x164835,_0x479c49,_0x3a161e,_0x1ff50e)=>!!_0x1ff50e||!!_0x3a161e&&_0x479c49&&!_0x164835||_0x18ab3c&&_0x479c49&&!_0x164835),_0x1aa863['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x10dc39,_0x417586,_0x3cd035)=>{let _0x9ae69b;return _0x9ae69b=_0x3cd035&&_0x417586?'Reply\x20to\x20reopen\x20discussion...':_0x10dc39?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x9ae69b);}),_0x1aa863['bind']('submitLabel')['to'](this,'length',_0x34ebc6=>N(this['locale'],_0x34ebc6?'Reply':'Comment')),_0x1aa863['on']('submit',(_0x4ae7cd,_0xf37bf7)=>{this['fire']('addComment',_0xf37bf7),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1aa863['on']('cancel',()=>{this['focus']();}),_0x1aa863['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1aa863['on']('cancel',_0x20bc35=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x20bc35['stop']());}),this['on']('change:isActive',(_0x506df0,_0xf6fbf,_0x3c321c)=>{_0x3c321c||this['length']||_0x1aa863['value']||this['fire']('removeCommentThread');}),_0x56408f;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x1297b8(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1e16ef,target:_0x446395,type:_0x474808,isVisible:_0xf09715=!0x0}){super(),this['view']=_0x1e16ef,this['view']['element']||this['view']['render'](),this['_type']=_0x474808,this['_target']=_0x446395,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4d4ef2([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x103c61,_0x5f0993)=>{this['view']['focusTracker']['add'](_0x5f0993);}),this['focusableElements']['on']('remove',(_0x5d6403,_0x185467)=>{this['view']['focusTracker']['remove'](_0x185467);}),this['set']('isVisible',_0xf09715);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2e41a7=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2e41a7),_0x2e41a7;}get['targetRect'](){const _0x2273fa=this['target'];if(null===_0x2273fa)return null;if(_0x2273fa instanceof _0x57fdd2)return _0x2273fa;const _0x5effcc=_0x2273fa['filter'](_0x1186cf=>function(_0x523a03){const _0x554fd3=_0x523a03['offsetParent'];if(_0x554fd3)return!0x0;const _0x57395b=_0x523a03['getClientRects']()['item'](0x0);return!!_0x57395b;}(_0x1186cf));return 0x0===_0x5effcc['length']?null:new _0x57fdd2(_0x5effcc[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2373f2){this['view']['isActive']=_0x2373f2,this['view']['mainView']['isActive']=_0x2373f2;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xc8a73a){if(!(null===_0xc8a73a||_0xc8a73a instanceof _0x57fdd2||Array['isArray'](_0xc8a73a)&&_0xc8a73a['every'](_0x4cc600=>fi(_0x4cc600))))throw new _0xd3f428('annotation-invalid-target',null,{'target':_0xc8a73a});}['_getNormalizedTarget'](){const _0x4576e7='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x4576e7)?[_0x4576e7]:_0x4576e7;}}function fi(_0x289cd3){return null!==_0x289cd3&&'object'==typeof _0x289cd3&&'nodeType'in _0x289cd3&&0x1===_0x289cd3['nodeType'];}class S extends _0x4d4ef2{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4056bf=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5ead02(),this['_focusTracker']['on']('change:isFocused',(_0x44d9a6,_0x42e78e,_0x16d1bd)=>{_0x16d1bd||this['fire']('blur');});for(const _0x306bd4 of _0x4056bf)this['add'](_0x306bd4);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2b069d){if(this['has'](_0x2b069d))throw new _0xd3f428('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2b069d['innerView'],_0x2b069d),this['_viewToAnnotation']['set'](_0x2b069d['view'],_0x2b069d);for(const _0x46d655 of _0x2b069d['focusableElements'])this['_focusTracker']['add'](_0x46d655);this['listenTo'](_0x2b069d['focusableElements'],'add',(_0x135c27,_0x4fa925)=>{this['_focusTracker']['add'](_0x4fa925);}),this['listenTo'](_0x2b069d['focusableElements'],'remove',(_0x5b60d3,_0x41b2a3)=>{this['_focusTracker']['remove'](_0x41b2a3);}),this['listenTo'](_0x2b069d['view']['focusTracker'],'change:isFocused',(_0xc195a3,_0x5c0cbd,_0xf83093)=>{_0xf83093&&this['fire']('focus',_0x2b069d);}),_0x2b069d['updateTargetRect']();const _0xd244d4=this['_getOrderInContent'](_0x2b069d['view']['targetRect']);return super['add'](_0x2b069d,_0xd244d4);}['remove'](_0x35b2dc){if(!this['has'](_0x35b2dc))throw new _0xd3f428('annotationcollection-not-existing-item',null);this['stopListening'](_0x35b2dc['view']['focusTracker']),this['stopListening'](_0x35b2dc['focusableElements']);for(const _0x428f3d of _0x35b2dc['focusableElements'])this['_focusTracker']['remove'](_0x428f3d);return this['_viewToAnnotation']['delete'](_0x35b2dc['view']),this['_innerViewToAnnotation']['delete'](_0x35b2dc['innerView']),super['remove'](_0x35b2dc);}['getByInnerView'](_0x38e41c){return this['_innerViewToAnnotation']['get'](_0x38e41c);}['getByView'](_0xaab835){return this['_viewToAnnotation']['get'](_0xaab835);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2ca17d of this)_0x2ca17d['updateTargetRect']();this['_sort']();}['_sort'](){const _0x18ed5c=Array['from'](this)['sort']((_0x36636e,_0x3300d5)=>w(_0x36636e['view']['targetRect'],_0x3300d5['view']['targetRect']));for(let _0x52f7fc=_0x18ed5c['length']-0x1;_0x52f7fc>0x0;_0x52f7fc--){const _0x1df019=_0x18ed5c[_0x52f7fc];_0x52f7fc!==this['getIndex'](_0x1df019)&&(this['remove'](_0x1df019),this['add'](_0x1df019));}}['_getOrderInContent'](_0x42249c){let _0xae5d93=0x0;if(!_0x42249c)return this['length'];for(const _0x2d58c5 of this){const _0x2b2a18=_0x2d58c5['view']['targetRect'];if(_0x2b2a18){if(w(_0x42249c,_0x2b2a18)<0x0)return _0xae5d93;_0xae5d93++;}}return _0xae5d93;}}function v({source:_0x1c53b1,target:_0xccb3d2,filter:_0x4db1e7}){for(const _0x34abc4 of _0x1c53b1)_0x4db1e7(_0x34abc4)&&_0xccb3d2['add'](_0x34abc4);_0xccb3d2['listenTo'](_0x1c53b1,'add',(_0x5df2a9,_0x10230e)=>{_0x4db1e7(_0x10230e)&&_0xccb3d2['add'](_0x10230e);}),_0xccb3d2['listenTo'](_0x1c53b1,'remove',(_0xfe4423,_0x39e7d3)=>{_0xccb3d2['has'](_0x39e7d3)&&_0xccb3d2['remove'](_0x39e7d3);});}function w(_0x25d01c,_0x2b88ef){if(null===_0x25d01c&&null===_0x2b88ef)return 0x0;if(null===_0x25d01c)return-0x1;if(null===_0x2b88ef)return 0x1;const _0x21cc35=_0x25d01c['top']-_0x2b88ef['top'];return 0x0==_0x21cc35?_0x25d01c['left']-_0x2b88ef['left']:_0x21cc35;}class y extends _0xfe7412{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x41d1b1){if(super(_0x41d1b1),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x41d1b1 instanceof _0x252910){const _0x48936b=_0x41d1b1['locale'];_0x41d1b1['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x48936b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1daccc){this['collection']['add'](_0x1daccc);}['remove'](_0x3ec6ef){this['collection']['remove'](_0x3ec6ef),_0x3ec6ef['destroy']();}['refreshVisibility'](){for(const _0x464f21 of this['collection'])_0x464f21['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x19d455){return this['collection']['getByInnerView'](_0x19d455);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3bc05b of this['collection'])_0x3bc05b['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3b175c){this['fire']('_activateAnnotation',_0x3b175c);}['createAnnotation'](_0x5691b9){return new T(_0x5691b9);}['createAnnotationView'](_0x1ea36e,_0x4af3a3){return new E(_0x1ea36e,_0x4af3a3);}['_addActiveAnnotation'](_0x268ea9){const _0x2d18e8=new Set(this['activeAnnotations']);_0x2d18e8['add'](_0x268ea9),this['activeAnnotations']=_0x2d18e8;}['_removeActiveAnnotation'](_0x4995ec){const _0x1ca1c8=new Set(this['activeAnnotations']);_0x1ca1c8['delete'](_0x4995ec),this['activeAnnotations']=_0x1ca1c8;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3eb528=this['collection'],_0x548258=this['_visibleAnnotations'];function _0xd7609a(_0x54babf){const _0x7819d4=_0x54babf['source'];_0x7819d4['isVisible']&&!_0x548258['has'](_0x7819d4)?_0x548258['add'](_0x7819d4):!_0x7819d4['isVisible']&&_0x548258['has'](_0x7819d4)&&_0x548258['remove'](_0x7819d4),_0x7819d4['view']['focusTracker']['remove'](_0x7819d4['view']['element']),_0x7819d4['view']['focusTracker']['add'](_0x7819d4['view']['element']);}this['listenTo'](_0x3eb528,'add',(_0x2502f2,_0x10a4e6)=>{_0x10a4e6['isVisible']&&_0x548258['add'](_0x10a4e6),this['listenTo'](_0x10a4e6,'change:isVisible',_0xd7609a);}),this['listenTo'](_0x3eb528,'remove',(_0x186ff5,_0x2a831d)=>{_0x548258['has'](_0x2a831d)&&_0x548258['remove'](_0x2a831d),this['stopListening'](_0x2a831d,'change:isVisible',_0xd7609a);});}['_setupEnterAnnotationKeystroke'](){const _0x3d14bf=_0x4dc176=>{_0x4dc176['on']('ready',()=>{_0x4dc176['keystrokes']['set'](_0x5c1e03,(_0x53d219,_0x35f338)=>{const _0x3412a=_0x79f2a3(this['activeAnnotations']['values']());_0x3412a&&(_0x3412a['view']['focus'](),_0x35f338());});});};this['context']instanceof _0x252910?_0x3d14bf(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x35143e,_0x51f3cd)=>{_0x3d14bf(_0x51f3cd);});}['_setupEscapeAnnotationHandling'](){const _0x1fb6b3=_0x24a2f5=>{const _0x2a9d03=_0x24a2f5['source'],_0x2b79d1=[];let _0x37751c;if(Array['isArray'](_0x2a9d03['target'])){_0x37751c=_0x2a9d03['target'][0x0],this['context']instanceof _0x252910?_0x2b79d1['push'](this['context']):this['context']['editors']&&_0x2b79d1['push'](...this['context']['editors']);for(const _0x8fed77 of _0x2b79d1)for(const _0x3780ff of _0x8fed77['editing']['view']['domRoots']['values']())if(_0x3780ff['contains'](_0x37751c))return void _0x8fed77['editing']['view']['focus']();_0x37751c['focus']();}};this['listenTo'](this['collection'],'add',(_0x5a6cdb,_0xa46581)=>{this['listenTo'](_0xa46581,'escape',_0x1fb6b3,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x41fc40,_0x1f4e54)=>{this['stopListening'](_0x1f4e54,'escape',_0x1fb6b3);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xfe7412{['_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(_0x2c14aa){super(_0x2c14aa),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2c998=this['context']['config'];_0x2c998['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2c998['define']('comments.maxThreadTotalWeight',0x1f4),_0x2c998['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2c998['define']('comments.CommentThreadView',gt),_0x2c998['define']('comments.CommentView',Tt),_0x2c998['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x59b3ab=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x382e57,_0x446bfa)=>this['_addCommentThread'](_0x446bfa)),this['on']('submitCommentThread',(_0x294d0a,_0x446698)=>this['_submitCommentThread'](_0x446698)),this['on']('resolveCommentThread',(_0x3c294c,_0x1db80d)=>this['_resolveCommentThread'](_0x1db80d)),this['on']('resolveCommentThread',(_0x267421,_0x3735d6)=>this['_updateActiveAnnotation'](_0x3735d6),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x4fc05e,_0x1be68b)=>this['_reopenCommentThread'](_0x1be68b)),this['on']('reopenCommentThread',(_0x3c0fa0,_0x355efb)=>this['_updateActiveAnnotation'](_0x355efb),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4f548e,_0x19326c)=>this['_removeCommentThread'](_0x19326c)),this['on']('updateCommentThread',(_0x46624e,_0x3b0197)=>this['_updateCommentThread'](_0x3b0197)),this['on']('updateCommentThread',(_0x5603ef,_0x45539c)=>this['_updateActiveAnnotation'](_0x45539c),{'priority':'lowest'}),this['on']('addComment',(_0x1b56b1,_0x57587c)=>this['_addComment'](_0x57587c)),this['on']('updateComment',(_0x549820,_0x407adc)=>this['_updateComment'](_0x407adc)),this['on']('removeComment',(_0x592689,_0xe52627)=>this['_removeComment'](_0xe52627)),this['on']('addComment',(_0x2dc57a,{threadId:_0x406771,isFromAdapter:_0x119d56})=>{if(_0x119d56)return;const _0x526f15=this['getCommentThread'](_0x406771),_0x57d36f=_0x526f15&&this['_threadToController']['get'](_0x526f15);_0x57d36f&&_0x57d36f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x59b3ab,'change:activeAnnotations',(_0x5e5f7c,_0x163c22,_0x18145d)=>{const _0xfdc270=Array['from'](_0x18145d)['map'](_0x292a20=>this['_viewToController']['get'](_0x292a20['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xfdc270?_0xfdc270['model']:null;});}set['adapter'](_0x27569c){if(this['_adapter'])throw new _0xd3f428('commentsrepository-adapter-already-set');this['_adapter']=_0x27569c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x38b41f=_t,threadId:_0x3c0953=_0x33127a(),comments:_0x53650a=[],unlinkedAt:_0x5eb3c7=null,resolvedAt:_0x2132bd=null,resolvedBy:_0x479776=null,target:_0x5de8b6=null,context:_0x298a11=null,attributes:_0x5a0e33={},isResolvable:_0x5be937=!0x0,isSubmitted:_0x3a3f59=!0x1,isFromAdapter:_0xd64c2c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x38b41f),{'channelId':_0x38b41f,'threadId':_0x3c0953,'comments':_0x53650a,'unlinkedAt':_0x5eb3c7,'resolvedAt':_0x2132bd,'resolvedBy':_0x479776,'target':_0x5de8b6,'context':_0x298a11,'attributes':_0x5a0e33,'isFromAdapter':_0xd64c2c,'isResolvable':_0x5be937,'isSubmitted':_0x3a3f59}),this['getCommentThread'](_0x3c0953);}['openNewCommentThread']({channelId:_0x2eb407=_t,threadId:_0x11ea85=_0x33127a(),target:_0x399f2f,context:_0xfdce32=null,isResolvable:_0x5cb500=!0x0}){if(this['_readOnlyChannels']['has'](_0x2eb407)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x399f2f)throw new _0xd3f428('commentsrepository-missing-target');const _0x5a7116=this['addCommentThread']({'channelId':_0x2eb407,'threadId':_0x11ea85,'target':_0x399f2f,'context':_0xfdce32,'isResolvable':_0x5cb500});if(!_0x5a7116)return null;const _0x3177a6=this['_threadToController']['get'](_0x5a7116),_0x40ee61=_0x3177a6['view']['commentThreadInputView']['commentInputView'],_0xd79ff4=this['context']['plugins']['get'](y),_0xb6741c=_0xd79ff4['getByInnerView'](_0x3177a6['view']);return _0xd79ff4['activate'](_0xb6741c),_0x40ee61['once']('editorReady',()=>_0x40ee61['focus']()),_0x5a7116;}['hasCommentThread'](_0x4da101){if('string'!=typeof _0x4da101)throw new _0xd3f428('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4da101);}['updateCommentThread']({channelId:_0x3dcbfe=_t,threadId:_0xcdabc1,context:_0x557156,unlinkedAt:_0x5995bd,attributes:_0x570e5f,isFromAdapter:_0x30318a=!0x1}){return this['fire'](Nt('updateCommentThread',_0x3dcbfe),{'channelId':_0x3dcbfe,'threadId':_0xcdabc1,'context':_0x557156,'unlinkedAt':_0x5995bd,'attributes':_0x570e5f,'isFromAdapter':_0x30318a}),this['getCommentThread'](_0xcdabc1);}['getCommentThread'](_0x129b52){if('string'!=typeof _0x129b52)throw new _0xd3f428('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x129b52);}['fetchCommentThread']({channelId:_0x2240ca,threadId:_0x244b20}={}){const _0x5b643c=this['getCommentThread'](_0x244b20);if(_0x5b643c)return Promise['resolve'](_0x5b643c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xd3f428('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2240ca,'threadId':_0x244b20})['then'](_0x32bacd=>this['hasCommentThread'](_0x244b20)?this['getCommentThread'](_0x244b20):_0x32bacd?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2240ca},_0x32bacd)):void 0x0)['catch'](_0x46f2e0=>{throw console['error'](_0x46f2e0),new _0xd3f428('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x534a94,skipNotAttached:_0x303f27=!0x1,skipEmpty:_0x4f8ee3=!0x1,toJSON:_0x6b2764=!0x1}={}){const _0x7c78d9=[];for(const _0x7596ed of this['_threads']['values']())_0x534a94&&_0x7596ed['channelId']!==_0x534a94||_0x303f27&&!_0x7596ed['isAttached']||_0x4f8ee3&&0x0===_0x7596ed['length']||_0x7c78d9['push'](_0x7596ed);return _0x6b2764?_0x7c78d9['map'](_0x2b8f75=>_0x2b8f75['toJSON']()):_0x7c78d9;}['getAnnotationForCommentThread'](_0x322387){const _0x481ae5=this['_threadToController']['get'](_0x322387);if(!_0x481ae5)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x481ae5['view'])||null;}['getCommentThreadForAnnotation'](_0xdfa859){const _0x381448=this['_viewToController']['get'](_0xdfa859['innerView']);return _0x381448?_0x381448['model']:null;}['setActiveCommentThread'](_0x1229e8){const _0x30c180=this['context']['plugins']['get'](y);if(!_0x1229e8)return void(this['activeCommentThread']&&_0x30c180['deactivateAll']());const _0x3fd574=this['getCommentThread'](_0x1229e8);if(!_0x3fd574)throw new _0xd3f428('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1229e8});if(!this['_threadToController']['has'](_0x3fd574))throw new _0xd3f428('commentsrepository-active-not-attached',null,{'threadId':_0x1229e8});const _0x31c58a=_0x30c180['getByInnerView'](this['_threadToController']['get'](_0x3fd574)['view']);_0x30c180['activate'](_0x31c58a);}['switchReadOnly'](_0x4c3cd6,_0x3b9f29){_0x4c3cd6?this['_readOnlyChannels']['add'](_0x3b9f29):this['_readOnlyChannels']['delete'](_0x3b9f29),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1508cd){return this['_readOnlyChannels']['has'](_0x1508cd)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5cfa0d,_0x429927){return new vt(_0x5cfa0d,_0x429927);}['setPermissions'](_0x417b5f,_0x4dd423=_t){this['_permissions']['set'](_0x4dd423,_0x417b5f),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x28017d=_t){return this['_permissions']['has'](_0x28017d)?this['_permissions']['get'](_0x28017d):bt;}['_addCommentThread']({channelId:_0x3bf02f,threadId:_0x169036,comments:_0x260572,unlinkedAt:_0x7704c0,resolvedAt:_0x241ec1,resolvedBy:_0x1d822f,target:_0x44f462,context:_0x3b0850,attributes:_0x3ff6d9,isFromAdapter:_0x5ad149,isResolvable:_0x5d8181,isSubmitted:_0x157ae2}){if('string'!=typeof _0x169036)throw new _0xd3f428('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x169036});if(this['hasCommentThread'](_0x169036))throw new _0xd3f428('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x169036});const _0x38ede5=new pi(this,{'channelId':_0x3bf02f,'id':_0x169036,'context':_0x3b0850,'attributes':_0x3ff6d9,'unlinkedAt':_0x7704c0,'resolvedAt':_0x241ec1,'resolvedBy':_0x1d822f?this['context']['plugins']['get'](it)['getUser'](_0x1d822f):null,'isResolvable':_0x5d8181,'isSubmitted':_0x157ae2||_0x5ad149});this['_threads']['set'](_0x169036,_0x38ede5);for(const _0x1c3b5c of _0x260572)_0x38ede5['_add'](this['_createNewComment']({'threadId':_0x169036,..._0x1c3b5c}));return _0x44f462&&_0x38ede5['attachTo'](_0x44f462),_0x5ad149||!_0x38ede5['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3bf02f,'threadId':_0x169036});}['_submitCommentThread']({channelId:_0x41b17f,threadId:_0x37e88d}){if(!this['hasCommentThread'](_0x37e88d))throw new _0xd3f428('commentsrepository-missing-comment-thread',this);const _0x33a1ab=this['getCommentThread'](_0x37e88d);if(_0x33a1ab['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x47e552,comments:_0x10e70e,resolvedAt:_0x390b13,resolvedBy:_0x4f4557,context:_0x592a74,attributes:_0x132045}=_0x33a1ab,_0x4e17cc=this['context']['plugins']['get']('PendingActions'),_0x201c9b=_0x4e17cc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x41b17f,'threadId':_0x47e552,'comments':_0x10e70e['map'](_0x1265eb=>_0x1265eb['toJSON']()),'resolvedAt':_0x390b13,'resolvedBy':_0x4f4557?_0x4f4557['id']:_0x4f4557,'context':_0x592a74,'attributes':_0x132045})['then'](({comments:_0x38f0bb})=>{_0x4e17cc['remove'](_0x201c9b);for(const _0xef679d of _0x38f0bb)this['_updateComment']({'channelId':_0x41b17f,'threadId':_0x37e88d,'commentId':_0xef679d['commentId'],'createdAt':_0xef679d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4fde12=>{throw console['error'](_0x4fde12),new _0xd3f428('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x13fa6d,target:_0x507dca}){const _0x217b97=this['getCommentThread'](_0x13fa6d);if(!_0x217b97)throw new _0xd3f428('commentsrepository-attach-missing-comment-thread',this);const _0xa777d=this['context']['plugins']['get']('PendingActions'),_0x24cd0f=this['context']['plugins']['get'](y),_0x4f1b4c=this['_createCommentThreadView'](_0x217b97),_0x39ac85=new vt(_0x217b97,_0x4f1b4c);let _0x5d9822=null;_0x4f1b4c['on']('change:isDirty',(_0x303b87,_0x45de0d,_0xd799dc)=>{_0xd799dc?_0x5d9822=_0xa777d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5d9822&&(_0xa777d['remove'](_0x5d9822),_0x5d9822=null);}),this['_threadToController']['set'](_0x217b97,_0x39ac85),this['_viewToController']['set'](_0x4f1b4c,_0x39ac85);const _0x11152a=new E(this['context']['locale'],_0x4f1b4c);_0x11152a['bind']('length')['to'](_0x4f1b4c),_0x11152a['bind']('isDirty')['to'](_0x4f1b4c,'isDirty',_0x4f1b4c,'length',(_0x312b83,_0x42b8da)=>_0x312b83||!_0x42b8da),_0x11152a['bind']('isActive')['to'](_0x4f1b4c),_0x11152a['type']='comment';const _0x343385=new T({'view':_0x11152a,'target':_0x507dca,'type':'comment','isVisible':!_0x217b97['archivedAt']&&!!('function'==typeof _0x507dca?_0x507dca():_0x507dca)});return _0x4f1b4c['on']('escape',()=>{_0x343385['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4f1b4c,_0x343385),_0x24cd0f['add'](_0x343385),_0x343385;}['_bindAnnotationToEditors'](_0x1f0bfe,_0x4aff32){this['listenTo'](_0x1f0bfe,'editorReady',(_0x3ba840,_0x93f5d4)=>{const _0x4fa0d5=_0x93f5d4['ui']['view']['body']['bodyCollectionContainer'];_0x4aff32['focusableElements']['add'](_0x4fa0d5),this['context']instanceof _0x252910&&this['context']['ui']['focusTracker']['add'](_0x4fa0d5);},{'priority':'highest'}),this['listenTo'](_0x1f0bfe,'editorDestroyed',(_0x67cf1e,_0x257f93)=>{const _0x51e864=_0x257f93['ui']['view']['body']['bodyCollectionContainer'];_0x4aff32['focusableElements']['has'](_0x51e864)&&_0x4aff32['focusableElements']['remove'](_0x51e864),this['context']instanceof _0x252910&&this['context']['ui']['focusTracker']['remove'](_0x51e864);});}['_unbindEditors'](_0x47fd16){this['stopListening'](_0x47fd16,'editorReady'),this['stopListening'](_0x47fd16,'editorDestroyed');}['_createCommentThreadView'](_0x335ade){const _0x27cc8e=this['context']['plugins']['get'](it),{config:_0x1b6c9e,locale:_0x3c239c}=this['context'],_0x381073=pt(_0x1b6c9e['get']('locale'),_0x3c239c);return new(0x0,(_0x1b6c9e['get']('comments'))['CommentThreadView'])(_0x3c239c,_0x335ade,_0x27cc8e['me'],{'editorConfig':{..._0x1b6c9e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1b6c9e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1b6c9e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1b6c9e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1b6c9e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x381073,'CommentView':_0x1b6c9e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5f2a3d,channelId:_0x891517,resolvedAt:_0x4f8135,resolvedBy:_0x4fe540,isFromAdapter:_0x388664}){if(!this['hasCommentThread'](_0x5f2a3d))throw new _0xd3f428('commentsrepository-missing-comment-thread',null,{'threadId':_0x5f2a3d});const _0x2def6f=this['getCommentThread'](_0x5f2a3d);if(_0x2def6f['isResolved'])throw new _0xd3f428('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5f2a3d});const _0x2c547d=this['context']['plugins']['get'](it);if(_0x2def6f['resolvedBy']=_0x2c547d['getUser'](_0x4fe540),_0x2def6f['resolvedAt']=_0x4f8135,_0x388664||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5497bf=this['context']['plugins']['get']('PendingActions'),_0x17891b=_0x5497bf['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x891517,'threadId':_0x5f2a3d})['then'](({resolvedAt:_0xa3970e,resolvedBy:_0x345452})=>{_0x5497bf['remove'](_0x17891b),_0x2def6f['resolvedBy']['id']!==_0x345452&&(_0x2def6f['resolvedBy']=_0x2c547d['getUser'](_0x345452)),_0x2def6f['resolvedAt']=_0xa3970e;})['catch'](_0x5e1b38=>{throw console['error'](_0x5e1b38),new _0xd3f428('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x10f864,channelId:_0x231594,isFromAdapter:_0x433ddd}){if(!this['hasCommentThread'](_0x10f864))throw new _0xd3f428('commentsrepository-missing-comment-thread',null,{'threadId':_0x10f864});const _0x44db8a=this['getCommentThread'](_0x10f864);if(!_0x44db8a['isResolved'])throw new _0xd3f428('commentsrepository-reopen-comment-thread',null,{'threadId':_0x10f864});if(_0x44db8a['resolvedBy']=null,_0x44db8a['resolvedAt']=null,_0x433ddd||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5e05fc=this['context']['plugins']['get']('PendingActions'),_0x1ede8b=_0x5e05fc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x231594,'threadId':_0x10f864})['then'](()=>_0x5e05fc['remove'](_0x1ede8b))['catch'](_0x2aab3e=>{throw console['error'](_0x2aab3e),new _0xd3f428('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0xe27585,isFromAdapter:_0x5752e7}){const _0x45fc6f=this['getCommentThread'](_0xe27585);if(!_0x45fc6f)throw new _0xd3f428('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0xe27585),this['_threads']['delete'](_0xe27585),!_0x45fc6f['isSubmitted']||_0x5752e7||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4f1151=this['context']['plugins']['get']('PendingActions'),{channelId:_0x54736b}=_0x45fc6f,_0xe10d5=_0x4f1151['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x54736b,'threadId':_0xe27585})['then'](()=>_0x4f1151['remove'](_0xe10d5))['catch'](_0x3367d0=>{throw console['error'](_0x3367d0),new _0xd3f428('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x56b844,unlinkedAt:_0xb870df,context:_0x550d33,attributes:_0x1f215a,isFromAdapter:_0x22260f}){if('string'!=typeof _0x56b844)throw new _0xd3f428('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x56b844});if(!this['hasCommentThread'](_0x56b844))throw new _0xd3f428('commentsrepository-missing-comment-thread',null,{'threadId':_0x56b844});const _0x180fdd=this['getCommentThread'](_0x56b844);let _0x53473a=!0x1;if(void 0x0!==_0x550d33&&_0x180fdd['context']!==_0x550d33&&(_0x180fdd['context']=_0x550d33,_0x53473a=!0x0),void 0x0!==_0xb870df&&_0x180fdd['unlinkedAt']!==_0xb870df&&(_0x180fdd['unlinkedAt']=_0xb870df,_0x53473a=!0x0),_0x1f215a&&!At(_0x1f215a,_0x180fdd['attributes'])&&(_0x180fdd['attributes']=_0x1f215a,_0x53473a=!0x0),!_0x53473a)return Promise['resolve']();if(!_0x180fdd['isSubmitted']||_0x22260f||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x470ea6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3e57cc}=_0x180fdd,_0x2ed49b=_0x470ea6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3e57cc,'threadId':_0x56b844,'context':_0x550d33,'unlinkedAt':_0xb870df,'attributes':_0x1f215a})['then'](()=>_0x470ea6['remove'](_0x2ed49b))['catch'](_0x5d754f=>{throw console['error'](_0x5d754f),new _0xd3f428('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x185b8b){const _0x2c7860=this['context']['plugins']['get'](y),_0x13ff61=this['getCommentThread'](_0x185b8b);if(_0x13ff61['_isAttached']=!0x1,this['_threadToController']['has'](_0x13ff61)){const _0x2df114=this['_threadToController']['get'](_0x13ff61),_0x2d6339=_0x2df114['view'],_0x444270=_0x2c7860['getByInnerView'](_0x2d6339);this['_threadToController']['delete'](_0x13ff61),this['_viewToController']['delete'](_0x2d6339),_0x444270&&_0x2c7860['remove'](_0x444270),_0x2df114['destroy'](),_0x2d6339['destroy']()['then'](()=>{this['_unbindEditors'](_0x2d6339);});}}['_updateActiveAnnotation']({threadId:_0x5ee7bb,resolvedAt:_0x58250e,unlinkedAt:_0x2fc533}){const _0x3d88d0=!!_0x58250e,_0x4b9111=this['context']['plugins']['get'](y),_0x49ac2f=this['getCommentThread'](_0x5ee7bb);if(this['_threadToController']['has'](_0x49ac2f)){const _0x1c122c=this['_threadToController']['get'](_0x49ac2f)['view'],_0x5e562a=_0x4b9111['getByInnerView'](_0x1c122c);_0x5e562a&&(_0x3d88d0&&_0x4b9111['_removeActiveAnnotation'](_0x5e562a),_0x2fc533?_0x5e562a['isVisible']=!0x1:_0x5e562a['refreshVisibility']());}}['_getExternalAuthor'](_0x3857f0){const _0x515511=this['context']['plugins']['get'](it),_0x6b7d98=It('external:'+_0x3857f0),_0x521bff=_0x515511['getUser'](_0x6b7d98);return _0x521bff||_0x515511['addUser']({'id':_0x6b7d98,'name':_0x3857f0});}['_createNewComment']({threadId:_0x126683,commentId:_0x27a684=_0x33127a(),content:_0xa0052b,authorId:_0xd9c94a,createdAt:_0x24ccfe,attributes:_0x4f4829}){if('string'!=typeof _0x27a684)throw new _0xd3f428('commentsrepository-invalid-commentid');if('string'!=typeof _0xd9c94a)throw new _0xd3f428('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xa0052b||!_0xa0052b['trim']())throw new _0xd3f428('commentsrepository-invalid-comment-content');const _0x37bd91=this['context']['plugins']['get'](it)['getUser'](_0xd9c94a);if(!_0x37bd91)throw new _0xd3f428('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xd9c94a});let _0x257d8d=null,_0x38b290=_0x24ccfe;return _0x4f4829?.['@external']&&(_0x257d8d=this['_getExternalAuthor'](_0x4f4829['@external']['authorName']),_0x38b290=new Date(_0x4f4829['@external']['createdAt'])),new wi(this,{'threadId':_0x126683,'id':_0x27a684,'author':_0x257d8d||_0x37bd91,'creator':_0x37bd91,'content':_0xa0052b,'createdAt':_0x24ccfe,'authoredAt':_0x38b290,'attributes':_0x4f4829});}['_addComment'](_0x42859b){let {threadId:_0x4b4636,content:_0x44f0f6,attributes:_0x44a4dc,isFromAdapter:_0x137b3c}=_0x42859b;const _0x201ed0=this['getCommentThread'](_0x42859b['threadId']);if(!_0x201ed0)throw new _0xd3f428('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x50d8bd=this['_createNewComment'](_0x42859b),{id:_0xf920f9}=_0x50d8bd;if(_0x201ed0['_add'](_0x50d8bd),_0x137b3c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x201ed0['isSubmitted'])return Promise['resolve']();const _0x4b142b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x313f26}=_0x201ed0,_0x12d0a6=_0x4b142b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x44a4dc||(_0x44a4dc={}),this['adapter']['addComment']({'channelId':_0x313f26,'threadId':_0x4b4636,'commentId':_0xf920f9,'content':_0x44f0f6,'attributes':_0x44a4dc})['then'](_0x55591e=>{_0x4b142b['remove'](_0x12d0a6),_0x55591e&&this['_updateComment']({'channelId':_0x313f26,'threadId':_0x4b4636,'commentId':_0xf920f9,'createdAt':_0x55591e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4dad4f=>{throw console['error'](_0x4dad4f),new _0xd3f428('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x56c709,commentId:_0x17ecf8,content:_0x5f0c7d,createdAt:_0x2918cc,attributes:_0x3fca53,isFromAdapter:_0x2c1a91}){if(void 0x0!==_0x5f0c7d&&('string'!=typeof _0x5f0c7d||!_0x5f0c7d['trim']()['length']))throw new _0xd3f428('commentsrepository-update-comment-invalid-content');const _0x7f70ba=this['getCommentThread'](_0x56c709),_0x32acf3=_0x7f70ba['getComment'](_0x17ecf8);if(!_0x32acf3)throw new _0xd3f428('commentsrepository-update-missing-comment',this);let _0xa2ba1f=!0x1;if(_0x5f0c7d&&_0x5f0c7d!==_0x32acf3['content']&&(_0x32acf3['isEditable']||_0x2c1a91)&&(_0x32acf3['content']=_0x5f0c7d,_0xa2ba1f=!0x0),_0x2918cc&&_0x2918cc!==_0x32acf3['createdAt']&&(_0x32acf3['createdAt']=_0x2918cc,_0x32acf3['attributes']&&_0x32acf3['attributes']['@external']||(_0x32acf3['authoredAt']=_0x2918cc),_0xa2ba1f=!0x0),_0x3fca53&&!At(_0x3fca53,_0x32acf3['attributes'])&&(_0x32acf3['attributes']=_0x3fca53,_0xa2ba1f=!0x0),!_0xa2ba1f)return Promise['resolve']();if(_0x7f70ba['fire']('commentUpdated'),_0x2c1a91||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x3bbda6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cc634}=this['getCommentThread'](_0x32acf3['threadId']),_0x4bbcb2=_0x3bbda6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5cc634,'threadId':_0x56c709,'commentId':_0x17ecf8,'content':_0x5f0c7d,'attributes':_0x3fca53})['then'](()=>_0x3bbda6['remove'](_0x4bbcb2))['catch'](_0x4a8e53=>{throw console['error'](_0x4a8e53),new _0xd3f428('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x34bdd2,commentId:_0x4184f8,isFromAdapter:_0x4eacfb}){const _0x7ab718=this['getCommentThread'](_0x34bdd2),_0x1ceb84=_0x7ab718['getComment'](_0x4184f8);if(!_0x1ceb84)throw new _0xd3f428('commentsrepository-remove-missing-comment',this);if(_0x7ab718['_remove'](_0x1ceb84),_0x4eacfb||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2b4d6d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x391099}=_0x7ab718,_0x3f1d5b=_0x2b4d6d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x391099,'threadId':_0x34bdd2,'commentId':_0x4184f8})['then'](()=>_0x2b4d6d['remove'](_0x3f1d5b))['catch'](_0x4851ee=>{throw console['error'](_0x4851ee),new _0xd3f428('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x1297b8(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x24161b,_0x1c51e5){super();const _0x4fbebe=_0x24161b['context']['plugins']['get'](it)['me'],_0x44dd58=_0x24161b['getCommentThread'](_0x1c51e5['threadId']),_0x49985d=0x0===_0x44dd58['comments']['length'],_0x24b9c9=_0x4fbebe===_0x1c51e5['author'];this['id']=_0x1c51e5['id'],this['threadId']=_0x1c51e5['threadId'],this['author']=_0x1c51e5['author'],this['creator']=_0x1c51e5['creator'],this['isExternal']=Boolean(_0x1c51e5['attributes']&&_0x1c51e5['attributes']['@external']),this['set']('content',_0x1c51e5['content']),this['createdAt']=_0x1c51e5['createdAt']||new Date(),this['set']('authoredAt',_0x1c51e5['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x44dd58,'resolvedAt'),this['set']('attributes',_0x1c51e5['attributes']||{}),this['bind']('isEditable')['to'](_0x24161b,'_permissions',()=>{const _0x53e16f=_0x24161b['getPermissions'](_0x44dd58['channelId'])['write'],_0x47ed57=_0x24161b['getPermissions'](_0x44dd58['channelId'])['modifyAll'];return _0x24b9c9&&_0x53e16f||!_0x24b9c9&&_0x47ed57;}),this['bind']('isRemovable')['to'](_0x44dd58,'isRemovable',_0x24161b,'_permissions',_0x10242b=>{const _0x35d0a7=_0x24161b['getPermissions'](_0x44dd58['channelId'])['write'],_0x2b69af=_0x24161b['getPermissions'](_0x44dd58['channelId'])['modifyAll'];return _0x24b9c9&&_0x35d0a7||_0x10242b&&_0x49985d||!_0x24b9c9&&_0x2b69af&&!_0x49985d;}),this['bind']('isReadOnly')['to'](_0x44dd58,'isReadOnly'),this['_repository']=_0x24161b;}get['weight'](){return Math['max'](function(_0x7680ea){const _0x46c24f=document['createElement']('div');return _0x46c24f['innerHTML']=_0x7680ea,_0x46c24f['textContent']['length'];}(this['content']),0xc8);}['update'](_0x394a31){const {threadId:_0x409bd8,id:_0x359314}=this;if(!this['_repository']['hasCommentThread'](_0x409bd8))throw new _0xd3f428('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x316853}=this['_repository']['getCommentThread'](_0x409bd8);this['_repository']['fire'](Nt('updateComment',_0x316853,_0x409bd8),{'channelId':_0x316853,'threadId':_0x409bd8,'commentId':_0x359314,..._0x394a31});}['setAttribute'](_0xb09185,_0x510958){const _0x1400d4=wt(this['attributes']);yt(_0x1400d4,_0xb09185,_0x510958),this['update']({'attributes':_0x1400d4});}['removeAttribute'](_0x521872){const _0x281303=wt(this['attributes']);Ct(_0x281303,_0x521872),this['update']({'attributes':_0x281303});}['remove'](_0x329e3b={}){if(!_0x329e3b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x530185,id:_0x2817ff}=this;if(!this['_repository']['hasCommentThread'](_0x530185))throw new _0xd3f428('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x52b849}=this['_repository']['getCommentThread'](_0x530185);this['_repository']['fire'](Nt('removeComment',_0x52b849,_0x530185),{'channelId':_0x52b849,'threadId':_0x530185,'commentId':_0x2817ff,..._0x329e3b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x358236,..._0x1a17b4){for(const _0x4d4243 of _0x1a17b4)void 0x0!==_0x4d4243&&(_0x358236+=':'+String(_0x4d4243));return _0x358236;}class ot extends _0x134a73{constructor(_0x8c1544){super(_0x8c1544),this['set']('hasContent',!0x1);}['refresh'](){const _0x144c2d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x572919 of _0x144c2d['getRanges']())if(this['_hasContent'](_0x572919))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x1c7413=_0x33127a(),ranges:_0x30460e,comment:_0xc056c7}={}){const _0x484cb7=this['editor']['model'],_0xa06449=_0x30460e??Array['from'](_0x484cb7['document']['selection']['getRanges']()),_0x536c0b=[];for(const _0x2d4bb5 of _0xa06449)this['_hasContent'](_0x2d4bb5)&&_0x536c0b['push'](this['_trimToContent'](_0x2d4bb5));if(!_0x536c0b['length'])throw new _0xd3f428('addcommentthreadcommand-incorrect-ranges',null);_0xc056c7&&this['_createCommentThread'](_0x1c7413,_0xc056c7),this['_createMarkersFromRanges'](_0x1c7413,_0x536c0b,!!_0xc056c7);}['_createMarkersFromRanges'](_0x50f03a,_0x2feeea,_0x5c8068){this['editor']['model']['change'](_0x3b10a9=>{for(const _0x5c8a72 of _0x2feeea){const _0x182cbf=_0x33127a()['substr'](0x1,0x5),_0x106179='comment:'+_0x50f03a+':'+_0x182cbf;_0x3b10a9['addMarker'](_0x106179,{'range':_0x5c8a72,'usingOperation':_0x5c8068,'affectsData':_0x5c8068});}});}['_createCommentThread'](_0x345990,_0x5ed158){const _0x2f8303=this['editor']['plugins']['get']('CommentsRepository'),_0x3246c3=this['editor']['config']['get']('collaboration.channelId'),_0x277419=this['editor']['plugins']['get']('Users')['me'];if(!_0x277419)throw new _0xd3f428('addcommentthreadcommand-user-not-found',null);_0x2f8303['addCommentThread']({'threadId':_0x345990,'channelId':_0x3246c3,'comments':[{'authorId':_0x277419['id'],'content':_0x5ed158,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x17b93c){for(const _0x24e68c of _0x17b93c['getItems']())if(this['_itemIsContent'](_0x24e68c))return!0x0;return!0x1;}['_itemIsContent'](_0x14caa8){return _0x14caa8['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x14caa8)&&!_0x14caa8['is']('element','tableCell');}['_trimToContent'](_0x1ba04f){const _0x48012d=_0x1a7689=>!this['_itemIsContent'](_0x1a7689['item']),_0x34ecb1=_0x1ba04f['start']['getLastMatchingPosition'](_0x48012d),_0x59c693=_0x1ba04f['end']['getLastMatchingPosition'](_0x48012d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x34ecb1,_0x59c693);}}class b extends _0x8104b3{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bde85){super(_0x5bde85),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x39af13=this['editor'],_0x19cb5e=_0x39af13['model']['document']['selection'],_0x1e3b14=_0x5e0d3b(()=>this['refreshSelectedViews'](),0xa);_0x19cb5e['on']('change:range',(_0x152813,_0x228a1a)=>{_0x228a1a['directChange']&&(_0x1e3b14['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x39af13['editing']['view']['document'],'change:isFocused',(_0x4ffb37,_0x21c1b3,_0x14c9b7)=>{_0x14c9b7&&_0x1e3b14();}),this['listenTo'](_0x39af13['ui']['focusTracker'],'change:isFocused',(_0x36ea40,_0x532fd0,_0x292b25)=>{_0x292b25||this['fire']('blur',{'isAnnotationTracked':_0x2aa269=>this['_editorAnnotationsData']['has'](_0x2aa269['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4a5e79){if(this['_editorAnnotations']['has'](_0x4a5e79['view']))return;this['_editorAnnotations']['add'](_0x4a5e79['view']),this['editor']['ui']['focusTracker']['add'](_0x4a5e79['view']['element']);const _0x7808f7=this['editor']['plugins']['get'](y);this['listenTo'](_0x7808f7['collection'],'remove',(_0x2c8a6b,_0x4c7b23)=>{this['editor']['ui']['focusTracker']['remove'](_0x4c7b23['view']['element']),this['_editorAnnotations']['delete'](_0x4c7b23['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xfa354d){if('function'!=typeof _0xfa354d)throw new _0xd3f428('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xfa354d);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1edee7,annotations:_0x5efbc6}){const _0x1e44d4=[],_0x21522e=this['editor']['model']['document']['selection'],_0x4a2738=Array['from'](_0x21522e['getRanges']());for(const [_0x3617a8,_0x53e1f0]of this['_editorAnnotationsData']){const _0x474990=_0x539d05(_0x53e1f0),_0x31905f=_0x5efbc6['getByInnerView'](_0x3617a8);_0x474990&&_0x31905f&&_0x1e44d4['push']({'annotation':_0x31905f,'range':_0x474990});}function _0x539d05(_0x5cd6b0){for(const _0x5e4ae2 of _0x5cd6b0)for(const _0x42469c of _0x4a2738)if(_0x5e4ae2['containsRange'](_0x42469c,!_0x21522e['isCollapsed']))return _0x5e4ae2;return null;}return _0x1e44d4['sort']((_0x162982,_0x22036a)=>{const _0x1dd508=_0x162982['range'],_0x1e3f7a=_0x22036a['range'];if(!_0x1dd508['isEqual'](_0x1e3f7a)){if(_0x1dd508['containsRange'](_0x1e3f7a,!0x0))return 0x1;if(_0x1e3f7a['containsRange'](_0x1dd508,!0x0))return-0x1;}return _0x162982['annotation']==_0x1edee7?-0x1:_0x22036a['annotation']==_0x1edee7?0x1:0x0;})['map'](_0x541f1c=>_0x541f1c['annotation']);}get['_editorAnnotationsData'](){const _0xf5a0f7=new Map();for(const _0x1eb095 of Array['from'](this['_dataCollectors']))for(const [_0x2924bd,_0x4664e0]of _0x1eb095())_0xf5a0f7['set'](_0x2924bd,_0x4664e0);return _0xf5a0f7;}}class st extends _0x8104b3{['afterInit'](){const _0x4a544d=this['editor'];if(!_0x4a544d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4a544d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x8104b3{constructor(_0x21e3ce){super(_0x21e3ce),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1869a5=this['editor'],_0x403632=_0x1869a5['commands']['get']('importWord'),_0x10ad52=_0x1869a5['plugins']['get'](it);_0x403632&&(_0x403632['on']('execute',(_0x4de5db,[,_0x2e12aa])=>{_0x2e12aa['collaboration_features']={'comments':!0x0,'user_id':_0x10ad52['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x403632,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x505815,_0x408f24){const {comment_threads:_0x2d025f}=_0x408f24;_0x2d025f&&_0x2d025f['forEach'](({thread_id:_0x3b9b91,comments:_0x5dc11f,is_resolved:_0x500da6})=>{const _0x1369c4=new Date(),_0x4c479a=_0x5dc11f['map'](({author:_0x249623,content:_0x52a7a3,created_at:_0x2bd874})=>({'content':_0x52a7a3,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x1369c4,'attributes':{'@external':{'authorName':_0x249623,'createdAt':_0x2bd874?new Date(_0x2bd874):new Date(),'source':'importWord'}}})),_0x324aca=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x324aca,'threadId':_0x3b9b91,'comments':_0x4c479a,'resolvedAt':_0x500da6?_0x1369c4:null});});}}class at extends _0x8104b3{constructor(_0x1e9cbb){super(_0x1e9cbb),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x122008=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x122008,'contentInsertion',(_0x51a421,_0x2a18bc)=>this['_removeMarkersWithoutThreads'](_0x2a18bc['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x25cd67){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x25cd67;const _0x30002b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5d3a42 of _0x25cd67['keys']()){const [_0x4565fb,_0x3c7649]=_0x5d3a42['split'](':');'comment'!=_0x4565fb||_0x30002b['hasCommentThread'](_0x3c7649)||_0x25cd67['delete'](_0x5d3a42);}return _0x25cd67;}['_registerMarkerInClipboardPipeline'](){const _0x3c36c3=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3e75c4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3e75c4&&_0x3c36c3['_registerMarkerToCopy']('comment',_0x3e75c4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x16ac5f){switch(_0x16ac5f){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x3b26ee){const _0x8057f2=_0x3b26ee['split'](':');return{'group':_0x8057f2[0x0],'id':_0x8057f2[0x1],'part':_0x8057f2[0x2]};}class ut extends _0x8104b3{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1f345c,_0x58f8a3)=>{if(!_0x58f8a3['options']['showCommentHighlights'])return null;if(_0x58f8a3['options']['ignoreResolvedComments']){const {id:_0x99c6f}=ft(_0x1f345c['markerName']),_0x1f9477=this['editor']['plugins']['get'](o);if(_0x1f9477['getCommentThread'](_0x99c6f)?.['isResolved']&&_0x1f345c['item'])return _0x58f8a3['consumable']['consume'](_0x1f345c['item'],'addMarker:'+_0x1f345c['markerName']),_0x58f8a3['consumable']['consume'](_0x1f345c['item'],'removeMarker:'+_0x1f345c['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x242005=>{_0x242005['on']('addMarker:comment',(_0x33e595,_0x1b7595,_0x4647f4)=>{if(!_0x4647f4['options']['showCommentHighlights'])return;const _0x32c032=_0x1b7595['item'];if(!_0x32c032)return;const _0x5af60a=_0x4647f4['mapper']['toViewElement'](_0x32c032);this['editor']['model']['schema']['isObject'](_0x32c032)&&_0x5af60a&&!_0x5af60a['getCustomProperty']('widget')&&_0x5af60a['is']('containerElement')&&_0x2a96ee(_0x5af60a,_0x4647f4['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x27c64a,{writer:_0x4e2c58,options:_0x284662})=>{if(!_0x284662['showCommentHighlights'])return null;const _0x11df10=_0x4e2c58['createContainerElement']('div'),_0x35ba5b=_0x4e2c58['createEmptyElement']('hr');return _0x4e2c58['addClass']('ck-horizontal-line',_0x11df10),_0x4e2c58['insert'](_0x4e2c58['createPositionAt'](_0x11df10,0x0),_0x35ba5b),_0x11df10;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0xa55df6,{writer:_0x11d8be,options:_0x428cd3})=>{if(!_0x428cd3['showCommentHighlights'])return null;const _0x35d277=_0x11d8be['createContainerElement']('span'),_0x1bfc83=_0x11d8be['createEmptyElement']('img');return _0x11d8be['addClass']('image-inline',_0x35d277),_0x11d8be['insert'](_0x11d8be['createPositionAt'](_0x35d277,0x0),_0x1bfc83),_0x35d277;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x56d87a,{writer:_0x55677f,options:_0x236015})=>{if(_0x236015['showCommentHighlights'])return _0x55677f['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x50ba95,_0x535b38,_0x46d137)=>{_0x46d137['options']['showCommentHighlights']&&_0x50ba95['stop']();},{'priority':'high'});}}class r extends _0x8104b3{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(_0x204e01){super(_0x204e01),this['set']('isThreadsLoadingPaused',!0x0),_0x204e01['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x25d787,_0x2b9d94,_0xf0c6,_0x4eb47a)=>{const _0x34a838=_0x204e01['plugins']['get'](o),_0x28de73=_0xf0c6?ft(_0xf0c6)['id']:null;_0x204e01['model']['change'](()=>{if(_0x28de73){const _0x34a789=this['getAllMarkersForId'](_0x28de73);for(const _0x474d9b of _0x34a789)_0x204e01['editing']['reconvertMarker'](_0x474d9b);}if(_0x4eb47a){const {id:_0x1b9db6}=ft(_0x4eb47a),_0x35398c=_0x34a838['getCommentThread'](_0x1b9db6);if(_0x35398c&&_0x35398c['unlinkedAt'])return;if(_0x35398c&&!_0x35398c['isAttached'])return;const _0x5745d6=this['getAllMarkersForId'](_0x1b9db6);for(const _0x30db41 of _0x5745d6)_0x204e01['editing']['reconvertMarker'](_0x30db41);}}),_0x28de73&&this['scrollToThreadMarker'](_0x28de73);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x517144=this['editor'],_0x6a9eee=_0x517144['plugins']['get'](o),_0x31cc7b=_0x517144['config']['get']('collaboration.channelId'),_0x380b7e=_0x6a9eee['getCommentThreads']()['filter'](_0x378a8d=>_0x378a8d['channelId']!==_0x31cc7b);_0x517144['commands']['add']('addCommentThread',new ot(_0x517144)),this['listenTo'](_0x517144,'change:isReadOnly',(_0x33b84c,_0x1d28ba,_0x2d580f)=>{_0x6a9eee['switchReadOnly'](_0x2d580f,_0x517144['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x6a9eee,dt('addCommentThread',_0x31cc7b),(_0x525e7b,{threadId:_0x980739})=>{const _0x41c898=this['editor']['plugins']['get'](o)['getCommentThread'](_0x980739);_0x41c898?.['unlinkedAt']&&this['_attachArchivedThread'](_0x980739);}),this['listenTo'](_0x6a9eee,dt('removeCommentThread',_0x31cc7b),(_0x537d34,{threadId:_0x1137df})=>{_0x517144['model']['enqueueChange']({'isUndoable':!0x1},_0x282280=>{const _0xf9b718=this['getAllMarkersForId'](_0x1137df);for(const _0x59f8c6 of _0xf9b718)_0x282280['removeMarker'](_0x59f8c6);});}),this['listenTo'](_0x6a9eee,dt('resolveCommentThread',_0x31cc7b),(_0x496004,{threadId:_0x3ce408})=>{(this['_reconvertMarkers'](_0x3ce408),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x3ce408)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x6a9eee,dt('reopenCommentThread',_0x31cc7b),(_0x79d6f3,{threadId:_0x38a750})=>{this['_reconvertMarkers'](_0x38a750);},{'priority':'low'}),this['listenTo'](_0x6a9eee,dt('addComment',_0x31cc7b),(_0x4469bb,{threadId:_0x2a76bb,isFromAdapter:_0x50c179})=>{const _0x50e982=this['getAllMarkersForId'](_0x2a76bb);if(_0x50c179||0x0==_0x50e982['length']||!_0x6a9eee['hasCommentThread'](_0x2a76bb))return;0x1===_0x6a9eee['getCommentThread'](_0x2a76bb)['length']&&_0x517144['model']['enqueueChange']({'isUndoable':!0x1},_0x5bc602=>{for(const _0x8f9685 of _0x50e982)_0x5bc602['updateMarker'](_0x8f9685,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x380b7e);}['afterInit'](){!async function(_0x3e2cd1){const _0x24356f=_0x110973([0x68,0x61,0x58,0x33,0x6b,0x55,0x76,0x6e,0x4b,0x46,0x77,0x74,0x69,0x42,0x4d,0x30,0x35,0x72,0x62,0x66,0x4c,0x43,0x75,0x49,0x78,0x50,0x37,0x67,0x6f,0x48,0x4e,0x38,0x41,0x45,0x6a,0x47,0x71,0x56,0x7a,0x4a,0x4f,0x79,0x44,0x32,0x6c,0x34,0x70,0x57,0x6d,0x63,0x36,0x31,0x73,0x51,0x64,0x53,0x39,0x52,0x59,0x54,0x5a,0x65]),_0x180099=0x461bc3e5,_0x5a7fd6=0x461cac7d^_0x180099,_0xe4be3b=window[_0x110973([0x44,0x61,0x74,0x65])][_0x110973([0x6e,0x6f,0x77])](),_0x46039c=_0x3e2cd1[_0x110973([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2753fe=new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xeae62d=>{_0x46039c[_0x110973([0x6f,0x6e,0x63,0x65])](_0x110973([0x72,0x65,0x61,0x64,0x79]),_0xeae62d);}),_0x13bc57={[_0x110973([0x6b,0x74,0x79])]:_0x110973([0x45,0x43]),[_0x110973([0x75,0x73,0x65])]:_0x110973([0x73,0x69,0x67]),[_0x110973([0x63,0x72,0x76])]:_0x110973([0x50,0x2d,0x32,0x35,0x36]),[_0x110973([0x78])]:_0x110973([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]),[_0x110973([0x79])]:_0x110973([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]),[_0x110973([0x61,0x6c,0x67])]:_0x110973([0x45,0x53,0x32,0x35,0x36])},_0x3f067c=_0x46039c[_0x110973([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x110973([0x67,0x65,0x74])](_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x18599b(){let _0x284cf9,_0x37f6be=null,_0x5dfbc0=null;try{if(_0x3f067c==_0x110973([0x47,0x50,0x4c]))return _0x110973([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x284cf9=_0x53b98b(),!_0x284cf9)return _0x110973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x284cf9[_0x110973([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5dfbc0=_0x42f18b(_0x284cf9[_0x110973([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x284cf9[_0x110973([0x6a,0x74,0x69])])),await _0xd7436c()?_0x47e596()?_0xf9fb07()?_0x110973([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x400bad()?(_0x284cf9[_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x110973([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x37f6be=_0x4d8033(_0x110973([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x284cf9[_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x110973([0x74,0x72,0x69,0x61,0x6c])&&(_0x37f6be=_0x4d8033(_0x110973([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x255d63()):_0x110973([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x110973([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x110973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x110973([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xf9fb07(){const _0x276205=[_0x110973([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x110973([0x74,0x72,0x69,0x61,0x6c])][_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x284cf9[_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe4be3b/0x3e8:0xe10*_0x5a7fd6;return _0x284cf9[_0x110973([0x65,0x78,0x70])]<_0x276205;}function _0x47e596(){const _0x266c0c=_0x284cf9[_0x110973([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x266c0c)return!0x1;if(_0x266c0c[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x110973([0x2a])))return!0x0;if(_0x266c0c[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x110973([0x43,0x4d,0x54])))return!0x0;if(_0x266c0c[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x110973([0x52,0x43,0x4d,0x54]))){if(_0xc69a17())return!0x0;if(_0x1477fb()||_0x42d028())return!0x0;}return!0x1;}function _0x400bad(){const _0x53ff3f=_0x284cf9[_0x110973([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x53ff3f||0x0==_0x53ff3f[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1649eb}=new URL(window[_0x110973([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x53ff3f[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1649eb))return!0x0;const _0x1f542b=_0x1649eb[_0x110973([0x73,0x70,0x6c,0x69,0x74])](_0x110973([0x2e]));return _0x53ff3f[_0x110973([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x18e11f=>_0x18e11f[_0x110973([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x110973([0x2a])))[_0x110973([0x6d,0x61,0x70])](_0x43aaf2=>_0x43aaf2[_0x110973([0x73,0x70,0x6c,0x69,0x74])](_0x110973([0x2e])))[_0x110973([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5cfa3a=>_0x5cfa3a[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1f542b[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x110973([0x6d,0x61,0x70])](_0x537fe1=>Array(_0x1f542b[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x537fe1[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x110973([0x66,0x69,0x6c,0x6c])](_0x537fe1[0x0]===_0x110973([0x2a])?_0x110973([0x2a]):'')[_0x110973([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x537fe1))[_0x110973([0x73,0x6f,0x6d,0x65])](_0x400cb4=>_0x1f542b[_0x110973([0x65,0x76,0x65,0x72,0x79])]((_0x5146ff,_0x198f8a)=>_0x400cb4[_0x198f8a]===_0x5146ff||_0x400cb4[_0x198f8a]===_0x110973([0x2a])));}function _0x255d63(){return _0x37f6be&&_0x5dfbc0?new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x452098,_0x3a0232)=>{_0x37f6be[_0x110973([0x74,0x68,0x65,0x6e])](_0x452098,_0x3a0232),_0x5dfbc0[_0x110973([0x74,0x68,0x65,0x6e])](_0x395015=>{_0x395015!=_0x110973([0x56,0x61,0x6c,0x69,0x64])&&_0x452098(_0x395015);},_0x3a0232);}):_0x37f6be||_0x5dfbc0||_0x110973([0x56,0x61,0x6c,0x69,0x64]);}}function _0x42f18b(_0x45b3ba,_0xf436e){return new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x219d22=>{if(_0x3e6aa6())return _0x219d22(_0x110973([0x56,0x61,0x6c,0x69,0x64]));_0x52f6ee(),_0x46039c[_0x110973([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x110973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2175b9=!0x1;const _0x5bec48=_0x33127a();function _0x4814f2(_0x4195f1){return!!_0x4195f1&&(typeof _0x4195f1===_0x110973([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4195f1===_0x110973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4195f1[_0x110973([0x74,0x68,0x65,0x6e])]===_0x110973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4195f1[_0x110973([0x63,0x61,0x74,0x63,0x68])]===_0x110973([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x517ebf(_0x171920){_0x4cd15e(_0x171920)[_0x110973([0x74,0x68,0x65,0x6e])](_0x5a5ab9=>{if(!_0x5a5ab9||_0x5a5ab9[_0x110973([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x110973([0x6f,0x6b]))return _0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x56b5a5(_0x44340c(_0x5bec48+_0xf436e))!=_0x5a5ab9[_0x110973([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x110973([0x56,0x61,0x6c,0x69,0x64]);})[_0x110973([0x74,0x68,0x65,0x6e])](_0x3621a3=>(_0x290f43(),_0x3621a3),()=>{const _0x310df3=_0x567435();return null==_0x310df3?(_0x290f43(),_0x110973([0x56,0x61,0x6c,0x69,0x64])):_0x110973(_0xe4be3b-_0x310df3>(0x621747e5^_0x180099)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x110973([0x74,0x68,0x65,0x6e])](_0x219d22)[_0x110973([0x63,0x61,0x74,0x63,0x68])](()=>{_0x219d22(_0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5ee1de=0x462d2d65^_0x180099;function _0x290f43(){const _0x4f146b=_0x110973([0x6c,0x6c,0x63,0x74,0x2d])+_0x56b5a5(_0x44340c(_0x45b3ba)),_0x5aa8a3=_0x388e1e(_0x56b5a5(window[_0x110973([0x4d,0x61,0x74,0x68])][_0x110973([0x63,0x65,0x69,0x6c])](_0xe4be3b/_0x5ee1de)));window[_0x110973([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x110973([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f146b,_0x5aa8a3);}function _0x567435(){const _0x246252=_0x110973([0x6c,0x6c,0x63,0x74,0x2d])+_0x56b5a5(_0x44340c(_0x45b3ba)),_0xd577fc=window[_0x110973([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x110973([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x246252);return _0xd577fc?window[_0x110973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x388e1e(_0xd577fc),0x10)*_0x5ee1de:null;}function _0x4cd15e(_0x51d3fa){return new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x33a9be,_0x357970)=>{_0x51d3fa[_0x110973([0x74,0x68,0x65,0x6e])](_0x33a9be,_0x357970),window[_0x110973([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x357970,0x461a1725^_0x180099);});}}_0x46039c[_0x110973([0x6f,0x6e])](_0x110973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xbb2cfa,_0x1b177a)=>{if(_0x1b177a[0x0]!=_0x45b3ba)return _0x219d22(_0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1b177a[0x1]={..._0x1b177a[0x1],[_0x110973([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5bec48};},{[_0x110973([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x110973([0x68,0x69,0x67,0x68])}),_0x46039c[_0x110973([0x6f,0x6e])](_0x110973([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1a3f2d=>{_0x4814f2(_0x1a3f2d[_0x110973([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2175b9=!0x0,_0x517ebf(_0x1a3f2d[_0x110973([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x110973([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x110973([0x6c,0x6f,0x77])}),_0x2753fe[_0x110973([0x74,0x68,0x65,0x6e])](()=>{_0x2175b9||_0x219d22(_0x110973([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3e6aa6(){return _0x46039c[_0x110973([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x110973([0x76,0x69,0x65,0x77])][_0x110973([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x110973([0x61,0x75,0x74,0x6f]);}function _0x52f6ee(){_0x46039c[_0x110973([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x110973([0x76,0x69,0x65,0x77])][_0x110973([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x110973([0x61,0x75,0x74,0x6f]);}}function _0x4d8033(_0x259f7c){const _0x57cdf6=[new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xae1003=>setTimeout(_0xae1003,0x4612fd29^_0x180099)),_0x2753fe[_0x110973([0x74,0x68,0x65,0x6e])](()=>new window[(_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf0bf9e=>{let _0x2899ca=0x0;_0x46039c[_0x110973([0x6d,0x6f,0x64,0x65,0x6c])][_0x110973([0x6f,0x6e])](_0x110973([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x598d74,_0x2bbd33)=>{_0x2bbd33[0x0][_0x110973([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2899ca++,_0x2899ca==(0x461bc21d^_0x180099)&&(_0xf0bf9e(),_0x598d74[_0x110973([0x6f,0x66,0x66])]());});}))];return window[_0x110973([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x110973([0x72,0x61,0x63,0x65])](_0x57cdf6)[_0x110973([0x74,0x68,0x65,0x6e])](()=>_0x259f7c);}async function _0x2b6a82(){await _0x2753fe,_0x46039c[_0x110973([0x6d,0x6f,0x64,0x65,0x6c])][_0x110973([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x39fdc6,_0x46039c[_0x110973([0x6d,0x6f,0x64,0x65,0x6c])][_0x110973([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x39fdc6,_0x46039c[_0x110973([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x110973([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xc69a17(){return _0x513383(_0x110973([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x222582(_0x110973([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x110973([0x73,0x74,0x61,0x74,0x65])]==_0x110973([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1477fb(){return _0x513383(_0x110973([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 _0x42d028(){return _0x513383(_0x110973([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4a65a4(_0x168866){const _0xe67c5d=_0x16950b();_0x46039c[_0xe67c5d]=_0x110973([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x168866,_0x168866!=_0x110973([0x56,0x61,0x6c,0x69,0x64])&&_0x2b6a82();}function _0x16950b(){const _0x1b578f=window[_0x110973([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x110973([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x110973([0x6e,0x6f,0x77])]())[_0x110973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x110973([0x2e]),'');let _0xa8a109=_0x110973([0x68]);for(let _0x33128a=0x0;_0x33128a<_0x1b578f[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33128a+=0x2){let _0x1ee5b8=window[_0x110973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b578f[_0x110973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x33128a,_0x33128a+0x2));_0x1ee5b8>=_0x24356f[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1ee5b8-=_0x24356f[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xa8a109+=_0x24356f[_0x1ee5b8];}return _0xa8a109;}function _0x53b98b(){const _0x4fdd0e=_0x3f067c[_0x110973([0x73,0x70,0x6c,0x69,0x74])](_0x110973([0x2e]));if(0x3!=_0x4fdd0e[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x465ca0(_0x4fdd0e[0x1]);function _0x465ca0(_0x2055ac){const _0x4a37b3=_0xb26d1a(_0x2055ac);return _0x4a37b3&&_0x577578()?_0x4a37b3:null;function _0x577578(){const _0x2fbc24=_0x4a37b3[_0x110973([0x6a,0x74,0x69])],_0x4689ee=window[_0x110973([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2fbc24[_0x110973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2fbc24[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x139ef7={..._0x4a37b3,[_0x110973([0x6a,0x74,0x69])]:_0x2fbc24[_0x110973([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2fbc24[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x139ef7[_0x110973([0x76,0x63])],_0x44340c(_0x139ef7)==_0x4689ee;}}}async function _0xd7436c(){let _0x233a35=!0x0;try{const _0x2bf09=_0x3f067c[_0x110973([0x73,0x70,0x6c,0x69,0x74])](_0x110973([0x2e])),[_0xc3e997,_0xef11c6,_0x5eebe1]=_0x2bf09;return _0x1f2624(_0xc3e997),await _0x44c969(_0xc3e997,_0xef11c6,_0x5eebe1),_0x233a35;}catch{return!0x1;}function _0x1f2624(_0x1761e6){const _0x572724=_0xb26d1a(_0x1761e6);_0x572724&&_0x572724[_0x110973([0x61,0x6c,0x67])]==_0x110973([0x45,0x53,0x32,0x35,0x36])||(_0x233a35=!0x1);}async function _0x44c969(_0x296d7a,_0x3743c5,_0x44cce0){const _0x55cb5e=window[_0x110973([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x110973([0x66,0x72,0x6f,0x6d])](_0x2c8b71(_0x44cce0),_0x3a22c6=>_0x3a22c6[_0x110973([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x49f16d=new window[(_0x110973([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x110973([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x296d7a+_0x110973([0x2e])+_0x3743c5),_0x4b6dde=window[_0x110973([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x110973([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4b6dde)return;const _0x155e31=await _0x4b6dde[_0x110973([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x110973([0x6a,0x77,0x6b]),_0x13bc57,{[_0x110973([0x6e,0x61,0x6d,0x65])]:_0x110973([0x45,0x43,0x44,0x53,0x41]),[_0x110973([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x110973([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x110973([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4b6dde[_0x110973([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x110973([0x6e,0x61,0x6d,0x65])]:_0x110973([0x45,0x43,0x44,0x53,0x41]),[_0x110973([0x68,0x61,0x73,0x68])]:{[_0x110973([0x6e,0x61,0x6d,0x65])]:_0x110973([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x155e31,_0x55cb5e,_0x49f16d)||(_0x233a35=!0x1);}}function _0xb26d1a(_0x433a8f){return _0x433a8f[_0x110973([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x110973([0x65,0x79]))?JSON[_0x110973([0x70,0x61,0x72,0x73,0x65])](_0x2c8b71(_0x433a8f)):null;}function _0x2c8b71(_0xf89742){return window[_0x110973([0x61,0x74,0x6f,0x62])](_0xf89742[_0x110973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x110973([0x2b]))[_0x110973([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x110973([0x2f])));}function _0x44340c(_0x2820d9){let _0x2d5179=0x1505;function _0x4f720e(_0xbe7a09){for(let _0x24ca9b=0x0;_0x24ca9b<_0xbe7a09[_0x110973([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24ca9b++){const _0xba7a16=_0xbe7a09[_0x110973([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x24ca9b);_0x2d5179=(_0x2d5179<<0x5)+_0x2d5179+_0xba7a16,_0x2d5179&=_0x2d5179;}}function _0x2a9bdd(_0x1b7f99){Array[_0x110973([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1b7f99)?_0x1b7f99[_0x110973([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2a9bdd):_0x1b7f99&&typeof _0x1b7f99==_0x110973([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x110973([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1b7f99)[_0x110973([0x73,0x6f,0x72,0x74])]()[_0x110973([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x524b61,_0x29d9ef])=>{_0x4f720e(_0x524b61),_0x2a9bdd(_0x29d9ef);}):_0x4f720e(window[_0x110973([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1b7f99));}return _0x2a9bdd(_0x2820d9),_0x2d5179>>>0x0;}function _0x56b5a5(_0x29f3c6){return _0x29f3c6[_0x110973([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x110973([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x110973([0x30]));}function _0x388e1e(_0x113c43){return _0x113c43[_0x110973([0x73,0x70,0x6c,0x69,0x74])]('')[_0x110973([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x110973([0x6a,0x6f,0x69,0x6e])]('');}function _0x513383(_0x4829d8){return _0x46039c[_0x110973([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x110973([0x68,0x61,0x73])](_0x4829d8);}function _0x222582(_0x63d8e0){return _0x46039c[_0x110973([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x110973([0x67,0x65,0x74])](_0x63d8e0);}function _0x39fdc6(){}function _0x110973(_0x528942){return _0x528942['map'](_0x36017c=>String['fromCharCode'](_0x36017c))['join']('');}_0x4a65a4(await _0x18599b());}(this);}['destroy'](){const _0x34c2e9=this['editor']['plugins']['get'](o),_0x2f340e=this['editor']['config']['get']('collaboration.channelId');for(const _0x416fc9 of _0x34c2e9['getCommentThreads']({'channelId':_0x2f340e}))_0x34c2e9['_detachCommentThread'](_0x416fc9['id']),_0x34c2e9['_threads']['delete'](_0x416fc9['id']);super['destroy']();}['hasMarkerForId'](_0x2422e7){return this['getAllMarkersForId'](_0x2422e7)['length']>0x0;}['getAllMarkersForId'](_0x3f4ee6){const _0x2d3220=[];for(const _0x591887 of this['editor']['model']['markers'])_0x591887['name']['startsWith']('comment:'+_0x3f4ee6)&&_0x2d3220['push'](_0x591887);return _0x2d3220;}['scrollToThreadMarker'](_0x213e45){setTimeout(()=>{const _0x472846=this['_getTargetForId'](_0x213e45);if(!_0x472846)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x213e45&&nt({'target':_0x472846[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x205ee8){this['editor']['model']['change'](()=>{for(const _0x45cf0e of this['getAllMarkersForId'](_0x205ee8))this['editor']['editing']['reconvertMarker'](_0x45cf0e);});}['_attachArchivedThread'](_0x11a99c){const _0x12a8b8=this['editor']['plugins']['get'](o),_0x9524e1=this['editor']['plugins']['get'](b),_0xb14de0=_0x12a8b8['getCommentThread'](_0x11a99c);if(!_0xb14de0['isAttached']){const _0x2ad0ed=_0xb14de0['attachTo'](()=>this['_getTargetForId'](_0xb14de0['id']));_0x9524e1['registerAnnotation'](_0x2ad0ed),_0xb14de0['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x109548=this['editor'],_0x11b4ae=_0x109548['plugins']['get'](it);_0x109548['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5b7d16,_0x49bf0b)=>{const {id:_0x5eb4c2}=ft(_0x5b7d16['markerName']),_0x4fb11d=_0x109548['plugins']['get'](o)['getCommentThread'](_0x5eb4c2),_0x108618=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5eb4c2;let _0x1246c4;if(_0x4fb11d&&_0x4fb11d['isResolved']&&!_0x108618&&_0x5b7d16['item'])return _0x49bf0b['consumable']['consume'](_0x5b7d16['item'],'addMarker:'+_0x5b7d16['markerName']),_0x49bf0b['consumable']['consume'](_0x5b7d16['item'],'removeMarker:'+_0x5b7d16['markerName']),null;const _0x55cd01=['ck-comment-marker'];return _0x108618&&_0x55cd01['push']('ck-comment-marker--active'),_0x1246c4=_0x4fb11d?.['length']?_0x4fb11d['comments']['first']['author']['id']:_0x11b4ae['me']['id'],{'classes':_0x55cd01,'attributes':{'data-comment':_0x5eb4c2,'data-author-id':_0x1246c4}};}}),_0x109548['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3c2631,{options:_0x3e4878})=>{if(_0x3e4878['showCommentHighlights'])return null;const _0x4126ec=_0x109548['plugins']['get'](o),_0x40410d=_0x109548['model']['markers']['get'](_0x3c2631),{id:_0x559c21,part:_0xa01a61}=ft(_0x3c2631);return _0x40410d&&!_0x40410d['affectsData']||_0x3e4878['ignoreResolvedComments']&&_0x4126ec['getCommentThread'](_0x559c21)?.['isResolved']?null:{'group':'comment','name':_0xa01a61?_0x559c21+':'+_0xa01a61:_0x559c21};}}),_0x109548['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2d4bda,{writer:_0x23b686})=>_0x23b686['createElement']('$marker',{'data-name':'comment:'+_0x2d4bda['getAttribute']('id')})}),_0x109548['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x57f8a0=this['editor'],_0x592832=_0x57f8a0['plugins']['get'](o),_0x1c70b9=new Set(),_0x3c4be7=new Set();_0x57f8a0['model']['document']['registerPostFixer'](_0x309a83=>{let _0x2e5f6d=!0x1;for(const {name:_0x306077,data:_0x3b6bdc}of _0x57f8a0['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d721c,id:_0x10ef85}=ft(_0x306077);let _0x12748f=_0x3b6bdc['newRange'];if('comment'!==_0x3d721c||!_0x12748f)continue;const _0x2d1138='$graveyard'===_0x12748f['root']['rootName'];_0x2d1138||(_0x12748f=ht(_0x12748f,_0x57f8a0['model']),!_0x12748f||_0x12748f['isCollapsed']||!_0x3b6bdc['newRange']||_0x12748f['isEqual'](_0x3b6bdc['newRange']))?_0x57f8a0['model']['hasContent'](_0x12748f)&&!_0x2d1138?this['isThreadsLoadingPaused']?_0x1c70b9['add'](_0x306077):this['_handleThreadMarker'](_0x306077,_0x10ef85):(_0x3c4be7['add'](_0x306077),_0x1c70b9['delete'](_0x306077),_0x309a83['removeMarker'](_0x306077),_0x2e5f6d=!0x0):(_0x309a83['updateMarker'](_0x306077,{'range':_0x12748f}),_0x2e5f6d=!0x0);}return _0x2e5f6d;}),this['on']('change:isThreadsLoadingPaused',(_0x45adc3,_0x445de8,_0x537d88)=>{if(!_0x537d88&&_0x1c70b9['size'])for(const _0x20a8c9 of _0x1c70b9){const {id:_0x4ec1ad}=ft(_0x20a8c9);_0x1c70b9['delete'](_0x20a8c9),_0x57f8a0['model']['markers']['get'](_0x20a8c9)&&this['_handleThreadMarker'](_0x20a8c9,_0x4ec1ad);}}),this['listenTo'](_0x57f8a0['model']['document'],'change',()=>{for(const {name:_0x5e5658,data:{newRange:_0x5d0955}}of _0x57f8a0['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1198ce,id:_0x3d5208}=ft(_0x5e5658);if('comment'!==_0x1198ce)continue;const _0x4cf993=_0x592832['getCommentThread'](_0x3d5208),_0x342cc5=this['hasMarkerForId'](_0x3d5208);_0x4cf993&&(!_0x4cf993['_hasTargetInContent']&&_0x5d0955&&_0x57f8a0['editing']['view']['once']('render',()=>{const _0x2c82e0=_0x57f8a0['plugins']['get'](y),_0x38e908=_0x592832['_threadToController']['get'](_0x4cf993)['view'];_0x2c82e0['getByInnerView'](_0x38e908)['refreshVisibility']();},{'priority':'low'}),_0x4cf993['_hasTargetInContent']=_0x342cc5||!!_0x5d0955),_0x5d0955||(_0x3c4be7['add'](_0x5e5658),_0x1c70b9['delete'](_0x5e5658));}for(const _0x1834c3 of _0x3c4be7){const {id:_0x5742d4}=ft(_0x1834c3),_0x115819=_0x592832['getCommentThread'](_0x5742d4);if(_0x1c70b9['delete'](_0x1834c3),!_0x115819)continue;const _0x1b53be=this['hasMarkerForId'](_0x5742d4);_0x1b53be||_0x115819['isSubmitted']?_0x1b53be||_0x115819['unlinkedAt']||_0x115819['setUnlinkedAt'](new Date()):_0x115819['remove']();}_0x3c4be7['clear']();});}['_handleInitialThreads'](_0x27c178){_0x27c178['forEach'](_0x3d8f3a=>{_0x3d8f3a['unlinkedAt']&&this['_attachArchivedThread'](_0x3d8f3a['id']);});}['_getTargetForId'](_0x3fa6cb){const _0x408584=this['editor'],_0x564c00=this['getAllMarkersForId'](_0x3fa6cb);return et(_0x408584['editing'],_0x564c00);}['_getTextContext'](_0x2d0321){const _0x295824=this['getAllMarkersForId'](_0x2d0321);let _0x296ef0='',_0x4c33fa=!0x1;for(const _0x49df5d of _0x295824){const _0x31a1d9=_0x49df5d['getRange']();for(const _0x399420 of Array['from'](_0x31a1d9['getItems']()))_0x399420['is']('$textProxy')?(_0x296ef0&&_0x4c33fa&&(_0x296ef0+='\x20',_0x4c33fa=!0x1),_0x296ef0+=_0x399420['data']):_0x4c33fa=!0x0;_0x4c33fa=!0x0;}return _0x296ef0['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xe919c6,_0x3ed8af){const _0x124572=this['editor'],_0x182b87=_0x124572['plugins']['get'](o);let _0x206ee0=_0x182b87['getCommentThread'](_0x3ed8af);const _0x3cc622=_0x124572['config']['get']('collaboration.channelId'),_0x964856=_0x124572['plugins']['get'](b);if(_0x206ee0&&(_0x206ee0['unlinkedAt']&&_0x206ee0['setUnlinkedAt'](null),_0x206ee0['isAttached']))return _0x206ee0;return!this['getAllMarkersForId'](_0x3ed8af)[0x0]['managedUsingOperations']?_0x124572['editing']['view']['once']('render',()=>{if(_0x182b87['getCommentThread'](_0x3ed8af))return;const _0x35f708=_0x124572['plugins']['get'](y);_0x206ee0=_0x182b87['openNewCommentThread']({'channelId':_0x3cc622,'threadId':_0x3ed8af,'target':()=>this['_getTargetForId'](_0x3ed8af),'context':{'type':'text','value':this['_getTextContext'](_0x3ed8af)}});const _0xc21d39=_0x182b87['_threadToController']['get'](_0x206ee0)['view'],_0x30e965=_0x35f708['getByInnerView'](_0xc21d39);_0x30e965&&_0x964856['registerAnnotation'](_0x30e965);},{'priority':'low'}):_0x182b87['fetchCommentThread']({'channelId':_0x3cc622,'threadId':_0x3ed8af})['then'](_0x1ef6af=>{if('destroyed'!==_0x124572['state']){if(_0x206ee0=_0x1ef6af,_0x206ee0&&!_0x206ee0['isAttached']){const _0x144e10=_0x206ee0['attachTo'](()=>this['_getTargetForId'](_0x3ed8af));_0x964856['registerAnnotation'](_0x144e10),_0x206ee0['isResolved']&&this['_reconvertMarkers'](_0x3ed8af);}else{if(!_0x206ee0){const _0x467f8b=this['getAllMarkersForId'](_0x3ed8af);_0x124572['model']['change'](_0x42836b=>{for(const _0x22c3ea of _0x467f8b)_0x42836b['removeMarker'](_0x22c3ea);});}}}}),_0x206ee0;}['_handleThreadMarker'](_0x19aad7,_0x2b6834){const _0xd6a32b=this['_attachMarkerToThread'](_0x19aad7,_0x2b6834);_0xd6a32b&&!_0xd6a32b['context']&&_0xd6a32b['setContext']({'type':'text','value':this['_getTextContext'](_0x2b6834)});}['_initAriaMarkerChangeAnnouncements'](){const _0x21f0f9=this['editor'];rt(_0x21f0f9['model'],({left:_0x3d4e73,entered:_0xd2535b})=>{for(const _0x2fa994 of _0x3d4e73)if(mt(_0x2fa994)){_0x21f0f9['ui']['ariaLiveAnnouncer']['announce'](N(_0x21f0f9['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x43e8e6 of _0xd2535b)if(mt(_0x43e8e6)){_0x21f0f9['ui']['ariaLiveAnnouncer']['announce'](N(_0x21f0f9['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x158e83)));break;}});}}function dt(_0x1128e9,_0x5bca3c){return _0x5bca3c?_0x1128e9+':'+_0x5bca3c:_0x1128e9;}function ht(_0x25aa5a,_0x536d17){const _0x345422=_0x536d17['schema'],_0x4a6851=_0x536d17['createRange'](_0x25aa5a['start']);for(const _0x4980e7 of _0x25aa5a['getWalker']()){const {type:_0x3c7251,item:_0x19ef68,nextPosition:_0x4f6f8f}=_0x4980e7;if('text'===_0x3c7251||_0x345422['isObject'](_0x19ef68)){const _0x2f8cfd=_0x536d17['createPositionBefore'](_0x19ef68);_0x4a6851['isCollapsed']&&(_0x4a6851['start']=_0x2f8cfd),_0x4a6851['end']=_0x4f6f8f;}}return _0x4a6851;}function mt(_0x35649f){return'comment'===ft(_0x35649f['name'])['group'];}class s extends _0x8104b3{['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 _0x529802=this['editor'],_0x328fda=_0x529802['plugins']['get'](o),_0x2a7998=_0x529802['plugins']['get'](r),_0x3ad77d=_0x529802['plugins']['get'](y),_0x296c2e=_0x529802['plugins']['get'](b);_0x529802['ui']['componentFactory']['add']('comment',()=>{const _0x1eff28=this['_createUIButton'](_0x8118da);return _0x1eff28['tooltip']=!0x0,_0x1eff28;}),_0x529802['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5c9447)),_0x296c2e['addSourceCollector'](()=>{const _0x160ff4=[];for(const [_0x472775,_0x52e26e]of _0x328fda['_threadToController']){const _0x17e486=_0x2a7998['getAllMarkersForId'](_0x472775['id']),_0x5e3bf5=_0x17e486['map'](_0x3bf174=>_0x3bf174['getRange']());_0x17e486['length']>0x0&&_0x160ff4['push']([_0x52e26e['view'],_0x5e3bf5]);}return _0x160ff4;}),this['listenTo'](_0x3ad77d,'change:activeAnnotations',(_0x60c19f,_0x290319,_0x2088a4)=>{const _0xcb941c=Array['from'](_0x2088a4)['map'](_0x23f34c=>_0x23f34c['innerView'])['find'](_0x1df1e=>_0x328fda['_viewToController']['has'](_0x1df1e));if(!_0xcb941c)return void(_0x2a7998['activeMarker']=null);const _0x29fcca=_0x328fda['_viewToController']['get'](_0xcb941c)['model']['id'],_0x2db42f='comment:'+_0x29fcca;_0x29fcca&&_0x2a7998['hasMarkerForId'](_0x29fcca)?_0x2a7998['activeMarker']=_0x2db42f:_0x2a7998['activeMarker']&&(_0x2a7998['activeMarker']=null);}),this['listenTo'](_0x328fda,'removeCommentThread',(_0x109d65,{threadId:_0x24c1f6,isFromAdapter:_0x2f7c88})=>{!_0x2f7c88&&_0x529802['ui']['focusTracker']['isFocused']&&_0x2a7998['hasMarkerForId'](_0x24c1f6)&&_0x529802['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x328fda,'addComment',(_0x50b652,{threadId:_0x1fa6ab,isFromAdapter:_0x5c5a92})=>{if(_0x5c5a92||!_0x2a7998['hasMarkerForId'](_0x1fa6ab)||!_0x328fda['hasCommentThread'](_0x1fa6ab))return;0x1===_0x328fda['getCommentThread'](_0x1fa6ab)['length']&&(_0x529802['editing']['view']['focus'](),_0x50b652['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x53cc39=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1c2161;for(const _0x13eef8 in _0x53cc39){const _0x1b4f4d=_0x13eef8,_0xf76509=_0x53cc39[_0x1b4f4d];if('commentsLicenseKeyValid'==_0xf76509||'commentsLicenseKeyInvalid'==_0xf76509||'commentsLicenseKeyExpired'==_0xf76509||'commentsLicenseKeyDomainLimit'==_0xf76509||'commentsLicenseKeyNotAllowed'==_0xf76509||'commentsLicenseKeyEvaluationLimit'==_0xf76509||'commentsLicenseKeyTrialLimit'==_0xf76509||'commentsLicenseKeyUsageLimit'==_0xf76509){delete _0x53cc39[_0x1b4f4d],_0x1c2161=_0xf76509,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1c2161&&_0x53cc39['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1c2161&&_0x53cc39['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1c2161&&_0x53cc39['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1c2161&&_0x53cc39['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1c2161&&_0x53cc39['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1c2161&&_0x53cc39['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1c2161&&_0x53cc39['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3ff3eb){const _0x5bb416=this['editor'],_0x4364b2=new _0x3ff3eb(_0x5bb416['locale']),_0xf79054=_0x5bb416['commands']['get']('addCommentThread');return _0x4364b2['set']({'label':N(_0x5bb416['locale'],'Comment'),'icon':_0x4a5b76}),_0x4364b2['bind']('isEnabled')['to'](_0xf79054,'hasContent'),this['listenTo'](_0x4364b2,'execute',()=>{_0xf79054['execute']();}),_0x4364b2;}}class i extends _0x8104b3{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1fd095){super(_0x1fd095),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2d79b5,_0x32e84b,_0x21fcaf)=>{_0x21fcaf?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4a50ca,_0x4f6f18]of this['editor']['commands'])_0x4f6f18['affectsData']&&'addCommentThread'!==_0x4a50ca&&_0x4f6f18['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x16eb52=this['editor']['editing']['view']['document'];this['listenTo'](_0x16eb52,'cut',_0x6c9c3e=>_0x6c9c3e['stop'](),{'priority':'highest'}),this['listenTo'](_0x16eb52,'clipboardInput',_0x1634ac=>_0x1634ac['stop'](),{'priority':'highest'}),this['listenTo'](_0x16eb52,'delete',_0xbc5149=>_0xbc5149['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3f8ded,_0x1eb8d0]of this['editor']['commands'])_0x1eb8d0['affectsData']&&'addCommentThread'!==_0x3f8ded&&_0x1eb8d0['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 _0xfe7412{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf3d1ec){super(_0xf3d1ec),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2cc353=this['context']['plugins']['get'](y);this['listenTo'](_0x2cc353,'_activateAnnotation',(_0x2a9267,_0x18c81b)=>{for(const _0x2f42ab of this['activeUIs']){const _0x4f0240=this['_uis']['get'](_0x2f42ab);(0x0,this['uisData']['get'](_0x2f42ab)['filter'])(_0x18c81b)&&_0x4f0240['setActiveAnnotation'](_0x18c81b);}}),this['listenTo'](_0x2cc353,'_deactivateAllAnnotations',()=>{for(const _0x1b65de of this['activeUIs']){this['_uis']['get'](_0x1b65de)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2cc353['_visibleAnnotations'],'add',(_0x2f9c85,_0x19c567)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x19c567);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1f47f2){return this['activeUIs']['has'](_0x1f47f2);}['activate'](_0x4747be,_0x53bcf6=this['defaultFilter']){const _0x4a09c5=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4747be))throw new _0xd3f428('annotationsuis-missing-ui',this,{'uiName':_0x4747be});this['isActive'](_0x4747be)&&this['deactivate'](_0x4747be),this['activeUIs']['add'](_0x4747be);const _0x18e553=new S();v({'source':_0x4a09c5['_visibleAnnotations'],'target':_0x18e553,'filter':_0x53bcf6}),this['uisData']['set'](_0x4747be,{'collection':_0x18e553,'filter':_0x53bcf6});const _0x24feb9=this['_uis']['get'](_0x4747be);_0x24feb9['attach'](_0x18e553),this['listenTo'](_0x24feb9,'change:activeAnnotation',(_0x71deef,_0x5deade,_0x525a68,_0x355ac5)=>{_0x355ac5&&_0x4a09c5['_removeActiveAnnotation'](_0x355ac5),_0x525a68&&_0x4a09c5['_addActiveAnnotation'](_0x525a68);});}['deactivate'](_0x39fb89){if(this['activeUIs']['delete'](_0x39fb89),!this['_uis']['has'](_0x39fb89))throw new _0xd3f428('annotationsuis-missing-ui',this,{'uiName':_0x39fb89});const _0x7fb676=this['_uis']['get'](_0x39fb89);_0x7fb676['detach'](),this['stopListening'](_0x7fb676),this['uisData']['get'](_0x39fb89)['collection']['destroy'](),this['uisData']['delete'](_0x39fb89);}['switchTo'](_0x33bc12){if(!this['_uis']['has'](_0x33bc12))throw new _0xd3f428('annotationsuis-missing-ui',this,{'uiName':_0x33bc12});const _0x53eff1=this['context']['plugins']['get'](y),_0x2a6292=Array['from'](_0x53eff1['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x33bc12);const _0x4cf459=this['_uis']['get'](_0x33bc12);_0x4cf459['setActiveAnnotation'](_0x2a6292),_0x4cf459['_setSelectedAnnotations']&&_0x2a6292&&_0x4cf459['_setSelectedAnnotations']([_0x2a6292]);}['deactivateAll'](){for(const _0x1c8bca of this['activeUIs'])this['deactivate'](_0x1c8bca);}['register'](_0x48fde3,_0x5cb140){if(this['_uis']['has'](_0x48fde3))throw new _0xd3f428('annotationsuis-register-already-registered');if('function'!=typeof _0x5cb140['attach']||'function'!=typeof _0x5cb140['detach']||'function'!=typeof _0x5cb140['setActiveAnnotation'])throw new _0xd3f428('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x48fde3,_0x5cb140);}['refilterAnnotations'](){const _0x3505ff=this['context']['plugins']['get'](y)['collection'],_0x121bef=new Map(),_0x10cd73=Array['from'](this['activeUIs']);for(const _0xb5d6d of this['activeUIs']){const _0x5bd0bf=this['uisData']['get'](_0xb5d6d)['collection'];for(const _0x44d038 of _0x5bd0bf)_0x121bef['set'](_0x44d038,_0xb5d6d);}for(const _0x3148ed of _0x3505ff){const _0x14555b=_0x121bef['get'](_0x3148ed);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3148ed);const _0x93c522=_0x10cd73['find'](_0x507915=>this['uisData']['get'](_0x507915)['filter'](_0x3148ed));_0x14555b!==_0x93c522&&(_0x14555b&&this['uisData']['get'](_0x14555b)['collection']['remove'](_0x3148ed),_0x93c522&&this['uisData']['get'](_0x93c522)['collection']['add'](_0x3148ed));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xbcb640){const _0x26b243=[];for(const _0x3f9dfa of this['activeUIs']){(0x0,this['uisData']['get'](_0x3f9dfa)['filter'])(_0xbcb640)&&_0x26b243['push'](_0x3f9dfa);}if(_0x26b243['length']>0x1)throw new _0xd3f428('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x26b243,'annotationType':_0xbcb640['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(_0x4fa8c1){super(_0x4fa8c1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x140a33,_0x4f4428)=>_0x140a33+_0x4f4428),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39e96e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39e96e['to']('isAnimationDisabled',_0x5c47da=>_0x5c47da?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39e96e['to']('top',_0x3e9196=>Ot(_0x3e9196))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x272de2=this['element']['clientHeight'];_0x272de2&&(this['height']=_0x272de2);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xfe7412{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53c64a){super(_0x53c64a),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 _0x299084=this['context']['config']['get']('sidebar.container');_0x299084&&this['setContainer'](_0x299084);}['setContainer'](_0x4297ea){if(!g(_0x4297ea))throw new _0xd3f428('sidebar-setcontainer-invalid-element');this['container']=_0x4297ea;}['_attachToContainer']({viewClass:_0x55293='',spaceBetweenItems:_0x29c546=0x19}={}){if(!g(this['container']))throw new _0xd3f428('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x55293,this['_spaceBetweenItems']=_0x29c546;}['rearrange']({removedAnnotation:_0x36df09,previousAnnotation:_0x1b858b,nextAnnotation:_0x36ab27}){const _0x1919b8=this['getSidebarItemView'](_0x36df09);this['view']['list']['remove'](_0x1919b8),this['_destroySidebarItemView'](_0x36df09),_0x1b858b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1b858b)),_0x36ab27&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x36ab27)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x586391,activatedAnnotation:_0x17af6d,disableAnimationOnActivatedAnnotation:_0x400b65}){if(this['_activeAnnotation']=_0x17af6d,_0x586391){_0x586391['isActive']=!0x1;const _0x10e103=this['getSidebarItemView'](_0x586391);_0x10e103&&_0x400b65&&(_0x10e103['isAnimationDisabled']=!0x1);}if(_0x17af6d){const _0x2c63fb=this['getSidebarItemView'](_0x17af6d);_0x2c63fb&&(_0x17af6d['isActive']=!0x0,_0x400b65&&(_0x2c63fb['isAnimationDisabled']=!0x0,_0x2c63fb['top']+=0x1),this['_alignToTargetRect'](_0x2c63fb));}}['_detachFromContainer'](_0x58d40d){if(this['view']['element']['remove'](),_0x58d40d){for(const _0x5cfce5 of _0x58d40d)this['_destroySidebarItemView'](_0x5cfce5);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x312ca5,_0x39b089){_0x39b089||(_0x39b089=_0x312ca5['view']);const _0x2073a9=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2073a9,_0x312ca5),this['_annotationToSidebarItemView']['set'](_0x312ca5,_0x2073a9),_0x2073a9['content']['add'](_0x39b089),this['listenTo'](_0x312ca5['view'],'change:targetRect',(_0x223742,_0x47ea46,_0x5c6d22)=>{const _0x5e6612=this['_getTargetTop'](_0x312ca5,_0x5c6d22);_0x2073a9['_targetTop']!=_0x5e6612&&(_0x2073a9['_targetTop']=_0x5e6612,this['_setItemTop'](_0x2073a9,_0x5e6612));}),this['listenTo'](_0x2073a9,'change:top',()=>{this['_recalculate'](_0x2073a9,'top');}),this['listenTo'](_0x2073a9,'change:bottom',()=>{this['_recalculate'](_0x2073a9,'bottom');}),this['_alignToTargetRect'](_0x2073a9);const _0x4095ac=this['_getItemBefore'](_0x2073a9);if(_0x4095ac)this['_alignAfterItem'](_0x4095ac,_0x2073a9)||this['_alignToTargetRect'](_0x2073a9);else this['_alignToTargetRect'](_0x2073a9);return this['_updateLastItem'](),this['view']['list']['add'](_0x2073a9),_0x2073a9;}['_alignForTopChange'](_0x412b1a){if(!_0x412b1a['content']['length'])return;const _0x1b9ba1=this['_getItemBefore'](_0x412b1a);if(!_0x1b9ba1)return;const _0x2ff565=this['_sidebarItemViewToAnnotation']['get'](_0x1b9ba1),_0x293bea=this['_activeAnnotation'];_0x293bea&&_0x293bea===_0x2ff565?this['_alignAfterItem'](_0x1b9ba1,_0x412b1a):this['_alignBeforeItem'](_0x412b1a,_0x1b9ba1);}['_alignForBottomChange'](_0x543276){if(!_0x543276['content']['length'])return;const _0x2df675=this['_getItemAfter'](_0x543276);if(!_0x2df675)return;const _0x266c2c=this['_sidebarItemViewToAnnotation']['get'](_0x2df675),_0x19dc83=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3d8e63=this['_activeAnnotation'];_0x3d8e63&&_0x3d8e63===_0x266c2c&&_0x19dc83?(this['_alignBeforeItem'](_0x2df675,_0x543276),this['_alignAfterItem'](_0x543276,_0x2df675)):_0x3d8e63&&_0x3d8e63===_0x266c2c?this['_alignBeforeItem'](_0x2df675,_0x543276):this['_alignAfterItem'](_0x543276,_0x2df675);}['_recalculate'](_0x3a1ebc,_0x610007){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x44c36f,changedProp:_0x4c4640}of this['_recalculateBuffer'])'top'===_0x4c4640?this['_alignForTopChange'](_0x44c36f):this['_alignForBottomChange'](_0x44c36f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3a1ebc,'changedProp':_0x610007});}['getSidebarItemView'](_0x8e2121){return this['_annotationToSidebarItemView']['get'](_0x8e2121);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x43d3ca){const _0x5f170c=this['getSidebarItemView'](_0x43d3ca);this['stopListening'](_0x5f170c),this['stopListening'](_0x43d3ca['view']),_0x5f170c['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x43d3ca),this['_sidebarItemViewToAnnotation']['delete'](_0x5f170c);}['_createSidebarView'](){const _0x3a18a5=new H(this['context']['locale']);return _0x3a18a5['render'](),this['on']('change:_lastItem',(_0x1654ea,_0x40a789,_0x4e2a28,_0x4b41fc)=>{_0x4b41fc&&_0x3a18a5['unbind']('minHeight'),_0x4e2a28?_0x3a18a5['bind']('minHeight')['to'](_0x4e2a28,'bottom'):_0x3a18a5['minHeight']=null;}),_0x3a18a5;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x16be55){const _0x374004=this['_sidebarItemViewToAnnotation']['get'](_0x16be55),_0x440ade=_0x374004&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x374004)-0x1);return _0x440ade&&this['getSidebarItemView'](_0x440ade)||null;}['_getItemAfter'](_0x199321){const _0x271a6a=this['_sidebarItemViewToAnnotation']['get'](_0x199321),_0x82e87f=_0x271a6a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x271a6a)+0x1);return _0x82e87f&&this['getSidebarItemView'](_0x82e87f)||null;}['_alignBeforeItem'](_0x647d40,_0x4cbbd7){_0x647d40['updateHeight']();const _0x702838=G(_0x4cbbd7['bottom']+this['_spaceBetweenItems'],_0x647d40['top']);return!!_0x702838&&(this['_setItemTop'](_0x4cbbd7,_0x4cbbd7['top']-_0x702838),!0x0);}['_alignAfterItem'](_0x4870c0,_0x43dc51){_0x4870c0['updateHeight']();const _0x572c73=G(_0x4870c0['bottom']+this['_spaceBetweenItems'],_0x43dc51['top']);return!!_0x572c73&&(this['_setItemTop'](_0x43dc51,_0x43dc51['top']+_0x572c73,!0x1),!0x0);}['_alignToTargetRect'](_0x175689){const _0x418704=this['_sidebarItemViewToAnnotation']['get'](_0x175689);if(!_0x418704||!_0x418704['target']||!_0x418704['targetRect'])return;const _0x2f8128=this['_getTargetTop'](_0x418704,_0x418704['targetRect']);this['_setItemTop'](_0x175689,_0x2f8128);}['_getTargetTop'](_0x4b52f9,_0x497f03){if(null===_0x497f03)return 0x0;if(_0x4b52f9['target']instanceof _0x57fdd2)return _0x497f03['top'];{const _0x3164f1=new _0x57fdd2(this['view']['element'])['top'];return _0x497f03['top']-_0x3164f1;}}['_setItemTop'](_0x18a27d,_0x3b7e2b,_0x55bcc0=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x55bcc0&&(_0x3b7e2b=Math['max'](_0x3b7e2b,this['_getMaxAvailableTop'](_0x18a27d))),_0x18a27d['top']=_0x3b7e2b;}['_getMaxAvailableTop'](_0x1ad5c2){let _0x35e1bc=this['_getItemBefore'](_0x1ad5c2),_0x59c520=0x0;for(;_0x35e1bc;)_0x35e1bc['updateHeight'](),_0x59c520+=this['_spaceBetweenItems']+_0x35e1bc['height'],_0x35e1bc=this['_getItemBefore'](_0x35e1bc);return _0x59c520;}}function G(_0x110976,_0x4e3d49){return Math['max'](_0x110976-_0x4e3d49,0x0);}function g(_0x4db17f){return null!==_0x4db17f&&'object'==typeof _0x4db17f&&0x1===_0x4db17f['nodeType'];}class e extends _0xfe7412{['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(_0x41c909){super(_0x41c909),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4d4ef2(),this['_refreshPositioningDebounced']=_0x5e0d3b(()=>{_0x41c909['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x47e926=this['context']['plugins']['get'](j),_0x5a0a0f=this['context']['plugins']['get'](z);_0x47e926['register']('wideSidebar',this),_0x5a0a0f['container']&&_0x47e926['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3442a5){if(_0x3442a5===this['activeAnnotation'])return;const _0x196b34=this['context']['plugins']['get'](z);_0x196b34['_activeAnnotation']=_0x3442a5;const _0x25dd4f=this['activeAnnotation'];_0x196b34['refresh']({'blurredAnnotation':_0x25dd4f,'activatedAnnotation':_0x3442a5}),this['activeAnnotation']=_0x3442a5;}['attach'](_0x4a1f9a){this['annotations']=_0x4a1f9a;const _0xf02720=this['context']['plugins']['get'](z);if(_0xf02720['_annotations']=_0x4a1f9a,this['isAttached'])throw new _0xd3f428('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xf02720,'set:container',()=>{this['detach'](),this['listenTo'](_0xf02720,'change:container',_0x51fc73=>{_0x51fc73['off'](),this['attach'](_0x4a1f9a);});}),_0xf02720['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x38a800=_0x4ccc89=>{_0x4ccc89['updateTargetRect'](),_0xf02720['addAnnotation'](_0x4ccc89);};for(const _0x31adff of _0x4a1f9a)_0x38a800(_0x31adff);this['listenTo'](_0x4a1f9a,'add',(_0x3389bc,_0x39ab54)=>{_0x38a800(_0x39ab54);}),this['listenTo'](_0x4a1f9a,'remove',(_0x24acd3,_0x1d6512,_0x54b503)=>{_0xf02720['rearrange']({'removedAnnotation':_0x1d6512,'previousAnnotation':_0x4a1f9a['get'](_0x54b503-0x1),'nextAnnotation':_0x4a1f9a['get'](_0x54b503+0x1)}),_0x1d6512===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4a1f9a,'focus',(_0x2a88b0,_0x16db5e)=>{this['setActiveAnnotation'](_0x16db5e);}),this['listenTo'](_0x4a1f9a,'blur',()=>{this['setActiveAnnotation'](null);});const _0x34044e=this['context']instanceof _0x45e0d7?this['context']['editors']:new _0x4d4ef2([this['context']]);for(const _0x2da22b of _0x34044e)this['_integrateWithEditorAnnotations'](_0x2da22b);this['listenTo'](_0x34044e,'add',(_0xf4d091,_0xc6c3d)=>{this['listenTo'](_0xc6c3d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xc6c3d);});}),this['listenTo'](_0x34044e,'remove',(_0x1e3789,_0x4d5636)=>{_0x4d5636['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4d5636['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xd3f428('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1063e0=this['context']['plugins']['get'](z);_0x1063e0['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1063e0),this['stopListening'](this['annotations']),this['context']instanceof _0x45e0d7&&this['stopListening'](this['context']['editors']);for(const _0x1f34d1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1f34d1);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2c1d4a){if(!_0x2c1d4a['plugins']['has']('EditorAnnotations'))return;const _0x1b224a=_0x2c1d4a['plugins']['get']('EditorAnnotations'),_0x16abd7=()=>{const _0x46c0ab=_0x1b224a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x46c0ab[0x0]||null);};this['listenTo'](_0x1b224a,'refresh',_0x16abd7),this['listenTo'](_0x1b224a,'blur',(_0x14c5cf,{isAnnotationTracked:_0x263ca3})=>{this['activeAnnotation']&&_0x263ca3(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b224a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x33bbfc=>{_0x1b224a['hasDomSelection']()&&(_0x16abd7(),_0x33bbfc['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1b224a);}['_destroyEditorAnnotationsIntegration'](_0x1edfbe){this['stopListening'](_0x1edfbe),this['_editorAnnotations']['remove'](_0x1edfbe);}}class C extends _0x8118da{['counterView'];constructor(_0x461e0d){super(_0x461e0d);const _0x45a638=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4a1afd,_0x2936c3)=>_0x4a1afd?'...':_0x2936c3['toString']()),this['set']('annotationType',''),this['icon']=_0x4a5b76,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x45a638['to']('annotationType',_0x2e9013=>'ck-annotation-counter__badge--'+_0x2e9013),_0x45a638['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x45a638['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xfe7412{['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(_0x45d288){super(_0x45d288),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x39efeb())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4d4ef2(),this['_refreshPositioningDebounced']=_0x5e0d3b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3051f9(this['context']['locale']),this['balloonPanelView']=new _0x175f2a(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1ee68e){this['annotations']=_0x1ee68e;const _0xe142e3=this['context']['plugins']['get'](z),_0x2152b3=this['balloonPanelView'];if(_0xe142e3['_annotations']=_0x1ee68e,this['isAttached'])throw new _0xd3f428('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xe142e3,'set:container',()=>{this['detach'](),this['listenTo'](_0xe142e3,'change:container',_0x58c037=>{_0x58c037['off'](),this['attach'](_0x1ee68e);});}),_0xe142e3['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3d9218=_0x1cd3e0=>{const _0x5e4406=new C(this['context']['locale']);_0xe142e3['addAnnotation'](_0x1cd3e0,_0x5e4406),this['_annotationToNarrowView']['set'](_0x1cd3e0,_0x5e4406),_0x5e4406['bind']('isDirty','annotationType','number')['to'](_0x1cd3e0['view'],'isDirty','type','length'),_0x5e4406['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2152b3['content']['first']!==_0x1cd3e0['view']?(this['_showBalloon'](_0x1cd3e0),_0x1cd3e0['view']['element']['focus'](),this['setActiveAnnotation'](_0x1cd3e0)):this['setActiveAnnotation'](null);});};for(const _0x352f19 of _0x1ee68e)_0x3d9218(_0x352f19);this['listenTo'](_0x1ee68e,'add',(_0x45f29d,_0x290243)=>{_0x3d9218(_0x290243);}),this['listenTo'](_0x1ee68e,'remove',(_0x24d736,_0xbe701e,_0x4b5db8)=>{this['_annotationToNarrowView']['get'](_0xbe701e)['destroy'](),this['_annotationToNarrowView']['delete'](_0xbe701e),_0xe142e3['rearrange']({'removedAnnotation':_0xbe701e,'previousAnnotation':_0x1ee68e['get'](_0x4b5db8-0x1),'nextAnnotation':_0x1ee68e['get'](_0x4b5db8+0x1)}),_0xbe701e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1ee68e,'focus',(_0x123bbc,_0x1f3c36)=>{this['setActiveAnnotation'](_0x1f3c36);}),this['listenTo'](_0x1ee68e,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x505889,_0x576a3d)=>{_0x576a3d['keyCode']===_0x226af2['esc']&&_0x2152b3['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2152b3['content']['first']),this['_hideBalloon'](),_0x576a3d['stopPropagation'](),_0x576a3d['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5b79bf,_0x290a66)=>{const _0x1d8898=_0x290a66['target'];_0x2152b3['isVisible']&&_0x2152b3['element']['contains'](_0x1d8898)||_0xe142e3['view']['element']['contains'](_0x1d8898)||_0x5b79bf['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x93f6d8=>_0x93f6d8['contains'](_0x1d8898))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x39f170=this['context']instanceof _0x45e0d7?this['context']['editors']:new _0x4d4ef2([this['context']]);for(const _0x5a09a7 of _0x39f170)this['_integrateWithEditorAnnotations'](_0x5a09a7);this['listenTo'](_0x39f170,'add',(_0x50253d,_0x17471b)=>{this['listenTo'](_0x17471b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x17471b);});}),this['listenTo'](_0x39f170,'remove',(_0x3bdd2e,_0x3a434f)=>{_0x3a434f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a434f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x245de0){if(_0x245de0===this['activeAnnotation'])return;const _0x5e9897=this['context']['plugins']['get'](z);if(_0x5e9897['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x245de0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x245de0)_0x5e9897['getSidebarItemView'](_0x245de0)?this['_showBalloon'](_0x245de0):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x245de0;}['detach'](){if(!this['isAttached'])throw new _0xd3f428('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5ee313=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xaf7b7d=>_0xaf7b7d['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5ee313['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x45e0d7&&this['stopListening'](this['context']['editors']);for(const _0x5664d3 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5664d3);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'](_0x2540c2){if(!_0x2540c2['plugins']['has']('EditorAnnotations'))return;const _0x46472b=_0x2540c2['plugins']['get']('EditorAnnotations'),_0x40fb46=this['context']['plugins']['get'](z),_0x41f83a=this['annotations'],_0x57e100=this['balloonPanelView'],_0x52d4a5=()=>{const _0xfb1e96=_0x46472b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xfb1e96),this['setActiveAnnotation'](_0xfb1e96[0x0]||null);};this['listenTo'](_0x46472b,'refresh',_0x52d4a5),this['listenTo'](_0x46472b,'blur',(_0x6f7510,{isAnnotationTracked:_0x194780})=>{this['activeAnnotation']&&_0x194780(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x46472b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x41f83a,'blur',_0x11f84e=>{_0x46472b['hasDomSelection']()&&_0x11f84e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x501805,_0x33f8b5)=>{const _0x2f81f7=_0x33f8b5['target'];_0x57e100['isVisible']&&_0x57e100['element']['contains'](_0x2f81f7)||_0x40fb46['view']['element']['contains'](_0x2f81f7)||this['activeAnnotation']&&_0x46472b['hasDomSelection']()&&(_0x52d4a5(),_0x501805['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x46472b);}['_destroyEditorAnnotationsIntegration'](_0x24dc7d){_0x24dc7d&&(this['stopListening'](_0x24dc7d),this['_editorAnnotations']['remove'](_0x24dc7d));}['_setSelectedAnnotations'](_0x22ebdc){for(const _0x3a4978 of this['_selectedAnnotations'])_0x22ebdc['includes'](_0x3a4978)||this['_manuallyClosedAnnotationViews']['delete'](_0x3a4978['view']);this['_selectedAnnotations']=_0x22ebdc;}['_refreshPositioning'](){const _0x26baac=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x26baac['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5e6f05){if(this['_manuallyClosedAnnotationViews']['has'](_0x5e6f05['view']))return;const _0x42c799=this['balloonPanelView']['content']['first'];_0x42c799!==_0x5e6f05['view']?(_0x42c799&&this['_detachListeners'](_0x42c799),this['_attachListeners'](_0x5e6f05['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5e6f05['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x40febb=this['balloonPanelView']['content']['first'],_0xf6f868=_0x40febb&&this['annotations']['getByView'](_0x40febb);if(!_0xf6f868||!this['_annotationToNarrowView']['has'](_0xf6f868))return;const _0x2fac36=this['_annotationToNarrowView']['get'](_0xf6f868)['element'],_0x5d4021=(function(){const _0x55ac4d=_0x175f2a['defaultPositions'];return[_0x55ac4d['southArrowNorthEast'],_0x55ac4d['northArrowSouthEast'],_0x55ac4d['southArrowNorth'],_0x55ac4d['northArrowSouth'],_0x55ac4d['southArrowNorthWest'],_0x55ac4d['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2fac36,'positions':_0x5d4021});}['_hideBalloon'](){const _0x40adf1=this['balloonPanelView'],_0x44290b=_0x40adf1['content']['first'];_0x44290b&&(this['_detachListeners'](_0x44290b),_0x40adf1['unpin'](),_0x40adf1['content']['clear']());}['_attachListeners'](_0x69b6c3){this['listenTo'](_0x69b6c3,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x69b6c3,'Esc',(_0x85033a,_0x57ea71)=>{this['_manuallyClosedAnnotationViews']['add'](_0x69b6c3),this['_hideBalloon'](),_0x57ea71();});}['_detachListeners'](_0x4f1949){this['stopListening'](_0x4f1949);}}class c extends _0x8104b3{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x22e13d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x37e609){super(_0x37e609),_0x37e609['editing']['view']['addObserver'](_0x127348),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x37e609['plugins']['get'](_0x22e13d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x4517ab=this['editor']['plugins']['get'](j);_0x4517ab['context']===this['editor']&&(_0x4517ab['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x5be56b,_0x51f324)=>{const _0x3349e8=this['_balloon'];if(this['isAttached']&&_0x3349e8['visibleView']){const _0x4d5b9f=this['annotations']['getByView'](_0x3349e8['visibleView']);_0x4d5b9f&&this['_closeAnnotation'](_0x4d5b9f),_0x51f324();}}));}['afterInit'](){const _0x450119=this['editor']['plugins']['get'](j);_0x450119['context']===this['editor']&&(_0x450119['hasActive']()||_0x450119['switchTo']('inline'));}['setActiveAnnotation'](_0x24326b){_0x24326b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x24326b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x24326b)&&this['_addAnnotationToBalloon'](_0x24326b,!0x0),_0x24326b['isActive']=!0x0),_0x24326b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x24326b);}['attach'](_0x53b163){this['annotations']=_0x53b163;const _0x14a421=this['editor']['plugins']['get'](j),_0x449665=this['_balloon'];if(this['isAttached'])throw new _0xd3f428('inlineannotations-attach-already-attached',this);if(_0x14a421['context']!==this['editor'])throw new _0xd3f428('inlineannotations-not-allowed-with-context',this);const _0x24c515=this['editor']['plugins']['get'](b);this['listenTo'](_0x24c515,'refresh',()=>{const _0x315919=_0x24c515['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1706e2,_0x3ca196;!this['_forceRefresh']&&(_0x1706e2=_0x315919,_0x3ca196=this['_selectedAnnotations'],_0x1706e2['length']===_0x3ca196['length']&&_0x1706e2['every'](_0x4edd65=>_0x3ca196['includes'](_0x4edd65)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x315919),this['setActiveAnnotation'](_0x315919[0x0]||null));}),this['listenTo'](_0x24c515,'blur',(_0x78602a,{isAnnotationTracked:_0x1eba82})=>{this['activeAnnotation']&&_0x1eba82(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x31d6d7,_0x2c9209,_0x3f1830)=>{_0x3f1830||this['setActiveAnnotation'](null);}),this['listenTo'](_0x53b163,'remove',(_0x44549f,_0x5dbc8)=>{this['_removeAnnotationFromBalloon'](_0x5dbc8),_0x5dbc8===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x449665,'change:visibleView',(_0x35a97c,_0x3d54c6,_0x308603,_0xf1e3e5)=>{_0xf1e3e5&&this['stopListening'](_0xf1e3e5);const _0x366eda=_0x53b163['getByView'](_0x308603);_0x308603&&_0x366eda&&(this['listenTo'](_0x308603,'change:height',()=>{_0x449665['updatePosition']();}),this['listenTo'](_0x308603,'Esc',()=>{this['_closeAnnotation'](_0x366eda),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x366eda&&this['setActiveAnnotation'](_0x366eda));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x449665['visibleView']&&(_0x53b163['getByView'](_0x449665['visibleView'])&&_0x449665['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 _0xd3f428('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1d3d1d of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1d3d1d);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x5e49d2){for(const _0x3775dd of this['_selectedAnnotations'])_0x5e49d2['includes'](_0x3775dd)||this['_manuallyClosed']['delete'](_0x3775dd);for(const _0x32afe3 of this['annotations'])_0x5e49d2['includes'](_0x32afe3)||this['_removeAnnotationFromBalloon'](_0x32afe3);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xe4b2e5 of _0x5e49d2)this['_addAnnotationToBalloon'](_0xe4b2e5);}this['_selectedAnnotations']=_0x5e49d2;}['_addAnnotationToBalloon'](_0x589d41,_0x14f76d=!0x1){this['_manuallyClosed']['has'](_0x589d41)||(this['_addedAnnotations']['has'](_0x589d41)||this['_balloon']['hasView'](_0x589d41['view'])||(this['_addedAnnotations']['add'](_0x589d41),this['_balloon']['add']({'stackId':_0x589d41['view']['id'],'view':_0x589d41['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x589d41)}})),_0x14f76d&&this['_balloon']['showStack'](_0x589d41['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4cdf55){const _0x4f4ce9=_0x4cdf55['target'],_0x1616d2=this['editor']['editing']['view'],_0x9cfbc=_0x1616d2['document']['selection']['getFirstRange'](),_0x176923=_0x1616d2['domConverter']['viewRangeToDom'](_0x9cfbc);if(_0x176923['collapse'](!0x0),_0x4f4ce9){if(_0x4f4ce9 instanceof _0x57fdd2)return _0x4f4ce9;let _0x2c09a9=[];for(const _0x51d47b of _0x4f4ce9)_0x2c09a9['push'](...F(_0x51d47b['getClientRects']()));_0x2c09a9=function(_0x23e054){const _0x17db31=[];let _0x5edb13=_0x23e054[0x0];for(let _0x2f67ce=0x1;_0x2f67ce<_0x23e054['length'];_0x2f67ce++)P(_0x5edb13,_0x23e054[_0x2f67ce])?_0x5edb13['width']+=_0x23e054[_0x2f67ce]['width']:(_0x17db31['push'](_0x5edb13),_0x5edb13=_0x23e054[_0x2f67ce]);return _0x17db31['push'](_0x5edb13),_0x17db31;}(_0x2c09a9);const _0x21cd4b=_0x176923['getBoundingClientRect']();return _0x2c09a9['find'](_0x3eb13c=>_0x3eb13c['top']<=_0x21cd4b['top']&&_0x3eb13c['bottom']>=_0x21cd4b['bottom']&&_0x3eb13c['left']<=_0x21cd4b['left']&&_0x3eb13c['right']>=_0x21cd4b['right'])||_0x2c09a9[0x0];}return _0x4cdf55['targetRect']||_0x176923;}['_removeAnnotationFromBalloon'](_0x527576){this['_addedAnnotations']['has'](_0x527576)&&this['_balloon']['hasView'](_0x527576['view'])&&(this['_addedAnnotations']['delete'](_0x527576),this['_balloon']['remove'](_0x527576['view']));}['_closeAnnotation'](_0x58e196){this['_manuallyClosed']['add'](_0x58e196),this['_removeAnnotationFromBalloon'](_0x58e196);}}function F(_0x1a2b09){return Array['from'](_0x1a2b09)['map'](DOMRect['fromRect']);}function P(_0x1a0bdd,_0x7293fd){return _0x1a0bdd['top']===_0x7293fd['top']&&_0x1a0bdd['bottom']===_0x7293fd['bottom']&&_0x1a0bdd['right']===_0x7293fd['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x39b1eb,_0xd3096b){super(_0x39b1eb),this['set']('isEmpty',!_0xd3096b['length']),this['focusTracker']=new _0x5ead02(),this['_annotationViews']=_0xd3096b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x76289f({'focusables':_0xd3096b,'focusTracker':this['focusTracker']}),this['listenTo'](_0xd3096b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xd3096b,'remove',(_0x206248,_0x1dbc8c)=>{_0x1dbc8c['isActive']&&this['focus'](),_0xd3096b['length']||(this['isEmpty']=!0x0);});const _0x5dc09a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x39b1eb,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xd3096b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5dc09a['if']('isEmpty','ck-hidden',_0x36a63d=>!_0x36a63d)]},'children':[{'text':N(_0x39b1eb,'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 _0x6b7b58 of this['_annotationViews'])this['focusTracker']['add'](_0x6b7b58['element']);this['_annotationViews']['on']('change',(_0x11830a,{added:_0x586197,removed:_0x2f382f})=>{for(const _0x40ff35 of _0x586197)this['focusTracker']['add'](_0x40ff35['element']);for(const _0x2f9ecd of _0x2f382f)this['focusTracker']['remove'](_0x2f9ecd['element']);});}}class p extends _0xfe7412{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x419e1b){super(_0x419e1b),this['archivedThreads']=new _0x4d4ef2();}['init'](){const _0x402838=this['context'],_0xad26f2=_0x402838['plugins']['get'](o),_0x37ba24=_0x402838['plugins']['get'](y);this['listenTo'](_0xad26f2,'addCommentThread',(_0x112e02,{threadId:_0x167a34})=>{const _0x2cbec8=_0xad26f2['getCommentThread'](_0x167a34);_0x2cbec8['archivedAt']&&this['archivedThreads']['add'](_0x2cbec8,this['_calculatePosition'](_0x2cbec8['archivedAt'])),this['listenTo'](_0x2cbec8,'change:archivedAt',(_0x22c10f,_0x1105b3,_0x166860)=>{_0x166860?this['archivedThreads']['has'](_0x2cbec8)||this['archivedThreads']['add'](_0x2cbec8,this['_calculatePosition'](_0x2cbec8['archivedAt'])):this['archivedThreads']['has'](_0x2cbec8)&&this['archivedThreads']['remove'](_0x2cbec8);});}),this['listenTo'](_0xad26f2,'removeCommentThread',(_0x587f2c,{threadId:_0x3096af})=>{const _0x4430a2=_0xad26f2['getCommentThread'](_0x3096af);this['stopListening'](_0x4430a2),this['archivedThreads']['has'](_0x4430a2)&&this['archivedThreads']['remove'](_0x4430a2);},{'priority':'highest'}),this['listenTo'](_0x37ba24['collection'],'focus',(_0x58d9fc,_0x32b0e6)=>{_0x32b0e6['isVisible']||(_0x32b0e6['isActive']=!0x0,_0x37ba24['activate'](_0x32b0e6));});}['_calculatePosition'](_0x8c71d6){const _0x2536a7=[...this['archivedThreads']]['findIndex'](_0x4b876d=>_0x4b876d['archivedAt']<_0x8c71d6);return _0x2536a7>-0x1?_0x2536a7:this['archivedThreads']['length'];}}class a extends _0x8104b3{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x24c213];}constructor(_0x49b88b){super(_0x49b88b),this['annotationViews']=new _0x6ba4d4(),this['_pendingThreads']=[];}['init'](){const _0x2ac217=this['editor'],_0x1453e2=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2ac217['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x8118da,!0x0)),_0x2ac217['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x262f72=this['_createCommentsArchiveButton'](_0x5c9447);return _0x262f72['set']({'role':'menuitemcheckbox'}),_0x262f72;});const _0x20612a=_0x2ac217['plugins']['get'](p),_0x2cd808=_0x2ac217['plugins']['get']('Annotations'),_0x56850a=_0x2ac217['plugins']['get']('CommentsRepository');_0x20612a['archivedThreads']['forEach'](_0x31d5ad=>{this['_handleNewThread'](_0x31d5ad);}),this['listenTo'](_0x20612a['archivedThreads'],'add',(_0x25fbd2,_0x39c5e5)=>{this['_handleNewThread'](_0x39c5e5);}),this['listenTo'](_0x2cd808['collection'],'add',(_0x2e9089,_0x53b4f1)=>{const _0x52f1f9=this['_pendingThreads']['find'](_0x4bd92a=>{const _0x1d32d8=_0x56850a['_threadToController']['get'](_0x4bd92a);return _0x1d32d8&&_0x53b4f1['innerView']===_0x1d32d8['view'];});if(_0x52f1f9){const _0x55395d=this['_calculatePosition'](_0x52f1f9['archivedAt']);this['annotationViews']['add'](_0x53b4f1['view'],_0x55395d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x52f1f9),0x1);}}),this['listenTo'](_0x20612a['archivedThreads'],'remove',(_0x4293b2,_0x546756)=>{const _0x188476=_0x2ac217['config']['get']('collaboration.channelId');if(!_0x188476||_0x546756['channelId']===_0x188476){if(this['_pendingThreads']['includes'](_0x546756))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x546756),0x1);else{const _0x11c12e=_0x56850a['_threadToController']['get'](_0x546756),_0x2da11c=_0x2cd808['getByInnerView'](_0x11c12e['view']);this['annotationViews']['remove'](_0x2da11c['view']),this['stopListening'](_0x2da11c['focusableElements']);}}}),this['listenTo'](_0x2cd808['collection'],'add',(_0x24985f,_0x42be5b)=>{this['listenTo'](_0x42be5b,'escape',_0x1453e2);}),this['listenTo'](_0x2cd808['collection'],'remove',(_0x3bdbc0,_0x2cc9f7)=>{this['stopListening'](_0x2cc9f7,'escape',_0x1453e2);});}['_handleNewThread'](_0x16d851){const _0x567ec4=this['editor']['plugins']['get']('CommentsRepository'),_0x1563e7=this['editor']['plugins']['get']('Annotations'),_0x376dae=this['editor']['config']['get']('collaboration.channelId');if(!_0x376dae||_0x16d851['channelId']===_0x376dae){const _0x211b6a=_0x567ec4['_threadToController']['get'](_0x16d851);if(!_0x211b6a)return void this['_pendingThreads']['push'](_0x16d851);const _0x13fb55=this['_calculatePosition'](_0x16d851['archivedAt']),_0x5773de=_0x1563e7['getByInnerView'](_0x211b6a['view']);_0x5773de['isVisible']&&_0x1563e7['_visibleAnnotations']['remove'](_0x5773de),this['annotationViews']['add'](_0x5773de['view'],_0x13fb55);}}['_calculatePosition'](_0x3a4360){const _0x3ff2f4=this['editor']['config']['get']('collaboration.channelId'),_0xf43ec8=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2a2b64=>_0x2a2b64['channelId']===_0x3ff2f4)['findIndex'](_0x58201f=>_0x58201f['archivedAt']<_0x3a4360);return _0xf43ec8<0x0||_0xf43ec8>this['annotationViews']['length']?this['annotationViews']['length']:_0xf43ec8-0x1;}['_toggleDialog'](){const _0x2a420d=this['editor'],_0x3a0130=_0x2a420d['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x2a420d['locale'],this['annotationViews'])),'commentsArchive'===_0x3a0130['id']?_0x3a0130['hide']():_0x3a0130['show']({'id':'commentsArchive','title':N(_0x2a420d['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1d3cb7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3768f4['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x23819b,_0x59f247=!0x1){const _0x4605f2=this['editor']['locale'],_0xa5de7=this['editor']['plugins']['get']('Dialog'),_0x168645=new _0x23819b(_0x4605f2);return _0x168645['bind']('isEnabled')['to'](this,'isEnabled'),_0x168645['bind']('isOn')['to'](_0xa5de7,'id',_0x36dfdc=>'commentsArchive'===_0x36dfdc),_0x168645['set']({'label':N(_0x4605f2,'COMMENTS_ARCHIVE'),'icon':_0x1d3cb7,'isToggleable':!0x0}),_0x59f247&&(_0x168645['tooltip']=!0x0),this['listenTo'](_0x168645,'execute',()=>this['_toggleDialog']()),_0x168645;}['_hideDialogOnAnnotationEscape']=_0x5cb207=>{const _0x4bd524=_0x5cb207['source'];if(!this['annotationViews']['has'](_0x4bd524['view']))return;const _0x43533d=this['editor']['plugins']['get']('Dialog');_0x43533d['isOpen']&&'commentsArchive'===_0x43533d['id']&&(_0x43533d['hide'](),_0x5cb207['stop']());};}class gi extends _0x8104b3{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 _0x559dcd,ContextPlugin as _0xb0a350,PendingActions as lt,Command as _0x4833ae,Plugin as _0x81c189,Context as _0x4bb14d}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x310bea,uid as _0x5b249c,KeystrokeHandler as jt,FocusTracker as _0x5dda15,diff as _0x43be8c,Collection as _0x7f3a36,Rect as _0x10aff6,CKEditorError as _0x18be9b,first as _0x1c316a,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x58ebdd,keyCodes as _0x559ab4}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x1bfa6e,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x1d5443,trimHtml as _0x471294,LateFocusDropdownButtonView as _0x8e6c62,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x4bd5bc}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x5670e0}from'es-toolkit/compat';import{IconUndo as _0x301e36,IconCheck as _0x3d853c,IconPencil as _0x83dfee,IconRemoveComment as _0x248c13,IconThreeVerticalDots as _0x3b01f4,IconAddComment as _0x24c653,IconCommentsArchive as _0x74dfba}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x11de24,ButtonView as _0x3c7ff6,ViewCollection as _0x1471c3,createDropdown as _0x50150e,ListView as _0x1730c6,focusChildOnDropdownOpen as _0x5ee006,ListItemView as _0x40795b,MenuBarMenuListItemButtonView as _0x134a38,BodyCollection as _0x258cee,BalloonPanelView as _0x767a02,ContextualBalloon as _0x25d187,Dialog as _0x162cfc,DialogViewPosition as _0x3c6e89}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x3890df}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x4c6be8}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x28a4bd}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x310bea(){['model'];['view'];constructor(_0x55555c,_0x291932){super(),this['model']=_0x55555c,this['model']['_isAttached']=!0x0,this['view']=_0x291932,this['listenTo'](_0x291932,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x291932,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x291932,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x291932,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x291932,'addComment',(_0x58c8b4,_0x47d346)=>this['addComment'](_0x47d346)),this['listenTo'](_0x291932,'updateComment',(_0x3cdce2,_0x440556,_0xd7f1a6)=>this['updateComment'](_0x440556,_0xd7f1a6)),this['listenTo'](_0x291932,'removeComment',(_0x20df08,_0x6a153d)=>this['removeComment'](_0x6a153d));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3bb931){this['model']['addComment']({'content':_0x3bb931,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x1ae036,_0x23fc2f){this['model']['getComment'](_0x1ae036)['update']({'content':_0x23fc2f});}['removeComment'](_0x26c309){this['model']['getComment'](_0x26c309)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x485ce3,_0x1ed693,_0x557f8f){const t=_0x485ce3['t'];switch(_0x1ed693){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'},_0x557f8f);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'},_0x557f8f);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'},_0x557f8f);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'},_0x557f8f);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x557f8f);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'},_0x557f8f);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'},_0x557f8f);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'},_0x557f8f);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x16b0ba,_0x258f4c){super(_0x16b0ba);const _0x18c760=_0x5b249c();this['main']=this['createCollection'](),this['editable']=new $t(_0x16b0ba,_0x258f4c,void 0x0,{'label':()=>N(_0x16b0ba,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x16b0ba['uiLanguageDirection'],'lang':_0x16b0ba['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x18c760},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x2bc62c){super(_0x2bc62c),this['view']=new Vt(_0x2bc62c['locale'],_0x2bc62c['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1dd419=this['editor']['editing']['view'],_0x4f1ef1=this['view']['editable'],_0x45c2ae=_0x1dd419['document']['getRoot']();_0x4f1ef1['name']=_0x45c2ae['rootName'],this['view']['render']();const _0x40b241=_0x4f1ef1['element'];this['setEditableElement'](_0x4f1ef1['name'],_0x40b241),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1dd419['attachDomRoot'](_0x40b241),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x310bea(_0x559dcd){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0xf33a6b={}){function _0x652b78(_0x257dc2){return _0x257dc2['map'](_0x492be2=>String['fromCharCode'](_0x492be2))['join']('');}(_0xf33a6b=Object['assign']({},_0xf33a6b))['plugins']||(_0xf33a6b['plugins']=Rt['defaultPlugins']),super(_0xf33a6b),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x652b78([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x652b78([0x76,0x69,0x65,0x77])][_0x652b78([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x652b78([0x61,0x75,0x74,0x6f]),this[_0x652b78([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x652b78([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x652b78([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x652b78([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x652b78([0x6f,0x6b])});}['create'](){const _0x1eb2d2=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x1eb2d2))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xd66010=>{const _0x51e7e4=this['model']['document']['getRoot'](),_0x78adfa=_0x51e7e4&&_0x51e7e4['getChild'](_0x51e7e4['childCount']-0x1);_0xd66010['setSelection'](_0x78adfa,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x31957a=this['editing']['view'],_0x44c911=_0x31957a['document']['getRoot'](),_0x1fe5c0=_0x44c911['getChild'](0x0);_0x44c911['childCount']>0x1||!_0x1fe5c0||'p'!=_0x1fe5c0['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x31957a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1fe5c0['placeholder']=this['placeholder']),St({'view':_0x31957a,'element':_0x1fe5c0,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1fe5c0);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4a9d42,_0x3bdbba={}){super(_0x4a9d42),this['editor']=null,this['_editorConfig']=_0x3bdbba,this['set']('value',_0x3bdbba['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x4a9d42,'Reply...')),this['set']('submitLabel',N(_0x4a9d42,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5dda15(),this['focusCycler']=new _0x11de24({'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',(_0x22d0ec,_0x20adae)=>{this['cancelButtonView']['fire']('execute'),_0x20adae();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5df428,_0x502dda)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x502dda());}),this['on']('submit',(_0x3e5cf5,_0x41e116)=>{_0x41e116['length']>0xfde8?(alert(N(_0x4a9d42,'TOO_LONG_COMMENT_ALERT',[_0x41e116['length'],0xfde8])),_0x3e5cf5['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x268d7c=this['editor'];this['element']['insertBefore'](_0x268d7c['ui']['element'],this['element']['firstChild']),_0x268d7c['model']['document']['on']('change',()=>this['value']=_0x268d7c['getData']()),_0x268d7c['bind']('placeholder')['to'](this),this['focusables']['add'](_0x268d7c['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x375fbe){-0x1===_0x375fbe?(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:_0x1e480e}=this,_0x8e3836=new _0x3c7ff6(_0x1e480e);return _0x8e3836['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x8e3836['withText']=!0x0,_0x8e3836['bind']('label')['to'](this,'submitLabel'),_0x8e3836['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x8e3836['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1b4298,_0x1d482e)=>!_0x1d482e&&!!_0x1b4298['trim']()),_0x8e3836;}['_createCancelButton'](){const {locale:_0x265461}=this,_0x541164=new _0x3c7ff6(_0x265461);return _0x541164['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x541164['label']=N(_0x265461,'Cancel'),_0x541164['withText']=!0x0,_0x541164['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x541164;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5319a4=>{this['focusTracker']['add'](_0x5319a4['element']);}),this['focusables']['on']('change',(_0x5e31fe,_0x244ad3)=>{for(const _0x402e8d of Array['from'](_0x244ad3['added'])['reverse']())this['focusTracker']['add'](_0x402e8d['element']);});}}class ie extends kt{constructor(_0x175afa,_0x39400a,_0x3df875){super(_0x175afa),this['commentInputView']=new os(_0x175afa,_0x3df875),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5802a1,_0x5633a2)=>_0x5802a1||!!_0x5633a2),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 _0x1bfa6e(_0x175afa,_0x39400a),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'](_0x105ee1){this['commentInputView']['focus'](_0x105ee1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5bc596,_0x4453cc)=>{const {submitButtonView:_0x2edfc0,cancelButtonView:_0xf3d69a,editor:_0x9dd4a2}=this['commentInputView'];[_0x2edfc0['element'],_0xf3d69a['element'],_0x9dd4a2?_0x9dd4a2['editing']['view']['getDomRoot']():null]['filter'](_0x39e1e6=>_0x39e1e6)['some'](_0x3cb4ff=>_0x3cb4ff['contains'](_0x4453cc['target']))||(this['focus'](),_0x4453cc['preventDefault']());});}}class rs extends kt{constructor(_0x4ec47f){super(_0x4ec47f);const _0xce223b=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xce223b['to']('count',_0x14fc32=>N(_0x4ec47f,'NUMBER_OF_COMMENTS',_0x14fc32))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5c06b4,_0x915047,_0x119fae){super(_0x5c06b4);const _0xd83bba=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x915047['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x915047,this['_config']=_0x119fae,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5dda15(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11de24({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x53e470=>this['commentViews']['map'](_0x324992=>_0x324992['element'])['includes'](_0x53e470['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5c06b4),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x131610=>_0x131610-this['_config']['maxCommentsWhenCollapsed']);for(const _0x45dfda of _0x915047['comments'])this['_handleNewCommentModel'](_0x45dfda);this['_handleInfoComment'](),this['listenTo'](_0x915047['comments'],'add',(_0x5309f3,_0x34f38f)=>{const _0x4449ce=this['_calculatePosition'](_0x34f38f);this['length']++,this['_handleNewCommentModel'](_0x34f38f,_0x4449ce),this['refreshVisibleViews']();}),this['listenTo'](_0x915047['comments'],'remove',(_0x56e170,_0x50651d)=>{this['length']--,this['_handleRemoveCommentModel'](_0x50651d),this['refreshVisibleViews']();}),this['listenTo'](_0x915047,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x915047,'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',_0xd83bba['if']('length','ck-hidden',_0x35b06f=>!_0x35b06f)],'aria-label':N(_0x5c06b4,'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'](_0x2032c9){-0x1===_0x2032c9?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3c7b89 of this['commentViews'])_0x3c7b89['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x9134b2,_0xb65808){const _0x5d31e4=new this['_config']['CommentView'](this['locale'],_0x9134b2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5d31e4['viewUid']=_0x9134b2['id'],_0x5d31e4['delegate']('removeComment')['to'](this),_0x5d31e4['delegate']('updateComment')['to'](this),_0x5d31e4['delegate']('resolveCommentThread')['to'](this),_0x5d31e4['delegate']('editorReady')['to'](this),_0x5d31e4['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5d31e4,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5d31e4,_0xb65808);}['_calculatePosition'](_0x35e1f1){const _0x48e752=this['_model']['_findOptimalIndex'](_0x35e1f1);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x35e1f1['authoredAt']?_0x48e752-0x1:_0x48e752:_0x48e752-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xba19be={'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'],_0xba19be,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xba19be));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x2bb869){const _0x22732e=this['commentViews']['remove'](_0x2bb869['id']);this['stopListening'](_0x22732e),_0x22732e['isEditMode']&&this['_updateHasDirtyComment'](),_0x22732e['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5ee34a=>_0x5ee34a['isEditMode']);}['_rearrangeCollapse'](){const _0x59e8fd=function(_0x2c4bc5){const _0x2c936a=new _0x7f3a36();for(const _0x1e384c of _0x2c4bc5)_0x2c936a['add'](_0x1e384c);return _0x2c936a;}(this['commentViews']),_0x44bb7e=this['_collapsedCommentsView']['count'];for(let _0x161327=0x1;_0x161327<=_0x44bb7e;_0x161327++)_0x59e8fd['remove'](0x1);for(const _0x125640 of _0x59e8fd)_0x125640['collapse']();_0x44bb7e>0x0&&_0x59e8fd['add'](this['_collapsedCommentsView'],0x1),ns(_0x43be8c(Array['from'](this['visibleViews']),Array['from'](_0x59e8fd)),this['visibleViews'],_0x59e8fd);}['_rearrangeExpand'](){ns(_0x43be8c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3795db of this['visibleViews'])_0x3795db['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1dcb24=>{this['focusTracker']['add'](_0x1dcb24['element']),this['keystrokes']['listenTo'](_0x1dcb24['element']);}),this['commentViews']['on']('change',(_0x3e8fe6,_0x3719f7)=>{for(const _0x400c6b of _0x3719f7['removed'])this['focusTracker']['remove'](_0x400c6b['element']),this['keystrokes']['stopListening'](_0x400c6b['element']);for(const _0x3ebc26 of Array['from'](_0x3719f7['added'])['reverse']())this['focusTracker']['add'](_0x3ebc26['element']),this['keystrokes']['listenTo'](_0x3ebc26['element']);});}}function ns(_0x303e2f,_0x5bbdfd,_0x445526){let _0x11ca18=0x0;for(const _0x3fdf1c of _0x303e2f)switch(_0x3fdf1c){case'insert':_0x5bbdfd['add'](_0x445526['get'](_0x11ca18),_0x11ca18),_0x11ca18++;break;case'delete':_0x5bbdfd['remove'](_0x11ca18);break;case'equal':_0x11ca18++;}}class oe extends kt{constructor(_0x44d3cf){super(_0x44d3cf);const _0x11cbe5=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x11cbe5['to']('contextValue',_0x5de20e=>N(_0x44d3cf,'THREAD_CONTEXT_LABEL',_0x5de20e)),'tabindex':-0x1},'children':[{'text':_0x11cbe5['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x317925,_0x284afd){super(_0x317925);const _0x4265dd=this['bindTemplate'];this['_model']=_0x284afd,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5dda15(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11de24({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x595556=>!!_0x595556),this['bind']('contextValue')['to'](this['_model'],'context',_0x19299a=>_0x19299a&&_0x19299a['value']?this['_trimContextValue'](_0x19299a['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',_0x4265dd['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 _0x25b0c1=new _0x3c7ff6(this['locale']);return _0x25b0c1['label']=N(this['locale'],'Reopen'),_0x25b0c1['tooltip']=N(this['locale'],'Reopen'),_0x25b0c1['icon']=_0x301e36,_0x25b0c1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3cba10=>!_0x3cba10),_0x25b0c1['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x52ecd3,_0xdc517e)=>_0x52ecd3&&_0xdc517e),_0x25b0c1['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x25b0c1;}['_trimContextValue'](_0x1c5132){if(_0x1c5132['length']<0x96)return _0x1c5132;const _0x9a4deb=_0x1c5132['lastIndexOf']('\x20',0x93);return _0x1c5132['substring'](0x0,_0x9a4deb>-0x1?_0x9a4deb:0x93)+'...';}['_attachContextActions'](){const _0x117804=this['element']['querySelector']('.ck-context'),_0x16f716=_0x117804['querySelector']('.ck-context__value');this['listenTo'](_0x117804,'mouseenter',()=>{_0x16f716['offsetWidth']<_0x16f716['scrollWidth']&&_0x117804['classList']['add']('overlay');}),this['listenTo'](_0x117804,'mouseleave',()=>{_0x117804['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xd00396 of this['focusables'])this['focusTracker']['add'](_0xd00396['element']),this['keystrokes']['listenTo'](_0xd00396['element']);}['_createContextView'](){const _0x314244=new oe(this['locale']);return _0x314244['bind']('contextValue')['to'](this),_0x314244;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4f039c,_0x30dde5,_0x419e1a,_0x4da7ad){super(_0x4f039c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x30dde5,this['_localUser']=_0x419e1a,this['_config']=_0x4da7ad,this['commentThreadHeaderView']=new Yt(_0x4f039c,_0x30dde5),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x4f039c,N(_0x4f039c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x4f039c,_0x30dde5,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4da7ad)),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',(_0xbb18d9,_0x1d7985)=>_0xbb18d9||!!_0x1d7985),this['bind']('isUnlinked')['to'](_0x30dde5,'unlinkedAt',_0x4b9ba6=>!!_0x4b9ba6),this['bind']('ariaLabel')['to'](this,'length',_0x1887cf=>{const _0x40c1df=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x1887cf,_0x40c1df]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5dda15(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11de24({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3548ab=>_0x3548ab['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xb9c881=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4c0f35=_0xb9c881['commentInputView'];return _0xb9c881['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4c0f35,'value',(_0x5dddab,_0x17cb1a,_0x3ac3d5,_0x4fc8f8,_0x5b2a0b)=>!!_0x5b2a0b||!!_0x4fc8f8&&_0x3ac3d5&&!_0x17cb1a||_0x5dddab&&_0x3ac3d5&&!_0x17cb1a),_0x4c0f35['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1d591e,_0x11f953,_0x495928)=>{let _0x4c8e62;return _0x4c8e62=_0x495928&&_0x11f953?'Reply\x20to\x20reopen\x20discussion...':_0x1d591e?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x4c8e62);}),_0x4c0f35['bind']('submitLabel')['to'](this,'length',_0x116ace=>N(this['locale'],_0x116ace?'Reply':'Comment')),_0x4c0f35['on']('submit',(_0x4c1906,_0x4112cb)=>{this['fire']('addComment',_0x4112cb),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4c0f35['on']('cancel',()=>{this['focus']();}),_0x4c0f35['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4c0f35['on']('cancel',_0x42cde8=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x42cde8['stop']());}),this['on']('change:isActive',(_0x1ea3b7,_0x52b98b,_0xf36f62)=>{_0xf36f62||this['length']||_0x4c0f35['value']||this['fire']('removeCommentThread');}),_0xb9c881;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2ec822,_0xee681e,_0x16fa1b,_0x5f2ea3){super(_0x2ec822,_0xee681e,_0x16fa1b,_0x5f2ea3),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2ec822,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x103229,_0x5ee07b,_0x1ae59d)=>{_0x1ae59d||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x35c8d2,_0x2d98c7,_0x40a472)=>{_0x40a472&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4c3cbf=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4c3cbf['if']('isActive','ck-thread--active'),_0x4c3cbf['if']('isUnlinked','ck-thread--unlinked'),_0x4c3cbf['if']('isConfirm','ck-thread--remove-confirmation'),_0x4c3cbf['to']('actionIndicator',_0x1b59c2=>_0x1b59c2?'ck-thread--'+_0x1b59c2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4c3cbf['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 _0xdf8d9c of this['commentsListView']['commentViews'])_0xdf8d9c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x488a1a}=this,_0x372e2f=this['commentsListView']['commentViews']['get'](0x0);_0x372e2f===this['_boundFirstCommentView']||_0x372e2f['isSystemComment']||(this['_boundFirstCommentView']=_0x372e2f,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x372e2f,'actionIndicator',_0x4aa36d=>'remove'===_0x4aa36d?'remove':null),_0x372e2f['placeholder']=N(_0x488a1a,'Write\x20a\x20comment...'),_0x372e2f['removeButton']['on']('execute',_0x1f06be=>{_0x1f06be['stop'](),this['showConfirm'](N(_0x488a1a,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x372e2f['focus']();}),_0x372e2f['actionBar']['add'](this['resolveButton'],0x0),_0x372e2f['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2302ff=new _0x1d5443(this['locale']);return _0x2302ff['label']=N(this['locale'],'Resolve'),_0x2302ff['tooltip']=N(this['locale'],'Resolve'),_0x2302ff['icon']=_0x3d853c,_0x2302ff['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2302ff['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x805a6a=>!_0x805a6a),_0x2302ff['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x18222e,_0x8051f8)=>_0x18222e&&!_0x8051f8),_0x2302ff['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2302ff;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x1294f1){super(_0x1294f1),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x420d5a,_0x4201b6,_0x46555f)=>{this['element']['innerHTML']=_0x46555f;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0xf1ee9b,_0x54f7f9,_0x47f187){super(_0xf1ee9b),this['_model']=_0x54f7f9,this['_config']=_0x47f187,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x54f7f9,'content',_0x54f7f9,'authoredAt',(_0x2f7900,_0x57cf1f)=>N(_0xf1ee9b,'COMMENT_ARIA_LABEL',[_0x54f7f9['author']['name'],_0x47f187['formatDateTime'](_0x57cf1f),new DOMParser()['parseFromString'](_0x2f7900,'text/html')['body']['textContent'],_0x54f7f9['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0xf1ee9b,N(_0xf1ee9b,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x1471c3(),this['focusTracker']=new _0x5dda15(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11de24({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3aad8e=>_0x3aad8e['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 _0x5b7156=new es(this['locale']);return _0x5b7156['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2ab70a,_0x34c405)=>_0x34c405?_0x471294(_0x2ab70a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2ab70a),_0x5b7156;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x528943=new os(this['locale'],this['_config']['editorConfig']);return _0x528943['value']=this['_model']['content'],_0x528943['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x528943['submitLabel']=N(this['locale'],'Save'),_0x528943['on']('submit',(_0x5f1945,_0x4070b5)=>{this['fire']('updateComment',this['_model']['id'],_0x4070b5),this['switchToDisplayMode'](),this['focus']();}),_0x528943['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x528943['once']('editorReady',()=>{_0x528943['focus']();}),_0x528943['createEditor'](),_0x528943['delegate']('editorReady')['to'](this),_0x528943['delegate']('editorDestroyed')['to'](this),_0x528943;}['_setupKeyboardNavigation'](){const _0x5b464e=this['element'];this['keystrokes']['listenTo'](_0x5b464e);for(const _0x565870 of this['focusables'])this['focusTracker']['add'](_0x565870['element']),this['keystrokes']['listenTo'](_0x565870['element']);this['focusables']['on']('change',(_0xe85ec8,_0x228e11)=>{for(const _0x4b4804 of _0x228e11['removed'])this['focusTracker']['remove'](_0x4b4804['element']),this['keystrokes']['stopListening'](_0x4b4804['element']);for(const _0x4e745d of _0x228e11['added'])this['focusTracker']['add'](_0x4e745d['element']),this['keystrokes']['listenTo'](_0x4e745d['element']);}),this['keystrokes']['set']('enter',(_0x15d44f,_0x5a117e)=>{_0x5b464e===_0x15d44f['target']&&(this['focusCycler']['focusFirst'](),_0x5a117e());}),this['keystrokes']['set']('esc',(_0x2d9db0,_0x530785)=>{_0x5b464e!==_0x2d9db0['target']&&(this['focus'](),_0x530785());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x4bb3f9,_0x372fd2,_0x31e7ee){super(_0x4bb3f9,_0x372fd2,_0x31e7ee),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x4bb3f9,'Reply...')),this['bind']('authoredAt')['to'](_0x372fd2),this['bind']('resolvedAt')['to'](_0x372fd2),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 _0x1bfa6e(_0x4bb3f9,_0x372fd2['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x372fd2,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1dcfd4=this['bindTemplate'],_0x3167c5=[{'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':_0x1dcfd4['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1dcfd4['to']('authoredAt',_0x5b679f=>this['_config']['formatDateTime'](_0x5b679f))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1dcfd4['if']('isEditMode','ck-comment__actions--hidden'),_0x1dcfd4['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']&&_0x3167c5['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x1dcfd4['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x1dcfd4['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1dcfd4['if']('isEditMode','ck-comment--edit'),_0x1dcfd4['if']('isSystemComment','ck-comment--info'),_0x1dcfd4['to']('actionIndicator',_0x43ced1=>_0x43ced1?'ck-comment--'+_0x43ced1:'')],'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':_0x3167c5}]}]};}['_createEditButton'](){const _0x1ffbb7=new _0x3c7ff6(this['locale']);return _0x1ffbb7['label']=N(this['locale'],'Edit'),_0x1ffbb7['icon']=_0x83dfee,_0x1ffbb7['withText']=!0x0,_0x1ffbb7['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1ffbb7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x391b1e=>!_0x391b1e),_0x1ffbb7['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1ffbb7['on']('execute',()=>this['switchToEditMode']()),_0x1ffbb7;}['_createRemoveButton'](){const _0x372621=new _0x3c7ff6(this['locale']);return _0x372621['label']=N(this['locale'],'Remove'),_0x372621['icon']=_0x248c13,_0x372621['withText']=!0x0,_0x372621['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x372621['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xe987c4=>!_0xe987c4),_0x372621['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x372621['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x372621;}['_createDropdown'](){const _0x10ed24=_0x50150e(this['locale'],_0x8e6c62),_0x1db3fe=_0x10ed24['panelView']['children'],_0x4e4e01=new _0x1730c6(this['locale']),_0x3a055e=_0x10ed24['bindTemplate'];_0x5ee006(_0x10ed24,()=>this['items']['find'](_0x1fd21c=>_0x1fd21c['isVisible'])),_0x10ed24['extendTemplate']({'attributes':{'class':[_0x3a055e['if']('isVisible','ck-hidden',_0x9aef05=>!_0x9aef05)]}});const _0x32d2e6=(_0x53be5f,_0x594a7f=-0x1)=>{const _0x2e8c52=new _0x40795b(this['locale']);_0x2e8c52['children']['add'](_0x53be5f);const _0x1399a9=_0x594a7f>-0x1?_0x594a7f:_0x4e4e01['items']['length'];_0x4e4e01['items']['add'](_0x2e8c52,_0x1399a9);const _0x207505=Array['from'](this['items']);_0x10ed24['unbind']('isEnabled','isVisible'),_0x10ed24['bind']('isEnabled')['toMany'](_0x207505,'isEnabled',(..._0x460dec)=>_0x460dec['some'](_0x38cd49=>_0x38cd49)),_0x10ed24['bind']('isVisible')['toMany'](_0x207505,'isVisible',(..._0x579e42)=>_0x579e42['some'](_0x4af8a9=>_0x4af8a9));};_0x10ed24['panelPosition']='sw',_0x10ed24['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x3b01f4});for(const _0x2301a3 of this['items'])_0x32d2e6(_0x2301a3);return _0x1db3fe['add'](_0x4e4e01),_0x10ed24['listenTo'](this['items'],'add',(_0x125761,_0x1ec5fb,_0x24771a)=>{_0x32d2e6(_0x1ec5fb,_0x24771a);}),_0x10ed24['listenTo'](this['items'],'remove',(_0x5a9e96,_0x5de3ec,_0x360818)=>{_0x4e4e01['items']['remove'](_0x360818);}),_0x10ed24;}['_attachActions'](_0x2cbcc0,_0x5cbbed){const _0x184697=_0x2cbcc0&&_0x2cbcc0['element'];_0x184697&&(this['listenTo'](_0x184697,'mouseenter',()=>this['actionIndicator']=_0x5cbbed),this['listenTo'](_0x184697,'focus',()=>this['actionIndicator']=_0x5cbbed),this['listenTo'](_0x184697,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x184697,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x408eba=super['_createCommentInputView']();return _0x408eba['bind']('placeholder')['to'](this),_0x408eba;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x295845){const _0x108588=Dt(_0x295845,0x1e),_0x12ad67=new MutationObserver(_0x29ada9=>{for(const _0x498f12 of _0x29ada9)('attributes'==_0x498f12['type']&&'class'==_0x498f12['attributeName']||'childList'==_0x498f12['type']||'characterData'==_0x498f12['type'])&&_0x108588();});return{'attach'(_0x4b7c28){_0x12ad67['observe'](_0x4b7c28,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x12ad67['disconnect'](),_0x108588['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3182c5,_0x3addcf){super(_0x3182c5),this['id']=_0x5b249c(),this['focusTracker']=new _0x5dda15(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x4bfc3c,_0x23918b)=>this['fire']('Esc',_0x23918b)),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'](_0x3addcf),this['mainView']=_0x3addcf;const _0x48681b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x48681b['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 _0x35736=this['element']['clientHeight'];_0x35736&&(this['height']=_0x35736);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x310bea(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x86acd6,target:_0x307315,type:_0x11d42a,isVisible:_0x2d7a21=!0x0}){super(),this['view']=_0x86acd6,this['view']['element']||this['view']['render'](),this['_type']=_0x11d42a,this['_target']=_0x307315,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x7f3a36([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3b5911,_0x282ef4)=>{this['view']['focusTracker']['add'](_0x282ef4);}),this['focusableElements']['on']('remove',(_0x46dfeb,_0x2e089a)=>{this['view']['focusTracker']['remove'](_0x2e089a);}),this['set']('isVisible',_0x2d7a21);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x59c0e4=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x59c0e4),_0x59c0e4;}get['targetRect'](){const _0x24d156=this['target'];if(null===_0x24d156)return null;if(_0x24d156 instanceof _0x10aff6)return _0x24d156;const _0x112d60=_0x24d156['filter'](_0x5b2c37=>function(_0x470ab0){const _0x4b88ef=_0x470ab0['offsetParent'];if(_0x4b88ef)return!0x0;const _0x491126=_0x470ab0['getClientRects']()['item'](0x0);return!!_0x491126;}(_0x5b2c37));return 0x0===_0x112d60['length']?null:new _0x10aff6(_0x112d60[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x26ba71){this['view']['isActive']=_0x26ba71,this['view']['mainView']['isActive']=_0x26ba71;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x389ace){if(!(null===_0x389ace||_0x389ace instanceof _0x10aff6||Array['isArray'](_0x389ace)&&_0x389ace['every'](_0x27b069=>fi(_0x27b069))))throw new _0x18be9b('annotation-invalid-target',null,{'target':_0x389ace});}['_getNormalizedTarget'](){const _0x5c4156='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5c4156)?[_0x5c4156]:_0x5c4156;}}function fi(_0x3b36ac){return null!==_0x3b36ac&&'object'==typeof _0x3b36ac&&'nodeType'in _0x3b36ac&&0x1===_0x3b36ac['nodeType'];}class S extends _0x7f3a36{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x597b48=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5dda15(),this['_focusTracker']['on']('change:isFocused',(_0x4065ad,_0x1f1882,_0x1c49a9)=>{_0x1c49a9||this['fire']('blur');});for(const _0x3580f9 of _0x597b48)this['add'](_0x3580f9);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x581be3){if(this['has'](_0x581be3))throw new _0x18be9b('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x581be3['innerView'],_0x581be3),this['_viewToAnnotation']['set'](_0x581be3['view'],_0x581be3);for(const _0xab0db9 of _0x581be3['focusableElements'])this['_focusTracker']['add'](_0xab0db9);this['listenTo'](_0x581be3['focusableElements'],'add',(_0x474bb8,_0x5536d8)=>{this['_focusTracker']['add'](_0x5536d8);}),this['listenTo'](_0x581be3['focusableElements'],'remove',(_0x2dc556,_0x115928)=>{this['_focusTracker']['remove'](_0x115928);}),this['listenTo'](_0x581be3['view']['focusTracker'],'change:isFocused',(_0x7f26f9,_0x342026,_0x2bdda3)=>{_0x2bdda3&&this['fire']('focus',_0x581be3);}),_0x581be3['updateTargetRect']();const _0x5d5818=this['_getOrderInContent'](_0x581be3['view']['targetRect']);return super['add'](_0x581be3,_0x5d5818);}['remove'](_0x6bc89f){if(!this['has'](_0x6bc89f))throw new _0x18be9b('annotationcollection-not-existing-item',null);this['stopListening'](_0x6bc89f['view']['focusTracker']),this['stopListening'](_0x6bc89f['focusableElements']);for(const _0x265c7f of _0x6bc89f['focusableElements'])this['_focusTracker']['remove'](_0x265c7f);return this['_viewToAnnotation']['delete'](_0x6bc89f['view']),this['_innerViewToAnnotation']['delete'](_0x6bc89f['innerView']),super['remove'](_0x6bc89f);}['getByInnerView'](_0x4b9659){return this['_innerViewToAnnotation']['get'](_0x4b9659);}['getByView'](_0x169781){return this['_viewToAnnotation']['get'](_0x169781);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x297f7e of this)_0x297f7e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1b8e71=Array['from'](this)['sort']((_0x4d8f2e,_0x5a3227)=>w(_0x4d8f2e['view']['targetRect'],_0x5a3227['view']['targetRect']));for(let _0x3ac0b9=_0x1b8e71['length']-0x1;_0x3ac0b9>0x0;_0x3ac0b9--){const _0x33ee22=_0x1b8e71[_0x3ac0b9];_0x3ac0b9!==this['getIndex'](_0x33ee22)&&(this['remove'](_0x33ee22),this['add'](_0x33ee22));}}['_getOrderInContent'](_0x51753b){let _0xd09d4b=0x0;if(!_0x51753b)return this['length'];for(const _0x3ad095 of this){const _0x46debd=_0x3ad095['view']['targetRect'];if(_0x46debd){if(w(_0x51753b,_0x46debd)<0x0)return _0xd09d4b;_0xd09d4b++;}}return _0xd09d4b;}}function v({source:_0x4e9575,target:_0x1bdb95,filter:_0x2119e7}){for(const _0x4bc232 of _0x4e9575)_0x2119e7(_0x4bc232)&&_0x1bdb95['add'](_0x4bc232);_0x1bdb95['listenTo'](_0x4e9575,'add',(_0x1a8629,_0x213d2a)=>{_0x2119e7(_0x213d2a)&&_0x1bdb95['add'](_0x213d2a);}),_0x1bdb95['listenTo'](_0x4e9575,'remove',(_0x335a92,_0xa07066)=>{_0x1bdb95['has'](_0xa07066)&&_0x1bdb95['remove'](_0xa07066);});}function w(_0x147eb4,_0x713d8e){if(null===_0x147eb4&&null===_0x713d8e)return 0x0;if(null===_0x147eb4)return-0x1;if(null===_0x713d8e)return 0x1;const _0x52bad9=_0x147eb4['top']-_0x713d8e['top'];return 0x0==_0x52bad9?_0x147eb4['left']-_0x713d8e['left']:_0x52bad9;}class y extends _0xb0a350{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59751a){if(super(_0x59751a),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x59751a instanceof _0x559dcd){const _0x309080=_0x59751a['locale'];_0x59751a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x309080,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x309080,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x309080,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x309080,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x309080,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x309080,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x309080,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x58c56f){this['collection']['add'](_0x58c56f);}['remove'](_0xfc1b30){this['collection']['remove'](_0xfc1b30),_0xfc1b30['destroy']();}['refreshVisibility'](){for(const _0x3db1b5 of this['collection'])_0x3db1b5['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x4ef544){return this['collection']['getByInnerView'](_0x4ef544);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3554d4 of this['collection'])_0x3554d4['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5c2370){this['fire']('_activateAnnotation',_0x5c2370);}['createAnnotation'](_0x4d7545){return new T(_0x4d7545);}['createAnnotationView'](_0x2b4433,_0x5ecf96){return new E(_0x2b4433,_0x5ecf96);}['_addActiveAnnotation'](_0x141e47){const _0x48c69d=new Set(this['activeAnnotations']);_0x48c69d['add'](_0x141e47),this['activeAnnotations']=_0x48c69d;}['_removeActiveAnnotation'](_0x577e6b){const _0xc9466a=new Set(this['activeAnnotations']);_0xc9466a['delete'](_0x577e6b),this['activeAnnotations']=_0xc9466a;}['_bindAnnotationsToVisibleAnnotations'](){const _0x17d0f7=this['collection'],_0x412c95=this['_visibleAnnotations'];function _0xda733(_0x262ee3){const _0x19ef9e=_0x262ee3['source'];_0x19ef9e['isVisible']&&!_0x412c95['has'](_0x19ef9e)?_0x412c95['add'](_0x19ef9e):!_0x19ef9e['isVisible']&&_0x412c95['has'](_0x19ef9e)&&_0x412c95['remove'](_0x19ef9e),_0x19ef9e['view']['focusTracker']['remove'](_0x19ef9e['view']['element']),_0x19ef9e['view']['focusTracker']['add'](_0x19ef9e['view']['element']);}this['listenTo'](_0x17d0f7,'add',(_0x12dcac,_0x1b85db)=>{_0x1b85db['isVisible']&&_0x412c95['add'](_0x1b85db),this['listenTo'](_0x1b85db,'change:isVisible',_0xda733);}),this['listenTo'](_0x17d0f7,'remove',(_0x4280eb,_0xaf4548)=>{_0x412c95['has'](_0xaf4548)&&_0x412c95['remove'](_0xaf4548),this['stopListening'](_0xaf4548,'change:isVisible',_0xda733);});}['_setupEnterAnnotationKeystroke'](){const _0x436a6b=_0x129bb2=>{_0x129bb2['on']('ready',()=>{_0x129bb2['keystrokes']['set'](_0x4c6be8,(_0x30477c,_0x2501cf)=>{const _0x3bb79a=_0x1c316a(this['activeAnnotations']['values']());_0x3bb79a&&(_0x3bb79a['view']['focus'](),_0x2501cf());});});};this['context']instanceof _0x559dcd?_0x436a6b(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x277f10,_0xc0874c)=>{_0x436a6b(_0xc0874c);});}['_setupEscapeAnnotationHandling'](){const _0x251f86=_0x583dfa=>{const _0x44100e=_0x583dfa['source'],_0x4509ce=[];let _0x6da61d;if(Array['isArray'](_0x44100e['target'])){_0x6da61d=_0x44100e['target'][0x0],this['context']instanceof _0x559dcd?_0x4509ce['push'](this['context']):this['context']['editors']&&_0x4509ce['push'](...this['context']['editors']);for(const _0x26f74b of _0x4509ce)for(const _0x4cacc9 of _0x26f74b['editing']['view']['domRoots']['values']())if(_0x4cacc9['contains'](_0x6da61d))return void _0x26f74b['editing']['view']['focus']();_0x6da61d['focus']();}};this['listenTo'](this['collection'],'add',(_0x11dc16,_0x37d043)=>{this['listenTo'](_0x37d043,'escape',_0x251f86,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x26d129,_0x10672e)=>{this['stopListening'](_0x10672e,'escape',_0x251f86);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xb0a350{['_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(_0x573987){super(_0x573987),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x34eb70=this['context']['config'];_0x34eb70['define']('comments.maxCommentsWhenCollapsed',0x2),_0x34eb70['define']('comments.maxThreadTotalWeight',0x1f4),_0x34eb70['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x34eb70['define']('comments.CommentThreadView',gt),_0x34eb70['define']('comments.CommentView',Tt),_0x34eb70['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x400773=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xd1a5af,_0x4583b0)=>this['_addCommentThread'](_0x4583b0)),this['on']('submitCommentThread',(_0x57e99f,_0x3be561)=>this['_submitCommentThread'](_0x3be561)),this['on']('resolveCommentThread',(_0x50c463,_0x261759)=>this['_resolveCommentThread'](_0x261759)),this['on']('resolveCommentThread',(_0x1ae5a8,_0x1c5ed2)=>this['_updateActiveAnnotation'](_0x1c5ed2),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xfaa92c,_0x4a6d67)=>this['_reopenCommentThread'](_0x4a6d67)),this['on']('reopenCommentThread',(_0x50eed5,_0x55ba3e)=>this['_updateActiveAnnotation'](_0x55ba3e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3aca1c,_0x56babd)=>this['_removeCommentThread'](_0x56babd)),this['on']('updateCommentThread',(_0x486ac0,_0x4be897)=>this['_updateCommentThread'](_0x4be897)),this['on']('updateCommentThread',(_0x348a7d,_0x195311)=>this['_updateActiveAnnotation'](_0x195311),{'priority':'lowest'}),this['on']('addComment',(_0x17ebc8,_0xea5cc2)=>this['_addComment'](_0xea5cc2)),this['on']('updateComment',(_0x3f73db,_0x3519c0)=>this['_updateComment'](_0x3519c0)),this['on']('removeComment',(_0x358968,_0x352f6c)=>this['_removeComment'](_0x352f6c)),this['on']('addComment',(_0x3e11bd,{threadId:_0x19d022,isFromAdapter:_0x436919})=>{if(_0x436919)return;const _0xa5cc2b=this['getCommentThread'](_0x19d022),_0x29b4f5=_0xa5cc2b&&this['_threadToController']['get'](_0xa5cc2b);_0x29b4f5&&_0x29b4f5['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x400773,'change:activeAnnotations',(_0x500204,_0x19ce63,_0x20b5c0)=>{const _0x3322e4=Array['from'](_0x20b5c0)['map'](_0x1a5760=>this['_viewToController']['get'](_0x1a5760['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3322e4?_0x3322e4['model']:null;});}set['adapter'](_0x978f49){if(this['_adapter'])throw new _0x18be9b('commentsrepository-adapter-already-set');this['_adapter']=_0x978f49;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x99fb8e=_t,threadId:_0x3191d1=_0x5b249c(),comments:_0x1688e4=[],unlinkedAt:_0x955a2b=null,resolvedAt:_0x1ebeae=null,resolvedBy:_0x15e036=null,target:_0x21f1e3=null,context:_0x5be02d=null,attributes:_0x1ad68f={},isResolvable:_0x38ef47=!0x0,isSubmitted:_0x40c6b1=!0x1,isFromAdapter:_0x3f55e0=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x99fb8e),{'channelId':_0x99fb8e,'threadId':_0x3191d1,'comments':_0x1688e4,'unlinkedAt':_0x955a2b,'resolvedAt':_0x1ebeae,'resolvedBy':_0x15e036,'target':_0x21f1e3,'context':_0x5be02d,'attributes':_0x1ad68f,'isFromAdapter':_0x3f55e0,'isResolvable':_0x38ef47,'isSubmitted':_0x40c6b1}),this['getCommentThread'](_0x3191d1);}['openNewCommentThread']({channelId:_0xf3790e=_t,threadId:_0x5d1450=_0x5b249c(),target:_0x1dc6ef,context:_0x41916a=null,isResolvable:_0x15a740=!0x0}){if(this['_readOnlyChannels']['has'](_0xf3790e)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1dc6ef)throw new _0x18be9b('commentsrepository-missing-target');const _0x346f37=this['addCommentThread']({'channelId':_0xf3790e,'threadId':_0x5d1450,'target':_0x1dc6ef,'context':_0x41916a,'isResolvable':_0x15a740});if(!_0x346f37)return null;const _0x415f9a=this['_threadToController']['get'](_0x346f37),_0x36e0cd=_0x415f9a['view']['commentThreadInputView']['commentInputView'],_0x413537=this['context']['plugins']['get'](y),_0x12c235=_0x413537['getByInnerView'](_0x415f9a['view']);return _0x413537['activate'](_0x12c235),_0x36e0cd['once']('editorReady',()=>_0x36e0cd['focus']()),_0x346f37;}['hasCommentThread'](_0x3a099c){if('string'!=typeof _0x3a099c)throw new _0x18be9b('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3a099c);}['updateCommentThread']({channelId:_0x4f4c01=_t,threadId:_0x1413ba,context:_0x380ebd,unlinkedAt:_0x3ba5a5,attributes:_0x131982,isFromAdapter:_0xb94239=!0x1}){return this['fire'](Nt('updateCommentThread',_0x4f4c01),{'channelId':_0x4f4c01,'threadId':_0x1413ba,'context':_0x380ebd,'unlinkedAt':_0x3ba5a5,'attributes':_0x131982,'isFromAdapter':_0xb94239}),this['getCommentThread'](_0x1413ba);}['getCommentThread'](_0x5f5610){if('string'!=typeof _0x5f5610)throw new _0x18be9b('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5f5610);}['fetchCommentThread']({channelId:_0x54f506,threadId:_0x4ce205}={}){const _0x50a1fc=this['getCommentThread'](_0x4ce205);if(_0x50a1fc)return Promise['resolve'](_0x50a1fc);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x18be9b('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x54f506,'threadId':_0x4ce205})['then'](_0x52dee8=>this['hasCommentThread'](_0x4ce205)?this['getCommentThread'](_0x4ce205):_0x52dee8?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x54f506},_0x52dee8)):void 0x0)['catch'](_0x275823=>{throw console['error'](_0x275823),new _0x18be9b('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x56379a,skipNotAttached:_0xef39ed=!0x1,skipEmpty:_0x1f09a6=!0x1,toJSON:_0x57d41e=!0x1}={}){const _0x21edf5=[];for(const _0x2f34f9 of this['_threads']['values']())_0x56379a&&_0x2f34f9['channelId']!==_0x56379a||_0xef39ed&&!_0x2f34f9['isAttached']||_0x1f09a6&&0x0===_0x2f34f9['length']||_0x21edf5['push'](_0x2f34f9);return _0x57d41e?_0x21edf5['map'](_0x4d7166=>_0x4d7166['toJSON']()):_0x21edf5;}['getAnnotationForCommentThread'](_0x4d7f11){const _0xf66a5c=this['_threadToController']['get'](_0x4d7f11);if(!_0xf66a5c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0xf66a5c['view'])||null;}['getCommentThreadForAnnotation'](_0x249989){const _0x44b2ff=this['_viewToController']['get'](_0x249989['innerView']);return _0x44b2ff?_0x44b2ff['model']:null;}['setActiveCommentThread'](_0x2bb549){const _0x78c055=this['context']['plugins']['get'](y);if(!_0x2bb549)return void(this['activeCommentThread']&&_0x78c055['deactivateAll']());const _0xa3b740=this['getCommentThread'](_0x2bb549);if(!_0xa3b740)throw new _0x18be9b('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2bb549});if(!this['_threadToController']['has'](_0xa3b740))throw new _0x18be9b('commentsrepository-active-not-attached',null,{'threadId':_0x2bb549});const _0x582d44=_0x78c055['getByInnerView'](this['_threadToController']['get'](_0xa3b740)['view']);_0x78c055['activate'](_0x582d44);}['switchReadOnly'](_0x30d342,_0x2eb33a){_0x30d342?this['_readOnlyChannels']['add'](_0x2eb33a):this['_readOnlyChannels']['delete'](_0x2eb33a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x116ed7){return this['_readOnlyChannels']['has'](_0x116ed7)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2534b2,_0x436210){return new vt(_0x2534b2,_0x436210);}['setPermissions'](_0x52454b,_0x563804=_t){this['_permissions']['set'](_0x563804,_0x52454b),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4cfabf=_t){return this['_permissions']['has'](_0x4cfabf)?this['_permissions']['get'](_0x4cfabf):bt;}['_addCommentThread']({channelId:_0x3813b3,threadId:_0x938cc0,comments:_0x52ee02,unlinkedAt:_0x32622c,resolvedAt:_0x23c7fd,resolvedBy:_0x589f2d,target:_0x4d6106,context:_0x2c0b86,attributes:_0x37613d,isFromAdapter:_0x1ca1f3,isResolvable:_0xf8c16a,isSubmitted:_0x528f17}){if('string'!=typeof _0x938cc0)throw new _0x18be9b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x938cc0});if(this['hasCommentThread'](_0x938cc0))throw new _0x18be9b('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x938cc0});const _0x5b5c86=new pi(this,{'channelId':_0x3813b3,'id':_0x938cc0,'context':_0x2c0b86,'attributes':_0x37613d,'unlinkedAt':_0x32622c,'resolvedAt':_0x23c7fd,'resolvedBy':_0x589f2d?this['context']['plugins']['get'](it)['getUser'](_0x589f2d):null,'isResolvable':_0xf8c16a,'isSubmitted':_0x528f17||_0x1ca1f3});this['_threads']['set'](_0x938cc0,_0x5b5c86);for(const _0x1d5d87 of _0x52ee02)_0x5b5c86['_add'](this['_createNewComment']({'threadId':_0x938cc0,..._0x1d5d87}));return _0x4d6106&&_0x5b5c86['attachTo'](_0x4d6106),_0x1ca1f3||!_0x5b5c86['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3813b3,'threadId':_0x938cc0});}['_submitCommentThread']({channelId:_0x1cf4ed,threadId:_0x31f504}){if(!this['hasCommentThread'](_0x31f504))throw new _0x18be9b('commentsrepository-missing-comment-thread',this);const _0x1188e9=this['getCommentThread'](_0x31f504);if(_0x1188e9['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3f471b,comments:_0x5629f3,resolvedAt:_0x3b7010,resolvedBy:_0x140da9,context:_0x5ddd45,attributes:_0x5237f6}=_0x1188e9,_0x8ab246=this['context']['plugins']['get']('PendingActions'),_0x26f173=_0x8ab246['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1cf4ed,'threadId':_0x3f471b,'comments':_0x5629f3['map'](_0xc7dd1b=>_0xc7dd1b['toJSON']()),'resolvedAt':_0x3b7010,'resolvedBy':_0x140da9?_0x140da9['id']:_0x140da9,'context':_0x5ddd45,'attributes':_0x5237f6})['then'](({comments:_0x4fe271})=>{_0x8ab246['remove'](_0x26f173);for(const _0x20933d of _0x4fe271)this['_updateComment']({'channelId':_0x1cf4ed,'threadId':_0x31f504,'commentId':_0x20933d['commentId'],'createdAt':_0x20933d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x536323=>{throw console['error'](_0x536323),new _0x18be9b('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x334b48,target:_0x5ed8f3}){const _0x201d44=this['getCommentThread'](_0x334b48);if(!_0x201d44)throw new _0x18be9b('commentsrepository-attach-missing-comment-thread',this);const _0x1018c1=this['context']['plugins']['get']('PendingActions'),_0x377767=this['context']['plugins']['get'](y),_0x5ecda8=this['_createCommentThreadView'](_0x201d44),_0x3b25c5=new vt(_0x201d44,_0x5ecda8);let _0x1249ad=null;_0x5ecda8['on']('change:isDirty',(_0x43983c,_0x152323,_0x166a1d)=>{_0x166a1d?_0x1249ad=_0x1018c1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1249ad&&(_0x1018c1['remove'](_0x1249ad),_0x1249ad=null);}),this['_threadToController']['set'](_0x201d44,_0x3b25c5),this['_viewToController']['set'](_0x5ecda8,_0x3b25c5);const _0x1326d6=new E(this['context']['locale'],_0x5ecda8);_0x1326d6['bind']('length')['to'](_0x5ecda8),_0x1326d6['bind']('isDirty')['to'](_0x5ecda8,'isDirty',_0x5ecda8,'length',(_0x405678,_0x3d63ae)=>_0x405678||!_0x3d63ae),_0x1326d6['bind']('isActive')['to'](_0x5ecda8),_0x1326d6['type']='comment';const _0x4b3eaf=new T({'view':_0x1326d6,'target':_0x5ed8f3,'type':'comment','isVisible':!_0x201d44['archivedAt']&&!!('function'==typeof _0x5ed8f3?_0x5ed8f3():_0x5ed8f3)});return _0x5ecda8['on']('escape',()=>{_0x4b3eaf['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5ecda8,_0x4b3eaf),_0x377767['add'](_0x4b3eaf),_0x4b3eaf;}['_bindAnnotationToEditors'](_0x47f22b,_0x478466){this['listenTo'](_0x47f22b,'editorReady',(_0x26d0d2,_0x2908ab)=>{const _0x3d61a8=_0x2908ab['ui']['view']['body']['bodyCollectionContainer'];_0x478466['focusableElements']['add'](_0x3d61a8),this['context']instanceof _0x559dcd&&this['context']['ui']['focusTracker']['add'](_0x3d61a8);},{'priority':'highest'}),this['listenTo'](_0x47f22b,'editorDestroyed',(_0x4130ac,_0x1c40bf)=>{const _0x240365=_0x1c40bf['ui']['view']['body']['bodyCollectionContainer'];_0x478466['focusableElements']['has'](_0x240365)&&_0x478466['focusableElements']['remove'](_0x240365),this['context']instanceof _0x559dcd&&this['context']['ui']['focusTracker']['remove'](_0x240365);});}['_unbindEditors'](_0x31eba9){this['stopListening'](_0x31eba9,'editorReady'),this['stopListening'](_0x31eba9,'editorDestroyed');}['_createCommentThreadView'](_0x416dc7){const _0x516588=this['context']['plugins']['get'](it),{config:_0x1f6d71,locale:_0x39dd47}=this['context'],_0x1561f8=pt(_0x1f6d71['get']('locale'),_0x39dd47);return new(0x0,(_0x1f6d71['get']('comments'))['CommentThreadView'])(_0x39dd47,_0x416dc7,_0x516588['me'],{'editorConfig':{..._0x1f6d71['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1f6d71['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1f6d71['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1f6d71['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1f6d71['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1561f8,'CommentView':_0x1f6d71['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x22b5dc,channelId:_0x30ed5b,resolvedAt:_0x17ac6b,resolvedBy:_0x564590,isFromAdapter:_0x189a68}){if(!this['hasCommentThread'](_0x22b5dc))throw new _0x18be9b('commentsrepository-missing-comment-thread',null,{'threadId':_0x22b5dc});const _0x1e5268=this['getCommentThread'](_0x22b5dc);if(_0x1e5268['isResolved'])throw new _0x18be9b('commentsrepository-resolved-comment-thread',null,{'threadId':_0x22b5dc});const _0x1d12ef=this['context']['plugins']['get'](it);if(_0x1e5268['resolvedBy']=_0x1d12ef['getUser'](_0x564590),_0x1e5268['resolvedAt']=_0x17ac6b,_0x189a68||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x390efb=this['context']['plugins']['get']('PendingActions'),_0x1c8ebf=_0x390efb['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x30ed5b,'threadId':_0x22b5dc})['then'](({resolvedAt:_0x2aab33,resolvedBy:_0xc48bf8})=>{_0x390efb['remove'](_0x1c8ebf),_0x1e5268['resolvedBy']['id']!==_0xc48bf8&&(_0x1e5268['resolvedBy']=_0x1d12ef['getUser'](_0xc48bf8)),_0x1e5268['resolvedAt']=_0x2aab33;})['catch'](_0xd6d830=>{throw console['error'](_0xd6d830),new _0x18be9b('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x45cb64,channelId:_0x1cd2f6,isFromAdapter:_0x240c99}){if(!this['hasCommentThread'](_0x45cb64))throw new _0x18be9b('commentsrepository-missing-comment-thread',null,{'threadId':_0x45cb64});const _0x5d88a5=this['getCommentThread'](_0x45cb64);if(!_0x5d88a5['isResolved'])throw new _0x18be9b('commentsrepository-reopen-comment-thread',null,{'threadId':_0x45cb64});if(_0x5d88a5['resolvedBy']=null,_0x5d88a5['resolvedAt']=null,_0x240c99||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x44634d=this['context']['plugins']['get']('PendingActions'),_0x1979fd=_0x44634d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1cd2f6,'threadId':_0x45cb64})['then'](()=>_0x44634d['remove'](_0x1979fd))['catch'](_0x812c81=>{throw console['error'](_0x812c81),new _0x18be9b('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x23cb2c,isFromAdapter:_0x4fb7b4}){const _0x46657e=this['getCommentThread'](_0x23cb2c);if(!_0x46657e)throw new _0x18be9b('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x23cb2c),this['_threads']['delete'](_0x23cb2c),!_0x46657e['isSubmitted']||_0x4fb7b4||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2caa18=this['context']['plugins']['get']('PendingActions'),{channelId:_0x475ed9}=_0x46657e,_0x2f7645=_0x2caa18['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x475ed9,'threadId':_0x23cb2c})['then'](()=>_0x2caa18['remove'](_0x2f7645))['catch'](_0x42f293=>{throw console['error'](_0x42f293),new _0x18be9b('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x21064c,unlinkedAt:_0x55ea1b,context:_0x211972,attributes:_0x4df2b5,isFromAdapter:_0x426dbc}){if('string'!=typeof _0x21064c)throw new _0x18be9b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x21064c});if(!this['hasCommentThread'](_0x21064c))throw new _0x18be9b('commentsrepository-missing-comment-thread',null,{'threadId':_0x21064c});const _0x448703=this['getCommentThread'](_0x21064c);let _0x28ed97=!0x1;if(void 0x0!==_0x211972&&_0x448703['context']!==_0x211972&&(_0x448703['context']=_0x211972,_0x28ed97=!0x0),void 0x0!==_0x55ea1b&&_0x448703['unlinkedAt']!==_0x55ea1b&&(_0x448703['unlinkedAt']=_0x55ea1b,_0x28ed97=!0x0),_0x4df2b5&&!At(_0x4df2b5,_0x448703['attributes'])&&(_0x448703['attributes']=_0x4df2b5,_0x28ed97=!0x0),!_0x28ed97)return Promise['resolve']();if(!_0x448703['isSubmitted']||_0x426dbc||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x28642f=this['context']['plugins']['get']('PendingActions'),{channelId:_0xcce0df}=_0x448703,_0x4a052d=_0x28642f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xcce0df,'threadId':_0x21064c,'context':_0x211972,'unlinkedAt':_0x55ea1b,'attributes':_0x4df2b5})['then'](()=>_0x28642f['remove'](_0x4a052d))['catch'](_0x4d90b2=>{throw console['error'](_0x4d90b2),new _0x18be9b('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x591bc8){const _0x3fee6a=this['context']['plugins']['get'](y),_0x21df8b=this['getCommentThread'](_0x591bc8);if(_0x21df8b['_isAttached']=!0x1,this['_threadToController']['has'](_0x21df8b)){const _0xfa4864=this['_threadToController']['get'](_0x21df8b),_0x47974f=_0xfa4864['view'],_0x53b9c7=_0x3fee6a['getByInnerView'](_0x47974f);this['_threadToController']['delete'](_0x21df8b),this['_viewToController']['delete'](_0x47974f),_0x53b9c7&&_0x3fee6a['remove'](_0x53b9c7),_0xfa4864['destroy'](),_0x47974f['destroy']()['then'](()=>{this['_unbindEditors'](_0x47974f);});}}['_updateActiveAnnotation']({threadId:_0x55d0a3,resolvedAt:_0x91daf7,unlinkedAt:_0x45e6f7}){const _0x8ce9cc=!!_0x91daf7,_0x502d6f=this['context']['plugins']['get'](y),_0x1e84f6=this['getCommentThread'](_0x55d0a3);if(this['_threadToController']['has'](_0x1e84f6)){const _0x5bb864=this['_threadToController']['get'](_0x1e84f6)['view'],_0x3734e2=_0x502d6f['getByInnerView'](_0x5bb864);_0x3734e2&&(_0x8ce9cc&&_0x502d6f['_removeActiveAnnotation'](_0x3734e2),_0x45e6f7?_0x3734e2['isVisible']=!0x1:_0x3734e2['refreshVisibility']());}}['_getExternalAuthor'](_0x3ec506){const _0x4621ee=this['context']['plugins']['get'](it),_0x51ae2a=It('external:'+_0x3ec506),_0x205d41=_0x4621ee['getUser'](_0x51ae2a);return _0x205d41||_0x4621ee['addUser']({'id':_0x51ae2a,'name':_0x3ec506});}['_createNewComment']({threadId:_0xa03b33,commentId:_0x2a5b68=_0x5b249c(),content:_0x347804,authorId:_0x2587d1,createdAt:_0x127cb8,attributes:_0x2d75ab}){if('string'!=typeof _0x2a5b68)throw new _0x18be9b('commentsrepository-invalid-commentid');if('string'!=typeof _0x2587d1)throw new _0x18be9b('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x347804||!_0x347804['trim']())throw new _0x18be9b('commentsrepository-invalid-comment-content');const _0x465ae5=this['context']['plugins']['get'](it)['getUser'](_0x2587d1);if(!_0x465ae5)throw new _0x18be9b('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2587d1});let _0x151139=null,_0x4b29a7=_0x127cb8;return _0x2d75ab?.['@external']&&(_0x151139=this['_getExternalAuthor'](_0x2d75ab['@external']['authorName']),_0x4b29a7=new Date(_0x2d75ab['@external']['createdAt'])),new wi(this,{'threadId':_0xa03b33,'id':_0x2a5b68,'author':_0x151139||_0x465ae5,'creator':_0x465ae5,'content':_0x347804,'createdAt':_0x127cb8,'authoredAt':_0x4b29a7,'attributes':_0x2d75ab});}['_addComment'](_0x57a45f){let {threadId:_0x5cd662,content:_0x29124d,attributes:_0xac5524,isFromAdapter:_0x376888}=_0x57a45f;const _0x338b1b=this['getCommentThread'](_0x57a45f['threadId']);if(!_0x338b1b)throw new _0x18be9b('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x29ef81=this['_createNewComment'](_0x57a45f),{id:_0x2a202b}=_0x29ef81;if(_0x338b1b['_add'](_0x29ef81),_0x376888||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x338b1b['isSubmitted'])return Promise['resolve']();const _0x3c5121=this['context']['plugins']['get']('PendingActions'),{channelId:_0x52f6b9}=_0x338b1b,_0x2b6aae=_0x3c5121['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xac5524||(_0xac5524={}),this['adapter']['addComment']({'channelId':_0x52f6b9,'threadId':_0x5cd662,'commentId':_0x2a202b,'content':_0x29124d,'attributes':_0xac5524})['then'](_0x1409e6=>{_0x3c5121['remove'](_0x2b6aae),_0x1409e6&&this['_updateComment']({'channelId':_0x52f6b9,'threadId':_0x5cd662,'commentId':_0x2a202b,'createdAt':_0x1409e6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5866a3=>{throw console['error'](_0x5866a3),new _0x18be9b('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3b8aff,commentId:_0x35b5a2,content:_0x49dc1d,createdAt:_0x771b21,attributes:_0xc478ed,isFromAdapter:_0x54090d}){if(void 0x0!==_0x49dc1d&&('string'!=typeof _0x49dc1d||!_0x49dc1d['trim']()['length']))throw new _0x18be9b('commentsrepository-update-comment-invalid-content');const _0x5c6b6f=this['getCommentThread'](_0x3b8aff),_0x31a586=_0x5c6b6f['getComment'](_0x35b5a2);if(!_0x31a586)throw new _0x18be9b('commentsrepository-update-missing-comment',this);let _0x10dd94=!0x1;if(_0x49dc1d&&_0x49dc1d!==_0x31a586['content']&&(_0x31a586['isEditable']||_0x54090d)&&(_0x31a586['content']=_0x49dc1d,_0x10dd94=!0x0),_0x771b21&&_0x771b21!==_0x31a586['createdAt']&&(_0x31a586['createdAt']=_0x771b21,_0x31a586['attributes']&&_0x31a586['attributes']['@external']||(_0x31a586['authoredAt']=_0x771b21),_0x10dd94=!0x0),_0xc478ed&&!At(_0xc478ed,_0x31a586['attributes'])&&(_0x31a586['attributes']=_0xc478ed,_0x10dd94=!0x0),!_0x10dd94)return Promise['resolve']();if(_0x5c6b6f['fire']('commentUpdated'),_0x54090d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x518aff=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1be363}=this['getCommentThread'](_0x31a586['threadId']),_0x51776c=_0x518aff['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1be363,'threadId':_0x3b8aff,'commentId':_0x35b5a2,'content':_0x49dc1d,'attributes':_0xc478ed})['then'](()=>_0x518aff['remove'](_0x51776c))['catch'](_0x366a07=>{throw console['error'](_0x366a07),new _0x18be9b('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1bc0a0,commentId:_0x3564db,isFromAdapter:_0xfcd66c}){const _0x31e74c=this['getCommentThread'](_0x1bc0a0),_0x269f26=_0x31e74c['getComment'](_0x3564db);if(!_0x269f26)throw new _0x18be9b('commentsrepository-remove-missing-comment',this);if(_0x31e74c['_remove'](_0x269f26),_0xfcd66c||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x250dd9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x165afe}=_0x31e74c,_0x1cbcb2=_0x250dd9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x165afe,'threadId':_0x1bc0a0,'commentId':_0x3564db})['then'](()=>_0x250dd9['remove'](_0x1cbcb2))['catch'](_0xf0defc=>{throw console['error'](_0xf0defc),new _0x18be9b('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x310bea(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3763e0,_0x3ad50e){super();const _0x23b001=_0x3ad50e['isResolvable'];this['channelId']=_0x3ad50e['channelId'],this['id']=_0x3ad50e['id'],this['comments']=new _0x7f3a36(),this['_repository']=_0x3763e0,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3ad50e['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3763e0,'_permissions',_0x3763e0,'_readOnlyChannels',()=>_0x3763e0['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3763e0,'_permissions',()=>_0x3763e0['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3763e0,'_permissions',()=>{const _0x28e9a9=_0x3763e0['getPermissions'](this['channelId']);return _0x28e9a9['write']||_0x28e9a9['admin'];}),this['bind']('isResolvable')['to'](_0x3763e0,'_permissions',()=>_0x23b001&&_0x3763e0['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3ad50e['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2c74da,_0x4934fe)=>_0x2c74da?_0x4934fe?_0x2c74da<_0x4934fe?_0x2c74da:_0x4934fe:_0x2c74da:_0x4934fe),this['set']('unlinkedAt',_0x3ad50e['unlinkedAt']||null),this['set']('resolvedAt',_0x3ad50e['resolvedAt']||null),this['set']('resolvedBy',_0x3ad50e['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x2d6fe8=>!!_0x2d6fe8),this['set']('attributes',_0x3ad50e['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x34e8a4,_0x1e259)=>_0x34e8a4+_0x1e259['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x3db7aa,id:_0x5c25d2}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x3db7aa),{'channelId':_0x3db7aa,'threadId':_0x5c25d2});}['setUnlinkedAt'](_0x1a5abd){this['_update']({'unlinkedAt':_0x1a5abd});}['resolve']({resolvedAt:_0x1db327=new Date(),resolvedBy:_0x38615c=null,isFromAdapter:_0x408003=!0x1}={}){const _0x1fe315=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x1751bf,id:_0x1a9f02}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x1751bf),{'channelId':_0x1751bf,'threadId':_0x1a9f02,'resolvedAt':_0x1db327,'resolvedBy':_0x38615c||_0x1fe315['id'],'isFromAdapter':_0x408003});}['reopen']({isFromAdapter:_0x399fb4=!0x1}={}){const {channelId:_0x4957bd,id:_0x459d8f}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x4957bd),{'channelId':_0x4957bd,'threadId':_0x459d8f,'isFromAdapter':_0x399fb4});}['setContext'](_0x51cec9){this['context']||this['_update']({'context':_0x51cec9});}['setAttribute'](_0x6d5f13,_0x3fa0e0){const _0x4ccabe=wt(this['attributes']);yt(_0x4ccabe,_0x6d5f13,_0x3fa0e0),this['_update']({'attributes':_0x4ccabe});}['removeAttribute'](_0x441abf){const _0x3686ed=wt(this['attributes']);Ct(_0x3686ed,_0x441abf),this['_update']({'attributes':_0x3686ed});}['remove']({isFromAdapter:_0x43cda6=!0x1}={}){const {channelId:_0x3a9879,id:_0x56e154}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x3a9879),{'channelId':_0x3a9879,'threadId':_0x56e154,'isFromAdapter':_0x43cda6});}['attachTo'](_0x4c4934){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x4c4934});}['addComment'](_0x45f77b){const {channelId:_0x47ca5a,id:_0xb015c9}=this;this['_repository']['fire'](Nt('addComment',_0x47ca5a,_0xb015c9),Object['assign']({'channelId':_0x47ca5a,'threadId':_0xb015c9},_0x45f77b));}['getComment'](_0x102237){if('string'!=typeof _0x102237)throw new _0x18be9b('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x102237});return this['comments']['get'](_0x102237);}['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'](_0x71848c=>_0x71848c['toJSON']()),'attributes':this['attributes']};}['_add'](_0x12e784){return this['listenTo'](_0x12e784,'change:authoredAt',()=>{const _0x5eb1d8=this['_findOptimalIndex'](_0x12e784),_0x44121c=this['comments'];_0x5eb1d8-0x1!=_0x44121c['getIndex'](_0x12e784)&&_0x5eb1d8+0x1!=_0x44121c['getIndex'](_0x12e784)&&(this['_remove'](_0x12e784),this['_add'](_0x12e784));}),this['comments']['add'](_0x12e784,this['_findOptimalIndex'](_0x12e784));}['_update'](_0x47f1ff){const {channelId:_0x211995,id:_0x536adf}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x211995),{..._0x47f1ff,'channelId':_0x211995,'threadId':_0x536adf});}['_remove'](_0x36b11e){return this['stopListening'](_0x36b11e),_0x36b11e['destroy'](),this['comments']['remove'](_0x36b11e);}['_findOptimalIndex'](_0x533826){const _0x5e9345=this['comments']['find'](_0x303e09=>new Date(_0x303e09['authoredAt'])['getTime']()>new Date(_0x533826['authoredAt'])['getTime']());return _0x5e9345?this['comments']['getIndex'](_0x5e9345):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x310bea(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x269393,_0x1f2096){super();const _0x24c91a=_0x269393['context']['plugins']['get'](it)['me'],_0x18b962=_0x269393['getCommentThread'](_0x1f2096['threadId']),_0x3618aa=0x0===_0x18b962['comments']['length'],_0x1cda51=_0x24c91a===_0x1f2096['author'];this['id']=_0x1f2096['id'],this['threadId']=_0x1f2096['threadId'],this['author']=_0x1f2096['author'],this['creator']=_0x1f2096['creator'],this['isExternal']=Boolean(_0x1f2096['attributes']&&_0x1f2096['attributes']['@external']),this['set']('content',_0x1f2096['content']),this['createdAt']=_0x1f2096['createdAt']||new Date(),this['set']('authoredAt',_0x1f2096['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x18b962,'resolvedAt'),this['set']('attributes',_0x1f2096['attributes']||{}),this['bind']('isEditable')['to'](_0x269393,'_permissions',()=>{const _0x58a8ef=_0x269393['getPermissions'](_0x18b962['channelId'])['write'],_0x5a9fc1=_0x269393['getPermissions'](_0x18b962['channelId'])['modifyAll'];return _0x1cda51&&_0x58a8ef||!_0x1cda51&&_0x5a9fc1;}),this['bind']('isRemovable')['to'](_0x18b962,'isRemovable',_0x269393,'_permissions',_0x4c5bae=>{const _0x4e83d6=_0x269393['getPermissions'](_0x18b962['channelId'])['write'],_0x15bc87=_0x269393['getPermissions'](_0x18b962['channelId'])['modifyAll'];return _0x1cda51&&_0x4e83d6||_0x4c5bae&&_0x3618aa||!_0x1cda51&&_0x15bc87&&!_0x3618aa;}),this['bind']('isReadOnly')['to'](_0x18b962,'isReadOnly'),this['_repository']=_0x269393;}get['weight'](){return Math['max'](function(_0x557680){const _0x2ead72=document['createElement']('div');return _0x2ead72['innerHTML']=_0x557680,_0x2ead72['textContent']['length'];}(this['content']),0xc8);}['update'](_0x8858e7){const {threadId:_0x59289d,id:_0x3ff544}=this;if(!this['_repository']['hasCommentThread'](_0x59289d))throw new _0x18be9b('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5d3815}=this['_repository']['getCommentThread'](_0x59289d);this['_repository']['fire'](Nt('updateComment',_0x5d3815,_0x59289d),{'channelId':_0x5d3815,'threadId':_0x59289d,'commentId':_0x3ff544,..._0x8858e7});}['setAttribute'](_0x391644,_0x1de399){const _0xa039f2=wt(this['attributes']);yt(_0xa039f2,_0x391644,_0x1de399),this['update']({'attributes':_0xa039f2});}['removeAttribute'](_0x156f74){const _0x2fe8bd=wt(this['attributes']);Ct(_0x2fe8bd,_0x156f74),this['update']({'attributes':_0x2fe8bd});}['remove'](_0x2a2a4e={}){if(!_0x2a2a4e['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3e6bb4,id:_0x1f4f1f}=this;if(!this['_repository']['hasCommentThread'](_0x3e6bb4))throw new _0x18be9b('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xf46d41}=this['_repository']['getCommentThread'](_0x3e6bb4);this['_repository']['fire'](Nt('removeComment',_0xf46d41,_0x3e6bb4),{'channelId':_0xf46d41,'threadId':_0x3e6bb4,'commentId':_0x1f4f1f,..._0x2a2a4e});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x30fc66,..._0x51a9d2){for(const _0x23fd60 of _0x51a9d2)void 0x0!==_0x23fd60&&(_0x30fc66+=':'+String(_0x23fd60));return _0x30fc66;}class ot extends _0x4833ae{constructor(_0x4022fe){super(_0x4022fe),this['set']('hasContent',!0x1);}['refresh'](){const _0x41c660=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xf7a08e of _0x41c660['getRanges']())if(this['_hasContent'](_0xf7a08e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x4a0be9=_0x5b249c(),ranges:_0xb554f4,comment:_0x5ca3a9}={}){const _0x2cc607=this['editor']['model'],_0x42e819=_0xb554f4??Array['from'](_0x2cc607['document']['selection']['getRanges']()),_0x1069de=[];for(const _0x1103e0 of _0x42e819)this['_hasContent'](_0x1103e0)&&_0x1069de['push'](this['_trimToContent'](_0x1103e0));if(!_0x1069de['length'])throw new _0x18be9b('addcommentthreadcommand-incorrect-ranges',null);_0x5ca3a9&&this['_createCommentThread'](_0x4a0be9,_0x5ca3a9),this['_createMarkersFromRanges'](_0x4a0be9,_0x1069de,!!_0x5ca3a9);}['_createMarkersFromRanges'](_0x27258a,_0x292ce3,_0x3e1ec7){this['editor']['model']['change'](_0x2231a6=>{for(const _0x51c49b of _0x292ce3){const _0x171101=_0x5b249c()['substr'](0x1,0x5),_0xfa847b='comment:'+_0x27258a+':'+_0x171101;_0x2231a6['addMarker'](_0xfa847b,{'range':_0x51c49b,'usingOperation':_0x3e1ec7,'affectsData':_0x3e1ec7});}});}['_createCommentThread'](_0x38eab6,_0x495b21){const _0x49e5b7=this['editor']['plugins']['get']('CommentsRepository'),_0x5ebcc2=this['editor']['config']['get']('collaboration.channelId'),_0x5b04e9=this['editor']['plugins']['get']('Users')['me'];if(!_0x5b04e9)throw new _0x18be9b('addcommentthreadcommand-user-not-found',null);_0x49e5b7['addCommentThread']({'threadId':_0x38eab6,'channelId':_0x5ebcc2,'comments':[{'authorId':_0x5b04e9['id'],'content':_0x495b21,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4fb659){for(const _0x3cb895 of _0x4fb659['getItems']())if(this['_itemIsContent'](_0x3cb895))return!0x0;return!0x1;}['_itemIsContent'](_0x306115){return _0x306115['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x306115)&&!_0x306115['is']('element','tableCell');}['_trimToContent'](_0x3408fe){const _0x2d4787=_0x3f1830=>!this['_itemIsContent'](_0x3f1830['item']),_0x90af56=_0x3408fe['start']['getLastMatchingPosition'](_0x2d4787),_0x41844c=_0x3408fe['end']['getLastMatchingPosition'](_0x2d4787,{'direction':'backward'});return this['editor']['model']['createRange'](_0x90af56,_0x41844c);}}class b extends _0x81c189{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54451b){super(_0x54451b),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x393092=this['editor'],_0x448859=_0x393092['model']['document']['selection'],_0x49ec5c=_0x5670e0(()=>this['refreshSelectedViews'](),0xa);_0x448859['on']('change:range',(_0x1d8f52,_0x25f0e1)=>{_0x25f0e1['directChange']&&(_0x49ec5c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x393092['editing']['view']['document'],'change:isFocused',(_0x440d97,_0x309465,_0xc18e57)=>{_0xc18e57&&_0x49ec5c();}),this['listenTo'](_0x393092['ui']['focusTracker'],'change:isFocused',(_0x2c00f3,_0x47cf50,_0x191443)=>{_0x191443||this['fire']('blur',{'isAnnotationTracked':_0x4a620e=>this['_editorAnnotationsData']['has'](_0x4a620e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x456e4d){if(this['_editorAnnotations']['has'](_0x456e4d['view']))return;this['_editorAnnotations']['add'](_0x456e4d['view']),this['editor']['ui']['focusTracker']['add'](_0x456e4d['view']['element']);const _0x2e317d=this['editor']['plugins']['get'](y);this['listenTo'](_0x2e317d['collection'],'remove',(_0x597879,_0x522903)=>{this['editor']['ui']['focusTracker']['remove'](_0x522903['view']['element']),this['_editorAnnotations']['delete'](_0x522903['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x23006f){if('function'!=typeof _0x23006f)throw new _0x18be9b('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x23006f);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x39a7b1,annotations:_0x171ab2}){const _0x4de713=[],_0x4da852=this['editor']['model']['document']['selection'],_0x231296=Array['from'](_0x4da852['getRanges']());for(const [_0x580c04,_0x5cc6cd]of this['_editorAnnotationsData']){const _0x1866cc=_0x11a343(_0x5cc6cd),_0x37468c=_0x171ab2['getByInnerView'](_0x580c04);_0x1866cc&&_0x37468c&&_0x4de713['push']({'annotation':_0x37468c,'range':_0x1866cc});}function _0x11a343(_0x1bfe94){for(const _0x36d59f of _0x1bfe94)for(const _0x57e818 of _0x231296)if(_0x36d59f['containsRange'](_0x57e818,!_0x4da852['isCollapsed']))return _0x36d59f;return null;}return _0x4de713['sort']((_0x135e75,_0x3c1387)=>{const _0x22792e=_0x135e75['range'],_0x1df6cc=_0x3c1387['range'];if(!_0x22792e['isEqual'](_0x1df6cc)){if(_0x22792e['containsRange'](_0x1df6cc,!0x0))return 0x1;if(_0x1df6cc['containsRange'](_0x22792e,!0x0))return-0x1;}return _0x135e75['annotation']==_0x39a7b1?-0x1:_0x3c1387['annotation']==_0x39a7b1?0x1:0x0;})['map'](_0x44c5fa=>_0x44c5fa['annotation']);}get['_editorAnnotationsData'](){const _0x538bb1=new Map();for(const _0x3c218d of Array['from'](this['_dataCollectors']))for(const [_0x3bdfff,_0x4f5aee]of _0x3c218d())_0x538bb1['set'](_0x3bdfff,_0x4f5aee);return _0x538bb1;}}class st extends _0x81c189{['afterInit'](){const _0x356fa9=this['editor'];if(!_0x356fa9['plugins']['has']('RestrictedEditingModeEditing'))return;_0x356fa9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x81c189{constructor(_0x1bfa10){super(_0x1bfa10),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5e052a=this['editor'],_0x4c18a6=_0x5e052a['commands']['get']('importWord'),_0x2b0e80=_0x5e052a['plugins']['get'](it);_0x4c18a6&&(_0x4c18a6['on']('execute',(_0x20b16b,[,_0x1b6ec9])=>{_0x1b6ec9['collaboration_features']={'comments':!0x0,'user_id':_0x2b0e80['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x4c18a6,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x509fa2,_0x569d4d){const {comment_threads:_0x172578}=_0x569d4d;_0x172578&&_0x172578['forEach'](({thread_id:_0x5ba4ca,comments:_0x330015,is_resolved:_0x5b52a9})=>{const _0x258567=new Date(),_0x1a5a64=_0x330015['map'](({author:_0x326e77,content:_0x4797dd,created_at:_0x53f6ba})=>({'content':_0x4797dd,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x258567,'attributes':{'@external':{'authorName':_0x326e77,'createdAt':_0x53f6ba?new Date(_0x53f6ba):new Date(),'source':'importWord'}}})),_0x1ad115=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1ad115,'threadId':_0x5ba4ca,'comments':_0x1a5a64,'resolvedAt':_0x5b52a9?_0x258567:null});});}}class at extends _0x81c189{constructor(_0x2ab9e9){super(_0x2ab9e9),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x298a18=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x298a18,'contentInsertion',(_0x10c05f,_0x282326)=>this['_removeMarkersWithoutThreads'](_0x282326['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xcd300f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xcd300f;const _0x33fcd6=this['editor']['plugins']['get']('CommentsRepository');for(const _0x3c09b0 of _0xcd300f['keys']()){const [_0x451e05,_0x32464b]=_0x3c09b0['split'](':');'comment'!=_0x451e05||_0x33fcd6['hasCommentThread'](_0x32464b)||_0xcd300f['delete'](_0x3c09b0);}return _0xcd300f;}['_registerMarkerInClipboardPipeline'](){const _0x586e73=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x16fee=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x16fee&&_0x586e73['_registerMarkerToCopy']('comment',_0x16fee);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x441454){switch(_0x441454){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x2c049d){const _0x453c9b=_0x2c049d['split'](':');return{'group':_0x453c9b[0x0],'id':_0x453c9b[0x1],'part':_0x453c9b[0x2]};}class ut extends _0x81c189{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x40808c,_0x496ecf)=>{if(!_0x496ecf['options']['showCommentHighlights'])return null;if(_0x496ecf['options']['ignoreResolvedComments']){const {id:_0x5ed8f5}=ft(_0x40808c['markerName']),_0x489bd8=this['editor']['plugins']['get'](o);if(_0x489bd8['getCommentThread'](_0x5ed8f5)?.['isResolved']&&_0x40808c['item'])return _0x496ecf['consumable']['consume'](_0x40808c['item'],'addMarker:'+_0x40808c['markerName']),_0x496ecf['consumable']['consume'](_0x40808c['item'],'removeMarker:'+_0x40808c['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x47441b=>{_0x47441b['on']('addMarker:comment',(_0x431840,_0x247b31,_0x18251c)=>{if(!_0x18251c['options']['showCommentHighlights'])return;const _0x160786=_0x247b31['item'];if(!_0x160786)return;const _0x322fc4=_0x18251c['mapper']['toViewElement'](_0x160786);this['editor']['model']['schema']['isObject'](_0x160786)&&_0x322fc4&&!_0x322fc4['getCustomProperty']('widget')&&_0x322fc4['is']('containerElement')&&_0x28a4bd(_0x322fc4,_0x18251c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4848d5,{writer:_0x3a7f49,options:_0x1e7792})=>{if(!_0x1e7792['showCommentHighlights'])return null;const _0x1e6fa3=_0x3a7f49['createContainerElement']('div'),_0x1a3780=_0x3a7f49['createEmptyElement']('hr');return _0x3a7f49['addClass']('ck-horizontal-line',_0x1e6fa3),_0x3a7f49['insert'](_0x3a7f49['createPositionAt'](_0x1e6fa3,0x0),_0x1a3780),_0x1e6fa3;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3da965,{writer:_0x301adf,options:_0x114a87})=>{if(!_0x114a87['showCommentHighlights'])return null;const _0x31432c=_0x301adf['createContainerElement']('span'),_0x51a437=_0x301adf['createEmptyElement']('img');return _0x301adf['addClass']('image-inline',_0x31432c),_0x301adf['insert'](_0x301adf['createPositionAt'](_0x31432c,0x0),_0x51a437),_0x31432c;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2c1f2a,{writer:_0xf22dbd,options:_0x3316a9})=>{if(_0x3316a9['showCommentHighlights'])return _0xf22dbd['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x53ddfc,_0x348d08,_0x3f877a)=>{_0x3f877a['options']['showCommentHighlights']&&_0x53ddfc['stop']();},{'priority':'high'});}}class r extends _0x81c189{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(_0x31c94c){super(_0x31c94c),this['set']('isThreadsLoadingPaused',!0x0),_0x31c94c['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4b2061,_0x461e18,_0x3608a7,_0x278a2f)=>{const _0x5b8d73=_0x31c94c['plugins']['get'](o),_0x4e12c5=_0x3608a7?ft(_0x3608a7)['id']:null;_0x31c94c['model']['change'](()=>{if(_0x4e12c5){const _0xb0ee5e=this['getAllMarkersForId'](_0x4e12c5);for(const _0x3b8c14 of _0xb0ee5e)_0x31c94c['editing']['reconvertMarker'](_0x3b8c14);}if(_0x278a2f){const {id:_0x105889}=ft(_0x278a2f),_0x501a55=_0x5b8d73['getCommentThread'](_0x105889);if(_0x501a55&&_0x501a55['unlinkedAt'])return;if(_0x501a55&&!_0x501a55['isAttached'])return;const _0x4d40db=this['getAllMarkersForId'](_0x105889);for(const _0x514aef of _0x4d40db)_0x31c94c['editing']['reconvertMarker'](_0x514aef);}}),_0x4e12c5&&this['scrollToThreadMarker'](_0x4e12c5);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xaa3dca=this['editor'],_0x3abeeb=_0xaa3dca['plugins']['get'](o),_0x442c56=_0xaa3dca['config']['get']('collaboration.channelId'),_0x11c2d5=_0x3abeeb['getCommentThreads']()['filter'](_0x372d22=>_0x372d22['channelId']!==_0x442c56);_0xaa3dca['commands']['add']('addCommentThread',new ot(_0xaa3dca)),this['listenTo'](_0xaa3dca,'change:isReadOnly',(_0x2d6138,_0x104469,_0xf07576)=>{_0x3abeeb['switchReadOnly'](_0xf07576,_0xaa3dca['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3abeeb,dt('addCommentThread',_0x442c56),(_0x487e5d,{threadId:_0x51367c})=>{const _0x2948a6=this['editor']['plugins']['get'](o)['getCommentThread'](_0x51367c);_0x2948a6?.['unlinkedAt']&&this['_attachArchivedThread'](_0x51367c);}),this['listenTo'](_0x3abeeb,dt('removeCommentThread',_0x442c56),(_0x144541,{threadId:_0x197765})=>{_0xaa3dca['model']['enqueueChange']({'isUndoable':!0x1},_0x2aec6b=>{const _0x2b259a=this['getAllMarkersForId'](_0x197765);for(const _0x1e6465 of _0x2b259a)_0x2aec6b['removeMarker'](_0x1e6465);});}),this['listenTo'](_0x3abeeb,dt('resolveCommentThread',_0x442c56),(_0x2b2997,{threadId:_0x31dde6})=>{(this['_reconvertMarkers'](_0x31dde6),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x31dde6)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3abeeb,dt('reopenCommentThread',_0x442c56),(_0x181ec6,{threadId:_0x25daec})=>{this['_reconvertMarkers'](_0x25daec);},{'priority':'low'}),this['listenTo'](_0x3abeeb,dt('addComment',_0x442c56),(_0x36f436,{threadId:_0x4d630e,isFromAdapter:_0x33a76e})=>{const _0xcc9b7d=this['getAllMarkersForId'](_0x4d630e);if(_0x33a76e||0x0==_0xcc9b7d['length']||!_0x3abeeb['hasCommentThread'](_0x4d630e))return;0x1===_0x3abeeb['getCommentThread'](_0x4d630e)['length']&&_0xaa3dca['model']['enqueueChange']({'isUndoable':!0x1},_0x55b0e8=>{for(const _0x84c8 of _0xcc9b7d)_0x55b0e8['updateMarker'](_0x84c8,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x11c2d5);}['afterInit'](){!async function(_0x282995){const _0x4b2037=_0x45a575([0x33,0x75,0x6c,0x70,0x58,0x51,0x53,0x57,0x47,0x4f,0x63,0x4a,0x4e,0x42,0x49,0x38,0x30,0x39,0x4b,0x67,0x77,0x45,0x6f,0x76,0x66,0x79,0x73,0x44,0x48,0x5a,0x31,0x7a,0x55,0x34,0x62,0x65,0x68,0x78,0x64,0x71,0x32,0x61,0x36,0x6a,0x6e,0x54,0x50,0x74,0x41,0x4c,0x56,0x52,0x6b,0x4d,0x37,0x6d,0x69,0x72,0x46,0x43,0x35,0x59]),_0x166a22=0x5abf4589,_0x3b0465=0x5ab82a41^_0x166a22,_0x56208f=window[_0x45a575([0x44,0x61,0x74,0x65])][_0x45a575([0x6e,0x6f,0x77])](),_0x5c14b1=_0x282995[_0x45a575([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a2909=new window[(_0x45a575([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15ccda=>{_0x5c14b1[_0x45a575([0x6f,0x6e,0x63,0x65])](_0x45a575([0x72,0x65,0x61,0x64,0x79]),_0x15ccda);}),_0x93c998={[_0x45a575([0x6b,0x74,0x79])]:_0x45a575([0x45,0x43]),[_0x45a575([0x75,0x73,0x65])]:_0x45a575([0x73,0x69,0x67]),[_0x45a575([0x63,0x72,0x76])]:_0x45a575([0x50,0x2d,0x32,0x35,0x36]),[_0x45a575([0x78])]:_0x45a575([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]),[_0x45a575([0x79])]:_0x45a575([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]),[_0x45a575([0x61,0x6c,0x67])]:_0x45a575([0x45,0x53,0x32,0x35,0x36])},_0x1c8ead=_0x5c14b1[_0x45a575([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x45a575([0x67,0x65,0x74])](_0x45a575([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x272298(){let _0x4346b7,_0x135c65=null,_0x4c2161=null;try{if(_0x1c8ead==_0x45a575([0x47,0x50,0x4c]))return _0x45a575([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4346b7=_0x237393(),!_0x4346b7)return _0x45a575([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4346b7[_0x45a575([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4c2161=_0x3af8ff(_0x4346b7[_0x45a575([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4346b7[_0x45a575([0x6a,0x74,0x69])])),await _0x2eddb2()?_0x1af198()?_0x1a1485()?_0x45a575([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3e8fc7()?(_0x4346b7[_0x45a575([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x45a575([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x135c65=_0x4bd601(_0x45a575([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4346b7[_0x45a575([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x45a575([0x74,0x72,0x69,0x61,0x6c])&&(_0x135c65=_0x4bd601(_0x45a575([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2b7c15()):_0x45a575([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x45a575([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x45a575([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x45a575([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1a1485(){const _0x16a7b1=[_0x45a575([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x45a575([0x74,0x72,0x69,0x61,0x6c])][_0x45a575([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4346b7[_0x45a575([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x56208f/0x3e8:0xe10*_0x3b0465;return _0x4346b7[_0x45a575([0x65,0x78,0x70])]<_0x16a7b1;}function _0x1af198(){const _0x12db5a=_0x4346b7[_0x45a575([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x12db5a)return!0x1;if(_0x12db5a[_0x45a575([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45a575([0x2a])))return!0x0;if(_0x12db5a[_0x45a575([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45a575([0x43,0x4d,0x54])))return!0x0;if(_0x12db5a[_0x45a575([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45a575([0x52,0x43,0x4d,0x54]))){if(_0x342f3c())return!0x0;if(_0x14ed13()||_0x27c454())return!0x0;}return!0x1;}function _0x3e8fc7(){const _0x9f135f=_0x4346b7[_0x45a575([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x9f135f||0x0==_0x9f135f[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2b99a2}=new URL(window[_0x45a575([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x9f135f[_0x45a575([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b99a2))return!0x0;const _0x2c0e94=_0x2b99a2[_0x45a575([0x73,0x70,0x6c,0x69,0x74])](_0x45a575([0x2e]));return _0x9f135f[_0x45a575([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3f365b=>_0x3f365b[_0x45a575([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45a575([0x2a])))[_0x45a575([0x6d,0x61,0x70])](_0x4fa3ec=>_0x4fa3ec[_0x45a575([0x73,0x70,0x6c,0x69,0x74])](_0x45a575([0x2e])))[_0x45a575([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x168458=>_0x168458[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2c0e94[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45a575([0x6d,0x61,0x70])](_0x5662ff=>Array(_0x2c0e94[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5662ff[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45a575([0x66,0x69,0x6c,0x6c])](_0x5662ff[0x0]===_0x45a575([0x2a])?_0x45a575([0x2a]):'')[_0x45a575([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5662ff))[_0x45a575([0x73,0x6f,0x6d,0x65])](_0x5b83c8=>_0x2c0e94[_0x45a575([0x65,0x76,0x65,0x72,0x79])]((_0x439892,_0x2613be)=>_0x5b83c8[_0x2613be]===_0x439892||_0x5b83c8[_0x2613be]===_0x45a575([0x2a])));}function _0x2b7c15(){return _0x135c65&&_0x4c2161?new window[(_0x45a575([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23b177,_0x204d51)=>{_0x135c65[_0x45a575([0x74,0x68,0x65,0x6e])](_0x23b177,_0x204d51),_0x4c2161[_0x45a575([0x74,0x68,0x65,0x6e])](_0x13e230=>{_0x13e230!=_0x45a575([0x56,0x61,0x6c,0x69,0x64])&&_0x23b177(_0x13e230);},_0x204d51);}):_0x135c65||_0x4c2161||_0x45a575([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3af8ff(_0x503fe1,_0x52cae2){return new window[(_0x45a575([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x472c91=>{if(_0x254fd4())return _0x472c91(_0x45a575([0x56,0x61,0x6c,0x69,0x64]));_0x26cb20(),_0x5c14b1[_0x45a575([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x45a575([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3852a3=!0x1;const _0x281112=_0x5b249c();function _0x3097de(_0x3b89c1){return!!_0x3b89c1&&(typeof _0x3b89c1===_0x45a575([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3b89c1===_0x45a575([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3b89c1[_0x45a575([0x74,0x68,0x65,0x6e])]===_0x45a575([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3b89c1[_0x45a575([0x63,0x61,0x74,0x63,0x68])]===_0x45a575([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x444d91(_0x5d0432){_0x84a338(_0x5d0432)[_0x45a575([0x74,0x68,0x65,0x6e])](_0x192840=>{if(!_0x192840||_0x192840[_0x45a575([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x45a575([0x6f,0x6b]))return _0x45a575([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3e454f(_0xd169e8(_0x281112+_0x52cae2))!=_0x192840[_0x45a575([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x45a575([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x45a575([0x56,0x61,0x6c,0x69,0x64]);})[_0x45a575([0x74,0x68,0x65,0x6e])](_0x3452b3=>(_0x3bddb1(),_0x3452b3),()=>{const _0x167967=_0x1caf6d();return null==_0x167967?(_0x3bddb1(),_0x45a575([0x56,0x61,0x6c,0x69,0x64])):_0x45a575(_0x56208f-_0x167967>(0x7eb3c189^_0x166a22)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x45a575([0x74,0x68,0x65,0x6e])](_0x472c91)[_0x45a575([0x63,0x61,0x74,0x63,0x68])](()=>{_0x472c91(_0x45a575([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x19546b=0x5a89ab09^_0x166a22;function _0x3bddb1(){const _0x20434a=_0x45a575([0x6c,0x6c,0x63,0x74,0x2d])+_0x3e454f(_0xd169e8(_0x503fe1)),_0x4233ce=_0x3e546f(_0x3e454f(window[_0x45a575([0x4d,0x61,0x74,0x68])][_0x45a575([0x63,0x65,0x69,0x6c])](_0x56208f/_0x19546b)));window[_0x45a575([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45a575([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x20434a,_0x4233ce);}function _0x1caf6d(){const _0x4a6ed0=_0x45a575([0x6c,0x6c,0x63,0x74,0x2d])+_0x3e454f(_0xd169e8(_0x503fe1)),_0x42dea4=window[_0x45a575([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45a575([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a6ed0);return _0x42dea4?window[_0x45a575([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3e546f(_0x42dea4),0x10)*_0x19546b:null;}function _0x84a338(_0x52bf22){return new window[(_0x45a575([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5d875e,_0x36b399)=>{_0x52bf22[_0x45a575([0x74,0x68,0x65,0x6e])](_0x5d875e,_0x36b399),window[_0x45a575([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x36b399,0x5abe9149^_0x166a22);});}}_0x5c14b1[_0x45a575([0x6f,0x6e])](_0x45a575([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3606fd,_0x4c340a)=>{if(_0x4c340a[0x0]!=_0x503fe1)return _0x472c91(_0x45a575([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4c340a[0x1]={..._0x4c340a[0x1],[_0x45a575([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x281112};},{[_0x45a575([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45a575([0x68,0x69,0x67,0x68])}),_0x5c14b1[_0x45a575([0x6f,0x6e])](_0x45a575([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xbd570b=>{_0x3097de(_0xbd570b[_0x45a575([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3852a3=!0x0,_0x444d91(_0xbd570b[_0x45a575([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x45a575([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45a575([0x6c,0x6f,0x77])}),_0x3a2909[_0x45a575([0x74,0x68,0x65,0x6e])](()=>{_0x3852a3||_0x472c91(_0x45a575([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x254fd4(){return _0x5c14b1[_0x45a575([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45a575([0x76,0x69,0x65,0x77])][_0x45a575([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x45a575([0x61,0x75,0x74,0x6f]);}function _0x26cb20(){_0x5c14b1[_0x45a575([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45a575([0x76,0x69,0x65,0x77])][_0x45a575([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x45a575([0x61,0x75,0x74,0x6f]);}}function _0x4bd601(_0x424c49){const _0x54ff1b=[new window[(_0x45a575([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40762a=>setTimeout(_0x40762a,0x5ab67b45^_0x166a22)),_0x3a2909[_0x45a575([0x74,0x68,0x65,0x6e])](()=>new window[(_0x45a575([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f304d=>{let _0x4e14cc=0x0;_0x5c14b1[_0x45a575([0x6d,0x6f,0x64,0x65,0x6c])][_0x45a575([0x6f,0x6e])](_0x45a575([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1ecdf3,_0x1dfb4a)=>{_0x1dfb4a[0x0][_0x45a575([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4e14cc++,_0x4e14cc==(0x5abf4471^_0x166a22)&&(_0x3f304d(),_0x1ecdf3[_0x45a575([0x6f,0x66,0x66])]());});}))];return window[_0x45a575([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x45a575([0x72,0x61,0x63,0x65])](_0x54ff1b)[_0x45a575([0x74,0x68,0x65,0x6e])](()=>_0x424c49);}async function _0x2b24f0(){await _0x3a2909,_0x5c14b1[_0x45a575([0x6d,0x6f,0x64,0x65,0x6c])][_0x45a575([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x376cc0,_0x5c14b1[_0x45a575([0x6d,0x6f,0x64,0x65,0x6c])][_0x45a575([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x376cc0,_0x5c14b1[_0x45a575([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x45a575([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x342f3c(){return _0xfdf481(_0x45a575([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xe1843d(_0x45a575([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x45a575([0x73,0x74,0x61,0x74,0x65])]==_0x45a575([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x14ed13(){return _0xfdf481(_0x45a575([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 _0x27c454(){return _0xfdf481(_0x45a575([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x13dd71(_0x330dc6){const _0x4ea4af=_0x31d229();_0x5c14b1[_0x4ea4af]=_0x45a575([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x330dc6,_0x330dc6!=_0x45a575([0x56,0x61,0x6c,0x69,0x64])&&_0x2b24f0();}function _0x31d229(){const _0x52a592=window[_0x45a575([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x45a575([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x45a575([0x6e,0x6f,0x77])]())[_0x45a575([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x45a575([0x2e]),'');let _0x3f4531=_0x45a575([0x75]);for(let _0x3de470=0x0;_0x3de470<_0x52a592[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3de470+=0x2){let _0x1e390f=window[_0x45a575([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52a592[_0x45a575([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3de470,_0x3de470+0x2));_0x1e390f>=_0x4b2037[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1e390f-=_0x4b2037[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3f4531+=_0x4b2037[_0x1e390f];}return _0x3f4531;}function _0x237393(){const _0x47852a=_0x1c8ead[_0x45a575([0x73,0x70,0x6c,0x69,0x74])](_0x45a575([0x2e]));if(0x3!=_0x47852a[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1691e6(_0x47852a[0x1]);function _0x1691e6(_0x7d37b5){const _0x3c48fa=_0x250569(_0x7d37b5);return _0x3c48fa&&_0xaae7e2()?_0x3c48fa:null;function _0xaae7e2(){const _0x42fa6f=_0x3c48fa[_0x45a575([0x6a,0x74,0x69])],_0x53d7e8=window[_0x45a575([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42fa6f[_0x45a575([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x42fa6f[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2989d8={..._0x3c48fa,[_0x45a575([0x6a,0x74,0x69])]:_0x42fa6f[_0x45a575([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x42fa6f[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2989d8[_0x45a575([0x76,0x63])],_0xd169e8(_0x2989d8)==_0x53d7e8;}}}async function _0x2eddb2(){let _0x2d395f=!0x0;try{const _0x3789fe=_0x1c8ead[_0x45a575([0x73,0x70,0x6c,0x69,0x74])](_0x45a575([0x2e])),[_0x23c922,_0x3d70c1,_0x39f38e]=_0x3789fe;return _0x48ab84(_0x23c922),await _0x706035(_0x23c922,_0x3d70c1,_0x39f38e),_0x2d395f;}catch{return!0x1;}function _0x48ab84(_0x4be8a6){const _0x1e62b2=_0x250569(_0x4be8a6);_0x1e62b2&&_0x1e62b2[_0x45a575([0x61,0x6c,0x67])]==_0x45a575([0x45,0x53,0x32,0x35,0x36])||(_0x2d395f=!0x1);}async function _0x706035(_0x282a70,_0x295c9b,_0x4705a6){const _0x42841e=window[_0x45a575([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x45a575([0x66,0x72,0x6f,0x6d])](_0x22e9df(_0x4705a6),_0xddbdf0=>_0xddbdf0[_0x45a575([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x492656=new window[(_0x45a575([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x45a575([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x282a70+_0x45a575([0x2e])+_0x295c9b),_0x32b6eb=window[_0x45a575([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x45a575([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x32b6eb)return;const _0x56cfd6=await _0x32b6eb[_0x45a575([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x45a575([0x6a,0x77,0x6b]),_0x93c998,{[_0x45a575([0x6e,0x61,0x6d,0x65])]:_0x45a575([0x45,0x43,0x44,0x53,0x41]),[_0x45a575([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x45a575([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x45a575([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x32b6eb[_0x45a575([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x45a575([0x6e,0x61,0x6d,0x65])]:_0x45a575([0x45,0x43,0x44,0x53,0x41]),[_0x45a575([0x68,0x61,0x73,0x68])]:{[_0x45a575([0x6e,0x61,0x6d,0x65])]:_0x45a575([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x56cfd6,_0x42841e,_0x492656)||(_0x2d395f=!0x1);}}function _0x250569(_0x5ea7dd){return _0x5ea7dd[_0x45a575([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x45a575([0x65,0x79]))?JSON[_0x45a575([0x70,0x61,0x72,0x73,0x65])](_0x22e9df(_0x5ea7dd)):null;}function _0x22e9df(_0x22b389){return window[_0x45a575([0x61,0x74,0x6f,0x62])](_0x22b389[_0x45a575([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x45a575([0x2b]))[_0x45a575([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x45a575([0x2f])));}function _0xd169e8(_0x339c45){let _0x2d2787=0x1505;function _0xda7e20(_0x4e7e52){for(let _0xec9911=0x0;_0xec9911<_0x4e7e52[_0x45a575([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xec9911++){const _0x7e5a69=_0x4e7e52[_0x45a575([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xec9911);_0x2d2787=(_0x2d2787<<0x5)+_0x2d2787+_0x7e5a69,_0x2d2787&=_0x2d2787;}}function _0x3b19fe(_0x5bf160){Array[_0x45a575([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5bf160)?_0x5bf160[_0x45a575([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3b19fe):_0x5bf160&&typeof _0x5bf160==_0x45a575([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x45a575([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5bf160)[_0x45a575([0x73,0x6f,0x72,0x74])]()[_0x45a575([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5b7925,_0x46a4a0])=>{_0xda7e20(_0x5b7925),_0x3b19fe(_0x46a4a0);}):_0xda7e20(window[_0x45a575([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5bf160));}return _0x3b19fe(_0x339c45),_0x2d2787>>>0x0;}function _0x3e454f(_0x32cc28){return _0x32cc28[_0x45a575([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x45a575([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x45a575([0x30]));}function _0x3e546f(_0x179484){return _0x179484[_0x45a575([0x73,0x70,0x6c,0x69,0x74])]('')[_0x45a575([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x45a575([0x6a,0x6f,0x69,0x6e])]('');}function _0xfdf481(_0x25d619){return _0x5c14b1[_0x45a575([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x45a575([0x68,0x61,0x73])](_0x25d619);}function _0xe1843d(_0x3cdc84){return _0x5c14b1[_0x45a575([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x45a575([0x67,0x65,0x74])](_0x3cdc84);}function _0x376cc0(){}function _0x45a575(_0x3a280b){return _0x3a280b['map'](_0x740093=>String['fromCharCode'](_0x740093))['join']('');}_0x13dd71(await _0x272298());}(this);}['destroy'](){const _0x19ccb1=this['editor']['plugins']['get'](o),_0x1c6140=this['editor']['config']['get']('collaboration.channelId');for(const _0x5b659a of _0x19ccb1['getCommentThreads']({'channelId':_0x1c6140}))_0x19ccb1['_detachCommentThread'](_0x5b659a['id']),_0x19ccb1['_threads']['delete'](_0x5b659a['id']);super['destroy']();}['hasMarkerForId'](_0x4dc32d){return this['getAllMarkersForId'](_0x4dc32d)['length']>0x0;}['getAllMarkersForId'](_0x165be2){const _0xe1ea67=[];for(const _0x3dd203 of this['editor']['model']['markers'])_0x3dd203['name']['startsWith']('comment:'+_0x165be2)&&_0xe1ea67['push'](_0x3dd203);return _0xe1ea67;}['scrollToThreadMarker'](_0x1fa97b){setTimeout(()=>{const _0x4fef3e=this['_getTargetForId'](_0x1fa97b);if(!_0x4fef3e)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x1fa97b&&nt({'target':_0x4fef3e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x315470){this['editor']['model']['change'](()=>{for(const _0x1461da of this['getAllMarkersForId'](_0x315470))this['editor']['editing']['reconvertMarker'](_0x1461da);});}['_attachArchivedThread'](_0x338012){const _0x4ee9a4=this['editor']['plugins']['get'](o),_0x37942a=this['editor']['plugins']['get'](b),_0x21da31=_0x4ee9a4['getCommentThread'](_0x338012);if(!_0x21da31['isAttached']){const _0x133461=_0x21da31['attachTo'](()=>this['_getTargetForId'](_0x21da31['id']));_0x37942a['registerAnnotation'](_0x133461),_0x21da31['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1b4af9=this['editor'],_0x34fa2b=_0x1b4af9['plugins']['get'](it);_0x1b4af9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3f01e2,_0x42f2fe)=>{const {id:_0x5b89e4}=ft(_0x3f01e2['markerName']),_0x237fd7=_0x1b4af9['plugins']['get'](o)['getCommentThread'](_0x5b89e4),_0x32e4d8=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5b89e4;let _0x3f6044;if(_0x237fd7&&_0x237fd7['isResolved']&&!_0x32e4d8&&_0x3f01e2['item'])return _0x42f2fe['consumable']['consume'](_0x3f01e2['item'],'addMarker:'+_0x3f01e2['markerName']),_0x42f2fe['consumable']['consume'](_0x3f01e2['item'],'removeMarker:'+_0x3f01e2['markerName']),null;const _0x5b3d1f=['ck-comment-marker'];return _0x32e4d8&&_0x5b3d1f['push']('ck-comment-marker--active'),_0x3f6044=_0x237fd7?.['length']?_0x237fd7['comments']['first']['author']['id']:_0x34fa2b['me']['id'],{'classes':_0x5b3d1f,'attributes':{'data-comment':_0x5b89e4,'data-author-id':_0x3f6044}};}}),_0x1b4af9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3d0222,{options:_0x34cfc1})=>{if(_0x34cfc1['showCommentHighlights'])return null;const _0x50404d=_0x1b4af9['plugins']['get'](o),_0x3e5ea4=_0x1b4af9['model']['markers']['get'](_0x3d0222),{id:_0x16bbf4,part:_0x5d7176}=ft(_0x3d0222);return _0x3e5ea4&&!_0x3e5ea4['affectsData']||_0x34cfc1['ignoreResolvedComments']&&_0x50404d['getCommentThread'](_0x16bbf4)?.['isResolved']?null:{'group':'comment','name':_0x5d7176?_0x16bbf4+':'+_0x5d7176:_0x16bbf4};}}),_0x1b4af9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x46af1a,{writer:_0x1ae47})=>_0x1ae47['createElement']('$marker',{'data-name':'comment:'+_0x46af1a['getAttribute']('id')})}),_0x1b4af9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x46aac5=this['editor'],_0x401b34=_0x46aac5['plugins']['get'](o),_0x415e7a=new Set(),_0x151504=new Set();_0x46aac5['model']['document']['registerPostFixer'](_0x2a71ed=>{let _0x110b7f=!0x1;for(const {name:_0x10792f,data:_0x560e66}of _0x46aac5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x107fcb,id:_0x415fa1}=ft(_0x10792f);let _0x2caf59=_0x560e66['newRange'];if('comment'!==_0x107fcb||!_0x2caf59)continue;const _0x3be19e='$graveyard'===_0x2caf59['root']['rootName'];_0x3be19e||(_0x2caf59=ht(_0x2caf59,_0x46aac5['model']),!_0x2caf59||_0x2caf59['isCollapsed']||!_0x560e66['newRange']||_0x2caf59['isEqual'](_0x560e66['newRange']))?_0x46aac5['model']['hasContent'](_0x2caf59)&&!_0x3be19e?this['isThreadsLoadingPaused']?_0x415e7a['add'](_0x10792f):this['_handleThreadMarker'](_0x10792f,_0x415fa1):(_0x151504['add'](_0x10792f),_0x415e7a['delete'](_0x10792f),_0x2a71ed['removeMarker'](_0x10792f),_0x110b7f=!0x0):(_0x2a71ed['updateMarker'](_0x10792f,{'range':_0x2caf59}),_0x110b7f=!0x0);}return _0x110b7f;}),this['on']('change:isThreadsLoadingPaused',(_0x527e6c,_0x26eaa7,_0x20a30d)=>{if(!_0x20a30d&&_0x415e7a['size'])for(const _0x273976 of _0x415e7a){const {id:_0x33b341}=ft(_0x273976);_0x415e7a['delete'](_0x273976),_0x46aac5['model']['markers']['get'](_0x273976)&&this['_handleThreadMarker'](_0x273976,_0x33b341);}}),this['listenTo'](_0x46aac5['model']['document'],'change',()=>{for(const {name:_0x14a604,data:{newRange:_0x5a247a}}of _0x46aac5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x23cd1c,id:_0x47ee7a}=ft(_0x14a604);if('comment'!==_0x23cd1c)continue;const _0x3f89fc=_0x401b34['getCommentThread'](_0x47ee7a),_0x5e0c00=this['hasMarkerForId'](_0x47ee7a);_0x3f89fc&&(!_0x3f89fc['_hasTargetInContent']&&_0x5a247a&&_0x46aac5['editing']['view']['once']('render',()=>{const _0x4938ff=_0x46aac5['plugins']['get'](y),_0x36b332=_0x401b34['_threadToController']['get'](_0x3f89fc)['view'];_0x4938ff['getByInnerView'](_0x36b332)['refreshVisibility']();},{'priority':'low'}),_0x3f89fc['_hasTargetInContent']=_0x5e0c00||!!_0x5a247a),_0x5a247a||(_0x151504['add'](_0x14a604),_0x415e7a['delete'](_0x14a604));}for(const _0x1680af of _0x151504){const {id:_0x54fcd2}=ft(_0x1680af),_0x8eb039=_0x401b34['getCommentThread'](_0x54fcd2);if(_0x415e7a['delete'](_0x1680af),!_0x8eb039)continue;const _0x1d6832=this['hasMarkerForId'](_0x54fcd2);_0x1d6832||_0x8eb039['isSubmitted']?_0x1d6832||_0x8eb039['unlinkedAt']||_0x8eb039['setUnlinkedAt'](new Date()):_0x8eb039['remove']();}_0x151504['clear']();});}['_handleInitialThreads'](_0x1012c2){_0x1012c2['forEach'](_0x4df5c3=>{_0x4df5c3['unlinkedAt']&&this['_attachArchivedThread'](_0x4df5c3['id']);});}['_getTargetForId'](_0xa3e99a){const _0x477eff=this['editor'],_0x476d50=this['getAllMarkersForId'](_0xa3e99a);return et(_0x477eff['editing'],_0x476d50);}['_getTextContext'](_0x18b6b0){const _0x25a3bc=this['getAllMarkersForId'](_0x18b6b0);let _0x45dadd='',_0x10005a=!0x1;for(const _0x4c8dce of _0x25a3bc){const _0x18d74a=_0x4c8dce['getRange']();for(const _0x586f35 of Array['from'](_0x18d74a['getItems']()))_0x586f35['is']('$textProxy')?(_0x45dadd&&_0x10005a&&(_0x45dadd+='\x20',_0x10005a=!0x1),_0x45dadd+=_0x586f35['data']):_0x10005a=!0x0;_0x10005a=!0x0;}return _0x45dadd['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x714555,_0x5bf354){const _0x2117e8=this['editor'],_0x3a6e15=_0x2117e8['plugins']['get'](o);let _0x240568=_0x3a6e15['getCommentThread'](_0x5bf354);const _0x3a698c=_0x2117e8['config']['get']('collaboration.channelId'),_0x57c072=_0x2117e8['plugins']['get'](b);if(_0x240568&&(_0x240568['unlinkedAt']&&_0x240568['setUnlinkedAt'](null),_0x240568['isAttached']))return _0x240568;return!this['getAllMarkersForId'](_0x5bf354)[0x0]['managedUsingOperations']?_0x2117e8['editing']['view']['once']('render',()=>{if(_0x3a6e15['getCommentThread'](_0x5bf354))return;const _0x1dee0a=_0x2117e8['plugins']['get'](y);_0x240568=_0x3a6e15['openNewCommentThread']({'channelId':_0x3a698c,'threadId':_0x5bf354,'target':()=>this['_getTargetForId'](_0x5bf354),'context':{'type':'text','value':this['_getTextContext'](_0x5bf354)}});const _0x198706=_0x3a6e15['_threadToController']['get'](_0x240568)['view'],_0x2570b2=_0x1dee0a['getByInnerView'](_0x198706);_0x2570b2&&_0x57c072['registerAnnotation'](_0x2570b2);},{'priority':'low'}):_0x3a6e15['fetchCommentThread']({'channelId':_0x3a698c,'threadId':_0x5bf354})['then'](_0x183e6b=>{if('destroyed'!==_0x2117e8['state']){if(_0x240568=_0x183e6b,_0x240568&&!_0x240568['isAttached']){const _0x5c8472=_0x240568['attachTo'](()=>this['_getTargetForId'](_0x5bf354));_0x57c072['registerAnnotation'](_0x5c8472),_0x240568['isResolved']&&this['_reconvertMarkers'](_0x5bf354);}else{if(!_0x240568){const _0x22f2c3=this['getAllMarkersForId'](_0x5bf354);_0x2117e8['model']['change'](_0x52dc3c=>{for(const _0x34c9c1 of _0x22f2c3)_0x52dc3c['removeMarker'](_0x34c9c1);});}}}}),_0x240568;}['_handleThreadMarker'](_0x2fc91f,_0x26adb1){const _0x41b2fa=this['_attachMarkerToThread'](_0x2fc91f,_0x26adb1);_0x41b2fa&&!_0x41b2fa['context']&&_0x41b2fa['setContext']({'type':'text','value':this['_getTextContext'](_0x26adb1)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5e5a0e=this['editor'];rt(_0x5e5a0e['model'],({left:_0x499055,entered:_0x599daf})=>{for(const _0x1cf977 of _0x499055)if(mt(_0x1cf977)){_0x5e5a0e['ui']['ariaLiveAnnouncer']['announce'](N(_0x5e5a0e['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x310dfb of _0x599daf)if(mt(_0x310dfb)){_0x5e5a0e['ui']['ariaLiveAnnouncer']['announce'](N(_0x5e5a0e['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x4bd5bc)));break;}});}}function dt(_0x40e704,_0x142083){return _0x142083?_0x40e704+':'+_0x142083:_0x40e704;}function ht(_0x3f0b33,_0x5ca1f3){const _0x3aaff5=_0x5ca1f3['schema'],_0x48407b=_0x5ca1f3['createRange'](_0x3f0b33['start']);for(const _0x59c653 of _0x3f0b33['getWalker']()){const {type:_0x5b3183,item:_0xe90215,nextPosition:_0x3b0442}=_0x59c653;if('text'===_0x5b3183||_0x3aaff5['isObject'](_0xe90215)){const _0x450b7d=_0x5ca1f3['createPositionBefore'](_0xe90215);_0x48407b['isCollapsed']&&(_0x48407b['start']=_0x450b7d),_0x48407b['end']=_0x3b0442;}}return _0x48407b;}function mt(_0x17a201){return'comment'===ft(_0x17a201['name'])['group'];}class s extends _0x81c189{['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 _0x8d26a4=this['editor'],_0x39ee97=_0x8d26a4['plugins']['get'](o),_0x2bcd2d=_0x8d26a4['plugins']['get'](r),_0x12c1dd=_0x8d26a4['plugins']['get'](y),_0x4043d9=_0x8d26a4['plugins']['get'](b);_0x8d26a4['ui']['componentFactory']['add']('comment',()=>{const _0x405fd6=this['_createUIButton'](_0x3c7ff6);return _0x405fd6['tooltip']=!0x0,_0x405fd6;}),_0x8d26a4['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x134a38)),_0x4043d9['addSourceCollector'](()=>{const _0x3695c6=[];for(const [_0x22d87e,_0x331eb0]of _0x39ee97['_threadToController']){const _0x307d4f=_0x2bcd2d['getAllMarkersForId'](_0x22d87e['id']),_0x2b32de=_0x307d4f['map'](_0x1e09e8=>_0x1e09e8['getRange']());_0x307d4f['length']>0x0&&_0x3695c6['push']([_0x331eb0['view'],_0x2b32de]);}return _0x3695c6;}),this['listenTo'](_0x12c1dd,'change:activeAnnotations',(_0x298726,_0x3cb352,_0x2c072f)=>{const _0x1519d5=Array['from'](_0x2c072f)['map'](_0x3bbb1d=>_0x3bbb1d['innerView'])['find'](_0x5e8d7a=>_0x39ee97['_viewToController']['has'](_0x5e8d7a));if(!_0x1519d5)return void(_0x2bcd2d['activeMarker']=null);const _0x3433a6=_0x39ee97['_viewToController']['get'](_0x1519d5)['model']['id'],_0x251c8a='comment:'+_0x3433a6;_0x3433a6&&_0x2bcd2d['hasMarkerForId'](_0x3433a6)?_0x2bcd2d['activeMarker']=_0x251c8a:_0x2bcd2d['activeMarker']&&(_0x2bcd2d['activeMarker']=null);}),this['listenTo'](_0x39ee97,'removeCommentThread',(_0x7bd490,{threadId:_0x1160a1,isFromAdapter:_0x32a29d})=>{!_0x32a29d&&_0x8d26a4['ui']['focusTracker']['isFocused']&&_0x2bcd2d['hasMarkerForId'](_0x1160a1)&&_0x8d26a4['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x39ee97,'addComment',(_0x14ee03,{threadId:_0x5a43d1,isFromAdapter:_0x38465a})=>{if(_0x38465a||!_0x2bcd2d['hasMarkerForId'](_0x5a43d1)||!_0x39ee97['hasCommentThread'](_0x5a43d1))return;0x1===_0x39ee97['getCommentThread'](_0x5a43d1)['length']&&(_0x8d26a4['editing']['view']['focus'](),_0x14ee03['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x264298=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x45a098;for(const _0x31abed in _0x264298){const _0x327f2f=_0x31abed,_0x334551=_0x264298[_0x327f2f];if('commentsLicenseKeyValid'==_0x334551||'commentsLicenseKeyInvalid'==_0x334551||'commentsLicenseKeyExpired'==_0x334551||'commentsLicenseKeyDomainLimit'==_0x334551||'commentsLicenseKeyNotAllowed'==_0x334551||'commentsLicenseKeyEvaluationLimit'==_0x334551||'commentsLicenseKeyTrialLimit'==_0x334551||'commentsLicenseKeyUsageLimit'==_0x334551){delete _0x264298[_0x327f2f],_0x45a098=_0x334551,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x45a098&&_0x264298['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x45a098&&_0x264298['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x45a098&&_0x264298['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x45a098&&_0x264298['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x45a098&&_0x264298['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x45a098&&_0x264298['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x45a098&&_0x264298['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x596b6e){const _0x148832=this['editor'],_0x1c3325=new _0x596b6e(_0x148832['locale']),_0xc0b2f=_0x148832['commands']['get']('addCommentThread');return _0x1c3325['set']({'label':N(_0x148832['locale'],'Comment'),'icon':_0x24c653}),_0x1c3325['bind']('isEnabled')['to'](_0xc0b2f,'hasContent'),this['listenTo'](_0x1c3325,'execute',()=>{_0xc0b2f['execute']();}),_0x1c3325;}}class i extends _0x81c189{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x45b8eb){super(_0x45b8eb),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x12c5c6,_0x12dfda,_0x12c7c4)=>{_0x12c7c4?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x3fdd1d,_0x4b2e02]of this['editor']['commands'])_0x4b2e02['affectsData']&&'addCommentThread'!==_0x3fdd1d&&_0x4b2e02['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x3f0168=this['editor']['editing']['view']['document'];this['listenTo'](_0x3f0168,'cut',_0x5b71e0=>_0x5b71e0['stop'](),{'priority':'highest'}),this['listenTo'](_0x3f0168,'clipboardInput',_0x149fd2=>_0x149fd2['stop'](),{'priority':'highest'}),this['listenTo'](_0x3f0168,'delete',_0x58173a=>_0x58173a['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x356a51,_0x4e100c]of this['editor']['commands'])_0x4e100c['affectsData']&&'addCommentThread'!==_0x356a51&&_0x4e100c['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 _0xb0a350{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1579a0){super(_0x1579a0),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x547eb8=this['context']['plugins']['get'](y);this['listenTo'](_0x547eb8,'_activateAnnotation',(_0x42aec7,_0x20d6af)=>{for(const _0x5ce85f of this['activeUIs']){const _0xe2079=this['_uis']['get'](_0x5ce85f);(0x0,this['uisData']['get'](_0x5ce85f)['filter'])(_0x20d6af)&&_0xe2079['setActiveAnnotation'](_0x20d6af);}}),this['listenTo'](_0x547eb8,'_deactivateAllAnnotations',()=>{for(const _0x270ce2 of this['activeUIs']){this['_uis']['get'](_0x270ce2)['setActiveAnnotation'](null);}}),this['listenTo'](_0x547eb8['_visibleAnnotations'],'add',(_0x2c31ab,_0x2fc7bc)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2fc7bc);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x44479a){return this['activeUIs']['has'](_0x44479a);}['activate'](_0x588833,_0x158307=this['defaultFilter']){const _0x49270c=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x588833))throw new _0x18be9b('annotationsuis-missing-ui',this,{'uiName':_0x588833});this['isActive'](_0x588833)&&this['deactivate'](_0x588833),this['activeUIs']['add'](_0x588833);const _0x59d61b=new S();v({'source':_0x49270c['_visibleAnnotations'],'target':_0x59d61b,'filter':_0x158307}),this['uisData']['set'](_0x588833,{'collection':_0x59d61b,'filter':_0x158307});const _0x3d50e8=this['_uis']['get'](_0x588833);_0x3d50e8['attach'](_0x59d61b),this['listenTo'](_0x3d50e8,'change:activeAnnotation',(_0x54d442,_0x1d3f7b,_0x18bdb7,_0x36a6b3)=>{_0x36a6b3&&_0x49270c['_removeActiveAnnotation'](_0x36a6b3),_0x18bdb7&&_0x49270c['_addActiveAnnotation'](_0x18bdb7);});}['deactivate'](_0x397a2a){if(this['activeUIs']['delete'](_0x397a2a),!this['_uis']['has'](_0x397a2a))throw new _0x18be9b('annotationsuis-missing-ui',this,{'uiName':_0x397a2a});const _0x15a2c5=this['_uis']['get'](_0x397a2a);_0x15a2c5['detach'](),this['stopListening'](_0x15a2c5),this['uisData']['get'](_0x397a2a)['collection']['destroy'](),this['uisData']['delete'](_0x397a2a);}['switchTo'](_0x5aafb5){if(!this['_uis']['has'](_0x5aafb5))throw new _0x18be9b('annotationsuis-missing-ui',this,{'uiName':_0x5aafb5});const _0x1dbabf=this['context']['plugins']['get'](y),_0x2ebce4=Array['from'](_0x1dbabf['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5aafb5);const _0xa46a27=this['_uis']['get'](_0x5aafb5);_0xa46a27['setActiveAnnotation'](_0x2ebce4),_0xa46a27['_setSelectedAnnotations']&&_0x2ebce4&&_0xa46a27['_setSelectedAnnotations']([_0x2ebce4]);}['deactivateAll'](){for(const _0x5d9e30 of this['activeUIs'])this['deactivate'](_0x5d9e30);}['register'](_0x272ca0,_0x1fe757){if(this['_uis']['has'](_0x272ca0))throw new _0x18be9b('annotationsuis-register-already-registered');if('function'!=typeof _0x1fe757['attach']||'function'!=typeof _0x1fe757['detach']||'function'!=typeof _0x1fe757['setActiveAnnotation'])throw new _0x18be9b('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x272ca0,_0x1fe757);}['refilterAnnotations'](){const _0x5ad3b2=this['context']['plugins']['get'](y)['collection'],_0x5e6fda=new Map(),_0xa73634=Array['from'](this['activeUIs']);for(const _0x495342 of this['activeUIs']){const _0x159b11=this['uisData']['get'](_0x495342)['collection'];for(const _0x2ba6bb of _0x159b11)_0x5e6fda['set'](_0x2ba6bb,_0x495342);}for(const _0x155e0c of _0x5ad3b2){const _0x1c78d6=_0x5e6fda['get'](_0x155e0c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x155e0c);const _0x3eb689=_0xa73634['find'](_0x31aae6=>this['uisData']['get'](_0x31aae6)['filter'](_0x155e0c));_0x1c78d6!==_0x3eb689&&(_0x1c78d6&&this['uisData']['get'](_0x1c78d6)['collection']['remove'](_0x155e0c),_0x3eb689&&this['uisData']['get'](_0x3eb689)['collection']['add'](_0x155e0c));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x16cc81){const _0x423db2=[];for(const _0x60f84e of this['activeUIs']){(0x0,this['uisData']['get'](_0x60f84e)['filter'])(_0x16cc81)&&_0x423db2['push'](_0x60f84e);}if(_0x423db2['length']>0x1)throw new _0x18be9b('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x423db2,'annotationType':_0x16cc81['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2af429){super(_0x2af429);const _0x1fbead=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 _0x5dda15(),this['focusCycler']=new _0x11de24({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1fbead['to']('class')],'style':{'minHeight':_0x1fbead['to']('minHeight',_0x51d5bb=>'number'==typeof _0x51d5bb?_i(_0x51d5bb+0xa):null)},'dir':_0x2af429['uiLanguageDirection'],'role':'application','aria-label':N(_0x2af429,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2af429,'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',_0x1fbe0d=>{this['_updateItemPositionInFocusables'](_0x1fbe0d['source']);}),this['list']['forEach'](_0x20157b=>{this['focusTracker']['add'](_0x20157b['element']),this['_updateItemPositionInFocusables'](_0x20157b);}),this['list']['on']('change',(_0x50fa61,_0x523edb)=>{for(const _0x5efaaf of _0x523edb['removed'])this['focusTracker']['remove'](_0x5efaaf['element']),this['focusables']['remove'](_0x5efaaf);for(const _0x56333f of _0x523edb['added'])this['focusTracker']['add'](_0x56333f['element']),this['_updateItemPositionInFocusables'](_0x56333f);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x3a6319){const _0x188444=this['focusables']['getIndex'](_0x3a6319);let _0x46238e,_0x46cf89;for(const _0x4f47fd of this['focusables'])if(_0x3a6319['top']<_0x4f47fd['top']){_0x46238e=_0x4f47fd;break;}if(_0x46cf89=_0x46238e?this['focusables']['getIndex'](_0x46238e):this['focusables']['length'],-0x1!==_0x188444){if(_0x188444===_0x46cf89-0x1)return;this['focusables']['remove'](_0x3a6319),_0x46cf89=_0x46238e?this['focusables']['getIndex'](_0x46238e):this['focusables']['length'];}this['focusables']['add'](_0x3a6319,_0x46cf89);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x44a387){super(_0x44a387),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x303dff,_0x1e99fd)=>_0x303dff+_0x1e99fd),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4939c3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4939c3['to']('isAnimationDisabled',_0x58fb05=>_0x58fb05?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4939c3['to']('top',_0x134cee=>Ot(_0x134cee))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x22881d=this['element']['clientHeight'];_0x22881d&&(this['height']=_0x22881d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xb0a350{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2236c1){super(_0x2236c1),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 _0x3ea772=this['context']['config']['get']('sidebar.container');_0x3ea772&&this['setContainer'](_0x3ea772);}['setContainer'](_0x448237){if(!g(_0x448237))throw new _0x18be9b('sidebar-setcontainer-invalid-element');this['container']=_0x448237;}['_attachToContainer']({viewClass:_0x269cea='',spaceBetweenItems:_0xce2531=0x19}={}){if(!g(this['container']))throw new _0x18be9b('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x269cea,this['_spaceBetweenItems']=_0xce2531;}['rearrange']({removedAnnotation:_0x29f280,previousAnnotation:_0x3aaaf7,nextAnnotation:_0x2eebd6}){const _0x2a0597=this['getSidebarItemView'](_0x29f280);this['view']['list']['remove'](_0x2a0597),this['_destroySidebarItemView'](_0x29f280),_0x3aaaf7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3aaaf7)),_0x2eebd6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2eebd6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x41c7c2,activatedAnnotation:_0x5515d2,disableAnimationOnActivatedAnnotation:_0x464d84}){if(this['_activeAnnotation']=_0x5515d2,_0x41c7c2){_0x41c7c2['isActive']=!0x1;const _0x10bfac=this['getSidebarItemView'](_0x41c7c2);_0x10bfac&&_0x464d84&&(_0x10bfac['isAnimationDisabled']=!0x1);}if(_0x5515d2){const _0x4e49f7=this['getSidebarItemView'](_0x5515d2);_0x4e49f7&&(_0x5515d2['isActive']=!0x0,_0x464d84&&(_0x4e49f7['isAnimationDisabled']=!0x0,_0x4e49f7['top']+=0x1),this['_alignToTargetRect'](_0x4e49f7));}}['_detachFromContainer'](_0x1cbc83){if(this['view']['element']['remove'](),_0x1cbc83){for(const _0x178e21 of _0x1cbc83)this['_destroySidebarItemView'](_0x178e21);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3a763c,_0x5c99b8){_0x5c99b8||(_0x5c99b8=_0x3a763c['view']);const _0x2d8379=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2d8379,_0x3a763c),this['_annotationToSidebarItemView']['set'](_0x3a763c,_0x2d8379),_0x2d8379['content']['add'](_0x5c99b8),this['listenTo'](_0x3a763c['view'],'change:targetRect',(_0x3af213,_0xc88684,_0x31ce95)=>{const _0x1da177=this['_getTargetTop'](_0x3a763c,_0x31ce95);_0x2d8379['_targetTop']!=_0x1da177&&(_0x2d8379['_targetTop']=_0x1da177,this['_setItemTop'](_0x2d8379,_0x1da177));}),this['listenTo'](_0x2d8379,'change:top',()=>{this['_recalculate'](_0x2d8379,'top');}),this['listenTo'](_0x2d8379,'change:bottom',()=>{this['_recalculate'](_0x2d8379,'bottom');}),this['_alignToTargetRect'](_0x2d8379);const _0x368fa1=this['_getItemBefore'](_0x2d8379);if(_0x368fa1)this['_alignAfterItem'](_0x368fa1,_0x2d8379)||this['_alignToTargetRect'](_0x2d8379);else this['_alignToTargetRect'](_0x2d8379);return this['_updateLastItem'](),this['view']['list']['add'](_0x2d8379),_0x2d8379;}['_alignForTopChange'](_0x54662d){if(!_0x54662d['content']['length'])return;const _0x557f0b=this['_getItemBefore'](_0x54662d);if(!_0x557f0b)return;const _0x2d17c9=this['_sidebarItemViewToAnnotation']['get'](_0x557f0b),_0x4c3d7f=this['_activeAnnotation'];_0x4c3d7f&&_0x4c3d7f===_0x2d17c9?this['_alignAfterItem'](_0x557f0b,_0x54662d):this['_alignBeforeItem'](_0x54662d,_0x557f0b);}['_alignForBottomChange'](_0x270372){if(!_0x270372['content']['length'])return;const _0x4f9a30=this['_getItemAfter'](_0x270372);if(!_0x4f9a30)return;const _0x242077=this['_sidebarItemViewToAnnotation']['get'](_0x4f9a30),_0x4447fe=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4bb23e=this['_activeAnnotation'];_0x4bb23e&&_0x4bb23e===_0x242077&&_0x4447fe?(this['_alignBeforeItem'](_0x4f9a30,_0x270372),this['_alignAfterItem'](_0x270372,_0x4f9a30)):_0x4bb23e&&_0x4bb23e===_0x242077?this['_alignBeforeItem'](_0x4f9a30,_0x270372):this['_alignAfterItem'](_0x270372,_0x4f9a30);}['_recalculate'](_0x567d3f,_0x5a88c8){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5450c3,changedProp:_0x7713b2}of this['_recalculateBuffer'])'top'===_0x7713b2?this['_alignForTopChange'](_0x5450c3):this['_alignForBottomChange'](_0x5450c3);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x567d3f,'changedProp':_0x5a88c8});}['getSidebarItemView'](_0x114bbf){return this['_annotationToSidebarItemView']['get'](_0x114bbf);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x28575b){const _0x3c5d31=this['getSidebarItemView'](_0x28575b);this['stopListening'](_0x3c5d31),this['stopListening'](_0x28575b['view']),_0x3c5d31['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x28575b),this['_sidebarItemViewToAnnotation']['delete'](_0x3c5d31);}['_createSidebarView'](){const _0x22e7b2=new H(this['context']['locale']);return _0x22e7b2['render'](),this['on']('change:_lastItem',(_0x3d8e1f,_0x76fc35,_0x5f3c5d,_0x28e6d8)=>{_0x28e6d8&&_0x22e7b2['unbind']('minHeight'),_0x5f3c5d?_0x22e7b2['bind']('minHeight')['to'](_0x5f3c5d,'bottom'):_0x22e7b2['minHeight']=null;}),_0x22e7b2;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x33ff5b){const _0x9d004f=this['_sidebarItemViewToAnnotation']['get'](_0x33ff5b),_0xf7521b=_0x9d004f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x9d004f)-0x1);return _0xf7521b&&this['getSidebarItemView'](_0xf7521b)||null;}['_getItemAfter'](_0x2c018c){const _0x2d4b5b=this['_sidebarItemViewToAnnotation']['get'](_0x2c018c),_0x2017a6=_0x2d4b5b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2d4b5b)+0x1);return _0x2017a6&&this['getSidebarItemView'](_0x2017a6)||null;}['_alignBeforeItem'](_0x15ab8b,_0x3b8f63){_0x15ab8b['updateHeight']();const _0x35fb93=G(_0x3b8f63['bottom']+this['_spaceBetweenItems'],_0x15ab8b['top']);return!!_0x35fb93&&(this['_setItemTop'](_0x3b8f63,_0x3b8f63['top']-_0x35fb93),!0x0);}['_alignAfterItem'](_0x3c2c9e,_0x302c37){_0x3c2c9e['updateHeight']();const _0x44f850=G(_0x3c2c9e['bottom']+this['_spaceBetweenItems'],_0x302c37['top']);return!!_0x44f850&&(this['_setItemTop'](_0x302c37,_0x302c37['top']+_0x44f850,!0x1),!0x0);}['_alignToTargetRect'](_0xf191cd){const _0x48b3ac=this['_sidebarItemViewToAnnotation']['get'](_0xf191cd);if(!_0x48b3ac||!_0x48b3ac['target']||!_0x48b3ac['targetRect'])return;const _0x581051=this['_getTargetTop'](_0x48b3ac,_0x48b3ac['targetRect']);this['_setItemTop'](_0xf191cd,_0x581051);}['_getTargetTop'](_0x22817b,_0x4dee29){if(null===_0x4dee29)return 0x0;if(_0x22817b['target']instanceof _0x10aff6)return _0x4dee29['top'];{const _0x2e4202=new _0x10aff6(this['view']['element'])['top'];return _0x4dee29['top']-_0x2e4202;}}['_setItemTop'](_0x1f4ed3,_0x49bfcd,_0x38fe31=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x38fe31&&(_0x49bfcd=Math['max'](_0x49bfcd,this['_getMaxAvailableTop'](_0x1f4ed3))),_0x1f4ed3['top']=_0x49bfcd;}['_getMaxAvailableTop'](_0x446418){let _0x44f54=this['_getItemBefore'](_0x446418),_0x2f9115=0x0;for(;_0x44f54;)_0x44f54['updateHeight'](),_0x2f9115+=this['_spaceBetweenItems']+_0x44f54['height'],_0x44f54=this['_getItemBefore'](_0x44f54);return _0x2f9115;}}function G(_0x5ec280,_0x347ce4){return Math['max'](_0x5ec280-_0x347ce4,0x0);}function g(_0xd77906){return null!==_0xd77906&&'object'==typeof _0xd77906&&0x1===_0xd77906['nodeType'];}class e extends _0xb0a350{['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(_0x580d7c){super(_0x580d7c),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x7f3a36(),this['_refreshPositioningDebounced']=_0x5670e0(()=>{_0x580d7c['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x15b88a=this['context']['plugins']['get'](j),_0x372cd4=this['context']['plugins']['get'](z);_0x15b88a['register']('wideSidebar',this),_0x372cd4['container']&&_0x15b88a['switchTo']('wideSidebar');}['setActiveAnnotation'](_0xa6042){if(_0xa6042===this['activeAnnotation'])return;const _0x40de24=this['context']['plugins']['get'](z);_0x40de24['_activeAnnotation']=_0xa6042;const _0x3f3449=this['activeAnnotation'];_0x40de24['refresh']({'blurredAnnotation':_0x3f3449,'activatedAnnotation':_0xa6042}),this['activeAnnotation']=_0xa6042;}['attach'](_0x5ac698){this['annotations']=_0x5ac698;const _0xf47d70=this['context']['plugins']['get'](z);if(_0xf47d70['_annotations']=_0x5ac698,this['isAttached'])throw new _0x18be9b('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xf47d70,'set:container',()=>{this['detach'](),this['listenTo'](_0xf47d70,'change:container',_0x13fb76=>{_0x13fb76['off'](),this['attach'](_0x5ac698);});}),_0xf47d70['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x467def=_0x487c0e=>{_0x487c0e['updateTargetRect'](),_0xf47d70['addAnnotation'](_0x487c0e);};for(const _0x2e32dd of _0x5ac698)_0x467def(_0x2e32dd);this['listenTo'](_0x5ac698,'add',(_0x2cd5d0,_0x29660e)=>{_0x467def(_0x29660e);}),this['listenTo'](_0x5ac698,'remove',(_0x13fc8a,_0x88b90c,_0x244c10)=>{_0xf47d70['rearrange']({'removedAnnotation':_0x88b90c,'previousAnnotation':_0x5ac698['get'](_0x244c10-0x1),'nextAnnotation':_0x5ac698['get'](_0x244c10+0x1)}),_0x88b90c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5ac698,'focus',(_0x29b87b,_0x58ca0a)=>{this['setActiveAnnotation'](_0x58ca0a);}),this['listenTo'](_0x5ac698,'blur',()=>{this['setActiveAnnotation'](null);});const _0x47522d=this['context']instanceof _0x4bb14d?this['context']['editors']:new _0x7f3a36([this['context']]);for(const _0x3220b9 of _0x47522d)this['_integrateWithEditorAnnotations'](_0x3220b9);this['listenTo'](_0x47522d,'add',(_0x108072,_0x43b038)=>{this['listenTo'](_0x43b038,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x43b038);});}),this['listenTo'](_0x47522d,'remove',(_0x6f1538,_0xc96427)=>{_0xc96427['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xc96427['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x18be9b('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xe0e7a=this['context']['plugins']['get'](z);_0xe0e7a['_detachFromContainer'](this['annotations']),this['stopListening'](_0xe0e7a),this['stopListening'](this['annotations']),this['context']instanceof _0x4bb14d&&this['stopListening'](this['context']['editors']);for(const _0x1b5c90 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1b5c90);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x546c7b){if(!_0x546c7b['plugins']['has']('EditorAnnotations'))return;const _0x40c347=_0x546c7b['plugins']['get']('EditorAnnotations'),_0x28c73c=()=>{const _0x5211bd=_0x40c347['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x5211bd[0x0]||null);};this['listenTo'](_0x40c347,'refresh',_0x28c73c),this['listenTo'](_0x40c347,'blur',(_0x37a3e3,{isAnnotationTracked:_0x2da2a2})=>{this['activeAnnotation']&&_0x2da2a2(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x40c347,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5a38c2=>{_0x40c347['hasDomSelection']()&&(_0x28c73c(),_0x5a38c2['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x40c347);}['_destroyEditorAnnotationsIntegration'](_0x10df6d){this['stopListening'](_0x10df6d),this['_editorAnnotations']['remove'](_0x10df6d);}}class C extends _0x3c7ff6{['counterView'];constructor(_0x1ceb16){super(_0x1ceb16);const _0x2f64a0=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xb0266a,_0x21c420)=>_0xb0266a?'...':_0x21c420['toString']()),this['set']('annotationType',''),this['icon']=_0x24c653,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2f64a0['to']('annotationType',_0x357b58=>'ck-annotation-counter__badge--'+_0x357b58),_0x2f64a0['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2f64a0['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xb0a350{['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(_0x317d13){super(_0x317d13),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x58ebdd())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x7f3a36(),this['_refreshPositioningDebounced']=_0x5670e0(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x258cee(this['context']['locale']),this['balloonPanelView']=new _0x767a02(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x563683){this['annotations']=_0x563683;const _0x1a8d28=this['context']['plugins']['get'](z),_0x5af8ce=this['balloonPanelView'];if(_0x1a8d28['_annotations']=_0x563683,this['isAttached'])throw new _0x18be9b('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1a8d28,'set:container',()=>{this['detach'](),this['listenTo'](_0x1a8d28,'change:container',_0x214096=>{_0x214096['off'](),this['attach'](_0x563683);});}),_0x1a8d28['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x15b353=_0x494f1d=>{const _0x3dc88d=new C(this['context']['locale']);_0x1a8d28['addAnnotation'](_0x494f1d,_0x3dc88d),this['_annotationToNarrowView']['set'](_0x494f1d,_0x3dc88d),_0x3dc88d['bind']('isDirty','annotationType','number')['to'](_0x494f1d['view'],'isDirty','type','length'),_0x3dc88d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5af8ce['content']['first']!==_0x494f1d['view']?(this['_showBalloon'](_0x494f1d),_0x494f1d['view']['element']['focus'](),this['setActiveAnnotation'](_0x494f1d)):this['setActiveAnnotation'](null);});};for(const _0x127f2b of _0x563683)_0x15b353(_0x127f2b);this['listenTo'](_0x563683,'add',(_0x41cb58,_0x3c2a70)=>{_0x15b353(_0x3c2a70);}),this['listenTo'](_0x563683,'remove',(_0x3f5005,_0x1e41f3,_0x46d08f)=>{this['_annotationToNarrowView']['get'](_0x1e41f3)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1e41f3),_0x1a8d28['rearrange']({'removedAnnotation':_0x1e41f3,'previousAnnotation':_0x563683['get'](_0x46d08f-0x1),'nextAnnotation':_0x563683['get'](_0x46d08f+0x1)}),_0x1e41f3===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x563683,'focus',(_0x30e70a,_0x19634d)=>{this['setActiveAnnotation'](_0x19634d);}),this['listenTo'](_0x563683,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x296494,_0x2e158b)=>{_0x2e158b['keyCode']===_0x559ab4['esc']&&_0x5af8ce['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5af8ce['content']['first']),this['_hideBalloon'](),_0x2e158b['stopPropagation'](),_0x2e158b['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x17058f,_0x22414b)=>{const _0x57a266=_0x22414b['target'];_0x5af8ce['isVisible']&&_0x5af8ce['element']['contains'](_0x57a266)||_0x1a8d28['view']['element']['contains'](_0x57a266)||_0x17058f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x41e56e=>_0x41e56e['contains'](_0x57a266))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x117c38=this['context']instanceof _0x4bb14d?this['context']['editors']:new _0x7f3a36([this['context']]);for(const _0x2d2f48 of _0x117c38)this['_integrateWithEditorAnnotations'](_0x2d2f48);this['listenTo'](_0x117c38,'add',(_0x26ee85,_0x2b62de)=>{this['listenTo'](_0x2b62de,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2b62de);});}),this['listenTo'](_0x117c38,'remove',(_0x26add3,_0x5969b4)=>{_0x5969b4['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5969b4['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x311701){if(_0x311701===this['activeAnnotation'])return;const _0x105983=this['context']['plugins']['get'](z);if(_0x105983['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x311701,'disableAnimationOnActivatedAnnotation':!0x0}),_0x311701)_0x105983['getSidebarItemView'](_0x311701)?this['_showBalloon'](_0x311701):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x311701;}['detach'](){if(!this['isAttached'])throw new _0x18be9b('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3f3aa3=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3e6c10=>_0x3e6c10['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3f3aa3['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4bb14d&&this['stopListening'](this['context']['editors']);for(const _0x279438 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x279438);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'](_0x36301a){if(!_0x36301a['plugins']['has']('EditorAnnotations'))return;const _0x2b7527=_0x36301a['plugins']['get']('EditorAnnotations'),_0x46daf4=this['context']['plugins']['get'](z),_0x2b2391=this['annotations'],_0x25f571=this['balloonPanelView'],_0x170eb2=()=>{const _0x186939=_0x2b7527['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x186939),this['setActiveAnnotation'](_0x186939[0x0]||null);};this['listenTo'](_0x2b7527,'refresh',_0x170eb2),this['listenTo'](_0x2b7527,'blur',(_0x1a4bde,{isAnnotationTracked:_0x8b2960})=>{this['activeAnnotation']&&_0x8b2960(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2b7527,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2b2391,'blur',_0x55485a=>{_0x2b7527['hasDomSelection']()&&_0x55485a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2099e9,_0x378435)=>{const _0x58207f=_0x378435['target'];_0x25f571['isVisible']&&_0x25f571['element']['contains'](_0x58207f)||_0x46daf4['view']['element']['contains'](_0x58207f)||this['activeAnnotation']&&_0x2b7527['hasDomSelection']()&&(_0x170eb2(),_0x2099e9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2b7527);}['_destroyEditorAnnotationsIntegration'](_0x96f3c0){_0x96f3c0&&(this['stopListening'](_0x96f3c0),this['_editorAnnotations']['remove'](_0x96f3c0));}['_setSelectedAnnotations'](_0x1c5b14){for(const _0x477916 of this['_selectedAnnotations'])_0x1c5b14['includes'](_0x477916)||this['_manuallyClosedAnnotationViews']['delete'](_0x477916['view']);this['_selectedAnnotations']=_0x1c5b14;}['_refreshPositioning'](){const _0x6cb7bb=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x6cb7bb['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x43c874){if(this['_manuallyClosedAnnotationViews']['has'](_0x43c874['view']))return;const _0x460038=this['balloonPanelView']['content']['first'];_0x460038!==_0x43c874['view']?(_0x460038&&this['_detachListeners'](_0x460038),this['_attachListeners'](_0x43c874['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x43c874['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xcfe82d=this['balloonPanelView']['content']['first'],_0x52567d=_0xcfe82d&&this['annotations']['getByView'](_0xcfe82d);if(!_0x52567d||!this['_annotationToNarrowView']['has'](_0x52567d))return;const _0x46c01b=this['_annotationToNarrowView']['get'](_0x52567d)['element'],_0x5bb59b=(function(){const _0x4849d5=_0x767a02['defaultPositions'];return[_0x4849d5['southArrowNorthEast'],_0x4849d5['northArrowSouthEast'],_0x4849d5['southArrowNorth'],_0x4849d5['northArrowSouth'],_0x4849d5['southArrowNorthWest'],_0x4849d5['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x46c01b,'positions':_0x5bb59b});}['_hideBalloon'](){const _0x4e8045=this['balloonPanelView'],_0x2def02=_0x4e8045['content']['first'];_0x2def02&&(this['_detachListeners'](_0x2def02),_0x4e8045['unpin'](),_0x4e8045['content']['clear']());}['_attachListeners'](_0x1d567d){this['listenTo'](_0x1d567d,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1d567d,'Esc',(_0x12812c,_0x536a2a)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1d567d),this['_hideBalloon'](),_0x536a2a();});}['_detachListeners'](_0x5d0969){this['stopListening'](_0x5d0969);}}class c extends _0x81c189{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x25d187,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5af367){super(_0x5af367),_0x5af367['editing']['view']['addObserver'](_0x3890df),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5af367['plugins']['get'](_0x25d187),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xdf84a8=this['editor']['plugins']['get'](j);_0xdf84a8['context']===this['editor']&&(_0xdf84a8['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x301a40,_0x29461c)=>{const _0x16b46e=this['_balloon'];if(this['isAttached']&&_0x16b46e['visibleView']){const _0x1f9082=this['annotations']['getByView'](_0x16b46e['visibleView']);_0x1f9082&&this['_closeAnnotation'](_0x1f9082),_0x29461c();}}));}['afterInit'](){const _0x37bfd9=this['editor']['plugins']['get'](j);_0x37bfd9['context']===this['editor']&&(_0x37bfd9['hasActive']()||_0x37bfd9['switchTo']('inline'));}['setActiveAnnotation'](_0x5d0ea1){_0x5d0ea1!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5d0ea1&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5d0ea1)&&this['_addAnnotationToBalloon'](_0x5d0ea1,!0x0),_0x5d0ea1['isActive']=!0x0),_0x5d0ea1||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5d0ea1);}['attach'](_0x3b686b){this['annotations']=_0x3b686b;const _0x498ff8=this['editor']['plugins']['get'](j),_0xf6cefe=this['_balloon'];if(this['isAttached'])throw new _0x18be9b('inlineannotations-attach-already-attached',this);if(_0x498ff8['context']!==this['editor'])throw new _0x18be9b('inlineannotations-not-allowed-with-context',this);const _0x4815da=this['editor']['plugins']['get'](b);this['listenTo'](_0x4815da,'refresh',()=>{const _0x1268db=_0x4815da['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x57a7ae,_0x5f15f3;!this['_forceRefresh']&&(_0x57a7ae=_0x1268db,_0x5f15f3=this['_selectedAnnotations'],_0x57a7ae['length']===_0x5f15f3['length']&&_0x57a7ae['every'](_0x3277e3=>_0x5f15f3['includes'](_0x3277e3)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1268db),this['setActiveAnnotation'](_0x1268db[0x0]||null));}),this['listenTo'](_0x4815da,'blur',(_0x22d193,{isAnnotationTracked:_0xaff52f})=>{this['activeAnnotation']&&_0xaff52f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x28f588,_0x5c8da7,_0x5a6d11)=>{_0x5a6d11||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3b686b,'remove',(_0x7ed39e,_0xe35bd7)=>{this['_removeAnnotationFromBalloon'](_0xe35bd7),_0xe35bd7===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xf6cefe,'change:visibleView',(_0x3627d5,_0x4c30e8,_0x2f1932,_0xc395b1)=>{_0xc395b1&&this['stopListening'](_0xc395b1);const _0x5619dd=_0x3b686b['getByView'](_0x2f1932);_0x2f1932&&_0x5619dd&&(this['listenTo'](_0x2f1932,'change:height',()=>{_0xf6cefe['updatePosition']();}),this['listenTo'](_0x2f1932,'Esc',()=>{this['_closeAnnotation'](_0x5619dd),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5619dd&&this['setActiveAnnotation'](_0x5619dd));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xf6cefe['visibleView']&&(_0x3b686b['getByView'](_0xf6cefe['visibleView'])&&_0xf6cefe['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 _0x18be9b('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3d471a of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3d471a);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x535bbe){for(const _0x520f32 of this['_selectedAnnotations'])_0x535bbe['includes'](_0x520f32)||this['_manuallyClosed']['delete'](_0x520f32);for(const _0xf846f3 of this['annotations'])_0x535bbe['includes'](_0xf846f3)||this['_removeAnnotationFromBalloon'](_0xf846f3);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2c7867 of _0x535bbe)this['_addAnnotationToBalloon'](_0x2c7867);}this['_selectedAnnotations']=_0x535bbe;}['_addAnnotationToBalloon'](_0xfc1657,_0x165fb2=!0x1){this['_manuallyClosed']['has'](_0xfc1657)||(this['_addedAnnotations']['has'](_0xfc1657)||this['_balloon']['hasView'](_0xfc1657['view'])||(this['_addedAnnotations']['add'](_0xfc1657),this['_balloon']['add']({'stackId':_0xfc1657['view']['id'],'view':_0xfc1657['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xfc1657)}})),_0x165fb2&&this['_balloon']['showStack'](_0xfc1657['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5a8446){const _0x372e83=_0x5a8446['target'],_0x275125=this['editor']['editing']['view'],_0x48d96f=_0x275125['document']['selection']['getFirstRange'](),_0xeab86f=_0x275125['domConverter']['viewRangeToDom'](_0x48d96f);if(_0xeab86f['collapse'](!0x0),_0x372e83){if(_0x372e83 instanceof _0x10aff6)return _0x372e83;let _0x47bbcd=[];for(const _0x1f2b20 of _0x372e83)_0x47bbcd['push'](...F(_0x1f2b20['getClientRects']()));_0x47bbcd=function(_0x45af66){const _0x5daeb5=[];let _0x1ab3a1=_0x45af66[0x0];for(let _0x1ec455=0x1;_0x1ec455<_0x45af66['length'];_0x1ec455++)P(_0x1ab3a1,_0x45af66[_0x1ec455])?_0x1ab3a1['width']+=_0x45af66[_0x1ec455]['width']:(_0x5daeb5['push'](_0x1ab3a1),_0x1ab3a1=_0x45af66[_0x1ec455]);return _0x5daeb5['push'](_0x1ab3a1),_0x5daeb5;}(_0x47bbcd);const _0x3d5073=_0xeab86f['getBoundingClientRect']();return _0x47bbcd['find'](_0xf25afb=>_0xf25afb['top']<=_0x3d5073['top']&&_0xf25afb['bottom']>=_0x3d5073['bottom']&&_0xf25afb['left']<=_0x3d5073['left']&&_0xf25afb['right']>=_0x3d5073['right'])||_0x47bbcd[0x0];}return _0x5a8446['targetRect']||_0xeab86f;}['_removeAnnotationFromBalloon'](_0x3a7ac7){this['_addedAnnotations']['has'](_0x3a7ac7)&&this['_balloon']['hasView'](_0x3a7ac7['view'])&&(this['_addedAnnotations']['delete'](_0x3a7ac7),this['_balloon']['remove'](_0x3a7ac7['view']));}['_closeAnnotation'](_0x1650fa){this['_manuallyClosed']['add'](_0x1650fa),this['_removeAnnotationFromBalloon'](_0x1650fa);}}function F(_0x25e480){return Array['from'](_0x25e480)['map'](DOMRect['fromRect']);}function P(_0x151f09,_0x50333b){return _0x151f09['top']===_0x50333b['top']&&_0x151f09['bottom']===_0x50333b['bottom']&&_0x151f09['right']===_0x50333b['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x51d104,_0x3ce481){super(_0x51d104),this['set']('isEmpty',!_0x3ce481['length']),this['focusTracker']=new _0x5dda15(),this['_annotationViews']=_0x3ce481,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x11de24({'focusables':_0x3ce481,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3ce481,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3ce481,'remove',(_0x11037b,_0x3a13c6)=>{_0x3a13c6['isActive']&&this['focus'](),_0x3ce481['length']||(this['isEmpty']=!0x0);});const _0x24a9a4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x51d104,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3ce481},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x24a9a4['if']('isEmpty','ck-hidden',_0x2eee64=>!_0x2eee64)]},'children':[{'text':N(_0x51d104,'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 _0x392891 of this['_annotationViews'])this['focusTracker']['add'](_0x392891['element']);this['_annotationViews']['on']('change',(_0x21925a,{added:_0xcd12b7,removed:_0x4c86b9})=>{for(const _0x6c2803 of _0xcd12b7)this['focusTracker']['add'](_0x6c2803['element']);for(const _0x445a6d of _0x4c86b9)this['focusTracker']['remove'](_0x445a6d['element']);});}}class p extends _0xb0a350{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x8789d8){super(_0x8789d8),this['archivedThreads']=new _0x7f3a36();}['init'](){const _0x339751=this['context'],_0x404035=_0x339751['plugins']['get'](o),_0x545ed0=_0x339751['plugins']['get'](y);this['listenTo'](_0x404035,'addCommentThread',(_0x2071b9,{threadId:_0x36a232})=>{const _0x559f3c=_0x404035['getCommentThread'](_0x36a232);_0x559f3c['archivedAt']&&this['archivedThreads']['add'](_0x559f3c,this['_calculatePosition'](_0x559f3c['archivedAt'])),this['listenTo'](_0x559f3c,'change:archivedAt',(_0x27233f,_0x4128fc,_0x489522)=>{_0x489522?this['archivedThreads']['has'](_0x559f3c)||this['archivedThreads']['add'](_0x559f3c,this['_calculatePosition'](_0x559f3c['archivedAt'])):this['archivedThreads']['has'](_0x559f3c)&&this['archivedThreads']['remove'](_0x559f3c);});}),this['listenTo'](_0x404035,'removeCommentThread',(_0x2557cf,{threadId:_0x294f2f})=>{const _0x8fb88f=_0x404035['getCommentThread'](_0x294f2f);this['stopListening'](_0x8fb88f),this['archivedThreads']['has'](_0x8fb88f)&&this['archivedThreads']['remove'](_0x8fb88f);},{'priority':'highest'}),this['listenTo'](_0x545ed0['collection'],'focus',(_0xd63a7c,_0x5808c3)=>{_0x5808c3['isVisible']||(_0x5808c3['isActive']=!0x0,_0x545ed0['activate'](_0x5808c3));});}['_calculatePosition'](_0x43dd63){const _0x44a74d=[...this['archivedThreads']]['findIndex'](_0x107efb=>_0x107efb['archivedAt']<_0x43dd63);return _0x44a74d>-0x1?_0x44a74d:this['archivedThreads']['length'];}}class a extends _0x81c189{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x162cfc];}constructor(_0x3f000b){super(_0x3f000b),this['annotationViews']=new _0x1471c3(),this['_pendingThreads']=[];}['init'](){const _0xf0a8f4=this['editor'],_0x452557=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xf0a8f4['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3c7ff6,!0x0)),_0xf0a8f4['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3aeca3=this['_createCommentsArchiveButton'](_0x134a38);return _0x3aeca3['set']({'role':'menuitemcheckbox'}),_0x3aeca3;});const _0x3ba833=_0xf0a8f4['plugins']['get'](p),_0x5a4bb3=_0xf0a8f4['plugins']['get']('Annotations'),_0x364bde=_0xf0a8f4['plugins']['get']('CommentsRepository');_0x3ba833['archivedThreads']['forEach'](_0x5969db=>{this['_handleNewThread'](_0x5969db);}),this['listenTo'](_0x3ba833['archivedThreads'],'add',(_0x3df4d6,_0x1396b6)=>{this['_handleNewThread'](_0x1396b6);}),this['listenTo'](_0x5a4bb3['collection'],'add',(_0x3d252c,_0x37a527)=>{const _0x3b822d=this['_pendingThreads']['find'](_0x1d4739=>{const _0x8b4d4f=_0x364bde['_threadToController']['get'](_0x1d4739);return _0x8b4d4f&&_0x37a527['innerView']===_0x8b4d4f['view'];});if(_0x3b822d){const _0x5845a6=this['_calculatePosition'](_0x3b822d['archivedAt']);this['annotationViews']['add'](_0x37a527['view'],_0x5845a6),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3b822d),0x1);}}),this['listenTo'](_0x3ba833['archivedThreads'],'remove',(_0xad4ffd,_0x50d5e2)=>{const _0x173860=_0xf0a8f4['config']['get']('collaboration.channelId');if(!_0x173860||_0x50d5e2['channelId']===_0x173860){if(this['_pendingThreads']['includes'](_0x50d5e2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x50d5e2),0x1);else{const _0x261463=_0x364bde['_threadToController']['get'](_0x50d5e2),_0x2240cd=_0x5a4bb3['getByInnerView'](_0x261463['view']);this['annotationViews']['remove'](_0x2240cd['view']),this['stopListening'](_0x2240cd['focusableElements']);}}}),this['listenTo'](_0x5a4bb3['collection'],'add',(_0x384553,_0x4f1db0)=>{this['listenTo'](_0x4f1db0,'escape',_0x452557);}),this['listenTo'](_0x5a4bb3['collection'],'remove',(_0x1a277a,_0xbe0007)=>{this['stopListening'](_0xbe0007,'escape',_0x452557);});}['_handleNewThread'](_0x405850){const _0x4485eb=this['editor']['plugins']['get']('CommentsRepository'),_0x1c6540=this['editor']['plugins']['get']('Annotations'),_0x474957=this['editor']['config']['get']('collaboration.channelId');if(!_0x474957||_0x405850['channelId']===_0x474957){const _0x4fb7fa=_0x4485eb['_threadToController']['get'](_0x405850);if(!_0x4fb7fa)return void this['_pendingThreads']['push'](_0x405850);const _0x3381bb=this['_calculatePosition'](_0x405850['archivedAt']),_0x4390a6=_0x1c6540['getByInnerView'](_0x4fb7fa['view']);_0x4390a6['isVisible']&&_0x1c6540['_visibleAnnotations']['remove'](_0x4390a6),this['annotationViews']['add'](_0x4390a6['view'],_0x3381bb);}}['_calculatePosition'](_0x180784){const _0x1d6314=this['editor']['config']['get']('collaboration.channelId'),_0x5ccd68=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x534497=>_0x534497['channelId']===_0x1d6314)['findIndex'](_0x1a4462=>_0x1a4462['archivedAt']<_0x180784);return _0x5ccd68<0x0||_0x5ccd68>this['annotationViews']['length']?this['annotationViews']['length']:_0x5ccd68-0x1;}['_toggleDialog'](){const _0x398d03=this['editor'],_0x4f779f=_0x398d03['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x398d03['locale'],this['annotationViews'])),'commentsArchive'===_0x4f779f['id']?_0x4f779f['hide']():_0x4f779f['show']({'id':'commentsArchive','title':N(_0x398d03['locale'],'COMMENTS_ARCHIVE'),'icon':_0x74dfba,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3c6e89['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x37b4f4,_0x446f4a=!0x1){const _0x5a8fc2=this['editor']['locale'],_0x190ac8=this['editor']['plugins']['get']('Dialog'),_0x4f4513=new _0x37b4f4(_0x5a8fc2);return _0x4f4513['bind']('isEnabled')['to'](this,'isEnabled'),_0x4f4513['bind']('isOn')['to'](_0x190ac8,'id',_0x4520fd=>'commentsArchive'===_0x4520fd),_0x4f4513['set']({'label':N(_0x5a8fc2,'COMMENTS_ARCHIVE'),'icon':_0x74dfba,'isToggleable':!0x0}),_0x446f4a&&(_0x4f4513['tooltip']=!0x0),this['listenTo'](_0x4f4513,'execute',()=>this['_toggleDialog']()),_0x4f4513;}['_hideDialogOnAnnotationEscape']=_0xb97dac=>{const _0x5ec5f1=_0xb97dac['source'];if(!this['annotationViews']['has'](_0x5ec5f1['view']))return;const _0x5dc6e9=this['editor']['plugins']['get']('Dialog');_0x5dc6e9['isOpen']&&'commentsArchive'===_0x5dc6e9['id']&&(_0x5dc6e9['hide'](),_0xb97dac['stop']());};}class gi extends _0x81c189{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};
|