@ckeditor/ckeditor5-comments 48.0.0-alpha.3 → 48.0.0-alpha.5
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/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 +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>kt)());constructor(_0x145104={}){function _0x4e79ea(_0x59137d){return _0x59137d['map'](_0x4e893b=>String['fromCharCode'](_0x4e893b))['join']('');}(_0x145104=Object['assign']({},_0x145104))['plugins']||(_0x145104['plugins']=Ot['defaultPlugins']),super(_0x145104),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4e79ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e79ea([0x76,0x69,0x65,0x77])][_0x4e79ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4e79ea([0x61,0x75,0x74,0x6f]),this[_0x4e79ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4e79ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4e79ea([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4e79ea([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4e79ea([0x6f,0x6b])});}['create'](){const _0x38509c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x38509c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1abd10=>{const _0x5f27ed=this['model']['document']['getRoot'](),_0x24edce=_0x5f27ed&&_0x5f27ed['getChild'](_0x5f27ed['childCount']-0x1);_0x1abd10['setSelection'](_0x24edce,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x860fde=this['editing']['view'],_0x1ee996=_0x860fde['document']['getRoot'](),_0xd6eb30=_0x1ee996['getChild'](0x0);_0x1ee996['childCount']>0x1||!_0xd6eb30||'p'!=_0xd6eb30['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x860fde,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xd6eb30['placeholder']=this['placeholder']),ut({'view':_0x860fde,'element':_0xd6eb30,'keepOnFocus':!0x0}),this['placeholderElement']=_0xd6eb30);}}class Mt extends _0x40361{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x24a21f,_0x51cb55={}){super(_0x24a21f),this['editor']=null,this['_editorConfig']=_0x51cb55,this['set']('value',_0x51cb55['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x24a21f,'Reply...')),this['set']('submitLabel',bt(_0x24a21f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x3e4064(),this['focusTracker']=new _0x5d8869(),this['focusCycler']=new _0x89dbb6({'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',(_0x38b6d1,_0x4fc050)=>{this['cancelButtonView']['fire']('execute'),_0x4fc050();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2aeb95,_0x87a371)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x87a371());}),this['on']('submit',(_0x49e4dc,_0x45c541)=>{_0x45c541['length']>0xfde8?(alert(bt(_0x24a21f,'TOO_LONG_COMMENT_ALERT',[_0x45c541['length'],0xfde8])),_0x49e4dc['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xeff936=this['editor'];this['element']['insertBefore'](_0xeff936['ui']['element'],this['element']['firstChild']),_0xeff936['model']['document']['on']('change',()=>this['value']=_0xeff936['getData']()),_0xeff936['bind']('placeholder')['to'](this),this['focusables']['add'](_0xeff936['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x12345e){-0x1===_0x12345e?(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:_0x216326}=this,_0x11b37e=new _0xaaf754(_0x216326);return _0x11b37e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x11b37e['withText']=!0x0,_0x11b37e['bind']('label')['to'](this,'submitLabel'),_0x11b37e['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x11b37e['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2ff17c,_0xcc24b7)=>!_0xcc24b7&&!!_0x2ff17c['trim']()),_0x11b37e;}['_createCancelButton'](){const {locale:_0x38e86b}=this,_0x36e651=new _0xaaf754(_0x38e86b);return _0x36e651['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x36e651['label']=bt(_0x38e86b,'Cancel'),_0x36e651['withText']=!0x0,_0x36e651['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x36e651;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x42ee91=>{this['focusTracker']['add'](_0x42ee91['element']);}),this['focusables']['on']('change',(_0x39d8e8,_0xff04f2)=>{for(const _0x4a29c7 of Array['from'](_0xff04f2['added'])['reverse']())this['focusTracker']['add'](_0x4a29c7['element']);});}}class Rt extends _0x40361{constructor(_0x4cfd59,_0x477bb7,_0x2d4ac2){super(_0x4cfd59),this['commentInputView']=new Mt(_0x4cfd59,_0x2d4ac2),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x6bde3d,_0x6b0e1b)=>_0x6bde3d||!!_0x6b0e1b),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 _0x2731b9(_0x4cfd59,_0x477bb7),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'](_0x1b4f6b){this['commentInputView']['focus'](_0x1b4f6b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3dc181,_0x355b83)=>{const {submitButtonView:_0x4bc400,cancelButtonView:_0x162591,editor:_0x222b37}=this['commentInputView'];[_0x4bc400['element'],_0x162591['element'],_0x222b37?_0x222b37['editing']['view']['getDomRoot']():null]['filter'](_0x41f4f5=>_0x41f4f5)['some'](_0x412b99=>_0x412b99['contains'](_0x355b83['target']))||(this['focus'](),_0x355b83['preventDefault']());});}}class xt extends _0x40361{constructor(_0x582ddc){super(_0x582ddc);const _0x5d4d92=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5d4d92['to']('count',_0x5828ce=>bt(_0x582ddc,'NUMBER_OF_COMMENTS',_0x5828ce))}]});}}class St extends _0x40361{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x492f7b,_0x163881,_0x3b9504){super(_0x492f7b);const _0x384cb1=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x163881['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x163881,this['_config']=_0x3b9504,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5d8869(),this['keystrokes']=new _0x3e4064(),this['focusCycler']=new _0x89dbb6({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2cefbc=>this['commentViews']['map'](_0x5f0e00=>_0x5f0e00['element'])['includes'](_0x2cefbc['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x492f7b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1e429b=>_0x1e429b-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2ee840 of _0x163881['comments'])this['_handleNewCommentModel'](_0x2ee840);this['_handleInfoComment'](),this['listenTo'](_0x163881['comments'],'add',(_0x47bbe,_0x519c9c)=>{const _0x120687=this['_calculatePosition'](_0x519c9c);this['length']++,this['_handleNewCommentModel'](_0x519c9c,_0x120687),this['refreshVisibleViews']();}),this['listenTo'](_0x163881['comments'],'remove',(_0x29795d,_0x4b4430)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4b4430),this['refreshVisibleViews']();}),this['listenTo'](_0x163881,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x163881,'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',_0x384cb1['if']('length','ck-hidden',_0x1c1ebb=>!_0x1c1ebb)],'aria-label':bt(_0x492f7b,'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'](_0x578a90){-0x1===_0x578a90?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x9a5db6 of this['commentViews'])_0x9a5db6['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x15f057,_0x4ea4e2){const _0x17c1a3=new this['_config']['CommentView'](this['locale'],_0x15f057,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x17c1a3['viewUid']=_0x15f057['id'],_0x17c1a3['delegate']('removeComment')['to'](this),_0x17c1a3['delegate']('updateComment')['to'](this),_0x17c1a3['delegate']('resolveCommentThread')['to'](this),_0x17c1a3['delegate']('editorReady')['to'](this),_0x17c1a3['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x17c1a3,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x17c1a3,_0x4ea4e2);}['_calculatePosition'](_0x4b77a6){const _0xec6afa=this['_model']['_findOptimalIndex'](_0x4b77a6);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x4b77a6['authoredAt']?_0xec6afa-0x1:_0xec6afa:_0xec6afa-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x53c9a9={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x53c9a9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x53c9a9));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3a8229){const _0x10e530=this['commentViews']['remove'](_0x3a8229['id']);this['stopListening'](_0x10e530),_0x10e530['isEditMode']&&this['_updateHasDirtyComment'](),_0x10e530['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x55eac0=>_0x55eac0['isEditMode']);}['_rearrangeCollapse'](){const _0x12a107=function(_0x539155){const _0x440bc7=new _0xb591f1();for(const _0x54ea7f of _0x539155)_0x440bc7['add'](_0x54ea7f);return _0x440bc7;}(this['commentViews']),_0x467a6c=this['_collapsedCommentsView']['count'];for(let _0x454aab=0x1;_0x454aab<=_0x467a6c;_0x454aab++)_0x12a107['remove'](0x1);for(const _0x319a2a of _0x12a107)_0x319a2a['collapse']();_0x467a6c>0x0&&_0x12a107['add'](this['_collapsedCommentsView'],0x1),Pt(_0x4f864a(Array['from'](this['visibleViews']),Array['from'](_0x12a107)),this['visibleViews'],_0x12a107);}['_rearrangeExpand'](){Pt(_0x4f864a(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4aa0c9 of this['visibleViews'])_0x4aa0c9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x13cf05=>{this['focusTracker']['add'](_0x13cf05['element']),this['keystrokes']['listenTo'](_0x13cf05['element']);}),this['commentViews']['on']('change',(_0x1ef9bf,_0x3b8b08)=>{for(const _0x4343de of _0x3b8b08['removed'])this['focusTracker']['remove'](_0x4343de['element']),this['keystrokes']['stopListening'](_0x4343de['element']);for(const _0x3fff16 of Array['from'](_0x3b8b08['added'])['reverse']())this['focusTracker']['add'](_0x3fff16['element']),this['keystrokes']['listenTo'](_0x3fff16['element']);});}}function Pt(_0x2e50e5,_0x5d6954,_0x31314b){let _0x1f250a=0x0;for(const _0x7cf4b0 of _0x2e50e5)switch(_0x7cf4b0){case'insert':_0x5d6954['add'](_0x31314b['get'](_0x1f250a),_0x1f250a),_0x1f250a++;break;case'delete':_0x5d6954['remove'](_0x1f250a);break;case'equal':_0x1f250a++;}}class Lt extends _0x40361{constructor(_0x4a3d5c){super(_0x4a3d5c);const _0x291202=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x291202['to']('contextValue',_0xc167eb=>bt(_0x4a3d5c,'THREAD_CONTEXT_LABEL',_0xc167eb)),'tabindex':-0x1},'children':[{'text':_0x291202['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x40361{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x338873,_0x560ac2){super(_0x338873);const _0x7f40ca=this['bindTemplate'];this['_model']=_0x560ac2,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5d8869(),this['keystrokes']=new _0x3e4064(),this['focusCycler']=new _0x89dbb6({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x39e837=>!!_0x39e837),this['bind']('contextValue')['to'](this['_model'],'context',_0x505e0f=>_0x505e0f&&_0x505e0f['value']?this['_trimContextValue'](_0x505e0f['value']):bt(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',_0x7f40ca['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 _0x389d35=new _0xaaf754(this['locale']);return _0x389d35['label']=bt(this['locale'],'Reopen'),_0x389d35['tooltip']=bt(this['locale'],'Reopen'),_0x389d35['icon']=_0x549237,_0x389d35['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x396f7e=>!_0x396f7e),_0x389d35['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x459b8d,_0x1125b1)=>_0x459b8d&&_0x1125b1),_0x389d35['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x389d35;}['_trimContextValue'](_0x4e0d1b){if(_0x4e0d1b['length']<0x96)return _0x4e0d1b;const _0x40ee07=_0x4e0d1b['lastIndexOf']('\x20',0x93);return _0x4e0d1b['substring'](0x0,_0x40ee07>-0x1?_0x40ee07:0x93)+'...';}['_attachContextActions'](){const _0x383bdf=this['element']['querySelector']('.ck-context'),_0x1bd796=_0x383bdf['querySelector']('.ck-context__value');this['listenTo'](_0x383bdf,'mouseenter',()=>{_0x1bd796['offsetWidth']<_0x1bd796['scrollWidth']&&_0x383bdf['classList']['add']('overlay');}),this['listenTo'](_0x383bdf,'mouseleave',()=>{_0x383bdf['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x51e787 of this['focusables'])this['focusTracker']['add'](_0x51e787['element']),this['keystrokes']['listenTo'](_0x51e787['element']);}['_createContextView'](){const _0x5b271d=new Lt(this['locale']);return _0x5b271d['bind']('contextValue')['to'](this),_0x5b271d;}}class Vt extends _0x40361{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x18ed67,_0xf7f95d,_0x509d6b,_0x187c7e){super(_0x18ed67),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xf7f95d,this['_localUser']=_0x509d6b,this['_config']=_0x187c7e,this['commentThreadHeaderView']=new Dt(_0x18ed67,_0xf7f95d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0xca66aa(_0x18ed67,bt(_0x18ed67,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x18ed67,_0xf7f95d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x187c7e)),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',(_0x2563ed,_0x243186)=>_0x2563ed||!!_0x243186),this['bind']('isUnlinked')['to'](_0xf7f95d,'unlinkedAt',_0x36cc7f=>!!_0x36cc7f),this['bind']('ariaLabel')['to'](this,'length',_0x58d0c1=>{const _0x1eb8b4=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x58d0c1,_0x1eb8b4]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5d8869(),this['keystrokes']=new _0x3e4064(),this['focusCycler']=new _0x89dbb6({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e96bb=>_0x3e96bb['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2ae185(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4a5ccf=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5e56af=_0x4a5ccf['commentInputView'];return _0x4a5ccf['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5e56af,'value',(_0x2c09da,_0x5948a0,_0x2a554a,_0x8f665b,_0x1e9bd0)=>!!_0x1e9bd0||!!_0x8f665b&&_0x2a554a&&!_0x5948a0||_0x2c09da&&_0x2a554a&&!_0x5948a0),_0x5e56af['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x21f793,_0x2c91f4,_0x10001e)=>{let _0x328ed3;return _0x328ed3=_0x10001e&&_0x2c91f4?'Reply\x20to\x20reopen\x20discussion...':_0x21f793?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x328ed3);}),_0x5e56af['bind']('submitLabel')['to'](this,'length',_0x2ed5b9=>bt(this['locale'],_0x2ed5b9?'Reply':'Comment')),_0x5e56af['on']('submit',(_0x1cb11f,_0x2b1139)=>{this['fire']('addComment',_0x2b1139),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5e56af['on']('cancel',()=>{this['focus']();}),_0x5e56af['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5e56af['on']('cancel',_0x28ba3a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x28ba3a['stop']());}),this['on']('change:isActive',(_0x4c4d3c,_0x385e5a,_0x4f43b8)=>{_0x4f43b8||this['length']||_0x5e56af['value']||this['fire']('removeCommentThread');}),_0x4a5ccf;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x2628bf(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4443f3,target:_0x341884,type:_0x5e2ecd,isVisible:_0x97a72f=!0x0}){super(),this['view']=_0x4443f3,this['view']['element']||this['view']['render'](),this['_type']=_0x5e2ecd,this['_target']=_0x341884,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xb591f1([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x8d421c,_0xdc3fea)=>{this['view']['focusTracker']['add'](_0xdc3fea);}),this['focusableElements']['on']('remove',(_0x5e417d,_0x204889)=>{this['view']['focusTracker']['remove'](_0x204889);}),this['set']('isVisible',_0x97a72f);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1fe4f0=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x1fe4f0),_0x1fe4f0;}get['targetRect'](){const _0x803848=this['target'];if(null===_0x803848)return null;if(_0x803848 instanceof _0x511c86)return _0x803848;const _0x432557=_0x803848['filter'](_0x4daa82=>function(_0x10fb74){const _0x367fb9=_0x10fb74['offsetParent'];if(_0x367fb9)return!0x0;const _0x53ebe6=_0x10fb74['getClientRects']()['item'](0x0);return!!_0x53ebe6;}(_0x4daa82));return 0x0===_0x432557['length']?null:_0x511c86['getDomElementRects'](_0x432557[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x512f48){this['view']['isActive']=_0x512f48,this['view']['mainView']['isActive']=_0x512f48;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xf0ae20){if(!(null===_0xf0ae20||_0xf0ae20 instanceof _0x511c86||Array['isArray'](_0xf0ae20)&&_0xf0ae20['every'](_0x482687=>Gt(_0x482687))))throw new _0x495de2('annotation-invalid-target',null,{'target':_0xf0ae20});}['_getNormalizedTarget'](){const _0x2cd5c2='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x2cd5c2)?[_0x2cd5c2]:_0x2cd5c2;}}function Gt(_0x22a7d5){return null!==_0x22a7d5&&'object'==typeof _0x22a7d5&&'nodeType'in _0x22a7d5&&0x1===_0x22a7d5['nodeType'];}class jt extends _0xb591f1{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x68999e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5d8869(),this['_focusTracker']['on']('change:isFocused',(_0x4034e6,_0x25dcf5,_0x4f4fcf)=>{_0x4f4fcf||this['fire']('blur');});for(const _0x413c19 of _0x68999e)this['add'](_0x413c19);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4fb59d){if(this['has'](_0x4fb59d))throw new _0x495de2('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4fb59d['innerView'],_0x4fb59d),this['_viewToAnnotation']['set'](_0x4fb59d['view'],_0x4fb59d);for(const _0x305b38 of _0x4fb59d['focusableElements'])this['_focusTracker']['add'](_0x305b38);this['listenTo'](_0x4fb59d['focusableElements'],'add',(_0x9df4,_0x128704)=>{this['_focusTracker']['add'](_0x128704);}),this['listenTo'](_0x4fb59d['focusableElements'],'remove',(_0x1cc6a8,_0x2ac0ae)=>{this['_focusTracker']['remove'](_0x2ac0ae);}),this['listenTo'](_0x4fb59d['view']['focusTracker'],'change:isFocused',(_0x461044,_0x4c61ba,_0x1a5007)=>{_0x1a5007&&this['fire']('focus',_0x4fb59d);}),_0x4fb59d['updateTargetRect']();const _0x65b999=this['_getOrderInContent'](_0x4fb59d['view']['targetRect']);return super['add'](_0x4fb59d,_0x65b999);}['remove'](_0x48626c){if(!this['has'](_0x48626c))throw new _0x495de2('annotationcollection-not-existing-item',null);this['stopListening'](_0x48626c['view']['focusTracker']),this['stopListening'](_0x48626c['focusableElements']);for(const _0x686739 of _0x48626c['focusableElements'])this['_focusTracker']['remove'](_0x686739);return this['_viewToAnnotation']['delete'](_0x48626c['view']),this['_innerViewToAnnotation']['delete'](_0x48626c['innerView']),super['remove'](_0x48626c);}['getByInnerView'](_0x3131b5){return this['_innerViewToAnnotation']['get'](_0x3131b5);}['getByView'](_0x600680){return this['_viewToAnnotation']['get'](_0x600680);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xfd64e8 of this)_0xfd64e8['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3e39a5=Array['from'](this)['sort']((_0x981461,_0x52e361)=>qt(_0x981461['view']['targetRect'],_0x52e361['view']['targetRect']));for(let _0x225a7e=_0x3e39a5['length']-0x1;_0x225a7e>0x0;_0x225a7e--){const _0x424209=_0x3e39a5[_0x225a7e];_0x225a7e!==this['getIndex'](_0x424209)&&(this['remove'](_0x424209),this['add'](_0x424209));}}['_getOrderInContent'](_0x2ee0d1){let _0x18e63f=0x0;if(!_0x2ee0d1)return this['length'];for(const _0x5efcda of this){const _0x1ff64f=_0x5efcda['view']['targetRect'];if(_0x1ff64f){if(qt(_0x2ee0d1,_0x1ff64f)<0x0)return _0x18e63f;_0x18e63f++;}}return _0x18e63f;}}function Xt({source:_0x2faa27,target:_0x3b6918,filter:_0x2c1fe1}){for(const _0x53d660 of _0x2faa27)_0x2c1fe1(_0x53d660)&&_0x3b6918['add'](_0x53d660);_0x3b6918['listenTo'](_0x2faa27,'add',(_0x2391ff,_0xad920b)=>{_0x2c1fe1(_0xad920b)&&_0x3b6918['add'](_0xad920b);}),_0x3b6918['listenTo'](_0x2faa27,'remove',(_0x11184a,_0x589b70)=>{_0x3b6918['has'](_0x589b70)&&_0x3b6918['remove'](_0x589b70);});}function qt(_0x5b0e31,_0xb41edc){if(null===_0x5b0e31&&null===_0xb41edc)return 0x0;if(null===_0x5b0e31)return-0x1;if(null===_0xb41edc)return 0x1;const _0x290596=_0x5b0e31['top']-_0xb41edc['top'];return 0x0==_0x290596?_0x5b0e31['left']-_0xb41edc['left']:_0x290596;}class $t extends _0x10d0b1{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c7abd){if(super(_0x2c7abd),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2c7abd instanceof _0x39dfe2){const _0x28cbaf=_0x2c7abd['locale'];_0x2c7abd['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x28cbaf,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1121fb){this['collection']['add'](_0x1121fb);}['remove'](_0x4dd652){this['collection']['remove'](_0x4dd652),_0x4dd652['destroy']();}['refreshVisibility'](){for(const _0x2eaab5 of this['collection'])_0x2eaab5['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x170d16){return this['collection']['getByInnerView'](_0x170d16);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x48fa26 of this['collection'])_0x48fa26['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2de2dc){this['fire']('_activateAnnotation',_0x2de2dc);}['createAnnotation'](_0x4f7f99){return new Yt(_0x4f7f99);}['createAnnotationView'](_0x5c66a1,_0x42f51c){return new Kt(_0x5c66a1,_0x42f51c);}['_addActiveAnnotation'](_0x4c69b5){const _0x51d7e8=new Set(this['activeAnnotations']);_0x51d7e8['add'](_0x4c69b5),this['activeAnnotations']=_0x51d7e8;}['_removeActiveAnnotation'](_0x1e54f4){const _0x5b5d40=new Set(this['activeAnnotations']);_0x5b5d40['delete'](_0x1e54f4),this['activeAnnotations']=_0x5b5d40;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3de9bd=this['collection'],_0x2f4584=this['_visibleAnnotations'];function _0x4917e0(_0x3840aa){const _0x246260=_0x3840aa['source'];_0x246260['isVisible']&&!_0x2f4584['has'](_0x246260)?_0x2f4584['add'](_0x246260):!_0x246260['isVisible']&&_0x2f4584['has'](_0x246260)&&_0x2f4584['remove'](_0x246260),_0x246260['view']['focusTracker']['remove'](_0x246260['view']['element']),_0x246260['view']['focusTracker']['add'](_0x246260['view']['element']);}this['listenTo'](_0x3de9bd,'add',(_0x257429,_0x44ef6f)=>{_0x44ef6f['isVisible']&&_0x2f4584['add'](_0x44ef6f),this['listenTo'](_0x44ef6f,'change:isVisible',_0x4917e0);}),this['listenTo'](_0x3de9bd,'remove',(_0x2d6ba7,_0x215152)=>{_0x2f4584['has'](_0x215152)&&_0x2f4584['remove'](_0x215152),this['stopListening'](_0x215152,'change:isVisible',_0x4917e0);});}['_setupEnterAnnotationKeystroke'](){const _0x538ff8=_0x1c5846=>{_0x1c5846['on']('ready',()=>{_0x1c5846['keystrokes']['set'](_0x71ab79,(_0xb5b09d,_0x5a4c2c)=>{const _0x476421=_0x52e0d0(this['activeAnnotations']['values']());_0x476421&&(_0x476421['view']['focus'](),_0x5a4c2c());});});};this['context']instanceof _0x39dfe2?_0x538ff8(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3188fd,_0x38d771)=>{_0x538ff8(_0x38d771);});}['_setupEscapeAnnotationHandling'](){const _0x39a912=_0x2f7dd0=>{const _0x4efc75=_0x2f7dd0['source'],_0x496a5d=[];let _0x2d8953;if(Array['isArray'](_0x4efc75['target'])){_0x2d8953=_0x4efc75['target'][0x0],this['context']instanceof _0x39dfe2?_0x496a5d['push'](this['context']):this['context']['editors']&&_0x496a5d['push'](...this['context']['editors']);for(const _0x3f5616 of _0x496a5d)for(const _0x2ff36c of _0x3f5616['editing']['view']['domRoots']['values']())if(_0x2ff36c['contains'](_0x2d8953))return void _0x3f5616['editing']['view']['focus']();_0x2d8953['focus']();}};this['listenTo'](this['collection'],'add',(_0x396ce1,_0x28d76d)=>{this['listenTo'](_0x28d76d,'escape',_0x39a912,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x22e433,_0x22159e)=>{this['stopListening'](_0x22159e,'escape',_0x39a912);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x10d0b1{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x444982,_0x52a3ef];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2fe6ec){super(_0x2fe6ec),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4b9cfb=this['context']['config'];_0x4b9cfb['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4b9cfb['define']('comments.maxThreadTotalWeight',0x1f4),_0x4b9cfb['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4b9cfb['define']('comments.CommentThreadView',Bt),_0x4b9cfb['define']('comments.CommentView',Ut),_0x4b9cfb['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2929a1=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5b84f1,_0x13c7bc)=>this['_addCommentThread'](_0x13c7bc)),this['on']('submitCommentThread',(_0x2cb59c,_0xb40b94)=>this['_submitCommentThread'](_0xb40b94)),this['on']('resolveCommentThread',(_0x248a9d,_0x544154)=>this['_resolveCommentThread'](_0x544154)),this['on']('resolveCommentThread',(_0x5be0b3,_0x62e75a)=>this['_updateActiveAnnotation'](_0x62e75a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x177971,_0x3ee16e)=>this['_reopenCommentThread'](_0x3ee16e)),this['on']('reopenCommentThread',(_0x2bd463,_0x5723ea)=>this['_updateActiveAnnotation'](_0x5723ea),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x16485f,_0xa1c880)=>this['_removeCommentThread'](_0xa1c880)),this['on']('updateCommentThread',(_0x42177d,_0x22137e)=>this['_updateCommentThread'](_0x22137e)),this['on']('updateCommentThread',(_0x1357fd,_0x489095)=>this['_updateActiveAnnotation'](_0x489095),{'priority':'lowest'}),this['on']('addComment',(_0x3bd3dd,_0x21a19d)=>this['_addComment'](_0x21a19d)),this['on']('updateComment',(_0x34f4cd,_0x53a80)=>this['_updateComment'](_0x53a80)),this['on']('removeComment',(_0x2e851e,_0x5bae11)=>this['_removeComment'](_0x5bae11)),this['on']('addComment',(_0x731386,{threadId:_0x2ce553,isFromAdapter:_0x29b4f1})=>{if(_0x29b4f1)return;const _0x4cedb6=this['getCommentThread'](_0x2ce553),_0x2c0e8d=_0x4cedb6&&this['_threadToController']['get'](_0x4cedb6);_0x2c0e8d&&_0x2c0e8d['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2929a1,'change:activeAnnotations',(_0x5237f5,_0x435e75,_0x591d57)=>{const _0x135de9=Array['from'](_0x591d57)['map'](_0x114213=>this['_viewToController']['get'](_0x114213['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x135de9?_0x135de9['model']:null;});}set['adapter'](_0x3d9483){if(this['_adapter'])throw new _0x495de2('commentsrepository-adapter-already-set');this['_adapter']=_0x3d9483;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2c7adc=zt,threadId:_0x3be693=_0x564643(),comments:_0x20bb31=[],unlinkedAt:_0x5f101c=null,resolvedAt:_0x1ce6a5=null,resolvedBy:_0x78534=null,target:_0x2ea314=null,context:_0x448610=null,attributes:_0x18e6e1={},isResolvable:_0x41c6ae=!0x0,isSubmitted:_0xffc281=!0x1,isFromAdapter:_0x40912d=!0x1}={}){return this['fire'](ii('addCommentThread',_0x2c7adc),{'channelId':_0x2c7adc,'threadId':_0x3be693,'comments':_0x20bb31,'unlinkedAt':_0x5f101c,'resolvedAt':_0x1ce6a5,'resolvedBy':_0x78534,'target':_0x2ea314,'context':_0x448610,'attributes':_0x18e6e1,'isFromAdapter':_0x40912d,'isResolvable':_0x41c6ae,'isSubmitted':_0xffc281}),this['getCommentThread'](_0x3be693);}['openNewCommentThread']({channelId:_0x2e4519=zt,threadId:_0x4840a1=_0x564643(),target:_0x5f59fb,context:_0x4a4ea1=null,isResolvable:_0x5d343c=!0x0}){if(this['_readOnlyChannels']['has'](_0x2e4519)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5f59fb)throw new _0x495de2('commentsrepository-missing-target');const _0x5c5d45=this['addCommentThread']({'channelId':_0x2e4519,'threadId':_0x4840a1,'target':_0x5f59fb,'context':_0x4a4ea1,'isResolvable':_0x5d343c});if(!_0x5c5d45)return null;const _0xf642b7=this['_threadToController']['get'](_0x5c5d45),_0x103a70=_0xf642b7['view']['commentThreadInputView']['commentInputView'],_0x48b1fb=this['context']['plugins']['get']($t),_0x35dffc=_0x48b1fb['getByInnerView'](_0xf642b7['view']);return _0x48b1fb['activate'](_0x35dffc),_0x103a70['once']('editorReady',()=>_0x103a70['focus']()),_0x5c5d45;}['hasCommentThread'](_0x37e3a5){if('string'!=typeof _0x37e3a5)throw new _0x495de2('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x37e3a5);}['updateCommentThread']({channelId:_0x207db2=zt,threadId:_0x118ef4,context:_0x371b9f,unlinkedAt:_0x56bcac,attributes:_0x53aeb0,isFromAdapter:_0x260f6b=!0x1}){return this['fire'](ii('updateCommentThread',_0x207db2),{'channelId':_0x207db2,'threadId':_0x118ef4,'context':_0x371b9f,'unlinkedAt':_0x56bcac,'attributes':_0x53aeb0,'isFromAdapter':_0x260f6b}),this['getCommentThread'](_0x118ef4);}['getCommentThread'](_0x54bf9c){if('string'!=typeof _0x54bf9c)throw new _0x495de2('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x54bf9c);}['fetchCommentThread']({channelId:_0x2022cb,threadId:_0x1b6586}={}){const _0x244161=this['getCommentThread'](_0x1b6586);if(_0x244161)return Promise['resolve'](_0x244161);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x495de2('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2022cb,'threadId':_0x1b6586})['then'](_0x45e404=>this['hasCommentThread'](_0x1b6586)?this['getCommentThread'](_0x1b6586):_0x45e404?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2022cb},_0x45e404)):void 0x0)['catch'](_0x259c75=>{throw console['error'](_0x259c75),new _0x495de2('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4a43e1,skipNotAttached:_0x3dad2f=!0x1,skipEmpty:_0x633044=!0x1,toJSON:_0x27ce14=!0x1}={}){const _0x4b3611=[];for(const _0xb215d5 of this['_threads']['values']())_0x4a43e1&&_0xb215d5['channelId']!==_0x4a43e1||_0x3dad2f&&!_0xb215d5['isAttached']||_0x633044&&0x0===_0xb215d5['length']||_0x4b3611['push'](_0xb215d5);return _0x27ce14?_0x4b3611['map'](_0x39de47=>_0x39de47['toJSON']()):_0x4b3611;}['getAnnotationForCommentThread'](_0x2c95fa){const _0x4d1575=this['_threadToController']['get'](_0x2c95fa);if(!_0x4d1575)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x4d1575['view'])||null;}['getCommentThreadForAnnotation'](_0x486102){const _0x3d831b=this['_viewToController']['get'](_0x486102['innerView']);return _0x3d831b?_0x3d831b['model']:null;}['setActiveCommentThread'](_0x25cc42){const _0x468a67=this['context']['plugins']['get']($t);if(!_0x25cc42)return void(this['activeCommentThread']&&_0x468a67['deactivateAll']());const _0x55f2d9=this['getCommentThread'](_0x25cc42);if(!_0x55f2d9)throw new _0x495de2('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x25cc42});if(!this['_threadToController']['has'](_0x55f2d9))throw new _0x495de2('commentsrepository-active-not-attached',null,{'threadId':_0x25cc42});const _0x10e409=_0x468a67['getByInnerView'](this['_threadToController']['get'](_0x55f2d9)['view']);_0x468a67['activate'](_0x10e409);}['switchReadOnly'](_0x4f43a1,_0x101acc){_0x4f43a1?this['_readOnlyChannels']['add'](_0x101acc):this['_readOnlyChannels']['delete'](_0x101acc),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x508bc8){return this['_readOnlyChannels']['has'](_0x508bc8)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5cb852,_0x510db8){return new It(_0x5cb852,_0x510db8);}['setPermissions'](_0x5ed7e8,_0x3f60d3=zt){this['_permissions']['set'](_0x3f60d3,_0x5ed7e8),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1cca2d=zt){return this['_permissions']['has'](_0x1cca2d)?this['_permissions']['get'](_0x1cca2d):Jt;}['_addCommentThread']({channelId:_0x1fe521,threadId:_0x357c37,comments:_0x2db915,unlinkedAt:_0xae9d9c,resolvedAt:_0x589ef8,resolvedBy:_0x30a13e,target:_0x3778b8,context:_0x6f987,attributes:_0x57712d,isFromAdapter:_0x43b20c,isResolvable:_0x19c5ca,isSubmitted:_0x5c433b}){if('string'!=typeof _0x357c37)throw new _0x495de2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x357c37});if(this['hasCommentThread'](_0x357c37))throw new _0x495de2('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x357c37});const _0x22ebd9=new Zt(this,{'channelId':_0x1fe521,'id':_0x357c37,'context':_0x6f987,'attributes':_0x57712d,'unlinkedAt':_0xae9d9c,'resolvedAt':_0x589ef8,'resolvedBy':_0x30a13e?this['context']['plugins']['get'](_0x52a3ef)['getUser'](_0x30a13e):null,'isResolvable':_0x19c5ca,'isSubmitted':_0x5c433b||_0x43b20c});this['_threads']['set'](_0x357c37,_0x22ebd9);for(const _0x1dc490 of _0x2db915)_0x22ebd9['_add'](this['_createNewComment']({'threadId':_0x357c37,..._0x1dc490}));return _0x3778b8&&_0x22ebd9['attachTo'](_0x3778b8),_0x43b20c||!_0x22ebd9['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1fe521,'threadId':_0x357c37});}['_submitCommentThread']({channelId:_0x2cd844,threadId:_0x11ed0d}){if(!this['hasCommentThread'](_0x11ed0d))throw new _0x495de2('commentsrepository-missing-comment-thread',this);const _0x316c2e=this['getCommentThread'](_0x11ed0d);if(_0x316c2e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x556122,comments:_0x3b27ff,resolvedAt:_0x30fc62,resolvedBy:_0x5085d2,context:_0x35fb53,attributes:_0x5e966a}=_0x316c2e,_0x1f4a83=this['context']['plugins']['get']('PendingActions'),_0x253749=_0x1f4a83['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2cd844,'threadId':_0x556122,'comments':_0x3b27ff['map'](_0x15385c=>_0x15385c['toJSON']()),'resolvedAt':_0x30fc62,'resolvedBy':_0x5085d2?_0x5085d2['id']:_0x5085d2,'context':_0x35fb53,'attributes':_0x5e966a})['then'](({comments:_0x2a11d2})=>{_0x1f4a83['remove'](_0x253749);for(const _0x2f44c9 of _0x2a11d2)this['_updateComment']({'channelId':_0x2cd844,'threadId':_0x11ed0d,'commentId':_0x2f44c9['commentId'],'createdAt':_0x2f44c9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5ac066=>{throw console['error'](_0x5ac066),new _0x495de2('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x503b7c,target:_0x33047c}){const _0x595697=this['getCommentThread'](_0x503b7c);if(!_0x595697)throw new _0x495de2('commentsrepository-attach-missing-comment-thread',this);const _0x4eceae=this['context']['plugins']['get']('PendingActions'),_0x37988c=this['context']['plugins']['get']($t),_0x3fe162=this['_createCommentThreadView'](_0x595697),_0x43f2cb=new It(_0x595697,_0x3fe162);let _0x1f6673=null;_0x3fe162['on']('change:isDirty',(_0x21a14c,_0x47931c,_0x4216ce)=>{_0x4216ce?_0x1f6673=_0x4eceae['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1f6673&&(_0x4eceae['remove'](_0x1f6673),_0x1f6673=null);}),this['_threadToController']['set'](_0x595697,_0x43f2cb),this['_viewToController']['set'](_0x3fe162,_0x43f2cb);const _0x142465=new Kt(this['context']['locale'],_0x3fe162);_0x142465['bind']('length')['to'](_0x3fe162),_0x142465['bind']('isDirty')['to'](_0x3fe162,'isDirty',_0x3fe162,'length',(_0x354387,_0x1d4234)=>_0x354387||!_0x1d4234),_0x142465['bind']('isActive')['to'](_0x3fe162),_0x142465['type']='comment';const _0x8c0af3=new Yt({'view':_0x142465,'target':_0x33047c,'type':'comment','isVisible':!_0x595697['archivedAt']&&!!('function'==typeof _0x33047c?_0x33047c():_0x33047c)});return _0x3fe162['on']('escape',()=>{_0x8c0af3['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3fe162,_0x8c0af3),_0x37988c['add'](_0x8c0af3),_0x8c0af3;}['_bindAnnotationToEditors'](_0x29db74,_0x53797c){this['listenTo'](_0x29db74,'editorReady',(_0x18527b,_0x3bc174)=>{const _0xd0a2d6=_0x3bc174['ui']['view']['body']['bodyCollectionContainer'];_0x53797c['focusableElements']['add'](_0xd0a2d6),this['context']instanceof _0x39dfe2&&this['context']['ui']['focusTracker']['add'](_0xd0a2d6);},{'priority':'highest'}),this['listenTo'](_0x29db74,'editorDestroyed',(_0x38620c,_0x46db8d)=>{const _0xfd5834=_0x46db8d['ui']['view']['body']['bodyCollectionContainer'];_0x53797c['focusableElements']['has'](_0xfd5834)&&_0x53797c['focusableElements']['remove'](_0xfd5834),this['context']instanceof _0x39dfe2&&this['context']['ui']['focusTracker']['remove'](_0xfd5834);});}['_unbindEditors'](_0x4d2bb2){this['stopListening'](_0x4d2bb2,'editorReady'),this['stopListening'](_0x4d2bb2,'editorDestroyed');}['_createCommentThreadView'](_0x4361bb){const _0x535b98=this['context']['plugins']['get'](_0x52a3ef),{config:_0x481453,locale:_0x779c0e}=this['context'],_0x40eba8=_0x36995e(_0x481453['get']('locale'),_0x779c0e);return new(0x0,(_0x481453['get']('comments'))['CommentThreadView'])(_0x779c0e,_0x4361bb,_0x535b98['me'],{'editorConfig':{..._0x481453['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x481453['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x481453['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x481453['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x481453['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x40eba8,'CommentView':_0x481453['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28c045,channelId:_0x4b2255,resolvedAt:_0x3cf81b,resolvedBy:_0x50dd2c,isFromAdapter:_0x2ab1e0}){if(!this['hasCommentThread'](_0x28c045))throw new _0x495de2('commentsrepository-missing-comment-thread',null,{'threadId':_0x28c045});const _0xcca777=this['getCommentThread'](_0x28c045);if(_0xcca777['isResolved'])throw new _0x495de2('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28c045});const _0x26e85a=this['context']['plugins']['get'](_0x52a3ef);if(_0xcca777['resolvedBy']=_0x26e85a['getUser'](_0x50dd2c),_0xcca777['resolvedAt']=_0x3cf81b,_0x2ab1e0||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2f9532=this['context']['plugins']['get']('PendingActions'),_0x25788c=_0x2f9532['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4b2255,'threadId':_0x28c045})['then'](({resolvedAt:_0x14e6bc,resolvedBy:_0x31785f})=>{_0x2f9532['remove'](_0x25788c),_0xcca777['resolvedBy']['id']!==_0x31785f&&(_0xcca777['resolvedBy']=_0x26e85a['getUser'](_0x31785f)),_0xcca777['resolvedAt']=_0x14e6bc;})['catch'](_0x54641a=>{throw console['error'](_0x54641a),new _0x495de2('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x430abd,channelId:_0x26dc8e,isFromAdapter:_0x1a3e43}){if(!this['hasCommentThread'](_0x430abd))throw new _0x495de2('commentsrepository-missing-comment-thread',null,{'threadId':_0x430abd});const _0x4aa03a=this['getCommentThread'](_0x430abd);if(!_0x4aa03a['isResolved'])throw new _0x495de2('commentsrepository-reopen-comment-thread',null,{'threadId':_0x430abd});if(_0x4aa03a['resolvedBy']=null,_0x4aa03a['resolvedAt']=null,_0x1a3e43||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3c0dec=this['context']['plugins']['get']('PendingActions'),_0x303668=_0x3c0dec['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x26dc8e,'threadId':_0x430abd})['then'](()=>_0x3c0dec['remove'](_0x303668))['catch'](_0x2e2079=>{throw console['error'](_0x2e2079),new _0x495de2('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3011d0,isFromAdapter:_0x820cc3}){const _0x15e619=this['getCommentThread'](_0x3011d0);if(!_0x15e619)throw new _0x495de2('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3011d0),this['_threads']['delete'](_0x3011d0),!_0x15e619['isSubmitted']||_0x820cc3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x503e0a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x557a1a}=_0x15e619,_0x3c5256=_0x503e0a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x557a1a,'threadId':_0x3011d0})['then'](()=>_0x503e0a['remove'](_0x3c5256))['catch'](_0x5ef210=>{throw console['error'](_0x5ef210),new _0x495de2('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x352b59,unlinkedAt:_0x2a34b8,context:_0x4e1c29,attributes:_0x190ca8,isFromAdapter:_0x2267fa}){if('string'!=typeof _0x352b59)throw new _0x495de2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x352b59});if(!this['hasCommentThread'](_0x352b59))throw new _0x495de2('commentsrepository-missing-comment-thread',null,{'threadId':_0x352b59});const _0x438053=this['getCommentThread'](_0x352b59);let _0x3568a0=!0x1;if(void 0x0!==_0x4e1c29&&_0x438053['context']!==_0x4e1c29&&(_0x438053['context']=_0x4e1c29,_0x3568a0=!0x0),void 0x0!==_0x2a34b8&&_0x438053['unlinkedAt']!==_0x2a34b8&&(_0x438053['unlinkedAt']=_0x2a34b8,_0x3568a0=!0x0),_0x190ca8&&!_0x21cea6(_0x190ca8,_0x438053['attributes'])&&(_0x438053['attributes']=_0x190ca8,_0x3568a0=!0x0),!_0x3568a0)return Promise['resolve']();if(!_0x438053['isSubmitted']||_0x2267fa||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x53eca6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x558ce8}=_0x438053,_0x31ada3=_0x53eca6['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x558ce8,'threadId':_0x352b59,'context':_0x4e1c29,'unlinkedAt':_0x2a34b8,'attributes':_0x190ca8})['then'](()=>_0x53eca6['remove'](_0x31ada3))['catch'](_0x250087=>{throw console['error'](_0x250087),new _0x495de2('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4fed3a){const _0x2d3374=this['context']['plugins']['get']($t),_0x35e659=this['getCommentThread'](_0x4fed3a);if(_0x35e659['_isAttached']=!0x1,this['_threadToController']['has'](_0x35e659)){const _0x2f3400=this['_threadToController']['get'](_0x35e659),_0x1e8dd=_0x2f3400['view'],_0x53842a=_0x2d3374['getByInnerView'](_0x1e8dd);this['_threadToController']['delete'](_0x35e659),this['_viewToController']['delete'](_0x1e8dd),_0x53842a&&_0x2d3374['remove'](_0x53842a),_0x2f3400['destroy'](),_0x1e8dd['destroy']()['then'](()=>{this['_unbindEditors'](_0x1e8dd);});}}['_updateActiveAnnotation']({threadId:_0x19ea91,resolvedAt:_0x49936e,unlinkedAt:_0x99aa7e}){const _0x5ee0ca=!!_0x49936e,_0x58d95a=this['context']['plugins']['get']($t),_0x2902fc=this['getCommentThread'](_0x19ea91);if(this['_threadToController']['has'](_0x2902fc)){const _0x383036=this['_threadToController']['get'](_0x2902fc)['view'],_0x3bbc58=_0x58d95a['getByInnerView'](_0x383036);_0x3bbc58&&(_0x5ee0ca&&_0x58d95a['_removeActiveAnnotation'](_0x3bbc58),_0x99aa7e?_0x3bbc58['isVisible']=!0x1:_0x3bbc58['refreshVisibility']());}}['_getExternalAuthor'](_0x4eae58){const _0x5980a8=this['context']['plugins']['get'](_0x52a3ef),_0x5dacb4=_0xc59992('external:'+_0x4eae58),_0x3f7e76=_0x5980a8['getUser'](_0x5dacb4);return _0x3f7e76||_0x5980a8['addUser']({'id':_0x5dacb4,'name':_0x4eae58});}['_createNewComment']({threadId:_0x1ca795,commentId:_0x1146a4=_0x564643(),content:_0x19745b,authorId:_0x43e08f,createdAt:_0x29e353,attributes:_0x20372a}){if('string'!=typeof _0x1146a4)throw new _0x495de2('commentsrepository-invalid-commentid');if('string'!=typeof _0x43e08f)throw new _0x495de2('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x19745b||!_0x19745b['trim']())throw new _0x495de2('commentsrepository-invalid-comment-content');const _0x4bc507=this['context']['plugins']['get'](_0x52a3ef)['getUser'](_0x43e08f);if(!_0x4bc507)throw new _0x495de2('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x43e08f});let _0x3b5cf0=null,_0x56adce=_0x29e353;return _0x20372a?.['@external']&&(_0x3b5cf0=this['_getExternalAuthor'](_0x20372a['@external']['authorName']),_0x56adce=new Date(_0x20372a['@external']['createdAt'])),new ti(this,{'threadId':_0x1ca795,'id':_0x1146a4,'author':_0x3b5cf0||_0x4bc507,'creator':_0x4bc507,'content':_0x19745b,'createdAt':_0x29e353,'authoredAt':_0x56adce,'attributes':_0x20372a});}['_addComment'](_0x1642a5){let {threadId:_0x53518d,content:_0x33a271,attributes:_0xa9add5,isFromAdapter:_0x7eeddb}=_0x1642a5;const _0x662311=this['getCommentThread'](_0x1642a5['threadId']);if(!_0x662311)throw new _0x495de2('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1f66c5=this['_createNewComment'](_0x1642a5),{id:_0x4c5ca8}=_0x1f66c5;if(_0x662311['_add'](_0x1f66c5),_0x7eeddb||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x662311['isSubmitted'])return Promise['resolve']();const _0x2cfea8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x59afb1}=_0x662311,_0x1cb662=_0x2cfea8['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xa9add5||(_0xa9add5={}),this['adapter']['addComment']({'channelId':_0x59afb1,'threadId':_0x53518d,'commentId':_0x4c5ca8,'content':_0x33a271,'attributes':_0xa9add5})['then'](_0x5e07a4=>{_0x2cfea8['remove'](_0x1cb662),_0x5e07a4&&this['_updateComment']({'channelId':_0x59afb1,'threadId':_0x53518d,'commentId':_0x4c5ca8,'createdAt':_0x5e07a4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5b1090=>{throw console['error'](_0x5b1090),new _0x495de2('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5cba95,commentId:_0x30ada0,content:_0x4c5b75,createdAt:_0x36e354,attributes:_0x2f8311,isFromAdapter:_0x388405}){if(void 0x0!==_0x4c5b75&&('string'!=typeof _0x4c5b75||!_0x4c5b75['trim']()['length']))throw new _0x495de2('commentsrepository-update-comment-invalid-content');const _0x470906=this['getCommentThread'](_0x5cba95),_0x59a214=_0x470906['getComment'](_0x30ada0);if(!_0x59a214)throw new _0x495de2('commentsrepository-update-missing-comment',this);let _0x48227e=!0x1;if(_0x4c5b75&&_0x4c5b75!==_0x59a214['content']&&(_0x59a214['isEditable']||_0x388405)&&(_0x59a214['content']=_0x4c5b75,_0x48227e=!0x0),_0x36e354&&_0x36e354!==_0x59a214['createdAt']&&(_0x59a214['createdAt']=_0x36e354,_0x59a214['attributes']&&_0x59a214['attributes']['@external']||(_0x59a214['authoredAt']=_0x36e354),_0x48227e=!0x0),_0x2f8311&&!_0x21cea6(_0x2f8311,_0x59a214['attributes'])&&(_0x59a214['attributes']=_0x2f8311,_0x48227e=!0x0),!_0x48227e)return Promise['resolve']();if(_0x470906['fire']('commentUpdated'),_0x388405||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2ce281=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4b12f6}=this['getCommentThread'](_0x59a214['threadId']),_0x5b140c=_0x2ce281['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4b12f6,'threadId':_0x5cba95,'commentId':_0x30ada0,'content':_0x4c5b75,'attributes':_0x2f8311})['then'](()=>_0x2ce281['remove'](_0x5b140c))['catch'](_0xf2e41f=>{throw console['error'](_0xf2e41f),new _0x495de2('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x410603,commentId:_0x23b9af,isFromAdapter:_0x3f4d22}){const _0x155929=this['getCommentThread'](_0x410603),_0x4e11cd=_0x155929['getComment'](_0x23b9af);if(!_0x4e11cd)throw new _0x495de2('commentsrepository-remove-missing-comment',this);if(_0x155929['_remove'](_0x4e11cd),_0x3f4d22||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2762c1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44670a}=_0x155929,_0x420f04=_0x2762c1['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x44670a,'threadId':_0x410603,'commentId':_0x23b9af})['then'](()=>_0x2762c1['remove'](_0x420f04))['catch'](_0x26e8f9=>{throw console['error'](_0x26e8f9),new _0x495de2('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x2628bf(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1ff404,_0x575515){super();const _0x30d603=_0x1ff404['context']['plugins']['get'](_0x52a3ef)['me'],_0x3bf2ae=_0x1ff404['getCommentThread'](_0x575515['threadId']),_0x421e56=0x0===_0x3bf2ae['comments']['length'],_0x5ee030=_0x30d603===_0x575515['author'];this['id']=_0x575515['id'],this['threadId']=_0x575515['threadId'],this['author']=_0x575515['author'],this['creator']=_0x575515['creator'],this['isExternal']=Boolean(_0x575515['attributes']&&_0x575515['attributes']['@external']),this['set']('content',_0x575515['content']),this['createdAt']=_0x575515['createdAt']||new Date(),this['set']('authoredAt',_0x575515['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3bf2ae,'resolvedAt'),this['set']('attributes',_0x575515['attributes']||{}),this['bind']('isEditable')['to'](_0x1ff404,'_permissions',()=>{const _0x5232b0=_0x1ff404['getPermissions'](_0x3bf2ae['channelId'])['write'],_0x190744=_0x1ff404['getPermissions'](_0x3bf2ae['channelId'])['modifyAll'];return _0x5ee030&&_0x5232b0||!_0x5ee030&&_0x190744;}),this['bind']('isRemovable')['to'](_0x3bf2ae,'isRemovable',_0x1ff404,'_permissions',_0x20ca0a=>{const _0x148984=_0x1ff404['getPermissions'](_0x3bf2ae['channelId'])['write'],_0x412494=_0x1ff404['getPermissions'](_0x3bf2ae['channelId'])['modifyAll'];return _0x5ee030&&_0x148984||_0x20ca0a&&_0x421e56||!_0x5ee030&&_0x412494&&!_0x421e56;}),this['bind']('isReadOnly')['to'](_0x3bf2ae,'isReadOnly'),this['_repository']=_0x1ff404;}get['weight'](){return Math['max'](function(_0x327071){const _0xca2362=document['createElement']('div');return _0xca2362['innerHTML']=_0x327071,_0xca2362['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2555eb){const {threadId:_0x3f9a81,id:_0x3e3067}=this;if(!this['_repository']['hasCommentThread'](_0x3f9a81))throw new _0x495de2('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x541acd}=this['_repository']['getCommentThread'](_0x3f9a81);this['_repository']['fire'](ii('updateComment',_0x541acd,_0x3f9a81),{'channelId':_0x541acd,'threadId':_0x3f9a81,'commentId':_0x3e3067,..._0x2555eb});}['setAttribute'](_0x272371,_0x5e7d38){const _0x57c3f1=_0x175e20(this['attributes']);_0x27e629(_0x57c3f1,_0x272371,_0x5e7d38),this['update']({'attributes':_0x57c3f1});}['removeAttribute'](_0x58f8c4){const _0x5ac2bf=_0x175e20(this['attributes']);_0x2ddb6b(_0x5ac2bf,_0x58f8c4),this['update']({'attributes':_0x5ac2bf});}['remove'](_0x58c5d2={}){if(!_0x58c5d2['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3af90b,id:_0x176470}=this;if(!this['_repository']['hasCommentThread'](_0x3af90b))throw new _0x495de2('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2e92a4}=this['_repository']['getCommentThread'](_0x3af90b);this['_repository']['fire'](ii('removeComment',_0x2e92a4,_0x3af90b),{'channelId':_0x2e92a4,'threadId':_0x3af90b,'commentId':_0x176470,..._0x58c5d2});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x148581,..._0x1d0f9b){for(const _0xd4f44b of _0x1d0f9b)void 0x0!==_0xd4f44b&&(_0x148581+=':'+String(_0xd4f44b));return _0x148581;}class ei extends _0x3391ec{constructor(_0x2aa9e4){super(_0x2aa9e4),this['set']('hasContent',!0x1);}['refresh'](){const _0x2ef162=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x8a691f of _0x2ef162['getRanges']())if(this['_hasContent'](_0x8a691f))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x1b2366=_0x564643(),ranges:_0x173612,comment:_0x11a305}={}){const _0x94b853=this['editor']['model'],_0x40f3e2=_0x173612??Array['from'](_0x94b853['document']['selection']['getRanges']()),_0x4889aa=[];for(const _0x5de552 of _0x40f3e2)this['_hasContent'](_0x5de552)&&_0x4889aa['push'](this['_trimToContent'](_0x5de552));if(!_0x4889aa['length'])throw new _0x495de2('addcommentthreadcommand-incorrect-ranges',null);_0x11a305&&this['_createCommentThread'](_0x1b2366,_0x11a305),this['_createMarkersFromRanges'](_0x1b2366,_0x4889aa,!!_0x11a305);}['_createMarkersFromRanges'](_0x200d28,_0x2b6692,_0x517580){this['editor']['model']['change'](_0x5a4bd7=>{for(const _0xc4e688 of _0x2b6692){const _0x415e1c=_0x564643()['substr'](0x1,0x5),_0x45cbc4='comment:'+_0x200d28+':'+_0x415e1c;_0x5a4bd7['addMarker'](_0x45cbc4,{'range':_0xc4e688,'usingOperation':_0x517580,'affectsData':_0x517580});}});}['_createCommentThread'](_0x3b1d1a,_0xfc9304){const _0x3f314a=this['editor']['plugins']['get']('CommentsRepository'),_0x4d172b=this['editor']['config']['get']('collaboration.channelId'),_0x36b340=this['editor']['plugins']['get']('Users')['me'];if(!_0x36b340)throw new _0x495de2('addcommentthreadcommand-user-not-found',null);_0x3f314a['addCommentThread']({'threadId':_0x3b1d1a,'channelId':_0x4d172b,'comments':[{'authorId':_0x36b340['id'],'content':_0xfc9304,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x5f1d64){for(const _0x508efb of _0x5f1d64['getItems']())if(this['_itemIsContent'](_0x508efb))return!0x0;return!0x1;}['_itemIsContent'](_0x59a022){return _0x59a022['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x59a022)&&!_0x59a022['is']('element','tableCell');}['_trimToContent'](_0x4f13a4){const _0x254ecc=_0x4f23f5=>!this['_itemIsContent'](_0x4f23f5['item']),_0xdc0d89=_0x4f13a4['start']['getLastMatchingPosition'](_0x254ecc),_0x53f582=_0x4f13a4['end']['getLastMatchingPosition'](_0x254ecc,{'direction':'backward'});return this['editor']['model']['createRange'](_0xdc0d89,_0x53f582);}}class si extends _0x313055{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44dc97){super(_0x44dc97),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x457933=this['editor'],_0x4f6f25=_0x457933['model']['document']['selection'],_0x156720=_0x5daa54(()=>this['refreshSelectedViews'](),0xa);_0x4f6f25['on']('change:range',(_0x13f2c0,_0x26f497)=>{_0x26f497['directChange']&&(_0x156720['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x457933['editing']['view']['document'],'change:isFocused',(_0x400da3,_0x257737,_0xb8ed27)=>{_0xb8ed27&&_0x156720();}),this['listenTo'](_0x457933['ui']['focusTracker'],'change:isFocused',(_0x111569,_0x8351dc,_0x469540)=>{_0x469540||this['fire']('blur',{'isAnnotationTracked':_0x44efb3=>this['_editorAnnotationsData']['has'](_0x44efb3['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x297f52){if(this['_editorAnnotations']['has'](_0x297f52['view']))return;this['_editorAnnotations']['add'](_0x297f52['view']),this['editor']['ui']['focusTracker']['add'](_0x297f52['view']['element']);const _0x5653e8=this['editor']['plugins']['get']($t);this['listenTo'](_0x5653e8['collection'],'remove',(_0x244155,_0x3fba0b)=>{this['editor']['ui']['focusTracker']['remove'](_0x3fba0b['view']['element']),this['_editorAnnotations']['delete'](_0x3fba0b['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xfe673a){if('function'!=typeof _0xfe673a)throw new _0x495de2('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xfe673a);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xaa10fe,annotations:_0x2278b2}){const _0x129115=[],_0x44a332=this['editor']['model']['document']['selection'],_0x4799c2=Array['from'](_0x44a332['getRanges']());for(const [_0x1b308d,_0x53ff8a]of this['_editorAnnotationsData']){const _0x5e5e54=_0x11f7f9(_0x53ff8a),_0x31b27b=_0x2278b2['getByInnerView'](_0x1b308d);_0x5e5e54&&_0x31b27b&&_0x129115['push']({'annotation':_0x31b27b,'range':_0x5e5e54});}function _0x11f7f9(_0x1ddb86){for(const _0x1e1e27 of _0x1ddb86)for(const _0x117e1c of _0x4799c2)if(_0x1e1e27['containsRange'](_0x117e1c,!_0x44a332['isCollapsed']))return _0x1e1e27;return null;}return _0x129115['sort']((_0x234a4b,_0x4687f1)=>{const _0x2f1126=_0x234a4b['range'],_0x513ba0=_0x4687f1['range'];if(!_0x2f1126['isEqual'](_0x513ba0)){if(_0x2f1126['containsRange'](_0x513ba0,!0x0))return 0x1;if(_0x513ba0['containsRange'](_0x2f1126,!0x0))return-0x1;}return _0x234a4b['annotation']==_0xaa10fe?-0x1:_0x4687f1['annotation']==_0xaa10fe?0x1:0x0;})['map'](_0x1ad3ec=>_0x1ad3ec['annotation']);}get['_editorAnnotationsData'](){const _0x18b008=new Map();for(const _0x26b99c of Array['from'](this['_dataCollectors']))for(const [_0x44606c,_0x55b676]of _0x26b99c())_0x18b008['set'](_0x44606c,_0x55b676);return _0x18b008;}}class ni extends _0x313055{['afterInit'](){const _0x301ff2=this['editor'];if(!_0x301ff2['plugins']['has']('RestrictedEditingModeEditing'))return;_0x301ff2['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x313055{constructor(_0x2c00c9){super(_0x2c00c9),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1a645a=this['editor'],_0x13bc11=_0x1a645a['commands']['get']('importWord'),_0x20098b=_0x1a645a['plugins']['get'](_0x52a3ef);_0x13bc11&&(_0x13bc11['on']('execute',(_0x6f8eb0,[,_0x1dc200])=>{_0x1dc200['collaboration_features']={'comments':!0x0,'user_id':_0x20098b['me']['id']};},{'priority':_0x5d4f03['high']+0xa}),this['listenTo'](_0x13bc11,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x24dbf9,_0x40808b){const {comment_threads:_0x510d97}=_0x40808b;_0x510d97&&_0x510d97['forEach'](({thread_id:_0x390fef,comments:_0x5f2c4a,is_resolved:_0x4c273a})=>{const _0x23d259=new Date(),_0x4255c1=_0x5f2c4a['map'](({author:_0x45fb79,content:_0x3922db,created_at:_0x50bda5})=>({'content':_0x3922db,'authorId':this['editor']['plugins']['get'](_0x52a3ef)['me']['id'],'createdAt':_0x23d259,'attributes':{'@external':{'authorName':_0x45fb79,'createdAt':_0x50bda5?new Date(_0x50bda5):new Date(),'source':'importWord'}}})),_0x5ea4fe=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x5ea4fe,'threadId':_0x390fef,'comments':_0x4255c1,'resolvedAt':_0x4c273a?_0x23d259:null});});}}class ri extends _0x313055{constructor(_0x141c8d){super(_0x141c8d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x45f51d=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x45f51d,'contentInsertion',(_0x513e0a,_0x2c09f1)=>this['_removeMarkersWithoutThreads'](_0x2c09f1['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4c11f0){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4c11f0;const _0x2bb120=this['editor']['plugins']['get']('CommentsRepository');for(const _0x46c7e1 of _0x4c11f0['keys']()){const [_0x31a9cd,_0x1fc695]=_0x46c7e1['split'](':');'comment'!=_0x31a9cd||_0x2bb120['hasCommentThread'](_0x1fc695)||_0x4c11f0['delete'](_0x46c7e1);}return _0x4c11f0;}['_registerMarkerInClipboardPipeline'](){const _0x572ff8=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4fd14a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4fd14a&&_0x572ff8['_registerMarkerToCopy']('comment',_0x4fd14a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2dd149){switch(_0x2dd149){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x5b3208){const _0x19b78c=_0x5b3208['split'](':');return{'group':_0x19b78c[0x0],'id':_0x19b78c[0x1],'part':_0x19b78c[0x2]};}class ai extends _0x313055{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2dc277,_0x30dfce)=>{if(!_0x30dfce['options']['showCommentHighlights'])return null;if(_0x30dfce['options']['ignoreResolvedComments']){const {id:_0x521702}=hi(_0x2dc277['markerName']),_0x29c7e2=this['editor']['plugins']['get'](Qt);if(_0x29c7e2['getCommentThread'](_0x521702)?.['isResolved']&&_0x2dc277['item'])return _0x30dfce['consumable']['consume'](_0x2dc277['item'],'addMarker:'+_0x2dc277['markerName']),_0x30dfce['consumable']['consume'](_0x2dc277['item'],'removeMarker:'+_0x2dc277['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x41b679=>{_0x41b679['on']('addMarker:comment',(_0x4d3fee,_0x2a481b,_0x78efe7)=>{if(!_0x78efe7['options']['showCommentHighlights'])return;const _0x50e789=_0x2a481b['item'];if(!_0x50e789)return;const _0x29c047=_0x78efe7['mapper']['toViewElement'](_0x50e789);this['editor']['model']['schema']['isObject'](_0x50e789)&&_0x29c047&&!_0x29c047['getCustomProperty']('widget')&&_0x29c047['is']('containerElement')&&Ct(_0x29c047,_0x78efe7['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1ab5e5,{writer:_0x1991a6,options:_0x22806b})=>{if(!_0x22806b['showCommentHighlights'])return null;const _0xb90c9=_0x1991a6['createContainerElement']('div'),_0x4c41ba=_0x1991a6['createEmptyElement']('hr');return _0x1991a6['addClass']('ck-horizontal-line',_0xb90c9),_0x1991a6['insert'](_0x1991a6['createPositionAt'](_0xb90c9,0x0),_0x4c41ba),_0xb90c9;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1141f9,{writer:_0x3cef25,options:_0x44fecc})=>{if(!_0x44fecc['showCommentHighlights'])return null;const _0xa7c957=_0x3cef25['createContainerElement']('span'),_0x357cbb=_0x3cef25['createEmptyElement']('img');return _0x3cef25['addClass']('image-inline',_0xa7c957),_0x3cef25['insert'](_0x3cef25['createPositionAt'](_0xa7c957,0x0),_0x357cbb),_0xa7c957;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1b50ea,{writer:_0x56cc95,options:_0x4f9771})=>{if(_0x4f9771['showCommentHighlights'])return _0x56cc95['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x759f53,_0x1d1c8a,_0x8e178b)=>{_0x8e178b['options']['showCommentHighlights']&&_0x759f53['stop']();},{'priority':'high'});}}class ci extends _0x313055{static get['requires'](){return[Qt,si,_0x52a3ef,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x467d20){super(_0x467d20),this['set']('isThreadsLoadingPaused',!0x0),_0x467d20['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5dc138,_0x13aeee,_0x469c95,_0x120638)=>{const _0x48803a=_0x467d20['plugins']['get'](Qt),_0x23a186=_0x469c95?hi(_0x469c95)['id']:null;_0x467d20['model']['change'](()=>{if(_0x23a186){const _0x31924f=this['getAllMarkersForId'](_0x23a186);for(const _0x1677cc of _0x31924f)_0x467d20['editing']['reconvertMarker'](_0x1677cc);}if(_0x120638){const {id:_0xd9f79c}=hi(_0x120638),_0x166c7c=_0x48803a['getCommentThread'](_0xd9f79c);if(_0x166c7c&&_0x166c7c['unlinkedAt'])return;if(_0x166c7c&&!_0x166c7c['isAttached'])return;const _0x539af6=this['getAllMarkersForId'](_0xd9f79c);for(const _0x218bbd of _0x539af6)_0x467d20['editing']['reconvertMarker'](_0x218bbd);}}),_0x23a186&&this['scrollToThreadMarker'](_0x23a186);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x13bc9b=this['editor'],_0x1c09fc=_0x13bc9b['plugins']['get'](Qt),_0x2074c5=_0x13bc9b['config']['get']('collaboration.channelId'),_0xbc314f=_0x1c09fc['getCommentThreads']()['filter'](_0x1ba3ff=>_0x1ba3ff['channelId']!==_0x2074c5);_0x13bc9b['commands']['add']('addCommentThread',new ei(_0x13bc9b)),this['listenTo'](_0x13bc9b,'change:isReadOnly',(_0x1e6633,_0xe2603b,_0x481c7b)=>{_0x1c09fc['switchReadOnly'](_0x481c7b,_0x13bc9b['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1c09fc,di('addCommentThread',_0x2074c5),(_0x238fd3,{threadId:_0x34788f})=>{const _0x49ce58=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x34788f);_0x49ce58?.['unlinkedAt']&&this['_attachArchivedThread'](_0x34788f);}),this['listenTo'](_0x1c09fc,di('removeCommentThread',_0x2074c5),(_0x4ae0de,{threadId:_0x3a10d6})=>{_0x13bc9b['model']['enqueueChange']({'isUndoable':!0x1},_0x273737=>{const _0x5b7624=this['getAllMarkersForId'](_0x3a10d6);for(const _0x4879e8 of _0x5b7624)_0x273737['removeMarker'](_0x4879e8);});}),this['listenTo'](_0x1c09fc,di('resolveCommentThread',_0x2074c5),(_0x8e6924,{threadId:_0xbfd865})=>{(this['_reconvertMarkers'](_0xbfd865),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0xbfd865)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1c09fc,di('reopenCommentThread',_0x2074c5),(_0x21fe06,{threadId:_0x411f8a})=>{this['_reconvertMarkers'](_0x411f8a);},{'priority':'low'}),this['listenTo'](_0x1c09fc,di('addComment',_0x2074c5),(_0x440936,{threadId:_0x12133d,isFromAdapter:_0x25a0c7})=>{const _0x575592=this['getAllMarkersForId'](_0x12133d);if(_0x25a0c7||0x0==_0x575592['length']||!_0x1c09fc['hasCommentThread'](_0x12133d))return;0x1===_0x1c09fc['getCommentThread'](_0x12133d)['length']&&_0x13bc9b['model']['enqueueChange']({'isUndoable':!0x1},_0x3e71f5=>{for(const _0x5ccf98 of _0x575592)_0x3e71f5['updateMarker'](_0x5ccf98,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xbc314f);}['afterInit'](){!async function(_0x21672c){const _0xf9b1af=_0x27e815([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x401f52=0x73460ab3,_0x56f77b=0x73418fa3^_0x401f52,_0x5e689b=window[_0x27e815([0x44,0x61,0x74,0x65])][_0x27e815([0x6e,0x6f,0x77])](),_0x4a9d91=_0x21672c[_0x27e815([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x21f0b8=new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1fd3f1=>{_0x4a9d91[_0x27e815([0x6f,0x6e,0x63,0x65])](_0x27e815([0x72,0x65,0x61,0x64,0x79]),_0x1fd3f1);}),_0x30e245={[_0x27e815([0x6b,0x74,0x79])]:_0x27e815([0x45,0x43]),[_0x27e815([0x75,0x73,0x65])]:_0x27e815([0x73,0x69,0x67]),[_0x27e815([0x63,0x72,0x76])]:_0x27e815([0x50,0x2d,0x32,0x35,0x36]),[_0x27e815([0x78])]:_0x27e815([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]),[_0x27e815([0x79])]:_0x27e815([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]),[_0x27e815([0x61,0x6c,0x67])]:_0x27e815([0x45,0x53,0x32,0x35,0x36])},_0x4a4d2b=_0x4a9d91[_0x27e815([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x27e815([0x67,0x65,0x74])](_0x27e815([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x15ae1f(){let _0x35fd75,_0x487e30=null,_0x1cdd5d=null;try{if(_0x4a4d2b==_0x27e815([0x47,0x50,0x4c]))return _0x27e815([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x35fd75=_0x3ed95f(),!_0x35fd75)return _0x27e815([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x35fd75[_0x27e815([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1cdd5d=_0x23a2f7(_0x35fd75[_0x27e815([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x35fd75[_0x27e815([0x6a,0x74,0x69])])),await _0x5f05de()?_0x5a0834()?_0x5a8140()?_0x27e815([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1ebfde()?(_0x35fd75[_0x27e815([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x27e815([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x487e30=_0x114cc6(_0x27e815([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x58aa09()):_0x27e815([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x27e815([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x27e815([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x27e815([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5a8140(){const _0x4a1a89=[_0x27e815([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x27e815([0x74,0x72,0x69,0x61,0x6c])][_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35fd75[_0x27e815([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5e689b/0x3e8:0xe10*_0x56f77b;return _0x35fd75[_0x27e815([0x65,0x78,0x70])]<_0x4a1a89;}function _0x5a0834(){const _0x4789fe=_0x35fd75[_0x27e815([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4789fe)return!0x1;if(_0x4789fe[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x2a])))return!0x0;if(_0x4789fe[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x43,0x4d,0x54])))return!0x0;if(_0x4789fe[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x81d8eb())return!0x0;if(_0x4789fe[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x52,0x43,0x4d,0x54]))){if(_0x262363())return!0x0;if(_0x1e8c4c()||_0x3a394c())return!0x0;}return!0x1;}function _0x1ebfde(){const _0x14be2c=_0x35fd75[_0x27e815([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x14be2c||0x0==_0x14be2c[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x41307d}=new URL(window[_0x27e815([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x14be2c[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41307d))return!0x0;const _0xf2b436=_0x41307d[_0x27e815([0x73,0x70,0x6c,0x69,0x74])](_0x27e815([0x2e]));return _0x14be2c[_0x27e815([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb32e87=>_0xb32e87[_0x27e815([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e815([0x2a])))[_0x27e815([0x6d,0x61,0x70])](_0xdea7b5=>_0xdea7b5[_0x27e815([0x73,0x70,0x6c,0x69,0x74])](_0x27e815([0x2e])))[_0x27e815([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e4440=>_0x3e4440[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xf2b436[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x27e815([0x6d,0x61,0x70])](_0x17323a=>Array(_0xf2b436[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x17323a[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x27e815([0x66,0x69,0x6c,0x6c])](_0x17323a[0x0]===_0x27e815([0x2a])?_0x27e815([0x2a]):'')[_0x27e815([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x17323a))[_0x27e815([0x73,0x6f,0x6d,0x65])](_0x4abdf1=>_0xf2b436[_0x27e815([0x65,0x76,0x65,0x72,0x79])]((_0x1b89e1,_0x1fe0f0)=>_0x4abdf1[_0x1fe0f0]===_0x1b89e1||_0x4abdf1[_0x1fe0f0]===_0x27e815([0x2a])));}function _0x58aa09(){return _0x487e30&&_0x1cdd5d?new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x443096,_0x4049d5)=>{_0x487e30[_0x27e815([0x74,0x68,0x65,0x6e])](_0x443096,_0x4049d5),_0x1cdd5d[_0x27e815([0x74,0x68,0x65,0x6e])](_0x4f9676=>{_0x4f9676!=_0x27e815([0x56,0x61,0x6c,0x69,0x64])&&_0x443096(_0x4f9676);},_0x4049d5);}):_0x487e30||_0x1cdd5d||_0x27e815([0x56,0x61,0x6c,0x69,0x64]);}}function _0x23a2f7(_0x534ebb,_0xa5f06f){return new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22dccc=>{if(_0x2cbb83())return _0x22dccc(_0x27e815([0x56,0x61,0x6c,0x69,0x64]));_0x2c98e7(),_0x4a9d91[_0x27e815([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x27e815([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20557a=!0x1;const _0x5eea5e=_0x564643();function _0x1e1bc4(_0x1b9ec8){return!!_0x1b9ec8&&(typeof _0x1b9ec8===_0x27e815([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1b9ec8===_0x27e815([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1b9ec8[_0x27e815([0x74,0x68,0x65,0x6e])]===_0x27e815([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1b9ec8[_0x27e815([0x63,0x61,0x74,0x63,0x68])]===_0x27e815([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1cffb2(_0x42fd3b){_0x16ce7b(_0x42fd3b)[_0x27e815([0x74,0x68,0x65,0x6e])](_0x5c43b5=>{if(!_0x5c43b5||_0x5c43b5[_0x27e815([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x27e815([0x6f,0x6b]))return _0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4efef2(_0x41851d(_0x5eea5e+_0xa5f06f))!=_0x5c43b5[_0x27e815([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x27e815([0x56,0x61,0x6c,0x69,0x64]);})[_0x27e815([0x74,0x68,0x65,0x6e])](_0x41bfc8=>(_0x3fe8ac(),_0x41bfc8),()=>{const _0x262eae=_0x3d5276();return null==_0x262eae?(_0x3fe8ac(),_0x27e815([0x56,0x61,0x6c,0x69,0x64])):_0x27e815(_0x5e689b-_0x262eae>(0x574a8eb3^_0x401f52)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x27e815([0x74,0x68,0x65,0x6e])](_0x22dccc)[_0x27e815([0x63,0x61,0x74,0x63,0x68])](()=>{_0x22dccc(_0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1f782c=0x7370e433^_0x401f52;function _0x3fe8ac(){const _0x47f80a=_0x27e815([0x6c,0x6c,0x63,0x74,0x2d])+_0x4efef2(_0x41851d(_0x534ebb)),_0x3f4eab=_0x1c4453(_0x4efef2(window[_0x27e815([0x4d,0x61,0x74,0x68])][_0x27e815([0x63,0x65,0x69,0x6c])](_0x5e689b/_0x1f782c)));window[_0x27e815([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x27e815([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x47f80a,_0x3f4eab);}function _0x3d5276(){const _0x10565c=_0x27e815([0x6c,0x6c,0x63,0x74,0x2d])+_0x4efef2(_0x41851d(_0x534ebb)),_0xdfc4ed=window[_0x27e815([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x27e815([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10565c);return _0xdfc4ed?window[_0x27e815([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c4453(_0xdfc4ed),0x10)*_0x1f782c:null;}function _0x16ce7b(_0x2da9fc){return new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x387636,_0x362649)=>{_0x2da9fc[_0x27e815([0x74,0x68,0x65,0x6e])](_0x387636,_0x362649),window[_0x27e815([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x362649,0x7347de73^_0x401f52);});}}_0x4a9d91[_0x27e815([0x6f,0x6e])](_0x27e815([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x33e413,_0xe98f8b)=>{if(_0xe98f8b[0x0]!=_0x534ebb)return _0x22dccc(_0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xe98f8b[0x1]={..._0xe98f8b[0x1],[_0x27e815([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5eea5e};},{[_0x27e815([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x27e815([0x68,0x69,0x67,0x68])}),_0x4a9d91[_0x27e815([0x6f,0x6e])](_0x27e815([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x126137=>{_0x1e1bc4(_0x126137[_0x27e815([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20557a=!0x0,_0x1cffb2(_0x126137[_0x27e815([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x27e815([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x27e815([0x6c,0x6f,0x77])}),_0x21f0b8[_0x27e815([0x74,0x68,0x65,0x6e])](()=>{_0x20557a||_0x22dccc(_0x27e815([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2cbb83(){return _0x4a9d91[_0x27e815([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x27e815([0x76,0x69,0x65,0x77])][_0x27e815([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x27e815([0x61,0x75,0x74,0x6f]);}function _0x2c98e7(){_0x4a9d91[_0x27e815([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x27e815([0x76,0x69,0x65,0x77])][_0x27e815([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x27e815([0x61,0x75,0x74,0x6f]);}}function _0x114cc6(_0x4452b8){const _0x50fd46=[new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4cddb1=>setTimeout(_0x4cddb1,0x734f347f^_0x401f52)),_0x21f0b8[_0x27e815([0x74,0x68,0x65,0x6e])](()=>new window[(_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d3bbb=>{let _0x5879cd=0x0;_0x4a9d91[_0x27e815([0x6d,0x6f,0x64,0x65,0x6c])][_0x27e815([0x6f,0x6e])](_0x27e815([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x59afbb,_0x5a55f4)=>{_0x5a55f4[0x0][_0x27e815([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5879cd++,_0x5879cd==(0x73460f5b^_0x401f52)&&(_0x5d3bbb(),_0x59afbb[_0x27e815([0x6f,0x66,0x66])]());});}))];return window[_0x27e815([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x27e815([0x72,0x61,0x63,0x65])](_0x50fd46)[_0x27e815([0x74,0x68,0x65,0x6e])](()=>_0x4452b8);}async function _0x392494(){await _0x21f0b8,_0x4a9d91[_0x27e815([0x6d,0x6f,0x64,0x65,0x6c])][_0x27e815([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3590f6,_0x4a9d91[_0x27e815([0x6d,0x6f,0x64,0x65,0x6c])][_0x27e815([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3590f6,_0x4a9d91[_0x27e815([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x27e815([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x81d8eb(){return window[_0x27e815([0x67,0x6c,0x6f,0x62])]&&window[_0x27e815([0x67,0x6c,0x6f,0x62])][_0x27e815([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x262363(){return _0x4da6f2(_0x27e815([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x34c073(_0x27e815([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x27e815([0x73,0x74,0x61,0x74,0x65])]==_0x27e815([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1e8c4c(){return _0x4da6f2(_0x27e815([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 _0x3a394c(){return _0x4da6f2(_0x27e815([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xe176ae(_0x2e2523){const _0x488abd=_0x3208fb();_0x4a9d91[_0x488abd]=_0x27e815([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2e2523,_0x2e2523!=_0x27e815([0x56,0x61,0x6c,0x69,0x64])&&_0x392494();}function _0x3208fb(){const _0x254e23=window[_0x27e815([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x27e815([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x27e815([0x6e,0x6f,0x77])]())[_0x27e815([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x27e815([0x2e]),'');let _0x1f3b32=_0x27e815([0x4b]);for(let _0x1ba945=0x0;_0x1ba945<_0x254e23[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ba945+=0x2){let _0x1e8a29=window[_0x27e815([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x254e23[_0x27e815([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ba945,_0x1ba945+0x2));_0x1e8a29>=_0xf9b1af[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1e8a29-=_0xf9b1af[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1f3b32+=_0xf9b1af[_0x1e8a29];}return _0x1f3b32;}function _0x3ed95f(){const _0x1f79fa=_0x4a4d2b[_0x27e815([0x73,0x70,0x6c,0x69,0x74])](_0x27e815([0x2e]));if(0x3!=_0x1f79fa[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3577bd(_0x1f79fa[0x1]);function _0x3577bd(_0x3a70a){const _0x4b1b2e=_0x56ccfd(_0x3a70a);return _0x4b1b2e&&_0x518bfa()?_0x4b1b2e:null;function _0x518bfa(){const _0x374610=_0x4b1b2e[_0x27e815([0x6a,0x74,0x69])],_0x4b4a6a=window[_0x27e815([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x374610[_0x27e815([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x374610[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x69735c={..._0x4b1b2e,[_0x27e815([0x6a,0x74,0x69])]:_0x374610[_0x27e815([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x374610[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x69735c[_0x27e815([0x76,0x63])],_0x41851d(_0x69735c)==_0x4b4a6a;}}}async function _0x5f05de(){let _0x392838=!0x0;try{const _0x845da1=_0x4a4d2b[_0x27e815([0x73,0x70,0x6c,0x69,0x74])](_0x27e815([0x2e])),[_0x40dff2,_0x485d8b,_0x1199f6]=_0x845da1;return _0x1c5824(_0x40dff2),await _0x5bc5e5(_0x40dff2,_0x485d8b,_0x1199f6),_0x392838;}catch{return!0x1;}function _0x1c5824(_0x598f5a){const _0x4e24f3=_0x56ccfd(_0x598f5a);_0x4e24f3&&_0x4e24f3[_0x27e815([0x61,0x6c,0x67])]==_0x27e815([0x45,0x53,0x32,0x35,0x36])||(_0x392838=!0x1);}async function _0x5bc5e5(_0x3ed332,_0x3ecd63,_0x26c450){const _0x3624dc=window[_0x27e815([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x27e815([0x66,0x72,0x6f,0x6d])](_0x2c355a(_0x26c450),_0x3cbe4c=>_0x3cbe4c[_0x27e815([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xb363d3=new window[(_0x27e815([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x27e815([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3ed332+_0x27e815([0x2e])+_0x3ecd63),_0x9730df=window[_0x27e815([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x27e815([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x9730df)return;const _0x3e81c3=await _0x9730df[_0x27e815([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x27e815([0x6a,0x77,0x6b]),_0x30e245,{[_0x27e815([0x6e,0x61,0x6d,0x65])]:_0x27e815([0x45,0x43,0x44,0x53,0x41]),[_0x27e815([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x27e815([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x27e815([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x9730df[_0x27e815([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x27e815([0x6e,0x61,0x6d,0x65])]:_0x27e815([0x45,0x43,0x44,0x53,0x41]),[_0x27e815([0x68,0x61,0x73,0x68])]:{[_0x27e815([0x6e,0x61,0x6d,0x65])]:_0x27e815([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3e81c3,_0x3624dc,_0xb363d3)||(_0x392838=!0x1);}}function _0x56ccfd(_0xb5223e){return _0xb5223e[_0x27e815([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x27e815([0x65,0x79]))?JSON[_0x27e815([0x70,0x61,0x72,0x73,0x65])](_0x2c355a(_0xb5223e)):null;}function _0x2c355a(_0x5b94fc){return window[_0x27e815([0x61,0x74,0x6f,0x62])](_0x5b94fc[_0x27e815([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x27e815([0x2b]))[_0x27e815([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x27e815([0x2f])));}function _0x41851d(_0x262dc5){let _0x11901f=0x1505;function _0x5ec89b(_0x521250){for(let _0x2fe9f4=0x0;_0x2fe9f4<_0x521250[_0x27e815([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2fe9f4++){const _0x36a864=_0x521250[_0x27e815([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2fe9f4);_0x11901f=(_0x11901f<<0x5)+_0x11901f+_0x36a864,_0x11901f&=_0x11901f;}}function _0x34284b(_0x4d9213){Array[_0x27e815([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4d9213)?_0x4d9213[_0x27e815([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x34284b):_0x4d9213&&typeof _0x4d9213==_0x27e815([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x27e815([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4d9213)[_0x27e815([0x73,0x6f,0x72,0x74])]()[_0x27e815([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1c44ae,_0x22bed2])=>{_0x5ec89b(_0x1c44ae),_0x34284b(_0x22bed2);}):_0x5ec89b(window[_0x27e815([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4d9213));}return _0x34284b(_0x262dc5),_0x11901f>>>0x0;}function _0x4efef2(_0x5aafcf){return _0x5aafcf[_0x27e815([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x27e815([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x27e815([0x30]));}function _0x1c4453(_0x40ea1e){return _0x40ea1e[_0x27e815([0x73,0x70,0x6c,0x69,0x74])]('')[_0x27e815([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x27e815([0x6a,0x6f,0x69,0x6e])]('');}function _0x4da6f2(_0xbf69dd){return _0x4a9d91[_0x27e815([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x27e815([0x68,0x61,0x73])](_0xbf69dd);}function _0x34c073(_0x2344a9){return _0x4a9d91[_0x27e815([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x27e815([0x67,0x65,0x74])](_0x2344a9);}function _0x3590f6(){}function _0x27e815(_0x53095b){return _0x53095b['map'](_0x4176e7=>String['fromCharCode'](_0x4176e7))['join']('');}_0xe176ae(await _0x15ae1f());}(this);}['destroy'](){const _0x389c83=this['editor']['plugins']['get'](Qt),_0x517a7c=this['editor']['config']['get']('collaboration.channelId');for(const _0x3254c6 of _0x389c83['getCommentThreads']({'channelId':_0x517a7c}))_0x389c83['_detachCommentThread'](_0x3254c6['id']),_0x389c83['_threads']['delete'](_0x3254c6['id']);super['destroy']();}['hasMarkerForId'](_0x8922a){return this['getAllMarkersForId'](_0x8922a)['length']>0x0;}['getAllMarkersForId'](_0x40e952){const _0x4226b2=[];for(const _0x4a8d46 of this['editor']['model']['markers'])_0x4a8d46['name']['startsWith']('comment:'+_0x40e952)&&_0x4226b2['push'](_0x4a8d46);return _0x4226b2;}['scrollToThreadMarker'](_0x39fab0){setTimeout(()=>{const _0x21ad17=this['_getTargetForId'](_0x39fab0);if(!_0x21ad17)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x39fab0&&_0x4afd41({'target':_0x21ad17[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x546088){this['editor']['model']['change'](()=>{for(const _0x289cf0 of this['getAllMarkersForId'](_0x546088))this['editor']['editing']['reconvertMarker'](_0x289cf0);});}['_attachArchivedThread'](_0x5ce606){const _0x8d80c1=this['editor']['plugins']['get'](Qt),_0x79b037=this['editor']['plugins']['get'](si),_0x3b002f=_0x8d80c1['getCommentThread'](_0x5ce606);if(!_0x3b002f['isAttached']){const _0x18b4ff=_0x3b002f['attachTo'](()=>this['_getTargetForId'](_0x3b002f['id']));_0x79b037['registerAnnotation'](_0x18b4ff),_0x3b002f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1b0b87=this['editor'],_0x6d1c65=_0x1b0b87['plugins']['get'](_0x52a3ef);_0x1b0b87['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x244639,_0x28c954)=>{const {id:_0x3eb294}=hi(_0x244639['markerName']),_0x369d46=_0x1b0b87['plugins']['get'](Qt)['getCommentThread'](_0x3eb294),_0x492071=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x3eb294;let _0x3d77de;if(_0x369d46&&_0x369d46['isResolved']&&!_0x492071&&_0x244639['item'])return _0x28c954['consumable']['consume'](_0x244639['item'],'addMarker:'+_0x244639['markerName']),_0x28c954['consumable']['consume'](_0x244639['item'],'removeMarker:'+_0x244639['markerName']),null;const _0x2a5053=['ck-comment-marker'];return _0x492071&&_0x2a5053['push']('ck-comment-marker--active'),_0x3d77de=_0x369d46?.['length']?_0x369d46['comments']['first']['author']['id']:_0x6d1c65['me']['id'],{'classes':_0x2a5053,'attributes':{'data-comment':_0x3eb294,'data-author-id':_0x3d77de}};}}),_0x1b0b87['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x122f23,{options:_0x285918})=>{if(_0x285918['showCommentHighlights'])return null;const _0x154f5e=_0x1b0b87['plugins']['get'](Qt),_0x214342=_0x1b0b87['model']['markers']['get'](_0x122f23),{id:_0x405eaf,part:_0x1815b7}=hi(_0x122f23);return _0x214342&&!_0x214342['affectsData']||_0x285918['ignoreResolvedComments']&&_0x154f5e['getCommentThread'](_0x405eaf)?.['isResolved']?null:{'group':'comment','name':_0x1815b7?_0x405eaf+':'+_0x1815b7:_0x405eaf};}}),_0x1b0b87['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5e7043,{writer:_0x5aab2f})=>_0x5aab2f['createElement']('$marker',{'data-name':'comment:'+_0x5e7043['getAttribute']('id')})}),_0x1b0b87['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2c60c7=this['editor'],_0x2d83ba=_0x2c60c7['plugins']['get'](Qt),_0x574113=new Set(),_0x1eecd3=new Set();_0x2c60c7['model']['document']['registerPostFixer'](_0x270707=>{let _0x150196=!0x1;for(const {name:_0x482781,data:_0x1224ea}of _0x2c60c7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x397039,id:_0x55ad7c}=hi(_0x482781);let _0x4b010a=_0x1224ea['newRange'];if('comment'!==_0x397039||!_0x4b010a)continue;const _0x184539='$graveyard'===_0x4b010a['root']['rootName'];_0x184539||(_0x4b010a=li(_0x4b010a,_0x2c60c7['model']),!_0x4b010a||_0x4b010a['isCollapsed']||!_0x1224ea['newRange']||_0x4b010a['isEqual'](_0x1224ea['newRange']))?_0x2c60c7['model']['hasContent'](_0x4b010a)&&!_0x184539?this['isThreadsLoadingPaused']?_0x574113['add'](_0x482781):this['_handleThreadMarker'](_0x482781,_0x55ad7c):(_0x1eecd3['add'](_0x482781),_0x574113['delete'](_0x482781),_0x270707['removeMarker'](_0x482781),_0x150196=!0x0):(_0x270707['updateMarker'](_0x482781,{'range':_0x4b010a}),_0x150196=!0x0);}return _0x150196;}),this['on']('change:isThreadsLoadingPaused',(_0x3430c0,_0x578354,_0x4c285b)=>{if(!_0x4c285b&&_0x574113['size'])for(const _0x247795 of _0x574113){const {id:_0x557dcf}=hi(_0x247795);_0x574113['delete'](_0x247795),_0x2c60c7['model']['markers']['get'](_0x247795)&&this['_handleThreadMarker'](_0x247795,_0x557dcf);}}),this['listenTo'](_0x2c60c7['model']['document'],'change',()=>{for(const {name:_0x1577cb,data:{newRange:_0x1aa329}}of _0x2c60c7['model']['document']['differ']['getChangedMarkers']()){const {group:_0xd09153,id:_0x1e6107}=hi(_0x1577cb);if('comment'!==_0xd09153)continue;const _0x5651ad=_0x2d83ba['getCommentThread'](_0x1e6107),_0x13a399=this['hasMarkerForId'](_0x1e6107);_0x5651ad&&(!_0x5651ad['_hasTargetInContent']&&_0x1aa329&&_0x2c60c7['editing']['view']['once']('render',()=>{const _0x4a5228=_0x2c60c7['plugins']['get']($t),_0x76350=_0x2d83ba['_threadToController']['get'](_0x5651ad)['view'];_0x4a5228['getByInnerView'](_0x76350)['refreshVisibility']();},{'priority':'low'}),_0x5651ad['_hasTargetInContent']=_0x13a399||!!_0x1aa329),_0x1aa329||(_0x1eecd3['add'](_0x1577cb),_0x574113['delete'](_0x1577cb));}for(const _0x4d3e70 of _0x1eecd3){const {id:_0x14406c}=hi(_0x4d3e70),_0x257b07=_0x2d83ba['getCommentThread'](_0x14406c);if(_0x574113['delete'](_0x4d3e70),!_0x257b07)continue;const _0x12be5b=this['hasMarkerForId'](_0x14406c);_0x12be5b||_0x257b07['isSubmitted']?_0x12be5b||_0x257b07['unlinkedAt']||_0x257b07['setUnlinkedAt'](new Date()):_0x257b07['remove']();}_0x1eecd3['clear']();});}['_handleInitialThreads'](_0xe96af4){_0xe96af4['forEach'](_0x1e02b2=>{_0x1e02b2['unlinkedAt']&&this['_attachArchivedThread'](_0x1e02b2['id']);});}['_getTargetForId'](_0x429f07){const _0x31a2c4=this['editor'],_0x59b16b=this['getAllMarkersForId'](_0x429f07);return _0x2182b9(_0x31a2c4['editing'],_0x59b16b);}['_getTextContext'](_0x67fa15){const _0xc9910a=this['getAllMarkersForId'](_0x67fa15);let _0x122143='',_0x6a2bee=!0x1;for(const _0x2f4f85 of _0xc9910a){const _0x483ef8=_0x2f4f85['getRange']();for(const _0x26637e of Array['from'](_0x483ef8['getItems']()))_0x26637e['is']('$textProxy')?(_0x122143&&_0x6a2bee&&(_0x122143+='\x20',_0x6a2bee=!0x1),_0x122143+=_0x26637e['data']):_0x6a2bee=!0x0;_0x6a2bee=!0x0;}return _0x122143['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3eff27,_0x57c0cd){const _0x4286fe=this['editor'],_0x3695fd=_0x4286fe['plugins']['get'](Qt);let _0x3b0ff3=_0x3695fd['getCommentThread'](_0x57c0cd);const _0x453ef1=_0x4286fe['config']['get']('collaboration.channelId'),_0xae0d0e=_0x4286fe['plugins']['get'](si);if(_0x3b0ff3&&(_0x3b0ff3['unlinkedAt']&&_0x3b0ff3['setUnlinkedAt'](null),_0x3b0ff3['isAttached']))return _0x3b0ff3;return!this['getAllMarkersForId'](_0x57c0cd)[0x0]['managedUsingOperations']?_0x4286fe['editing']['view']['once']('render',()=>{if(_0x3695fd['getCommentThread'](_0x57c0cd))return;const _0xe58f08=_0x4286fe['plugins']['get']($t);_0x3b0ff3=_0x3695fd['openNewCommentThread']({'channelId':_0x453ef1,'threadId':_0x57c0cd,'target':()=>this['_getTargetForId'](_0x57c0cd),'context':{'type':'text','value':this['_getTextContext'](_0x57c0cd)}});const _0x30365a=_0x3695fd['_threadToController']['get'](_0x3b0ff3)['view'],_0x2068cc=_0xe58f08['getByInnerView'](_0x30365a);_0x2068cc&&_0xae0d0e['registerAnnotation'](_0x2068cc);},{'priority':'low'}):_0x3695fd['fetchCommentThread']({'channelId':_0x453ef1,'threadId':_0x57c0cd})['then'](_0x2e3e7f=>{if('destroyed'!==_0x4286fe['state']){if(_0x3b0ff3=_0x2e3e7f,_0x3b0ff3&&!_0x3b0ff3['isAttached']){const _0x26d2d2=_0x3b0ff3['attachTo'](()=>this['_getTargetForId'](_0x57c0cd));_0xae0d0e['registerAnnotation'](_0x26d2d2),_0x3b0ff3['isResolved']&&this['_reconvertMarkers'](_0x57c0cd);}else{if(!_0x3b0ff3){const _0x4cd6c7=this['getAllMarkersForId'](_0x57c0cd);_0x4286fe['model']['change'](_0x4c96b7=>{for(const _0x5a5057 of _0x4cd6c7)_0x4c96b7['removeMarker'](_0x5a5057);});}}}}),_0x3b0ff3;}['_handleThreadMarker'](_0x56b6ca,_0x3e1355){const _0x26e53a=this['_attachMarkerToThread'](_0x56b6ca,_0x3e1355);_0x26e53a&&!_0x26e53a['context']&&_0x26e53a['setContext']({'type':'text','value':this['_getTextContext'](_0x3e1355)});}['_initAriaMarkerChangeAnnouncements'](){const _0xaaa3d5=this['editor'];_0x165753(_0xaaa3d5['model'],({left:_0x3efd99,entered:_0x3a4434})=>{for(const _0x8ad580 of _0x3efd99)if(ui(_0x8ad580)){_0xaaa3d5['ui']['ariaLiveAnnouncer']['announce'](bt(_0xaaa3d5['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x8d0f82 of _0x3a4434)if(ui(_0x8d0f82)){_0xaaa3d5['ui']['ariaLiveAnnouncer']['announce'](bt(_0xaaa3d5['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x1f7355(_0x71ab79)));break;}});}}function di(_0x120807,_0x410549){return _0x410549?_0x120807+':'+_0x410549:_0x120807;}function li(_0x58e735,_0x4bb55){const _0x24941f=_0x4bb55['schema'],_0x44e61f=_0x4bb55['createRange'](_0x58e735['start']);for(const _0x4e137e of _0x58e735['getWalker']()){const {type:_0x214277,item:_0x2bcd30,nextPosition:_0x50d6f9}=_0x4e137e;if('text'===_0x214277||_0x24941f['isObject'](_0x2bcd30)){const _0x32cfc4=_0x4bb55['createPositionBefore'](_0x2bcd30);_0x44e61f['isCollapsed']&&(_0x44e61f['start']=_0x32cfc4),_0x44e61f['end']=_0x50d6f9;}}return _0x44e61f;}function ui(_0x2d6800){return'comment'===hi(_0x2d6800['name'])['group'];}class mi extends _0x313055{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0xa0c468=this['editor'],_0x3886bf=_0xa0c468['plugins']['get'](Qt),_0x369ff3=_0xa0c468['plugins']['get'](ci),_0x4a05ef=_0xa0c468['plugins']['get']($t),_0x57f44c=_0xa0c468['plugins']['get'](si);_0xa0c468['ui']['componentFactory']['add']('comment',()=>{const _0x5f0a90=this['_createUIButton'](_0xaaf754);return _0x5f0a90['tooltip']=!0x0,_0x5f0a90;}),_0xa0c468['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x57f44c['addSourceCollector'](()=>{const _0x29c5ff=[];for(const [_0x45d503,_0x5f2f02]of _0x3886bf['_threadToController']){const _0x22b58c=_0x369ff3['getAllMarkersForId'](_0x45d503['id']),_0x1d2a15=_0x22b58c['map'](_0x5aa694=>_0x5aa694['getRange']());_0x22b58c['length']>0x0&&_0x29c5ff['push']([_0x5f2f02['view'],_0x1d2a15]);}return _0x29c5ff;}),this['listenTo'](_0x4a05ef,'change:activeAnnotations',(_0x1374f0,_0x40bc59,_0x26fe93)=>{const _0x8b9b37=Array['from'](_0x26fe93)['map'](_0x492ee3=>_0x492ee3['innerView'])['find'](_0x5c9e59=>_0x3886bf['_viewToController']['has'](_0x5c9e59));if(!_0x8b9b37)return void(_0x369ff3['activeMarker']=null);const _0x5515c8=_0x3886bf['_viewToController']['get'](_0x8b9b37)['model']['id'],_0x1b6246='comment:'+_0x5515c8;_0x5515c8&&_0x369ff3['hasMarkerForId'](_0x5515c8)?_0x369ff3['activeMarker']=_0x1b6246:_0x369ff3['activeMarker']&&(_0x369ff3['activeMarker']=null);}),this['listenTo'](_0x3886bf,'removeCommentThread',(_0x5a6add,{threadId:_0x52a4b2,isFromAdapter:_0xb272e1})=>{!_0xb272e1&&_0xa0c468['ui']['focusTracker']['isFocused']&&_0x369ff3['hasMarkerForId'](_0x52a4b2)&&_0xa0c468['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3886bf,'addComment',(_0x1bbcdd,{threadId:_0x12b16a,isFromAdapter:_0x2624b2})=>{if(_0x2624b2||!_0x369ff3['hasMarkerForId'](_0x12b16a)||!_0x3886bf['hasCommentThread'](_0x12b16a))return;0x1===_0x3886bf['getCommentThread'](_0x12b16a)['length']&&(_0xa0c468['editing']['view']['focus'](),_0x1bbcdd['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x223f54=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xcceed1;for(const _0x5a8b64 in _0x223f54){const _0x145361=_0x5a8b64,_0x4994b5=_0x223f54[_0x145361];if('commentsLicenseKeyValid'==_0x4994b5||'commentsLicenseKeyInvalid'==_0x4994b5||'commentsLicenseKeyExpired'==_0x4994b5||'commentsLicenseKeyDomainLimit'==_0x4994b5||'commentsLicenseKeyNotAllowed'==_0x4994b5||'commentsLicenseKeyEvaluationLimit'==_0x4994b5||'commentsLicenseKeyUsageLimit'==_0x4994b5){delete _0x223f54[_0x145361],_0xcceed1=_0x4994b5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xcceed1&&_0x223f54['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xcceed1&&_0x223f54['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xcceed1&&_0x223f54['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xcceed1&&_0x223f54['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xcceed1&&_0x223f54['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xcceed1&&_0x223f54['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2a21e5){const _0x5deb7a=this['editor'],_0x4d6b9e=new _0x2a21e5(_0x5deb7a['locale']),_0x2f9da4=_0x5deb7a['commands']['get']('addCommentThread');return _0x4d6b9e['set']({'label':bt(_0x5deb7a['locale'],'Comment'),'icon':_0x24ff5b}),_0x4d6b9e['bind']('isEnabled')['to'](_0x2f9da4,'isEnabled',_0x2f9da4,'hasContent',(_0x4467ff,_0x343143)=>_0x4467ff&&_0x343143),this['listenTo'](_0x4d6b9e,'execute',()=>{_0x2f9da4['execute']();}),_0x4d6b9e;}}class fi extends _0x313055{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x1f2c94){super(_0x1f2c94),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xfc673f,_0x1544a1,_0x33562a)=>{_0x33562a?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x141baa,_0x29204e]of this['editor']['commands'])_0x29204e['affectsData']&&'addCommentThread'!==_0x141baa&&_0x29204e['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x442c8e=this['editor']['editing']['view']['document'];this['listenTo'](_0x442c8e,'cut',_0x2ec301=>_0x2ec301['stop'](),{'priority':'highest'}),this['listenTo'](_0x442c8e,'clipboardInput',_0x946b0=>_0x946b0['stop'](),{'priority':'highest'}),this['listenTo'](_0x442c8e,'delete',_0x4cef9b=>_0x4cef9b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x290a8b,_0x415545]of this['editor']['commands'])_0x415545['affectsData']&&'addCommentThread'!==_0x290a8b&&_0x415545['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x10d0b1{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49df68){super(_0x49df68),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1d3111=this['context']['plugins']['get']($t);this['listenTo'](_0x1d3111,'_activateAnnotation',(_0x43cff4,_0x2d9ee1)=>{for(const _0x59779c of this['activeUIs']){const _0x354ca0=this['_uis']['get'](_0x59779c);(0x0,this['uisData']['get'](_0x59779c)['filter'])(_0x2d9ee1)&&_0x354ca0['setActiveAnnotation'](_0x2d9ee1);}}),this['listenTo'](_0x1d3111,'_deactivateAllAnnotations',()=>{for(const _0x555468 of this['activeUIs']){this['_uis']['get'](_0x555468)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1d3111['_visibleAnnotations'],'add',(_0x565d6c,_0x3ce1b2)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3ce1b2);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4d7d2e){return this['activeUIs']['has'](_0x4d7d2e);}['activate'](_0x350879,_0x593be7=this['defaultFilter']){const _0xc08435=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x350879))throw new _0x495de2('annotationsuis-missing-ui',this,{'uiName':_0x350879});this['isActive'](_0x350879)&&this['deactivate'](_0x350879),this['activeUIs']['add'](_0x350879);const _0x1a4546=new jt();Xt({'source':_0xc08435['_visibleAnnotations'],'target':_0x1a4546,'filter':_0x593be7}),this['uisData']['set'](_0x350879,{'collection':_0x1a4546,'filter':_0x593be7});const _0x3e8166=this['_uis']['get'](_0x350879);_0x3e8166['attach'](_0x1a4546),this['listenTo'](_0x3e8166,'change:activeAnnotation',(_0x5799e7,_0x547afe,_0x1f7d7f,_0x33265f)=>{_0x33265f&&_0xc08435['_removeActiveAnnotation'](_0x33265f),_0x1f7d7f&&_0xc08435['_addActiveAnnotation'](_0x1f7d7f);});}['deactivate'](_0x417803){if(this['activeUIs']['delete'](_0x417803),!this['_uis']['has'](_0x417803))throw new _0x495de2('annotationsuis-missing-ui',this,{'uiName':_0x417803});const _0x557124=this['_uis']['get'](_0x417803);_0x557124['detach'](),this['stopListening'](_0x557124),this['uisData']['get'](_0x417803)['collection']['destroy'](),this['uisData']['delete'](_0x417803);}['switchTo'](_0x494cda){if(!this['_uis']['has'](_0x494cda))throw new _0x495de2('annotationsuis-missing-ui',this,{'uiName':_0x494cda});const _0x34e8d3=this['context']['plugins']['get']($t),_0x1c5b1b=Array['from'](_0x34e8d3['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x494cda);const _0x1d470b=this['_uis']['get'](_0x494cda);_0x1d470b['setActiveAnnotation'](_0x1c5b1b),_0x1d470b['_setSelectedAnnotations']&&_0x1c5b1b&&_0x1d470b['_setSelectedAnnotations']([_0x1c5b1b]);}['deactivateAll'](){for(const _0x514edd of this['activeUIs'])this['deactivate'](_0x514edd);}['register'](_0x31fea1,_0x2535d6){if(this['_uis']['has'](_0x31fea1))throw new _0x495de2('annotationsuis-register-already-registered');if('function'!=typeof _0x2535d6['attach']||'function'!=typeof _0x2535d6['detach']||'function'!=typeof _0x2535d6['setActiveAnnotation'])throw new _0x495de2('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x31fea1,_0x2535d6);}['refilterAnnotations'](){const _0x120285=this['context']['plugins']['get']($t)['collection'],_0x49bbbd=new Map(),_0xb56fd9=Array['from'](this['activeUIs']);for(const _0x41e559 of this['activeUIs']){const _0xfe9738=this['uisData']['get'](_0x41e559)['collection'];for(const _0x4db323 of _0xfe9738)_0x49bbbd['set'](_0x4db323,_0x41e559);}for(const _0x3caa30 of _0x120285){const _0x3cca7e=_0x49bbbd['get'](_0x3caa30);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3caa30);const _0x5c7978=_0xb56fd9['find'](_0x41f5dd=>this['uisData']['get'](_0x41f5dd)['filter'](_0x3caa30));_0x3cca7e!==_0x5c7978&&(_0x3cca7e&&this['uisData']['get'](_0x3cca7e)['collection']['remove'](_0x3caa30),_0x5c7978&&this['uisData']['get'](_0x5c7978)['collection']['add'](_0x3caa30));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33d75f){const _0x30d9e4=[];for(const _0x1f030b of this['activeUIs']){(0x0,this['uisData']['get'](_0x1f030b)['filter'])(_0x33d75f)&&_0x30d9e4['push'](_0x1f030b);}if(_0x30d9e4['length']>0x1)throw new _0x495de2('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x30d9e4,'annotationType':_0x33d75f['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x20d3f4('px');class Ai extends _0x40361{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x44c104){super(_0x44c104),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x39d64c,_0x4b19fa)=>_0x39d64c+_0x4b19fa),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5f2408=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5f2408['to']('isAnimationDisabled',_0x118f3b=>_0x118f3b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5f2408['to']('top',_0x177128=>gi(_0x177128))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x10b3ca=this['element']['clientHeight'];_0x10b3ca&&(this['height']=_0x10b3ca);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x10d0b1{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2165da){super(_0x2165da),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 _0x2822e2=this['context']['config']['get']('sidebar.container');_0x2822e2&&this['setContainer'](_0x2822e2);}['setContainer'](_0x2910f6){if(!yi(_0x2910f6))throw new _0x495de2('sidebar-setcontainer-invalid-element');this['container']=_0x2910f6;}['_attachToContainer']({viewClass:_0x44d296='',spaceBetweenItems:_0xffa687=0x19}={}){if(!yi(this['container']))throw new _0x495de2('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x44d296,this['_spaceBetweenItems']=_0xffa687;}['rearrange']({removedAnnotation:_0x22e624,previousAnnotation:_0x417b4f,nextAnnotation:_0xefa545}){const _0x58b713=this['getSidebarItemView'](_0x22e624);this['view']['list']['remove'](_0x58b713),this['_destroySidebarItemView'](_0x22e624),_0x417b4f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x417b4f)),_0xefa545&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xefa545)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x35de77,activatedAnnotation:_0x4dadac,disableAnimationOnActivatedAnnotation:_0x1766c8}){if(this['_activeAnnotation']=_0x4dadac,_0x35de77){_0x35de77['isActive']=!0x1;const _0xd09562=this['getSidebarItemView'](_0x35de77);_0xd09562&&_0x1766c8&&(_0xd09562['isAnimationDisabled']=!0x1);}if(_0x4dadac){const _0x17d4f2=this['getSidebarItemView'](_0x4dadac);_0x17d4f2&&(_0x4dadac['isActive']=!0x0,_0x1766c8&&(_0x17d4f2['isAnimationDisabled']=!0x0,_0x17d4f2['top']+=0x1),this['_alignToTargetRect'](_0x17d4f2));}}['_detachFromContainer'](_0x54a2be){if(this['view']['element']['remove'](),_0x54a2be){for(const _0x4c63b1 of _0x54a2be)this['_destroySidebarItemView'](_0x4c63b1);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xbc0fd3,_0x20511f){_0x20511f||(_0x20511f=_0xbc0fd3['view']);const _0x3a9f86=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3a9f86,_0xbc0fd3),this['_annotationToSidebarItemView']['set'](_0xbc0fd3,_0x3a9f86),_0x3a9f86['content']['add'](_0x20511f),this['listenTo'](_0xbc0fd3['view'],'change:targetRect',(_0x24bd0d,_0x29135a,_0x590415)=>{const _0x347ba3=this['_getTargetTop'](_0xbc0fd3,_0x590415);_0x3a9f86['_targetTop']!=_0x347ba3&&(_0x3a9f86['_targetTop']=_0x347ba3,this['_setItemTop'](_0x3a9f86,_0x347ba3));}),this['listenTo'](_0x3a9f86,'change:top',()=>{this['_recalculate'](_0x3a9f86,'top');}),this['listenTo'](_0x3a9f86,'change:bottom',()=>{this['_recalculate'](_0x3a9f86,'bottom');}),this['_alignToTargetRect'](_0x3a9f86);const _0x126446=this['_getItemBefore'](_0x3a9f86);if(_0x126446)this['_alignAfterItem'](_0x126446,_0x3a9f86)||this['_alignToTargetRect'](_0x3a9f86);else this['_alignToTargetRect'](_0x3a9f86);return this['_updateLastItem'](),this['view']['list']['add'](_0x3a9f86),_0x3a9f86;}['_alignForTopChange'](_0x5df6a0){if(!_0x5df6a0['content']['length'])return;const _0x56c788=this['_getItemBefore'](_0x5df6a0);if(!_0x56c788)return;const _0x592e16=this['_sidebarItemViewToAnnotation']['get'](_0x56c788),_0x4d7e19=this['_activeAnnotation'];_0x4d7e19&&_0x4d7e19===_0x592e16?this['_alignAfterItem'](_0x56c788,_0x5df6a0):this['_alignBeforeItem'](_0x5df6a0,_0x56c788);}['_alignForBottomChange'](_0x27c156){if(!_0x27c156['content']['length'])return;const _0x46ecaf=this['_getItemAfter'](_0x27c156);if(!_0x46ecaf)return;const _0x139021=this['_sidebarItemViewToAnnotation']['get'](_0x46ecaf),_0x304be2=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5fbf0b=this['_activeAnnotation'];_0x5fbf0b&&_0x5fbf0b===_0x139021&&_0x304be2?(this['_alignBeforeItem'](_0x46ecaf,_0x27c156),this['_alignAfterItem'](_0x27c156,_0x46ecaf)):_0x5fbf0b&&_0x5fbf0b===_0x139021?this['_alignBeforeItem'](_0x46ecaf,_0x27c156):this['_alignAfterItem'](_0x27c156,_0x46ecaf);}['_recalculate'](_0x2c7e34,_0x741ba3){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5f2f3a,changedProp:_0x381c38}of this['_recalculateBuffer'])'top'===_0x381c38?this['_alignForTopChange'](_0x5f2f3a):this['_alignForBottomChange'](_0x5f2f3a);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2c7e34,'changedProp':_0x741ba3});}['getSidebarItemView'](_0x22e826){return this['_annotationToSidebarItemView']['get'](_0x22e826);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5954b3){const _0x14a66e=this['getSidebarItemView'](_0x5954b3);this['stopListening'](_0x14a66e),this['stopListening'](_0x5954b3['view']),_0x14a66e['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5954b3),this['_sidebarItemViewToAnnotation']['delete'](_0x14a66e);}['_createSidebarView'](){const _0x525dea=new _i(this['context']['locale']);return _0x525dea['render'](),this['on']('change:_lastItem',(_0x244b84,_0x57b21a,_0xd8b35a,_0x11b92f)=>{_0x11b92f&&_0x525dea['unbind']('minHeight'),_0xd8b35a?_0x525dea['bind']('minHeight')['to'](_0xd8b35a,'bottom'):_0x525dea['minHeight']=null;}),_0x525dea;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x24796c){const _0x1ecd8a=this['_sidebarItemViewToAnnotation']['get'](_0x24796c),_0x530492=_0x1ecd8a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1ecd8a)-0x1);return _0x530492&&this['getSidebarItemView'](_0x530492)||null;}['_getItemAfter'](_0x396af9){const _0x10f8de=this['_sidebarItemViewToAnnotation']['get'](_0x396af9),_0x28c59b=_0x10f8de&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x10f8de)+0x1);return _0x28c59b&&this['getSidebarItemView'](_0x28c59b)||null;}['_alignBeforeItem'](_0x132c35,_0x46f1fd){_0x132c35['updateHeight']();const _0x4a0ced=vi(_0x46f1fd['bottom']+this['_spaceBetweenItems'],_0x132c35['top']);return!!_0x4a0ced&&(this['_setItemTop'](_0x46f1fd,_0x46f1fd['top']-_0x4a0ced),!0x0);}['_alignAfterItem'](_0x56561b,_0x391eb7){_0x56561b['updateHeight']();const _0x528ea5=vi(_0x56561b['bottom']+this['_spaceBetweenItems'],_0x391eb7['top']);return!!_0x528ea5&&(this['_setItemTop'](_0x391eb7,_0x391eb7['top']+_0x528ea5,!0x1),!0x0);}['_alignToTargetRect'](_0x24face){const _0x5d6029=this['_sidebarItemViewToAnnotation']['get'](_0x24face);if(!_0x5d6029||!_0x5d6029['target']||!_0x5d6029['targetRect'])return;const _0x4ce62b=this['_getTargetTop'](_0x5d6029,_0x5d6029['targetRect']);this['_setItemTop'](_0x24face,_0x4ce62b);}['_getTargetTop'](_0x1b6cf3,_0xdecc35){if(null===_0xdecc35)return 0x0;if(_0x1b6cf3['target']instanceof _0x511c86)return _0xdecc35['top'];{const _0x743618=new _0x511c86(this['view']['element'])['top'];return _0xdecc35['top']-_0x743618;}}['_setItemTop'](_0x20ee21,_0xefddf4,_0x486fae=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x486fae&&(_0xefddf4=Math['max'](_0xefddf4,this['_getMaxAvailableTop'](_0x20ee21))),_0x20ee21['top']=_0xefddf4;}['_getMaxAvailableTop'](_0x347f6f){let _0x3a6323=this['_getItemBefore'](_0x347f6f),_0x6de81f=0x0;for(;_0x3a6323;)_0x3a6323['updateHeight'](),_0x6de81f+=this['_spaceBetweenItems']+_0x3a6323['height'],_0x3a6323=this['_getItemBefore'](_0x3a6323);return _0x6de81f;}}function vi(_0x2542fd,_0x202be5){return Math['max'](_0x2542fd-_0x202be5,0x0);}function yi(_0x19fd6a){return null!==_0x19fd6a&&'object'==typeof _0x19fd6a&&0x1===_0x19fd6a['nodeType'];}class Ci extends _0x10d0b1{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e6c47){super(_0x3e6c47),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xb591f1(),this['_refreshPositioningDebounced']=_0x5daa54(()=>{_0x3e6c47['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x27e774=this['context']['plugins']['get'](pi),_0x5c7281=this['context']['plugins']['get'](Ti);_0x27e774['register']('wideSidebar',this),_0x5c7281['container']&&_0x27e774['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x334812){if(_0x334812===this['activeAnnotation'])return;const _0xd2900c=this['context']['plugins']['get'](Ti);_0xd2900c['_activeAnnotation']=_0x334812;const _0x44232b=this['activeAnnotation'];_0xd2900c['refresh']({'blurredAnnotation':_0x44232b,'activatedAnnotation':_0x334812}),this['activeAnnotation']=_0x334812;}['attach'](_0x574cf7){this['annotations']=_0x574cf7;const _0x29584d=this['context']['plugins']['get'](Ti);if(_0x29584d['_annotations']=_0x574cf7,this['isAttached'])throw new _0x495de2('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x29584d,'set:container',()=>{this['detach'](),this['listenTo'](_0x29584d,'change:container',_0x3aea13=>{_0x3aea13['off'](),this['attach'](_0x574cf7);});}),_0x29584d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x17b598=_0x2c340a=>{_0x2c340a['updateTargetRect'](),_0x29584d['addAnnotation'](_0x2c340a);};for(const _0x4d5a7f of _0x574cf7)_0x17b598(_0x4d5a7f);this['listenTo'](_0x574cf7,'add',(_0x1b7193,_0x2052ed)=>{_0x17b598(_0x2052ed);}),this['listenTo'](_0x574cf7,'remove',(_0x53557a,_0x1d8518,_0x196579)=>{_0x29584d['rearrange']({'removedAnnotation':_0x1d8518,'previousAnnotation':_0x574cf7['get'](_0x196579-0x1),'nextAnnotation':_0x574cf7['get'](_0x196579+0x1)}),_0x1d8518===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x574cf7,'focus',(_0x346010,_0x47f1b5)=>{this['setActiveAnnotation'](_0x47f1b5);}),this['listenTo'](_0x574cf7,'blur',()=>{this['setActiveAnnotation'](null);});const _0xeeb1a8=this['context']instanceof _0x1ff8d6?this['context']['editors']:new _0xb591f1([this['context']]);for(const _0xd964e6 of _0xeeb1a8)this['_integrateWithEditorAnnotations'](_0xd964e6);this['listenTo'](_0xeeb1a8,'add',(_0x2d00c9,_0x4dc317)=>{this['listenTo'](_0x4dc317,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4dc317);});}),this['listenTo'](_0xeeb1a8,'remove',(_0x357183,_0x105eb6)=>{_0x105eb6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x105eb6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x495de2('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3bf318=this['context']['plugins']['get'](Ti);_0x3bf318['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3bf318),this['stopListening'](this['annotations']),this['context']instanceof _0x1ff8d6&&this['stopListening'](this['context']['editors']);for(const _0x27bebb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x27bebb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5c92ae){if(!_0x5c92ae['plugins']['has']('EditorAnnotations'))return;const _0x48387b=_0x5c92ae['plugins']['get']('EditorAnnotations'),_0x4c434d=()=>{const _0xb75146=_0x48387b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xb75146[0x0]||null);};this['listenTo'](_0x48387b,'refresh',_0x4c434d),this['listenTo'](_0x48387b,'blur',(_0x591963,{isAnnotationTracked:_0x214a80})=>{this['activeAnnotation']&&_0x214a80(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x48387b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1a338b=>{_0x48387b['hasDomSelection']()&&(_0x4c434d(),_0x1a338b['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x48387b);}['_destroyEditorAnnotationsIntegration'](_0x57043d){this['stopListening'](_0x57043d),this['_editorAnnotations']['remove'](_0x57043d);}}class Ii extends _0xaaf754{['counterView'];constructor(_0x4b11fd){super(_0x4b11fd);const _0x466e70=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x49ddca,_0x3735b2)=>_0x49ddca?'...':_0x3735b2['toString']()),this['set']('annotationType',''),this['icon']=_0x24ff5b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x40361(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x466e70['to']('annotationType',_0x4c463a=>'ck-annotation-counter__badge--'+_0x4c463a),_0x466e70['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x466e70['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x10d0b1{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c1745){super(_0x4c1745),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x215ca8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xb591f1(),this['_refreshPositioningDebounced']=_0x5daa54(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x127954){this['annotations']=_0x127954;const _0x1c57fa=this['context']['plugins']['get'](Ti),_0x58489c=this['balloonPanelView'];if(_0x1c57fa['_annotations']=_0x127954,this['isAttached'])throw new _0x495de2('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1c57fa,'set:container',()=>{this['detach'](),this['listenTo'](_0x1c57fa,'change:container',_0x151ff6=>{_0x151ff6['off'](),this['attach'](_0x127954);});}),_0x1c57fa['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5c7704=_0xb379d0=>{const _0x293b75=new Ii(this['context']['locale']);_0x1c57fa['addAnnotation'](_0xb379d0,_0x293b75),this['_annotationToNarrowView']['set'](_0xb379d0,_0x293b75),_0x293b75['bind']('isDirty','annotationType','number')['to'](_0xb379d0['view'],'isDirty','type','length'),_0x293b75['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x58489c['content']['first']!==_0xb379d0['view']?(this['_showBalloon'](_0xb379d0),_0xb379d0['view']['element']['focus'](),this['setActiveAnnotation'](_0xb379d0)):this['setActiveAnnotation'](null);});};for(const _0x1bbb8e of _0x127954)_0x5c7704(_0x1bbb8e);this['listenTo'](_0x127954,'add',(_0x435ac2,_0x307351)=>{_0x5c7704(_0x307351);}),this['listenTo'](_0x127954,'remove',(_0x45c85b,_0x2fa353,_0x21b9b2)=>{this['_annotationToNarrowView']['get'](_0x2fa353)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2fa353),_0x1c57fa['rearrange']({'removedAnnotation':_0x2fa353,'previousAnnotation':_0x127954['get'](_0x21b9b2-0x1),'nextAnnotation':_0x127954['get'](_0x21b9b2+0x1)}),_0x2fa353===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x127954,'focus',(_0x6d4561,_0x37f608)=>{this['setActiveAnnotation'](_0x37f608);}),this['listenTo'](_0x127954,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3e844e,_0x1867a8)=>{_0x1867a8['keyCode']===_0x12424a['esc']&&_0x58489c['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x58489c['content']['first']),this['_hideBalloon'](),_0x1867a8['stopPropagation'](),_0x1867a8['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x13c2bc,_0x5b42b0)=>{const _0x4a3a0f=_0x5b42b0['target'];_0x58489c['isVisible']&&_0x58489c['element']['contains'](_0x4a3a0f)||_0x1c57fa['view']['element']['contains'](_0x4a3a0f)||_0x13c2bc['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4da467=>_0x4da467['contains'](_0x4a3a0f))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x361d8b=this['context']instanceof _0x1ff8d6?this['context']['editors']:new _0xb591f1([this['context']]);for(const _0x5cdba9 of _0x361d8b)this['_integrateWithEditorAnnotations'](_0x5cdba9);this['listenTo'](_0x361d8b,'add',(_0x41d06c,_0x4cf3ee)=>{this['listenTo'](_0x4cf3ee,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4cf3ee);});}),this['listenTo'](_0x361d8b,'remove',(_0x305ec7,_0x30f5e4)=>{_0x30f5e4['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x30f5e4['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3a53b4){if(_0x3a53b4===this['activeAnnotation'])return;const _0x48f962=this['context']['plugins']['get'](Ti);if(_0x48f962['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3a53b4,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3a53b4)_0x48f962['getSidebarItemView'](_0x3a53b4)?this['_showBalloon'](_0x3a53b4):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3a53b4;}['detach'](){if(!this['isAttached'])throw new _0x495de2('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5bf24b=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1875b2=>_0x1875b2['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5bf24b['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1ff8d6&&this['stopListening'](this['context']['editors']);for(const _0x4b924b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4b924b);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'](_0x3f652b){if(!_0x3f652b['plugins']['has']('EditorAnnotations'))return;const _0x3836ca=_0x3f652b['plugins']['get']('EditorAnnotations'),_0x3913d5=this['context']['plugins']['get'](Ti),_0x310a89=this['annotations'],_0x1e2ac0=this['balloonPanelView'],_0x354d28=()=>{const _0xff5180=_0x3836ca['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xff5180),this['setActiveAnnotation'](_0xff5180[0x0]||null);};this['listenTo'](_0x3836ca,'refresh',_0x354d28),this['listenTo'](_0x3836ca,'blur',(_0x676f0a,{isAnnotationTracked:_0x187394})=>{this['activeAnnotation']&&_0x187394(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3836ca,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x310a89,'blur',_0x4e78f3=>{_0x3836ca['hasDomSelection']()&&_0x4e78f3['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2244c3,_0x129229)=>{const _0x3145ac=_0x129229['target'];_0x1e2ac0['isVisible']&&_0x1e2ac0['element']['contains'](_0x3145ac)||_0x3913d5['view']['element']['contains'](_0x3145ac)||this['activeAnnotation']&&_0x3836ca['hasDomSelection']()&&(_0x354d28(),_0x2244c3['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3836ca);}['_destroyEditorAnnotationsIntegration'](_0x1beb0c){_0x1beb0c&&(this['stopListening'](_0x1beb0c),this['_editorAnnotations']['remove'](_0x1beb0c));}['_setSelectedAnnotations'](_0x270122){for(const _0x169b60 of this['_selectedAnnotations'])_0x270122['includes'](_0x169b60)||this['_manuallyClosedAnnotationViews']['delete'](_0x169b60['view']);this['_selectedAnnotations']=_0x270122;}['_refreshPositioning'](){const _0x2dfda0=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x2dfda0['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2382c0){if(this['_manuallyClosedAnnotationViews']['has'](_0x2382c0['view']))return;const _0x3da67e=this['balloonPanelView']['content']['first'];_0x3da67e!==_0x2382c0['view']?(_0x3da67e&&this['_detachListeners'](_0x3da67e),this['_attachListeners'](_0x2382c0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2382c0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xe1326d=this['balloonPanelView']['content']['first'],_0x5e9678=_0xe1326d&&this['annotations']['getByView'](_0xe1326d);if(!_0x5e9678||!this['_annotationToNarrowView']['has'](_0x5e9678))return;const _0x17ee25=this['_annotationToNarrowView']['get'](_0x5e9678)['element'],_0x2d0d44=(function(){const _0x54e868=ht['defaultPositions'];return[_0x54e868['southArrowNorthEast'],_0x54e868['northArrowSouthEast'],_0x54e868['southArrowNorth'],_0x54e868['northArrowSouth'],_0x54e868['southArrowNorthWest'],_0x54e868['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x17ee25,'positions':_0x2d0d44});}['_hideBalloon'](){const _0x44d56d=this['balloonPanelView'],_0x2d9a9a=_0x44d56d['content']['first'];_0x2d9a9a&&(this['_detachListeners'](_0x2d9a9a),_0x44d56d['unpin'](),_0x44d56d['content']['clear']());}['_attachListeners'](_0x84bd33){this['listenTo'](_0x84bd33,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x84bd33,'Esc',(_0x227209,_0x32ada2)=>{this['_manuallyClosedAnnotationViews']['add'](_0x84bd33),this['_hideBalloon'](),_0x32ada2();});}['_detachListeners'](_0x86d410){this['stopListening'](_0x86d410);}}class Ei extends _0x313055{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53786e){super(_0x53786e),_0x53786e['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x53786e['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5daa54(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x3de93e=this['editor']['plugins']['get'](pi);_0x3de93e['context']===this['editor']&&(_0x3de93e['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3a6356,_0x2886e8)=>{const _0x305906=this['_balloon'];if(this['isAttached']&&_0x305906['visibleView']){const _0x418a3e=this['annotations']['getByView'](_0x305906['visibleView']);_0x418a3e&&this['_closeAnnotation'](_0x418a3e),_0x2886e8();}}));}['afterInit'](){const _0x3db037=this['editor']['plugins']['get'](pi);_0x3db037['context']===this['editor']&&(_0x3db037['hasActive']()||_0x3db037['switchTo']('inline'));}['setActiveAnnotation'](_0x18d4a9){_0x18d4a9!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x18d4a9&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x18d4a9)&&this['_addAnnotationToBalloon'](_0x18d4a9,!0x0),_0x18d4a9['isActive']=!0x0),_0x18d4a9||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x18d4a9);}['attach'](_0x4cd872){this['annotations']=_0x4cd872;const _0x382101=this['editor']['plugins']['get'](pi),_0x5b4048=this['_balloon'];if(this['isAttached'])throw new _0x495de2('inlineannotations-attach-already-attached',this);if(_0x382101['context']!==this['editor'])throw new _0x495de2('inlineannotations-not-allowed-with-context',this);const _0x1a665d=this['editor']['plugins']['get'](si);this['listenTo'](_0x1a665d,'refresh',()=>{const _0x418d0e=_0x1a665d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x58ce72,_0x4be05e;!this['_forceRefresh']&&(_0x58ce72=_0x418d0e,_0x4be05e=this['_selectedAnnotations'],_0x58ce72['length']===_0x4be05e['length']&&_0x58ce72['every'](_0x2d030b=>_0x4be05e['includes'](_0x2d030b)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x418d0e),this['setActiveAnnotation'](_0x418d0e[0x0]||null));}),this['listenTo'](_0x1a665d,'blur',(_0x2ec340,{isAnnotationTracked:_0x1a11f6})=>{this['activeAnnotation']&&_0x1a11f6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1a665d,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x477e07,_0x52f969,_0x813d34)=>{_0x813d34||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4cd872,'remove',(_0x57a019,_0x580690)=>{this['_removeAnnotationFromBalloon'](_0x580690),_0x580690===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5b4048,'change:visibleView',(_0x3e14f6,_0xf73ca7,_0xf2918,_0x44b599)=>{_0x44b599&&this['stopListening'](_0x44b599);const _0x257d41=_0x4cd872['getByView'](_0xf2918);_0xf2918&&_0x257d41&&(this['listenTo'](_0xf2918,'change:height',()=>{_0x5b4048['updatePosition']();}),this['listenTo'](_0xf2918,'Esc',()=>{this['_closeAnnotation'](_0x257d41),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x257d41&&this['setActiveAnnotation'](_0x257d41));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5b4048['visibleView']&&(_0x4cd872['getByView'](_0x5b4048['visibleView'])&&_0x5b4048['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 _0x495de2('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2f76d2 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2f76d2);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x392ec3){for(const _0x4dff9e of this['_selectedAnnotations'])_0x392ec3['includes'](_0x4dff9e)||this['_manuallyClosed']['delete'](_0x4dff9e);for(const _0x2bccb4 of this['annotations'])_0x392ec3['includes'](_0x2bccb4)||this['_removeAnnotationFromBalloon'](_0x2bccb4);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5be44b of _0x392ec3)this['_addAnnotationToBalloon'](_0x5be44b);}this['_selectedAnnotations']=_0x392ec3;}['_addAnnotationToBalloon'](_0x4cb6b1,_0x3e1259=!0x1){this['_manuallyClosed']['has'](_0x4cb6b1)||(this['_addedAnnotations']['has'](_0x4cb6b1)||this['_balloon']['hasView'](_0x4cb6b1['view'])||(this['_addedAnnotations']['add'](_0x4cb6b1),this['_balloon']['add']({'stackId':_0x4cb6b1['view']['id'],'view':_0x4cb6b1['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4cb6b1)}})),_0x3e1259&&this['_balloon']['showStack'](_0x4cb6b1['view']['id']));}['_getBalloonTargetForAnnotation'](_0x33bbc5){const _0x2e6ea1=_0x33bbc5['target'],_0x3cd4d6=this['editor']['editing']['view'],_0x3fbd85=_0x3cd4d6['document']['selection']['getFirstRange'](),_0x5c6b42=_0x3cd4d6['domConverter']['viewRangeToDom'](_0x3fbd85);if(_0x5c6b42['collapse'](!0x0),_0x2e6ea1){if(_0x2e6ea1 instanceof _0x511c86)return _0x2e6ea1;let _0x49bb12=[];for(const _0x6fd43a of _0x2e6ea1)_0x49bb12['push'](..._0x511c86['getDomElementRects'](_0x6fd43a));_0x49bb12=function(_0x1f308f){const _0x390c01=[];let _0x3bcb82=_0x1f308f[0x0];for(let _0xc1173=0x1;_0xc1173<_0x1f308f['length'];_0xc1173++)if(Ni(_0x3bcb82,_0x1f308f[_0xc1173])){const _0x27978b=_0x1f308f[_0xc1173]['width'];_0x3bcb82['width']+=_0x27978b,_0x3bcb82['right']+=_0x27978b;}else _0x390c01['push'](_0x3bcb82),_0x3bcb82=_0x1f308f[_0xc1173];return _0x390c01['push'](_0x3bcb82),_0x390c01;}(_0x49bb12);const _0x146be0=_0x5c6b42['getBoundingClientRect']();return _0x49bb12['find'](_0x2e5005=>_0x2e5005['top']<=_0x146be0['top']&&_0x2e5005['bottom']>=_0x146be0['bottom']&&_0x2e5005['left']<=_0x146be0['left']&&_0x2e5005['right']>=_0x146be0['right'])||_0x49bb12[0x0];}return _0x33bbc5['targetRect']||_0x5c6b42;}['_removeAnnotationFromBalloon'](_0x44bc1e){this['_addedAnnotations']['has'](_0x44bc1e)&&this['_balloon']['hasView'](_0x44bc1e['view'])&&(this['_addedAnnotations']['delete'](_0x44bc1e),this['_balloon']['remove'](_0x44bc1e['view']));}['_closeAnnotation'](_0x30303d){this['_manuallyClosed']['add'](_0x30303d),this['_removeAnnotationFromBalloon'](_0x30303d);}}function Ni(_0x20eefc,_0x36d388){return _0x20eefc['top']===_0x36d388['top']&&_0x20eefc['bottom']===_0x36d388['bottom']&&_0x20eefc['right']===_0x36d388['left'];}class ki extends _0x40361{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x39108c,_0x9a374b){super(_0x39108c),this['set']('isEmpty',!_0x9a374b['length']),this['focusTracker']=new _0x5d8869(),this['_annotationViews']=_0x9a374b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x89dbb6({'focusables':_0x9a374b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x9a374b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x9a374b,'remove',(_0x36135f,_0x25df0f)=>{_0x25df0f['isActive']&&this['focus'](),_0x9a374b['length']||(this['isEmpty']=!0x0);});const _0x5157bb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x39108c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x9a374b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5157bb['if']('isEmpty','ck-hidden',_0x5a490e=>!_0x5a490e)]},'children':[{'text':bt(_0x39108c,'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 _0x19da0a of this['_annotationViews'])this['focusTracker']['add'](_0x19da0a['element']);this['_annotationViews']['on']('change',(_0x149b0c,{added:_0x148bfe,removed:_0x5db2a9})=>{for(const _0x19aab8 of _0x148bfe)this['focusTracker']['add'](_0x19aab8['element']);for(const _0x583b37 of _0x5db2a9)this['focusTracker']['remove'](_0x583b37['element']);});}}class Oi extends _0x10d0b1{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x2a0505){super(_0x2a0505),this['archivedThreads']=new _0xb591f1();}['init'](){const _0x201b14=this['context'],_0x30f31d=_0x201b14['plugins']['get'](Qt),_0x1c8a60=_0x201b14['plugins']['get']($t);this['listenTo'](_0x30f31d,'addCommentThread',(_0x5b75c8,{threadId:_0x2afc38})=>{const _0xb84bc5=_0x30f31d['getCommentThread'](_0x2afc38);_0xb84bc5['archivedAt']&&this['archivedThreads']['add'](_0xb84bc5,this['_calculatePosition'](_0xb84bc5['archivedAt'])),this['listenTo'](_0xb84bc5,'change:archivedAt',(_0x16a3cb,_0x1c15d0,_0x35c3c4)=>{_0x35c3c4?this['archivedThreads']['has'](_0xb84bc5)||this['archivedThreads']['add'](_0xb84bc5,this['_calculatePosition'](_0xb84bc5['archivedAt'])):this['archivedThreads']['has'](_0xb84bc5)&&this['archivedThreads']['remove'](_0xb84bc5);});}),this['listenTo'](_0x30f31d,'removeCommentThread',(_0x5b1d33,{threadId:_0x34ab1d})=>{const _0x302abc=_0x30f31d['getCommentThread'](_0x34ab1d);this['stopListening'](_0x302abc),this['archivedThreads']['has'](_0x302abc)&&this['archivedThreads']['remove'](_0x302abc);},{'priority':'highest'}),this['listenTo'](_0x1c8a60['collection'],'focus',(_0x353511,_0xbfff7e)=>{_0xbfff7e['isVisible']||(_0xbfff7e['isActive']=!0x0,_0x1c8a60['activate'](_0xbfff7e));});}['_calculatePosition'](_0x452671){const _0x4565db=[...this['archivedThreads']]['findIndex'](_0x5a3f1b=>_0x5a3f1b['archivedAt']<_0x452671);return _0x4565db>-0x1?_0x4565db:this['archivedThreads']['length'];}}class Mi extends _0x313055{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x4135bb){super(_0x4135bb),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4f10e1=this['editor'],_0x1b0d46=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4f10e1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xaaf754,!0x0)),_0x4f10e1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x44b4ed=this['_createCommentsArchiveButton'](ot);return _0x44b4ed['set']({'role':'menuitemcheckbox'}),_0x44b4ed;});const _0x44b34c=_0x4f10e1['plugins']['get'](Oi),_0x116d7d=_0x4f10e1['plugins']['get']('Annotations'),_0x3cdc2b=_0x4f10e1['plugins']['get']('CommentsRepository');_0x44b34c['archivedThreads']['forEach'](_0x5ab7d1=>{this['_handleNewThread'](_0x5ab7d1);}),this['listenTo'](_0x44b34c['archivedThreads'],'add',(_0x423c35,_0x5f4f5d)=>{this['_handleNewThread'](_0x5f4f5d);}),this['listenTo'](_0x116d7d['collection'],'add',(_0x221b07,_0x12657f)=>{const _0x1a5c59=this['_pendingThreads']['find'](_0x517323=>{const _0x10d92e=_0x3cdc2b['_threadToController']['get'](_0x517323);return _0x10d92e&&_0x12657f['innerView']===_0x10d92e['view'];});if(_0x1a5c59){const _0x52577f=this['_calculatePosition'](_0x1a5c59['archivedAt']);this['_addAnnotationToArchive'](_0x12657f,_0x52577f),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1a5c59),0x1);}}),this['listenTo'](_0x44b34c['archivedThreads'],'remove',(_0x16cc0d,_0x39a57d)=>{const _0x3a4404=_0x4f10e1['config']['get']('collaboration.channelId');if(!_0x3a4404||_0x39a57d['channelId']===_0x3a4404){if(this['_pendingThreads']['includes'](_0x39a57d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x39a57d),0x1);else{const _0x426b16=_0x3cdc2b['_threadToController']['get'](_0x39a57d),_0x3e1422=_0x116d7d['getByInnerView'](_0x426b16['view']);this['annotationViews']['remove'](_0x3e1422['view']),this['stopListening'](_0x3e1422),this['stopListening'](_0x3e1422['focusableElements']);}}}),this['listenTo'](_0x116d7d['collection'],'add',(_0x3a4e6a,_0x2a2218)=>{this['listenTo'](_0x2a2218,'escape',_0x1b0d46);}),this['listenTo'](_0x116d7d['collection'],'remove',(_0x251f1b,_0x3568c9)=>{this['stopListening'](_0x3568c9,'escape',_0x1b0d46);});}['_addAnnotationToArchive'](_0x5cbcb5,_0x25ed11){this['listenTo'](_0x5cbcb5,'set:isVisible',_0x599da8=>{_0x599da8['return']=!0x1,_0x599da8['stop']();}),this['annotationViews']['add'](_0x5cbcb5['view'],_0x25ed11);}['_handleNewThread'](_0x1c326d){const _0x55a499=this['editor']['plugins']['get']('CommentsRepository'),_0x2a05fa=this['editor']['plugins']['get']('Annotations'),_0x1242fd=this['editor']['config']['get']('collaboration.channelId');if(!_0x1242fd||_0x1c326d['channelId']===_0x1242fd){const _0x50fa81=_0x55a499['_threadToController']['get'](_0x1c326d);if(!_0x50fa81)return void this['_pendingThreads']['push'](_0x1c326d);const _0x1d5f39=this['_calculatePosition'](_0x1c326d['archivedAt']),_0x4b8ff8=_0x2a05fa['getByInnerView'](_0x50fa81['view']);_0x4b8ff8['isVisible']&&_0x2a05fa['_visibleAnnotations']['remove'](_0x4b8ff8),this['_addAnnotationToArchive'](_0x4b8ff8,_0x1d5f39);}}['_calculatePosition'](_0x12b3f6){const _0x1608c5=this['editor']['config']['get']('collaboration.channelId'),_0x23d27b=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x1b38ef=>_0x1b38ef['channelId']===_0x1608c5)['findIndex'](_0x4f3520=>_0x4f3520['archivedAt']<_0x12b3f6);return _0x23d27b<0x0||_0x23d27b>this['annotationViews']['length']?this['annotationViews']['length']:_0x23d27b-0x1;}['_toggleDialog'](){const _0x593d48=this['editor'],_0x487191=_0x593d48['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x593d48['locale'],this['annotationViews'])),'commentsArchive'===_0x487191['id']?_0x487191['hide']():_0x487191['show']({'id':'commentsArchive','title':bt(_0x593d48['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3deeef,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x57371b,_0x5d8f8a=!0x1){const _0x2a6d5a=this['editor']['locale'],_0x2ecf1f=this['editor']['plugins']['get']('Dialog'),_0x248597=new _0x57371b(_0x2a6d5a);return _0x248597['bind']('isEnabled')['to'](this,'isEnabled'),_0x248597['bind']('isOn')['to'](_0x2ecf1f,'id',_0x118516=>'commentsArchive'===_0x118516),_0x248597['set']({'label':bt(_0x2a6d5a,'COMMENTS_ARCHIVE'),'icon':_0x3deeef,'isToggleable':!0x0}),_0x5d8f8a&&(_0x248597['tooltip']=!0x0),this['listenTo'](_0x248597,'execute',()=>this['_toggleDialog']()),_0x248597;}['_hideDialogOnAnnotationEscape']=_0x36a52a=>{const _0x462418=_0x36a52a['source'];if(!this['annotationViews']['has'](_0x462418['view']))return;const _0x224247=this['editor']['plugins']['get']('Dialog');_0x224247['isOpen']&&'commentsArchive'===_0x224247['id']&&(_0x224247['hide'](),_0x36a52a['stop']());};}class Ri extends _0x313055{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x343be2,ContextPlugin as _0xf6081e,PendingActions as _0x3dc0c8,Command as _0x150035,Plugin as _0x91311a,Context as _0x25049f}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x222b58,uid as _0x3edb58,KeystrokeHandler as _0x4265bb,FocusTracker as _0x616088,diff as _0x33c926,Collection as _0xf4c9ca,Rect as _0x1ed994,CKEditorError as _0x2d21f6,first as _0x2ed043,priorities as _0x1948af,scrollViewportToShowTarget as _0x2ba192,getEnvKeystrokeText as _0x1381e4,toUnit as _0x55d622,DomEmitterMixin as _0x357f19,keyCodes as _0x2c96d0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x185abd,AriaDescriptionView as _0x5712d2,setupThreadKeyboardNavigation as _0x562b1d,ConfirmMixin as _0x1f261d,LateFocusButtonView as _0xc40e04,trimHtml as _0x279a21,LateFocusDropdownButtonView as _0xd5c3f6,FOCUS_ANNOTATION_KEYSTROKE as _0x131ff7,Users as _0x4472e4,getDateTimeFormatter as _0x5dc671,hashObject as _0x39a18b,getAllMarkersDomElementsSorted as _0x685d32,surroundingMarkersDetector as _0x24df33}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x516f17,cloneDeep as _0x5ef8ad,set as _0x67627a,unset as _0x413a05,isEqual as _0x482118,debounce as _0x51df8a}from'es-toolkit/compat';import{IconUndo as _0x5e0d33,IconCheck as _0x51be47,IconPencil as _0xd3ad17,IconRemoveComment as _0x589a79,IconThreeVerticalDots as _0x494eb7,IconAddComment as _0x44a19c,IconCommentsArchive as _0x24e872}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x3a93cf,InlineEditableUIView as _0x6e5dbc,EditorUI as _0x53c2eb,View as _0x2f7517,FocusCycler as _0x15b20c,ButtonView as _0x50e620,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x222b58(){['model'];['view'];constructor(_0xc85d14,_0x1ffb05){super(),this['model']=_0xc85d14,this['model']['_isAttached']=!0x0,this['view']=_0x1ffb05,this['listenTo'](_0x1ffb05,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1ffb05,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1ffb05,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1ffb05,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1ffb05,'addComment',(_0x4523d0,_0xe7a97c)=>this['addComment'](_0xe7a97c)),this['listenTo'](_0x1ffb05,'updateComment',(_0x192969,_0x1f0649,_0x263917)=>this['updateComment'](_0x1f0649,_0x263917)),this['listenTo'](_0x1ffb05,'removeComment',(_0x3b3d14,_0x1f343a)=>this['removeComment'](_0x1f343a));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x2bfdbf){this['model']['addComment']({'content':_0x2bfdbf,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2f0241,_0x4572a0){this['model']['getComment'](_0x2f0241)['update']({'content':_0x4572a0});}['removeComment'](_0x1a25bd){this['model']['getComment'](_0x1a25bd)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x311cf5,_0x340bd8,_0x2bccef){const t=_0x311cf5['t'];switch(_0x340bd8){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'},_0x2bccef);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'},_0x2bccef);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'},_0x2bccef);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'},_0x2bccef);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2bccef);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'},_0x2bccef);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'},_0x2bccef);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'},_0x2bccef);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 Et extends _0x3a93cf{['main'];['editable'];constructor(_0x17c39e,_0x2460dc){super(_0x17c39e);const _0x59cd28=_0x3edb58();this['main']=this['createCollection'](),this['editable']=new _0x6e5dbc(_0x17c39e,_0x2460dc,void 0x0,{'label':()=>bt(_0x17c39e,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x17c39e['uiLanguageDirection'],'lang':_0x17c39e['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x59cd28},'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 Nt extends _0x53c2eb{['view'];constructor(_0x6f96fb){super(_0x6f96fb),this['view']=new Et(_0x6f96fb['locale'],_0x6f96fb['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x3fcaa2=this['editor']['editing']['view'],_0x55c871=this['view']['editable'],_0x58d0e4=_0x3fcaa2['document']['getRoot']();_0x55c871['name']=_0x58d0e4['rootName'],this['view']['render']();const _0x533a67=_0x55c871['element'];this['setEditableElement'](_0x55c871['name'],_0x533a67),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3fcaa2['attachDomRoot'](_0x533a67),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x222b58(_0x343be2){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>kt)());constructor(_0x207601={}){function _0x35009c(_0x28cf77){return _0x28cf77['map'](_0x1164a0=>String['fromCharCode'](_0x1164a0))['join']('');}(_0x207601=Object['assign']({},_0x207601))['plugins']||(_0x207601['plugins']=Ot['defaultPlugins']),super(_0x207601),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x35009c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x35009c([0x76,0x69,0x65,0x77])][_0x35009c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x35009c([0x61,0x75,0x74,0x6f]),this[_0x35009c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x35009c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x35009c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x35009c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x35009c([0x6f,0x6b])});}['create'](){const _0x2cda8d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2cda8d))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2dd50d=>{const _0x17ac82=this['model']['document']['getRoot'](),_0x3ed85a=_0x17ac82&&_0x17ac82['getChild'](_0x17ac82['childCount']-0x1);_0x2dd50d['setSelection'](_0x3ed85a,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3ab6bb=this['editing']['view'],_0x776290=_0x3ab6bb['document']['getRoot'](),_0x40c2b6=_0x776290['getChild'](0x0);_0x776290['childCount']>0x1||!_0x40c2b6||'p'!=_0x40c2b6['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x3ab6bb,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x40c2b6['placeholder']=this['placeholder']),ut({'view':_0x3ab6bb,'element':_0x40c2b6,'keepOnFocus':!0x0}),this['placeholderElement']=_0x40c2b6);}}class Mt extends _0x2f7517{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x334e93,_0xdff034={}){super(_0x334e93),this['editor']=null,this['_editorConfig']=_0xdff034,this['set']('value',_0xdff034['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x334e93,'Reply...')),this['set']('submitLabel',bt(_0x334e93,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x4265bb(),this['focusTracker']=new _0x616088(),this['focusCycler']=new _0x15b20c({'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',(_0x9629f8,_0x1cf759)=>{this['cancelButtonView']['fire']('execute'),_0x1cf759();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4deaec,_0x13611d)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x13611d());}),this['on']('submit',(_0xf36f31,_0x508648)=>{_0x508648['length']>0xfde8?(alert(bt(_0x334e93,'TOO_LONG_COMMENT_ALERT',[_0x508648['length'],0xfde8])),_0xf36f31['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x537ecd=this['editor'];this['element']['insertBefore'](_0x537ecd['ui']['element'],this['element']['firstChild']),_0x537ecd['model']['document']['on']('change',()=>this['value']=_0x537ecd['getData']()),_0x537ecd['bind']('placeholder')['to'](this),this['focusables']['add'](_0x537ecd['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4a30d4){-0x1===_0x4a30d4?(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:_0x13163}=this,_0x400bd3=new _0x50e620(_0x13163);return _0x400bd3['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x400bd3['withText']=!0x0,_0x400bd3['bind']('label')['to'](this,'submitLabel'),_0x400bd3['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x400bd3['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x28727c,_0x3b3198)=>!_0x3b3198&&!!_0x28727c['trim']()),_0x400bd3;}['_createCancelButton'](){const {locale:_0x23d8f5}=this,_0x294e3f=new _0x50e620(_0x23d8f5);return _0x294e3f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x294e3f['label']=bt(_0x23d8f5,'Cancel'),_0x294e3f['withText']=!0x0,_0x294e3f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x294e3f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x314fef=>{this['focusTracker']['add'](_0x314fef['element']);}),this['focusables']['on']('change',(_0x260bfa,_0x175f2a)=>{for(const _0x2279c7 of Array['from'](_0x175f2a['added'])['reverse']())this['focusTracker']['add'](_0x2279c7['element']);});}}class Rt extends _0x2f7517{constructor(_0x18e61e,_0x44c23e,_0x6ab81c){super(_0x18e61e),this['commentInputView']=new Mt(_0x18e61e,_0x6ab81c),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1c5b04,_0x40cc38)=>_0x1c5b04||!!_0x40cc38),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 _0x185abd(_0x18e61e,_0x44c23e),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'](_0x1a7727){this['commentInputView']['focus'](_0x1a7727);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x37d98c,_0x54cc67)=>{const {submitButtonView:_0x11aa25,cancelButtonView:_0x539f47,editor:_0x34e5f7}=this['commentInputView'];[_0x11aa25['element'],_0x539f47['element'],_0x34e5f7?_0x34e5f7['editing']['view']['getDomRoot']():null]['filter'](_0x203fee=>_0x203fee)['some'](_0x54dc15=>_0x54dc15['contains'](_0x54cc67['target']))||(this['focus'](),_0x54cc67['preventDefault']());});}}class xt extends _0x2f7517{constructor(_0x47b5e4){super(_0x47b5e4);const _0x11fe96=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x11fe96['to']('count',_0x42cc2c=>bt(_0x47b5e4,'NUMBER_OF_COMMENTS',_0x42cc2c))}]});}}class St extends _0x2f7517{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5f7896,_0x1c9d4e,_0x8c4d42){super(_0x5f7896);const _0x4f270c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1c9d4e['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1c9d4e,this['_config']=_0x8c4d42,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x616088(),this['keystrokes']=new _0x4265bb(),this['focusCycler']=new _0x15b20c({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4c6241=>this['commentViews']['map'](_0xa45415=>_0xa45415['element'])['includes'](_0x4c6241['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x5f7896),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4994a4=>_0x4994a4-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2fe69a of _0x1c9d4e['comments'])this['_handleNewCommentModel'](_0x2fe69a);this['_handleInfoComment'](),this['listenTo'](_0x1c9d4e['comments'],'add',(_0x3bf5f1,_0x4844b9)=>{const _0x4ebd1c=this['_calculatePosition'](_0x4844b9);this['length']++,this['_handleNewCommentModel'](_0x4844b9,_0x4ebd1c),this['refreshVisibleViews']();}),this['listenTo'](_0x1c9d4e['comments'],'remove',(_0x4e2d56,_0x341aeb)=>{this['length']--,this['_handleRemoveCommentModel'](_0x341aeb),this['refreshVisibleViews']();}),this['listenTo'](_0x1c9d4e,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1c9d4e,'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',_0x4f270c['if']('length','ck-hidden',_0x9c9db2=>!_0x9c9db2)],'aria-label':bt(_0x5f7896,'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'](_0x446f65){-0x1===_0x446f65?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x28c2c8 of this['commentViews'])_0x28c2c8['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2074bc,_0x10baee){const _0x7feed2=new this['_config']['CommentView'](this['locale'],_0x2074bc,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x7feed2['viewUid']=_0x2074bc['id'],_0x7feed2['delegate']('removeComment')['to'](this),_0x7feed2['delegate']('updateComment')['to'](this),_0x7feed2['delegate']('resolveCommentThread')['to'](this),_0x7feed2['delegate']('editorReady')['to'](this),_0x7feed2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x7feed2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x7feed2,_0x10baee);}['_calculatePosition'](_0x276c32){const _0x43d1f8=this['_model']['_findOptimalIndex'](_0x276c32);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x276c32['authoredAt']?_0x43d1f8-0x1:_0x43d1f8:_0x43d1f8-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3bb975={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3bb975,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3bb975));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5d83da){const _0x14b114=this['commentViews']['remove'](_0x5d83da['id']);this['stopListening'](_0x14b114),_0x14b114['isEditMode']&&this['_updateHasDirtyComment'](),_0x14b114['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2f76fd=>_0x2f76fd['isEditMode']);}['_rearrangeCollapse'](){const _0x3d55f0=function(_0x5a4aef){const _0x4b238b=new _0xf4c9ca();for(const _0x16c25a of _0x5a4aef)_0x4b238b['add'](_0x16c25a);return _0x4b238b;}(this['commentViews']),_0x2e3dc5=this['_collapsedCommentsView']['count'];for(let _0x4c4e53=0x1;_0x4c4e53<=_0x2e3dc5;_0x4c4e53++)_0x3d55f0['remove'](0x1);for(const _0x48e644 of _0x3d55f0)_0x48e644['collapse']();_0x2e3dc5>0x0&&_0x3d55f0['add'](this['_collapsedCommentsView'],0x1),Pt(_0x33c926(Array['from'](this['visibleViews']),Array['from'](_0x3d55f0)),this['visibleViews'],_0x3d55f0);}['_rearrangeExpand'](){Pt(_0x33c926(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2a8b0c of this['visibleViews'])_0x2a8b0c['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5b7257=>{this['focusTracker']['add'](_0x5b7257['element']),this['keystrokes']['listenTo'](_0x5b7257['element']);}),this['commentViews']['on']('change',(_0xd1418f,_0x2c5229)=>{for(const _0x23be6f of _0x2c5229['removed'])this['focusTracker']['remove'](_0x23be6f['element']),this['keystrokes']['stopListening'](_0x23be6f['element']);for(const _0x4d4b17 of Array['from'](_0x2c5229['added'])['reverse']())this['focusTracker']['add'](_0x4d4b17['element']),this['keystrokes']['listenTo'](_0x4d4b17['element']);});}}function Pt(_0x5e2e0b,_0x5a062d,_0x582b8b){let _0x5a2986=0x0;for(const _0xb7fa49 of _0x5e2e0b)switch(_0xb7fa49){case'insert':_0x5a062d['add'](_0x582b8b['get'](_0x5a2986),_0x5a2986),_0x5a2986++;break;case'delete':_0x5a062d['remove'](_0x5a2986);break;case'equal':_0x5a2986++;}}class Lt extends _0x2f7517{constructor(_0x4bdbb5){super(_0x4bdbb5);const _0xf8a946=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xf8a946['to']('contextValue',_0x238cd7=>bt(_0x4bdbb5,'THREAD_CONTEXT_LABEL',_0x238cd7)),'tabindex':-0x1},'children':[{'text':_0xf8a946['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x2f7517{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1d2c6a,_0x48b1b9){super(_0x1d2c6a);const _0x30714a=this['bindTemplate'];this['_model']=_0x48b1b9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x616088(),this['keystrokes']=new _0x4265bb(),this['focusCycler']=new _0x15b20c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x22bc9e=>!!_0x22bc9e),this['bind']('contextValue')['to'](this['_model'],'context',_0x1031ab=>_0x1031ab&&_0x1031ab['value']?this['_trimContextValue'](_0x1031ab['value']):bt(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',_0x30714a['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 _0x3c4322=new _0x50e620(this['locale']);return _0x3c4322['label']=bt(this['locale'],'Reopen'),_0x3c4322['tooltip']=bt(this['locale'],'Reopen'),_0x3c4322['icon']=_0x5e0d33,_0x3c4322['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1172c4=>!_0x1172c4),_0x3c4322['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xcac0f1,_0x1a0ad8)=>_0xcac0f1&&_0x1a0ad8),_0x3c4322['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3c4322;}['_trimContextValue'](_0x21c3f3){if(_0x21c3f3['length']<0x96)return _0x21c3f3;const _0x1d7c29=_0x21c3f3['lastIndexOf']('\x20',0x93);return _0x21c3f3['substring'](0x0,_0x1d7c29>-0x1?_0x1d7c29:0x93)+'...';}['_attachContextActions'](){const _0x4daa28=this['element']['querySelector']('.ck-context'),_0x4ec7ab=_0x4daa28['querySelector']('.ck-context__value');this['listenTo'](_0x4daa28,'mouseenter',()=>{_0x4ec7ab['offsetWidth']<_0x4ec7ab['scrollWidth']&&_0x4daa28['classList']['add']('overlay');}),this['listenTo'](_0x4daa28,'mouseleave',()=>{_0x4daa28['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2a878d of this['focusables'])this['focusTracker']['add'](_0x2a878d['element']),this['keystrokes']['listenTo'](_0x2a878d['element']);}['_createContextView'](){const _0x2d3e70=new Lt(this['locale']);return _0x2d3e70['bind']('contextValue')['to'](this),_0x2d3e70;}}class Vt extends _0x2f7517{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x522dc3,_0x20817,_0x20d6a1,_0x47e8d8){super(_0x522dc3),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x20817,this['_localUser']=_0x20d6a1,this['_config']=_0x47e8d8,this['commentThreadHeaderView']=new Dt(_0x522dc3,_0x20817),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x5712d2(_0x522dc3,bt(_0x522dc3,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x522dc3,_0x20817,Object['assign']({'CommentView':this['_config']['CommentView']},_0x47e8d8)),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',(_0x504455,_0x27f90a)=>_0x504455||!!_0x27f90a),this['bind']('isUnlinked')['to'](_0x20817,'unlinkedAt',_0x580c9a=>!!_0x580c9a),this['bind']('ariaLabel')['to'](this,'length',_0xc471e0=>{const _0x16e4af=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0xc471e0,_0x16e4af]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x616088(),this['keystrokes']=new _0x4265bb(),this['focusCycler']=new _0x15b20c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5c3213=>_0x5c3213['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x562b1d(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4a587e=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3df242=_0x4a587e['commentInputView'];return _0x4a587e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3df242,'value',(_0xa46828,_0x4fa434,_0x367f0d,_0x2255a4,_0x4f99c1)=>!!_0x4f99c1||!!_0x2255a4&&_0x367f0d&&!_0x4fa434||_0xa46828&&_0x367f0d&&!_0x4fa434),_0x3df242['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x270c5d,_0xf852f8,_0x43f571)=>{let _0x57e2b4;return _0x57e2b4=_0x43f571&&_0xf852f8?'Reply\x20to\x20reopen\x20discussion...':_0x270c5d?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x57e2b4);}),_0x3df242['bind']('submitLabel')['to'](this,'length',_0x303e94=>bt(this['locale'],_0x303e94?'Reply':'Comment')),_0x3df242['on']('submit',(_0xe5b9f0,_0x331cb)=>{this['fire']('addComment',_0x331cb),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3df242['on']('cancel',()=>{this['focus']();}),_0x3df242['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3df242['on']('cancel',_0x21fff5=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x21fff5['stop']());}),this['on']('change:isActive',(_0x486b0a,_0x582d9f,_0x2d1fb5)=>{_0x2d1fb5||this['length']||_0x3df242['value']||this['fire']('removeCommentThread');}),_0x4a587e;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x1f261d(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x3a15df,_0x3ec01d,_0x22ffd6,_0x1e9c82){super(_0x3a15df,_0x3ec01d,_0x22ffd6,_0x1e9c82),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x3a15df,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2d227d,_0x1e5371,_0x1e8d22)=>{_0x1e8d22||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x475dd9,_0x5615c8,_0x37c589)=>{_0x37c589&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2fc8c0=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2fc8c0['if']('isActive','ck-thread--active'),_0x2fc8c0['if']('isUnlinked','ck-thread--unlinked'),_0x2fc8c0['to']('actionIndicator',_0x12470f=>_0x12470f?'ck-thread--'+_0x12470f:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2fc8c0['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 _0x4a4bcd of this['commentsListView']['commentViews'])_0x4a4bcd['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x29c5e8}=this,_0x6380c3=this['commentsListView']['commentViews']['get'](0x0);_0x6380c3===this['_boundFirstCommentView']||_0x6380c3['isSystemComment']||(this['_boundFirstCommentView']=_0x6380c3,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x6380c3,'actionIndicator',_0x5209de=>'remove'===_0x5209de?'remove':null),_0x6380c3['placeholder']=bt(_0x29c5e8,'Write\x20a\x20comment...'),_0x6380c3['removeButton']['on']('execute',_0x27b509=>{_0x27b509['stop'](),this['showConfirm'](bt(_0x29c5e8,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x6380c3['focus']();}),_0x6380c3['actionBar']['add'](this['resolveButton'],0x0),_0x6380c3['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4b2fed=new _0xc40e04(this['locale']);return _0x4b2fed['label']=bt(this['locale'],'Resolve'),_0x4b2fed['tooltip']=bt(this['locale'],'Resolve'),_0x4b2fed['icon']=_0x51be47,_0x4b2fed['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4b2fed['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x175efc=>!_0x175efc),_0x4b2fed['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5a7da3,_0x8ae5ed)=>_0x5a7da3&&!_0x8ae5ed),_0x4b2fed['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4b2fed;}['_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 Ht extends _0x2f7517{constructor(_0x5ca131){super(_0x5ca131),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x480eb0,_0x3073a4,_0x48ae07)=>{this['element']['innerHTML']=_0x48ae07;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x2f7517{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3f11f1,_0x27bfac,_0x416526){super(_0x3f11f1),this['_model']=_0x27bfac,this['_config']=_0x416526,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x27bfac,'content',_0x27bfac,'authoredAt',(_0x8c32c,_0x320198)=>bt(_0x3f11f1,'COMMENT_ARIA_LABEL',[_0x27bfac['author']['name'],_0x416526['formatDateTime'](_0x320198),new DOMParser()['parseFromString'](_0x8c32c,'text/html')['body']['textContent'],_0x27bfac['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x5712d2(_0x3f11f1,bt(_0x3f11f1,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x616088(),this['keystrokes']=new _0x4265bb(),this['focusCycler']=new _0x15b20c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4041d9=>_0x4041d9['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']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x492503=new Ht(this['locale']);return _0x492503['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x53fc45,_0x2b0ee9)=>_0x2b0ee9?_0x279a21(_0x53fc45,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x53fc45),_0x492503;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x14eed5=new Mt(this['locale'],this['_config']['editorConfig']);return _0x14eed5['value']=this['_model']['content'],_0x14eed5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x14eed5['submitLabel']=bt(this['locale'],'Save'),_0x14eed5['on']('submit',(_0x59f48d,_0x3d279c)=>{this['fire']('updateComment',this['_model']['id'],_0x3d279c),this['switchToDisplayMode'](),this['focus']();}),_0x14eed5['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x14eed5['once']('editorReady',()=>{_0x14eed5['focus']();}),_0x14eed5['createEditor'](),_0x14eed5['delegate']('editorReady')['to'](this),_0x14eed5['delegate']('editorDestroyed')['to'](this),_0x14eed5;}['_setupKeyboardNavigation'](){const _0x4cc63a=this['element'];this['keystrokes']['listenTo'](_0x4cc63a);for(const _0x42feb9 of this['focusables'])this['focusTracker']['add'](_0x42feb9['element']),this['keystrokes']['listenTo'](_0x42feb9['element']);this['focusables']['on']('change',(_0x319eb6,_0x293bb7)=>{for(const _0x20553e of _0x293bb7['removed'])this['focusTracker']['remove'](_0x20553e['element']),this['keystrokes']['stopListening'](_0x20553e['element']);for(const _0x48f14f of _0x293bb7['added'])this['focusTracker']['add'](_0x48f14f['element']),this['keystrokes']['listenTo'](_0x48f14f['element']);}),this['keystrokes']['set']('enter',(_0x586261,_0x4d7aae)=>{_0x4cc63a===_0x586261['target']&&(this['focusCycler']['focusFirst'](),_0x4d7aae());}),this['keystrokes']['set']('esc',(_0x2e508e,_0x250844)=>{_0x4cc63a!==_0x2e508e['target']&&(this['focus'](),_0x250844());});}}class Ut extends/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x1f261d(Ft){['actionBar'];['userView'];constructor(_0x23452b,_0x5d76f5,_0x226052){super(_0x23452b,_0x5d76f5,_0x226052),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x23452b,'Reply...')),this['bind']('authoredAt')['to'](_0x5d76f5),this['bind']('resolvedAt')['to'](_0x5d76f5),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 _0x185abd(_0x23452b,_0x5d76f5['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5d76f5,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x16f16a=this['bindTemplate'],_0x1158a9=[{'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':_0x16f16a['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x16f16a['to']('authoredAt',_0x303e23=>this['_config']['formatDateTime'](_0x303e23))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x16f16a['if']('isEditMode','ck-comment__actions--hidden'),_0x16f16a['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']&&_0x1158a9['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x16f16a['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x16f16a['if']('isEditMode','ck-comment--edit'),_0x16f16a['if']('isSystemComment','ck-comment--info'),_0x16f16a['to']('actionIndicator',_0x6ce0df=>_0x6ce0df?'ck-comment--'+_0x6ce0df:'')],'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':_0x1158a9}]}]};}['_createEditButton'](){const _0x362841=new _0x50e620(this['locale']);return _0x362841['label']=bt(this['locale'],'Edit'),_0x362841['icon']=_0xd3ad17,_0x362841['withText']=!0x0,_0x362841['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x362841['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x49c733=>!_0x49c733),_0x362841['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x362841['on']('execute',()=>this['switchToEditMode']()),_0x362841;}['_createRemoveButton'](){const _0xc71a3d=new _0x50e620(this['locale']);return _0xc71a3d['label']=bt(this['locale'],'Remove'),_0xc71a3d['icon']=_0x589a79,_0xc71a3d['withText']=!0x0,_0xc71a3d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xc71a3d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3c81af=>!_0x3c81af),_0xc71a3d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xc71a3d['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xc71a3d;}['_createDropdown'](){const _0x35ad7b=it(this['locale'],_0xd5c3f6),_0x4d974b=_0x35ad7b['panelView']['children'],_0x20fa7d=new et(this['locale']),_0x4437e4=_0x35ad7b['bindTemplate'];st(_0x35ad7b,()=>this['items']['find'](_0xb89469=>_0xb89469['isVisible'])),_0x35ad7b['extendTemplate']({'attributes':{'class':[_0x4437e4['if']('isVisible','ck-hidden',_0x4ff248=>!_0x4ff248)]}});const _0x254ea6=(_0x524a3d,_0x162a2a=-0x1)=>{const _0xd9fcec=new nt(this['locale']);_0xd9fcec['children']['add'](_0x524a3d);const _0x5426b4=_0x162a2a>-0x1?_0x162a2a:_0x20fa7d['items']['length'];_0x20fa7d['items']['add'](_0xd9fcec,_0x5426b4);const _0x55d3b0=Array['from'](this['items']);_0x35ad7b['unbind']('isEnabled','isVisible'),_0x35ad7b['bind']('isEnabled')['toMany'](_0x55d3b0,'isEnabled',(..._0xa6f71f)=>_0xa6f71f['some'](_0x5ce0ce=>_0x5ce0ce)),_0x35ad7b['bind']('isVisible')['toMany'](_0x55d3b0,'isVisible',(..._0x1c2c0e)=>_0x1c2c0e['some'](_0x483f42=>_0x483f42));};_0x35ad7b['panelPosition']='sw',_0x35ad7b['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x494eb7});for(const _0x5a8fe0 of this['items'])_0x254ea6(_0x5a8fe0);return _0x4d974b['add'](_0x20fa7d),_0x35ad7b['listenTo'](this['items'],'add',(_0x345d3,_0xe0db9e,_0x37e583)=>{_0x254ea6(_0xe0db9e,_0x37e583);}),_0x35ad7b['listenTo'](this['items'],'remove',(_0x542233,_0x527319,_0x5bb15c)=>{_0x20fa7d['items']['remove'](_0x5bb15c);}),_0x35ad7b;}['_attachActions'](_0x3f5055,_0x5672db){const _0x51df8c=_0x3f5055&&_0x3f5055['element'];_0x51df8c&&(this['listenTo'](_0x51df8c,'mouseenter',()=>this['actionIndicator']=_0x5672db),this['listenTo'](_0x51df8c,'focus',()=>this['actionIndicator']=_0x5672db),this['listenTo'](_0x51df8c,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x51df8c,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x161ac5=super['_createCommentInputView']();return _0x161ac5['bind']('placeholder')['to'](this),_0x161ac5;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x3049b1){const _0x4218ba=_0x516f17(_0x3049b1,0x1e),_0x59e340=new MutationObserver(_0x3a229c=>{for(const _0x3cfb93 of _0x3a229c)('attributes'==_0x3cfb93['type']&&'class'==_0x3cfb93['attributeName']||'childList'==_0x3cfb93['type']||'characterData'==_0x3cfb93['type'])&&_0x4218ba();});return{'attach'(_0x32306b){_0x59e340['observe'](_0x32306b,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x59e340['disconnect'](),_0x4218ba['cancel']();}};}class Kt extends _0x2f7517{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x533cb9,_0x531bdf){super(_0x533cb9),this['id']=_0x3edb58(),this['focusTracker']=new _0x616088(),this['keystrokes']=new _0x4265bb(),this['keystrokes']['set']('Esc',(_0xf573c5,_0x337526)=>this['fire']('Esc',_0x337526)),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']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x531bdf),this['mainView']=_0x531bdf;const _0x91e48a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x91e48a['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 _0xc1f0a=this['element']['clientHeight'];_0xc1f0a&&(this['height']=_0xc1f0a);}}class Yt extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x222b58(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xd94610,target:_0x1545c1,type:_0x37b502,isVisible:_0x25006e=!0x0}){super(),this['view']=_0xd94610,this['view']['element']||this['view']['render'](),this['_type']=_0x37b502,this['_target']=_0x1545c1,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xf4c9ca([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3579b3,_0x4f91e7)=>{this['view']['focusTracker']['add'](_0x4f91e7);}),this['focusableElements']['on']('remove',(_0x3fbf56,_0x2e7d64)=>{this['view']['focusTracker']['remove'](_0x2e7d64);}),this['set']('isVisible',_0x25006e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x399a6a=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x399a6a),_0x399a6a;}get['targetRect'](){const _0x2fd843=this['target'];if(null===_0x2fd843)return null;if(_0x2fd843 instanceof _0x1ed994)return _0x2fd843;const _0x288b56=_0x2fd843['filter'](_0x5ddb79=>function(_0x358fd6){const _0x3a2958=_0x358fd6['offsetParent'];if(_0x3a2958)return!0x0;const _0xbd9098=_0x358fd6['getClientRects']()['item'](0x0);return!!_0xbd9098;}(_0x5ddb79));return 0x0===_0x288b56['length']?null:_0x1ed994['getDomElementRects'](_0x288b56[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2ad984){this['view']['isActive']=_0x2ad984,this['view']['mainView']['isActive']=_0x2ad984;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4a384a){if(!(null===_0x4a384a||_0x4a384a instanceof _0x1ed994||Array['isArray'](_0x4a384a)&&_0x4a384a['every'](_0x2b18b0=>Gt(_0x2b18b0))))throw new _0x2d21f6('annotation-invalid-target',null,{'target':_0x4a384a});}['_getNormalizedTarget'](){const _0x5f3052='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x5f3052)?[_0x5f3052]:_0x5f3052;}}function Gt(_0x187fca){return null!==_0x187fca&&'object'==typeof _0x187fca&&'nodeType'in _0x187fca&&0x1===_0x187fca['nodeType'];}class jt extends _0xf4c9ca{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x26948e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x616088(),this['_focusTracker']['on']('change:isFocused',(_0x532cf5,_0x39f3e4,_0x107e5a)=>{_0x107e5a||this['fire']('blur');});for(const _0x5b1e44 of _0x26948e)this['add'](_0x5b1e44);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x15b2f7){if(this['has'](_0x15b2f7))throw new _0x2d21f6('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x15b2f7['innerView'],_0x15b2f7),this['_viewToAnnotation']['set'](_0x15b2f7['view'],_0x15b2f7);for(const _0x372e65 of _0x15b2f7['focusableElements'])this['_focusTracker']['add'](_0x372e65);this['listenTo'](_0x15b2f7['focusableElements'],'add',(_0x2bde3a,_0x29dc1d)=>{this['_focusTracker']['add'](_0x29dc1d);}),this['listenTo'](_0x15b2f7['focusableElements'],'remove',(_0x107474,_0x392d55)=>{this['_focusTracker']['remove'](_0x392d55);}),this['listenTo'](_0x15b2f7['view']['focusTracker'],'change:isFocused',(_0x3c1a00,_0x2f8050,_0x175649)=>{_0x175649&&this['fire']('focus',_0x15b2f7);}),_0x15b2f7['updateTargetRect']();const _0x4a7bda=this['_getOrderInContent'](_0x15b2f7['view']['targetRect']);return super['add'](_0x15b2f7,_0x4a7bda);}['remove'](_0xfccc1c){if(!this['has'](_0xfccc1c))throw new _0x2d21f6('annotationcollection-not-existing-item',null);this['stopListening'](_0xfccc1c['view']['focusTracker']),this['stopListening'](_0xfccc1c['focusableElements']);for(const _0x2b6806 of _0xfccc1c['focusableElements'])this['_focusTracker']['remove'](_0x2b6806);return this['_viewToAnnotation']['delete'](_0xfccc1c['view']),this['_innerViewToAnnotation']['delete'](_0xfccc1c['innerView']),super['remove'](_0xfccc1c);}['getByInnerView'](_0x31dd7d){return this['_innerViewToAnnotation']['get'](_0x31dd7d);}['getByView'](_0x2659ac){return this['_viewToAnnotation']['get'](_0x2659ac);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2b07e9 of this)_0x2b07e9['updateTargetRect']();this['_sort']();}['_sort'](){const _0x473add=Array['from'](this)['sort']((_0x3e01e3,_0x4b5027)=>qt(_0x3e01e3['view']['targetRect'],_0x4b5027['view']['targetRect']));for(let _0x2567a4=_0x473add['length']-0x1;_0x2567a4>0x0;_0x2567a4--){const _0x333954=_0x473add[_0x2567a4];_0x2567a4!==this['getIndex'](_0x333954)&&(this['remove'](_0x333954),this['add'](_0x333954));}}['_getOrderInContent'](_0xa2a5f6){let _0x2bd158=0x0;if(!_0xa2a5f6)return this['length'];for(const _0xde02db of this){const _0x45995b=_0xde02db['view']['targetRect'];if(_0x45995b){if(qt(_0xa2a5f6,_0x45995b)<0x0)return _0x2bd158;_0x2bd158++;}}return _0x2bd158;}}function Xt({source:_0x677e9,target:_0x281314,filter:_0x1f50ea}){for(const _0x1ca575 of _0x677e9)_0x1f50ea(_0x1ca575)&&_0x281314['add'](_0x1ca575);_0x281314['listenTo'](_0x677e9,'add',(_0x13c6e1,_0x362fd3)=>{_0x1f50ea(_0x362fd3)&&_0x281314['add'](_0x362fd3);}),_0x281314['listenTo'](_0x677e9,'remove',(_0x704b53,_0x4073f0)=>{_0x281314['has'](_0x4073f0)&&_0x281314['remove'](_0x4073f0);});}function qt(_0x2ce551,_0x45120e){if(null===_0x2ce551&&null===_0x45120e)return 0x0;if(null===_0x2ce551)return-0x1;if(null===_0x45120e)return 0x1;const _0x2810f6=_0x2ce551['top']-_0x45120e['top'];return 0x0==_0x2810f6?_0x2ce551['left']-_0x45120e['left']:_0x2810f6;}class $t extends _0xf6081e{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa10164){if(super(_0xa10164),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xa10164 instanceof _0x343be2){const _0x3ce02e=_0xa10164['locale'];_0xa10164['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xfd9382){this['collection']['add'](_0xfd9382);}['remove'](_0x4070ad){this['collection']['remove'](_0x4070ad),_0x4070ad['destroy']();}['refreshVisibility'](){for(const _0x51b111 of this['collection'])_0x51b111['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1a2e84){return this['collection']['getByInnerView'](_0x1a2e84);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x315b92 of this['collection'])_0x315b92['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x21743b){this['fire']('_activateAnnotation',_0x21743b);}['createAnnotation'](_0x14d56e){return new Yt(_0x14d56e);}['createAnnotationView'](_0xb594f6,_0x164722){return new Kt(_0xb594f6,_0x164722);}['_addActiveAnnotation'](_0x3b92e3){const _0x1d4b75=new Set(this['activeAnnotations']);_0x1d4b75['add'](_0x3b92e3),this['activeAnnotations']=_0x1d4b75;}['_removeActiveAnnotation'](_0x25ff42){const _0x118609=new Set(this['activeAnnotations']);_0x118609['delete'](_0x25ff42),this['activeAnnotations']=_0x118609;}['_bindAnnotationsToVisibleAnnotations'](){const _0x517a35=this['collection'],_0x2741c4=this['_visibleAnnotations'];function _0x2e1e3(_0x1963bb){const _0xeddcc3=_0x1963bb['source'];_0xeddcc3['isVisible']&&!_0x2741c4['has'](_0xeddcc3)?_0x2741c4['add'](_0xeddcc3):!_0xeddcc3['isVisible']&&_0x2741c4['has'](_0xeddcc3)&&_0x2741c4['remove'](_0xeddcc3),_0xeddcc3['view']['focusTracker']['remove'](_0xeddcc3['view']['element']),_0xeddcc3['view']['focusTracker']['add'](_0xeddcc3['view']['element']);}this['listenTo'](_0x517a35,'add',(_0x41e920,_0x254648)=>{_0x254648['isVisible']&&_0x2741c4['add'](_0x254648),this['listenTo'](_0x254648,'change:isVisible',_0x2e1e3);}),this['listenTo'](_0x517a35,'remove',(_0x22a58f,_0x1cd232)=>{_0x2741c4['has'](_0x1cd232)&&_0x2741c4['remove'](_0x1cd232),this['stopListening'](_0x1cd232,'change:isVisible',_0x2e1e3);});}['_setupEnterAnnotationKeystroke'](){const _0x27a1ad=_0x580c3d=>{_0x580c3d['on']('ready',()=>{_0x580c3d['keystrokes']['set'](_0x131ff7,(_0x577a98,_0x2bb919)=>{const _0x12d219=_0x2ed043(this['activeAnnotations']['values']());_0x12d219&&(_0x12d219['view']['focus'](),_0x2bb919());});});};this['context']instanceof _0x343be2?_0x27a1ad(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x40d86d,_0x45f000)=>{_0x27a1ad(_0x45f000);});}['_setupEscapeAnnotationHandling'](){const _0x3ae8b9=_0x27d112=>{const _0x369ac5=_0x27d112['source'],_0xbffbc1=[];let _0x529855;if(Array['isArray'](_0x369ac5['target'])){_0x529855=_0x369ac5['target'][0x0],this['context']instanceof _0x343be2?_0xbffbc1['push'](this['context']):this['context']['editors']&&_0xbffbc1['push'](...this['context']['editors']);for(const _0x5e077a of _0xbffbc1)for(const _0x64d372 of _0x5e077a['editing']['view']['domRoots']['values']())if(_0x64d372['contains'](_0x529855))return void _0x5e077a['editing']['view']['focus']();_0x529855['focus']();}};this['listenTo'](this['collection'],'add',(_0x5ee612,_0x53404e)=>{this['listenTo'](_0x53404e,'escape',_0x3ae8b9,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4ac732,_0x33c67d)=>{this['stopListening'](_0x33c67d,'escape',_0x3ae8b9);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0xf6081e{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x3dc0c8,_0x4472e4];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x229b82){super(_0x229b82),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x57b016=this['context']['config'];_0x57b016['define']('comments.maxCommentsWhenCollapsed',0x2),_0x57b016['define']('comments.maxThreadTotalWeight',0x1f4),_0x57b016['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x57b016['define']('comments.CommentThreadView',Bt),_0x57b016['define']('comments.CommentView',Ut),_0x57b016['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1298f8=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1b6059,_0x5b82d6)=>this['_addCommentThread'](_0x5b82d6)),this['on']('submitCommentThread',(_0xfd632b,_0x21f3e1)=>this['_submitCommentThread'](_0x21f3e1)),this['on']('resolveCommentThread',(_0x14bc3e,_0x5b5925)=>this['_resolveCommentThread'](_0x5b5925)),this['on']('resolveCommentThread',(_0x4f6503,_0x46442c)=>this['_updateActiveAnnotation'](_0x46442c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5a8d9,_0x45cdb5)=>this['_reopenCommentThread'](_0x45cdb5)),this['on']('reopenCommentThread',(_0xf3e36d,_0x142efb)=>this['_updateActiveAnnotation'](_0x142efb),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2c85f9,_0x14844b)=>this['_removeCommentThread'](_0x14844b)),this['on']('updateCommentThread',(_0x104a73,_0x43b499)=>this['_updateCommentThread'](_0x43b499)),this['on']('updateCommentThread',(_0x5cf5ed,_0x3d6d69)=>this['_updateActiveAnnotation'](_0x3d6d69),{'priority':'lowest'}),this['on']('addComment',(_0x3a709f,_0x1d3f95)=>this['_addComment'](_0x1d3f95)),this['on']('updateComment',(_0x4cd8c5,_0x276e66)=>this['_updateComment'](_0x276e66)),this['on']('removeComment',(_0x937c2e,_0x5e2fda)=>this['_removeComment'](_0x5e2fda)),this['on']('addComment',(_0x36ebac,{threadId:_0x9e630d,isFromAdapter:_0x9fdf6e})=>{if(_0x9fdf6e)return;const _0x2897ea=this['getCommentThread'](_0x9e630d),_0x569680=_0x2897ea&&this['_threadToController']['get'](_0x2897ea);_0x569680&&_0x569680['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1298f8,'change:activeAnnotations',(_0x35c38a,_0x4d5b7f,_0x51fd8e)=>{const _0x19387f=Array['from'](_0x51fd8e)['map'](_0x3f697e=>this['_viewToController']['get'](_0x3f697e['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x19387f?_0x19387f['model']:null;});}set['adapter'](_0x5154a1){if(this['_adapter'])throw new _0x2d21f6('commentsrepository-adapter-already-set');this['_adapter']=_0x5154a1;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4d7c8b=zt,threadId:_0x4a4a28=_0x3edb58(),comments:_0x4c0418=[],unlinkedAt:_0x56a0ea=null,resolvedAt:_0x222a35=null,resolvedBy:_0x2d4947=null,target:_0x571019=null,context:_0x903c29=null,attributes:_0x589d98={},isResolvable:_0x3209cd=!0x0,isSubmitted:_0x33dc8c=!0x1,isFromAdapter:_0x20125e=!0x1}={}){return this['fire'](ii('addCommentThread',_0x4d7c8b),{'channelId':_0x4d7c8b,'threadId':_0x4a4a28,'comments':_0x4c0418,'unlinkedAt':_0x56a0ea,'resolvedAt':_0x222a35,'resolvedBy':_0x2d4947,'target':_0x571019,'context':_0x903c29,'attributes':_0x589d98,'isFromAdapter':_0x20125e,'isResolvable':_0x3209cd,'isSubmitted':_0x33dc8c}),this['getCommentThread'](_0x4a4a28);}['openNewCommentThread']({channelId:_0x3527fe=zt,threadId:_0x52e8a7=_0x3edb58(),target:_0x171b04,context:_0x44fdaa=null,isResolvable:_0x59504d=!0x0}){if(this['_readOnlyChannels']['has'](_0x3527fe)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x171b04)throw new _0x2d21f6('commentsrepository-missing-target');const _0x25c849=this['addCommentThread']({'channelId':_0x3527fe,'threadId':_0x52e8a7,'target':_0x171b04,'context':_0x44fdaa,'isResolvable':_0x59504d});if(!_0x25c849)return null;const _0x26be6b=this['_threadToController']['get'](_0x25c849),_0x1d4532=_0x26be6b['view']['commentThreadInputView']['commentInputView'],_0xc24a8e=this['context']['plugins']['get']($t),_0x1d388d=_0xc24a8e['getByInnerView'](_0x26be6b['view']);return _0xc24a8e['activate'](_0x1d388d),_0x1d4532['once']('editorReady',()=>_0x1d4532['focus']()),_0x25c849;}['hasCommentThread'](_0x4adf12){if('string'!=typeof _0x4adf12)throw new _0x2d21f6('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4adf12);}['updateCommentThread']({channelId:_0x352d7a=zt,threadId:_0x135a8c,context:_0xe3c441,unlinkedAt:_0x44bf78,attributes:_0x5377a6,isFromAdapter:_0x4b64f8=!0x1}){return this['fire'](ii('updateCommentThread',_0x352d7a),{'channelId':_0x352d7a,'threadId':_0x135a8c,'context':_0xe3c441,'unlinkedAt':_0x44bf78,'attributes':_0x5377a6,'isFromAdapter':_0x4b64f8}),this['getCommentThread'](_0x135a8c);}['getCommentThread'](_0x4a6c74){if('string'!=typeof _0x4a6c74)throw new _0x2d21f6('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4a6c74);}['fetchCommentThread']({channelId:_0x52f7c9,threadId:_0x3803fe}={}){const _0x19a723=this['getCommentThread'](_0x3803fe);if(_0x19a723)return Promise['resolve'](_0x19a723);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2d21f6('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x52f7c9,'threadId':_0x3803fe})['then'](_0x3c6de1=>this['hasCommentThread'](_0x3803fe)?this['getCommentThread'](_0x3803fe):_0x3c6de1?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x52f7c9},_0x3c6de1)):void 0x0)['catch'](_0x5297cf=>{throw console['error'](_0x5297cf),new _0x2d21f6('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4121bd,skipNotAttached:_0x2195b9=!0x1,skipEmpty:_0x25a0a2=!0x1,toJSON:_0x3705c0=!0x1}={}){const _0x24ffa4=[];for(const _0x50366e of this['_threads']['values']())_0x4121bd&&_0x50366e['channelId']!==_0x4121bd||_0x2195b9&&!_0x50366e['isAttached']||_0x25a0a2&&0x0===_0x50366e['length']||_0x24ffa4['push'](_0x50366e);return _0x3705c0?_0x24ffa4['map'](_0x4ccc12=>_0x4ccc12['toJSON']()):_0x24ffa4;}['getAnnotationForCommentThread'](_0x52a038){const _0x43c78c=this['_threadToController']['get'](_0x52a038);if(!_0x43c78c)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x43c78c['view'])||null;}['getCommentThreadForAnnotation'](_0x5ec141){const _0x23f64f=this['_viewToController']['get'](_0x5ec141['innerView']);return _0x23f64f?_0x23f64f['model']:null;}['setActiveCommentThread'](_0x4a436c){const _0x3ccd8f=this['context']['plugins']['get']($t);if(!_0x4a436c)return void(this['activeCommentThread']&&_0x3ccd8f['deactivateAll']());const _0xcaa6ef=this['getCommentThread'](_0x4a436c);if(!_0xcaa6ef)throw new _0x2d21f6('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4a436c});if(!this['_threadToController']['has'](_0xcaa6ef))throw new _0x2d21f6('commentsrepository-active-not-attached',null,{'threadId':_0x4a436c});const _0x4ff715=_0x3ccd8f['getByInnerView'](this['_threadToController']['get'](_0xcaa6ef)['view']);_0x3ccd8f['activate'](_0x4ff715);}['switchReadOnly'](_0x376637,_0x8f44be){_0x376637?this['_readOnlyChannels']['add'](_0x8f44be):this['_readOnlyChannels']['delete'](_0x8f44be),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x43d666){return this['_readOnlyChannels']['has'](_0x43d666)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x565ec0,_0x302cb5){return new It(_0x565ec0,_0x302cb5);}['setPermissions'](_0x43b6cd,_0x5dffea=zt){this['_permissions']['set'](_0x5dffea,_0x43b6cd),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xac1b30=zt){return this['_permissions']['has'](_0xac1b30)?this['_permissions']['get'](_0xac1b30):Jt;}['_addCommentThread']({channelId:_0x26aca7,threadId:_0x1b35c0,comments:_0x13937a,unlinkedAt:_0x24a9be,resolvedAt:_0x45627f,resolvedBy:_0x32c547,target:_0x2333db,context:_0x492b16,attributes:_0x2445cb,isFromAdapter:_0x26eb95,isResolvable:_0x13ba9e,isSubmitted:_0x1482da}){if('string'!=typeof _0x1b35c0)throw new _0x2d21f6('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1b35c0});if(this['hasCommentThread'](_0x1b35c0))throw new _0x2d21f6('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1b35c0});const _0x461f38=new Zt(this,{'channelId':_0x26aca7,'id':_0x1b35c0,'context':_0x492b16,'attributes':_0x2445cb,'unlinkedAt':_0x24a9be,'resolvedAt':_0x45627f,'resolvedBy':_0x32c547?this['context']['plugins']['get'](_0x4472e4)['getUser'](_0x32c547):null,'isResolvable':_0x13ba9e,'isSubmitted':_0x1482da||_0x26eb95});this['_threads']['set'](_0x1b35c0,_0x461f38);for(const _0x5d7769 of _0x13937a)_0x461f38['_add'](this['_createNewComment']({'threadId':_0x1b35c0,..._0x5d7769}));return _0x2333db&&_0x461f38['attachTo'](_0x2333db),_0x26eb95||!_0x461f38['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x26aca7,'threadId':_0x1b35c0});}['_submitCommentThread']({channelId:_0x36bf14,threadId:_0x5f8f0f}){if(!this['hasCommentThread'](_0x5f8f0f))throw new _0x2d21f6('commentsrepository-missing-comment-thread',this);const _0x1967f1=this['getCommentThread'](_0x5f8f0f);if(_0x1967f1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4f16df,comments:_0x3dbcd6,resolvedAt:_0x2b20ef,resolvedBy:_0x385d41,context:_0x3eb7c1,attributes:_0x3913ee}=_0x1967f1,_0x3df2ef=this['context']['plugins']['get']('PendingActions'),_0x59ddcc=_0x3df2ef['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x36bf14,'threadId':_0x4f16df,'comments':_0x3dbcd6['map'](_0x204846=>_0x204846['toJSON']()),'resolvedAt':_0x2b20ef,'resolvedBy':_0x385d41?_0x385d41['id']:_0x385d41,'context':_0x3eb7c1,'attributes':_0x3913ee})['then'](({comments:_0x55479c})=>{_0x3df2ef['remove'](_0x59ddcc);for(const _0x105eca of _0x55479c)this['_updateComment']({'channelId':_0x36bf14,'threadId':_0x5f8f0f,'commentId':_0x105eca['commentId'],'createdAt':_0x105eca['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1f8294=>{throw console['error'](_0x1f8294),new _0x2d21f6('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x1d7b21,target:_0x20917f}){const _0x50e4a2=this['getCommentThread'](_0x1d7b21);if(!_0x50e4a2)throw new _0x2d21f6('commentsrepository-attach-missing-comment-thread',this);const _0x263658=this['context']['plugins']['get']('PendingActions'),_0x5ac2f4=this['context']['plugins']['get']($t),_0x47af5f=this['_createCommentThreadView'](_0x50e4a2),_0x20350f=new It(_0x50e4a2,_0x47af5f);let _0x3ed5c7=null;_0x47af5f['on']('change:isDirty',(_0x2cea80,_0x1a9157,_0x796193)=>{_0x796193?_0x3ed5c7=_0x263658['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3ed5c7&&(_0x263658['remove'](_0x3ed5c7),_0x3ed5c7=null);}),this['_threadToController']['set'](_0x50e4a2,_0x20350f),this['_viewToController']['set'](_0x47af5f,_0x20350f);const _0x426812=new Kt(this['context']['locale'],_0x47af5f);_0x426812['bind']('length')['to'](_0x47af5f),_0x426812['bind']('isDirty')['to'](_0x47af5f,'isDirty',_0x47af5f,'length',(_0x35af07,_0x5f5971)=>_0x35af07||!_0x5f5971),_0x426812['bind']('isActive')['to'](_0x47af5f),_0x426812['type']='comment';const _0x3a59e6=new Yt({'view':_0x426812,'target':_0x20917f,'type':'comment','isVisible':!_0x50e4a2['archivedAt']&&!!('function'==typeof _0x20917f?_0x20917f():_0x20917f)});return _0x47af5f['on']('escape',()=>{_0x3a59e6['fire']('escape');}),this['_bindAnnotationToEditors'](_0x47af5f,_0x3a59e6),_0x5ac2f4['add'](_0x3a59e6),_0x3a59e6;}['_bindAnnotationToEditors'](_0x581cb1,_0x478b96){this['listenTo'](_0x581cb1,'editorReady',(_0x119106,_0x3fcf8f)=>{const _0x3833bb=_0x3fcf8f['ui']['view']['body']['bodyCollectionContainer'];_0x478b96['focusableElements']['add'](_0x3833bb),this['context']instanceof _0x343be2&&this['context']['ui']['focusTracker']['add'](_0x3833bb);},{'priority':'highest'}),this['listenTo'](_0x581cb1,'editorDestroyed',(_0x4beb0b,_0x50364e)=>{const _0x566b1b=_0x50364e['ui']['view']['body']['bodyCollectionContainer'];_0x478b96['focusableElements']['has'](_0x566b1b)&&_0x478b96['focusableElements']['remove'](_0x566b1b),this['context']instanceof _0x343be2&&this['context']['ui']['focusTracker']['remove'](_0x566b1b);});}['_unbindEditors'](_0x9b26af){this['stopListening'](_0x9b26af,'editorReady'),this['stopListening'](_0x9b26af,'editorDestroyed');}['_createCommentThreadView'](_0x33b917){const _0x4ae3ca=this['context']['plugins']['get'](_0x4472e4),{config:_0x52155a,locale:_0x569567}=this['context'],_0x13ba84=_0x5dc671(_0x52155a['get']('locale'),_0x569567);return new(0x0,(_0x52155a['get']('comments'))['CommentThreadView'])(_0x569567,_0x33b917,_0x4ae3ca['me'],{'editorConfig':{..._0x52155a['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x52155a['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x52155a['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x52155a['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x52155a['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x13ba84,'CommentView':_0x52155a['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x12e620,channelId:_0x446e35,resolvedAt:_0x20d614,resolvedBy:_0x2ece06,isFromAdapter:_0x5bc89c}){if(!this['hasCommentThread'](_0x12e620))throw new _0x2d21f6('commentsrepository-missing-comment-thread',null,{'threadId':_0x12e620});const _0x50b9ee=this['getCommentThread'](_0x12e620);if(_0x50b9ee['isResolved'])throw new _0x2d21f6('commentsrepository-resolved-comment-thread',null,{'threadId':_0x12e620});const _0x1ff7b3=this['context']['plugins']['get'](_0x4472e4);if(_0x50b9ee['resolvedBy']=_0x1ff7b3['getUser'](_0x2ece06),_0x50b9ee['resolvedAt']=_0x20d614,_0x5bc89c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5be477=this['context']['plugins']['get']('PendingActions'),_0x104cce=_0x5be477['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x446e35,'threadId':_0x12e620})['then'](({resolvedAt:_0x536c81,resolvedBy:_0x423ec1})=>{_0x5be477['remove'](_0x104cce),_0x50b9ee['resolvedBy']['id']!==_0x423ec1&&(_0x50b9ee['resolvedBy']=_0x1ff7b3['getUser'](_0x423ec1)),_0x50b9ee['resolvedAt']=_0x536c81;})['catch'](_0x5ccc52=>{throw console['error'](_0x5ccc52),new _0x2d21f6('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x14f173,channelId:_0x5d644f,isFromAdapter:_0x53fe96}){if(!this['hasCommentThread'](_0x14f173))throw new _0x2d21f6('commentsrepository-missing-comment-thread',null,{'threadId':_0x14f173});const _0x1019ff=this['getCommentThread'](_0x14f173);if(!_0x1019ff['isResolved'])throw new _0x2d21f6('commentsrepository-reopen-comment-thread',null,{'threadId':_0x14f173});if(_0x1019ff['resolvedBy']=null,_0x1019ff['resolvedAt']=null,_0x53fe96||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2fdbf4=this['context']['plugins']['get']('PendingActions'),_0xe9ccd6=_0x2fdbf4['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5d644f,'threadId':_0x14f173})['then'](()=>_0x2fdbf4['remove'](_0xe9ccd6))['catch'](_0x53d9d1=>{throw console['error'](_0x53d9d1),new _0x2d21f6('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3b6626,isFromAdapter:_0x2bb9fb}){const _0xd0a52e=this['getCommentThread'](_0x3b6626);if(!_0xd0a52e)throw new _0x2d21f6('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3b6626),this['_threads']['delete'](_0x3b6626),!_0xd0a52e['isSubmitted']||_0x2bb9fb||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x597b5e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x48d6f5}=_0xd0a52e,_0xc74c9e=_0x597b5e['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x48d6f5,'threadId':_0x3b6626})['then'](()=>_0x597b5e['remove'](_0xc74c9e))['catch'](_0x381da4=>{throw console['error'](_0x381da4),new _0x2d21f6('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x18ea57,unlinkedAt:_0x48991b,context:_0x12196a,attributes:_0x2ca66b,isFromAdapter:_0x5b4334}){if('string'!=typeof _0x18ea57)throw new _0x2d21f6('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x18ea57});if(!this['hasCommentThread'](_0x18ea57))throw new _0x2d21f6('commentsrepository-missing-comment-thread',null,{'threadId':_0x18ea57});const _0x1b93a2=this['getCommentThread'](_0x18ea57);let _0x4845fb=!0x1;if(void 0x0!==_0x12196a&&_0x1b93a2['context']!==_0x12196a&&(_0x1b93a2['context']=_0x12196a,_0x4845fb=!0x0),void 0x0!==_0x48991b&&_0x1b93a2['unlinkedAt']!==_0x48991b&&(_0x1b93a2['unlinkedAt']=_0x48991b,_0x4845fb=!0x0),_0x2ca66b&&!_0x482118(_0x2ca66b,_0x1b93a2['attributes'])&&(_0x1b93a2['attributes']=_0x2ca66b,_0x4845fb=!0x0),!_0x4845fb)return Promise['resolve']();if(!_0x1b93a2['isSubmitted']||_0x5b4334||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x514b34=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cb826}=_0x1b93a2,_0x4daa71=_0x514b34['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4cb826,'threadId':_0x18ea57,'context':_0x12196a,'unlinkedAt':_0x48991b,'attributes':_0x2ca66b})['then'](()=>_0x514b34['remove'](_0x4daa71))['catch'](_0x58b100=>{throw console['error'](_0x58b100),new _0x2d21f6('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4c0209){const _0x1af14d=this['context']['plugins']['get']($t),_0x1ddc4a=this['getCommentThread'](_0x4c0209);if(_0x1ddc4a['_isAttached']=!0x1,this['_threadToController']['has'](_0x1ddc4a)){const _0x333240=this['_threadToController']['get'](_0x1ddc4a),_0x2b80c7=_0x333240['view'],_0x5e4265=_0x1af14d['getByInnerView'](_0x2b80c7);this['_threadToController']['delete'](_0x1ddc4a),this['_viewToController']['delete'](_0x2b80c7),_0x5e4265&&_0x1af14d['remove'](_0x5e4265),_0x333240['destroy'](),_0x2b80c7['destroy']()['then'](()=>{this['_unbindEditors'](_0x2b80c7);});}}['_updateActiveAnnotation']({threadId:_0x2cc57e,resolvedAt:_0x5e9464,unlinkedAt:_0x29da68}){const _0x2c5987=!!_0x5e9464,_0x14ba52=this['context']['plugins']['get']($t),_0x28fbce=this['getCommentThread'](_0x2cc57e);if(this['_threadToController']['has'](_0x28fbce)){const _0x4d7f9d=this['_threadToController']['get'](_0x28fbce)['view'],_0x5d25d5=_0x14ba52['getByInnerView'](_0x4d7f9d);_0x5d25d5&&(_0x2c5987&&_0x14ba52['_removeActiveAnnotation'](_0x5d25d5),_0x29da68?_0x5d25d5['isVisible']=!0x1:_0x5d25d5['refreshVisibility']());}}['_getExternalAuthor'](_0x1efd71){const _0x1c61a9=this['context']['plugins']['get'](_0x4472e4),_0x3c9024=_0x39a18b('external:'+_0x1efd71),_0x495dff=_0x1c61a9['getUser'](_0x3c9024);return _0x495dff||_0x1c61a9['addUser']({'id':_0x3c9024,'name':_0x1efd71});}['_createNewComment']({threadId:_0x3781fa,commentId:_0x5055c0=_0x3edb58(),content:_0x2a88b5,authorId:_0xc0be3c,createdAt:_0x50d0e7,attributes:_0x19a6f6}){if('string'!=typeof _0x5055c0)throw new _0x2d21f6('commentsrepository-invalid-commentid');if('string'!=typeof _0xc0be3c)throw new _0x2d21f6('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2a88b5||!_0x2a88b5['trim']())throw new _0x2d21f6('commentsrepository-invalid-comment-content');const _0x336210=this['context']['plugins']['get'](_0x4472e4)['getUser'](_0xc0be3c);if(!_0x336210)throw new _0x2d21f6('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xc0be3c});let _0x331a5c=null,_0x3d39f2=_0x50d0e7;return _0x19a6f6?.['@external']&&(_0x331a5c=this['_getExternalAuthor'](_0x19a6f6['@external']['authorName']),_0x3d39f2=new Date(_0x19a6f6['@external']['createdAt'])),new ti(this,{'threadId':_0x3781fa,'id':_0x5055c0,'author':_0x331a5c||_0x336210,'creator':_0x336210,'content':_0x2a88b5,'createdAt':_0x50d0e7,'authoredAt':_0x3d39f2,'attributes':_0x19a6f6});}['_addComment'](_0x5d3703){let {threadId:_0x57aae0,content:_0x2dd107,attributes:_0x5d1ce7,isFromAdapter:_0x159ca7}=_0x5d3703;const _0x460f63=this['getCommentThread'](_0x5d3703['threadId']);if(!_0x460f63)throw new _0x2d21f6('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1062c6=this['_createNewComment'](_0x5d3703),{id:_0x374190}=_0x1062c6;if(_0x460f63['_add'](_0x1062c6),_0x159ca7||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x460f63['isSubmitted'])return Promise['resolve']();const _0x2f0800=this['context']['plugins']['get']('PendingActions'),{channelId:_0x21a605}=_0x460f63,_0x7640fe=_0x2f0800['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5d1ce7||(_0x5d1ce7={}),this['adapter']['addComment']({'channelId':_0x21a605,'threadId':_0x57aae0,'commentId':_0x374190,'content':_0x2dd107,'attributes':_0x5d1ce7})['then'](_0x5b88b0=>{_0x2f0800['remove'](_0x7640fe),_0x5b88b0&&this['_updateComment']({'channelId':_0x21a605,'threadId':_0x57aae0,'commentId':_0x374190,'createdAt':_0x5b88b0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4d80ac=>{throw console['error'](_0x4d80ac),new _0x2d21f6('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5a2cad,commentId:_0x5e1711,content:_0x57e054,createdAt:_0x1904c1,attributes:_0x2d2497,isFromAdapter:_0x1bc661}){if(void 0x0!==_0x57e054&&('string'!=typeof _0x57e054||!_0x57e054['trim']()['length']))throw new _0x2d21f6('commentsrepository-update-comment-invalid-content');const _0x430c64=this['getCommentThread'](_0x5a2cad),_0x502a33=_0x430c64['getComment'](_0x5e1711);if(!_0x502a33)throw new _0x2d21f6('commentsrepository-update-missing-comment',this);let _0x350376=!0x1;if(_0x57e054&&_0x57e054!==_0x502a33['content']&&(_0x502a33['isEditable']||_0x1bc661)&&(_0x502a33['content']=_0x57e054,_0x350376=!0x0),_0x1904c1&&_0x1904c1!==_0x502a33['createdAt']&&(_0x502a33['createdAt']=_0x1904c1,_0x502a33['attributes']&&_0x502a33['attributes']['@external']||(_0x502a33['authoredAt']=_0x1904c1),_0x350376=!0x0),_0x2d2497&&!_0x482118(_0x2d2497,_0x502a33['attributes'])&&(_0x502a33['attributes']=_0x2d2497,_0x350376=!0x0),!_0x350376)return Promise['resolve']();if(_0x430c64['fire']('commentUpdated'),_0x1bc661||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x278f94=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5309f5}=this['getCommentThread'](_0x502a33['threadId']),_0x556e31=_0x278f94['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5309f5,'threadId':_0x5a2cad,'commentId':_0x5e1711,'content':_0x57e054,'attributes':_0x2d2497})['then'](()=>_0x278f94['remove'](_0x556e31))['catch'](_0x19275f=>{throw console['error'](_0x19275f),new _0x2d21f6('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x54a8d9,commentId:_0x3923b9,isFromAdapter:_0x2e13e8}){const _0x2ac3e5=this['getCommentThread'](_0x54a8d9),_0x1862b0=_0x2ac3e5['getComment'](_0x3923b9);if(!_0x1862b0)throw new _0x2d21f6('commentsrepository-remove-missing-comment',this);if(_0x2ac3e5['_remove'](_0x1862b0),_0x2e13e8||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x910b00=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4dad17}=_0x2ac3e5,_0x396bd8=_0x910b00['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4dad17,'threadId':_0x54a8d9,'commentId':_0x3923b9})['then'](()=>_0x910b00['remove'](_0x396bd8))['catch'](_0x3a149f=>{throw console['error'](_0x3a149f),new _0x2d21f6('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x222b58(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x394eb0,_0x28d9d1){super();const _0x190d15=_0x28d9d1['isResolvable'];this['channelId']=_0x28d9d1['channelId'],this['id']=_0x28d9d1['id'],this['comments']=new _0xf4c9ca(),this['_repository']=_0x394eb0,this['_isAttached']=!0x1,this['_isSubmitted']=_0x28d9d1['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x394eb0,'_permissions',_0x394eb0,'_readOnlyChannels',()=>_0x394eb0['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x394eb0,'_permissions',()=>_0x394eb0['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x394eb0,'_permissions',()=>{const _0x3a0382=_0x394eb0['getPermissions'](this['channelId']);return _0x3a0382['write']||_0x3a0382['admin'];}),this['bind']('isResolvable')['to'](_0x394eb0,'_permissions',()=>_0x190d15&&_0x394eb0['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x28d9d1['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x45ccbc,_0x2e7fae)=>_0x45ccbc?_0x2e7fae?_0x45ccbc<_0x2e7fae?_0x45ccbc:_0x2e7fae:_0x45ccbc:_0x2e7fae),this['set']('unlinkedAt',_0x28d9d1['unlinkedAt']||null),this['set']('resolvedAt',_0x28d9d1['resolvedAt']||null),this['set']('resolvedBy',_0x28d9d1['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x26c92e=>!!_0x26c92e),this['set']('attributes',_0x28d9d1['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x499277,_0x3a9f5a)=>_0x499277+_0x3a9f5a['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xcb11fd,id:_0x1177a0}=this;this['_repository']['fire'](ii('submitCommentThread',_0xcb11fd),{'channelId':_0xcb11fd,'threadId':_0x1177a0});}['setUnlinkedAt'](_0x281df0){this['_update']({'unlinkedAt':_0x281df0});}['resolve']({resolvedAt:_0x3cb9ee=new Date(),resolvedBy:_0xcaf46b='',isFromAdapter:_0x117d79=!0x1}={}){const _0x4c42e7=this['_repository']['context']['plugins']['get'](_0x4472e4)['me'],{channelId:_0x241e73,id:_0x5ac595}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x241e73),{'channelId':_0x241e73,'threadId':_0x5ac595,'resolvedAt':_0x3cb9ee,'resolvedBy':_0xcaf46b||_0x4c42e7['id'],'isFromAdapter':_0x117d79});}['reopen']({isFromAdapter:_0x311726=!0x1}={}){const {channelId:_0xc88ea8,id:_0x263403}=this;this['_repository']['fire'](ii('reopenCommentThread',_0xc88ea8),{'channelId':_0xc88ea8,'threadId':_0x263403,'isFromAdapter':_0x311726});}['setContext'](_0x1c0710){this['context']||this['_update']({'context':_0x1c0710});}['setAttribute'](_0x182e30,_0x1bbf4c){const _0x5a5bf6=_0x5ef8ad(this['attributes']);_0x67627a(_0x5a5bf6,_0x182e30,_0x1bbf4c),this['_update']({'attributes':_0x5a5bf6});}['removeAttribute'](_0x47dde3){const _0x2ac610=_0x5ef8ad(this['attributes']);_0x413a05(_0x2ac610,_0x47dde3),this['_update']({'attributes':_0x2ac610});}['remove']({isFromAdapter:_0x30ff79=!0x1}={}){const {channelId:_0x525435,id:_0x4c4b1f}=this;this['_repository']['fire'](ii('removeCommentThread',_0x525435),{'channelId':_0x525435,'threadId':_0x4c4b1f,'isFromAdapter':_0x30ff79});}['attachTo'](_0x3e1b63){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x3e1b63});}['addComment'](_0x5dd3ab){const {channelId:_0x589e76,id:_0x6551e2}=this;this['_repository']['fire'](ii('addComment',_0x589e76,_0x6551e2),Object['assign']({'channelId':_0x589e76,'threadId':_0x6551e2},_0x5dd3ab));}['getComment'](_0x436720){if('string'!=typeof _0x436720)throw new _0x2d21f6('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x436720});return this['comments']['get'](_0x436720);}['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'](_0x46c039=>_0x46c039['toJSON']()),'attributes':this['attributes']};}['_add'](_0x581385){return this['listenTo'](_0x581385,'change:authoredAt',()=>{const _0x42593b=this['_findOptimalIndex'](_0x581385),_0x3627f6=this['comments'];_0x42593b-0x1!=_0x3627f6['getIndex'](_0x581385)&&_0x42593b+0x1!=_0x3627f6['getIndex'](_0x581385)&&(this['_remove'](_0x581385),this['_add'](_0x581385));}),this['comments']['add'](_0x581385,this['_findOptimalIndex'](_0x581385));}['_update'](_0x1c5e6e){const {channelId:_0x3b01bc,id:_0xe1afb8}=this;this['_repository']['fire'](ii('updateCommentThread',_0x3b01bc),{..._0x1c5e6e,'channelId':_0x3b01bc,'threadId':_0xe1afb8});}['_remove'](_0x2567c8){return this['stopListening'](_0x2567c8),_0x2567c8['destroy'](),this['comments']['remove'](_0x2567c8);}['_findOptimalIndex'](_0x159a9a){const _0x44a343=this['comments']['find'](_0x10d653=>new Date(_0x10d653['authoredAt'])['getTime']()>new Date(_0x159a9a['authoredAt'])['getTime']());return _0x44a343?this['comments']['getIndex'](_0x44a343):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x222b58(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x22f44a,_0x32ea07){super();const _0x33b8ee=_0x22f44a['context']['plugins']['get'](_0x4472e4)['me'],_0x1b1e32=_0x22f44a['getCommentThread'](_0x32ea07['threadId']),_0x533b23=0x0===_0x1b1e32['comments']['length'],_0x1c1695=_0x33b8ee===_0x32ea07['author'];this['id']=_0x32ea07['id'],this['threadId']=_0x32ea07['threadId'],this['author']=_0x32ea07['author'],this['creator']=_0x32ea07['creator'],this['isExternal']=Boolean(_0x32ea07['attributes']&&_0x32ea07['attributes']['@external']),this['set']('content',_0x32ea07['content']),this['createdAt']=_0x32ea07['createdAt']||new Date(),this['set']('authoredAt',_0x32ea07['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1b1e32,'resolvedAt'),this['set']('attributes',_0x32ea07['attributes']||{}),this['bind']('isEditable')['to'](_0x22f44a,'_permissions',()=>{const _0x860072=_0x22f44a['getPermissions'](_0x1b1e32['channelId'])['write'],_0x53f1cb=_0x22f44a['getPermissions'](_0x1b1e32['channelId'])['modifyAll'];return _0x1c1695&&_0x860072||!_0x1c1695&&_0x53f1cb;}),this['bind']('isRemovable')['to'](_0x1b1e32,'isRemovable',_0x22f44a,'_permissions',_0x2ebc3b=>{const _0x4fbaa4=_0x22f44a['getPermissions'](_0x1b1e32['channelId'])['write'],_0x478df3=_0x22f44a['getPermissions'](_0x1b1e32['channelId'])['modifyAll'];return _0x1c1695&&_0x4fbaa4||_0x2ebc3b&&_0x533b23||!_0x1c1695&&_0x478df3&&!_0x533b23;}),this['bind']('isReadOnly')['to'](_0x1b1e32,'isReadOnly'),this['_repository']=_0x22f44a;}get['weight'](){return Math['max'](function(_0x120cc5){const _0x14658a=document['createElement']('div');return _0x14658a['innerHTML']=_0x120cc5,_0x14658a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2156e5){const {threadId:_0x3e9b28,id:_0x71aa06}=this;if(!this['_repository']['hasCommentThread'](_0x3e9b28))throw new _0x2d21f6('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3e5a8b}=this['_repository']['getCommentThread'](_0x3e9b28);this['_repository']['fire'](ii('updateComment',_0x3e5a8b,_0x3e9b28),{'channelId':_0x3e5a8b,'threadId':_0x3e9b28,'commentId':_0x71aa06,..._0x2156e5});}['setAttribute'](_0xb2fe1d,_0x443578){const _0x15c9e3=_0x5ef8ad(this['attributes']);_0x67627a(_0x15c9e3,_0xb2fe1d,_0x443578),this['update']({'attributes':_0x15c9e3});}['removeAttribute'](_0x3bc43d){const _0x3e0ab3=_0x5ef8ad(this['attributes']);_0x413a05(_0x3e0ab3,_0x3bc43d),this['update']({'attributes':_0x3e0ab3});}['remove'](_0x3d880f={}){if(!_0x3d880f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2efe97,id:_0x2f4946}=this;if(!this['_repository']['hasCommentThread'](_0x2efe97))throw new _0x2d21f6('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xef3e71}=this['_repository']['getCommentThread'](_0x2efe97);this['_repository']['fire'](ii('removeComment',_0xef3e71,_0x2efe97),{'channelId':_0xef3e71,'threadId':_0x2efe97,'commentId':_0x2f4946,..._0x3d880f});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x23ccbe,..._0x57f3a7){for(const _0x5dda9a of _0x57f3a7)void 0x0!==_0x5dda9a&&(_0x23ccbe+=':'+String(_0x5dda9a));return _0x23ccbe;}class ei extends _0x150035{constructor(_0x2447b6){super(_0x2447b6),this['set']('hasContent',!0x1);}['refresh'](){const _0x5ced21=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x50034e of _0x5ced21['getRanges']())if(this['_hasContent'](_0x50034e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x2da1f4=_0x3edb58(),ranges:_0x1a123a,comment:_0x2d78e7}={}){const _0x3e9a6e=this['editor']['model'],_0x435495=_0x1a123a??Array['from'](_0x3e9a6e['document']['selection']['getRanges']()),_0x49a6da=[];for(const _0x5259bd of _0x435495)this['_hasContent'](_0x5259bd)&&_0x49a6da['push'](this['_trimToContent'](_0x5259bd));if(!_0x49a6da['length'])throw new _0x2d21f6('addcommentthreadcommand-incorrect-ranges',null);_0x2d78e7&&this['_createCommentThread'](_0x2da1f4,_0x2d78e7),this['_createMarkersFromRanges'](_0x2da1f4,_0x49a6da,!!_0x2d78e7);}['_createMarkersFromRanges'](_0x55615b,_0x7eb075,_0x3d6f22){this['editor']['model']['change'](_0x21de3f=>{for(const _0x27de94 of _0x7eb075){const _0x3aa3aa=_0x3edb58()['substr'](0x1,0x5),_0xc84642='comment:'+_0x55615b+':'+_0x3aa3aa;_0x21de3f['addMarker'](_0xc84642,{'range':_0x27de94,'usingOperation':_0x3d6f22,'affectsData':_0x3d6f22});}});}['_createCommentThread'](_0x47f28a,_0x2baefd){const _0x1fea24=this['editor']['plugins']['get']('CommentsRepository'),_0x318f58=this['editor']['config']['get']('collaboration.channelId'),_0x4b5db9=this['editor']['plugins']['get']('Users')['me'];if(!_0x4b5db9)throw new _0x2d21f6('addcommentthreadcommand-user-not-found',null);_0x1fea24['addCommentThread']({'threadId':_0x47f28a,'channelId':_0x318f58,'comments':[{'authorId':_0x4b5db9['id'],'content':_0x2baefd,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3956c3){for(const _0x4fec5c of _0x3956c3['getItems']())if(this['_itemIsContent'](_0x4fec5c))return!0x0;return!0x1;}['_itemIsContent'](_0x59c98b){return _0x59c98b['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x59c98b)&&!_0x59c98b['is']('element','tableCell');}['_trimToContent'](_0x10e87d){const _0x955feb=_0x1bb177=>!this['_itemIsContent'](_0x1bb177['item']),_0x206695=_0x10e87d['start']['getLastMatchingPosition'](_0x955feb),_0x29a963=_0x10e87d['end']['getLastMatchingPosition'](_0x955feb,{'direction':'backward'});return this['editor']['model']['createRange'](_0x206695,_0x29a963);}}class si extends _0x91311a{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e9a20){super(_0x4e9a20),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5b51f3=this['editor'],_0x5d4998=_0x5b51f3['model']['document']['selection'],_0x298190=_0x51df8a(()=>this['refreshSelectedViews'](),0xa);_0x5d4998['on']('change:range',(_0x208f7f,_0x435324)=>{_0x435324['directChange']&&(_0x298190['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5b51f3['editing']['view']['document'],'change:isFocused',(_0x4f69fa,_0x45a73e,_0x14b797)=>{_0x14b797&&_0x298190();}),this['listenTo'](_0x5b51f3['ui']['focusTracker'],'change:isFocused',(_0x54823a,_0xe14387,_0x50cc48)=>{_0x50cc48||this['fire']('blur',{'isAnnotationTracked':_0x2fcdea=>this['_editorAnnotationsData']['has'](_0x2fcdea['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5f478d){if(this['_editorAnnotations']['has'](_0x5f478d['view']))return;this['_editorAnnotations']['add'](_0x5f478d['view']),this['editor']['ui']['focusTracker']['add'](_0x5f478d['view']['element']);const _0x35bbe5=this['editor']['plugins']['get']($t);this['listenTo'](_0x35bbe5['collection'],'remove',(_0x3ad1c5,_0x551a90)=>{this['editor']['ui']['focusTracker']['remove'](_0x551a90['view']['element']),this['_editorAnnotations']['delete'](_0x551a90['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x335840){if('function'!=typeof _0x335840)throw new _0x2d21f6('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x335840);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x291554,annotations:_0x4e2d71}){const _0x371665=[],_0x1a5f2d=this['editor']['model']['document']['selection'],_0x6a1c6f=Array['from'](_0x1a5f2d['getRanges']());for(const [_0x1fed2a,_0x35c970]of this['_editorAnnotationsData']){const _0x3be55c=_0x45687a(_0x35c970),_0x409fdb=_0x4e2d71['getByInnerView'](_0x1fed2a);_0x3be55c&&_0x409fdb&&_0x371665['push']({'annotation':_0x409fdb,'range':_0x3be55c});}function _0x45687a(_0x1a948e){for(const _0x499f36 of _0x1a948e)for(const _0x3eab7c of _0x6a1c6f)if(_0x499f36['containsRange'](_0x3eab7c,!_0x1a5f2d['isCollapsed']))return _0x499f36;return null;}return _0x371665['sort']((_0x15f70b,_0x55850d)=>{const _0x17df49=_0x15f70b['range'],_0x40f4aa=_0x55850d['range'];if(!_0x17df49['isEqual'](_0x40f4aa)){if(_0x17df49['containsRange'](_0x40f4aa,!0x0))return 0x1;if(_0x40f4aa['containsRange'](_0x17df49,!0x0))return-0x1;}return _0x15f70b['annotation']==_0x291554?-0x1:_0x55850d['annotation']==_0x291554?0x1:0x0;})['map'](_0xed2a82=>_0xed2a82['annotation']);}get['_editorAnnotationsData'](){const _0x4f6b99=new Map();for(const _0x4a9eb6 of Array['from'](this['_dataCollectors']))for(const [_0x1af683,_0x3db525]of _0x4a9eb6())_0x4f6b99['set'](_0x1af683,_0x3db525);return _0x4f6b99;}}class ni extends _0x91311a{['afterInit'](){const _0x5b30cf=this['editor'];if(!_0x5b30cf['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5b30cf['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x91311a{constructor(_0x476413){super(_0x476413),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x48e0cb=this['editor'],_0x5844a5=_0x48e0cb['commands']['get']('importWord'),_0x158ae9=_0x48e0cb['plugins']['get'](_0x4472e4);_0x5844a5&&(_0x5844a5['on']('execute',(_0x4ab2a3,[,_0x21bf1b])=>{_0x21bf1b['collaboration_features']={'comments':!0x0,'user_id':_0x158ae9['me']['id']};},{'priority':_0x1948af['high']+0xa}),this['listenTo'](_0x5844a5,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x20eaed,_0x2e490d){const {comment_threads:_0x530b74}=_0x2e490d;_0x530b74&&_0x530b74['forEach'](({thread_id:_0x277b3f,comments:_0x11af2a,is_resolved:_0x5190ba})=>{const _0x177651=new Date(),_0x1bfce8=_0x11af2a['map'](({author:_0x20c398,content:_0x499132,created_at:_0x13343e})=>({'content':_0x499132,'authorId':this['editor']['plugins']['get'](_0x4472e4)['me']['id'],'createdAt':_0x177651,'attributes':{'@external':{'authorName':_0x20c398,'createdAt':_0x13343e?new Date(_0x13343e):new Date(),'source':'importWord'}}})),_0x5e389d=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x5e389d,'threadId':_0x277b3f,'comments':_0x1bfce8,'resolvedAt':_0x5190ba?_0x177651:null});});}}class ri extends _0x91311a{constructor(_0x47381a){super(_0x47381a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x512d6e=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x512d6e,'contentInsertion',(_0x3c5ffc,_0x2f673c)=>this['_removeMarkersWithoutThreads'](_0x2f673c['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x22772d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x22772d;const _0x32ea94=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4c5aa3 of _0x22772d['keys']()){const [_0x3c3f66,_0x45d2be]=_0x4c5aa3['split'](':');'comment'!=_0x3c3f66||_0x32ea94['hasCommentThread'](_0x45d2be)||_0x22772d['delete'](_0x4c5aa3);}return _0x22772d;}['_registerMarkerInClipboardPipeline'](){const _0x51ea36=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x357245=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x357245&&_0x51ea36['_registerMarkerToCopy']('comment',_0x357245);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xf6284b){switch(_0xf6284b){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x8334d5){const _0x4b53c3=_0x8334d5['split'](':');return{'group':_0x4b53c3[0x0],'id':_0x4b53c3[0x1],'part':_0x4b53c3[0x2]};}class ai extends _0x91311a{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x16dcd9,_0x216da7)=>{if(!_0x216da7['options']['showCommentHighlights'])return null;if(_0x216da7['options']['ignoreResolvedComments']){const {id:_0x4bc412}=hi(_0x16dcd9['markerName']),_0x4d49e5=this['editor']['plugins']['get'](Qt);if(_0x4d49e5['getCommentThread'](_0x4bc412)?.['isResolved']&&_0x16dcd9['item'])return _0x216da7['consumable']['consume'](_0x16dcd9['item'],'addMarker:'+_0x16dcd9['markerName']),_0x216da7['consumable']['consume'](_0x16dcd9['item'],'removeMarker:'+_0x16dcd9['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2ad84c=>{_0x2ad84c['on']('addMarker:comment',(_0x42e1c3,_0x5acf83,_0x1f0439)=>{if(!_0x1f0439['options']['showCommentHighlights'])return;const _0x3ffb0f=_0x5acf83['item'];if(!_0x3ffb0f)return;const _0x412bb6=_0x1f0439['mapper']['toViewElement'](_0x3ffb0f);this['editor']['model']['schema']['isObject'](_0x3ffb0f)&&_0x412bb6&&!_0x412bb6['getCustomProperty']('widget')&&_0x412bb6['is']('containerElement')&&Ct(_0x412bb6,_0x1f0439['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x21e349,{writer:_0x2f3022,options:_0x5a1bf6})=>{if(!_0x5a1bf6['showCommentHighlights'])return null;const _0x2bd9c1=_0x2f3022['createContainerElement']('div'),_0x16428c=_0x2f3022['createEmptyElement']('hr');return _0x2f3022['addClass']('ck-horizontal-line',_0x2bd9c1),_0x2f3022['insert'](_0x2f3022['createPositionAt'](_0x2bd9c1,0x0),_0x16428c),_0x2bd9c1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x574afd,{writer:_0x344469,options:_0x18d662})=>{if(!_0x18d662['showCommentHighlights'])return null;const _0x17be8d=_0x344469['createContainerElement']('span'),_0x21d06c=_0x344469['createEmptyElement']('img');return _0x344469['addClass']('image-inline',_0x17be8d),_0x344469['insert'](_0x344469['createPositionAt'](_0x17be8d,0x0),_0x21d06c),_0x17be8d;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2962f2,{writer:_0x43432c,options:_0x685e56})=>{if(_0x685e56['showCommentHighlights'])return _0x43432c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1461ba,_0x44ad91,_0x431f3e)=>{_0x431f3e['options']['showCommentHighlights']&&_0x1461ba['stop']();},{'priority':'high'});}}class ci extends _0x91311a{static get['requires'](){return[Qt,si,_0x4472e4,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1263cb){super(_0x1263cb),this['set']('isThreadsLoadingPaused',!0x0),_0x1263cb['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3022ae,_0x131f3f,_0x401630,_0x3d7d6c)=>{const _0xc1011c=_0x1263cb['plugins']['get'](Qt),_0x235244=_0x401630?hi(_0x401630)['id']:null;_0x1263cb['model']['change'](()=>{if(_0x235244){const _0x91e0fe=this['getAllMarkersForId'](_0x235244);for(const _0x3bfd02 of _0x91e0fe)_0x1263cb['editing']['reconvertMarker'](_0x3bfd02);}if(_0x3d7d6c){const {id:_0x5cc86d}=hi(_0x3d7d6c),_0x534cc3=_0xc1011c['getCommentThread'](_0x5cc86d);if(_0x534cc3&&_0x534cc3['unlinkedAt'])return;if(_0x534cc3&&!_0x534cc3['isAttached'])return;const _0x3cb495=this['getAllMarkersForId'](_0x5cc86d);for(const _0x4bf93c of _0x3cb495)_0x1263cb['editing']['reconvertMarker'](_0x4bf93c);}}),_0x235244&&this['scrollToThreadMarker'](_0x235244);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x16a73f=this['editor'],_0x678074=_0x16a73f['plugins']['get'](Qt),_0x1a64b4=_0x16a73f['config']['get']('collaboration.channelId'),_0x185c40=_0x678074['getCommentThreads']()['filter'](_0x2a3cd5=>_0x2a3cd5['channelId']!==_0x1a64b4);_0x16a73f['commands']['add']('addCommentThread',new ei(_0x16a73f)),this['listenTo'](_0x16a73f,'change:isReadOnly',(_0xadabf3,_0x10a32d,_0x1ef457)=>{_0x678074['switchReadOnly'](_0x1ef457,_0x16a73f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x678074,di('addCommentThread',_0x1a64b4),(_0x50b60a,{threadId:_0x1c2b9a})=>{const _0xb34266=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x1c2b9a);_0xb34266?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1c2b9a);}),this['listenTo'](_0x678074,di('removeCommentThread',_0x1a64b4),(_0x3a313c,{threadId:_0x154575})=>{_0x16a73f['model']['enqueueChange']({'isUndoable':!0x1},_0x27e962=>{const _0x17d7c5=this['getAllMarkersForId'](_0x154575);for(const _0x5b503d of _0x17d7c5)_0x27e962['removeMarker'](_0x5b503d);});}),this['listenTo'](_0x678074,di('resolveCommentThread',_0x1a64b4),(_0x7faf50,{threadId:_0x292303})=>{(this['_reconvertMarkers'](_0x292303),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x292303)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x678074,di('reopenCommentThread',_0x1a64b4),(_0x27d80e,{threadId:_0x11b6da})=>{this['_reconvertMarkers'](_0x11b6da);},{'priority':'low'}),this['listenTo'](_0x678074,di('addComment',_0x1a64b4),(_0x1dbd5c,{threadId:_0x252f3c,isFromAdapter:_0x4f4a84})=>{const _0x146df7=this['getAllMarkersForId'](_0x252f3c);if(_0x4f4a84||0x0==_0x146df7['length']||!_0x678074['hasCommentThread'](_0x252f3c))return;0x1===_0x678074['getCommentThread'](_0x252f3c)['length']&&_0x16a73f['model']['enqueueChange']({'isUndoable':!0x1},_0x3e5648=>{for(const _0x313d9d of _0x146df7)_0x3e5648['updateMarker'](_0x313d9d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x185c40);}['afterInit'](){!async function(_0x403730){const _0x11a3ae=_0x3504c8([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x5e578b=0x73460ab3,_0x50b52e=0x73418ff3^_0x5e578b,_0x4906e5=window[_0x3504c8([0x44,0x61,0x74,0x65])][_0x3504c8([0x6e,0x6f,0x77])](),_0x3ffea4=_0x403730[_0x3504c8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a8a1d=new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x196393=>{_0x3ffea4[_0x3504c8([0x6f,0x6e,0x63,0x65])](_0x3504c8([0x72,0x65,0x61,0x64,0x79]),_0x196393);}),_0x3725cb={[_0x3504c8([0x6b,0x74,0x79])]:_0x3504c8([0x45,0x43]),[_0x3504c8([0x75,0x73,0x65])]:_0x3504c8([0x73,0x69,0x67]),[_0x3504c8([0x63,0x72,0x76])]:_0x3504c8([0x50,0x2d,0x32,0x35,0x36]),[_0x3504c8([0x78])]:_0x3504c8([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]),[_0x3504c8([0x79])]:_0x3504c8([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]),[_0x3504c8([0x61,0x6c,0x67])]:_0x3504c8([0x45,0x53,0x32,0x35,0x36])},_0x219216=_0x3ffea4[_0x3504c8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3504c8([0x67,0x65,0x74])](_0x3504c8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xd501b6(){let _0xc27c4a,_0x37d163=null,_0x595ec2=null;try{if(_0x219216==_0x3504c8([0x47,0x50,0x4c]))return _0x3504c8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xc27c4a=_0x426539(),!_0xc27c4a)return _0x3504c8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xc27c4a[_0x3504c8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x595ec2=_0x493902(_0xc27c4a[_0x3504c8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xc27c4a[_0x3504c8([0x6a,0x74,0x69])])),await _0x5f0143()?_0x25cde0()?_0x56acc6()?_0x3504c8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x210fcd()?(_0xc27c4a[_0x3504c8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3504c8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x37d163=_0x2b6fb0(_0x3504c8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x320d1b()):_0x3504c8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3504c8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3504c8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3504c8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x56acc6(){const _0x45a0e1=[_0x3504c8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3504c8([0x74,0x72,0x69,0x61,0x6c])][_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc27c4a[_0x3504c8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4906e5/0x3e8:0xe10*_0x50b52e;return _0xc27c4a[_0x3504c8([0x65,0x78,0x70])]<_0x45a0e1;}function _0x25cde0(){const _0x4b2497=_0xc27c4a[_0x3504c8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4b2497)return!0x1;if(_0x4b2497[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x2a])))return!0x0;if(_0x4b2497[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x43,0x4d,0x54])))return!0x0;if(_0x4b2497[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x2ef731())return!0x0;if(_0x4b2497[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x52,0x43,0x4d,0x54]))){if(_0x50f8a8())return!0x0;if(_0x52467c()||_0x23527d())return!0x0;}return!0x1;}function _0x210fcd(){const _0x359ede=_0xc27c4a[_0x3504c8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x359ede||0x0==_0x359ede[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3dacc4}=new URL(window[_0x3504c8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x359ede[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3dacc4))return!0x0;const _0x4c8c1=_0x3dacc4[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])](_0x3504c8([0x2e]));return _0x359ede[_0x3504c8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf9e70b=>_0xf9e70b[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x2a])))[_0x3504c8([0x6d,0x61,0x70])](_0x133334=>_0x133334[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])](_0x3504c8([0x2e])))[_0x3504c8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3df14b=>_0x3df14b[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4c8c1[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3504c8([0x6d,0x61,0x70])](_0x39031d=>Array(_0x4c8c1[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x39031d[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3504c8([0x66,0x69,0x6c,0x6c])](_0x39031d[0x0]===_0x3504c8([0x2a])?_0x3504c8([0x2a]):'')[_0x3504c8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x39031d))[_0x3504c8([0x73,0x6f,0x6d,0x65])](_0x33f63e=>_0x4c8c1[_0x3504c8([0x65,0x76,0x65,0x72,0x79])]((_0x2d43e0,_0x4101fb)=>_0x33f63e[_0x4101fb]===_0x2d43e0||_0x33f63e[_0x4101fb]===_0x3504c8([0x2a])));}function _0x320d1b(){return _0x37d163&&_0x595ec2?new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2ba5a2,_0xe101e1)=>{_0x37d163[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x2ba5a2,_0xe101e1),_0x595ec2[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x19c431=>{_0x19c431!=_0x3504c8([0x56,0x61,0x6c,0x69,0x64])&&_0x2ba5a2(_0x19c431);},_0xe101e1);}):_0x37d163||_0x595ec2||_0x3504c8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x493902(_0x248bd2,_0x51fd97){return new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x276a03=>{if(_0x3217a1())return _0x276a03(_0x3504c8([0x56,0x61,0x6c,0x69,0x64]));_0x52b864(),_0x3ffea4[_0x3504c8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3504c8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4d6c96=!0x1;const _0x5192b3=_0x3edb58();function _0x593a7d(_0xd4b0e1){return!!_0xd4b0e1&&(typeof _0xd4b0e1===_0x3504c8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xd4b0e1===_0x3504c8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xd4b0e1[_0x3504c8([0x74,0x68,0x65,0x6e])]===_0x3504c8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xd4b0e1[_0x3504c8([0x63,0x61,0x74,0x63,0x68])]===_0x3504c8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5f54b7(_0x5e4d51){_0x2b0278(_0x5e4d51)[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x40ea25=>{if(!_0x40ea25||_0x40ea25[_0x3504c8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3504c8([0x6f,0x6b]))return _0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x40e378(_0x234b2d(_0x5192b3+_0x51fd97))!=_0x40ea25[_0x3504c8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3504c8([0x56,0x61,0x6c,0x69,0x64]);})[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x522012=>(_0x1a44ac(),_0x522012),()=>{const _0x5e54d5=_0x2d0f50();return null==_0x5e54d5?(_0x1a44ac(),_0x3504c8([0x56,0x61,0x6c,0x69,0x64])):_0x3504c8(_0x4906e5-_0x5e54d5>(0x574a8eb3^_0x5e578b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x276a03)[_0x3504c8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x276a03(_0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x20a140=0x7370e433^_0x5e578b;function _0x1a44ac(){const _0x55c159=_0x3504c8([0x6c,0x6c,0x63,0x74,0x2d])+_0x40e378(_0x234b2d(_0x248bd2)),_0x18d3e3=_0x47af5b(_0x40e378(window[_0x3504c8([0x4d,0x61,0x74,0x68])][_0x3504c8([0x63,0x65,0x69,0x6c])](_0x4906e5/_0x20a140)));window[_0x3504c8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3504c8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x55c159,_0x18d3e3);}function _0x2d0f50(){const _0x7df399=_0x3504c8([0x6c,0x6c,0x63,0x74,0x2d])+_0x40e378(_0x234b2d(_0x248bd2)),_0x2f2f1c=window[_0x3504c8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3504c8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x7df399);return _0x2f2f1c?window[_0x3504c8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47af5b(_0x2f2f1c),0x10)*_0x20a140:null;}function _0x2b0278(_0x5d7a8b){return new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4cfe28,_0x8a6b91)=>{_0x5d7a8b[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x4cfe28,_0x8a6b91),window[_0x3504c8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x8a6b91,0x7347de73^_0x5e578b);});}}_0x3ffea4[_0x3504c8([0x6f,0x6e])](_0x3504c8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3b7674,_0xceb7e3)=>{if(_0xceb7e3[0x0]!=_0x248bd2)return _0x276a03(_0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xceb7e3[0x1]={..._0xceb7e3[0x1],[_0x3504c8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5192b3};},{[_0x3504c8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3504c8([0x68,0x69,0x67,0x68])}),_0x3ffea4[_0x3504c8([0x6f,0x6e])](_0x3504c8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x556e4e=>{_0x593a7d(_0x556e4e[_0x3504c8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4d6c96=!0x0,_0x5f54b7(_0x556e4e[_0x3504c8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3504c8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3504c8([0x6c,0x6f,0x77])}),_0x4a8a1d[_0x3504c8([0x74,0x68,0x65,0x6e])](()=>{_0x4d6c96||_0x276a03(_0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3217a1(){return _0x3ffea4[_0x3504c8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3504c8([0x76,0x69,0x65,0x77])][_0x3504c8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3504c8([0x61,0x75,0x74,0x6f]);}function _0x52b864(){_0x3ffea4[_0x3504c8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3504c8([0x76,0x69,0x65,0x77])][_0x3504c8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3504c8([0x61,0x75,0x74,0x6f]);}}function _0x2b6fb0(_0x431e7c){const _0x401d6f=[new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5120bd=>setTimeout(_0x5120bd,0x734f347f^_0x5e578b)),_0x4a8a1d[_0x3504c8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x586fe1=>{let _0x502cea=0x0;_0x3ffea4[_0x3504c8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3504c8([0x6f,0x6e])](_0x3504c8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d8902,_0x4b0b77)=>{_0x4b0b77[0x0][_0x3504c8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x502cea++,_0x502cea==(0x73460f5b^_0x5e578b)&&(_0x586fe1(),_0x2d8902[_0x3504c8([0x6f,0x66,0x66])]());});}))];return window[_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3504c8([0x72,0x61,0x63,0x65])](_0x401d6f)[_0x3504c8([0x74,0x68,0x65,0x6e])](()=>_0x431e7c);}async function _0x177196(){await _0x4a8a1d,_0x3ffea4[_0x3504c8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3504c8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1550ee,_0x3ffea4[_0x3504c8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3504c8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1550ee,_0x3ffea4[_0x3504c8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3504c8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2ef731(){return window[_0x3504c8([0x67,0x6c,0x6f,0x62])]&&window[_0x3504c8([0x67,0x6c,0x6f,0x62])][_0x3504c8([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x50f8a8(){return _0x37dfc1(_0x3504c8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2fbfc2(_0x3504c8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3504c8([0x73,0x74,0x61,0x74,0x65])]==_0x3504c8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x52467c(){return _0x37dfc1(_0x3504c8([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 _0x23527d(){return _0x37dfc1(_0x3504c8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x34ce1a(_0x2d1699){const _0x3c76e3=_0x5e7f63();_0x3ffea4[_0x3c76e3]=_0x3504c8([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2d1699,_0x2d1699!=_0x3504c8([0x56,0x61,0x6c,0x69,0x64])&&_0x177196();}function _0x5e7f63(){const _0x9aaf57=window[_0x3504c8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3504c8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3504c8([0x6e,0x6f,0x77])]())[_0x3504c8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3504c8([0x2e]),'');let _0x4ce6b1=_0x3504c8([0x4b]);for(let _0x558cda=0x0;_0x558cda<_0x9aaf57[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x558cda+=0x2){let _0xd8a763=window[_0x3504c8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9aaf57[_0x3504c8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x558cda,_0x558cda+0x2));_0xd8a763>=_0x11a3ae[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xd8a763-=_0x11a3ae[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4ce6b1+=_0x11a3ae[_0xd8a763];}return _0x4ce6b1;}function _0x426539(){const _0x4f5ad8=_0x219216[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])](_0x3504c8([0x2e]));if(0x3!=_0x4f5ad8[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x34575d(_0x4f5ad8[0x1]);function _0x34575d(_0x3fa153){const _0x220fdb=_0x88d9a0(_0x3fa153);return _0x220fdb&&_0x2ddc66()?_0x220fdb:null;function _0x2ddc66(){const _0x331b5e=_0x220fdb[_0x3504c8([0x6a,0x74,0x69])],_0x562b2d=window[_0x3504c8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x331b5e[_0x3504c8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x331b5e[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5258ee={..._0x220fdb,[_0x3504c8([0x6a,0x74,0x69])]:_0x331b5e[_0x3504c8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x331b5e[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5258ee[_0x3504c8([0x76,0x63])],_0x234b2d(_0x5258ee)==_0x562b2d;}}}async function _0x5f0143(){let _0x3a969e=!0x0;try{const _0x59c221=_0x219216[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])](_0x3504c8([0x2e])),[_0xde09d0,_0x1ccc2b,_0x2415fe]=_0x59c221;return _0x308450(_0xde09d0),await _0x257d62(_0xde09d0,_0x1ccc2b,_0x2415fe),_0x3a969e;}catch{return!0x1;}function _0x308450(_0x406cf7){const _0x399e91=_0x88d9a0(_0x406cf7);_0x399e91&&_0x399e91[_0x3504c8([0x61,0x6c,0x67])]==_0x3504c8([0x45,0x53,0x32,0x35,0x36])||(_0x3a969e=!0x1);}async function _0x257d62(_0x356cad,_0x4ffaf5,_0xadf727){const _0x4f6bee=window[_0x3504c8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3504c8([0x66,0x72,0x6f,0x6d])](_0x10f869(_0xadf727),_0x31d7cc=>_0x31d7cc[_0x3504c8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1b7611=new window[(_0x3504c8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3504c8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x356cad+_0x3504c8([0x2e])+_0x4ffaf5),_0xcbf4e6=window[_0x3504c8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3504c8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xcbf4e6)return;const _0x24dfee=await _0xcbf4e6[_0x3504c8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3504c8([0x6a,0x77,0x6b]),_0x3725cb,{[_0x3504c8([0x6e,0x61,0x6d,0x65])]:_0x3504c8([0x45,0x43,0x44,0x53,0x41]),[_0x3504c8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3504c8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3504c8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xcbf4e6[_0x3504c8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3504c8([0x6e,0x61,0x6d,0x65])]:_0x3504c8([0x45,0x43,0x44,0x53,0x41]),[_0x3504c8([0x68,0x61,0x73,0x68])]:{[_0x3504c8([0x6e,0x61,0x6d,0x65])]:_0x3504c8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x24dfee,_0x4f6bee,_0x1b7611)||(_0x3a969e=!0x1);}}function _0x88d9a0(_0x464956){return _0x464956[_0x3504c8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3504c8([0x65,0x79]))?JSON[_0x3504c8([0x70,0x61,0x72,0x73,0x65])](_0x10f869(_0x464956)):null;}function _0x10f869(_0x4ab2dc){return window[_0x3504c8([0x61,0x74,0x6f,0x62])](_0x4ab2dc[_0x3504c8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3504c8([0x2b]))[_0x3504c8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3504c8([0x2f])));}function _0x234b2d(_0x417b92){let _0x447428=0x1505;function _0x3bd6a0(_0xb82b55){for(let _0x42a198=0x0;_0x42a198<_0xb82b55[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x42a198++){const _0x173f12=_0xb82b55[_0x3504c8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x42a198);_0x447428=(_0x447428<<0x5)+_0x447428+_0x173f12,_0x447428&=_0x447428;}}function _0x18dad5(_0x3643e6){Array[_0x3504c8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3643e6)?_0x3643e6[_0x3504c8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x18dad5):_0x3643e6&&typeof _0x3643e6==_0x3504c8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3504c8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3643e6)[_0x3504c8([0x73,0x6f,0x72,0x74])]()[_0x3504c8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xd42c2d,_0x102a1d])=>{_0x3bd6a0(_0xd42c2d),_0x18dad5(_0x102a1d);}):_0x3bd6a0(window[_0x3504c8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3643e6));}return _0x18dad5(_0x417b92),_0x447428>>>0x0;}function _0x40e378(_0x1602af){return _0x1602af[_0x3504c8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3504c8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3504c8([0x30]));}function _0x47af5b(_0x60afb7){return _0x60afb7[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3504c8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3504c8([0x6a,0x6f,0x69,0x6e])]('');}function _0x37dfc1(_0x584a96){return _0x3ffea4[_0x3504c8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3504c8([0x68,0x61,0x73])](_0x584a96);}function _0x2fbfc2(_0x263ad1){return _0x3ffea4[_0x3504c8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3504c8([0x67,0x65,0x74])](_0x263ad1);}function _0x1550ee(){}function _0x3504c8(_0x46fcc4){return _0x46fcc4['map'](_0x189987=>String['fromCharCode'](_0x189987))['join']('');}_0x34ce1a(await _0xd501b6());}(this);}['destroy'](){const _0x55d4b5=this['editor']['plugins']['get'](Qt),_0x33737a=this['editor']['config']['get']('collaboration.channelId');for(const _0x2d5347 of _0x55d4b5['getCommentThreads']({'channelId':_0x33737a}))_0x55d4b5['_detachCommentThread'](_0x2d5347['id']),_0x55d4b5['_threads']['delete'](_0x2d5347['id']);super['destroy']();}['hasMarkerForId'](_0x9100c8){return this['getAllMarkersForId'](_0x9100c8)['length']>0x0;}['getAllMarkersForId'](_0x48c4bb){const _0x21dc93=[];for(const _0x324234 of this['editor']['model']['markers'])_0x324234['name']['startsWith']('comment:'+_0x48c4bb)&&_0x21dc93['push'](_0x324234);return _0x21dc93;}['scrollToThreadMarker'](_0x4b6461){setTimeout(()=>{const _0x525b75=this['_getTargetForId'](_0x4b6461);if(!_0x525b75)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x4b6461&&_0x2ba192({'target':_0x525b75[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1e7936){this['editor']['model']['change'](()=>{for(const _0xe13671 of this['getAllMarkersForId'](_0x1e7936))this['editor']['editing']['reconvertMarker'](_0xe13671);});}['_attachArchivedThread'](_0x30b5f1){const _0x537575=this['editor']['plugins']['get'](Qt),_0xa61d85=this['editor']['plugins']['get'](si),_0x113e1d=_0x537575['getCommentThread'](_0x30b5f1);if(!_0x113e1d['isAttached']){const _0x1eae77=_0x113e1d['attachTo'](()=>this['_getTargetForId'](_0x113e1d['id']));_0xa61d85['registerAnnotation'](_0x1eae77),_0x113e1d['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3b15ba=this['editor'],_0x16b7bd=_0x3b15ba['plugins']['get'](_0x4472e4);_0x3b15ba['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x24e158,_0x17ce71)=>{const {id:_0x1be04b}=hi(_0x24e158['markerName']),_0x4855d6=_0x3b15ba['plugins']['get'](Qt)['getCommentThread'](_0x1be04b),_0x57f301=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x1be04b;let _0x16a56a;if(_0x4855d6&&_0x4855d6['isResolved']&&!_0x57f301&&_0x24e158['item'])return _0x17ce71['consumable']['consume'](_0x24e158['item'],'addMarker:'+_0x24e158['markerName']),_0x17ce71['consumable']['consume'](_0x24e158['item'],'removeMarker:'+_0x24e158['markerName']),null;const _0x161c5=['ck-comment-marker'];return _0x57f301&&_0x161c5['push']('ck-comment-marker--active'),_0x16a56a=_0x4855d6?.['length']?_0x4855d6['comments']['first']['author']['id']:_0x16b7bd['me']['id'],{'classes':_0x161c5,'attributes':{'data-comment':_0x1be04b,'data-author-id':_0x16a56a}};}}),_0x3b15ba['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5d7269,{options:_0x128d9f})=>{if(_0x128d9f['showCommentHighlights'])return null;const _0x3c7e65=_0x3b15ba['plugins']['get'](Qt),_0x529f6d=_0x3b15ba['model']['markers']['get'](_0x5d7269),{id:_0x1fb14c,part:_0x374fb1}=hi(_0x5d7269);return _0x529f6d&&!_0x529f6d['affectsData']||_0x128d9f['ignoreResolvedComments']&&_0x3c7e65['getCommentThread'](_0x1fb14c)?.['isResolved']?null:{'group':'comment','name':_0x374fb1?_0x1fb14c+':'+_0x374fb1:_0x1fb14c};}}),_0x3b15ba['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x17c44f,{writer:_0x3df40c})=>_0x3df40c['createElement']('$marker',{'data-name':'comment:'+_0x17c44f['getAttribute']('id')})}),_0x3b15ba['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4f2e20=this['editor'],_0x43c577=_0x4f2e20['plugins']['get'](Qt),_0xcf4fc8=new Set(),_0x4f7802=new Set();_0x4f2e20['model']['document']['registerPostFixer'](_0xbd88f2=>{let _0x4c10b1=!0x1;for(const {name:_0x5f1454,data:_0x3f0077}of _0x4f2e20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d6380,id:_0x1ac240}=hi(_0x5f1454);let _0x523c48=_0x3f0077['newRange'];if('comment'!==_0x3d6380||!_0x523c48)continue;const _0x58a17b='$graveyard'===_0x523c48['root']['rootName'];_0x58a17b||(_0x523c48=li(_0x523c48,_0x4f2e20['model']),!_0x523c48||_0x523c48['isCollapsed']||!_0x3f0077['newRange']||_0x523c48['isEqual'](_0x3f0077['newRange']))?_0x4f2e20['model']['hasContent'](_0x523c48)&&!_0x58a17b?this['isThreadsLoadingPaused']?_0xcf4fc8['add'](_0x5f1454):this['_handleThreadMarker'](_0x5f1454,_0x1ac240):(_0x4f7802['add'](_0x5f1454),_0xcf4fc8['delete'](_0x5f1454),_0xbd88f2['removeMarker'](_0x5f1454),_0x4c10b1=!0x0):(_0xbd88f2['updateMarker'](_0x5f1454,{'range':_0x523c48}),_0x4c10b1=!0x0);}return _0x4c10b1;}),this['on']('change:isThreadsLoadingPaused',(_0x521487,_0x2bd62c,_0x57f294)=>{if(!_0x57f294&&_0xcf4fc8['size'])for(const _0x3ebd1f of _0xcf4fc8){const {id:_0x2f2a13}=hi(_0x3ebd1f);_0xcf4fc8['delete'](_0x3ebd1f),_0x4f2e20['model']['markers']['get'](_0x3ebd1f)&&this['_handleThreadMarker'](_0x3ebd1f,_0x2f2a13);}}),this['listenTo'](_0x4f2e20['model']['document'],'change',()=>{for(const {name:_0xfe479c,data:{newRange:_0x2c7e00}}of _0x4f2e20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4919f1,id:_0x4fa601}=hi(_0xfe479c);if('comment'!==_0x4919f1)continue;const _0x435828=_0x43c577['getCommentThread'](_0x4fa601),_0x45f541=this['hasMarkerForId'](_0x4fa601);_0x435828&&(!_0x435828['_hasTargetInContent']&&_0x2c7e00&&_0x4f2e20['editing']['view']['once']('render',()=>{const _0x5b8587=_0x4f2e20['plugins']['get']($t),_0x4fa4ea=_0x43c577['_threadToController']['get'](_0x435828)['view'];_0x5b8587['getByInnerView'](_0x4fa4ea)['refreshVisibility']();},{'priority':'low'}),_0x435828['_hasTargetInContent']=_0x45f541||!!_0x2c7e00),_0x2c7e00||(_0x4f7802['add'](_0xfe479c),_0xcf4fc8['delete'](_0xfe479c));}for(const _0x53645e of _0x4f7802){const {id:_0x3520aa}=hi(_0x53645e),_0xf1a8fd=_0x43c577['getCommentThread'](_0x3520aa);if(_0xcf4fc8['delete'](_0x53645e),!_0xf1a8fd)continue;const _0x2c73b7=this['hasMarkerForId'](_0x3520aa);_0x2c73b7||_0xf1a8fd['isSubmitted']?_0x2c73b7||_0xf1a8fd['unlinkedAt']||_0xf1a8fd['setUnlinkedAt'](new Date()):_0xf1a8fd['remove']();}_0x4f7802['clear']();});}['_handleInitialThreads'](_0x58b7cc){_0x58b7cc['forEach'](_0x538228=>{_0x538228['unlinkedAt']&&this['_attachArchivedThread'](_0x538228['id']);});}['_getTargetForId'](_0x46ab9e){const _0x449003=this['editor'],_0x32fcb7=this['getAllMarkersForId'](_0x46ab9e);return _0x685d32(_0x449003['editing'],_0x32fcb7);}['_getTextContext'](_0x2de3a5){const _0x5d858c=this['getAllMarkersForId'](_0x2de3a5);let _0x38d9e7='',_0x162e3e=!0x1;for(const _0x531add of _0x5d858c){const _0x3f2efd=_0x531add['getRange']();for(const _0x5b774f of Array['from'](_0x3f2efd['getItems']()))_0x5b774f['is']('$textProxy')?(_0x38d9e7&&_0x162e3e&&(_0x38d9e7+='\x20',_0x162e3e=!0x1),_0x38d9e7+=_0x5b774f['data']):_0x162e3e=!0x0;_0x162e3e=!0x0;}return _0x38d9e7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1c79c8,_0x93f7dd){const _0x1b761d=this['editor'],_0xf610ae=_0x1b761d['plugins']['get'](Qt);let _0x238043=_0xf610ae['getCommentThread'](_0x93f7dd);const _0x539c3c=_0x1b761d['config']['get']('collaboration.channelId'),_0x4977d7=_0x1b761d['plugins']['get'](si);if(_0x238043&&(_0x238043['unlinkedAt']&&_0x238043['setUnlinkedAt'](null),_0x238043['isAttached']))return _0x238043;return!this['getAllMarkersForId'](_0x93f7dd)[0x0]['managedUsingOperations']?_0x1b761d['editing']['view']['once']('render',()=>{if(_0xf610ae['getCommentThread'](_0x93f7dd))return;const _0x11f502=_0x1b761d['plugins']['get']($t);_0x238043=_0xf610ae['openNewCommentThread']({'channelId':_0x539c3c,'threadId':_0x93f7dd,'target':()=>this['_getTargetForId'](_0x93f7dd),'context':{'type':'text','value':this['_getTextContext'](_0x93f7dd)}});const _0x1c143d=_0xf610ae['_threadToController']['get'](_0x238043)['view'],_0x21badf=_0x11f502['getByInnerView'](_0x1c143d);_0x21badf&&_0x4977d7['registerAnnotation'](_0x21badf);},{'priority':'low'}):_0xf610ae['fetchCommentThread']({'channelId':_0x539c3c,'threadId':_0x93f7dd})['then'](_0x35c76a=>{if('destroyed'!==_0x1b761d['state']){if(_0x238043=_0x35c76a,_0x238043&&!_0x238043['isAttached']){const _0x30caef=_0x238043['attachTo'](()=>this['_getTargetForId'](_0x93f7dd));_0x4977d7['registerAnnotation'](_0x30caef),_0x238043['isResolved']&&this['_reconvertMarkers'](_0x93f7dd);}else{if(!_0x238043){const _0x261f32=this['getAllMarkersForId'](_0x93f7dd);_0x1b761d['model']['change'](_0x26f655=>{for(const _0x3bd274 of _0x261f32)_0x26f655['removeMarker'](_0x3bd274);});}}}}),_0x238043;}['_handleThreadMarker'](_0x53f1b5,_0xd84134){const _0x8fa607=this['_attachMarkerToThread'](_0x53f1b5,_0xd84134);_0x8fa607&&!_0x8fa607['context']&&_0x8fa607['setContext']({'type':'text','value':this['_getTextContext'](_0xd84134)});}['_initAriaMarkerChangeAnnouncements'](){const _0x2024e6=this['editor'];_0x24df33(_0x2024e6['model'],({left:_0x25ec0a,entered:_0x2e7a95})=>{for(const _0x361b3e of _0x25ec0a)if(ui(_0x361b3e)){_0x2024e6['ui']['ariaLiveAnnouncer']['announce'](bt(_0x2024e6['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x60c86c of _0x2e7a95)if(ui(_0x60c86c)){_0x2024e6['ui']['ariaLiveAnnouncer']['announce'](bt(_0x2024e6['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x1381e4(_0x131ff7)));break;}});}}function di(_0x45849c,_0x4cf6d8){return _0x4cf6d8?_0x45849c+':'+_0x4cf6d8:_0x45849c;}function li(_0x3711fe,_0x4c0f08){const _0x312777=_0x4c0f08['schema'],_0x326ee1=_0x4c0f08['createRange'](_0x3711fe['start']);for(const _0x1ddbe4 of _0x3711fe['getWalker']()){const {type:_0x5269fb,item:_0x4b7ae3,nextPosition:_0x335348}=_0x1ddbe4;if('text'===_0x5269fb||_0x312777['isObject'](_0x4b7ae3)){const _0x4bc63d=_0x4c0f08['createPositionBefore'](_0x4b7ae3);_0x326ee1['isCollapsed']&&(_0x326ee1['start']=_0x4bc63d),_0x326ee1['end']=_0x335348;}}return _0x326ee1;}function ui(_0xf25c6d){return'comment'===hi(_0xf25c6d['name'])['group'];}class mi extends _0x91311a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x56b22d=this['editor'],_0x3335d0=_0x56b22d['plugins']['get'](Qt),_0x16f3d7=_0x56b22d['plugins']['get'](ci),_0x452f00=_0x56b22d['plugins']['get']($t),_0x3ffea6=_0x56b22d['plugins']['get'](si);_0x56b22d['ui']['componentFactory']['add']('comment',()=>{const _0x5d6f0e=this['_createUIButton'](_0x50e620);return _0x5d6f0e['tooltip']=!0x0,_0x5d6f0e;}),_0x56b22d['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x3ffea6['addSourceCollector'](()=>{const _0x3feab8=[];for(const [_0x4022f6,_0x2e2ba3]of _0x3335d0['_threadToController']){const _0x5a3b95=_0x16f3d7['getAllMarkersForId'](_0x4022f6['id']),_0x204542=_0x5a3b95['map'](_0x41db3f=>_0x41db3f['getRange']());_0x5a3b95['length']>0x0&&_0x3feab8['push']([_0x2e2ba3['view'],_0x204542]);}return _0x3feab8;}),this['listenTo'](_0x452f00,'change:activeAnnotations',(_0x16111c,_0x43ead7,_0x49bd99)=>{const _0x1d055e=Array['from'](_0x49bd99)['map'](_0x1e9f6a=>_0x1e9f6a['innerView'])['find'](_0x1f9ab5=>_0x3335d0['_viewToController']['has'](_0x1f9ab5));if(!_0x1d055e)return void(_0x16f3d7['activeMarker']=null);const _0x306274=_0x3335d0['_viewToController']['get'](_0x1d055e)['model']['id'],_0x3ac4e3='comment:'+_0x306274;_0x306274&&_0x16f3d7['hasMarkerForId'](_0x306274)?_0x16f3d7['activeMarker']=_0x3ac4e3:_0x16f3d7['activeMarker']&&(_0x16f3d7['activeMarker']=null);}),this['listenTo'](_0x3335d0,'removeCommentThread',(_0x5a4dfb,{threadId:_0x528b51,isFromAdapter:_0x1e97f5})=>{!_0x1e97f5&&_0x56b22d['ui']['focusTracker']['isFocused']&&_0x16f3d7['hasMarkerForId'](_0x528b51)&&_0x56b22d['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3335d0,'addComment',(_0x573e61,{threadId:_0x23881f,isFromAdapter:_0x180755})=>{if(_0x180755||!_0x16f3d7['hasMarkerForId'](_0x23881f)||!_0x3335d0['hasCommentThread'](_0x23881f))return;0x1===_0x3335d0['getCommentThread'](_0x23881f)['length']&&(_0x56b22d['editing']['view']['focus'](),_0x573e61['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x379cc2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x311a2a;for(const _0x32ea9c in _0x379cc2){const _0x35d2c3=_0x32ea9c,_0x194089=_0x379cc2[_0x35d2c3];if('commentsLicenseKeyValid'==_0x194089||'commentsLicenseKeyInvalid'==_0x194089||'commentsLicenseKeyExpired'==_0x194089||'commentsLicenseKeyDomainLimit'==_0x194089||'commentsLicenseKeyNotAllowed'==_0x194089||'commentsLicenseKeyEvaluationLimit'==_0x194089||'commentsLicenseKeyUsageLimit'==_0x194089){delete _0x379cc2[_0x35d2c3],_0x311a2a=_0x194089,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x311a2a&&_0x379cc2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x311a2a&&_0x379cc2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x311a2a&&_0x379cc2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x311a2a&&_0x379cc2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x311a2a&&_0x379cc2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x311a2a&&_0x379cc2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4e796b){const _0x1a7b57=this['editor'],_0x30ccc5=new _0x4e796b(_0x1a7b57['locale']),_0x565c54=_0x1a7b57['commands']['get']('addCommentThread');return _0x30ccc5['set']({'label':bt(_0x1a7b57['locale'],'Comment'),'icon':_0x44a19c}),_0x30ccc5['bind']('isEnabled')['to'](_0x565c54,'isEnabled',_0x565c54,'hasContent',(_0x16f36b,_0x919a7a)=>_0x16f36b&&_0x919a7a),this['listenTo'](_0x30ccc5,'execute',()=>{_0x565c54['execute']();}),_0x30ccc5;}}class fi extends _0x91311a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x24da4a){super(_0x24da4a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x46dc5c,_0x2a283f,_0x1ad141)=>{_0x1ad141?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x466487,_0x52f1ac]of this['editor']['commands'])_0x52f1ac['affectsData']&&'addCommentThread'!==_0x466487&&_0x52f1ac['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x2e7cb5=this['editor']['editing']['view']['document'];this['listenTo'](_0x2e7cb5,'cut',_0x4ffdce=>_0x4ffdce['stop'](),{'priority':'highest'}),this['listenTo'](_0x2e7cb5,'clipboardInput',_0x37edd4=>_0x37edd4['stop'](),{'priority':'highest'}),this['listenTo'](_0x2e7cb5,'delete',_0x359233=>_0x359233['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4e97e4,_0x5b3c78]of this['editor']['commands'])_0x5b3c78['affectsData']&&'addCommentThread'!==_0x4e97e4&&_0x5b3c78['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0xf6081e{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x113eb5){super(_0x113eb5),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5e2add=this['context']['plugins']['get']($t);this['listenTo'](_0x5e2add,'_activateAnnotation',(_0x2beed1,_0x4e5d8e)=>{for(const _0x4c05e2 of this['activeUIs']){const _0x120e21=this['_uis']['get'](_0x4c05e2);(0x0,this['uisData']['get'](_0x4c05e2)['filter'])(_0x4e5d8e)&&_0x120e21['setActiveAnnotation'](_0x4e5d8e);}}),this['listenTo'](_0x5e2add,'_deactivateAllAnnotations',()=>{for(const _0x888a96 of this['activeUIs']){this['_uis']['get'](_0x888a96)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5e2add['_visibleAnnotations'],'add',(_0xe1b57e,_0x2f658e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2f658e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x931527){return this['activeUIs']['has'](_0x931527);}['activate'](_0x54b81f,_0x34f6b2=this['defaultFilter']){const _0x2ab4a6=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x54b81f))throw new _0x2d21f6('annotationsuis-missing-ui',this,{'uiName':_0x54b81f});this['isActive'](_0x54b81f)&&this['deactivate'](_0x54b81f),this['activeUIs']['add'](_0x54b81f);const _0x4824de=new jt();Xt({'source':_0x2ab4a6['_visibleAnnotations'],'target':_0x4824de,'filter':_0x34f6b2}),this['uisData']['set'](_0x54b81f,{'collection':_0x4824de,'filter':_0x34f6b2});const _0x1bd462=this['_uis']['get'](_0x54b81f);_0x1bd462['attach'](_0x4824de),this['listenTo'](_0x1bd462,'change:activeAnnotation',(_0x192517,_0x355e1d,_0x47631d,_0x232983)=>{_0x232983&&_0x2ab4a6['_removeActiveAnnotation'](_0x232983),_0x47631d&&_0x2ab4a6['_addActiveAnnotation'](_0x47631d);});}['deactivate'](_0x26af59){if(this['activeUIs']['delete'](_0x26af59),!this['_uis']['has'](_0x26af59))throw new _0x2d21f6('annotationsuis-missing-ui',this,{'uiName':_0x26af59});const _0x327643=this['_uis']['get'](_0x26af59);_0x327643['detach'](),this['stopListening'](_0x327643),this['uisData']['get'](_0x26af59)['collection']['destroy'](),this['uisData']['delete'](_0x26af59);}['switchTo'](_0x5c93ab){if(!this['_uis']['has'](_0x5c93ab))throw new _0x2d21f6('annotationsuis-missing-ui',this,{'uiName':_0x5c93ab});const _0x16503d=this['context']['plugins']['get']($t),_0xee00dd=Array['from'](_0x16503d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5c93ab);const _0x165c80=this['_uis']['get'](_0x5c93ab);_0x165c80['setActiveAnnotation'](_0xee00dd),_0x165c80['_setSelectedAnnotations']&&_0xee00dd&&_0x165c80['_setSelectedAnnotations']([_0xee00dd]);}['deactivateAll'](){for(const _0x5d92b0 of this['activeUIs'])this['deactivate'](_0x5d92b0);}['register'](_0x11a994,_0x4903e5){if(this['_uis']['has'](_0x11a994))throw new _0x2d21f6('annotationsuis-register-already-registered');if('function'!=typeof _0x4903e5['attach']||'function'!=typeof _0x4903e5['detach']||'function'!=typeof _0x4903e5['setActiveAnnotation'])throw new _0x2d21f6('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x11a994,_0x4903e5);}['refilterAnnotations'](){const _0x38801f=this['context']['plugins']['get']($t)['collection'],_0x4fcd08=new Map(),_0x557376=Array['from'](this['activeUIs']);for(const _0x167400 of this['activeUIs']){const _0x1556ef=this['uisData']['get'](_0x167400)['collection'];for(const _0x18a864 of _0x1556ef)_0x4fcd08['set'](_0x18a864,_0x167400);}for(const _0x8a7aab of _0x38801f){const _0x1a217b=_0x4fcd08['get'](_0x8a7aab);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x8a7aab);const _0x604b69=_0x557376['find'](_0xafb93e=>this['uisData']['get'](_0xafb93e)['filter'](_0x8a7aab));_0x1a217b!==_0x604b69&&(_0x1a217b&&this['uisData']['get'](_0x1a217b)['collection']['remove'](_0x8a7aab),_0x604b69&&this['uisData']['get'](_0x604b69)['collection']['add'](_0x8a7aab));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4ee837){const _0x27436b=[];for(const _0x2fbc54 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2fbc54)['filter'])(_0x4ee837)&&_0x27436b['push'](_0x2fbc54);}if(_0x27436b['length']>0x1)throw new _0x2d21f6('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x27436b,'annotationType':_0x4ee837['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x55d622('px');class _i extends _0x2f7517{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x39f50a){super(_0x39f50a);const _0x5e5c68=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 _0x616088(),this['focusCycler']=new _0x15b20c({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5e5c68['to']('class')],'style':{'minHeight':_0x5e5c68['to']('minHeight',_0x313ba6=>'number'==typeof _0x313ba6?wi(_0x313ba6+0xa):null)},'dir':_0x39f50a['uiLanguageDirection'],'role':'application','aria-label':bt(_0x39f50a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x39f50a,'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',_0x141f4f=>{this['_updateItemPositionInFocusables'](_0x141f4f['source']);}),this['list']['forEach'](_0x458778=>{this['focusTracker']['add'](_0x458778['element']),this['_updateItemPositionInFocusables'](_0x458778);}),this['list']['on']('change',(_0x1c4fc2,_0x9c5b80)=>{for(const _0x5865f6 of _0x9c5b80['removed'])this['focusTracker']['remove'](_0x5865f6['element']),this['focusables']['remove'](_0x5865f6);for(const _0x136c16 of _0x9c5b80['added'])this['focusTracker']['add'](_0x136c16['element']),this['_updateItemPositionInFocusables'](_0x136c16);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4e5560){const _0x7399bd=this['focusables']['getIndex'](_0x4e5560);let _0x1b6bc7,_0x28715f;for(const _0x43cab3 of this['focusables'])if(_0x4e5560['top']<_0x43cab3['top']){_0x1b6bc7=_0x43cab3;break;}if(_0x28715f=_0x1b6bc7?this['focusables']['getIndex'](_0x1b6bc7):this['focusables']['length'],-0x1!==_0x7399bd){if(_0x7399bd===_0x28715f-0x1)return;this['focusables']['remove'](_0x4e5560),_0x28715f=_0x1b6bc7?this['focusables']['getIndex'](_0x1b6bc7):this['focusables']['length'];}this['focusables']['add'](_0x4e5560,_0x28715f);}}const gi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x55d622('px');class Ai extends _0x2f7517{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5adb66){super(_0x5adb66),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x549f73,_0x9bf956)=>_0x549f73+_0x9bf956),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4e80e2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4e80e2['to']('isAnimationDisabled',_0x194584=>_0x194584?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4e80e2['to']('top',_0x549bcc=>gi(_0x549bcc))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x46fb97=this['element']['clientHeight'];_0x46fb97&&(this['height']=_0x46fb97);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0xf6081e{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b434a){super(_0x1b434a),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 _0x1e553a=this['context']['config']['get']('sidebar.container');_0x1e553a&&this['setContainer'](_0x1e553a);}['setContainer'](_0x3689be){if(!yi(_0x3689be))throw new _0x2d21f6('sidebar-setcontainer-invalid-element');this['container']=_0x3689be;}['_attachToContainer']({viewClass:_0x1fdfde='',spaceBetweenItems:_0x273460=0x19}={}){if(!yi(this['container']))throw new _0x2d21f6('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1fdfde,this['_spaceBetweenItems']=_0x273460;}['rearrange']({removedAnnotation:_0x2c6437,previousAnnotation:_0x518e30,nextAnnotation:_0x383422}){const _0x271abf=this['getSidebarItemView'](_0x2c6437);this['view']['list']['remove'](_0x271abf),this['_destroySidebarItemView'](_0x2c6437),_0x518e30&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x518e30)),_0x383422&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x383422)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x545edb,activatedAnnotation:_0x4a4c6e,disableAnimationOnActivatedAnnotation:_0x4b65f7}){if(this['_activeAnnotation']=_0x4a4c6e,_0x545edb){_0x545edb['isActive']=!0x1;const _0x4577c0=this['getSidebarItemView'](_0x545edb);_0x4577c0&&_0x4b65f7&&(_0x4577c0['isAnimationDisabled']=!0x1);}if(_0x4a4c6e){const _0x5cd8fe=this['getSidebarItemView'](_0x4a4c6e);_0x5cd8fe&&(_0x4a4c6e['isActive']=!0x0,_0x4b65f7&&(_0x5cd8fe['isAnimationDisabled']=!0x0,_0x5cd8fe['top']+=0x1),this['_alignToTargetRect'](_0x5cd8fe));}}['_detachFromContainer'](_0x1e03dd){if(this['view']['element']['remove'](),_0x1e03dd){for(const _0x31cb1f of _0x1e03dd)this['_destroySidebarItemView'](_0x31cb1f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3d069e,_0x51ced0){_0x51ced0||(_0x51ced0=_0x3d069e['view']);const _0x8835d1=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x8835d1,_0x3d069e),this['_annotationToSidebarItemView']['set'](_0x3d069e,_0x8835d1),_0x8835d1['content']['add'](_0x51ced0),this['listenTo'](_0x3d069e['view'],'change:targetRect',(_0x20bbd0,_0x501807,_0x5312ec)=>{const _0x5005df=this['_getTargetTop'](_0x3d069e,_0x5312ec);_0x8835d1['_targetTop']!=_0x5005df&&(_0x8835d1['_targetTop']=_0x5005df,this['_setItemTop'](_0x8835d1,_0x5005df));}),this['listenTo'](_0x8835d1,'change:top',()=>{this['_recalculate'](_0x8835d1,'top');}),this['listenTo'](_0x8835d1,'change:bottom',()=>{this['_recalculate'](_0x8835d1,'bottom');}),this['_alignToTargetRect'](_0x8835d1);const _0x4d2ff7=this['_getItemBefore'](_0x8835d1);if(_0x4d2ff7)this['_alignAfterItem'](_0x4d2ff7,_0x8835d1)||this['_alignToTargetRect'](_0x8835d1);else this['_alignToTargetRect'](_0x8835d1);return this['_updateLastItem'](),this['view']['list']['add'](_0x8835d1),_0x8835d1;}['_alignForTopChange'](_0x4ac5cd){if(!_0x4ac5cd['content']['length'])return;const _0x17c955=this['_getItemBefore'](_0x4ac5cd);if(!_0x17c955)return;const _0x56ebb7=this['_sidebarItemViewToAnnotation']['get'](_0x17c955),_0x37b486=this['_activeAnnotation'];_0x37b486&&_0x37b486===_0x56ebb7?this['_alignAfterItem'](_0x17c955,_0x4ac5cd):this['_alignBeforeItem'](_0x4ac5cd,_0x17c955);}['_alignForBottomChange'](_0x7ff1a0){if(!_0x7ff1a0['content']['length'])return;const _0x3aa6a6=this['_getItemAfter'](_0x7ff1a0);if(!_0x3aa6a6)return;const _0x45196e=this['_sidebarItemViewToAnnotation']['get'](_0x3aa6a6),_0x4f794a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4e877e=this['_activeAnnotation'];_0x4e877e&&_0x4e877e===_0x45196e&&_0x4f794a?(this['_alignBeforeItem'](_0x3aa6a6,_0x7ff1a0),this['_alignAfterItem'](_0x7ff1a0,_0x3aa6a6)):_0x4e877e&&_0x4e877e===_0x45196e?this['_alignBeforeItem'](_0x3aa6a6,_0x7ff1a0):this['_alignAfterItem'](_0x7ff1a0,_0x3aa6a6);}['_recalculate'](_0x2a4a9a,_0x4a3b67){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2002ae,changedProp:_0x3e272b}of this['_recalculateBuffer'])'top'===_0x3e272b?this['_alignForTopChange'](_0x2002ae):this['_alignForBottomChange'](_0x2002ae);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2a4a9a,'changedProp':_0x4a3b67});}['getSidebarItemView'](_0x43f36c){return this['_annotationToSidebarItemView']['get'](_0x43f36c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5b5ce3){const _0x4e1e38=this['getSidebarItemView'](_0x5b5ce3);this['stopListening'](_0x4e1e38),this['stopListening'](_0x5b5ce3['view']),_0x4e1e38['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5b5ce3),this['_sidebarItemViewToAnnotation']['delete'](_0x4e1e38);}['_createSidebarView'](){const _0x560b0d=new _i(this['context']['locale']);return _0x560b0d['render'](),this['on']('change:_lastItem',(_0x2933a3,_0x26020f,_0x68e586,_0x231b0d)=>{_0x231b0d&&_0x560b0d['unbind']('minHeight'),_0x68e586?_0x560b0d['bind']('minHeight')['to'](_0x68e586,'bottom'):_0x560b0d['minHeight']=null;}),_0x560b0d;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x39a1c1){const _0x17478f=this['_sidebarItemViewToAnnotation']['get'](_0x39a1c1),_0x4309e2=_0x17478f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x17478f)-0x1);return _0x4309e2&&this['getSidebarItemView'](_0x4309e2)||null;}['_getItemAfter'](_0x71c71e){const _0x547d12=this['_sidebarItemViewToAnnotation']['get'](_0x71c71e),_0x291398=_0x547d12&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x547d12)+0x1);return _0x291398&&this['getSidebarItemView'](_0x291398)||null;}['_alignBeforeItem'](_0x34a284,_0x1fa53a){_0x34a284['updateHeight']();const _0x56b39b=vi(_0x1fa53a['bottom']+this['_spaceBetweenItems'],_0x34a284['top']);return!!_0x56b39b&&(this['_setItemTop'](_0x1fa53a,_0x1fa53a['top']-_0x56b39b),!0x0);}['_alignAfterItem'](_0x128aa9,_0x2e4bae){_0x128aa9['updateHeight']();const _0x719b0a=vi(_0x128aa9['bottom']+this['_spaceBetweenItems'],_0x2e4bae['top']);return!!_0x719b0a&&(this['_setItemTop'](_0x2e4bae,_0x2e4bae['top']+_0x719b0a,!0x1),!0x0);}['_alignToTargetRect'](_0x176269){const _0x2035e6=this['_sidebarItemViewToAnnotation']['get'](_0x176269);if(!_0x2035e6||!_0x2035e6['target']||!_0x2035e6['targetRect'])return;const _0x4ae2f9=this['_getTargetTop'](_0x2035e6,_0x2035e6['targetRect']);this['_setItemTop'](_0x176269,_0x4ae2f9);}['_getTargetTop'](_0x46ac36,_0x30d163){if(null===_0x30d163)return 0x0;if(_0x46ac36['target']instanceof _0x1ed994)return _0x30d163['top'];{const _0x256640=new _0x1ed994(this['view']['element'])['top'];return _0x30d163['top']-_0x256640;}}['_setItemTop'](_0x8b86cf,_0x48754c,_0x1f2cdb=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1f2cdb&&(_0x48754c=Math['max'](_0x48754c,this['_getMaxAvailableTop'](_0x8b86cf))),_0x8b86cf['top']=_0x48754c;}['_getMaxAvailableTop'](_0x1991b1){let _0x2bff19=this['_getItemBefore'](_0x1991b1),_0x374562=0x0;for(;_0x2bff19;)_0x2bff19['updateHeight'](),_0x374562+=this['_spaceBetweenItems']+_0x2bff19['height'],_0x2bff19=this['_getItemBefore'](_0x2bff19);return _0x374562;}}function vi(_0x13749,_0x46f0a0){return Math['max'](_0x13749-_0x46f0a0,0x0);}function yi(_0x1c1738){return null!==_0x1c1738&&'object'==typeof _0x1c1738&&0x1===_0x1c1738['nodeType'];}class Ci extends _0xf6081e{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x202b0a){super(_0x202b0a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xf4c9ca(),this['_refreshPositioningDebounced']=_0x51df8a(()=>{_0x202b0a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2839a4=this['context']['plugins']['get'](pi),_0x484bae=this['context']['plugins']['get'](Ti);_0x2839a4['register']('wideSidebar',this),_0x484bae['container']&&_0x2839a4['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x446b34){if(_0x446b34===this['activeAnnotation'])return;const _0x41b792=this['context']['plugins']['get'](Ti);_0x41b792['_activeAnnotation']=_0x446b34;const _0x1b77a6=this['activeAnnotation'];_0x41b792['refresh']({'blurredAnnotation':_0x1b77a6,'activatedAnnotation':_0x446b34}),this['activeAnnotation']=_0x446b34;}['attach'](_0x414aca){this['annotations']=_0x414aca;const _0x711308=this['context']['plugins']['get'](Ti);if(_0x711308['_annotations']=_0x414aca,this['isAttached'])throw new _0x2d21f6('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x711308,'set:container',()=>{this['detach'](),this['listenTo'](_0x711308,'change:container',_0x2ff43f=>{_0x2ff43f['off'](),this['attach'](_0x414aca);});}),_0x711308['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3e3954=_0x1f7a70=>{_0x1f7a70['updateTargetRect'](),_0x711308['addAnnotation'](_0x1f7a70);};for(const _0x49ff97 of _0x414aca)_0x3e3954(_0x49ff97);this['listenTo'](_0x414aca,'add',(_0x44f5c7,_0x9c1763)=>{_0x3e3954(_0x9c1763);}),this['listenTo'](_0x414aca,'remove',(_0x486507,_0x3a7c75,_0x4173ed)=>{_0x711308['rearrange']({'removedAnnotation':_0x3a7c75,'previousAnnotation':_0x414aca['get'](_0x4173ed-0x1),'nextAnnotation':_0x414aca['get'](_0x4173ed+0x1)}),_0x3a7c75===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x414aca,'focus',(_0x390bf7,_0x437b6e)=>{this['setActiveAnnotation'](_0x437b6e);}),this['listenTo'](_0x414aca,'blur',()=>{this['setActiveAnnotation'](null);});const _0x7927a7=this['context']instanceof _0x25049f?this['context']['editors']:new _0xf4c9ca([this['context']]);for(const _0x23c0a5 of _0x7927a7)this['_integrateWithEditorAnnotations'](_0x23c0a5);this['listenTo'](_0x7927a7,'add',(_0x22d691,_0x30a5e7)=>{this['listenTo'](_0x30a5e7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x30a5e7);});}),this['listenTo'](_0x7927a7,'remove',(_0xb6c28f,_0x2f911a)=>{_0x2f911a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2f911a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2d21f6('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2ed280=this['context']['plugins']['get'](Ti);_0x2ed280['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2ed280),this['stopListening'](this['annotations']),this['context']instanceof _0x25049f&&this['stopListening'](this['context']['editors']);for(const _0x280c4b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x280c4b);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2c0249){if(!_0x2c0249['plugins']['has']('EditorAnnotations'))return;const _0x5a0224=_0x2c0249['plugins']['get']('EditorAnnotations'),_0x59302d=()=>{const _0x3e0f84=_0x5a0224['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3e0f84[0x0]||null);};this['listenTo'](_0x5a0224,'refresh',_0x59302d),this['listenTo'](_0x5a0224,'blur',(_0x36201a,{isAnnotationTracked:_0x3151b8})=>{this['activeAnnotation']&&_0x3151b8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5a0224,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x59af68=>{_0x5a0224['hasDomSelection']()&&(_0x59302d(),_0x59af68['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5a0224);}['_destroyEditorAnnotationsIntegration'](_0x1dff4d){this['stopListening'](_0x1dff4d),this['_editorAnnotations']['remove'](_0x1dff4d);}}class Ii extends _0x50e620{['counterView'];constructor(_0x2b3fe0){super(_0x2b3fe0);const _0x774483=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4bba03,_0x56786c)=>_0x4bba03?'...':_0x56786c['toString']()),this['set']('annotationType',''),this['icon']=_0x44a19c,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x2f7517(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x774483['to']('annotationType',_0x2e5257=>'ck-annotation-counter__badge--'+_0x2e5257),_0x774483['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x774483['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0xf6081e{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x171868){super(_0x171868),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x357f19())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xf4c9ca(),this['_refreshPositioningDebounced']=_0x51df8a(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2ed903){this['annotations']=_0x2ed903;const _0x2541ee=this['context']['plugins']['get'](Ti),_0x19607d=this['balloonPanelView'];if(_0x2541ee['_annotations']=_0x2ed903,this['isAttached'])throw new _0x2d21f6('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2541ee,'set:container',()=>{this['detach'](),this['listenTo'](_0x2541ee,'change:container',_0x2f7378=>{_0x2f7378['off'](),this['attach'](_0x2ed903);});}),_0x2541ee['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x444991=_0x18c74d=>{const _0x338aea=new Ii(this['context']['locale']);_0x2541ee['addAnnotation'](_0x18c74d,_0x338aea),this['_annotationToNarrowView']['set'](_0x18c74d,_0x338aea),_0x338aea['bind']('isDirty','annotationType','number')['to'](_0x18c74d['view'],'isDirty','type','length'),_0x338aea['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x19607d['content']['first']!==_0x18c74d['view']?(this['_showBalloon'](_0x18c74d),_0x18c74d['view']['element']['focus'](),this['setActiveAnnotation'](_0x18c74d)):this['setActiveAnnotation'](null);});};for(const _0x19d8e9 of _0x2ed903)_0x444991(_0x19d8e9);this['listenTo'](_0x2ed903,'add',(_0x3d0bdd,_0x6bd3bc)=>{_0x444991(_0x6bd3bc);}),this['listenTo'](_0x2ed903,'remove',(_0x2373d9,_0x5e524a,_0xb7bb75)=>{this['_annotationToNarrowView']['get'](_0x5e524a)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5e524a),_0x2541ee['rearrange']({'removedAnnotation':_0x5e524a,'previousAnnotation':_0x2ed903['get'](_0xb7bb75-0x1),'nextAnnotation':_0x2ed903['get'](_0xb7bb75+0x1)}),_0x5e524a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2ed903,'focus',(_0x4c44ba,_0x412de8)=>{this['setActiveAnnotation'](_0x412de8);}),this['listenTo'](_0x2ed903,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2e095b,_0x55975d)=>{_0x55975d['keyCode']===_0x2c96d0['esc']&&_0x19607d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x19607d['content']['first']),this['_hideBalloon'](),_0x55975d['stopPropagation'](),_0x55975d['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x46dcbf,_0x45618e)=>{const _0x141552=_0x45618e['target'];_0x19607d['isVisible']&&_0x19607d['element']['contains'](_0x141552)||_0x2541ee['view']['element']['contains'](_0x141552)||_0x46dcbf['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x278caa=>_0x278caa['contains'](_0x141552))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x124f03=this['context']instanceof _0x25049f?this['context']['editors']:new _0xf4c9ca([this['context']]);for(const _0x132b05 of _0x124f03)this['_integrateWithEditorAnnotations'](_0x132b05);this['listenTo'](_0x124f03,'add',(_0x5242cb,_0x1980bf)=>{this['listenTo'](_0x1980bf,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1980bf);});}),this['listenTo'](_0x124f03,'remove',(_0x5e117e,_0x3c0bab)=>{_0x3c0bab['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3c0bab['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x572a48){if(_0x572a48===this['activeAnnotation'])return;const _0x21b779=this['context']['plugins']['get'](Ti);if(_0x21b779['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x572a48,'disableAnimationOnActivatedAnnotation':!0x0}),_0x572a48)_0x21b779['getSidebarItemView'](_0x572a48)?this['_showBalloon'](_0x572a48):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x572a48;}['detach'](){if(!this['isAttached'])throw new _0x2d21f6('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4b3e19=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4a7d98=>_0x4a7d98['destroy']()),this['_annotationToNarrowView']['clear'](),_0x4b3e19['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x25049f&&this['stopListening'](this['context']['editors']);for(const _0x281139 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x281139);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'](_0x58ceb5){if(!_0x58ceb5['plugins']['has']('EditorAnnotations'))return;const _0x4cdeb2=_0x58ceb5['plugins']['get']('EditorAnnotations'),_0x14c567=this['context']['plugins']['get'](Ti),_0x1d718e=this['annotations'],_0x4deeb2=this['balloonPanelView'],_0x10c3ab=()=>{const _0x38c25=_0x4cdeb2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x38c25),this['setActiveAnnotation'](_0x38c25[0x0]||null);};this['listenTo'](_0x4cdeb2,'refresh',_0x10c3ab),this['listenTo'](_0x4cdeb2,'blur',(_0x54de71,{isAnnotationTracked:_0x50a104})=>{this['activeAnnotation']&&_0x50a104(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4cdeb2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1d718e,'blur',_0xe88ece=>{_0x4cdeb2['hasDomSelection']()&&_0xe88ece['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x43b265,_0xf4e180)=>{const _0x2ac64f=_0xf4e180['target'];_0x4deeb2['isVisible']&&_0x4deeb2['element']['contains'](_0x2ac64f)||_0x14c567['view']['element']['contains'](_0x2ac64f)||this['activeAnnotation']&&_0x4cdeb2['hasDomSelection']()&&(_0x10c3ab(),_0x43b265['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4cdeb2);}['_destroyEditorAnnotationsIntegration'](_0x344a11){_0x344a11&&(this['stopListening'](_0x344a11),this['_editorAnnotations']['remove'](_0x344a11));}['_setSelectedAnnotations'](_0x5a9117){for(const _0x3b65df of this['_selectedAnnotations'])_0x5a9117['includes'](_0x3b65df)||this['_manuallyClosedAnnotationViews']['delete'](_0x3b65df['view']);this['_selectedAnnotations']=_0x5a9117;}['_refreshPositioning'](){const _0x30ee11=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x30ee11['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x14523a){if(this['_manuallyClosedAnnotationViews']['has'](_0x14523a['view']))return;const _0x2464ab=this['balloonPanelView']['content']['first'];_0x2464ab!==_0x14523a['view']?(_0x2464ab&&this['_detachListeners'](_0x2464ab),this['_attachListeners'](_0x14523a['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x14523a['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3d9920=this['balloonPanelView']['content']['first'],_0x907dfd=_0x3d9920&&this['annotations']['getByView'](_0x3d9920);if(!_0x907dfd||!this['_annotationToNarrowView']['has'](_0x907dfd))return;const _0x38f198=this['_annotationToNarrowView']['get'](_0x907dfd)['element'],_0x28e638=(function(){const _0xc6535b=ht['defaultPositions'];return[_0xc6535b['southArrowNorthEast'],_0xc6535b['northArrowSouthEast'],_0xc6535b['southArrowNorth'],_0xc6535b['northArrowSouth'],_0xc6535b['southArrowNorthWest'],_0xc6535b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x38f198,'positions':_0x28e638});}['_hideBalloon'](){const _0x2723bf=this['balloonPanelView'],_0x2ccad7=_0x2723bf['content']['first'];_0x2ccad7&&(this['_detachListeners'](_0x2ccad7),_0x2723bf['unpin'](),_0x2723bf['content']['clear']());}['_attachListeners'](_0x3bf637){this['listenTo'](_0x3bf637,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3bf637,'Esc',(_0x4fc926,_0x3d9419)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3bf637),this['_hideBalloon'](),_0x3d9419();});}['_detachListeners'](_0x30ef50){this['stopListening'](_0x30ef50);}}class Ei extends _0x91311a{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x559a07){super(_0x559a07),_0x559a07['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x559a07['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x51df8a(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x40a8ff=this['editor']['plugins']['get'](pi);_0x40a8ff['context']===this['editor']&&(_0x40a8ff['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x23b5d9,_0x4efd7c)=>{const _0x3ea282=this['_balloon'];if(this['isAttached']&&_0x3ea282['visibleView']){const _0x1793f9=this['annotations']['getByView'](_0x3ea282['visibleView']);_0x1793f9&&this['_closeAnnotation'](_0x1793f9),_0x4efd7c();}}));}['afterInit'](){const _0x24c796=this['editor']['plugins']['get'](pi);_0x24c796['context']===this['editor']&&(_0x24c796['hasActive']()||_0x24c796['switchTo']('inline'));}['setActiveAnnotation'](_0x33aa34){_0x33aa34!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x33aa34&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x33aa34)&&this['_addAnnotationToBalloon'](_0x33aa34,!0x0),_0x33aa34['isActive']=!0x0),_0x33aa34||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x33aa34);}['attach'](_0x3da50a){this['annotations']=_0x3da50a;const _0x461ca1=this['editor']['plugins']['get'](pi),_0x3df79e=this['_balloon'];if(this['isAttached'])throw new _0x2d21f6('inlineannotations-attach-already-attached',this);if(_0x461ca1['context']!==this['editor'])throw new _0x2d21f6('inlineannotations-not-allowed-with-context',this);const _0x37f5bd=this['editor']['plugins']['get'](si);this['listenTo'](_0x37f5bd,'refresh',()=>{const _0x5e01af=_0x37f5bd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x189b1e,_0x8f721b;!this['_forceRefresh']&&(_0x189b1e=_0x5e01af,_0x8f721b=this['_selectedAnnotations'],_0x189b1e['length']===_0x8f721b['length']&&_0x189b1e['every'](_0x1e06af=>_0x8f721b['includes'](_0x1e06af)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5e01af),this['setActiveAnnotation'](_0x5e01af[0x0]||null));}),this['listenTo'](_0x37f5bd,'blur',(_0x98b91b,{isAnnotationTracked:_0x25b30b})=>{this['activeAnnotation']&&_0x25b30b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x37f5bd,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0xa13c83,_0x3f323a,_0x4b8bfc)=>{_0x4b8bfc||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3da50a,'remove',(_0x14475d,_0x20031f)=>{this['_removeAnnotationFromBalloon'](_0x20031f),_0x20031f===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3df79e,'change:visibleView',(_0x39c68f,_0x265c19,_0x402906,_0x49f323)=>{_0x49f323&&this['stopListening'](_0x49f323);const _0x10a37b=_0x3da50a['getByView'](_0x402906);_0x402906&&_0x10a37b&&(this['listenTo'](_0x402906,'change:height',()=>{_0x3df79e['updatePosition']();}),this['listenTo'](_0x402906,'Esc',()=>{this['_closeAnnotation'](_0x10a37b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x10a37b&&this['setActiveAnnotation'](_0x10a37b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3df79e['visibleView']&&(_0x3da50a['getByView'](_0x3df79e['visibleView'])&&_0x3df79e['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 _0x2d21f6('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x263afb of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x263afb);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x39bab2){for(const _0x3e1e8a of this['_selectedAnnotations'])_0x39bab2['includes'](_0x3e1e8a)||this['_manuallyClosed']['delete'](_0x3e1e8a);for(const _0x2de9b5 of this['annotations'])_0x39bab2['includes'](_0x2de9b5)||this['_removeAnnotationFromBalloon'](_0x2de9b5);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2231cd of _0x39bab2)this['_addAnnotationToBalloon'](_0x2231cd);}this['_selectedAnnotations']=_0x39bab2;}['_addAnnotationToBalloon'](_0xac4e97,_0x380ab6=!0x1){this['_manuallyClosed']['has'](_0xac4e97)||(this['_addedAnnotations']['has'](_0xac4e97)||this['_balloon']['hasView'](_0xac4e97['view'])||(this['_addedAnnotations']['add'](_0xac4e97),this['_balloon']['add']({'stackId':_0xac4e97['view']['id'],'view':_0xac4e97['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xac4e97)}})),_0x380ab6&&this['_balloon']['showStack'](_0xac4e97['view']['id']));}['_getBalloonTargetForAnnotation'](_0x295285){const _0x347442=_0x295285['target'],_0x31bd61=this['editor']['editing']['view'],_0xec054f=_0x31bd61['document']['selection']['getFirstRange'](),_0x53dbe6=_0x31bd61['domConverter']['viewRangeToDom'](_0xec054f);if(_0x53dbe6['collapse'](!0x0),_0x347442){if(_0x347442 instanceof _0x1ed994)return _0x347442;let _0x8cd076=[];for(const _0x5d786a of _0x347442)_0x8cd076['push'](..._0x1ed994['getDomElementRects'](_0x5d786a));_0x8cd076=function(_0x28529d){const _0x7bdf5b=[];let _0x2feb01=_0x28529d[0x0];for(let _0x1c0298=0x1;_0x1c0298<_0x28529d['length'];_0x1c0298++)if(Ni(_0x2feb01,_0x28529d[_0x1c0298])){const _0x44b11d=_0x28529d[_0x1c0298]['width'];_0x2feb01['width']+=_0x44b11d,_0x2feb01['right']+=_0x44b11d;}else _0x7bdf5b['push'](_0x2feb01),_0x2feb01=_0x28529d[_0x1c0298];return _0x7bdf5b['push'](_0x2feb01),_0x7bdf5b;}(_0x8cd076);const _0xaf5aa1=_0x53dbe6['getBoundingClientRect']();return _0x8cd076['find'](_0x4be5ce=>_0x4be5ce['top']<=_0xaf5aa1['top']&&_0x4be5ce['bottom']>=_0xaf5aa1['bottom']&&_0x4be5ce['left']<=_0xaf5aa1['left']&&_0x4be5ce['right']>=_0xaf5aa1['right'])||_0x8cd076[0x0];}return _0x295285['targetRect']||_0x53dbe6;}['_removeAnnotationFromBalloon'](_0x261b1f){this['_addedAnnotations']['has'](_0x261b1f)&&this['_balloon']['hasView'](_0x261b1f['view'])&&(this['_addedAnnotations']['delete'](_0x261b1f),this['_balloon']['remove'](_0x261b1f['view']));}['_closeAnnotation'](_0x376ec9){this['_manuallyClosed']['add'](_0x376ec9),this['_removeAnnotationFromBalloon'](_0x376ec9);}}function Ni(_0x21cb59,_0x4a6564){return _0x21cb59['top']===_0x4a6564['top']&&_0x21cb59['bottom']===_0x4a6564['bottom']&&_0x21cb59['right']===_0x4a6564['left'];}class ki extends _0x2f7517{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x9e7e1c,_0x1e3222){super(_0x9e7e1c),this['set']('isEmpty',!_0x1e3222['length']),this['focusTracker']=new _0x616088(),this['_annotationViews']=_0x1e3222,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x15b20c({'focusables':_0x1e3222,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1e3222,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1e3222,'remove',(_0x4b1c6d,_0x3aab15)=>{_0x3aab15['isActive']&&this['focus'](),_0x1e3222['length']||(this['isEmpty']=!0x0);});const _0x20e82f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x9e7e1c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1e3222},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x20e82f['if']('isEmpty','ck-hidden',_0x2b6545=>!_0x2b6545)]},'children':[{'text':bt(_0x9e7e1c,'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 _0x3ffb46 of this['_annotationViews'])this['focusTracker']['add'](_0x3ffb46['element']);this['_annotationViews']['on']('change',(_0x284ebf,{added:_0x6ec115,removed:_0x323da0})=>{for(const _0x598978 of _0x6ec115)this['focusTracker']['add'](_0x598978['element']);for(const _0xfe680e of _0x323da0)this['focusTracker']['remove'](_0xfe680e['element']);});}}class Oi extends _0xf6081e{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x44321e){super(_0x44321e),this['archivedThreads']=new _0xf4c9ca();}['init'](){const _0x14a06f=this['context'],_0x56bd90=_0x14a06f['plugins']['get'](Qt),_0x2ed5c3=_0x14a06f['plugins']['get']($t);this['listenTo'](_0x56bd90,'addCommentThread',(_0x30ea88,{threadId:_0x13c586})=>{const _0x49dd2b=_0x56bd90['getCommentThread'](_0x13c586);_0x49dd2b['archivedAt']&&this['archivedThreads']['add'](_0x49dd2b,this['_calculatePosition'](_0x49dd2b['archivedAt'])),this['listenTo'](_0x49dd2b,'change:archivedAt',(_0x5b3f96,_0x1042f6,_0x1e44d3)=>{_0x1e44d3?this['archivedThreads']['has'](_0x49dd2b)||this['archivedThreads']['add'](_0x49dd2b,this['_calculatePosition'](_0x49dd2b['archivedAt'])):this['archivedThreads']['has'](_0x49dd2b)&&this['archivedThreads']['remove'](_0x49dd2b);});}),this['listenTo'](_0x56bd90,'removeCommentThread',(_0x378123,{threadId:_0x565c5d})=>{const _0x1c3833=_0x56bd90['getCommentThread'](_0x565c5d);this['stopListening'](_0x1c3833),this['archivedThreads']['has'](_0x1c3833)&&this['archivedThreads']['remove'](_0x1c3833);},{'priority':'highest'}),this['listenTo'](_0x2ed5c3['collection'],'focus',(_0xef86e,_0x26c14c)=>{_0x26c14c['isVisible']||(_0x26c14c['isActive']=!0x0,_0x2ed5c3['activate'](_0x26c14c));});}['_calculatePosition'](_0x548fdb){const _0x2557bd=[...this['archivedThreads']]['findIndex'](_0x3dea6c=>_0x3dea6c['archivedAt']<_0x548fdb);return _0x2557bd>-0x1?_0x2557bd:this['archivedThreads']['length'];}}class Mi extends _0x91311a{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x22e059){super(_0x22e059),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4c9efa=this['editor'],_0x4cc093=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4c9efa['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x50e620,!0x0)),_0x4c9efa['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x31757a=this['_createCommentsArchiveButton'](ot);return _0x31757a['set']({'role':'menuitemcheckbox'}),_0x31757a;});const _0x3385cc=_0x4c9efa['plugins']['get'](Oi),_0x393393=_0x4c9efa['plugins']['get']('Annotations'),_0x205029=_0x4c9efa['plugins']['get']('CommentsRepository');_0x3385cc['archivedThreads']['forEach'](_0x5c6ee9=>{this['_handleNewThread'](_0x5c6ee9);}),this['listenTo'](_0x3385cc['archivedThreads'],'add',(_0x49c3ae,_0x954ee4)=>{this['_handleNewThread'](_0x954ee4);}),this['listenTo'](_0x393393['collection'],'add',(_0x36de36,_0x2cab3b)=>{const _0x584e8d=this['_pendingThreads']['find'](_0x5b5d32=>{const _0x3ce9fe=_0x205029['_threadToController']['get'](_0x5b5d32);return _0x3ce9fe&&_0x2cab3b['innerView']===_0x3ce9fe['view'];});if(_0x584e8d){const _0x31fb54=this['_calculatePosition'](_0x584e8d['archivedAt']);this['_addAnnotationToArchive'](_0x2cab3b,_0x31fb54),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x584e8d),0x1);}}),this['listenTo'](_0x3385cc['archivedThreads'],'remove',(_0x37bd14,_0x1c6ca6)=>{const _0x389585=_0x4c9efa['config']['get']('collaboration.channelId');if(!_0x389585||_0x1c6ca6['channelId']===_0x389585){if(this['_pendingThreads']['includes'](_0x1c6ca6))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1c6ca6),0x1);else{const _0x21cb84=_0x205029['_threadToController']['get'](_0x1c6ca6),_0x6c8771=_0x393393['getByInnerView'](_0x21cb84['view']);this['annotationViews']['remove'](_0x6c8771['view']),this['stopListening'](_0x6c8771),this['stopListening'](_0x6c8771['focusableElements']);}}}),this['listenTo'](_0x393393['collection'],'add',(_0x5b8a7f,_0x2e43fd)=>{this['listenTo'](_0x2e43fd,'escape',_0x4cc093);}),this['listenTo'](_0x393393['collection'],'remove',(_0xa22bc6,_0x4aee2d)=>{this['stopListening'](_0x4aee2d,'escape',_0x4cc093);});}['_addAnnotationToArchive'](_0x53aa29,_0x542979){this['listenTo'](_0x53aa29,'set:isVisible',_0x28a91c=>{_0x28a91c['return']=!0x1,_0x28a91c['stop']();}),this['annotationViews']['add'](_0x53aa29['view'],_0x542979);}['_handleNewThread'](_0x49ffe1){const _0x6e21bc=this['editor']['plugins']['get']('CommentsRepository'),_0x316843=this['editor']['plugins']['get']('Annotations'),_0x30afd7=this['editor']['config']['get']('collaboration.channelId');if(!_0x30afd7||_0x49ffe1['channelId']===_0x30afd7){const _0xb8482d=_0x6e21bc['_threadToController']['get'](_0x49ffe1);if(!_0xb8482d)return void this['_pendingThreads']['push'](_0x49ffe1);const _0x33f5e4=this['_calculatePosition'](_0x49ffe1['archivedAt']),_0x9a1457=_0x316843['getByInnerView'](_0xb8482d['view']);_0x9a1457['isVisible']&&_0x316843['_visibleAnnotations']['remove'](_0x9a1457),this['_addAnnotationToArchive'](_0x9a1457,_0x33f5e4);}}['_calculatePosition'](_0x19a36a){const _0x586190=this['editor']['config']['get']('collaboration.channelId'),_0x16b3d8=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0xd13020=>_0xd13020['channelId']===_0x586190)['findIndex'](_0x4347ce=>_0x4347ce['archivedAt']<_0x19a36a);return _0x16b3d8<0x0||_0x16b3d8>this['annotationViews']['length']?this['annotationViews']['length']:_0x16b3d8-0x1;}['_toggleDialog'](){const _0xc88500=this['editor'],_0xd282e2=_0xc88500['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0xc88500['locale'],this['annotationViews'])),'commentsArchive'===_0xd282e2['id']?_0xd282e2['hide']():_0xd282e2['show']({'id':'commentsArchive','title':bt(_0xc88500['locale'],'COMMENTS_ARCHIVE'),'icon':_0x24e872,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x22c988,_0x36afa7=!0x1){const _0x34a886=this['editor']['locale'],_0x343885=this['editor']['plugins']['get']('Dialog'),_0x2c5d4b=new _0x22c988(_0x34a886);return _0x2c5d4b['bind']('isEnabled')['to'](this,'isEnabled'),_0x2c5d4b['bind']('isOn')['to'](_0x343885,'id',_0x15372a=>'commentsArchive'===_0x15372a),_0x2c5d4b['set']({'label':bt(_0x34a886,'COMMENTS_ARCHIVE'),'icon':_0x24e872,'isToggleable':!0x0}),_0x36afa7&&(_0x2c5d4b['tooltip']=!0x0),this['listenTo'](_0x2c5d4b,'execute',()=>this['_toggleDialog']()),_0x2c5d4b;}['_hideDialogOnAnnotationEscape']=_0x3589fe=>{const _0xcf9a5f=_0x3589fe['source'];if(!this['annotationViews']['has'](_0xcf9a5f['view']))return;const _0x4298aa=this['editor']['plugins']['get']('Dialog');_0x4298aa['isOpen']&&'commentsArchive'===_0x4298aa['id']&&(_0x4298aa['hide'](),_0x3589fe['stop']());};}class Ri extends _0x91311a{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|