@ckeditor/ckeditor5-comments 49.0.0-alpha.2 → 49.0.0-alpha.3
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.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.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{Command as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Pt)());constructor(_0x423b9b={}){(_0x423b9b=Object['assign']({},_0x423b9b))['plugins']||(_0x423b9b['plugins']=CommentEditor['defaultPlugins']),super(_0x423b9b),this['ui']=new xt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x31aecd=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x31aecd))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x38aa69=>{const _0x4915dd=this['model']['document']['getRoot'](),_0x385d14=_0x4915dd&&_0x4915dd['getChild'](_0x4915dd['childCount']-0x1);_0x38aa69['setSelection'](_0x385d14,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0xc09997=this['editing']['view'],_0x5d6b0a=_0xc09997['document']['getRoot'](),_0x43cfea=_0x5d6b0a['getChild'](0x0);_0x5d6b0a['childCount']>0x1||!_0x43cfea||'p'!=_0x43cfea['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(gt(_0xc09997,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x43cfea['placeholder']=this['placeholder']),_t({'view':_0xc09997,'element':_0x43cfea,'keepOnFocus':!0x0}),this['placeholderElement']=_0x43cfea);}},Vt=class extends lt{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0xf32650,_0x91f994={}){super(_0xf32650),this['editor']=null,this['_editorConfig']=_0x91f994,this['set']('value',_0x91f994['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Rt(_0xf32650,'Reply...')),this['set']('submitLabel',Rt(_0xf32650,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['cancelButtonView'],this['submitButtonView']]),this['keystrokes']=new _0x5e5e03(),this['focusTracker']=new _0xaa9933(),this['focusCycler']=new ot({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5f4f24=>!_0x5f4f24['defaultPrevented']},'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['cancelButtonView'],this['submitButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x1af8fb,_0x202381)=>{this['cancelButtonView']['fire']('execute'),_0x202381();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3f50b3,_0x5ccbe4)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5ccbe4());}),this['on']('submit',(_0x5170b3,_0x431f38)=>{_0x431f38['length']>0xfde8?(alert(Rt(_0xf32650,'TOO_LONG_COMMENT_ALERT',[_0x431f38['length'],0xfde8])),_0x5170b3['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Dt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1cc0ef=this['editor'];this['element']['insertBefore'](_0x1cc0ef['ui']['element'],this['element']['firstChild']),_0x1cc0ef['model']['document']['on']('change',()=>this['value']=_0x1cc0ef['getData']()),_0x1cc0ef['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1cc0ef['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x41ba07){-0x1===_0x41ba07?(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:_0x278764}=this,_0x483661=new _0x1f5a20(_0x278764);return _0x483661['extendTemplate']({'attributes':{'class':['ck-button-action','ck-comment__input-actions--submit']}}),_0x483661['withText']=!0x0,_0x483661['bind']('label')['to'](this,'submitLabel'),_0x483661['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x483661['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4d5c2f,_0x4e5e8f)=>!_0x4e5e8f&&!!_0x4d5c2f['trim']()),_0x483661;}_createCancelButton(){const {locale:_0x289fef}=this,_0x406743=new _0x1f5a20(_0x289fef);return _0x406743['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x406743['label']=Rt(_0x289fef,'Cancel'),_0x406743['withText']=!0x0,_0x406743['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x406743;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x42e79c=>{this['focusTracker']['add'](_0x42e79c['element']);}),this['focusables']['on']('change',(_0x57d6a9,_0x349745)=>{for(const _0x6ab44d of Array['from'](_0x349745['added'])['reverse']())this['focusTracker']['add'](_0x6ab44d['element']);});}},Bt=class extends lt{constructor(_0x247423,_0x16eaa5,_0xee4180){super(_0x247423),this['commentInputView']=new Vt(_0x247423,_0xee4180),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x528561,_0x115d60)=>_0x528561||!!_0x115d60),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 _0x2d042f(_0x247423,_0x16eaa5),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'](_0x4a237c){this['commentInputView']['focus'](_0x4a237c);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x2e7fa0,_0x2b2954)=>{const {submitButtonView:_0x205954,cancelButtonView:_0x44c4bd,editor:_0x50ab62}=this['commentInputView'];[_0x205954['element'],_0x44c4bd['element'],_0x50ab62?_0x50ab62['editing']['view']['getDomRoot']():null]['filter'](_0x560f14=>_0x560f14)['some'](_0xfb1292=>_0x533bc7(_0xfb1292,_0x2b2954['target']))||(this['focus'](),_0x2b2954['preventDefault']());});}},Ht=class extends lt{revealButtonView;constructor(_0x5dce82){super(_0x5dce82),this['set']('count',void 0x0);const _0x2c529a=this['revealButtonView']=new _0x1f5a20(_0x5dce82);_0x2c529a['icon']=_0x910759,_0x2c529a['withText']=!0x0,_0x2c529a['bind']('label')['to'](this,'count',_0x31864d=>Rt(_0x5dce82,'NUMBER_OF_COMMENTS',_0x31864d)),_0x2c529a['extendTemplate']({'attributes':{'class':'ck-button_small'}}),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[_0x2c529a]});}},Ut=class extends lt{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x47cd00,_0x35a43b,_0x54d10e){super(_0x47cd00);const _0xa9aea2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x35a43b['comments']['length']),this['set']('isActive',!0x1),this['set']('isExpandedByUser',!0x1),this['_model']=_0x35a43b,this['_config']=_0x54d10e,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xaa9933(),this['keystrokes']=new _0x5e5e03(),this['focusCycler']=new ot({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x43e924=>this['commentViews']['map'](_0x2cba80=>_0x2cba80['element'])['includes'](_0x43e924['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Ht(_0x47cd00),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x102246=>_0x102246-this['_config']['maxCommentsWhenCollapsed']),this['listenTo'](this['_collapsedCommentsView']['revealButtonView'],'execute',()=>{this['isExpandedByUser']=!0x0;});for(const _0x182abc of _0x35a43b['comments'])this['_handleNewCommentModel'](_0x182abc);this['_handleInfoComment'](),this['listenTo'](_0x35a43b['comments'],'add',(_0x5b76e9,_0x52c922)=>{const _0xe760fe=this['_calculatePosition'](_0x52c922);this['length']++,this['_handleNewCommentModel'](_0x52c922,_0xe760fe),this['refreshVisibleViews']();}),this['listenTo'](_0x35a43b['comments'],'remove',(_0x46b8b6,_0x512e74)=>{this['length']--,this['_handleRemoveCommentModel'](_0x512e74),this['refreshVisibleViews']();}),this['listenTo'](_0x35a43b,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x35a43b,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',(_0x152a0b,_0x2b6dee,_0x2c6426)=>{_0x2c6426||(this['isExpandedByUser']=!0x1),this['refreshVisibleViews']();}),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['on']('change:isExpandedByUser',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0xa9aea2['if']('length','ck-hidden',_0x17b7fd=>!_0x17b7fd)],'aria-label':Rt(_0x47cd00,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment']&&!this['isExpandedByUser'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x1d51bf){-0x1===_0x1d51bf?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x476060 of this['commentViews'])_0x476060['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x3436ef,_0x2f6d14){const _0x10c4c3=new this['_config']['CommentView'](this['locale'],_0x3436ef,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x10c4c3['viewUid']=_0x3436ef['id'],_0x10c4c3['delegate']('removeComment')['to'](this),_0x10c4c3['delegate']('updateComment')['to'](this),_0x10c4c3['delegate']('resolveCommentThread')['to'](this),_0x10c4c3['delegate']('editorReady')['to'](this),_0x10c4c3['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x10c4c3,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x10c4c3,_0x2f6d14);}_calculatePosition(_0x3a6d44){const _0xd585a7=this['_model']['_findOptimalIndex'](_0x3a6d44);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3a6d44['authoredAt']?_0xd585a7-0x1:_0xd585a7:_0xd585a7-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3e3a78={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Rt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3e3a78,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3e3a78));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x2442cb){const _0x641a23=this['commentViews']['remove'](_0x2442cb['id']);this['stopListening'](_0x641a23),_0x641a23['isEditMode']&&this['_updateHasDirtyComment'](),_0x641a23['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3a3b67=>_0x3a3b67['isEditMode']);}['_rearrangeCollapse'](){const _0x51b0f2=function(_0x5a5742){const _0x2c4ea5=new _0x57fdda();for(const _0x2e0b21 of _0x5a5742)_0x2c4ea5['add'](_0x2e0b21);return _0x2c4ea5;}(this['commentViews']),_0x1b01ce=this['_collapsedCommentsView']['count'];for(let _0x57053d=0x1;_0x57053d<=_0x1b01ce;_0x57053d++)_0x51b0f2['remove'](0x1);for(const _0x414523 of _0x51b0f2)_0x414523['collapse']();_0x1b01ce>0x0&&_0x51b0f2['add'](this['_collapsedCommentsView'],0x1),Ft(_0x2d433d(Array['from'](this['visibleViews']),Array['from'](_0x51b0f2)),this['visibleViews'],_0x51b0f2);}['_rearrangeExpand'](){Ft(_0x2d433d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3d9fa5 of this['visibleViews'])_0x3d9fa5['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x3f8eb6=>{this['focusTracker']['add'](_0x3f8eb6['element']),this['keystrokes']['listenTo'](_0x3f8eb6['element']);}),this['commentViews']['on']('change',(_0xffbad3,_0x368148)=>{for(const _0x4e3139 of _0x368148['removed'])this['focusTracker']['remove'](_0x4e3139['element']),this['keystrokes']['stopListening'](_0x4e3139['element']);for(const _0x5a3564 of Array['from'](_0x368148['added'])['reverse']())this['focusTracker']['add'](_0x5a3564['element']),this['keystrokes']['listenTo'](_0x5a3564['element']);});const _0x1f1c4=_0x5e95ee=>{const _0x10770d=this['_collapsedCommentsView']['revealButtonView']['element'];_0x10770d&&(_0x5e95ee?(this['focusTracker']['add'](_0x10770d),this['keystrokes']['listenTo'](_0x10770d)):(this['focusTracker']['remove'](_0x10770d),this['keystrokes']['stopListening'](_0x10770d)));};this['listenTo'](this['visibleViews'],'add',(_0x4fccfe,_0x3dd780)=>{_0x3dd780===this['_collapsedCommentsView']&&_0x1f1c4(!0x0);}),this['listenTo'](this['visibleViews'],'remove',(_0x393696,_0x3508d4)=>{_0x3508d4===this['_collapsedCommentsView']&&_0x1f1c4(!0x1);}),this['visibleViews']['has'](this['_collapsedCommentsView'])&&_0x1f1c4(!0x0);}};function Ft(_0xca59b,_0x2305cf,_0x57e611){let _0x3fedc3=0x0;for(const _0x54a2ec of _0xca59b)switch(_0x54a2ec){case'insert':_0x2305cf['add'](_0x57e611['get'](_0x3fedc3),_0x3fedc3),_0x3fedc3++;break;case'delete':_0x2305cf['remove'](_0x3fedc3);break;case'equal':_0x3fedc3++;}}var Wt=class extends lt{constructor(_0x4ed0bc){super(_0x4ed0bc);const _0x3bf8cb=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3bf8cb['to']('contextValue',_0x4a457a=>Rt(_0x4ed0bc,'THREAD_CONTEXT_LABEL',_0x4a457a)),'tabindex':-0x1},'children':[{'text':_0x3bf8cb['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Kt=class extends lt{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x5ab645,_0x4c069a){super(_0x5ab645);const _0x10c0c7=this['bindTemplate'];this['_model']=_0x4c069a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xaa9933(),this['keystrokes']=new _0x5e5e03(),this['focusCycler']=new ot({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x178f7d=>!!_0x178f7d),this['bind']('contextValue')['to'](this['_model'],'context',_0x1e1e86=>_0x1e1e86&&_0x1e1e86['value']?this['_trimContextValue'](_0x1e1e86['value']):Rt(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',_0x10c0c7['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 _0x4b88a5=new _0x1f5a20(this['locale']);return _0x4b88a5['label']=Rt(this['locale'],'Reopen'),_0x4b88a5['tooltip']=Rt(this['locale'],'Reopen'),_0x4b88a5['icon']=_0x2f64a7,_0x4b88a5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3be159=>!_0x3be159),_0x4b88a5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3691a0,_0x34f1f3)=>_0x3691a0&&_0x34f1f3),_0x4b88a5['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4b88a5;}_trimContextValue(_0xd7f38a){if(_0xd7f38a['length']<0x96)return _0xd7f38a;const _0x5a3216=_0xd7f38a['lastIndexOf']('\x20',0x93);return _0xd7f38a['substring'](0x0,_0x5a3216>-0x1?_0x5a3216:0x93)+'...';}_attachContextActions(){const _0x2a13b6=this['element']['querySelector']('.ck-context'),_0x1de39c=_0x2a13b6['querySelector']('.ck-context__value');this['listenTo'](_0x2a13b6,'mouseenter',()=>{_0x1de39c['offsetWidth']<_0x1de39c['scrollWidth']&&_0x2a13b6['classList']['add']('overlay');}),this['listenTo'](_0x2a13b6,'mouseleave',()=>{_0x2a13b6['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x5b65a6 of this['focusables'])this['focusTracker']['add'](_0x5b65a6['element']),this['keystrokes']['listenTo'](_0x5b65a6['element']);}_createContextView(){const _0x2f9524=new Wt(this['locale']);return _0x2f9524['bind']('contextValue')['to'](this),_0x2f9524;}},Gt=class extends lt{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x35fdc4,_0x246b18,_0x404361,_0x464830){super(_0x35fdc4),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x246b18,this['_localUser']=_0x404361,this['_config']=_0x464830,this['commentThreadHeaderView']=new Kt(_0x35fdc4,_0x246b18),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x443674(_0x35fdc4,Rt(_0x35fdc4,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Ut(_0x35fdc4,_0x246b18,Object['assign']({'CommentView':this['_config']['CommentView']},_0x464830)),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',(_0x569baf,_0x2703b2)=>_0x569baf||!!_0x2703b2),this['bind']('isUnlinked')['to'](_0x246b18,'unlinkedAt',_0x312dbc=>!!_0x312dbc);let _0x485912=null;const _0x5cd42a=()=>{const _0xfb4e92=this['_model']['comments']['first']||null;_0xfb4e92!==_0x485912&&(_0x485912&&this['stopListening'](_0x485912,'change:content'),_0x485912=_0xfb4e92,_0xfb4e92&&this['listenTo'](_0xfb4e92,'change:content',_0x5cd42a));const _0x400b4b=_0xfb4e92?_0xfb4e92['author']['name']:this['_localUser']['name'],_0x3a8b8e=_0xfb4e92?new DOMParser()['parseFromString'](_0x5af3c4(_0x28e8f4(_0xfb4e92['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']})),'text/html')['body']['textContent']:'',_0x156036=Rt(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x400b4b]);this['set']('ariaLabel',_0x3a8b8e?_0x156036+'\x20'+_0x3a8b8e:_0x156036);};this['listenTo'](this['_model']['comments'],'change',_0x5cd42a),_0x5cd42a(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xaa9933(),this['keystrokes']=new _0x5e5e03(),this['focusCycler']=new ot({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3d7c56=>_0x3d7c56['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x15bf15(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x5c1b6f=new Bt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x257777=_0x5c1b6f['commentInputView'];return _0x5c1b6f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x257777,'value',(_0x2cc3e7,_0xc90046,_0x15b1e5,_0xf23019,_0x245524)=>!!_0x245524||!!_0xf23019&&_0x15b1e5&&!_0xc90046||_0x2cc3e7&&_0x15b1e5&&!_0xc90046),_0x257777['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x16401e,_0x1a9260,_0x46f294)=>{let _0x2b222d;return _0x2b222d=_0x46f294&&_0x1a9260?'Reply\x20to\x20reopen\x20discussion...':_0x16401e?'Reply...':'Write\x20a\x20comment...',Rt(this['locale'],_0x2b222d);}),_0x257777['bind']('submitLabel')['to'](this,'length',_0x2bc2e8=>Rt(this['locale'],_0x2bc2e8?'Reply':'Comment')),_0x257777['on']('submit',(_0x6ab943,_0x56e2c7)=>{this['fire']('addComment',_0x56e2c7),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x257777['on']('cancel',()=>{this['focus']();}),_0x257777['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x257777['on']('cancel',_0x2fdc3e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2fdc3e['stop']());}),this['on']('change:isActive',(_0x1ac466,_0x33f8d1,_0x4f2a17)=>{_0x4f2a17||this['length']||_0x257777['value']||this['fire']('removeCommentThread');}),_0x5c1b6f;}};const Yt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x3d9bfb();var ti=class Annotation extends Zt{['view'];focusableElements;_type;_target;constructor({view:_0x1daccc,target:_0x4c6da2,type:_0x56fa0a,isVisible:_0x21f046=!0x0}){super(),this['view']=_0x1daccc,this['view']['element']||this['view']['render'](),this['_type']=_0x56fa0a,this['_target']=_0x4c6da2,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x57fdda([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x458e26,_0x3b0404)=>{this['view']['focusTracker']['add'](_0x3b0404);}),this['focusableElements']['on']('remove',(_0x34e0a2,_0x1fd38c)=>{this['view']['focusTracker']['remove'](_0x1fd38c);}),this['set']('isVisible',_0x21f046);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x559a86=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x559a86),_0x559a86;}get targetRect(){const _0x175392=this['target'];if(null===_0x175392)return null;if(_0x175392 instanceof _0x278104)return _0x175392;const _0x2e2a50=_0x175392['filter'](_0x48f2a4=>function(_0x20f3f2){return!!_0x20f3f2['offsetParent']||!!_0x20f3f2['getClientRects']()['item'](0x0);}(_0x48f2a4));return 0x0===_0x2e2a50['length']?null:_0x278104['getDomElementRects'](_0x2e2a50[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x430ab7){this['view']['isActive']=_0x430ab7,this['view']['mainView']['isActive']=_0x430ab7;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x390183){if(!(null===_0x390183||_0x390183 instanceof _0x278104||Array['isArray'](_0x390183)&&_0x390183['every'](_0x258786=>ii(_0x258786))))throw new _0x565c58('annotation-invalid-target',null,{'target':_0x390183});}_getNormalizedTarget(){const _0x3088e3='function'==typeof this['_target']?this['_target']():this['_target'];return ii(_0x3088e3)?[_0x3088e3]:_0x3088e3;}};function ii(_0xa22968){return null!==_0xa22968&&'object'==typeof _0xa22968&&'nodeType'in _0xa22968&&0x1===_0xa22968['nodeType'];}var ei=class extends _0x57fdda{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x46d58e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xaa9933(),this['_focusTracker']['on']('change:isFocused',(_0x427916,_0x4b5464,_0x2cb112)=>{_0x2cb112||this['fire']('blur');});for(const _0x231c06 of _0x46d58e)this['add'](_0x231c06);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x58761e){if(this['has'](_0x58761e))throw new _0x565c58('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x58761e['innerView'],_0x58761e),this['_viewToAnnotation']['set'](_0x58761e['view'],_0x58761e);for(const _0x537bd5 of _0x58761e['focusableElements'])this['_focusTracker']['add'](_0x537bd5);if(this['listenTo'](_0x58761e['focusableElements'],'add',(_0x162c2d,_0x3cfde0)=>{this['_focusTracker']['add'](_0x3cfde0);}),this['listenTo'](_0x58761e['focusableElements'],'remove',(_0x3ea7c2,_0x2a30f4)=>{this['_focusTracker']['remove'](_0x2a30f4);}),this['listenTo'](_0x58761e['view']['focusTracker'],'change:isFocused',(_0x36217e,_0x21a4b9,_0x13decc)=>{_0x13decc&&this['fire']('focus',_0x58761e);}),_0x58761e['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x5f3ffd of this)_0x5f3ffd['updateTargetRect']();}const _0x8867b4=this['_getOrderInContent'](_0x58761e['view']['targetRect']);return super['add'](_0x58761e,_0x8867b4);}['remove'](_0x3a962b){if(!this['has'](_0x3a962b))throw new _0x565c58('annotationcollection-not-existing-item',null);this['stopListening'](_0x3a962b['view']['focusTracker']),this['stopListening'](_0x3a962b['focusableElements']);for(const _0x5ab106 of _0x3a962b['focusableElements'])this['_focusTracker']['remove'](_0x5ab106);return this['_viewToAnnotation']['delete'](_0x3a962b['view']),this['_innerViewToAnnotation']['delete'](_0x3a962b['innerView']),super['remove'](_0x3a962b);}getByInnerView(_0x1307f5){return this['_innerViewToAnnotation']['get'](_0x1307f5);}getByView(_0x1edc7c){return this['_viewToAnnotation']['get'](_0x1edc7c);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x200130 of this)_0x200130['updateTargetRect']();this['_sort']();}_sort(){const _0x53db60=Array['from'](this)['sort']((_0x4b9e1e,_0x2d525e)=>ni(_0x4b9e1e['view']['targetRect'],_0x2d525e['view']['targetRect']));for(let _0x5b6703=_0x53db60['length']-0x1;_0x5b6703>0x0;_0x5b6703--){const _0x3e4eda=_0x53db60[_0x5b6703];_0x5b6703!==this['getIndex'](_0x3e4eda)&&(this['remove'](_0x3e4eda),this['add'](_0x3e4eda));}}_getOrderInContent(_0x5830f6){let _0x43fbdc=0x0;if(!_0x5830f6)return this['length'];for(const _0x2f8ccc of this){const _0x1ee684=_0x2f8ccc['view']['targetRect'];if(_0x1ee684){if(ni(_0x5830f6,_0x1ee684)<0x0)return _0x43fbdc;_0x43fbdc++;}}return _0x43fbdc;}_areCachedRectsStale(){const _0x4302c3=this['get'](0x0);if(!_0x4302c3)return!0x1;const _0x4c6bad=_0x4302c3['view']['targetRect'],_0x2fb7b9=_0x4302c3['targetRect'];return!(!_0x4c6bad||!_0x2fb7b9)&&(_0x4c6bad['top']!==_0x2fb7b9['top']||_0x4c6bad['left']!==_0x2fb7b9['left']);}};function si({source:_0x143279,target:_0xd87c89,filter:_0x49f0d7}){for(const _0x2f6409 of _0x143279)_0x49f0d7(_0x2f6409)&&_0xd87c89['add'](_0x2f6409);_0xd87c89['listenTo'](_0x143279,'add',(_0x41274f,_0x51de68)=>{_0x49f0d7(_0x51de68)&&_0xd87c89['add'](_0x51de68);}),_0xd87c89['listenTo'](_0x143279,'remove',(_0x1df5f3,_0x2f0172)=>{_0xd87c89['has'](_0x2f0172)&&_0xd87c89['remove'](_0x2f0172);});}function ni(_0x524df7,_0x20433b){if(null===_0x524df7&&null===_0x20433b)return 0x0;if(null===_0x524df7)return-0x1;if(null===_0x20433b)return 0x1;const _0x11b736=_0x524df7['top']-_0x20433b['top'];return 0x0==_0x11b736?_0x524df7['left']-_0x20433b['left']:_0x11b736;}var oi=class extends _0x58d8aa{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51d7bb){if(super(_0x51d7bb),this['collection']=new ei(),this['_visibleAnnotations']=new ei(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x51d7bb instanceof _0x328aa4){const _0x2a81fe=_0x51d7bb['locale'];_0x51d7bb['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Rt(_0x2a81fe,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Rt(_0x2a81fe,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Rt(_0x2a81fe,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Rt(_0x2a81fe,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Rt(_0x2a81fe,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Rt(_0x2a81fe,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Rt(_0x2a81fe,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x14f1d2){this['collection']['add'](_0x14f1d2);}['remove'](_0x3fbe9f){this['collection']['remove'](_0x3fbe9f),_0x3fbe9f['destroy']();}refreshVisibility(){for(const _0x52d585 of this['collection'])_0x52d585['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x11d16a){return this['collection']['getByInnerView'](_0x11d16a);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x47a141 of this['collection'])_0x47a141['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x33e394){this['fire']('_activateAnnotation',_0x33e394);}createAnnotation(_0x6ab2a6){return new ti(_0x6ab2a6);}createAnnotationView(_0x723bae,_0x305c70){return new Qt(_0x723bae,_0x305c70);}_addActiveAnnotation(_0x2917d3){const _0xd46d68=new Set(this['activeAnnotations']);_0xd46d68['add'](_0x2917d3),this['activeAnnotations']=_0xd46d68;}_removeActiveAnnotation(_0x6f515f){const _0x11e4fc=new Set(this['activeAnnotations']);_0x11e4fc['delete'](_0x6f515f),this['activeAnnotations']=_0x11e4fc;}_bindAnnotationsToVisibleAnnotations(){const _0x42aa0b=this['collection'],_0x46ebc6=this['_visibleAnnotations'];function _0x2bd6af(_0x1019e6){const _0x98c288=_0x1019e6['source'];_0x98c288['isVisible']&&!_0x46ebc6['has'](_0x98c288)?_0x46ebc6['add'](_0x98c288):!_0x98c288['isVisible']&&_0x46ebc6['has'](_0x98c288)&&_0x46ebc6['remove'](_0x98c288),_0x98c288['view']['focusTracker']['remove'](_0x98c288['view']['element']),_0x98c288['view']['focusTracker']['add'](_0x98c288['view']['element']);}this['listenTo'](_0x42aa0b,'add',(_0x4e7bb8,_0x47b654)=>{_0x47b654['isVisible']&&_0x46ebc6['add'](_0x47b654),this['listenTo'](_0x47b654,'change:isVisible',_0x2bd6af);}),this['listenTo'](_0x42aa0b,'remove',(_0x42999a,_0x4a9bf4)=>{_0x46ebc6['has'](_0x4a9bf4)&&_0x46ebc6['remove'](_0x4a9bf4),this['stopListening'](_0x4a9bf4,'change:isVisible',_0x2bd6af);});}_setupEnterAnnotationKeystroke(){const _0x306c45=_0x4b8ff6=>{_0x4b8ff6['on']('ready',()=>{_0x4b8ff6['keystrokes']['set'](_0x5d090e,(_0x1865f1,_0xae95b5)=>{const _0x354289=_0x1dc206(this['activeAnnotations']['values']());_0x354289&&(_0x354289['view']['focus'](),_0xae95b5());});});};this['context']instanceof _0x328aa4?_0x306c45(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x33dd0d,_0x416c4c)=>{_0x306c45(_0x416c4c);});}_setupEscapeAnnotationHandling(){const _0x152b0c=_0x39aaa8=>{const _0x588fef=_0x39aaa8['source'],_0xb17178=[];let _0x45c284;if(Array['isArray'](_0x588fef['target'])){_0x45c284=_0x588fef['target'][0x0],this['context']instanceof _0x328aa4?_0xb17178['push'](this['context']):this['context']['editors']&&_0xb17178['push'](...this['context']['editors']);for(const _0x33c5cd of _0xb17178)for(const _0x17c609 of _0x33c5cd['editing']['view']['domRoots']['values']())if(_0x533bc7(_0x17c609,_0x45c284))return void _0x33c5cd['editing']['view']['focus']();_0x45c284['focus']();}};this['listenTo'](this['collection'],'add',(_0x44b97c,_0x873618)=>{this['listenTo'](_0x873618,'escape',_0x152b0c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3bc4a6,_0x2ca0b9)=>{this['stopListening'](_0x2ca0b9,'escape',_0x152b0c);});}};const ri=Symbol('noChannel'),hi={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},ai=/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3d9bfb();var di=class extends _0x58d8aa{_threads;_threadToController;_viewToController;static get requires(){return[oi,_0x369494,_0x5dfc8c];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23deef){super(_0x23deef),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x35f8c6=this['context']['config'];_0x35f8c6['define']('comments.maxCommentsWhenCollapsed',0x2),_0x35f8c6['define']('comments.maxThreadTotalWeight',0x1f4),_0x35f8c6['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x35f8c6['define']('comments.CommentThreadView',Xt),_0x35f8c6['define']('comments.CommentView',zt),_0x35f8c6['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x2a74c6=this['context']['plugins']['get'](oi);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xc39abc,_0x42982d)=>this['_addCommentThread'](_0x42982d)),this['on']('submitCommentThread',(_0x14b794,_0x509be8)=>this['_submitCommentThread'](_0x509be8)),this['on']('resolveCommentThread',(_0x31c84b,_0x4acad4)=>this['_resolveCommentThread'](_0x4acad4)),this['on']('resolveCommentThread',(_0x497f29,_0x2845a4)=>this['_updateActiveAnnotation'](_0x2845a4),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x18e382,_0x2676d2)=>this['_reopenCommentThread'](_0x2676d2)),this['on']('reopenCommentThread',(_0x4d9d08,_0x250d3d)=>this['_updateActiveAnnotation'](_0x250d3d),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5bf48b,_0xe1dd47)=>this['_removeCommentThread'](_0xe1dd47)),this['on']('updateCommentThread',(_0x4349ce,_0x4cba1b)=>this['_updateCommentThread'](_0x4cba1b)),this['on']('updateCommentThread',(_0x223153,_0x15991d)=>this['_updateActiveAnnotation'](_0x15991d),{'priority':'lowest'}),this['on']('addComment',(_0x5a0d6c,_0x420823)=>this['_addComment'](_0x420823)),this['on']('updateComment',(_0x1facfe,_0x236151)=>this['_updateComment'](_0x236151)),this['on']('removeComment',(_0x219742,_0x203934)=>this['_removeComment'](_0x203934)),this['on']('addComment',(_0x6d98a0,{threadId:_0x48755f,isFromAdapter:_0x5505e9})=>{if(_0x5505e9)return;const _0x232c72=this['getCommentThread'](_0x48755f),_0x201c00=_0x232c72&&this['_threadToController']['get'](_0x232c72);_0x201c00&&_0x201c00['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2a74c6,'change:activeAnnotations',(_0x79e3e3,_0x3c02a2,_0x414f3f)=>{const _0x3d3832=Array['from'](_0x414f3f)['map'](_0x5830b4=>this['_viewToController']['get'](_0x5830b4['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3d3832?_0x3d3832['model']:null;});}set adapter(_0x4ae654){if(this['_adapter'])throw new _0x565c58('commentsrepository-adapter-already-set');this['_adapter']=_0x4ae654;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x1fba49=ri,threadId:_0x3bff84=_0x255be5(),comments:_0x3cdaac=[],unlinkedAt:_0x77e970=null,resolvedAt:_0x193455=null,resolvedBy:_0x10624f=null,target:_0x5d113d=null,context:_0x28182e=null,attributes:_0x990173={},isResolvable:_0x32ed61=!0x0,isSubmitted:_0x2d3a28=!0x1,isFromAdapter:_0x4a3931=!0x1}={}){return this['fire'](ui('addCommentThread',_0x1fba49),{'channelId':_0x1fba49,'threadId':_0x3bff84,'comments':_0x3cdaac,'unlinkedAt':_0x77e970,'resolvedAt':_0x193455,'resolvedBy':_0x10624f,'target':_0x5d113d,'context':_0x28182e,'attributes':_0x990173,'isFromAdapter':_0x4a3931,'isResolvable':_0x32ed61,'isSubmitted':_0x2d3a28}),this['getCommentThread'](_0x3bff84);}openNewCommentThread({channelId:_0x487beb=ri,threadId:_0x1518a3=_0x255be5(),target:_0x24d278,context:_0x12d518=null,isResolvable:_0x597574=!0x0}){if(this['_readOnlyChannels']['has'](_0x487beb)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x24d278)throw new _0x565c58('commentsrepository-missing-target');const _0x6b01c9=this['addCommentThread']({'channelId':_0x487beb,'threadId':_0x1518a3,'target':_0x24d278,'context':_0x12d518,'isResolvable':_0x597574});if(!_0x6b01c9)return null;const _0x4b1c4f=this['_threadToController']['get'](_0x6b01c9),_0x48913f=_0x4b1c4f['view']['commentThreadInputView']['commentInputView'],_0x37051e=this['context']['plugins']['get'](oi),_0x2cc096=_0x37051e['getByInnerView'](_0x4b1c4f['view']);return _0x37051e['activate'](_0x2cc096),_0x48913f['once']('editorReady',()=>_0x48913f['focus']()),_0x6b01c9;}hasCommentThread(_0xbb5c93){if('string'!=typeof _0xbb5c93)throw new _0x565c58('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xbb5c93);}updateCommentThread({channelId:_0x24730f=ri,threadId:_0x5e60e5,context:_0x55c15d,unlinkedAt:_0x5610f2,attributes:_0x1053cf,isFromAdapter:_0x3c5ae9=!0x1}){return this['fire'](ui('updateCommentThread',_0x24730f),{'channelId':_0x24730f,'threadId':_0x5e60e5,'context':_0x55c15d,'unlinkedAt':_0x5610f2,'attributes':_0x1053cf,'isFromAdapter':_0x3c5ae9}),this['getCommentThread'](_0x5e60e5);}getCommentThread(_0x3f16dd){if('string'!=typeof _0x3f16dd)throw new _0x565c58('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3f16dd);}fetchCommentThread({channelId:_0x56b024,threadId:_0x35ad59}={}){const _0x3ef31e=this['getCommentThread'](_0x35ad59);if(_0x3ef31e)return Promise['resolve'](_0x3ef31e);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x565c58('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x56b024,'threadId':_0x35ad59})['then'](_0x568c69=>this['hasCommentThread'](_0x35ad59)?this['getCommentThread'](_0x35ad59):_0x568c69?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x56b024},_0x568c69)):void 0x0)['catch'](_0x492904=>{throw console['error'](_0x492904),new _0x565c58('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x435f1a,skipNotAttached:_0xb9a71a=!0x1,skipEmpty:_0x5c4bf6=!0x1,toJSON:_0x59fbcd=!0x1}={}){const _0x116eb2=[];for(const _0x2cfcfd of this['_threads']['values']())_0x435f1a&&_0x2cfcfd['channelId']!==_0x435f1a||_0xb9a71a&&!_0x2cfcfd['isAttached']||_0x5c4bf6&&0x0===_0x2cfcfd['length']||_0x116eb2['push'](_0x2cfcfd);return _0x59fbcd?_0x116eb2['map'](_0x46619d=>_0x46619d['toJSON']()):_0x116eb2;}getAnnotationForCommentThread(_0x33acaf){const _0x3e40ea=this['_threadToController']['get'](_0x33acaf);return _0x3e40ea&&this['context']['plugins']['get'](oi)['getByInnerView'](_0x3e40ea['view'])||null;}getCommentThreadForAnnotation(_0x209dbc){const _0x2e3069=this['_viewToController']['get'](_0x209dbc['innerView']);return _0x2e3069?_0x2e3069['model']:null;}setActiveCommentThread(_0x53a3c9){const _0x3a4d49=this['context']['plugins']['get'](oi);if(!_0x53a3c9)return void(this['activeCommentThread']&&_0x3a4d49['deactivateAll']());const _0x4c6374=this['getCommentThread'](_0x53a3c9);if(!_0x4c6374)throw new _0x565c58('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x53a3c9});if(!this['_threadToController']['has'](_0x4c6374))throw new _0x565c58('commentsrepository-active-not-attached',null,{'threadId':_0x53a3c9});const _0x4806b6=_0x3a4d49['getByInnerView'](this['_threadToController']['get'](_0x4c6374)['view']);_0x3a4d49['activate'](_0x4806b6);}switchReadOnly(_0x1d4478,_0x378d07){_0x1d4478?this['_readOnlyChannels']['add'](_0x378d07):this['_readOnlyChannels']['delete'](_0x378d07),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x521834){return this['_readOnlyChannels']['has'](_0x521834)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0xaed362,_0x53d8be){return new Mt(_0xaed362,_0x53d8be);}setPermissions(_0x3f2119,_0x1fbf9e=ri){this['_permissions']['set'](_0x1fbf9e,_0x3f2119),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x693d28=ri){return this['_permissions']['has'](_0x693d28)?this['_permissions']['get'](_0x693d28):hi;}_addCommentThread({channelId:_0x2d607a,threadId:_0x10f2e9,comments:_0x3b5ba9,unlinkedAt:_0x3e6872,resolvedAt:_0x59ea96,resolvedBy:_0x931c27,target:_0x43c3d7,context:_0x3753ef,attributes:_0x65667b,isFromAdapter:_0x133df0,isResolvable:_0x51c9fb,isSubmitted:_0x119385}){if('string'!=typeof _0x10f2e9)throw new _0x565c58('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x10f2e9});if(this['hasCommentThread'](_0x10f2e9))throw new _0x565c58('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x10f2e9});const _0x4b862a=new li(this,{'channelId':_0x2d607a,'id':_0x10f2e9,'context':_0x3753ef,'attributes':_0x65667b,'unlinkedAt':_0x3e6872,'resolvedAt':_0x59ea96,'resolvedBy':_0x931c27?this['context']['plugins']['get'](_0x5dfc8c)['getUser'](_0x931c27):null,'isResolvable':_0x51c9fb,'isSubmitted':_0x119385||_0x133df0});this['_threads']['set'](_0x10f2e9,_0x4b862a);for(const _0x1ffbfc of _0x3b5ba9)_0x4b862a['_add'](this['_createNewComment']({'threadId':_0x10f2e9,..._0x1ffbfc}));return _0x43c3d7&&_0x4b862a['attachTo'](_0x43c3d7),_0x133df0||!_0x4b862a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2d607a,'threadId':_0x10f2e9});}_submitCommentThread({channelId:_0x509a9d,threadId:_0xdd0f90}){if(!this['hasCommentThread'](_0xdd0f90))throw new _0x565c58('commentsrepository-missing-comment-thread',this);const _0x30d6e4=this['getCommentThread'](_0xdd0f90);if(_0x30d6e4['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x452b9e,comments:_0x32fbb1,resolvedAt:_0x364067,resolvedBy:_0x523dd3,context:_0x46fb8f,attributes:_0x3ebaca}=_0x30d6e4,_0x5eca8c=this['context']['plugins']['get']('PendingActions'),_0x37ac69=_0x5eca8c['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x509a9d,'threadId':_0x452b9e,'comments':_0x32fbb1['map'](_0x547010=>_0x547010['toJSON']()),'resolvedAt':_0x364067,'resolvedBy':_0x523dd3?_0x523dd3['id']:_0x523dd3,'context':_0x46fb8f,'attributes':_0x3ebaca})['then'](({comments:_0x582906})=>{_0x5eca8c['remove'](_0x37ac69);for(const _0x35e005 of _0x582906)this['_updateComment']({'channelId':_0x509a9d,'threadId':_0xdd0f90,'commentId':_0x35e005['commentId'],'createdAt':_0x35e005['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x147ad5=>{throw console['error'](_0x147ad5),new _0x565c58('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x5a8ffb,target:_0x187504}){const _0x36b376=this['getCommentThread'](_0x5a8ffb);if(!_0x36b376)throw new _0x565c58('commentsrepository-attach-missing-comment-thread',this);const _0x393553=this['context']['plugins']['get']('PendingActions'),_0x4aec6e=this['context']['plugins']['get'](oi),_0x45e575=this['_createCommentThreadView'](_0x36b376),_0xeddbd0=new Mt(_0x36b376,_0x45e575);let _0x419e32=null;_0x45e575['on']('change:isDirty',(_0xc184f9,_0x1ef088,_0x1d62b2)=>{_0x1d62b2?_0x419e32=_0x393553['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x419e32&&(_0x393553['remove'](_0x419e32),_0x419e32=null);}),this['_threadToController']['set'](_0x36b376,_0xeddbd0),this['_viewToController']['set'](_0x45e575,_0xeddbd0);const _0x1a5ae1=new Qt(this['context']['locale'],_0x45e575);_0x1a5ae1['bind']('length')['to'](_0x45e575),_0x1a5ae1['bind']('isDirty')['to'](_0x45e575,'isDirty',_0x45e575,'length',(_0x28549f,_0x472bab)=>_0x28549f||!_0x472bab),_0x1a5ae1['bind']('isActive')['to'](_0x45e575),_0x1a5ae1['type']='comment';const _0xa03800=new ti({'view':_0x1a5ae1,'target':_0x187504,'type':'comment','isVisible':!_0x36b376['archivedAt']&&!!('function'==typeof _0x187504?_0x187504():_0x187504)});return _0x45e575['on']('escape',()=>{_0xa03800['fire']('escape');}),this['_bindAnnotationToEditors'](_0x45e575,_0xa03800),_0x4aec6e['add'](_0xa03800),_0xa03800;}_bindAnnotationToEditors(_0x272d8f,_0x5eda02){this['listenTo'](_0x272d8f,'editorReady',(_0x5e94d2,_0x41b9d9)=>{const _0x2b2831=_0x41b9d9['ui']['view']['body']['bodyCollectionContainer'];_0x5eda02['focusableElements']['add'](_0x2b2831),this['context']instanceof _0x328aa4&&this['context']['ui']['focusTracker']['add'](_0x2b2831);},{'priority':'highest'}),this['listenTo'](_0x272d8f,'editorDestroyed',(_0x16c866,_0x3cdce4)=>{const _0x448ed2=_0x3cdce4['ui']['view']['body']['bodyCollectionContainer'];_0x5eda02['focusableElements']['has'](_0x448ed2)&&_0x5eda02['focusableElements']['remove'](_0x448ed2),this['context']instanceof _0x328aa4&&this['context']['ui']['focusTracker']['remove'](_0x448ed2);});}_unbindEditors(_0x260c82){this['stopListening'](_0x260c82,'editorReady'),this['stopListening'](_0x260c82,'editorDestroyed');}_createCommentThreadView(_0x47aec4){const _0x58d43a=this['context']['plugins']['get'](_0x5dfc8c),{config:_0x3979f9,locale:_0xa3ad4b}=this['context'],_0x5f3b4d=_0x5eefd9(_0x3979f9['get']('locale'),_0xa3ad4b);return new(0x0,(_0x3979f9['get']('comments'))['CommentThreadView'])(_0xa3ad4b,_0x47aec4,_0x58d43a['me'],{'editorConfig':{..._0x3979f9['get']('comments.editorConfig'),...this['_getCommentEditorOverlayConfig'](),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3979f9['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3979f9['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3979f9['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3979f9['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5f3b4d,'CommentView':_0x3979f9['get']('comments')['CommentView']});}_getCommentEditorOverlayConfig(){const _0x48ca33=this['context']['config'],_0x339f54=_0x48ca33['get']('comments.editorConfig'),_0x1611f2=_0x339f54?.['ui']?.['overlayContainer']||_0x48ca33['get']('sidebar.overlayContainer')||_0x48ca33['get']('ui.overlayContainer');return _0x1611f2?{'ui':{..._0x339f54?.['ui'],'overlayContainer':_0x1611f2}}:{};}_resolveCommentThread({threadId:_0x14dc70,channelId:_0x5a171b,resolvedAt:_0x180ec7,resolvedBy:_0x24545c,isFromAdapter:_0xf943c7}){if(!this['hasCommentThread'](_0x14dc70))throw new _0x565c58('commentsrepository-missing-comment-thread',null,{'threadId':_0x14dc70});const _0x3f5181=this['getCommentThread'](_0x14dc70);if(_0x3f5181['isResolved'])throw new _0x565c58('commentsrepository-resolved-comment-thread',null,{'threadId':_0x14dc70});const _0x282d43=this['context']['plugins']['get'](_0x5dfc8c);if(_0x3f5181['resolvedBy']=_0x282d43['getUser'](_0x24545c),_0x3f5181['resolvedAt']=_0x180ec7,_0xf943c7||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x45fd13=this['context']['plugins']['get']('PendingActions'),_0x253644=_0x45fd13['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5a171b,'threadId':_0x14dc70})['then'](({resolvedAt:_0x1e4d8c,resolvedBy:_0x2ad5f2})=>{_0x45fd13['remove'](_0x253644),_0x3f5181['resolvedBy']['id']!==_0x2ad5f2&&(_0x3f5181['resolvedBy']=_0x282d43['getUser'](_0x2ad5f2)),_0x3f5181['resolvedAt']=_0x1e4d8c;})['catch'](_0x36a7c5=>{throw console['error'](_0x36a7c5),new _0x565c58('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x44202d,channelId:_0x40408e,isFromAdapter:_0x117f66}){if(!this['hasCommentThread'](_0x44202d))throw new _0x565c58('commentsrepository-missing-comment-thread',null,{'threadId':_0x44202d});const _0x634779=this['getCommentThread'](_0x44202d);if(!_0x634779['isResolved'])throw new _0x565c58('commentsrepository-reopen-comment-thread',null,{'threadId':_0x44202d});if(_0x634779['resolvedBy']=null,_0x634779['resolvedAt']=null,_0x117f66||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x51858e=this['context']['plugins']['get']('PendingActions'),_0x5802ae=_0x51858e['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x40408e,'threadId':_0x44202d})['then'](()=>_0x51858e['remove'](_0x5802ae))['catch'](_0x1af3d5=>{throw console['error'](_0x1af3d5),new _0x565c58('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x61bdc1,isFromAdapter:_0x16a1bf}){const _0x232ef9=this['getCommentThread'](_0x61bdc1);if(!_0x232ef9)throw new _0x565c58('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x61bdc1),this['_threads']['delete'](_0x61bdc1),!_0x232ef9['isSubmitted']||_0x16a1bf||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3d880b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33dd8f}=_0x232ef9,_0xbc7e8f=_0x3d880b['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x33dd8f,'threadId':_0x61bdc1})['then'](()=>_0x3d880b['remove'](_0xbc7e8f))['catch'](_0x1cf3a1=>{throw console['error'](_0x1cf3a1),new _0x565c58('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x19a459,unlinkedAt:_0x39ad11,context:_0x1fd313,attributes:_0x99b41a,isFromAdapter:_0x500937}){if('string'!=typeof _0x19a459)throw new _0x565c58('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x19a459});if(!this['hasCommentThread'](_0x19a459))throw new _0x565c58('commentsrepository-missing-comment-thread',null,{'threadId':_0x19a459});const _0xbbdeeb=this['getCommentThread'](_0x19a459);let _0x52511f=!0x1;if(void 0x0!==_0x1fd313&&_0xbbdeeb['context']!==_0x1fd313&&(_0xbbdeeb['context']=_0x1fd313,_0x52511f=!0x0),void 0x0!==_0x39ad11&&_0xbbdeeb['unlinkedAt']!==_0x39ad11&&(_0xbbdeeb['unlinkedAt']=_0x39ad11,_0x52511f=!0x0),_0x99b41a&&!_0x103814(_0x99b41a,_0xbbdeeb['attributes'])&&(_0xbbdeeb['attributes']=_0x99b41a,_0x52511f=!0x0),!_0x52511f)return Promise['resolve']();if(!_0xbbdeeb['isSubmitted']||_0x500937||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xda22b1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33de94}=_0xbbdeeb,_0x4836a5=_0xda22b1['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x33de94,'threadId':_0x19a459,'context':_0x1fd313,'unlinkedAt':_0x39ad11,'attributes':_0x99b41a})['then'](()=>_0xda22b1['remove'](_0x4836a5))['catch'](_0x575f38=>{throw console['error'](_0x575f38),new _0x565c58('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x326ef4){const _0x215449=this['context']['plugins']['get'](oi),_0x1631e9=this['getCommentThread'](_0x326ef4);if(_0x1631e9['_isAttached']=!0x1,this['_threadToController']['has'](_0x1631e9)){const _0x511fb5=this['_threadToController']['get'](_0x1631e9),_0x1fecd2=_0x511fb5['view'],_0x44b64f=_0x215449['getByInnerView'](_0x1fecd2);this['_threadToController']['delete'](_0x1631e9),this['_viewToController']['delete'](_0x1fecd2),_0x44b64f&&_0x215449['remove'](_0x44b64f),_0x511fb5['destroy'](),_0x1fecd2['destroy']()['then'](()=>{this['_unbindEditors'](_0x1fecd2);});}}_updateActiveAnnotation({threadId:_0x535e7e,resolvedAt:_0x461d83,unlinkedAt:_0x2d88eb}){const _0x27b2a6=!!_0x461d83,_0x187053=this['context']['plugins']['get'](oi),_0x268734=this['getCommentThread'](_0x535e7e);if(this['_threadToController']['has'](_0x268734)){const _0xccc710=this['_threadToController']['get'](_0x268734)['view'],_0xb98b9b=_0x187053['getByInnerView'](_0xccc710);_0xb98b9b&&(_0x27b2a6&&_0x187053['_removeActiveAnnotation'](_0xb98b9b),_0x2d88eb?_0xb98b9b['isVisible']=!0x1:_0xb98b9b['refreshVisibility']());}}_getExternalAuthor(_0x444ba4){const _0x552d97=this['context']['plugins']['get'](_0x5dfc8c),_0x35feff=_0x22ebbb('external:'+_0x444ba4),_0x293ee3=_0x552d97['getUser'](_0x35feff);return _0x293ee3||_0x552d97['addUser']({'id':_0x35feff,'name':_0x444ba4});}_createNewComment({threadId:_0x3ede68,commentId:_0x2add8e=_0x255be5(),content:_0x414d64,authorId:_0x2e792c,createdAt:_0x35f169,attributes:_0x43a25a}){if('string'!=typeof _0x2add8e)throw new _0x565c58('commentsrepository-invalid-commentid');if('string'!=typeof _0x2e792c)throw new _0x565c58('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x414d64||!_0x414d64['trim']())throw new _0x565c58('commentsrepository-invalid-comment-content');const _0x4a5cfe=this['context']['plugins']['get'](_0x5dfc8c)['getUser'](_0x2e792c);if(!_0x4a5cfe)throw new _0x565c58('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2e792c});let _0x345400=null,_0x461bc5=_0x35f169;return _0x43a25a?.['@external']&&(_0x345400=this['_getExternalAuthor'](_0x43a25a['@external']['authorName']),_0x461bc5=new Date(_0x43a25a['@external']['createdAt'])),new mi(this,{'threadId':_0x3ede68,'id':_0x2add8e,'author':_0x345400||_0x4a5cfe,'creator':_0x4a5cfe,'content':_0x414d64,'createdAt':_0x35f169,'authoredAt':_0x461bc5,'attributes':_0x43a25a});}_addComment(_0x1130d4){let {threadId:_0x352f9a,content:_0x26d809,attributes:_0x5bd008,isFromAdapter:_0x122c0a}=_0x1130d4;const _0x34bdfa=this['getCommentThread'](_0x1130d4['threadId']);if(!_0x34bdfa)throw new _0x565c58('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x45a866=this['_createNewComment'](_0x1130d4),{id:_0x1f81be}=_0x45a866;if(_0x34bdfa['_add'](_0x45a866),_0x122c0a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x34bdfa['isSubmitted'])return Promise['resolve']();const _0x38938d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1de14d}=_0x34bdfa,_0x42c01b=_0x38938d['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5bd008||(_0x5bd008={}),this['adapter']['addComment']({'channelId':_0x1de14d,'threadId':_0x352f9a,'commentId':_0x1f81be,'content':_0x26d809,'attributes':_0x5bd008})['then'](_0x3e2c94=>{_0x38938d['remove'](_0x42c01b),_0x3e2c94&&this['_updateComment']({'channelId':_0x1de14d,'threadId':_0x352f9a,'commentId':_0x1f81be,'createdAt':_0x3e2c94['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x23bb51=>{throw console['error'](_0x23bb51),new _0x565c58('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x5e8966,commentId:_0x286eea,content:_0xe03bf9,createdAt:_0x2a0490,attributes:_0x416658,isFromAdapter:_0x3285df}){if(void 0x0!==_0xe03bf9&&('string'!=typeof _0xe03bf9||!_0xe03bf9['trim']()['length']))throw new _0x565c58('commentsrepository-update-comment-invalid-content');const _0xb2090b=this['getCommentThread'](_0x5e8966),_0x3f3371=_0xb2090b['getComment'](_0x286eea);if(!_0x3f3371)throw new _0x565c58('commentsrepository-update-missing-comment',this);let _0x4a6f08=!0x1;if(_0xe03bf9&&_0xe03bf9!==_0x3f3371['content']&&(_0x3f3371['isEditable']||_0x3285df)&&(_0x3f3371['content']=_0xe03bf9,_0x4a6f08=!0x0),_0x2a0490&&_0x2a0490!==_0x3f3371['createdAt']&&(_0x3f3371['createdAt']=_0x2a0490,_0x3f3371['isExternal']||(_0x3f3371['authoredAt']=_0x2a0490),_0x4a6f08=!0x0),_0x416658&&!_0x103814(_0x416658,_0x3f3371['attributes'])&&(_0x3f3371['attributes']=_0x416658,_0x4a6f08=!0x0),!_0x4a6f08)return Promise['resolve']();if(_0xb2090b['fire']('commentUpdated'),_0x3285df||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5cf69d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x34f859}=this['getCommentThread'](_0x3f3371['threadId']),_0x1bb718=_0x5cf69d['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x34f859,'threadId':_0x5e8966,'commentId':_0x286eea,'content':_0xe03bf9,'attributes':_0x416658})['then'](()=>_0x5cf69d['remove'](_0x1bb718))['catch'](_0x5adc0c=>{throw console['error'](_0x5adc0c),new _0x565c58('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x4bd332,commentId:_0x3a7e3d,isFromAdapter:_0x9388b2}){const _0x31d462=this['getCommentThread'](_0x4bd332),_0x75332d=_0x31d462['getComment'](_0x3a7e3d);if(!_0x75332d)throw new _0x565c58('commentsrepository-remove-missing-comment',this);if(_0x31d462['_remove'](_0x75332d),_0x9388b2||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x620383=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2bf7fa}=_0x31d462,_0x17b431=_0x620383['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2bf7fa,'threadId':_0x4bd332,'commentId':_0x3a7e3d})['then'](()=>_0x620383['remove'](_0x17b431))['catch'](_0x3e5a65=>{throw console['error'](_0x3e5a65),new _0x565c58('commentsrepository-remove-comment-internal-error',this);});}},li=class extends ai{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x24ea33,_0x5c4bdb){super();const _0x170031=_0x5c4bdb['isResolvable'];this['channelId']=_0x5c4bdb['channelId'],this['id']=_0x5c4bdb['id'],this['comments']=new _0x57fdda(),this['_repository']=_0x24ea33,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5c4bdb['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x24ea33,'_permissions',_0x24ea33,'_readOnlyChannels',()=>_0x24ea33['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x24ea33,'_permissions',()=>_0x24ea33['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x24ea33,'_permissions',()=>{const _0x4f900a=_0x24ea33['getPermissions'](this['channelId']);return _0x4f900a['write']||_0x4f900a['admin'];}),this['bind']('isResolvable')['to'](_0x24ea33,'_permissions',()=>_0x170031&&_0x24ea33['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5c4bdb['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x90895b,_0x5294ef)=>_0x90895b?_0x5294ef?_0x90895b<_0x5294ef?_0x90895b:_0x5294ef:_0x90895b:_0x5294ef),this['set']('unlinkedAt',_0x5c4bdb['unlinkedAt']||null),this['set']('resolvedAt',_0x5c4bdb['resolvedAt']||null),this['set']('resolvedBy',_0x5c4bdb['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x51b6f3=>!!_0x51b6f3),this['set']('attributes',_0x5c4bdb['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x479af6,_0x5cc005)=>_0x479af6+_0x5cc005['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x3326b8,id:_0x3fb2cd}=this;this['_repository']['fire'](ui('submitCommentThread',_0x3326b8),{'channelId':_0x3326b8,'threadId':_0x3fb2cd});}setUnlinkedAt(_0x12d442){this['_update']({'unlinkedAt':_0x12d442});}['resolve']({resolvedAt:_0x3ff469=new Date(),resolvedBy:_0x12ffbd='',isFromAdapter:_0x1881fe=!0x1}={}){const _0xed2a92=this['_repository']['context']['plugins']['get'](_0x5dfc8c)['me'],{channelId:_0x3baddf,id:_0x403766}=this;this['_repository']['fire'](ui('resolveCommentThread',_0x3baddf),{'channelId':_0x3baddf,'threadId':_0x403766,'resolvedAt':_0x3ff469,'resolvedBy':_0x12ffbd||_0xed2a92['id'],'isFromAdapter':_0x1881fe});}['reopen']({isFromAdapter:_0x2d4e44=!0x1}={}){const {channelId:_0x1d9b07,id:_0x437c05}=this;this['_repository']['fire'](ui('reopenCommentThread',_0x1d9b07),{'channelId':_0x1d9b07,'threadId':_0x437c05,'isFromAdapter':_0x2d4e44});}setContext(_0x282cf1){this['context']||this['_update']({'context':_0x282cf1});}setAttribute(_0x4b944e,_0xc65c3e){const _0x9882ae=_0x50a0e5(this['attributes']);_0x47d1f8(_0x9882ae,_0x4b944e,_0xc65c3e),this['_update']({'attributes':_0x9882ae});}removeAttribute(_0x1793f1){const _0x57b35b=_0x50a0e5(this['attributes']);_0x1bb824(_0x57b35b,_0x1793f1),this['_update']({'attributes':_0x57b35b});}['remove']({isFromAdapter:_0x5250f3=!0x1}={}){const {channelId:_0xc6b802,id:_0x3e83b6}=this;this['_repository']['fire'](ui('removeCommentThread',_0xc6b802),{'channelId':_0xc6b802,'threadId':_0x3e83b6,'isFromAdapter':_0x5250f3});}attachTo(_0x541b7e){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x541b7e});}addComment(_0x5eb24d){const {channelId:_0x4bf25d,id:_0xafa17b}=this;this['_repository']['fire'](ui('addComment',_0x4bf25d,_0xafa17b),Object['assign']({'channelId':_0x4bf25d,'threadId':_0xafa17b},_0x5eb24d));}getComment(_0x503742){if('string'!=typeof _0x503742)throw new _0x565c58('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x503742});return this['comments']['get'](_0x503742);}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'](_0xc31b3a=>_0xc31b3a['toJSON']()),'attributes':this['attributes']};}['_add'](_0x20f763){return this['listenTo'](_0x20f763,'change:authoredAt',()=>{const _0x38c402=this['_findOptimalIndex'](_0x20f763),_0x542dc0=this['comments'];_0x38c402-0x1!=_0x542dc0['getIndex'](_0x20f763)&&_0x38c402+0x1!=_0x542dc0['getIndex'](_0x20f763)&&(this['_remove'](_0x20f763),this['_add'](_0x20f763));}),this['comments']['add'](_0x20f763,this['_findOptimalIndex'](_0x20f763));}_update(_0x2d6b9e){const {channelId:_0x27bb14,id:_0x430f0d}=this;this['_repository']['fire'](ui('updateCommentThread',_0x27bb14),{..._0x2d6b9e,'channelId':_0x27bb14,'threadId':_0x430f0d});}['_remove'](_0x2e5a70){return this['stopListening'](_0x2e5a70),_0x2e5a70['destroy'](),this['comments']['remove'](_0x2e5a70);}_findOptimalIndex(_0xfe27e4){const _0x4e2b1a=this['comments']['find'](_0x2c3adc=>new Date(_0x2c3adc['authoredAt'])['getTime']()>new Date(_0xfe27e4['authoredAt'])['getTime']());return _0x4e2b1a?this['comments']['getIndex'](_0x4e2b1a):this['length'];}},mi=class extends ci{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x49d6e1,_0x31594b){super();const _0x59386=_0x49d6e1['context']['plugins']['get'](_0x5dfc8c)['me'],_0x45fb06=_0x49d6e1['getCommentThread'](_0x31594b['threadId']),_0x58105f=0x0===_0x45fb06['comments']['length'],_0x54603f=_0x59386===_0x31594b['author'];this['id']=_0x31594b['id'],this['threadId']=_0x31594b['threadId'],this['author']=_0x31594b['author'],this['creator']=_0x31594b['creator'],this['set']('content',_0x31594b['content']),this['createdAt']=_0x31594b['createdAt']||new Date(),this['set']('authoredAt',_0x31594b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x45fb06,'resolvedAt'),this['set']('attributes',_0x31594b['attributes']||{}),this['bind']('isEditable')['to'](_0x49d6e1,'_permissions',()=>{const _0x439a46=_0x49d6e1['getPermissions'](_0x45fb06['channelId'])['write'],_0x1d1f1e=_0x49d6e1['getPermissions'](_0x45fb06['channelId'])['modifyAll'];return _0x54603f&&_0x439a46||!_0x54603f&&_0x1d1f1e;}),this['bind']('isRemovable')['to'](_0x45fb06,'isRemovable',_0x49d6e1,'_permissions',_0x67ba78=>{const _0x5c78cf=_0x49d6e1['getPermissions'](_0x45fb06['channelId'])['write'],_0x109f00=_0x49d6e1['getPermissions'](_0x45fb06['channelId'])['modifyAll'];return _0x54603f&&_0x5c78cf||_0x67ba78&&_0x58105f||!_0x54603f&&_0x109f00&&!_0x58105f;}),this['bind']('isReadOnly')['to'](_0x45fb06,'isReadOnly'),this['_repository']=_0x49d6e1;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x54b1ba){const _0xb1a3ca=document['createElement']('div');return _0xb1a3ca['innerHTML']=_0x5af3c4(_0x54b1ba),_0xb1a3ca['textContent']['length'];}(this['content']),0xc8);}update(_0x1263f1){const {threadId:_0x5731a6,id:_0x2c588c}=this;if(!this['_repository']['hasCommentThread'](_0x5731a6))throw new _0x565c58('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x78fb77}=this['_repository']['getCommentThread'](_0x5731a6);this['_repository']['fire'](ui('updateComment',_0x78fb77,_0x5731a6),{'channelId':_0x78fb77,'threadId':_0x5731a6,'commentId':_0x2c588c,..._0x1263f1});}setAttribute(_0x58c46,_0x3a0dc1){const _0x5c3588=_0x50a0e5(this['attributes']);_0x47d1f8(_0x5c3588,_0x58c46,_0x3a0dc1),this['update']({'attributes':_0x5c3588});}removeAttribute(_0x59e68f){const _0x576a51=_0x50a0e5(this['attributes']);_0x1bb824(_0x576a51,_0x59e68f),this['update']({'attributes':_0x576a51});}['remove'](_0x5296a8={}){if(!_0x5296a8['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1a9272,id:_0x3418e4}=this;if(!this['_repository']['hasCommentThread'](_0x1a9272))throw new _0x565c58('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x186938}=this['_repository']['getCommentThread'](_0x1a9272);this['_repository']['fire'](ui('removeComment',_0x186938,_0x1a9272),{'channelId':_0x186938,'threadId':_0x1a9272,'commentId':_0x3418e4,..._0x5296a8});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ui(_0x7f3e30,..._0x18d6e5){for(const _0x55d0a0 of _0x18d6e5)void 0x0!==_0x55d0a0&&(_0x7f3e30+=':'+String(_0x55d0a0));return _0x7f3e30;}var fi=class extends _0x2447c1{constructor(_0xb5a328){super(_0xb5a328),this['set']('hasContent',!0x1);}['refresh'](){const _0x4f12c1=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x218aba of _0x4f12c1['getRanges']())if(this['_hasContent'](_0x218aba))return void(this['hasContent']=!0x0);}execute({threadId:_0x1fef55=_0x255be5(),ranges:_0x126a5d,comment:_0x399640}={}){const _0x306e8d=this['editor']['model'],_0x2bbc97=_0x126a5d??Array['from'](_0x306e8d['document']['selection']['getRanges']()),_0x3a0222=[];for(const _0x319045 of _0x2bbc97)this['_hasContent'](_0x319045)&&_0x3a0222['push'](this['_trimToContent'](_0x319045));if(!_0x3a0222['length'])throw new _0x565c58('addcommentthreadcommand-incorrect-ranges',null);_0x399640&&this['_createCommentThread'](_0x1fef55,_0x399640),this['_createMarkersFromRanges'](_0x1fef55,_0x3a0222,!!_0x399640);}_createMarkersFromRanges(_0x503262,_0x413c3e,_0x2279ef){this['editor']['model']['change'](_0x9e8359=>{for(const _0x2af3fc of _0x413c3e){const _0x307f0b='comment:'+_0x503262+':'+_0x255be5()['substr'](0x1,0x5);_0x9e8359['addMarker'](_0x307f0b,{'range':_0x2af3fc,'usingOperation':_0x2279ef,'affectsData':_0x2279ef});}});}_createCommentThread(_0xa14320,_0x2a2b75){const _0x561443=this['editor']['plugins']['get']('CommentsRepository'),_0x16ff02=this['editor']['config']['get']('collaboration.channelId'),_0x456539=this['editor']['plugins']['get']('Users')['me'];if(!_0x456539)throw new _0x565c58('addcommentthreadcommand-user-not-found',null);_0x561443['addCommentThread']({'threadId':_0xa14320,'channelId':_0x16ff02,'comments':[{'authorId':_0x456539['id'],'content':_0x2a2b75,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x3558f4){for(const _0x1a8c9a of _0x3558f4['getItems']())if(this['_itemIsContent'](_0x1a8c9a))return!0x0;return!0x1;}_itemIsContent(_0x45e06c){return _0x45e06c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x45e06c)&&!_0x45e06c['is']('element','tableCell');}_trimToContent(_0x312ef0){const _0x1de4c1=_0x396216=>!this['_itemIsContent'](_0x396216['item']),_0xa25f06=_0x312ef0['start']['getLastMatchingPosition'](_0x1de4c1),_0x155f6f=_0x312ef0['end']['getLastMatchingPosition'](_0x1de4c1,{'direction':'backward'});return this['editor']['model']['createRange'](_0xa25f06,_0x155f6f);}},pi=class extends _0x2f3b5b{_dataCollectors;_editorAnnotations;static get requires(){return[oi];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54ec2b){super(_0x54ec2b),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x41a79f=this['editor'],_0x52321e=_0x41a79f['model']['document']['selection'],_0x11055b=_0x18d76f(()=>this['refreshSelectedViews'](),0xa);_0x52321e['on']('change:range',(_0x3f00e4,_0x373e5a)=>{_0x373e5a['directChange']&&(_0x11055b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x41a79f['editing']['view']['document'],'change:isFocused',(_0x14467e,_0x5d4bbe,_0x31616d)=>{_0x31616d&&_0x11055b();}),this['listenTo'](_0x41a79f['ui']['focusTracker'],'change:isFocused',(_0x9849ba,_0xc61998,_0x1c47b4)=>{_0x1c47b4||this['fire']('blur',{'isAnnotationTracked':_0x9449db=>this['_editorAnnotationsData']['has'](_0x9449db['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x5d9d0a){if(this['_editorAnnotations']['has'](_0x5d9d0a['view']))return;this['_editorAnnotations']['add'](_0x5d9d0a['view']),this['editor']['ui']['focusTracker']['add'](_0x5d9d0a['view']['element']);const _0x5a42da=this['editor']['plugins']['get'](oi);this['listenTo'](_0x5a42da['collection'],'remove',(_0x3b7919,_0x45de17)=>{this['editor']['ui']['focusTracker']['remove'](_0x45de17['view']['element']),this['_editorAnnotations']['delete'](_0x45de17['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x11e482){if('function'!=typeof _0x11e482)throw new _0x565c58('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x11e482);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x5f155a,annotations:_0x51b26e}){const _0x4d9a27=[],_0x9ba836=this['editor']['model']['document']['selection'],_0x38c820=Array['from'](_0x9ba836['getRanges']());for(const [_0x22924d,_0x5dee05]of this['_editorAnnotationsData']){const _0x504687=_0xefb72d(_0x5dee05),_0x2b7e98=_0x51b26e['getByInnerView'](_0x22924d);_0x504687&&_0x2b7e98&&_0x4d9a27['push']({'annotation':_0x2b7e98,'range':_0x504687});}function _0xefb72d(_0x1d5a46){for(const _0x2c2db3 of _0x1d5a46)for(const _0x2135cd of _0x38c820)if(_0x2c2db3['containsRange'](_0x2135cd,!_0x9ba836['isCollapsed']))return _0x2c2db3;return null;}const _0x3802e1=new Map(Array['from'](_0x51b26e,(_0x331a69,_0x3aa993)=>[_0x331a69,_0x3aa993]));return _0x4d9a27['sort']((_0x9b0e04,_0x513a58)=>{const _0x466d49=_0x9b0e04['range'],_0x1bd8df=_0x513a58['range'];if(!_0x466d49['start']['isTouching'](_0x1bd8df['start'])||!_0x466d49['end']['isTouching'](_0x1bd8df['end'])){if(_0x466d49['containsRange'](_0x1bd8df,!0x0))return 0x1;if(_0x1bd8df['containsRange'](_0x466d49,!0x0))return-0x1;}return _0x9b0e04['annotation']==_0x5f155a?-0x1:_0x513a58['annotation']==_0x5f155a?0x1:(_0x3802e1['get'](_0x9b0e04['annotation'])??0x0)-(_0x3802e1['get'](_0x513a58['annotation'])??0x0);})['map'](_0x492453=>_0x492453['annotation']);}get _editorAnnotationsData(){const _0x146bf4=new Map();for(const _0x37a03d of Array['from'](this['_dataCollectors']))for(const [_0x280be4,_0x1fff99]of _0x37a03d())_0x146bf4['set'](_0x280be4,_0x1fff99);return _0x146bf4;}},wi=class extends _0x2f3b5b{afterInit(){const _0x531b0e=this['editor'];_0x531b0e['plugins']['has']('RestrictedEditingModeEditing')&&_0x531b0e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},gi=class extends _0x2f3b5b{constructor(_0x2d8d77){super(_0x2d8d77),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x45d728=this['editor'],_0x5895db=_0x45d728['commands']['get']('importWord'),_0x3fae02=_0x45d728['plugins']['get'](_0x5dfc8c);_0x5895db&&(_0x5895db['on']('execute',(_0x2b3209,[,_0x5b5778])=>{_0x5b5778['collaboration_features']={'comments':!0x0,'user_id':_0x3fae02['me']['id']};},{'priority':_0x4ff005['high']+0xa}),this['listenTo'](_0x5895db,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x54654b,_0x477d9f){const {comment_threads:_0x29f7c5}=_0x477d9f;_0x29f7c5&&_0x29f7c5['forEach'](({thread_id:_0x2bb26e,comments:_0x1bc90b,is_resolved:_0x5485b2})=>{const _0x251ab9=new Date(),_0x1ea65d=_0x1bc90b['map'](({author:_0x2eb284,content:_0x296af4,created_at:_0x139052})=>({'content':_0x296af4,'authorId':this['editor']['plugins']['get'](_0x5dfc8c)['me']['id'],'createdAt':_0x251ab9,'attributes':{'@external':{'authorName':_0x2eb284,'createdAt':_0x139052?new Date(_0x139052):new Date(),'source':'importWord'}}})),_0x20b531=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](di)['addCommentThread']({'channelId':_0x20b531,'threadId':_0x2bb26e,'comments':_0x1ea65d,'resolvedAt':_0x5485b2?_0x251ab9:null});});}},_i=class extends _0x2f3b5b{constructor(_0x201931){super(_0x201931),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[vt,yt];}afterInit(){const _0x3dd794=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x3dd794,'contentInsertion',(_0x5114a0,_0x24d459)=>this['_removeMarkersWithoutThreads'](_0x24d459['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0xcb7260){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xcb7260;const _0x789f35=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2e8bad of _0xcb7260['keys']()){const [_0x230cc4,_0x42f4db]=_0x2e8bad['split'](':');'comment'!=_0x230cc4||_0x789f35['hasCommentThread'](_0x42f4db)||_0xcb7260['delete'](_0x2e8bad);}return _0xcb7260;}_registerMarkerInClipboardPipeline(){const _0x4e8253=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2d2b8f=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2d2b8f&&_0x4e8253['_registerMarkerToCopy']('comment',_0x2d2b8f);}_mapCommentsCopyConfigToRegisterConfiguration(_0x377da2){switch(_0x377da2){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function Ai(_0x14304e){const _0x9742d9=_0x14304e['split'](':');return{'group':_0x9742d9[0x0],'id':_0x9742d9[0x1],'part':_0x9742d9[0x2]};}var vi=class extends _0x2f3b5b{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x348257,_0x44b35e)=>{if(!_0x44b35e['options']['showCommentHighlights'])return null;if(_0x44b35e['options']['ignoreResolvedComments']){const {id:_0x8e1e3c}=Ai(_0x348257['markerName']);if(this['editor']['plugins']['get'](di)['getCommentThread'](_0x8e1e3c)?.['isResolved']&&_0x348257['item'])return _0x44b35e['consumable']['consume'](_0x348257['item'],'addMarker:'+_0x348257['markerName']),_0x44b35e['consumable']['consume'](_0x348257['item'],'removeMarker:'+_0x348257['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x32c3b2=>{_0x32c3b2['on']('addMarker:comment',(_0x367ff7,_0x1dfb93,_0x18334b)=>{if(!_0x18334b['options']['showCommentHighlights'])return;const _0x84b2c7=_0x1dfb93['item'];if(!_0x84b2c7)return;const _0x3ab637=_0x18334b['mapper']['toViewElement'](_0x84b2c7);this['editor']['model']['schema']['isObject'](_0x84b2c7)&&_0x3ab637&&!_0x3ab637['getCustomProperty']('widget')&&_0x3ab637['is']('containerElement')&&Nt(_0x3ab637,_0x18334b['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1a019c,{writer:_0x551edc,options:_0x4d405e})=>{if(!_0x4d405e['showCommentHighlights'])return null;const _0x2216d5=_0x551edc['createContainerElement']('div'),_0x2e1913=_0x551edc['createEmptyElement']('hr');return _0x551edc['addClass']('ck-horizontal-line',_0x2216d5),_0x551edc['insert'](_0x551edc['createPositionAt'](_0x2216d5,0x0),_0x2e1913),_0x2216d5;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x55ae97,{writer:_0x3be915,options:_0x372a58})=>{if(!_0x372a58['showCommentHighlights'])return null;const _0x4f86c2=_0x3be915['createContainerElement']('span'),_0x1983f0=_0x3be915['createEmptyElement']('img');return _0x3be915['addClass']('image-inline',_0x4f86c2),_0x3be915['insert'](_0x3be915['createPositionAt'](_0x4f86c2,0x0),_0x1983f0),_0x4f86c2;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x32667a,{writer:_0x5441cc,options:_0x1f08ba})=>{if(_0x1f08ba['showCommentHighlights'])return _0x5441cc['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x57f24f,_0x41b747,_0x2cc061)=>{_0x2cc061['options']['showCommentHighlights']&&_0x57f24f['stop']();},{'priority':'high'});}},yi=class extends _0x2f3b5b{static get requires(){return[di,pi,_0x5dfc8c,wi,gi,_i,vi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7627f9){super(_0x7627f9),this['set']('isThreadsLoadingPaused',!0x0),_0x7627f9['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x50b8c3,_0x3c7beb,_0x4a112d,_0x4b71bb)=>{const _0x72a266=_0x7627f9['plugins']['get'](di),_0x4f47be=_0x4a112d?Ai(_0x4a112d)['id']:null;_0x7627f9['model']['change'](()=>{if(_0x4f47be){const _0x12bbbd=this['getAllMarkersForId'](_0x4f47be);for(const _0x10fb8e of _0x12bbbd)_0x7627f9['editing']['reconvertMarker'](_0x10fb8e);}if(_0x4b71bb){const {id:_0x3c3b51}=Ai(_0x4b71bb),_0x4ddb18=_0x72a266['getCommentThread'](_0x3c3b51);if(_0x4ddb18&&_0x4ddb18['unlinkedAt'])return;if(_0x4ddb18&&!_0x4ddb18['isAttached'])return;const _0xa30526=this['getAllMarkersForId'](_0x3c3b51);for(const _0x27b9e6 of _0xa30526)_0x7627f9['editing']['reconvertMarker'](_0x27b9e6);}}),_0x4f47be&&this['scrollToThreadMarker'](_0x4f47be);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x4a59d2=this['editor'],_0x10a6f7=_0x4a59d2['plugins']['get'](di),_0x3aa604=_0x4a59d2['config']['get']('collaboration.channelId'),_0x373817=_0x10a6f7['getCommentThreads']()['filter'](_0x3b5cd1=>_0x3b5cd1['channelId']!==_0x3aa604);_0x4a59d2['commands']['add']('addCommentThread',new fi(_0x4a59d2)),this['listenTo'](_0x4a59d2,'change:isReadOnly',(_0x37218a,_0x2dc226,_0x178442)=>{_0x10a6f7['switchReadOnly'](_0x178442,_0x4a59d2['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x10a6f7,Ci('addCommentThread',_0x3aa604),(_0x325f38,{threadId:_0x577d4f})=>{this['editor']['plugins']['get'](di)['getCommentThread'](_0x577d4f)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x577d4f);}),this['listenTo'](_0x10a6f7,Ci('removeCommentThread',_0x3aa604),(_0x4005c2,{threadId:_0x24eeab})=>{_0x4a59d2['model']['enqueueChange']({'isUndoable':!0x1},_0x311304=>{const _0x557eb7=this['getAllMarkersForId'](_0x24eeab);for(const _0x5a8ddd of _0x557eb7)_0x311304['removeMarker'](_0x5a8ddd);});}),this['listenTo'](_0x10a6f7,Ci('resolveCommentThread',_0x3aa604),(_0x202888,{threadId:_0x5d04ca})=>{this['_reconvertMarkers'](_0x5d04ca);const _0x4484dc=this['editor']['plugins']['get'](oi);(this['editor']['editing']['view']['hasDomSelection']||_0x4484dc['collection']['isFocused'])&&(this['editor']['plugins']['get'](di)['getCommentThread'](_0x5d04ca)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x10a6f7,Ci('reopenCommentThread',_0x3aa604),(_0x3d8915,{threadId:_0x5ad735})=>{this['_reconvertMarkers'](_0x5ad735);},{'priority':'low'}),this['listenTo'](_0x10a6f7,Ci('addComment',_0x3aa604),(_0x1e0697,{threadId:_0x19d307,isFromAdapter:_0x370071})=>{const _0x2a09e6=this['getAllMarkersForId'](_0x19d307);!_0x370071&&0x0!=_0x2a09e6['length']&&_0x10a6f7['hasCommentThread'](_0x19d307)&&0x1===_0x10a6f7['getCommentThread'](_0x19d307)['length']&&_0x4a59d2['model']['enqueueChange']({'isUndoable':!0x1},_0x13d326=>{for(const _0x1b52ec of _0x2a09e6)_0x13d326['updateMarker'](_0x1b52ec,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x373817);}afterInit(){!async function(_0x2e7040){const _0x4607f0='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x178590=0x79740,_0x43e356={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x20ab97(_0x19dee0){const _0x3ed88c=new window['Promise'](_0x24720a=>{_0x19dee0['once']('ready',_0x24720a);}),_0x28b8ae=window['Date']['now'](),_0x1cb74d=_0x19dee0['config']['get']('licenseKey');async function _0x4130eb(){let _0xf40c71,_0x36986d=null,_0x3b2971=null;try{return'GPL'==_0x1cb74d?'NotAllowed':(_0xf40c71=_0xaf6c86(),_0xf40c71?(_0xf40c71['usageEndpoint']&&(_0x3b2971=_0x3c87e1(_0xf40c71['usageEndpoint'],_0xf40c71['jti'])),await _0xd1c378()?_0x3afdf4()?_0x5a9e75()?'Expired':_0x51ea1b()?('evaluation'==_0xf40c71['licenseType']&&(_0x36986d=_0x2bdcbc('EvaluationLimit')),await _0x5e4749()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5a9e75(){const _0x21f620=['evaluation','trial']['includes'](_0xf40c71['licenseType'])?_0x28b8ae/0x3e8:0xe10*_0x178590;return _0xf40c71['exp']<_0x21f620;}function _0x3afdf4(){const _0x192044=_0xf40c71['features'];if(!_0x192044)return!0x1;if(_0x192044['includes']('*'))return!0x0;if(_0x192044['includes']('CMT'))return!0x0;if(_0x192044['includes']('TRILIUM')&&_0x4189c6())return!0x0;if(_0x192044['includes']('RCMT')){if(_0x291a42())return!0x0;if(_0x80c9dc()||_0x8ef036())return!0x0;}return!0x1;}function _0x51ea1b(){const _0x558953=_0xf40c71['licensedHosts'];if(!_0x558953||0x0==_0x558953['length'])return!0x0;const {hostname:_0x1b5ac5}=new URL(window['location']['href']);if(_0x558953['includes'](_0x1b5ac5))return!0x0;const _0x4c8d56=_0x1b5ac5['split']('.');return _0x558953['filter'](_0x5c5217=>_0x5c5217['includes']('*'))['map'](_0x5629d8=>_0x5629d8['split']('.'))['filter'](_0x5d3931=>_0x5d3931['length']<=_0x4c8d56['length'])['map'](_0xb1acff=>Array(_0x4c8d56['length']-_0xb1acff['length'])['fill']('*'===_0xb1acff[0x0]?'*':'')['concat'](_0xb1acff))['some'](_0x7d16b4=>_0x4c8d56['every']((_0x25de14,_0x1554d0)=>_0x7d16b4[_0x1554d0]===_0x25de14||'*'===_0x7d16b4[_0x1554d0]));}function _0x5e4749(){return _0x36986d&&_0x3b2971?new window['Promise']((_0x336db6,_0x9c3bc0)=>{_0x36986d['then'](_0x336db6,_0x9c3bc0),_0x3b2971['then'](_0x4a7fbe=>{'Valid'!=_0x4a7fbe&&_0x336db6(_0x4a7fbe);},_0x9c3bc0);}):_0x36986d||_0x3b2971||'Valid';}}function _0x3c87e1(_0x415a9d,_0x2f41fe){return new window['Promise'](_0x538a7e=>{if(_0x52138b())return _0x538a7e('Valid');_0x5563b8(),_0x19dee0['decorate']('_sendUsageRequest');let _0x461112=!0x1;const _0x5a6d65=_0x255be5();function _0x39ff42(_0x4fcf47){return!!_0x4fcf47&&('object'==typeof _0x4fcf47||'function'==typeof _0x4fcf47)&&'function'==typeof _0x4fcf47['then']&&'function'==typeof _0x4fcf47['catch'];}function _0x46f0f2(_0x18d3fe){_0x195281(_0x18d3fe)['then'](_0x3bfb24=>_0x3bfb24&&'ok'==_0x3bfb24['status']?_0x1605d4(_0x115b46(_0x5a6d65+_0x2f41fe))!=_0x3bfb24['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x44157e=>(_0x1fe2f3(),_0x44157e),()=>{const _0x1bf18c=_0x4b8515();return null==_0x1bf18c?(_0x1fe2f3(),'Valid'):_0x28b8ae-_0x1bf18c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x538a7e)['catch'](()=>{_0x538a7e('UsageLimit');});const _0x109192=0x36ee80;function _0x1fe2f3(){const _0x548a69='llct-'+_0x1605d4(_0x115b46(_0x415a9d)),_0x3caebf=_0x2e35e8(_0x1605d4(window['Math']['ceil'](_0x28b8ae/_0x109192)));window['localStorage']['setItem'](_0x548a69,_0x3caebf);}function _0x4b8515(){const _0x599522='llct-'+_0x1605d4(_0x115b46(_0x415a9d)),_0x2c1628=window['localStorage']['getItem'](_0x599522);return _0x2c1628?window['parseInt'](_0x2e35e8(_0x2c1628),0x10)*_0x109192:null;}function _0x195281(_0xe59fd7){return new window['Promise']((_0x31a5cb,_0x23a8e9)=>{_0xe59fd7['then'](_0x31a5cb,_0x23a8e9),window['setTimeout'](_0x23a8e9,0x1d4c0);});}}_0x19dee0['on']('_sendUsageRequest',(_0x17b6f9,_0x5d8302)=>{if(_0x5d8302[0x0]!=_0x415a9d)return _0x538a7e('UsageLimit');_0x5d8302[0x1]={..._0x5d8302[0x1],'requestId':_0x5a6d65};},{'priority':'high'}),_0x19dee0['on']('_sendUsageRequest',_0x4cf3fa=>{_0x39ff42(_0x4cf3fa['return'])&&(_0x461112=!0x0,_0x46f0f2(_0x4cf3fa['return']));},{'priority':'low'}),_0x3ed88c['then'](()=>{_0x461112||_0x538a7e('UsageLimit');});});function _0x52138b(){return'auto'==_0x19dee0['editing']['view']['_overlayModeHint'];}function _0x5563b8(){_0x19dee0['editing']['view']['_overlayModeHint']='auto';}}function _0x2bdcbc(_0x2a568e){const _0x2ba1d2=[new window['Promise'](_0xeda878=>setTimeout(_0xeda878,0x93ecc)),_0x3ed88c['then'](()=>new window['Promise'](_0x3e1a69=>{let _0x1cbe42=0x0;_0x19dee0['model']['on']('applyOperation',(_0x417bd0,_0xf88616)=>{_0xf88616[0x0]['isDocumentOperation']&&_0x1cbe42++,0x5e8==_0x1cbe42&&(_0x3e1a69(),_0x417bd0['off']());});}))];return window['Promise']['race'](_0x2ba1d2)['then'](()=>_0x2a568e);}async function _0x1959c3(){await _0x3ed88c,_0x19dee0['model']['change']=_0x5e118f,_0x19dee0['model']['enqueueChange']=_0x5e118f,_0x19dee0['enableReadOnlyMode']('model');}function _0x4189c6(){return window['glob']&&window['glob']['triliumVersion'];}function _0x291a42(){return _0x48fd24('WebSocketGateway')&&'connected'==_0x3c4e6d('WebSocketGateway')['state'];}function _0x80c9dc(){return _0x48fd24('RevisionViewerIntegration');}function _0x8ef036(){return _0x48fd24('TrackChangesDataGetter');}function _0x13fd20(_0xeca972){const _0x4eaad7=_0x17b69c();_0x19dee0[_0x4eaad7]='commentsLicenseKey'+_0xeca972,'Valid'!=_0xeca972&&_0x1959c3();}function _0x17b69c(){const _0x2265e2=window['String'](window['performance']['now']())['replace']('.','');let _0x14a181='m';for(let _0x14dd55=0x0;_0x14dd55<_0x2265e2['length'];_0x14dd55+=0x2){let _0x35169e=window['parseInt'](_0x2265e2['substring'](_0x14dd55,_0x14dd55+0x2));_0x35169e>=0x3e&&(_0x35169e-=0x3e),_0x14a181+=_0x4607f0[_0x35169e];}return _0x14a181;}function _0xaf6c86(){const _0x4df4a9=_0x1cb74d['split']('.');if(0x3!=_0x4df4a9['length'])return null;return _0x4e19cc(_0x4df4a9[0x1]);function _0x4e19cc(_0x3f568d){const _0x5676ff=_0x26b1e2(_0x3f568d);return _0x5676ff&&_0x5218a3()?_0x5676ff:null;function _0x5218a3(){const _0x55d340=_0x5676ff['jti'],_0x1dc073=window['parseInt'](_0x55d340['substring'](_0x55d340['length']-0x8),0x10),_0xc752e4={..._0x5676ff,'jti':_0x55d340['substring'](0x0,_0x55d340['length']-0x8)};return delete _0xc752e4['vc'],_0x115b46(_0xc752e4)==_0x1dc073;}}}async function _0xd1c378(){let _0x293255=!0x0;try{const [_0x12d8e0,_0x5419b6,_0x3eb8bb]=_0x1cb74d['split']('.');return _0x32746a(_0x12d8e0),await _0x2180eb(_0x12d8e0,_0x5419b6,_0x3eb8bb),_0x293255;}catch{return!0x1;}function _0x32746a(_0xff9227){const _0x218f22=_0x26b1e2(_0xff9227);_0x218f22&&'ES256'==_0x218f22['alg']||(_0x293255=!0x1);}async function _0x2180eb(_0x3b2b55,_0x19698d,_0x488b87){const _0x54b17c=window['Uint8Array']['from'](_0x10d224(_0x488b87),_0x795473=>_0x795473['charCodeAt'](0x0)),_0x21812b=new window['TextEncoder']()['encode'](_0x3b2b55+'.'+_0x19698d),_0x5896f6=window['crypto']['subtle'];if(!_0x5896f6)return;const _0x33c89e=await _0x5896f6['importKey']('jwk',_0x43e356,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5896f6['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x33c89e,_0x54b17c,_0x21812b)||(_0x293255=!0x1);}}function _0x26b1e2(_0x3eef9c){return _0x3eef9c['startsWith']('ey')?JSON['parse'](_0x10d224(_0x3eef9c)):null;}function _0x10d224(_0x3f5e68){return window['atob'](_0x3f5e68['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x115b46(_0x54b4e6){let _0x20beb9=0x1505;function _0x496920(_0x570761){for(let _0x561452=0x0;_0x561452<_0x570761['length'];_0x561452++){const _0x50b5c8=_0x570761['charCodeAt'](_0x561452);_0x20beb9=(_0x20beb9<<0x5)+_0x20beb9+_0x50b5c8,_0x20beb9&=_0x20beb9;}}function _0x1f75cf(_0x5f0042){Array['isArray'](_0x5f0042)?_0x5f0042['forEach'](_0x1f75cf):_0x5f0042&&'object'==typeof _0x5f0042?Object['entries'](_0x5f0042)['sort']()['forEach'](([_0x8da7ee,_0x2ac037])=>{_0x496920(_0x8da7ee),_0x1f75cf(_0x2ac037);}):_0x496920(window['String'](_0x5f0042));}return _0x1f75cf(_0x54b4e6),_0x20beb9>>>0x0;}function _0x1605d4(_0xf6d4bc){return _0xf6d4bc['toString'](0x10)['padStart'](0x8,'0');}function _0x2e35e8(_0x450bc1){return _0x450bc1['split']('')['reverse']()['join']('');}function _0x48fd24(_0x1b5888){return _0x19dee0['plugins']['has'](_0x1b5888);}function _0x3c4e6d(_0x3e020a){return _0x19dee0['plugins']['get'](_0x3e020a);}function _0x5e118f(){}_0x13fd20(await _0x4130eb());}_0x20ab97(_0x2e7040['editor']);}(this);}destroy(){const _0x5c809c=this['editor']['plugins']['get'](di),_0x7a0670=this['editor']['config']['get']('collaboration.channelId');for(const _0xd84bf8 of _0x5c809c['getCommentThreads']({'channelId':_0x7a0670}))_0x5c809c['_detachCommentThread'](_0xd84bf8['id']),_0x5c809c['_threads']['delete'](_0xd84bf8['id']);super['destroy']();}['hasMarkerForId'](_0x34deb4){return this['getAllMarkersForId'](_0x34deb4)['length']>0x0;}getAllMarkersForId(_0x344325){const _0x327e3b=[];for(const _0x3c39f7 of this['editor']['model']['markers'])_0x3c39f7['name']['startsWith']('comment:'+_0x344325)&&_0x327e3b['push'](_0x3c39f7);return _0x327e3b;}['scrollToThreadMarker'](_0x3e81a9){setTimeout(()=>{const _0x915771=this['_getTargetForId'](_0x3e81a9);_0x915771&&this['activeMarker']&&Ai(this['activeMarker'])['id']===_0x3e81a9&&_0x328aaa({'target':_0x915771[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x4b6823){this['editor']['model']['change'](()=>{for(const _0x5e02b0 of this['getAllMarkersForId'](_0x4b6823))this['editor']['editing']['reconvertMarker'](_0x5e02b0);});}_attachArchivedThread(_0x59c3e8){const _0x29cfc0=this['editor']['plugins']['get'](di),_0x200532=this['editor']['plugins']['get'](pi),_0x343842=_0x29cfc0['getCommentThread'](_0x59c3e8);if(!_0x343842['isAttached']){const _0x128203=_0x343842['attachTo'](()=>this['_getTargetForId'](_0x343842['id']));_0x200532['registerAnnotation'](_0x128203),_0x343842['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x9e902e=this['editor'],_0x239c19=_0x9e902e['plugins']['get'](_0x5dfc8c);_0x9e902e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2f54a3,_0x1207c7)=>{const {id:_0x37ec13}=Ai(_0x2f54a3['markerName']),_0x35dd6d=_0x9e902e['plugins']['get'](di)['getCommentThread'](_0x37ec13),_0x52ba8a=this['activeMarker']&&Ai(this['activeMarker'])['id']===_0x37ec13;let _0x1cbad0;if(_0x35dd6d&&_0x35dd6d['isResolved']&&!_0x52ba8a&&_0x2f54a3['item'])return _0x1207c7['consumable']['consume'](_0x2f54a3['item'],'addMarker:'+_0x2f54a3['markerName']),_0x1207c7['consumable']['consume'](_0x2f54a3['item'],'removeMarker:'+_0x2f54a3['markerName']),null;const _0xf3384=['ck-comment-marker'];return _0x52ba8a&&_0xf3384['push']('ck-comment-marker--active'),_0x1cbad0=_0x35dd6d?.['length']?_0x35dd6d['comments']['first']['author']['id']:_0x239c19['me']['id'],{'classes':_0xf3384,'attributes':{'data-comment':_0x37ec13,'data-author-id':_0x1cbad0}};}}),_0x9e902e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x107ed4,{options:_0xc96419})=>{if(_0xc96419['showCommentHighlights'])return null;const _0x20eda3=_0x9e902e['plugins']['get'](di),_0x33d826=_0x9e902e['model']['markers']['get'](_0x107ed4),{id:_0x9c7293,part:_0x531b14}=Ai(_0x107ed4);return _0x33d826&&!_0x33d826['affectsData']||_0xc96419['ignoreResolvedComments']&&_0x20eda3['getCommentThread'](_0x9c7293)?.['isResolved']?null:{'group':'comment','name':_0x531b14?_0x9c7293+':'+_0x531b14:_0x9c7293};}}),_0x9e902e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1a1a2d,{writer:_0x3956b7})=>_0x3956b7['createElement']('$marker',{'data-name':'comment:'+_0x1a1a2d['getAttribute']('id')})}),_0x9e902e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5d6876=this['editor'],_0x25aacd=_0x5d6876['plugins']['get'](di),_0x5673ad=new Set(),_0x549334=new Set();_0x5d6876['model']['document']['registerPostFixer'](_0x1e5865=>{let _0x4669d2=!0x1;for(const {name:_0x2938f6,data:_0x2981b1}of _0x5d6876['model']['document']['differ']['getChangedMarkers']()){const {group:_0x33bab6,id:_0x60932b}=Ai(_0x2938f6);let _0x159c8b=_0x2981b1['newRange'];if('comment'!==_0x33bab6||!_0x159c8b)continue;const _0x2ea427='$graveyard'===_0x159c8b['root']['rootName'];_0x2ea427||(_0x159c8b=Ti(_0x159c8b,_0x5d6876['model']),!_0x159c8b||_0x159c8b['isCollapsed']||!_0x2981b1['newRange']||_0x159c8b['isEqual'](_0x2981b1['newRange']))?_0x5d6876['model']['hasContent'](_0x159c8b)&&!_0x2ea427?this['isThreadsLoadingPaused']?_0x5673ad['add'](_0x2938f6):this['_handleThreadMarker'](_0x2938f6,_0x60932b):(_0x549334['add'](_0x2938f6),_0x5673ad['delete'](_0x2938f6),_0x1e5865['removeMarker'](_0x2938f6),_0x4669d2=!0x0):(_0x1e5865['updateMarker'](_0x2938f6,{'range':_0x159c8b}),_0x4669d2=!0x0);}return _0x4669d2;}),this['on']('change:isThreadsLoadingPaused',(_0x526679,_0x22c95a,_0x1fd1d1)=>{if(!_0x1fd1d1&&_0x5673ad['size'])for(const _0x11fa03 of _0x5673ad){const {id:_0x13e4f8}=Ai(_0x11fa03);_0x5673ad['delete'](_0x11fa03),_0x5d6876['model']['markers']['get'](_0x11fa03)&&this['_handleThreadMarker'](_0x11fa03,_0x13e4f8);}}),this['listenTo'](_0x5d6876['model']['document'],'change',()=>{for(const {name:_0x1478ae,data:{newRange:_0x1e7d07}}of _0x5d6876['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1b0738,id:_0x3a2512}=Ai(_0x1478ae);if('comment'!==_0x1b0738)continue;const _0xad821d=_0x25aacd['getCommentThread'](_0x3a2512),_0x31ec01=this['hasMarkerForId'](_0x3a2512);_0xad821d&&(!_0xad821d['_hasTargetInContent']&&_0x1e7d07&&_0x5d6876['editing']['view']['once']('render',()=>{const _0x44ee9e=_0x5d6876['plugins']['get'](oi),_0x5730fe=_0x25aacd['_threadToController']['get'](_0xad821d)['view'];_0x44ee9e['getByInnerView'](_0x5730fe)['refreshVisibility']();},{'priority':'low'}),_0xad821d['_hasTargetInContent']=_0x31ec01||!!_0x1e7d07),_0x1e7d07||(_0x549334['add'](_0x1478ae),_0x5673ad['delete'](_0x1478ae));}for(const _0x9f4ab9 of _0x549334){const {id:_0x388c2e}=Ai(_0x9f4ab9),_0x14cc76=_0x25aacd['getCommentThread'](_0x388c2e);if(_0x5673ad['delete'](_0x9f4ab9),!_0x14cc76)continue;const _0x2f657d=this['hasMarkerForId'](_0x388c2e);_0x2f657d||_0x14cc76['isSubmitted']?_0x2f657d||_0x14cc76['unlinkedAt']||_0x14cc76['setUnlinkedAt'](new Date()):_0x14cc76['remove']();}_0x549334['clear']();});}_handleInitialThreads(_0x134058){_0x134058['forEach'](_0x2ce1e5=>{_0x2ce1e5['unlinkedAt']&&this['_attachArchivedThread'](_0x2ce1e5['id']);});}_getTargetForId(_0x1c1353){const _0x46b677=this['editor'],_0x377665=this['getAllMarkersForId'](_0x1c1353);return _0x280485(_0x46b677['editing'],_0x377665);}_getTextContext(_0x286d9f){const _0x24c39a=this['getAllMarkersForId'](_0x286d9f);let _0x100004='',_0x379523=!0x1;for(const _0x4212fc of _0x24c39a){const _0xe168c3=_0x4212fc['getRange']();for(const _0x435e10 of Array['from'](_0xe168c3['getItems']()))_0x435e10['is']('$textProxy')?(_0x100004&&_0x379523&&(_0x100004+='\x20',_0x379523=!0x1),_0x100004+=_0x435e10['data']):_0x379523=!0x0;_0x379523=!0x0;}return _0x100004['substring'](0x0,0x96);}_attachMarkerToThread(_0x1b7e4e,_0x5a3cb9){const _0x5f41d5=this['editor'],_0x134b47=_0x5f41d5['plugins']['get'](di);let _0x1d0574=_0x134b47['getCommentThread'](_0x5a3cb9);const _0x288f67=_0x5f41d5['config']['get']('collaboration.channelId'),_0x4821ef=_0x5f41d5['plugins']['get'](pi);return _0x1d0574&&(_0x1d0574['unlinkedAt']&&_0x1d0574['setUnlinkedAt'](null),_0x1d0574['isAttached'])||(this['getAllMarkersForId'](_0x5a3cb9)[0x0]['managedUsingOperations']?_0x134b47['fetchCommentThread']({'channelId':_0x288f67,'threadId':_0x5a3cb9})['then'](_0x3a01d8=>{if('destroyed'!==_0x5f41d5['state']){if(_0x1d0574=_0x3a01d8,_0x1d0574&&!_0x1d0574['isAttached']){const _0x335e1d=_0x1d0574['attachTo'](()=>this['_getTargetForId'](_0x5a3cb9));_0x4821ef['registerAnnotation'](_0x335e1d),_0x1d0574['isResolved']&&this['_reconvertMarkers'](_0x5a3cb9);}else{if(!_0x1d0574){const _0x18b9c3=this['getAllMarkersForId'](_0x5a3cb9);_0x5f41d5['model']['change'](_0x5f39c2=>{for(const _0x203949 of _0x18b9c3)_0x5f39c2['removeMarker'](_0x203949);});}}}}):_0x5f41d5['editing']['view']['once']('render',()=>{if(_0x134b47['getCommentThread'](_0x5a3cb9))return;const _0x15e38f=_0x5f41d5['plugins']['get'](oi);_0x1d0574=_0x134b47['openNewCommentThread']({'channelId':_0x288f67,'threadId':_0x5a3cb9,'target':()=>this['_getTargetForId'](_0x5a3cb9),'context':{'type':'text','value':this['_getTextContext'](_0x5a3cb9)}});const _0x8baec2=_0x134b47['_threadToController']['get'](_0x1d0574)['view'],_0x553c66=_0x15e38f['getByInnerView'](_0x8baec2);_0x553c66&&_0x4821ef['registerAnnotation'](_0x553c66);},{'priority':'low'})),_0x1d0574;}['_handleThreadMarker'](_0x5e24c4,_0x4ae96a){const _0x5e4871=this['_attachMarkerToThread'](_0x5e24c4,_0x4ae96a);_0x5e4871&&!_0x5e4871['context']&&_0x5e4871['setContext']({'type':'text','value':this['_getTextContext'](_0x4ae96a)});}_initAriaMarkerChangeAnnouncements(){const _0x19ac05=this['editor'];_0x4f0373(_0x19ac05['model'],({left:_0x2d21c4,entered:_0x1986bf})=>{for(const _0x422273 of _0x2d21c4)if(Ii(_0x422273)){_0x19ac05['ui']['ariaLiveAnnouncer']['announce'](Rt(_0x19ac05['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4d3a1c of _0x1986bf)if(Ii(_0x4d3a1c)){_0x19ac05['ui']['ariaLiveAnnouncer']['announce'](Rt(_0x19ac05['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x3f19f4(_0x5d090e)));break;}});}};function Ci(_0x95fc6f,_0x103009){return _0x103009?_0x95fc6f+':'+_0x103009:_0x95fc6f;}function Ti(_0x19fa17,_0x1323a8){const _0x316e19=_0x1323a8['schema'],_0x174197=_0x1323a8['createRange'](_0x19fa17['start']);for(const _0x142e2a of _0x19fa17['getWalker']()){const {type:_0x3408e2,item:_0x2ca67e,nextPosition:_0x470f0d}=_0x142e2a;if('text'===_0x3408e2||_0x316e19['isObject'](_0x2ca67e)){const _0xcf82da=_0x1323a8['createPositionBefore'](_0x2ca67e);_0x174197['isCollapsed']&&(_0x174197['start']=_0xcf82da),_0x174197['end']=_0x470f0d;}}return _0x174197;}function Ii(_0x4de731){return'comment'===Ai(_0x4de731['name'])['group'];}var bi=class extends _0x2f3b5b{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[di,yi,pi,oi];}get CommentsListView(){return Ut;}get CommentThreadInputView(){return Bt;}init(){const _0xede001=this['editor'],_0x479e5f=_0xede001['plugins']['get'](di),_0x3669a8=_0xede001['plugins']['get'](yi),_0x5cbe24=_0xede001['plugins']['get'](oi),_0x27ac6b=_0xede001['plugins']['get'](pi);_0xede001['ui']['componentFactory']['add']('comment',()=>{const _0x4784f3=this['_createUIButton'](_0x1f5a20);return _0x4784f3['tooltip']=!0x0,_0x4784f3;}),_0xede001['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ct)),_0x27ac6b['addSourceCollector'](()=>{const _0x2781f7=[];for(const [_0x199980,_0x73c15]of _0x479e5f['_threadToController']){const _0x4d1c2d=_0x3669a8['getAllMarkersForId'](_0x199980['id']),_0x10b87d=_0x4d1c2d['map'](_0x589dfa=>_0x589dfa['getRange']());_0x4d1c2d['length']>0x0&&_0x2781f7['push']([_0x73c15['view'],_0x10b87d]);}return _0x2781f7;}),this['listenTo'](_0x5cbe24,'change:activeAnnotations',(_0x390341,_0x1b61d2,_0x464ddf)=>{const _0x46f399=Array['from'](_0x464ddf)['map'](_0x19fefa=>_0x19fefa['innerView'])['find'](_0x2380af=>_0x479e5f['_viewToController']['has'](_0x2380af));if(!_0x46f399)return void(_0x3669a8['activeMarker']=null);const _0x2bdb3e=_0x479e5f['_viewToController']['get'](_0x46f399)['model']['id'],_0x25680e='comment:'+_0x2bdb3e;_0x2bdb3e&&_0x3669a8['hasMarkerForId'](_0x2bdb3e)?_0x3669a8['activeMarker']=_0x25680e:_0x3669a8['activeMarker']&&(_0x3669a8['activeMarker']=null);}),this['listenTo'](_0x479e5f,'removeCommentThread',(_0x549f12,{threadId:_0x56d81,isFromAdapter:_0x543d05})=>{!_0x543d05&&_0xede001['ui']['focusTracker']['isFocused']&&_0x3669a8['hasMarkerForId'](_0x56d81)&&_0xede001['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x479e5f,'addComment',(_0x1d1bfb,{threadId:_0xe4e49b,isFromAdapter:_0x23b0d2})=>{!_0x23b0d2&&_0x3669a8['hasMarkerForId'](_0xe4e49b)&&_0x479e5f['hasCommentThread'](_0xe4e49b)&&0x1===_0x479e5f['getCommentThread'](_0xe4e49b)['length']&&(_0xede001['editing']['view']['focus'](),_0x1d1bfb['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x13ab74=[this['editor']];for(const _0x152728 of _0x13ab74){let _0x111f01;for(const _0x3c7dd6 in _0x152728){const _0x2f2cba=_0x3c7dd6,_0x2f0406=_0x152728[_0x2f2cba];if('commentsLicenseKeyValid'==_0x2f0406||'commentsLicenseKeyInvalid'==_0x2f0406||'commentsLicenseKeyExpired'==_0x2f0406||'commentsLicenseKeyDomainLimit'==_0x2f0406||'commentsLicenseKeyNotAllowed'==_0x2f0406||'commentsLicenseKeyEvaluationLimit'==_0x2f0406||'commentsLicenseKeyUsageLimit'==_0x2f0406){delete _0x152728[_0x2f2cba],_0x111f01=_0x2f0406,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x111f01&&_0x152728['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x111f01&&_0x152728['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x111f01&&_0x152728['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x111f01&&_0x152728['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x111f01&&_0x152728['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x111f01&&_0x152728['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x1a4490){const _0x2301e5=this['editor'],_0x2807be=new _0x1a4490(_0x2301e5['locale']),_0xbe327c=_0x2301e5['commands']['get']('addCommentThread');return _0x2807be['set']({'label':Rt(_0x2301e5['locale'],'Comment'),'icon':_0x2b9970}),_0x2807be['bind']('isEnabled')['to'](_0xbe327c,'isEnabled',_0xbe327c,'hasContent',(_0x16aa17,_0x34a28a)=>_0x16aa17&&_0x34a28a),this['listenTo'](_0x2807be,'execute',()=>{_0xbe327c['execute']();}),_0x2807be;}},Ei=class extends _0x2f3b5b{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[yi];}constructor(_0x1eb5c4){super(_0x1eb5c4),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5813a9,_0x1ba1b8,_0x2dd122)=>{_0x2dd122?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x4468c7,_0x5eec2c]of this['editor']['commands'])_0x5eec2c['affectsData']&&'addCommentThread'!==_0x4468c7&&_0x5eec2c['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 _0x172d55=this['editor']['editing']['view']['document'];this['listenTo'](_0x172d55,'cut',_0x2d6e90=>_0x2d6e90['stop'](),{'priority':'highest'}),this['listenTo'](_0x172d55,'clipboardInput',_0x575249=>_0x575249['stop'](),{'priority':'highest'}),this['listenTo'](_0x172d55,'delete',_0x5a40a4=>_0x5a40a4['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x522491,_0x564e68]of this['editor']['commands'])_0x564e68['affectsData']&&'addCommentThread'!==_0x522491&&_0x564e68['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']);}},ki=class extends _0x58d8aa{activeUIs;uisData;['_uis'];static get requires(){return[oi];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cb270){super(_0x4cb270),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x28ed7f=this['context']['plugins']['get'](oi);this['listenTo'](_0x28ed7f,'_activateAnnotation',(_0x20fd6a,_0x106a77)=>{for(const _0x2e80c6 of this['activeUIs']){const _0x9457f4=this['_uis']['get'](_0x2e80c6);(0x0,this['uisData']['get'](_0x2e80c6)['filter'])(_0x106a77)&&_0x9457f4['setActiveAnnotation'](_0x106a77);}}),this['listenTo'](_0x28ed7f,'_deactivateAllAnnotations',()=>{for(const _0x3d355d of this['activeUIs'])this['_uis']['get'](_0x3d355d)['setActiveAnnotation'](null);}),this['listenTo'](_0x28ed7f['_visibleAnnotations'],'add',(_0x5c85e8,_0x10ccd9)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x10ccd9);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x23272c){return this['activeUIs']['has'](_0x23272c);}activate(_0x54d295,_0x4f1ecd=this['defaultFilter']){const _0x3ed9cb=this['context']['plugins']['get'](oi);if(!this['_uis']['has'](_0x54d295))throw new _0x565c58('annotationsuis-missing-ui',this,{'uiName':_0x54d295});this['isActive'](_0x54d295)&&this['deactivate'](_0x54d295),this['activeUIs']['add'](_0x54d295);const _0x3ae047=new ei();si({'source':_0x3ed9cb['_visibleAnnotations'],'target':_0x3ae047,'filter':_0x4f1ecd}),this['uisData']['set'](_0x54d295,{'collection':_0x3ae047,'filter':_0x4f1ecd});const _0x45bec7=this['_uis']['get'](_0x54d295);_0x45bec7['attach'](_0x3ae047),this['listenTo'](_0x45bec7,'change:activeAnnotation',(_0x513e6,_0x1e243c,_0x1026bc,_0x2420cc)=>{_0x2420cc&&_0x3ed9cb['_removeActiveAnnotation'](_0x2420cc),_0x1026bc&&_0x3ed9cb['_addActiveAnnotation'](_0x1026bc);});}deactivate(_0xe00a9c){if(this['activeUIs']['delete'](_0xe00a9c),!this['_uis']['has'](_0xe00a9c))throw new _0x565c58('annotationsuis-missing-ui',this,{'uiName':_0xe00a9c});const _0x45fb4d=this['_uis']['get'](_0xe00a9c);_0x45fb4d['detach'](),this['stopListening'](_0x45fb4d),this['uisData']['get'](_0xe00a9c)['collection']['destroy'](),this['uisData']['delete'](_0xe00a9c);}switchTo(_0x31ce89){if(!this['_uis']['has'](_0x31ce89))throw new _0x565c58('annotationsuis-missing-ui',this,{'uiName':_0x31ce89});const _0x133cf9=this['context']['plugins']['get'](oi),_0x26ca8d=Array['from'](_0x133cf9['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x31ce89);const _0x504ba4=this['_uis']['get'](_0x31ce89);_0x504ba4['setActiveAnnotation'](_0x26ca8d),_0x504ba4['_setSelectedAnnotations']&&_0x26ca8d&&_0x504ba4['_setSelectedAnnotations']([_0x26ca8d]);}deactivateAll(){for(const _0x79c7c2 of this['activeUIs'])this['deactivate'](_0x79c7c2);}register(_0x3af0a4,_0xe91857){if(this['_uis']['has'](_0x3af0a4))throw new _0x565c58('annotationsuis-register-already-registered');if('function'!=typeof _0xe91857['attach']||'function'!=typeof _0xe91857['detach']||'function'!=typeof _0xe91857['setActiveAnnotation'])throw new _0x565c58('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3af0a4,_0xe91857);}refilterAnnotations(){const _0x914ac=this['context']['plugins']['get'](oi)['collection'],_0x5709b5=new Map(),_0x104134=Array['from'](this['activeUIs']);for(const _0x327dd1 of this['activeUIs']){const _0x4d1e25=this['uisData']['get'](_0x327dd1)['collection'];for(const _0x2c00b3 of _0x4d1e25)_0x5709b5['set'](_0x2c00b3,_0x327dd1);}for(const _0x1dd761 of _0x914ac){const _0x39ca1b=_0x5709b5['get'](_0x1dd761);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1dd761);const _0x3178ba=_0x104134['find'](_0x219353=>this['uisData']['get'](_0x219353)['filter'](_0x1dd761));_0x39ca1b!==_0x3178ba&&(_0x39ca1b&&this['uisData']['get'](_0x39ca1b)['collection']['remove'](_0x1dd761),_0x3178ba&&this['uisData']['get'](_0x3178ba)['collection']['add'](_0x1dd761));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x411199){const _0x516995=[];for(const _0x5532d5 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5532d5)['filter'])(_0x411199)&&_0x516995['push'](_0x5532d5);}if(_0x516995['length']>0x1)throw new _0x565c58('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x516995,'annotationType':_0x411199['type']});}};const Ni=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x8d057b('px');var Ri=class extends lt{content;_targetTop;_mutationObserver;constructor(_0x126d16){super(_0x126d16),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x138455,_0xfeb979)=>_0x138455+_0xfeb979),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Jt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1473c4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1473c4['to']('isAnimationDisabled',_0x12ac72=>_0x12ac72?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1473c4['to']('top',_0x377988=>Mi(_0x377988))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x55c5eb=this['element']['clientHeight'];_0x55c5eb&&(this['height']=_0x55c5eb);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},Si=class extends _0x58d8aa{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10c44b){super(_0x10c44b),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 _0x1954d4=this['context']['config']['get']('sidebar.container');_0x1954d4&&this['setContainer'](_0x1954d4);}setContainer(_0x5d5aa7){if(!Pi(_0x5d5aa7))throw new _0x565c58('sidebar-setcontainer-invalid-element');this['container']=_0x5d5aa7;}_attachToContainer({viewClass:_0xe1c8d3='',spaceBetweenItems:_0x15267c=0x19}={}){if(!Pi(this['container']))throw new _0x565c58('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0xe1c8d3,this['_spaceBetweenItems']=_0x15267c;}['rearrange']({removedAnnotation:_0x1cb514,previousAnnotation:_0x4eefaf,nextAnnotation:_0x4de73a}){const _0x411e81=this['getSidebarItemView'](_0x1cb514);this['view']['list']['remove'](_0x411e81),this['_destroySidebarItemView'](_0x1cb514),_0x4eefaf&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4eefaf)),_0x4de73a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4de73a)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4b519c,activatedAnnotation:_0x344382,disableAnimationOnActivatedAnnotation:_0x401be9}){if(this['_activeAnnotation']=_0x344382,_0x4b519c){_0x4b519c['isActive']=!0x1;const _0x240d3e=this['getSidebarItemView'](_0x4b519c);_0x240d3e&&_0x401be9&&(_0x240d3e['isAnimationDisabled']=!0x1);}if(_0x344382){const _0x1d4853=this['getSidebarItemView'](_0x344382);_0x1d4853&&(_0x344382['isActive']=!0x0,_0x401be9&&(_0x1d4853['isAnimationDisabled']=!0x0,_0x1d4853['top']+=0x1),this['_alignToTargetRect'](_0x1d4853));}}_detachFromContainer(_0x3da1c3){if(this['view']['element']['remove'](),_0x3da1c3){for(const _0x5d80f0 of _0x3da1c3)this['_destroySidebarItemView'](_0x5d80f0);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x60f0e8,_0x1d3c1d){_0x1d3c1d||(_0x1d3c1d=_0x60f0e8['view']);const _0x285f6f=new Ri(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x285f6f,_0x60f0e8),this['_annotationToSidebarItemView']['set'](_0x60f0e8,_0x285f6f),_0x285f6f['content']['add'](_0x1d3c1d),this['listenTo'](_0x60f0e8['view'],'change:targetRect',(_0x54b453,_0xf6e0be,_0x347511)=>{const _0x333883=this['_getTargetTop'](_0x60f0e8,_0x347511);_0x285f6f['_targetTop']!=_0x333883&&(_0x285f6f['_targetTop']=_0x333883,this['_setItemTop'](_0x285f6f,_0x333883));}),this['listenTo'](_0x285f6f,'change:top',()=>{this['_recalculate'](_0x285f6f,'top');}),this['listenTo'](_0x285f6f,'change:bottom',()=>{this['_recalculate'](_0x285f6f,'bottom');}),this['_alignToTargetRect'](_0x285f6f);const _0x3e8ff7=this['_getItemBefore'](_0x285f6f);return _0x3e8ff7&&this['_alignAfterItem'](_0x3e8ff7,_0x285f6f)||this['_alignToTargetRect'](_0x285f6f),this['_updateLastItem'](),this['view']['list']['add'](_0x285f6f),_0x285f6f;}['_alignForTopChange'](_0x4f58eb){if(!_0x4f58eb['content']['length'])return;const _0x8813b6=this['_getItemBefore'](_0x4f58eb);if(!_0x8813b6)return;const _0x5ede73=this['_sidebarItemViewToAnnotation']['get'](_0x8813b6),_0x5a6160=this['_activeAnnotation'];_0x5a6160&&_0x5a6160===_0x5ede73?this['_alignAfterItem'](_0x8813b6,_0x4f58eb):this['_alignBeforeItem'](_0x4f58eb,_0x8813b6);}_alignForBottomChange(_0x39cc41){if(!_0x39cc41['content']['length'])return;const _0x4bde52=this['_getItemAfter'](_0x39cc41);if(!_0x4bde52)return;const _0x2edc34=this['_sidebarItemViewToAnnotation']['get'](_0x4bde52),_0x3839c3=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x51c052=this['_activeAnnotation'];_0x51c052&&_0x51c052===_0x2edc34&&_0x3839c3?(this['_alignBeforeItem'](_0x4bde52,_0x39cc41),this['_alignAfterItem'](_0x39cc41,_0x4bde52)):_0x51c052&&_0x51c052===_0x2edc34?this['_alignBeforeItem'](_0x4bde52,_0x39cc41):this['_alignAfterItem'](_0x39cc41,_0x4bde52);}_recalculate(_0x4b957e,_0x3d4b73){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5bf3b9,changedProp:_0x2f0f53}of this['_recalculateBuffer'])'top'===_0x2f0f53?this['_alignForTopChange'](_0x5bf3b9):this['_alignForBottomChange'](_0x5bf3b9);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4b957e,'changedProp':_0x3d4b73});}getSidebarItemView(_0x4be7dd){return this['_annotationToSidebarItemView']['get'](_0x4be7dd);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x18a69e){const _0x4fa297=this['getSidebarItemView'](_0x18a69e);this['stopListening'](_0x4fa297),this['stopListening'](_0x18a69e['view']),_0x4fa297['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x18a69e),this['_sidebarItemViewToAnnotation']['delete'](_0x4fa297);}_createSidebarView(){const _0x275434=new Oi(this['context']['locale']);return _0x275434['render'](),this['on']('change:_lastItem',(_0x252f09,_0x16f2e0,_0xc8ca03,_0x10f252)=>{_0x10f252&&_0x275434['unbind']('minHeight'),_0xc8ca03?_0x275434['bind']('minHeight')['to'](_0xc8ca03,'bottom'):_0x275434['minHeight']=null;}),_0x275434;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x26e1d2){const _0x21f59d=this['_sidebarItemViewToAnnotation']['get'](_0x26e1d2),_0x1c95f9=_0x21f59d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x21f59d)-0x1);return _0x1c95f9&&this['getSidebarItemView'](_0x1c95f9)||null;}_getItemAfter(_0x3eeedb){const _0x416778=this['_sidebarItemViewToAnnotation']['get'](_0x3eeedb),_0x4fb11e=_0x416778&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x416778)+0x1);return _0x4fb11e&&this['getSidebarItemView'](_0x4fb11e)||null;}_alignBeforeItem(_0x2ed0b9,_0x113152){_0x2ed0b9['updateHeight']();const _0x2b5d68=xi(_0x113152['bottom']+this['_spaceBetweenItems'],_0x2ed0b9['top']);return!!_0x2b5d68&&(this['_setItemTop'](_0x113152,_0x113152['top']-_0x2b5d68),!0x0);}_alignAfterItem(_0xefa441,_0x5824f9){_0xefa441['updateHeight']();const _0x4fc423=xi(_0xefa441['bottom']+this['_spaceBetweenItems'],_0x5824f9['top']);return!!_0x4fc423&&(this['_setItemTop'](_0x5824f9,_0x5824f9['top']+_0x4fc423,!0x1),!0x0);}_alignToTargetRect(_0x1653a1){const _0x244d2b=this['_sidebarItemViewToAnnotation']['get'](_0x1653a1);if(!_0x244d2b||!_0x244d2b['target']||!_0x244d2b['targetRect'])return;const _0x36ab11=this['_getTargetTop'](_0x244d2b,_0x244d2b['targetRect']);this['_setItemTop'](_0x1653a1,_0x36ab11);}_getTargetTop(_0x13e93,_0x83332d){if(null===_0x83332d)return 0x0;if(_0x13e93['target']instanceof _0x278104)return _0x83332d['top'];{const _0x3b38d0=new _0x278104(this['view']['element'])['top'];return _0x83332d['top']-_0x3b38d0;}}_setItemTop(_0x1b2cf6,_0x21a57b,_0x49c065=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x49c065&&(_0x21a57b=Math['max'](_0x21a57b,this['_getMaxAvailableTop'](_0x1b2cf6))),_0x1b2cf6['top']=_0x21a57b;}_getMaxAvailableTop(_0x29b4e8){let _0x5eaedd=this['_getItemBefore'](_0x29b4e8),_0x529d26=0x0;for(;_0x5eaedd;)_0x5eaedd['updateHeight'](),_0x529d26+=this['_spaceBetweenItems']+_0x5eaedd['height'],_0x5eaedd=this['_getItemBefore'](_0x5eaedd);return _0x529d26;}};function xi(_0x3ce992,_0x5db0c9){return Math['max'](_0x3ce992-_0x5db0c9,0x0);}function Pi(_0x223c89){return null!==_0x223c89&&'object'==typeof _0x223c89&&0x1===_0x223c89['nodeType'];}var Li=class extends _0x58d8aa{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[Si,ki];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x193929){super(_0x193929),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x57fdda(),this['_refreshPositioningDebounced']=_0x18d76f(()=>{_0x193929['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x3b5a24=this['context']['plugins']['get'](ki),_0x2cd7ce=this['context']['plugins']['get'](Si);_0x3b5a24['register']('wideSidebar',this),_0x2cd7ce['container']&&_0x3b5a24['switchTo']('wideSidebar');}setActiveAnnotation(_0x375caf){if(_0x375caf===this['activeAnnotation'])return;const _0x571cf1=this['context']['plugins']['get'](Si);_0x571cf1['_activeAnnotation']=_0x375caf;const _0x547f49=this['activeAnnotation'];_0x571cf1['refresh']({'blurredAnnotation':_0x547f49,'activatedAnnotation':_0x375caf}),this['activeAnnotation']=_0x375caf;}attach(_0x42eedf){this['annotations']=_0x42eedf;const _0x5d4246=this['context']['plugins']['get'](Si);if(_0x5d4246['_annotations']=_0x42eedf,this['isAttached'])throw new _0x565c58('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5d4246,'set:container',()=>{this['detach'](),this['listenTo'](_0x5d4246,'change:container',_0x4ed0e4=>{_0x4ed0e4['off'](),this['attach'](_0x42eedf);});}),_0x5d4246['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x147347=_0x2833e7=>{_0x2833e7['updateTargetRect'](),_0x5d4246['addAnnotation'](_0x2833e7);};for(const _0x4a8e3b of _0x42eedf)_0x147347(_0x4a8e3b);this['listenTo'](_0x42eedf,'add',(_0x3edb25,_0xb6a4c2)=>{_0x147347(_0xb6a4c2);}),this['listenTo'](_0x42eedf,'remove',(_0x504675,_0xe1d3b6,_0x7b1a5f)=>{_0x5d4246['rearrange']({'removedAnnotation':_0xe1d3b6,'previousAnnotation':_0x42eedf['get'](_0x7b1a5f-0x1),'nextAnnotation':_0x42eedf['get'](_0x7b1a5f+0x1)}),_0xe1d3b6===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x42eedf,'focus',(_0x2f09e2,_0x38e27a)=>{this['setActiveAnnotation'](_0x38e27a);}),this['listenTo'](_0x42eedf,'blur',()=>{this['setActiveAnnotation'](null);});const _0xa7c6fb=this['context']instanceof _0x39397a?this['context']['editors']:new _0x57fdda([this['context']]);for(const _0x123f10 of _0xa7c6fb)this['_integrateWithEditorAnnotations'](_0x123f10);this['listenTo'](_0xa7c6fb,'add',(_0x21b344,_0x5a95e4)=>{this['listenTo'](_0x5a95e4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5a95e4);});}),this['listenTo'](_0xa7c6fb,'remove',(_0x2a2820,_0x2c563d)=>{_0x2c563d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2c563d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x565c58('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x366cac=this['context']['plugins']['get'](Si);_0x366cac['_detachFromContainer'](this['annotations']),this['stopListening'](_0x366cac),this['stopListening'](this['annotations']),this['context']instanceof _0x39397a&&this['stopListening'](this['context']['editors']);for(const _0x55d5f2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x55d5f2);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x2cc171){if(!_0x2cc171['plugins']['has']('EditorAnnotations'))return;const _0x5ca207=_0x2cc171['plugins']['get']('EditorAnnotations'),_0x471ecc=()=>{const _0x4c4a86=_0x5ca207['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4c4a86[0x0]||null);};this['listenTo'](_0x5ca207,'refresh',_0x471ecc),this['listenTo'](_0x5ca207,'blur',(_0x2875e2,{isAnnotationTracked:_0x4050e1})=>{this['activeAnnotation']&&_0x4050e1(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5ca207,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x372730=>{_0x5ca207['hasDomSelection']()&&(_0x471ecc(),_0x372730['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5ca207);}_destroyEditorAnnotationsIntegration(_0x427bfb){this['stopListening'](_0x427bfb),this['_editorAnnotations']['remove'](_0x427bfb);}},Di=class extends _0x1f5a20{counterView;constructor(_0x4facbf){super(_0x4facbf);const _0x1b97e5=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xe343ed,_0x5989df)=>_0xe343ed?'...':_0x5989df['toString']()),this['set']('annotationType',''),this['icon']=_0x2b9970,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new lt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1b97e5['to']('annotationType',_0xe8a2e0=>'ck-annotation-counter__badge--'+_0xe8a2e0),_0x1b97e5['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1b97e5['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Vi=class extends _0x58d8aa{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[Si,ki];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbdb3a2){super(_0xbdb3a2),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xd6515f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x57fdda(),this['_refreshPositioningDebounced']=_0x18d76f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](ki)['register']('narrowSidebar',this),this['_overlayHost']=new dt(this['context']['locale'],{'resolveMountTarget':()=>this['_resolveOverlayTarget'](),'resolveInlineContainer':()=>this['context']['plugins']['get'](Si)['container']}),this['_overlayHost']['sync'](),this['bodyCollection']=this['_overlayHost']['bodyCollection'],this['balloonPanelView']=new _0x3ee3ae(this['context']['locale']),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x126823){this['annotations']=_0x126823;const _0x31ba88=this['context']['plugins']['get'](Si),_0x4c6ce5=this['balloonPanelView'];if(_0x31ba88['_annotations']=_0x126823,this['isAttached'])throw new _0x565c58('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x31ba88,'set:container',()=>{this['detach'](),this['listenTo'](_0x31ba88,'change:container',_0x25430c=>{_0x25430c['off'](),this['attach'](_0x126823);});}),_0x31ba88['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5}),this['_overlayHost']['sync']();const _0x421474=_0x20eba7=>{const _0x4e61bc=new Di(this['context']['locale']);_0x31ba88['addAnnotation'](_0x20eba7,_0x4e61bc),this['_annotationToNarrowView']['set'](_0x20eba7,_0x4e61bc),_0x4e61bc['bind']('isDirty','annotationType','number')['to'](_0x20eba7['view'],'isDirty','type','length'),_0x4e61bc['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4c6ce5['content']['first']!==_0x20eba7['view']?(this['_showBalloon'](_0x20eba7),_0x20eba7['view']['element']['focus'](),this['setActiveAnnotation'](_0x20eba7)):this['setActiveAnnotation'](null);});};for(const _0x3100c3 of _0x126823)_0x421474(_0x3100c3);this['listenTo'](_0x126823,'add',(_0x57aeb8,_0x14f7fa)=>{_0x421474(_0x14f7fa);}),this['listenTo'](_0x126823,'remove',(_0x4c7e10,_0xe7e402,_0x18bb56)=>{this['_annotationToNarrowView']['get'](_0xe7e402)['destroy'](),this['_annotationToNarrowView']['delete'](_0xe7e402),_0x31ba88['rearrange']({'removedAnnotation':_0xe7e402,'previousAnnotation':_0x126823['get'](_0x18bb56-0x1),'nextAnnotation':_0x126823['get'](_0x18bb56+0x1)}),_0xe7e402===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x126823,'focus',(_0xa22148,_0x248213)=>{this['setActiveAnnotation'](_0x248213);}),this['listenTo'](_0x126823,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x8d1e66,_0x5cc97a)=>{_0x5cc97a['keyCode']===_0x14c755['esc']&&_0x4c6ce5['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4c6ce5['content']['first']),this['_hideBalloon'](),_0x5cc97a['stopPropagation'](),_0x5cc97a['preventDefault']());}),ut({'emitter':this['_domEmitter'],'activator':()=>_0x4c6ce5['isVisible']&&!this['_hasEditorDomSelection'](),'contextElements':()=>{const _0x3c93f3=[_0x31ba88['view']['element']];return _0x4c6ce5['isVisible']&&_0x3c93f3['push'](_0x4c6ce5['element']),this['activeAnnotation']&&_0x3c93f3['push'](...this['activeAnnotation']['focusableElements']),_0x3c93f3;},'callback':()=>{this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null);}});const _0x27fc9c=this['context']instanceof _0x39397a?this['context']['editors']:new _0x57fdda([this['context']]);for(const _0x56f575 of _0x27fc9c)this['_integrateWithEditorAnnotations'](_0x56f575);this['listenTo'](_0x27fc9c,'add',(_0x2be405,_0x491ebd)=>{this['listenTo'](_0x491ebd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x491ebd);});}),this['listenTo'](_0x27fc9c,'remove',(_0x2107d5,_0x9a567c)=>{_0x9a567c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x9a567c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x17ef47){if(_0x17ef47===this['activeAnnotation'])return;const _0x233853=this['context']['plugins']['get'](Si);_0x233853['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x17ef47,'disableAnimationOnActivatedAnnotation':!0x0}),_0x17ef47&&_0x233853['getSidebarItemView'](_0x17ef47)?this['_showBalloon'](_0x17ef47):this['_hideBalloon'](),this['activeAnnotation']=_0x17ef47;}detach(){if(!this['isAttached'])throw new _0x565c58('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x143c80=this['context']['plugins']['get'](Si);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x443c45=>_0x443c45['destroy']()),this['_annotationToNarrowView']['clear'](),_0x143c80['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x39397a&&this['stopListening'](this['context']['editors']);for(const _0x2d1bd4 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2d1bd4);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_overlayHost']['destroy']();}_integrateWithEditorAnnotations(_0x43cd27){if(!_0x43cd27['plugins']['has']('EditorAnnotations'))return;const _0x33a4ab=_0x43cd27['plugins']['get']('EditorAnnotations'),_0x556dd9=this['context']['plugins']['get'](Si),_0x518fd8=this['annotations'],_0x1d9e07=this['balloonPanelView'],_0x4a4d79=()=>{const _0x248421=_0x33a4ab['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x248421),this['setActiveAnnotation'](_0x248421[0x0]||null);};this['listenTo'](_0x33a4ab,'refresh',_0x4a4d79),this['listenTo'](_0x33a4ab,'blur',(_0x1bf7d2,{isAnnotationTracked:_0x5525b8})=>{this['activeAnnotation']&&_0x5525b8(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x33a4ab,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x518fd8,'blur',_0x5dd946=>{_0x33a4ab['hasDomSelection']()&&_0x5dd946['stop']();},{'priority':'high'}),ut({'emitter':this['_domEmitter'],'activator':()=>!!this['activeAnnotation'],'contextElements':()=>{const _0x36d783=[_0x556dd9['view']['element']];return _0x1d9e07['isVisible']&&_0x36d783['push'](_0x1d9e07['element']),_0x36d783;},'callback':()=>{_0x33a4ab['hasDomSelection']()&&_0x4a4d79();}}),this['_editorAnnotations']['add'](_0x33a4ab),this['_overlayHost']['sync']();}_destroyEditorAnnotationsIntegration(_0x263c25){_0x263c25&&(this['stopListening'](_0x263c25),this['_editorAnnotations']['remove'](_0x263c25));}_hasEditorDomSelection(){return Array['from'](this['_editorAnnotations'])['some'](_0x173662=>_0x173662['hasDomSelection']());}_setSelectedAnnotations(_0x5f40bd){for(const _0x2dd2e3 of this['_selectedAnnotations'])_0x5f40bd['includes'](_0x2dd2e3)||this['_manuallyClosedAnnotationViews']['delete'](_0x2dd2e3['view']);this['_selectedAnnotations']=_0x5f40bd;}_refreshPositioning(){const _0xc548a1=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xc548a1['isVisible']&&this['_updateBalloonPosition']();}_resolveOverlayTarget(){const _0x133eed=this['context']['config']['get']('sidebar.overlayContainer')||this['context']['config']['get']('ui.overlayContainer');if(_0x133eed)return _0x133eed;const _0x599141=this['context']['plugins']['get'](Si)['container'];return _0x599141?_0x97d468(_0x599141):null;}['_showBalloon'](_0x43e727){if(this['_manuallyClosedAnnotationViews']['has'](_0x43e727['view']))return;const _0x1e4cc4=this['balloonPanelView']['content']['first'];_0x1e4cc4!==_0x43e727['view']?(_0x1e4cc4&&this['_detachListeners'](_0x1e4cc4),this['_overlayHost']['sync'](),this['_attachListeners'](_0x43e727['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x43e727['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x38af9f=this['balloonPanelView']['content']['first'],_0x14b01d=_0x38af9f&&this['annotations']['getByView'](_0x38af9f);if(!_0x14b01d||!this['_annotationToNarrowView']['has'](_0x14b01d))return;const _0xd26678=this['_annotationToNarrowView']['get'](_0x14b01d)['element'],_0x4287d2=(function(){const _0x285b57=_0x3ee3ae['defaultPositions'];return[_0x285b57['southArrowNorthEast'],_0x285b57['northArrowSouthEast'],_0x285b57['southArrowNorth'],_0x285b57['northArrowSouth'],_0x285b57['southArrowNorthWest'],_0x285b57['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xd26678,'positions':_0x4287d2});}['_hideBalloon'](){const _0x1b8f24=this['balloonPanelView'],_0x30523a=_0x1b8f24['content']['first'];_0x30523a&&(this['_detachListeners'](_0x30523a),_0x1b8f24['unpin'](),_0x1b8f24['content']['clear']());}_attachListeners(_0x9542bc){this['listenTo'](_0x9542bc,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x9542bc,'Esc',(_0x5ae6f1,_0xaaf3e4)=>{this['_manuallyClosedAnnotationViews']['add'](_0x9542bc),this['_hideBalloon'](),_0xaaf3e4();});}_detachListeners(_0x24dc3a){this['stopListening'](_0x24dc3a);}},Bi=class extends _0x2f3b5b{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[pi,tt,ki];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51b7fd){super(_0x51b7fd),_0x51b7fd['editing']['view']['addObserver'](wt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x51b7fd['plugins']['get'](tt),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x18d76f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0xeb8602=this['editor']['plugins']['get'](ki);_0xeb8602['context']===this['editor']&&(_0xeb8602['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x39fb77,_0x562b0c)=>{const _0x5dac83=this['_balloon'];if(this['isAttached']&&_0x5dac83['visibleView']){const _0x3a4009=this['annotations']['getByView'](_0x5dac83['visibleView']);_0x3a4009&&this['_closeAnnotation'](_0x3a4009),_0x562b0c();}}));}afterInit(){const _0x5d2774=this['editor']['plugins']['get'](ki);_0x5d2774['context']===this['editor']&&(_0x5d2774['hasActive']()||_0x5d2774['switchTo']('inline'));}setActiveAnnotation(_0x47da6d){_0x47da6d!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x47da6d&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x47da6d)&&this['_addAnnotationToBalloon'](_0x47da6d,!0x0),_0x47da6d['isActive']=!0x0),_0x47da6d||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x47da6d);}attach(_0x1130e8){this['annotations']=_0x1130e8;const _0xfb30f4=this['editor']['plugins']['get'](ki),_0xf9a85b=this['_balloon'];if(this['isAttached'])throw new _0x565c58('inlineannotations-attach-already-attached',this);if(_0xfb30f4['context']!==this['editor'])throw new _0x565c58('inlineannotations-not-allowed-with-context',this);const _0x5c33af=this['editor']['plugins']['get'](pi);this['listenTo'](_0x5c33af,'refresh',()=>{const _0x3633bd=_0x5c33af['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3ce342,_0x1f1562;!this['_forceRefresh']&&(_0x3ce342=_0x3633bd,_0x1f1562=this['_selectedAnnotations'],_0x3ce342['length']===_0x1f1562['length']&&_0x3ce342['every'](_0x2c37c2=>_0x1f1562['includes'](_0x2c37c2)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3633bd),this['setActiveAnnotation'](_0x3633bd[0x0]||null));}),this['listenTo'](_0x5c33af,'blur',(_0x4519e9,{isAnnotationTracked:_0x4c3b82})=>{this['activeAnnotation']&&_0x4c3b82(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5c33af,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0xf19074,_0x21fb70,_0x4a69ec)=>{_0x4a69ec||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1130e8,'remove',(_0x1cd606,_0x55f74c)=>{this['_removeAnnotationFromBalloon'](_0x55f74c),_0x55f74c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xf9a85b,'change:visibleView',(_0x5baf6d,_0x42522e,_0x3435a9,_0x2398d1)=>{_0x2398d1&&this['stopListening'](_0x2398d1);const _0x4d53ea=_0x1130e8['getByView'](_0x3435a9);_0x3435a9&&_0x4d53ea&&(this['listenTo'](_0x3435a9,'change:height',()=>{_0xf9a85b['updatePosition']();}),this['listenTo'](_0x3435a9,'Esc',()=>{this['_closeAnnotation'](_0x4d53ea),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4d53ea&&this['setActiveAnnotation'](_0x4d53ea));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xf9a85b['visibleView']&&_0x1130e8['getByView'](_0xf9a85b['visibleView'])&&_0xf9a85b['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 _0x565c58('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4eca53 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4eca53);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x4bfd1c){for(const _0x425110 of this['_selectedAnnotations'])_0x4bfd1c['includes'](_0x425110)||this['_manuallyClosed']['delete'](_0x425110);for(const _0x4674e5 of this['annotations'])_0x4bfd1c['includes'](_0x4674e5)||this['_removeAnnotationFromBalloon'](_0x4674e5);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x267fc6 of _0x4bfd1c)this['_addAnnotationToBalloon'](_0x267fc6);}this['_selectedAnnotations']=_0x4bfd1c;}_addAnnotationToBalloon(_0x52a25a,_0x4e405c=!0x1){this['_manuallyClosed']['has'](_0x52a25a)||(this['_addedAnnotations']['has'](_0x52a25a)||this['_balloon']['hasView'](_0x52a25a['view'])||(this['_addedAnnotations']['add'](_0x52a25a),this['_balloon']['add']({'stackId':_0x52a25a['view']['id'],'view':_0x52a25a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x52a25a)}})),_0x4e405c&&this['_balloon']['showStack'](_0x52a25a['view']['id']));}_getBalloonTargetForAnnotation(_0x117a4b){const _0x4ab540=_0x117a4b['target'],_0x5d0fa2=this['editor']['editing']['view'],_0x1e20a9=_0x5d0fa2['document']['selection']['getFirstRange'](),_0x36c158=_0x5d0fa2['domConverter']['viewRangeToDom'](_0x1e20a9);if(_0x36c158['collapse'](!0x0),_0x4ab540){if(_0x4ab540 instanceof _0x278104)return _0x4ab540;let _0x3d917f=[];for(const _0x13bed6 of _0x4ab540)_0x3d917f['push'](..._0x278104['getDomElementRects'](_0x13bed6));_0x3d917f=function(_0x197df1){const _0x59bc3c=[];let _0x3a5925=_0x197df1[0x0];for(let _0x5aa92b=0x1;_0x5aa92b<_0x197df1['length'];_0x5aa92b++)if(Hi(_0x3a5925,_0x197df1[_0x5aa92b])){const _0x20e643=_0x197df1[_0x5aa92b]['width'];_0x3a5925['width']+=_0x20e643,_0x3a5925['right']+=_0x20e643;}else _0x59bc3c['push'](_0x3a5925),_0x3a5925=_0x197df1[_0x5aa92b];return _0x59bc3c['push'](_0x3a5925),_0x59bc3c;}(_0x3d917f);const _0x346c0b=_0x36c158['getBoundingClientRect']();return _0x3d917f['find'](_0x483709=>_0x483709['top']<=_0x346c0b['top']&&_0x483709['bottom']>=_0x346c0b['bottom']&&_0x483709['left']<=_0x346c0b['left']&&_0x483709['right']>=_0x346c0b['right'])||_0x3d917f[0x0];}return _0x117a4b['targetRect']||_0x36c158;}_removeAnnotationFromBalloon(_0x5e4e7e){this['_addedAnnotations']['has'](_0x5e4e7e)&&this['_balloon']['hasView'](_0x5e4e7e['view'])&&(this['_addedAnnotations']['delete'](_0x5e4e7e),this['_balloon']['remove'](_0x5e4e7e['view']));}_closeAnnotation(_0x59461e){this['_manuallyClosed']['add'](_0x59461e),this['_removeAnnotationFromBalloon'](_0x59461e);}};function Hi(_0x86cef5,_0x2f0648){return _0x86cef5['top']===_0x2f0648['top']&&_0x86cef5['bottom']===_0x2f0648['bottom']&&_0x86cef5['right']===_0x2f0648['left'];}var Ui=class extends lt{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x52bd45,_0x4a432d){super(_0x52bd45),this['set']('isEmpty',!_0x4a432d['length']),this['focusTracker']=new _0xaa9933(),this['_annotationViews']=_0x4a432d,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new ot({'focusables':_0x4a432d,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4a432d,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4a432d,'remove',(_0xe1e6c6,_0x179d93)=>{_0x179d93['isActive']&&this['focus'](),_0x4a432d['length']||(this['isEmpty']=!0x0);});const _0x550ef1=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Rt(_0x52bd45,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4a432d},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x550ef1['if']('isEmpty','ck-hidden',_0x4ae4bc=>!_0x4ae4bc)]},'children':[{'text':Rt(_0x52bd45,'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 _0x342264 of this['_annotationViews'])this['focusTracker']['add'](_0x342264['element']);this['_annotationViews']['on']('change',(_0x55de52,{added:_0x4303e2,removed:_0x2b531c})=>{for(const _0x3eda3a of _0x4303e2)this['focusTracker']['add'](_0x3eda3a['element']);for(const _0x1732de of _0x2b531c)this['focusTracker']['remove'](_0x1732de['element']);});}},Fi=class extends _0x58d8aa{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[di,oi];}constructor(_0x2a273d){super(_0x2a273d),this['archivedThreads']=new _0x57fdda();}init(){const _0x279b72=this['context'],_0x294b9b=_0x279b72['plugins']['get'](di),_0x181012=_0x279b72['plugins']['get'](oi);this['listenTo'](_0x294b9b,'addCommentThread',(_0x1bb8da,{threadId:_0x595a4d})=>{const _0x163190=_0x294b9b['getCommentThread'](_0x595a4d);_0x163190['archivedAt']&&this['archivedThreads']['add'](_0x163190,this['_calculatePosition'](_0x163190['archivedAt'])),this['listenTo'](_0x163190,'change:archivedAt',(_0x41c89f,_0x3f3cc3,_0x2409f4)=>{_0x2409f4?this['archivedThreads']['has'](_0x163190)||this['archivedThreads']['add'](_0x163190,this['_calculatePosition'](_0x163190['archivedAt'])):this['archivedThreads']['has'](_0x163190)&&this['archivedThreads']['remove'](_0x163190);});}),this['listenTo'](_0x294b9b,'removeCommentThread',(_0x4d43d4,{threadId:_0x3c6658})=>{const _0x70ce8a=_0x294b9b['getCommentThread'](_0x3c6658);this['stopListening'](_0x70ce8a),this['archivedThreads']['has'](_0x70ce8a)&&this['archivedThreads']['remove'](_0x70ce8a);},{'priority':'highest'}),this['listenTo'](_0x181012['collection'],'focus',(_0x4c20e6,_0x24b27f)=>{_0x24b27f['isVisible']||(_0x24b27f['isActive']=!0x0,_0x181012['activate'](_0x24b27f));});}_calculatePosition(_0x20426c){const _0x4b9cd8=[...this['archivedThreads']]['findIndex'](_0x4c229b=>_0x4c229b['archivedAt']<_0x20426c);return _0x4b9cd8>-0x1?_0x4b9cd8:this['archivedThreads']['length'];}},Wi=class extends _0x2f3b5b{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Fi,it];}constructor(_0x1b8778){super(_0x1b8778),this['annotationViews']=new mt(),this['_pendingThreads']=[];}init(){const _0x465a4e=this['editor'],_0x3b7f51=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x465a4e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1f5a20,!0x0)),_0x465a4e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xc487f0=this['_createCommentsArchiveButton'](ct);return _0xc487f0['set']({'role':'menuitemcheckbox'}),_0xc487f0;});const _0x30ebce=_0x465a4e['plugins']['get'](Fi),_0x2cdcce=_0x465a4e['plugins']['get']('Annotations'),_0x1c5120=_0x465a4e['plugins']['get']('CommentsRepository');_0x30ebce['archivedThreads']['forEach'](_0x52c688=>{this['_handleNewThread'](_0x52c688);}),this['listenTo'](_0x30ebce['archivedThreads'],'add',(_0x7f569e,_0x190be8)=>{this['_handleNewThread'](_0x190be8);}),this['listenTo'](_0x2cdcce['collection'],'add',(_0x3f4842,_0x519497)=>{const _0xf63642=this['_pendingThreads']['find'](_0x54d0b0=>{const _0x294e64=_0x1c5120['_threadToController']['get'](_0x54d0b0);return _0x294e64&&_0x519497['innerView']===_0x294e64['view'];});if(_0xf63642){const _0x4cb7f8=this['_calculatePosition'](_0xf63642['archivedAt']);this['_addAnnotationToArchive'](_0x519497,_0x4cb7f8),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xf63642),0x1);}}),this['listenTo'](_0x30ebce['archivedThreads'],'remove',(_0x77d955,_0x2a368a)=>{const _0x400a79=_0x465a4e['config']['get']('collaboration.channelId');if(!_0x400a79||_0x2a368a['channelId']===_0x400a79){if(this['_pendingThreads']['includes'](_0x2a368a))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2a368a),0x1);else{const _0x3498c5=_0x1c5120['_threadToController']['get'](_0x2a368a),_0x5b7137=_0x2cdcce['getByInnerView'](_0x3498c5['view']);this['annotationViews']['remove'](_0x5b7137['view']),this['stopListening'](_0x5b7137),this['stopListening'](_0x5b7137['focusableElements']);}}}),this['listenTo'](_0x2cdcce['collection'],'add',(_0xb19ac2,_0xf9fdfe)=>{this['listenTo'](_0xf9fdfe,'escape',_0x3b7f51);}),this['listenTo'](_0x2cdcce['collection'],'remove',(_0x26a683,_0x113d19)=>{this['stopListening'](_0x113d19,'escape',_0x3b7f51);});}_addAnnotationToArchive(_0x12f165,_0x2a1774){this['listenTo'](_0x12f165,'set:isVisible',_0x5440ae=>{_0x5440ae['return']=!0x1,_0x5440ae['stop']();}),this['annotationViews']['add'](_0x12f165['view'],_0x2a1774);}['_handleNewThread'](_0x26f546){const _0x1f7e65=this['editor']['plugins']['get']('CommentsRepository'),_0x336411=this['editor']['plugins']['get']('Annotations'),_0x3d46e5=this['editor']['config']['get']('collaboration.channelId');if(!_0x3d46e5||_0x26f546['channelId']===_0x3d46e5){const _0xfd7632=_0x1f7e65['_threadToController']['get'](_0x26f546);if(!_0xfd7632)return void this['_pendingThreads']['push'](_0x26f546);const _0x5f3f8e=this['_calculatePosition'](_0x26f546['archivedAt']),_0x493487=_0x336411['getByInnerView'](_0xfd7632['view']);_0x493487['isVisible']&&_0x336411['_visibleAnnotations']['remove'](_0x493487),this['_addAnnotationToArchive'](_0x493487,_0x5f3f8e);}}_calculatePosition(_0x294f35){const _0x2b4d27=this['editor']['config']['get']('collaboration.channelId'),_0x4f95a4=[...this['editor']['plugins']['get'](Fi)['archivedThreads']]['filter'](_0x28fb90=>_0x28fb90['channelId']===_0x2b4d27)['findIndex'](_0x5ade18=>_0x5ade18['archivedAt']<_0x294f35);return _0x4f95a4<0x0||_0x4f95a4>this['annotationViews']['length']?this['annotationViews']['length']:_0x4f95a4-0x1;}_toggleDialog(){const _0x213554=this['editor'],_0x524aee=_0x213554['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Ui(_0x213554['locale'],this['annotationViews'])),'commentsArchive'===_0x524aee['id']?_0x524aee['hide']():_0x524aee['show']({'id':'commentsArchive','title':Rt(_0x213554['locale'],'COMMENTS_ARCHIVE'),'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':et['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x30599b,_0x554f64=!0x1){const _0x5475c8=this['editor']['locale'],_0xc615b4=this['editor']['plugins']['get']('Dialog'),_0x2b3436=new _0x30599b(_0x5475c8);return _0x2b3436['bind']('isEnabled')['to'](this,'isEnabled'),_0x2b3436['bind']('isOn')['to'](_0xc615b4,'id',_0x49e0ad=>'commentsArchive'===_0x49e0ad),_0x2b3436['set']({'label':Rt(_0x5475c8,'COMMENTS_ARCHIVE'),'icon':_0x206aa5,'isToggleable':!0x0}),_0x554f64&&(_0x2b3436['tooltip']=!0x0),this['listenTo'](_0x2b3436,'execute',()=>this['_toggleDialog']()),_0x2b3436;}_hideDialogOnAnnotationEscape=_0x882a3f=>{const _0x46afe8=_0x882a3f['source'];if(!this['annotationViews']['has'](_0x46afe8['view']))return;const _0x27c483=this['editor']['plugins']['get']('Dialog');_0x27c483['isOpen']&&'commentsArchive'===_0x27c483['id']&&(_0x27c483['hide'](),_0x882a3f['stop']());};},Ki=class extends _0x2f3b5b{static get requires(){return[di,yi,bi,Fi,Wi,Ei,Li,Vi,Bi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{fi as AddCommentThreadCommand,ti as Annotation,ei as AnnotationCollection,Di as AnnotationCounterButtonView,Qt as AnnotationView,oi as Annotations,Ri as AnnotationsSidebarItemView,Oi as AnnotationsSidebarView,ki as AnnotationsUIs,Gt as BaseCommentThreadView,jt as BaseCommentView,mi as Comment,li as CommentThread,Mt as CommentThreadController,Bt as CommentThreadInputView,Xt as CommentThreadView,zt as CommentView,Ki as Comments,Fi as CommentsArchive,Wi as CommentsArchiveUI,yi as CommentsEditing,Ut as CommentsListView,Ei as CommentsOnly,di as CommentsRepository,bi as CommentsUI,pi as EditorAnnotations,Bi as InlineAnnotations,Vi as NarrowSidebar,Si as Sidebar,Li as WideSidebar,si as bindAnnotationCollections};
|
|
23
|
+
import{Command as _0x4b5229,Context as _0x39482e,ContextPlugin as _0x4388ae,Editor as _0x176def,PendingActions as _0x223af0,Plugin as _0x36fb8a}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x288533,Collection as _0xc802da,DomEmitterMixin as _0x669e48,FocusTracker as _0x48a359,KeystrokeHandler as _0x17f113,ObservableMixin as _0x158425,Rect as _0xcec7af,containsNode as _0x126eb8,diff as _0x36701e,first as _0x72573,getEnvKeystrokeText as _0x3db22c,getOverlayMountRoot as _0xd17c16,keyCodes as _0x1b5069,priorities as _0x2280ad,scrollViewportToShowTarget as _0x31bb72,toUnit as _0x4f11ba,trustedHtml as _0x50acdc,uid as _0x1f5374}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x3d14f4,ConfirmMixin as _0x31390f,FOCUS_ANNOTATION_KEYSTROKE as _0xc4f94a,LateFocusButtonView as _0x2570f6,LateFocusDropdownButtonView as _0x33dad3,UserView as _0x59db41,Users as _0x2993b9,getAllMarkersDomElementsSorted as _0xd39c98,getDateTimeFormatter as _0x3d2d4c,hashObject as _0x46e958,setupThreadKeyboardNavigation as _0x4a1fba,surroundingMarkersDetector as _0x1e3862,trimHtml as _0x19a970}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x209f4f,debounce as _0x423b2b,isEqual as _0xee05b,set as _0x4c488d,throttle as _0x1a5e4e,unset as _0x48278f}from'es-toolkit/compat';import{IconAddComment as _0x3c6248,IconCheck as _0x2497d0,IconCommentsArchive as _0x7541f7,IconDropdownArrow as _0x1b2512,IconPencil as _0x32dd17,IconRemoveComment as _0x41956a,IconThreeVerticalDots as _0x551b53,IconUndo as _0x49a9aa}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x1ffea2,ButtonView as _0x997752,ContextualBalloon as tt,Dialog as it,DialogViewPosition as et,EditorUI as st,EditorUIView as nt,FocusCycler as ot,InlineEditableUIView as rt,ListItemView as ht,ListView as at,MenuBarMenuListItemButtonView as ct,OverlayHost as dt,View as lt,ViewCollection as mt,clickOutsideHandler as ut,createDropdown as ft,focusChildOnDropdownOpen as pt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as wt,disableViewPlaceholder as gt,enableViewPlaceholder as _t}from'@ckeditor/ckeditor5-engine';import{Clipboard as At,ClipboardMarkersUtils as vt,ClipboardPipeline as yt}from'@ckeditor/ckeditor5-clipboard';import{Enter as Ct,ShiftEnter as Tt}from'@ckeditor/ckeditor5-enter';import{SelectAll as It}from'@ckeditor/ckeditor5-select-all';import{Typing as bt}from'@ckeditor/ckeditor5-typing';import{Undo as Et}from'@ckeditor/ckeditor5-undo';import{Paragraph as kt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Nt}from'@ckeditor/ckeditor5-widget';const Ot=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x158425();var Mt=class extends Ot{['model'];['view'];constructor(_0x1dce56,_0x25ac81){super(),this['model']=_0x1dce56,this['model']['_isAttached']=!0x0,this['view']=_0x25ac81,this['listenTo'](_0x25ac81,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x25ac81,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x25ac81,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x25ac81,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x25ac81,'addComment',(_0x384d6d,_0x204570)=>this['addComment'](_0x204570)),this['listenTo'](_0x25ac81,'updateComment',(_0x5444ec,_0x20da1d,_0x378853)=>this['updateComment'](_0x20da1d,_0x378853)),this['listenTo'](_0x25ac81,'removeComment',(_0x115f0e,_0x236fc0)=>this['removeComment'](_0x236fc0));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x288a6b){this['model']['addComment']({'content':_0x288a6b,'authorId':this['view']['_localUser']['id']});}updateComment(_0xe50785,_0x9e031e){this['model']['getComment'](_0xe50785)['update']({'content':_0x9e031e});}removeComment(_0x54f585){this['model']['getComment'](_0x54f585)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Rt(_0x330b83,_0x10b767,_0x5b8830){const t=_0x330b83['t'];switch(_0x10b767){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'},_0x5b8830);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x5b8830);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'},_0x5b8830);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'},_0x5b8830);case'NUMBER_OF_COMMENTS':return t({'string':'Show\x20%0\x20comment','plural':'Show\x20%0\x20comments','id':'NUMBER_OF_COMMENTS'},_0x5b8830);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'},_0x5b8830);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'},_0x5b8830);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'},_0x5b8830);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'';}}var St=class extends nt{['main'];editable;constructor(_0x57f29,_0x4328c0){super(_0x57f29);const _0x5cf4dc=_0x1f5374();this['main']=this['createCollection'](),this['editable']=new rt(_0x57f29,_0x4328c0,void 0x0,{'label':()=>Rt(_0x57f29,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x57f29['uiLanguageDirection'],'lang':_0x57f29['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5cf4dc},'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']();}},xt=class extends st{['view'];constructor(_0x474c55){super(_0x474c55),this['view']=new St(_0x474c55['locale'],_0x474c55['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x220d8d=this['editor']['editing']['view'],_0x45d0f1=this['view']['editable'];_0x45d0f1['name']=_0x220d8d['document']['getRoot']()['rootName'],this['view']['render']();const _0x2b887b=_0x45d0f1['element'];this['setEditableElement'](_0x45d0f1['name'],_0x2b887b),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x220d8d['attachDomRoot'](_0x2b887b),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Pt=[At,Ct,Tt,It,bt,Et,kt],Lt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x158425(_0x176def);var Dt=class CommentEditor extends Lt{static defaultPlugins=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Pt)());constructor(_0x2bc9f4={}){(_0x2bc9f4=Object['assign']({},_0x2bc9f4))['plugins']||(_0x2bc9f4['plugins']=CommentEditor['defaultPlugins']),super(_0x2bc9f4),this['ui']=new xt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0xa6fe1a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xa6fe1a))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x26b376=>{const _0x940ae0=this['model']['document']['getRoot'](),_0x2b989a=_0x940ae0&&_0x940ae0['getChild'](_0x940ae0['childCount']-0x1);_0x26b376['setSelection'](_0x2b989a,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0xa45e49=this['editing']['view'],_0x4794cc=_0xa45e49['document']['getRoot'](),_0x22de02=_0x4794cc['getChild'](0x0);_0x4794cc['childCount']>0x1||!_0x22de02||'p'!=_0x22de02['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(gt(_0xa45e49,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x22de02['placeholder']=this['placeholder']),_t({'view':_0xa45e49,'element':_0x22de02,'keepOnFocus':!0x0}),this['placeholderElement']=_0x22de02);}},Vt=class extends lt{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x4739cd,_0x1dd1cf={}){super(_0x4739cd),this['editor']=null,this['_editorConfig']=_0x1dd1cf,this['set']('value',_0x1dd1cf['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Rt(_0x4739cd,'Reply...')),this['set']('submitLabel',Rt(_0x4739cd,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['cancelButtonView'],this['submitButtonView']]),this['keystrokes']=new _0x17f113(),this['focusTracker']=new _0x48a359(),this['focusCycler']=new ot({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x497894=>!_0x497894['defaultPrevented']},'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['cancelButtonView'],this['submitButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x36a847,_0x1da73a)=>{this['cancelButtonView']['fire']('execute'),_0x1da73a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x581a23,_0x2447b8)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2447b8());}),this['on']('submit',(_0x2ccc51,_0x130385)=>{_0x130385['length']>0xfde8?(alert(Rt(_0x4739cd,'TOO_LONG_COMMENT_ALERT',[_0x130385['length'],0xfde8])),_0x2ccc51['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Dt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x270fcf=this['editor'];this['element']['insertBefore'](_0x270fcf['ui']['element'],this['element']['firstChild']),_0x270fcf['model']['document']['on']('change',()=>this['value']=_0x270fcf['getData']()),_0x270fcf['bind']('placeholder')['to'](this),this['focusables']['add'](_0x270fcf['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2c8824){-0x1===_0x2c8824?(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:_0x2e5bdb}=this,_0x26669c=new _0x997752(_0x2e5bdb);return _0x26669c['extendTemplate']({'attributes':{'class':['ck-button-action','ck-comment__input-actions--submit']}}),_0x26669c['withText']=!0x0,_0x26669c['bind']('label')['to'](this,'submitLabel'),_0x26669c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x26669c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x81adb5,_0x54bd7e)=>!_0x54bd7e&&!!_0x81adb5['trim']()),_0x26669c;}_createCancelButton(){const {locale:_0x160ef0}=this,_0x13e957=new _0x997752(_0x160ef0);return _0x13e957['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x13e957['label']=Rt(_0x160ef0,'Cancel'),_0x13e957['withText']=!0x0,_0x13e957['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x13e957;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x274b9b=>{this['focusTracker']['add'](_0x274b9b['element']);}),this['focusables']['on']('change',(_0x23c59b,_0x1efecc)=>{for(const _0x2ee90f of Array['from'](_0x1efecc['added'])['reverse']())this['focusTracker']['add'](_0x2ee90f['element']);});}},Bt=class extends lt{constructor(_0x4d9a89,_0x4ef187,_0x3793d9){super(_0x4d9a89),this['commentInputView']=new Vt(_0x4d9a89,_0x3793d9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x36a2e5,_0x510203)=>_0x36a2e5||!!_0x510203),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 _0x59db41(_0x4d9a89,_0x4ef187),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'](_0x454563){this['commentInputView']['focus'](_0x454563);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x3dc360,_0x38ed47)=>{const {submitButtonView:_0xc1f6bf,cancelButtonView:_0x50b5c0,editor:_0xa5b9fc}=this['commentInputView'];[_0xc1f6bf['element'],_0x50b5c0['element'],_0xa5b9fc?_0xa5b9fc['editing']['view']['getDomRoot']():null]['filter'](_0x167d1f=>_0x167d1f)['some'](_0x57dd80=>_0x126eb8(_0x57dd80,_0x38ed47['target']))||(this['focus'](),_0x38ed47['preventDefault']());});}},Ht=class extends lt{revealButtonView;constructor(_0x4403f0){super(_0x4403f0),this['set']('count',void 0x0);const _0x19f0f6=this['revealButtonView']=new _0x997752(_0x4403f0);_0x19f0f6['icon']=_0x1b2512,_0x19f0f6['withText']=!0x0,_0x19f0f6['bind']('label')['to'](this,'count',_0x5b9467=>Rt(_0x4403f0,'NUMBER_OF_COMMENTS',_0x5b9467)),_0x19f0f6['extendTemplate']({'attributes':{'class':'ck-button_small'}}),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[_0x19f0f6]});}},Ut=class extends lt{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x19b4d0,_0x14a265,_0xa134d2){super(_0x19b4d0);const _0x2a9a0e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x14a265['comments']['length']),this['set']('isActive',!0x1),this['set']('isExpandedByUser',!0x1),this['_model']=_0x14a265,this['_config']=_0xa134d2,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x48a359(),this['keystrokes']=new _0x17f113(),this['focusCycler']=new ot({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4f9ccc=>this['commentViews']['map'](_0x13d0c1=>_0x13d0c1['element'])['includes'](_0x4f9ccc['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Ht(_0x19b4d0),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x75d45e=>_0x75d45e-this['_config']['maxCommentsWhenCollapsed']),this['listenTo'](this['_collapsedCommentsView']['revealButtonView'],'execute',()=>{this['isExpandedByUser']=!0x0;});for(const _0x25e72d of _0x14a265['comments'])this['_handleNewCommentModel'](_0x25e72d);this['_handleInfoComment'](),this['listenTo'](_0x14a265['comments'],'add',(_0x2778a5,_0x4a8f89)=>{const _0x599d37=this['_calculatePosition'](_0x4a8f89);this['length']++,this['_handleNewCommentModel'](_0x4a8f89,_0x599d37),this['refreshVisibleViews']();}),this['listenTo'](_0x14a265['comments'],'remove',(_0x3c435f,_0x12428e)=>{this['length']--,this['_handleRemoveCommentModel'](_0x12428e),this['refreshVisibleViews']();}),this['listenTo'](_0x14a265,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x14a265,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',(_0x247e23,_0x1a669e,_0x5a4817)=>{_0x5a4817||(this['isExpandedByUser']=!0x1),this['refreshVisibleViews']();}),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['on']('change:isExpandedByUser',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x2a9a0e['if']('length','ck-hidden',_0x1f7e53=>!_0x1f7e53)],'aria-label':Rt(_0x19b4d0,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment']&&!this['isExpandedByUser'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x3ab897){-0x1===_0x3ab897?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0xe20219 of this['commentViews'])_0xe20219['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x837783,_0x3dd540){const _0x3ae80a=new this['_config']['CommentView'](this['locale'],_0x837783,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3ae80a['viewUid']=_0x837783['id'],_0x3ae80a['delegate']('removeComment')['to'](this),_0x3ae80a['delegate']('updateComment')['to'](this),_0x3ae80a['delegate']('resolveCommentThread')['to'](this),_0x3ae80a['delegate']('editorReady')['to'](this),_0x3ae80a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3ae80a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3ae80a,_0x3dd540);}_calculatePosition(_0x16af77){const _0x3512f0=this['_model']['_findOptimalIndex'](_0x16af77);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x16af77['authoredAt']?_0x3512f0-0x1:_0x3512f0:_0x3512f0-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2c65a5={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Rt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x2c65a5,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2c65a5));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x54b6e4){const _0x5ab066=this['commentViews']['remove'](_0x54b6e4['id']);this['stopListening'](_0x5ab066),_0x5ab066['isEditMode']&&this['_updateHasDirtyComment'](),_0x5ab066['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5550ae=>_0x5550ae['isEditMode']);}['_rearrangeCollapse'](){const _0x1a3295=function(_0xfcf64d){const _0x5c9273=new _0xc802da();for(const _0x6f175b of _0xfcf64d)_0x5c9273['add'](_0x6f175b);return _0x5c9273;}(this['commentViews']),_0x3c3efc=this['_collapsedCommentsView']['count'];for(let _0x5418f7=0x1;_0x5418f7<=_0x3c3efc;_0x5418f7++)_0x1a3295['remove'](0x1);for(const _0x556c84 of _0x1a3295)_0x556c84['collapse']();_0x3c3efc>0x0&&_0x1a3295['add'](this['_collapsedCommentsView'],0x1),Ft(_0x36701e(Array['from'](this['visibleViews']),Array['from'](_0x1a3295)),this['visibleViews'],_0x1a3295);}['_rearrangeExpand'](){Ft(_0x36701e(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2f5c47 of this['visibleViews'])_0x2f5c47['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x143083=>{this['focusTracker']['add'](_0x143083['element']),this['keystrokes']['listenTo'](_0x143083['element']);}),this['commentViews']['on']('change',(_0x5e6ac9,_0x24a054)=>{for(const _0x22f440 of _0x24a054['removed'])this['focusTracker']['remove'](_0x22f440['element']),this['keystrokes']['stopListening'](_0x22f440['element']);for(const _0x339902 of Array['from'](_0x24a054['added'])['reverse']())this['focusTracker']['add'](_0x339902['element']),this['keystrokes']['listenTo'](_0x339902['element']);});const _0x4e0d13=_0x59640b=>{const _0x24910b=this['_collapsedCommentsView']['revealButtonView']['element'];_0x24910b&&(_0x59640b?(this['focusTracker']['add'](_0x24910b),this['keystrokes']['listenTo'](_0x24910b)):(this['focusTracker']['remove'](_0x24910b),this['keystrokes']['stopListening'](_0x24910b)));};this['listenTo'](this['visibleViews'],'add',(_0x444146,_0x50f57c)=>{_0x50f57c===this['_collapsedCommentsView']&&_0x4e0d13(!0x0);}),this['listenTo'](this['visibleViews'],'remove',(_0x120bf6,_0x196b10)=>{_0x196b10===this['_collapsedCommentsView']&&_0x4e0d13(!0x1);}),this['visibleViews']['has'](this['_collapsedCommentsView'])&&_0x4e0d13(!0x0);}};function Ft(_0x5340f1,_0x6aaed0,_0xb96c0b){let _0x2eee27=0x0;for(const _0x27addd of _0x5340f1)switch(_0x27addd){case'insert':_0x6aaed0['add'](_0xb96c0b['get'](_0x2eee27),_0x2eee27),_0x2eee27++;break;case'delete':_0x6aaed0['remove'](_0x2eee27);break;case'equal':_0x2eee27++;}}var Wt=class extends lt{constructor(_0xa5cc43){super(_0xa5cc43);const _0x4d2b3d=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4d2b3d['to']('contextValue',_0x56acb9=>Rt(_0xa5cc43,'THREAD_CONTEXT_LABEL',_0x56acb9)),'tabindex':-0x1},'children':[{'text':_0x4d2b3d['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Kt=class extends lt{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x34e240,_0x5a368f){super(_0x34e240);const _0x1245d9=this['bindTemplate'];this['_model']=_0x5a368f,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x48a359(),this['keystrokes']=new _0x17f113(),this['focusCycler']=new ot({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x128b06=>!!_0x128b06),this['bind']('contextValue')['to'](this['_model'],'context',_0x39712a=>_0x39712a&&_0x39712a['value']?this['_trimContextValue'](_0x39712a['value']):Rt(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',_0x1245d9['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 _0xbd8429=new _0x997752(this['locale']);return _0xbd8429['label']=Rt(this['locale'],'Reopen'),_0xbd8429['tooltip']=Rt(this['locale'],'Reopen'),_0xbd8429['icon']=_0x49a9aa,_0xbd8429['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x12be3f=>!_0x12be3f),_0xbd8429['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4cfdda,_0x47d754)=>_0x4cfdda&&_0x47d754),_0xbd8429['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0xbd8429;}_trimContextValue(_0x26ae38){if(_0x26ae38['length']<0x96)return _0x26ae38;const _0x40bed0=_0x26ae38['lastIndexOf']('\x20',0x93);return _0x26ae38['substring'](0x0,_0x40bed0>-0x1?_0x40bed0:0x93)+'...';}_attachContextActions(){const _0x4b7a52=this['element']['querySelector']('.ck-context'),_0x2ce889=_0x4b7a52['querySelector']('.ck-context__value');this['listenTo'](_0x4b7a52,'mouseenter',()=>{_0x2ce889['offsetWidth']<_0x2ce889['scrollWidth']&&_0x4b7a52['classList']['add']('overlay');}),this['listenTo'](_0x4b7a52,'mouseleave',()=>{_0x4b7a52['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x1ef468 of this['focusables'])this['focusTracker']['add'](_0x1ef468['element']),this['keystrokes']['listenTo'](_0x1ef468['element']);}_createContextView(){const _0xfdc506=new Wt(this['locale']);return _0xfdc506['bind']('contextValue')['to'](this),_0xfdc506;}},Gt=class extends lt{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x1bbd56,_0x4b68c4,_0xc3f7aa,_0xc56461){super(_0x1bbd56),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x4b68c4,this['_localUser']=_0xc3f7aa,this['_config']=_0xc56461,this['commentThreadHeaderView']=new Kt(_0x1bbd56,_0x4b68c4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3d14f4(_0x1bbd56,Rt(_0x1bbd56,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Ut(_0x1bbd56,_0x4b68c4,Object['assign']({'CommentView':this['_config']['CommentView']},_0xc56461)),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',(_0x2072c0,_0x240974)=>_0x2072c0||!!_0x240974),this['bind']('isUnlinked')['to'](_0x4b68c4,'unlinkedAt',_0x420492=>!!_0x420492);let _0x256ab5=null;const _0x4f71b4=()=>{const _0x190f9e=this['_model']['comments']['first']||null;_0x190f9e!==_0x256ab5&&(_0x256ab5&&this['stopListening'](_0x256ab5,'change:content'),_0x256ab5=_0x190f9e,_0x190f9e&&this['listenTo'](_0x190f9e,'change:content',_0x4f71b4));const _0x11276a=_0x190f9e?_0x190f9e['author']['name']:this['_localUser']['name'],_0x5b5d79=_0x190f9e?new DOMParser()['parseFromString'](_0x50acdc(_0x19a970(_0x190f9e['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']})),'text/html')['body']['textContent']:'',_0x2bbc4f=Rt(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x11276a]);this['set']('ariaLabel',_0x5b5d79?_0x2bbc4f+'\x20'+_0x5b5d79:_0x2bbc4f);};this['listenTo'](this['_model']['comments'],'change',_0x4f71b4),_0x4f71b4(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x48a359(),this['keystrokes']=new _0x17f113(),this['focusCycler']=new ot({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2e12f5=>_0x2e12f5['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x4a1fba(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0xe141d0=new Bt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x14443e=_0xe141d0['commentInputView'];return _0xe141d0['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x14443e,'value',(_0x13cb81,_0x44328c,_0x5f0450,_0x5b5bb4,_0x12f9cd)=>!!_0x12f9cd||!!_0x5b5bb4&&_0x5f0450&&!_0x44328c||_0x13cb81&&_0x5f0450&&!_0x44328c),_0x14443e['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1eaf0a,_0x234ccf,_0x585a35)=>{let _0x3a8d5d;return _0x3a8d5d=_0x585a35&&_0x234ccf?'Reply\x20to\x20reopen\x20discussion...':_0x1eaf0a?'Reply...':'Write\x20a\x20comment...',Rt(this['locale'],_0x3a8d5d);}),_0x14443e['bind']('submitLabel')['to'](this,'length',_0x4e264a=>Rt(this['locale'],_0x4e264a?'Reply':'Comment')),_0x14443e['on']('submit',(_0x482106,_0x1839be)=>{this['fire']('addComment',_0x1839be),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x14443e['on']('cancel',()=>{this['focus']();}),_0x14443e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x14443e['on']('cancel',_0x5073d3=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5073d3['stop']());}),this['on']('change:isActive',(_0x1ecaba,_0x2a3dfa,_0x597c46)=>{_0x597c46||this['length']||_0x14443e['value']||this['fire']('removeCommentThread');}),_0xe141d0;}};const Yt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x31390f(Gt);var Xt=class extends Yt{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x1771d9,_0x1a39b8,_0x2a5283,_0x59a10c){super(_0x1771d9,_0x1a39b8,_0x2a5283,_0x59a10c),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1771d9,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x156796,_0x1e3a35,_0x1bf94c)=>{_0x1bf94c||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5cadf6,_0x18bec8,_0x239f3b)=>{_0x239f3b&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x4d0894=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4d0894['if']('isActive','ck-thread--active'),_0x4d0894['if']('isUnlinked','ck-thread--unlinked'),_0x4d0894['to']('actionIndicator',_0x2d205e=>_0x2d205e?'ck-thread--'+_0x2d205e:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4d0894['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 _0x1ef556 of this['commentsListView']['commentViews'])_0x1ef556['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x4558d0}=this,_0x3325ab=this['commentsListView']['commentViews']['get'](0x0);_0x3325ab===this['_boundFirstCommentView']||_0x3325ab['isSystemComment']||(this['_boundFirstCommentView']=_0x3325ab,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3325ab,'actionIndicator',_0x2f4847=>'remove'===_0x2f4847?'remove':null),_0x3325ab['placeholder']=Rt(_0x4558d0,'Write\x20a\x20comment...'),_0x3325ab['removeButton']['on']('execute',_0x29dd23=>{_0x29dd23['stop'](),this['showConfirm'](Rt(_0x4558d0,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3325ab['focus']();}),_0x3325ab['actionBar']['add'](this['resolveButton'],0x0),_0x3325ab['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x172157=new _0x2570f6(this['locale']);return _0x172157['label']=Rt(this['locale'],'Resolve'),_0x172157['tooltip']=Rt(this['locale'],'Resolve'),_0x172157['icon']=_0x2497d0,_0x172157['extendTemplate']({'attributes':{'class':['ck-comment--resolve','ck-button_small']}}),_0x172157['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x571de7=>!_0x571de7),_0x172157['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x10e7a7,_0x104f52)=>_0x10e7a7&&!_0x104f52),_0x172157['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x172157;}_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']));}},qt=class extends lt{constructor(_0x1863b6){super(_0x1863b6),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x179f3d,_0x874e51,_0x30c231)=>{this['element']['innerHTML']=_0x50acdc(_0x30c231);}),this['element']['innerHTML']=_0x50acdc(this['content']);}},jt=class extends lt{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x377d84,_0xbf59b8,_0x30d86e){super(_0x377d84),this['_model']=_0xbf59b8,this['_config']=_0x30d86e,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0xbf59b8,'content',_0xbf59b8,'authoredAt',(_0xcd6152,_0x1a1f02)=>Rt(_0x377d84,'COMMENT_ARIA_LABEL',[_0xbf59b8['author']['name'],_0x30d86e['formatDateTime'](_0x1a1f02),new DOMParser()['parseFromString'](_0x50acdc(_0xcd6152),'text/html')['body']['textContent'],_0xbf59b8['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x3d14f4(_0x377d84,Rt(_0x377d84,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new mt(),this['focusTracker']=new _0x48a359(),this['keystrokes']=new _0x17f113(),this['focusCycler']=new ot({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x347428=>_0x347428['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']?Rt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Rt(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Rt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Rt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x2d2806=new qt(this['locale']);return _0x2d2806['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4219c6,_0x5a319d)=>_0x5a319d?_0x19a970(_0x4219c6,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4219c6),_0x2d2806;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2bd1be=new Vt(this['locale'],this['_config']['editorConfig']);return _0x2bd1be['value']=this['_model']['content'],_0x2bd1be['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2bd1be['submitLabel']=Rt(this['locale'],'Save'),_0x2bd1be['on']('submit',(_0x2d890d,_0x296134)=>{this['fire']('updateComment',this['_model']['id'],_0x296134),this['switchToDisplayMode'](),this['focus']();}),_0x2bd1be['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2bd1be['once']('editorReady',()=>{_0x2bd1be['focus']();}),_0x2bd1be['createEditor'](),_0x2bd1be['delegate']('editorReady')['to'](this),_0x2bd1be['delegate']('editorDestroyed')['to'](this),_0x2bd1be;}_setupKeyboardNavigation(){const _0x390762=this['element'];this['keystrokes']['listenTo'](_0x390762);for(const _0x482a8c of this['focusables'])this['focusTracker']['add'](_0x482a8c['element']),this['keystrokes']['listenTo'](_0x482a8c['element']);this['focusables']['on']('change',(_0xb8c97d,_0x193f96)=>{for(const _0x3a716d of _0x193f96['removed'])this['focusTracker']['remove'](_0x3a716d['element']),this['keystrokes']['stopListening'](_0x3a716d['element']);for(const _0x110b21 of _0x193f96['added'])this['focusTracker']['add'](_0x110b21['element']),this['keystrokes']['listenTo'](_0x110b21['element']);}),this['keystrokes']['set']('enter',(_0x47a6a9,_0x55f5b)=>{_0x390762===_0x47a6a9['target']&&(this['focusCycler']['focusFirst'](),_0x55f5b());}),this['keystrokes']['set']('esc',(_0x554ac5,_0x12609e)=>{_0x390762!==_0x554ac5['target']&&(this['focus'](),_0x12609e());});}};const $t=/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x31390f(jt);var zt=class extends $t{actionBar;['userView'];constructor(_0xa25532,_0x2fadb2,_0xb07378){super(_0xa25532,_0x2fadb2,_0xb07378),this['set']('actionIndicator',null),this['set']('placeholder',Rt(_0xa25532,'Reply...')),this['bind']('authoredAt')['to'](_0x2fadb2),this['bind']('resolvedAt')['to'](_0x2fadb2),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 _0x59db41(_0xa25532,_0x2fadb2['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2fadb2,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x313a74=this['bindTemplate'],_0x48749b=[{'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']}},{'tag':'time','attributes':{'datetime':_0x313a74['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x313a74['to']('authoredAt',_0x150cfb=>this['_config']['formatDateTime'](_0x150cfb))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x313a74['if']('isEditMode','ck-comment__actions--hidden'),_0x313a74['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']&&_0x48749b['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x313a74['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x313a74['if']('isEditMode','ck-comment--edit'),_0x313a74['if']('isSystemComment','ck-comment--info'),_0x313a74['to']('actionIndicator',_0x28a6dc=>_0x28a6dc?'ck-comment--'+_0x28a6dc:'')],'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':_0x48749b}]}]};}_createEditButton(){const _0x39a283=new _0x997752(this['locale']);return _0x39a283['label']=Rt(this['locale'],'Edit'),_0x39a283['icon']=_0x32dd17,_0x39a283['withText']=!0x0,_0x39a283['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x39a283['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2bc65b=>!_0x2bc65b),_0x39a283['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x39a283['on']('execute',()=>this['switchToEditMode']()),_0x39a283;}_createRemoveButton(){const _0x531af0=new _0x997752(this['locale']);return _0x531af0['label']=Rt(this['locale'],'Remove'),_0x531af0['icon']=_0x41956a,_0x531af0['withText']=!0x0,_0x531af0['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x531af0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x47619e=>!_0x47619e),_0x531af0['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x531af0['on']('execute',()=>{this['showConfirm'](Rt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x531af0;}_createDropdown(){const _0x438d20=ft(this['locale'],_0x33dad3),_0x1f72f2=_0x438d20['panelView']['children'],_0x4e7ddb=new at(this['locale']),_0x1c5798=_0x438d20['bindTemplate'];pt(_0x438d20,()=>this['items']['find'](_0x377399=>_0x377399['isVisible'])),_0x438d20['extendTemplate']({'attributes':{'class':[_0x1c5798['if']('isVisible','ck-hidden',_0x30547f=>!_0x30547f)]}});const _0x16fdc6=(_0x363861,_0xa76f36=-0x1)=>{const _0x28255f=new ht(this['locale']);_0x28255f['children']['add'](_0x363861);const _0x28bd49=_0xa76f36>-0x1?_0xa76f36:_0x4e7ddb['items']['length'];_0x4e7ddb['items']['add'](_0x28255f,_0x28bd49);const _0x7b15c4=Array['from'](this['items']);_0x438d20['unbind']('isEnabled','isVisible'),_0x438d20['bind']('isEnabled')['toMany'](_0x7b15c4,'isEnabled',(..._0x5f07ae)=>_0x5f07ae['some'](_0x348651=>_0x348651)),_0x438d20['bind']('isVisible')['toMany'](_0x7b15c4,'isVisible',(..._0x5b8e05)=>_0x5b8e05['some'](_0x4cfd60=>_0x4cfd60));};_0x438d20['panelPosition']='sw',_0x438d20['buttonView']['set']({'label':Rt(this['locale'],'Show\x20more\x20items'),'icon':_0x551b53}),_0x438d20['buttonView']['extendTemplate']({'attributes':{'class':'ck-button_small'}});for(const _0x5a9d20 of this['items'])_0x16fdc6(_0x5a9d20);return _0x1f72f2['add'](_0x4e7ddb),_0x438d20['listenTo'](this['items'],'add',(_0x12bb33,_0x3d3b46,_0x22fa67)=>{_0x16fdc6(_0x3d3b46,_0x22fa67);}),_0x438d20['listenTo'](this['items'],'remove',(_0x4c3f4b,_0x4354a8,_0x119425)=>{_0x4e7ddb['items']['remove'](_0x119425);}),_0x438d20;}_attachActions(_0x412766,_0x1e8567){const _0x242c21=_0x412766&&_0x412766['element'];_0x242c21&&(this['listenTo'](_0x242c21,'mouseenter',()=>this['actionIndicator']=_0x1e8567),this['listenTo'](_0x242c21,'focus',()=>this['actionIndicator']=_0x1e8567),this['listenTo'](_0x242c21,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x242c21,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x425dfe=super['_createCommentInputView']();return _0x425dfe['bind']('placeholder')['to'](this),_0x425dfe;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Jt(_0x510125){const _0x54cc9a=_0x1a5e4e(_0x510125,0x1e),_0x977017=new MutationObserver(_0x21c950=>{for(const _0x2c799e of _0x21c950)('attributes'==_0x2c799e['type']&&'class'==_0x2c799e['attributeName']||'childList'==_0x2c799e['type']||'characterData'==_0x2c799e['type'])&&_0x54cc9a();});return{'attach'(_0x12f545){_0x977017['observe'](_0x12f545,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x977017['disconnect'](),_0x54cc9a['cancel']();}};}var Qt=class extends lt{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x618d67,_0x2fc15d){super(_0x618d67),this['id']=_0x1f5374(),this['focusTracker']=new _0x48a359(),this['keystrokes']=new _0x17f113(),this['keystrokes']['set']('Esc',(_0x350746,_0x30cbf5)=>this['fire']('Esc',_0x30cbf5)),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']=Jt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x2fc15d),this['mainView']=_0x2fc15d;const _0x20fee7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x20fee7['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 _0x40368e=this['element']['clientHeight'];_0x40368e&&(this['height']=_0x40368e);}};const Zt=/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x158425();var ti=class Annotation extends Zt{['view'];focusableElements;_type;_target;constructor({view:_0x3d7f3e,target:_0x29335a,type:_0x5db316,isVisible:_0x5f3c31=!0x0}){super(),this['view']=_0x3d7f3e,this['view']['element']||this['view']['render'](),this['_type']=_0x5db316,this['_target']=_0x29335a,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xc802da([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x2ac0bb,_0x318035)=>{this['view']['focusTracker']['add'](_0x318035);}),this['focusableElements']['on']('remove',(_0xc5fc84,_0xe3e718)=>{this['view']['focusTracker']['remove'](_0xe3e718);}),this['set']('isVisible',_0x5f3c31);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x2f7361=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x2f7361),_0x2f7361;}get targetRect(){const _0x3fdf0d=this['target'];if(null===_0x3fdf0d)return null;if(_0x3fdf0d instanceof _0xcec7af)return _0x3fdf0d;const _0x39adcb=_0x3fdf0d['filter'](_0x41f772=>function(_0x1953d3){return!!_0x1953d3['offsetParent']||!!_0x1953d3['getClientRects']()['item'](0x0);}(_0x41f772));return 0x0===_0x39adcb['length']?null:_0xcec7af['getDomElementRects'](_0x39adcb[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x12cad4){this['view']['isActive']=_0x12cad4,this['view']['mainView']['isActive']=_0x12cad4;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x3046fd){if(!(null===_0x3046fd||_0x3046fd instanceof _0xcec7af||Array['isArray'](_0x3046fd)&&_0x3046fd['every'](_0x137f4f=>ii(_0x137f4f))))throw new _0x288533('annotation-invalid-target',null,{'target':_0x3046fd});}_getNormalizedTarget(){const _0x2dfd54='function'==typeof this['_target']?this['_target']():this['_target'];return ii(_0x2dfd54)?[_0x2dfd54]:_0x2dfd54;}};function ii(_0x13b1f2){return null!==_0x13b1f2&&'object'==typeof _0x13b1f2&&'nodeType'in _0x13b1f2&&0x1===_0x13b1f2['nodeType'];}var ei=class extends _0xc802da{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x2e43dc=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x48a359(),this['_focusTracker']['on']('change:isFocused',(_0x518e52,_0x45a08f,_0x481df9)=>{_0x481df9||this['fire']('blur');});for(const _0x5bd51a of _0x2e43dc)this['add'](_0x5bd51a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x484264){if(this['has'](_0x484264))throw new _0x288533('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x484264['innerView'],_0x484264),this['_viewToAnnotation']['set'](_0x484264['view'],_0x484264);for(const _0xd3edd2 of _0x484264['focusableElements'])this['_focusTracker']['add'](_0xd3edd2);if(this['listenTo'](_0x484264['focusableElements'],'add',(_0x52a4fa,_0x520bee)=>{this['_focusTracker']['add'](_0x520bee);}),this['listenTo'](_0x484264['focusableElements'],'remove',(_0x58e42b,_0x23e6a7)=>{this['_focusTracker']['remove'](_0x23e6a7);}),this['listenTo'](_0x484264['view']['focusTracker'],'change:isFocused',(_0x92c51d,_0x3d7684,_0x16f087)=>{_0x16f087&&this['fire']('focus',_0x484264);}),_0x484264['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x20cd02 of this)_0x20cd02['updateTargetRect']();}const _0xb9251b=this['_getOrderInContent'](_0x484264['view']['targetRect']);return super['add'](_0x484264,_0xb9251b);}['remove'](_0x1df03d){if(!this['has'](_0x1df03d))throw new _0x288533('annotationcollection-not-existing-item',null);this['stopListening'](_0x1df03d['view']['focusTracker']),this['stopListening'](_0x1df03d['focusableElements']);for(const _0x30ecae of _0x1df03d['focusableElements'])this['_focusTracker']['remove'](_0x30ecae);return this['_viewToAnnotation']['delete'](_0x1df03d['view']),this['_innerViewToAnnotation']['delete'](_0x1df03d['innerView']),super['remove'](_0x1df03d);}getByInnerView(_0x33272f){return this['_innerViewToAnnotation']['get'](_0x33272f);}getByView(_0xcbe80c){return this['_viewToAnnotation']['get'](_0xcbe80c);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x2a0f7f of this)_0x2a0f7f['updateTargetRect']();this['_sort']();}_sort(){const _0x244b20=Array['from'](this)['sort']((_0x25f64a,_0x6598d5)=>ni(_0x25f64a['view']['targetRect'],_0x6598d5['view']['targetRect']));for(let _0x5a50f6=_0x244b20['length']-0x1;_0x5a50f6>0x0;_0x5a50f6--){const _0x18ce31=_0x244b20[_0x5a50f6];_0x5a50f6!==this['getIndex'](_0x18ce31)&&(this['remove'](_0x18ce31),this['add'](_0x18ce31));}}_getOrderInContent(_0xd51f90){let _0x3b78a9=0x0;if(!_0xd51f90)return this['length'];for(const _0x73b9b6 of this){const _0x46ba10=_0x73b9b6['view']['targetRect'];if(_0x46ba10){if(ni(_0xd51f90,_0x46ba10)<0x0)return _0x3b78a9;_0x3b78a9++;}}return _0x3b78a9;}_areCachedRectsStale(){const _0xa75c52=this['get'](0x0);if(!_0xa75c52)return!0x1;const _0x173e5e=_0xa75c52['view']['targetRect'],_0x1dc7bc=_0xa75c52['targetRect'];return!(!_0x173e5e||!_0x1dc7bc)&&(_0x173e5e['top']!==_0x1dc7bc['top']||_0x173e5e['left']!==_0x1dc7bc['left']);}};function si({source:_0x4c7f98,target:_0x19b8d8,filter:_0x7ba181}){for(const _0x2233f9 of _0x4c7f98)_0x7ba181(_0x2233f9)&&_0x19b8d8['add'](_0x2233f9);_0x19b8d8['listenTo'](_0x4c7f98,'add',(_0x89f53d,_0x259112)=>{_0x7ba181(_0x259112)&&_0x19b8d8['add'](_0x259112);}),_0x19b8d8['listenTo'](_0x4c7f98,'remove',(_0x26fc00,_0x19ef1d)=>{_0x19b8d8['has'](_0x19ef1d)&&_0x19b8d8['remove'](_0x19ef1d);});}function ni(_0x187672,_0x17dbf3){if(null===_0x187672&&null===_0x17dbf3)return 0x0;if(null===_0x187672)return-0x1;if(null===_0x17dbf3)return 0x1;const _0x291b9c=_0x187672['top']-_0x17dbf3['top'];return 0x0==_0x291b9c?_0x187672['left']-_0x17dbf3['left']:_0x291b9c;}var oi=class extends _0x4388ae{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x914620){if(super(_0x914620),this['collection']=new ei(),this['_visibleAnnotations']=new ei(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x914620 instanceof _0x176def){const _0x3b8a2e=_0x914620['locale'];_0x914620['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Rt(_0x3b8a2e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Rt(_0x3b8a2e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Rt(_0x3b8a2e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Rt(_0x3b8a2e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Rt(_0x3b8a2e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Rt(_0x3b8a2e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Rt(_0x3b8a2e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1526b3){this['collection']['add'](_0x1526b3);}['remove'](_0x838831){this['collection']['remove'](_0x838831),_0x838831['destroy']();}refreshVisibility(){for(const _0x5b0cbd of this['collection'])_0x5b0cbd['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x284d3a){return this['collection']['getByInnerView'](_0x284d3a);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x41e2eb of this['collection'])_0x41e2eb['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x428351){this['fire']('_activateAnnotation',_0x428351);}createAnnotation(_0x17ada9){return new ti(_0x17ada9);}createAnnotationView(_0x866cf3,_0x54a0e5){return new Qt(_0x866cf3,_0x54a0e5);}_addActiveAnnotation(_0x4ad69c){const _0x5aebc2=new Set(this['activeAnnotations']);_0x5aebc2['add'](_0x4ad69c),this['activeAnnotations']=_0x5aebc2;}_removeActiveAnnotation(_0x3264a6){const _0x2a1f81=new Set(this['activeAnnotations']);_0x2a1f81['delete'](_0x3264a6),this['activeAnnotations']=_0x2a1f81;}_bindAnnotationsToVisibleAnnotations(){const _0x440738=this['collection'],_0x5959a0=this['_visibleAnnotations'];function _0x4e2633(_0x5c0a2a){const _0x5330cb=_0x5c0a2a['source'];_0x5330cb['isVisible']&&!_0x5959a0['has'](_0x5330cb)?_0x5959a0['add'](_0x5330cb):!_0x5330cb['isVisible']&&_0x5959a0['has'](_0x5330cb)&&_0x5959a0['remove'](_0x5330cb),_0x5330cb['view']['focusTracker']['remove'](_0x5330cb['view']['element']),_0x5330cb['view']['focusTracker']['add'](_0x5330cb['view']['element']);}this['listenTo'](_0x440738,'add',(_0x370bad,_0x2e9311)=>{_0x2e9311['isVisible']&&_0x5959a0['add'](_0x2e9311),this['listenTo'](_0x2e9311,'change:isVisible',_0x4e2633);}),this['listenTo'](_0x440738,'remove',(_0xb665b7,_0x578fb5)=>{_0x5959a0['has'](_0x578fb5)&&_0x5959a0['remove'](_0x578fb5),this['stopListening'](_0x578fb5,'change:isVisible',_0x4e2633);});}_setupEnterAnnotationKeystroke(){const _0x303c6b=_0x477238=>{_0x477238['on']('ready',()=>{_0x477238['keystrokes']['set'](_0xc4f94a,(_0x4001f1,_0x187ddd)=>{const _0x211c8a=_0x72573(this['activeAnnotations']['values']());_0x211c8a&&(_0x211c8a['view']['focus'](),_0x187ddd());});});};this['context']instanceof _0x176def?_0x303c6b(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5c3eb4,_0x41fc18)=>{_0x303c6b(_0x41fc18);});}_setupEscapeAnnotationHandling(){const _0x5b821e=_0x2b3ac4=>{const _0xd6e1a=_0x2b3ac4['source'],_0x437145=[];let _0x38df65;if(Array['isArray'](_0xd6e1a['target'])){_0x38df65=_0xd6e1a['target'][0x0],this['context']instanceof _0x176def?_0x437145['push'](this['context']):this['context']['editors']&&_0x437145['push'](...this['context']['editors']);for(const _0x421686 of _0x437145)for(const _0xd1dec7 of _0x421686['editing']['view']['domRoots']['values']())if(_0x126eb8(_0xd1dec7,_0x38df65))return void _0x421686['editing']['view']['focus']();_0x38df65['focus']();}};this['listenTo'](this['collection'],'add',(_0x1d97ca,_0x2b31be)=>{this['listenTo'](_0x2b31be,'escape',_0x5b821e,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2467a1,_0x41e954)=>{this['stopListening'](_0x41e954,'escape',_0x5b821e);});}};const ri=Symbol('noChannel'),hi={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},ai=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x158425(),ci=/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x158425();var di=class extends _0x4388ae{_threads;_threadToController;_viewToController;static get requires(){return[oi,_0x223af0,_0x2993b9];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52cfab){super(_0x52cfab),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5bae86=this['context']['config'];_0x5bae86['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5bae86['define']('comments.maxThreadTotalWeight',0x1f4),_0x5bae86['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5bae86['define']('comments.CommentThreadView',Xt),_0x5bae86['define']('comments.CommentView',zt),_0x5bae86['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x55578f=this['context']['plugins']['get'](oi);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1c4f74,_0x5acfe8)=>this['_addCommentThread'](_0x5acfe8)),this['on']('submitCommentThread',(_0x1a9235,_0x1188b5)=>this['_submitCommentThread'](_0x1188b5)),this['on']('resolveCommentThread',(_0x388b64,_0x43a753)=>this['_resolveCommentThread'](_0x43a753)),this['on']('resolveCommentThread',(_0x436348,_0x216ebf)=>this['_updateActiveAnnotation'](_0x216ebf),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x22d53d,_0x207ec2)=>this['_reopenCommentThread'](_0x207ec2)),this['on']('reopenCommentThread',(_0x372b3a,_0x9d98a)=>this['_updateActiveAnnotation'](_0x9d98a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2b5eac,_0x3ce755)=>this['_removeCommentThread'](_0x3ce755)),this['on']('updateCommentThread',(_0x11ef33,_0x1199d0)=>this['_updateCommentThread'](_0x1199d0)),this['on']('updateCommentThread',(_0x5874a6,_0x473474)=>this['_updateActiveAnnotation'](_0x473474),{'priority':'lowest'}),this['on']('addComment',(_0x21a28b,_0x559a8c)=>this['_addComment'](_0x559a8c)),this['on']('updateComment',(_0xe9b48d,_0xff6343)=>this['_updateComment'](_0xff6343)),this['on']('removeComment',(_0x21f77b,_0x53cd30)=>this['_removeComment'](_0x53cd30)),this['on']('addComment',(_0x1a3d73,{threadId:_0x176d74,isFromAdapter:_0x2cbc68})=>{if(_0x2cbc68)return;const _0xf5cdf0=this['getCommentThread'](_0x176d74),_0x683054=_0xf5cdf0&&this['_threadToController']['get'](_0xf5cdf0);_0x683054&&_0x683054['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x55578f,'change:activeAnnotations',(_0x4de6c7,_0x40e8c5,_0x76f9f4)=>{const _0xd702ab=Array['from'](_0x76f9f4)['map'](_0x4662cc=>this['_viewToController']['get'](_0x4662cc['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xd702ab?_0xd702ab['model']:null;});}set adapter(_0x5d8b3b){if(this['_adapter'])throw new _0x288533('commentsrepository-adapter-already-set');this['_adapter']=_0x5d8b3b;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x5b6b4a=ri,threadId:_0x4d33e2=_0x1f5374(),comments:_0x5a63cd=[],unlinkedAt:_0x541839=null,resolvedAt:_0x423d7d=null,resolvedBy:_0x147616=null,target:_0x242bbc=null,context:_0x44a84c=null,attributes:_0xb3e324={},isResolvable:_0x43f669=!0x0,isSubmitted:_0x328401=!0x1,isFromAdapter:_0x45afde=!0x1}={}){return this['fire'](ui('addCommentThread',_0x5b6b4a),{'channelId':_0x5b6b4a,'threadId':_0x4d33e2,'comments':_0x5a63cd,'unlinkedAt':_0x541839,'resolvedAt':_0x423d7d,'resolvedBy':_0x147616,'target':_0x242bbc,'context':_0x44a84c,'attributes':_0xb3e324,'isFromAdapter':_0x45afde,'isResolvable':_0x43f669,'isSubmitted':_0x328401}),this['getCommentThread'](_0x4d33e2);}openNewCommentThread({channelId:_0x106e28=ri,threadId:_0x15e6e6=_0x1f5374(),target:_0x4a7fda,context:_0xda5351=null,isResolvable:_0x4cbb9e=!0x0}){if(this['_readOnlyChannels']['has'](_0x106e28)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4a7fda)throw new _0x288533('commentsrepository-missing-target');const _0x5d4546=this['addCommentThread']({'channelId':_0x106e28,'threadId':_0x15e6e6,'target':_0x4a7fda,'context':_0xda5351,'isResolvable':_0x4cbb9e});if(!_0x5d4546)return null;const _0x156afe=this['_threadToController']['get'](_0x5d4546),_0x7f9cb8=_0x156afe['view']['commentThreadInputView']['commentInputView'],_0x2165a0=this['context']['plugins']['get'](oi),_0x54ae6c=_0x2165a0['getByInnerView'](_0x156afe['view']);return _0x2165a0['activate'](_0x54ae6c),_0x7f9cb8['once']('editorReady',()=>_0x7f9cb8['focus']()),_0x5d4546;}hasCommentThread(_0x3caf67){if('string'!=typeof _0x3caf67)throw new _0x288533('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3caf67);}updateCommentThread({channelId:_0x1c3f76=ri,threadId:_0x426534,context:_0x32262f,unlinkedAt:_0x41d393,attributes:_0x4e2c8f,isFromAdapter:_0x3817cc=!0x1}){return this['fire'](ui('updateCommentThread',_0x1c3f76),{'channelId':_0x1c3f76,'threadId':_0x426534,'context':_0x32262f,'unlinkedAt':_0x41d393,'attributes':_0x4e2c8f,'isFromAdapter':_0x3817cc}),this['getCommentThread'](_0x426534);}getCommentThread(_0x5dacda){if('string'!=typeof _0x5dacda)throw new _0x288533('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5dacda);}fetchCommentThread({channelId:_0x1686d7,threadId:_0x28a125}={}){const _0xc13da5=this['getCommentThread'](_0x28a125);if(_0xc13da5)return Promise['resolve'](_0xc13da5);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x288533('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1686d7,'threadId':_0x28a125})['then'](_0x2cab0c=>this['hasCommentThread'](_0x28a125)?this['getCommentThread'](_0x28a125):_0x2cab0c?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1686d7},_0x2cab0c)):void 0x0)['catch'](_0x2a8157=>{throw console['error'](_0x2a8157),new _0x288533('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x2ada30,skipNotAttached:_0x177823=!0x1,skipEmpty:_0x31a29a=!0x1,toJSON:_0x2d669c=!0x1}={}){const _0x895f62=[];for(const _0x1a25e5 of this['_threads']['values']())_0x2ada30&&_0x1a25e5['channelId']!==_0x2ada30||_0x177823&&!_0x1a25e5['isAttached']||_0x31a29a&&0x0===_0x1a25e5['length']||_0x895f62['push'](_0x1a25e5);return _0x2d669c?_0x895f62['map'](_0x12f1dc=>_0x12f1dc['toJSON']()):_0x895f62;}getAnnotationForCommentThread(_0x4dea02){const _0xd6292f=this['_threadToController']['get'](_0x4dea02);return _0xd6292f&&this['context']['plugins']['get'](oi)['getByInnerView'](_0xd6292f['view'])||null;}getCommentThreadForAnnotation(_0x47ceff){const _0x2df330=this['_viewToController']['get'](_0x47ceff['innerView']);return _0x2df330?_0x2df330['model']:null;}setActiveCommentThread(_0x37450b){const _0x4d8d1b=this['context']['plugins']['get'](oi);if(!_0x37450b)return void(this['activeCommentThread']&&_0x4d8d1b['deactivateAll']());const _0x598f2e=this['getCommentThread'](_0x37450b);if(!_0x598f2e)throw new _0x288533('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x37450b});if(!this['_threadToController']['has'](_0x598f2e))throw new _0x288533('commentsrepository-active-not-attached',null,{'threadId':_0x37450b});const _0x2a189b=_0x4d8d1b['getByInnerView'](this['_threadToController']['get'](_0x598f2e)['view']);_0x4d8d1b['activate'](_0x2a189b);}switchReadOnly(_0x2ba314,_0xb7b2f){_0x2ba314?this['_readOnlyChannels']['add'](_0xb7b2f):this['_readOnlyChannels']['delete'](_0xb7b2f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x55ec8b){return this['_readOnlyChannels']['has'](_0x55ec8b)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x175c89,_0xab24ab){return new Mt(_0x175c89,_0xab24ab);}setPermissions(_0x2c20f6,_0x35eba6=ri){this['_permissions']['set'](_0x35eba6,_0x2c20f6),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x3fc772=ri){return this['_permissions']['has'](_0x3fc772)?this['_permissions']['get'](_0x3fc772):hi;}_addCommentThread({channelId:_0x594f24,threadId:_0x332e90,comments:_0x2135e2,unlinkedAt:_0x5c0262,resolvedAt:_0x583b62,resolvedBy:_0x5ed16d,target:_0x2a9d2c,context:_0x42be8d,attributes:_0x5e61da,isFromAdapter:_0x40d372,isResolvable:_0x5e9030,isSubmitted:_0x1a92fd}){if('string'!=typeof _0x332e90)throw new _0x288533('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x332e90});if(this['hasCommentThread'](_0x332e90))throw new _0x288533('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x332e90});const _0x63a393=new li(this,{'channelId':_0x594f24,'id':_0x332e90,'context':_0x42be8d,'attributes':_0x5e61da,'unlinkedAt':_0x5c0262,'resolvedAt':_0x583b62,'resolvedBy':_0x5ed16d?this['context']['plugins']['get'](_0x2993b9)['getUser'](_0x5ed16d):null,'isResolvable':_0x5e9030,'isSubmitted':_0x1a92fd||_0x40d372});this['_threads']['set'](_0x332e90,_0x63a393);for(const _0x3bb235 of _0x2135e2)_0x63a393['_add'](this['_createNewComment']({'threadId':_0x332e90,..._0x3bb235}));return _0x2a9d2c&&_0x63a393['attachTo'](_0x2a9d2c),_0x40d372||!_0x63a393['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x594f24,'threadId':_0x332e90});}_submitCommentThread({channelId:_0x114697,threadId:_0x22f82a}){if(!this['hasCommentThread'](_0x22f82a))throw new _0x288533('commentsrepository-missing-comment-thread',this);const _0x4e722d=this['getCommentThread'](_0x22f82a);if(_0x4e722d['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x14c1c8,comments:_0x394cfe,resolvedAt:_0x3ac9ec,resolvedBy:_0x2b867f,context:_0x965a05,attributes:_0x85af5}=_0x4e722d,_0x1e6203=this['context']['plugins']['get']('PendingActions'),_0x255a0f=_0x1e6203['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x114697,'threadId':_0x14c1c8,'comments':_0x394cfe['map'](_0xdfae49=>_0xdfae49['toJSON']()),'resolvedAt':_0x3ac9ec,'resolvedBy':_0x2b867f?_0x2b867f['id']:_0x2b867f,'context':_0x965a05,'attributes':_0x85af5})['then'](({comments:_0xe6422})=>{_0x1e6203['remove'](_0x255a0f);for(const _0x3ba734 of _0xe6422)this['_updateComment']({'channelId':_0x114697,'threadId':_0x22f82a,'commentId':_0x3ba734['commentId'],'createdAt':_0x3ba734['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x52a279=>{throw console['error'](_0x52a279),new _0x288533('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x382a90,target:_0x3ff518}){const _0x4ab98e=this['getCommentThread'](_0x382a90);if(!_0x4ab98e)throw new _0x288533('commentsrepository-attach-missing-comment-thread',this);const _0x31ad64=this['context']['plugins']['get']('PendingActions'),_0x4066b6=this['context']['plugins']['get'](oi),_0x21abd3=this['_createCommentThreadView'](_0x4ab98e),_0x4f1dad=new Mt(_0x4ab98e,_0x21abd3);let _0xd14d1c=null;_0x21abd3['on']('change:isDirty',(_0xad056e,_0x41db4d,_0x85dd1f)=>{_0x85dd1f?_0xd14d1c=_0x31ad64['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xd14d1c&&(_0x31ad64['remove'](_0xd14d1c),_0xd14d1c=null);}),this['_threadToController']['set'](_0x4ab98e,_0x4f1dad),this['_viewToController']['set'](_0x21abd3,_0x4f1dad);const _0x397ff0=new Qt(this['context']['locale'],_0x21abd3);_0x397ff0['bind']('length')['to'](_0x21abd3),_0x397ff0['bind']('isDirty')['to'](_0x21abd3,'isDirty',_0x21abd3,'length',(_0x204fa2,_0x417323)=>_0x204fa2||!_0x417323),_0x397ff0['bind']('isActive')['to'](_0x21abd3),_0x397ff0['type']='comment';const _0x4d7e80=new ti({'view':_0x397ff0,'target':_0x3ff518,'type':'comment','isVisible':!_0x4ab98e['archivedAt']&&!!('function'==typeof _0x3ff518?_0x3ff518():_0x3ff518)});return _0x21abd3['on']('escape',()=>{_0x4d7e80['fire']('escape');}),this['_bindAnnotationToEditors'](_0x21abd3,_0x4d7e80),_0x4066b6['add'](_0x4d7e80),_0x4d7e80;}_bindAnnotationToEditors(_0x19973a,_0x4f7ac3){this['listenTo'](_0x19973a,'editorReady',(_0x27a04f,_0x425c14)=>{const _0x3ed8d7=_0x425c14['ui']['view']['body']['bodyCollectionContainer'];_0x4f7ac3['focusableElements']['add'](_0x3ed8d7),this['context']instanceof _0x176def&&this['context']['ui']['focusTracker']['add'](_0x3ed8d7);},{'priority':'highest'}),this['listenTo'](_0x19973a,'editorDestroyed',(_0x1e2b13,_0x1f3a83)=>{const _0x358557=_0x1f3a83['ui']['view']['body']['bodyCollectionContainer'];_0x4f7ac3['focusableElements']['has'](_0x358557)&&_0x4f7ac3['focusableElements']['remove'](_0x358557),this['context']instanceof _0x176def&&this['context']['ui']['focusTracker']['remove'](_0x358557);});}_unbindEditors(_0x3f3bd4){this['stopListening'](_0x3f3bd4,'editorReady'),this['stopListening'](_0x3f3bd4,'editorDestroyed');}_createCommentThreadView(_0x112c88){const _0x327783=this['context']['plugins']['get'](_0x2993b9),{config:_0x516d20,locale:_0x22cdce}=this['context'],_0xf7fdd9=_0x3d2d4c(_0x516d20['get']('locale'),_0x22cdce);return new(0x0,(_0x516d20['get']('comments'))['CommentThreadView'])(_0x22cdce,_0x112c88,_0x327783['me'],{'editorConfig':{..._0x516d20['get']('comments.editorConfig'),...this['_getCommentEditorOverlayConfig'](),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x516d20['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x516d20['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x516d20['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x516d20['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xf7fdd9,'CommentView':_0x516d20['get']('comments')['CommentView']});}_getCommentEditorOverlayConfig(){const _0x431d85=this['context']['config'],_0x2d2daa=_0x431d85['get']('comments.editorConfig'),_0xad9ea1=_0x2d2daa?.['ui']?.['overlayContainer']||_0x431d85['get']('sidebar.overlayContainer')||_0x431d85['get']('ui.overlayContainer');return _0xad9ea1?{'ui':{..._0x2d2daa?.['ui'],'overlayContainer':_0xad9ea1}}:{};}_resolveCommentThread({threadId:_0x36edd0,channelId:_0x227dd2,resolvedAt:_0x204c27,resolvedBy:_0x509de9,isFromAdapter:_0x351cbe}){if(!this['hasCommentThread'](_0x36edd0))throw new _0x288533('commentsrepository-missing-comment-thread',null,{'threadId':_0x36edd0});const _0x455fb7=this['getCommentThread'](_0x36edd0);if(_0x455fb7['isResolved'])throw new _0x288533('commentsrepository-resolved-comment-thread',null,{'threadId':_0x36edd0});const _0x1c74d7=this['context']['plugins']['get'](_0x2993b9);if(_0x455fb7['resolvedBy']=_0x1c74d7['getUser'](_0x509de9),_0x455fb7['resolvedAt']=_0x204c27,_0x351cbe||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x607356=this['context']['plugins']['get']('PendingActions'),_0x37fcaf=_0x607356['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x227dd2,'threadId':_0x36edd0})['then'](({resolvedAt:_0x557fe,resolvedBy:_0x30204a})=>{_0x607356['remove'](_0x37fcaf),_0x455fb7['resolvedBy']['id']!==_0x30204a&&(_0x455fb7['resolvedBy']=_0x1c74d7['getUser'](_0x30204a)),_0x455fb7['resolvedAt']=_0x557fe;})['catch'](_0x5383a3=>{throw console['error'](_0x5383a3),new _0x288533('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x53ef3c,channelId:_0x476a40,isFromAdapter:_0x2dbfe}){if(!this['hasCommentThread'](_0x53ef3c))throw new _0x288533('commentsrepository-missing-comment-thread',null,{'threadId':_0x53ef3c});const _0x41a10a=this['getCommentThread'](_0x53ef3c);if(!_0x41a10a['isResolved'])throw new _0x288533('commentsrepository-reopen-comment-thread',null,{'threadId':_0x53ef3c});if(_0x41a10a['resolvedBy']=null,_0x41a10a['resolvedAt']=null,_0x2dbfe||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x590608=this['context']['plugins']['get']('PendingActions'),_0x52634b=_0x590608['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x476a40,'threadId':_0x53ef3c})['then'](()=>_0x590608['remove'](_0x52634b))['catch'](_0x188dea=>{throw console['error'](_0x188dea),new _0x288533('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x381d72,isFromAdapter:_0x411b40}){const _0x2ada98=this['getCommentThread'](_0x381d72);if(!_0x2ada98)throw new _0x288533('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x381d72),this['_threads']['delete'](_0x381d72),!_0x2ada98['isSubmitted']||_0x411b40||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x17a5b0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5a5b1f}=_0x2ada98,_0x3c9520=_0x17a5b0['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5a5b1f,'threadId':_0x381d72})['then'](()=>_0x17a5b0['remove'](_0x3c9520))['catch'](_0x3f54de=>{throw console['error'](_0x3f54de),new _0x288533('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x359bec,unlinkedAt:_0x276d9a,context:_0xd1cfc6,attributes:_0x2a1434,isFromAdapter:_0x1a7b5c}){if('string'!=typeof _0x359bec)throw new _0x288533('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x359bec});if(!this['hasCommentThread'](_0x359bec))throw new _0x288533('commentsrepository-missing-comment-thread',null,{'threadId':_0x359bec});const _0x3b1b81=this['getCommentThread'](_0x359bec);let _0x4943fc=!0x1;if(void 0x0!==_0xd1cfc6&&_0x3b1b81['context']!==_0xd1cfc6&&(_0x3b1b81['context']=_0xd1cfc6,_0x4943fc=!0x0),void 0x0!==_0x276d9a&&_0x3b1b81['unlinkedAt']!==_0x276d9a&&(_0x3b1b81['unlinkedAt']=_0x276d9a,_0x4943fc=!0x0),_0x2a1434&&!_0xee05b(_0x2a1434,_0x3b1b81['attributes'])&&(_0x3b1b81['attributes']=_0x2a1434,_0x4943fc=!0x0),!_0x4943fc)return Promise['resolve']();if(!_0x3b1b81['isSubmitted']||_0x1a7b5c||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x24b51b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5db2c5}=_0x3b1b81,_0x16c626=_0x24b51b['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5db2c5,'threadId':_0x359bec,'context':_0xd1cfc6,'unlinkedAt':_0x276d9a,'attributes':_0x2a1434})['then'](()=>_0x24b51b['remove'](_0x16c626))['catch'](_0x1eda69=>{throw console['error'](_0x1eda69),new _0x288533('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x1d4afd){const _0x214838=this['context']['plugins']['get'](oi),_0x503399=this['getCommentThread'](_0x1d4afd);if(_0x503399['_isAttached']=!0x1,this['_threadToController']['has'](_0x503399)){const _0x2d05ed=this['_threadToController']['get'](_0x503399),_0x2fe8cd=_0x2d05ed['view'],_0x330e4a=_0x214838['getByInnerView'](_0x2fe8cd);this['_threadToController']['delete'](_0x503399),this['_viewToController']['delete'](_0x2fe8cd),_0x330e4a&&_0x214838['remove'](_0x330e4a),_0x2d05ed['destroy'](),_0x2fe8cd['destroy']()['then'](()=>{this['_unbindEditors'](_0x2fe8cd);});}}_updateActiveAnnotation({threadId:_0x4d9632,resolvedAt:_0x42ea3a,unlinkedAt:_0x525e3a}){const _0xaf8261=!!_0x42ea3a,_0x9100c5=this['context']['plugins']['get'](oi),_0x499d27=this['getCommentThread'](_0x4d9632);if(this['_threadToController']['has'](_0x499d27)){const _0x3928d6=this['_threadToController']['get'](_0x499d27)['view'],_0x4ddc3e=_0x9100c5['getByInnerView'](_0x3928d6);_0x4ddc3e&&(_0xaf8261&&_0x9100c5['_removeActiveAnnotation'](_0x4ddc3e),_0x525e3a?_0x4ddc3e['isVisible']=!0x1:_0x4ddc3e['refreshVisibility']());}}_getExternalAuthor(_0x260b18){const _0x551891=this['context']['plugins']['get'](_0x2993b9),_0x39c543=_0x46e958('external:'+_0x260b18),_0x20def5=_0x551891['getUser'](_0x39c543);return _0x20def5||_0x551891['addUser']({'id':_0x39c543,'name':_0x260b18});}_createNewComment({threadId:_0x2371a6,commentId:_0x434246=_0x1f5374(),content:_0x146116,authorId:_0x38b9c5,createdAt:_0x5b18a8,attributes:_0x391a15}){if('string'!=typeof _0x434246)throw new _0x288533('commentsrepository-invalid-commentid');if('string'!=typeof _0x38b9c5)throw new _0x288533('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x146116||!_0x146116['trim']())throw new _0x288533('commentsrepository-invalid-comment-content');const _0x8fbce7=this['context']['plugins']['get'](_0x2993b9)['getUser'](_0x38b9c5);if(!_0x8fbce7)throw new _0x288533('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x38b9c5});let _0x17e068=null,_0x2801af=_0x5b18a8;return _0x391a15?.['@external']&&(_0x17e068=this['_getExternalAuthor'](_0x391a15['@external']['authorName']),_0x2801af=new Date(_0x391a15['@external']['createdAt'])),new mi(this,{'threadId':_0x2371a6,'id':_0x434246,'author':_0x17e068||_0x8fbce7,'creator':_0x8fbce7,'content':_0x146116,'createdAt':_0x5b18a8,'authoredAt':_0x2801af,'attributes':_0x391a15});}_addComment(_0x458605){let {threadId:_0x474701,content:_0xab671e,attributes:_0x1dcfb7,isFromAdapter:_0x18a34e}=_0x458605;const _0x5cd7bb=this['getCommentThread'](_0x458605['threadId']);if(!_0x5cd7bb)throw new _0x288533('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3028f2=this['_createNewComment'](_0x458605),{id:_0x29a191}=_0x3028f2;if(_0x5cd7bb['_add'](_0x3028f2),_0x18a34e||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5cd7bb['isSubmitted'])return Promise['resolve']();const _0x5ea1c1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2dff88}=_0x5cd7bb,_0x1c514d=_0x5ea1c1['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1dcfb7||(_0x1dcfb7={}),this['adapter']['addComment']({'channelId':_0x2dff88,'threadId':_0x474701,'commentId':_0x29a191,'content':_0xab671e,'attributes':_0x1dcfb7})['then'](_0xdf2dd=>{_0x5ea1c1['remove'](_0x1c514d),_0xdf2dd&&this['_updateComment']({'channelId':_0x2dff88,'threadId':_0x474701,'commentId':_0x29a191,'createdAt':_0xdf2dd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1723db=>{throw console['error'](_0x1723db),new _0x288533('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x325654,commentId:_0x22965d,content:_0x1ac6a2,createdAt:_0x183286,attributes:_0x8e247d,isFromAdapter:_0xba02f1}){if(void 0x0!==_0x1ac6a2&&('string'!=typeof _0x1ac6a2||!_0x1ac6a2['trim']()['length']))throw new _0x288533('commentsrepository-update-comment-invalid-content');const _0xb852dc=this['getCommentThread'](_0x325654),_0x1a220b=_0xb852dc['getComment'](_0x22965d);if(!_0x1a220b)throw new _0x288533('commentsrepository-update-missing-comment',this);let _0x585b1f=!0x1;if(_0x1ac6a2&&_0x1ac6a2!==_0x1a220b['content']&&(_0x1a220b['isEditable']||_0xba02f1)&&(_0x1a220b['content']=_0x1ac6a2,_0x585b1f=!0x0),_0x183286&&_0x183286!==_0x1a220b['createdAt']&&(_0x1a220b['createdAt']=_0x183286,_0x1a220b['isExternal']||(_0x1a220b['authoredAt']=_0x183286),_0x585b1f=!0x0),_0x8e247d&&!_0xee05b(_0x8e247d,_0x1a220b['attributes'])&&(_0x1a220b['attributes']=_0x8e247d,_0x585b1f=!0x0),!_0x585b1f)return Promise['resolve']();if(_0xb852dc['fire']('commentUpdated'),_0xba02f1||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x268791=this['context']['plugins']['get']('PendingActions'),{channelId:_0x10f555}=this['getCommentThread'](_0x1a220b['threadId']),_0x592332=_0x268791['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x10f555,'threadId':_0x325654,'commentId':_0x22965d,'content':_0x1ac6a2,'attributes':_0x8e247d})['then'](()=>_0x268791['remove'](_0x592332))['catch'](_0x140c42=>{throw console['error'](_0x140c42),new _0x288533('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x4ef53c,commentId:_0x38dccf,isFromAdapter:_0x3d2e63}){const _0x276a7c=this['getCommentThread'](_0x4ef53c),_0x43d485=_0x276a7c['getComment'](_0x38dccf);if(!_0x43d485)throw new _0x288533('commentsrepository-remove-missing-comment',this);if(_0x276a7c['_remove'](_0x43d485),_0x3d2e63||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x261784=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2ace6f}=_0x276a7c,_0x426005=_0x261784['add'](Rt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2ace6f,'threadId':_0x4ef53c,'commentId':_0x38dccf})['then'](()=>_0x261784['remove'](_0x426005))['catch'](_0x1a78d9=>{throw console['error'](_0x1a78d9),new _0x288533('commentsrepository-remove-comment-internal-error',this);});}},li=class extends ai{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x27938f,_0x5a4763){super();const _0x30a692=_0x5a4763['isResolvable'];this['channelId']=_0x5a4763['channelId'],this['id']=_0x5a4763['id'],this['comments']=new _0xc802da(),this['_repository']=_0x27938f,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5a4763['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x27938f,'_permissions',_0x27938f,'_readOnlyChannels',()=>_0x27938f['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x27938f,'_permissions',()=>_0x27938f['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x27938f,'_permissions',()=>{const _0x4279ba=_0x27938f['getPermissions'](this['channelId']);return _0x4279ba['write']||_0x4279ba['admin'];}),this['bind']('isResolvable')['to'](_0x27938f,'_permissions',()=>_0x30a692&&_0x27938f['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5a4763['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x259cf7,_0x155731)=>_0x259cf7?_0x155731?_0x259cf7<_0x155731?_0x259cf7:_0x155731:_0x259cf7:_0x155731),this['set']('unlinkedAt',_0x5a4763['unlinkedAt']||null),this['set']('resolvedAt',_0x5a4763['resolvedAt']||null),this['set']('resolvedBy',_0x5a4763['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x365941=>!!_0x365941),this['set']('attributes',_0x5a4763['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x26a3ff,_0x224715)=>_0x26a3ff+_0x224715['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0xf4ec12,id:_0x40bd81}=this;this['_repository']['fire'](ui('submitCommentThread',_0xf4ec12),{'channelId':_0xf4ec12,'threadId':_0x40bd81});}setUnlinkedAt(_0x35431f){this['_update']({'unlinkedAt':_0x35431f});}['resolve']({resolvedAt:_0x2ea995=new Date(),resolvedBy:_0x4f144b='',isFromAdapter:_0x326a72=!0x1}={}){const _0x488096=this['_repository']['context']['plugins']['get'](_0x2993b9)['me'],{channelId:_0x4794cb,id:_0x8e924}=this;this['_repository']['fire'](ui('resolveCommentThread',_0x4794cb),{'channelId':_0x4794cb,'threadId':_0x8e924,'resolvedAt':_0x2ea995,'resolvedBy':_0x4f144b||_0x488096['id'],'isFromAdapter':_0x326a72});}['reopen']({isFromAdapter:_0x59df90=!0x1}={}){const {channelId:_0x2ba5c0,id:_0x527fec}=this;this['_repository']['fire'](ui('reopenCommentThread',_0x2ba5c0),{'channelId':_0x2ba5c0,'threadId':_0x527fec,'isFromAdapter':_0x59df90});}setContext(_0x43c8b6){this['context']||this['_update']({'context':_0x43c8b6});}setAttribute(_0x140c0f,_0x37be1a){const _0x363da3=_0x209f4f(this['attributes']);_0x4c488d(_0x363da3,_0x140c0f,_0x37be1a),this['_update']({'attributes':_0x363da3});}removeAttribute(_0x3ce873){const _0x132ad5=_0x209f4f(this['attributes']);_0x48278f(_0x132ad5,_0x3ce873),this['_update']({'attributes':_0x132ad5});}['remove']({isFromAdapter:_0x49ac57=!0x1}={}){const {channelId:_0x19eb4b,id:_0x607c7b}=this;this['_repository']['fire'](ui('removeCommentThread',_0x19eb4b),{'channelId':_0x19eb4b,'threadId':_0x607c7b,'isFromAdapter':_0x49ac57});}attachTo(_0x54e376){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x54e376});}addComment(_0x350958){const {channelId:_0x3ea34b,id:_0x292b94}=this;this['_repository']['fire'](ui('addComment',_0x3ea34b,_0x292b94),Object['assign']({'channelId':_0x3ea34b,'threadId':_0x292b94},_0x350958));}getComment(_0x36c787){if('string'!=typeof _0x36c787)throw new _0x288533('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x36c787});return this['comments']['get'](_0x36c787);}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'](_0x2512e3=>_0x2512e3['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4b4ace){return this['listenTo'](_0x4b4ace,'change:authoredAt',()=>{const _0x2a82fc=this['_findOptimalIndex'](_0x4b4ace),_0x10c785=this['comments'];_0x2a82fc-0x1!=_0x10c785['getIndex'](_0x4b4ace)&&_0x2a82fc+0x1!=_0x10c785['getIndex'](_0x4b4ace)&&(this['_remove'](_0x4b4ace),this['_add'](_0x4b4ace));}),this['comments']['add'](_0x4b4ace,this['_findOptimalIndex'](_0x4b4ace));}_update(_0x31c143){const {channelId:_0x1f6f91,id:_0xabb57f}=this;this['_repository']['fire'](ui('updateCommentThread',_0x1f6f91),{..._0x31c143,'channelId':_0x1f6f91,'threadId':_0xabb57f});}['_remove'](_0x556021){return this['stopListening'](_0x556021),_0x556021['destroy'](),this['comments']['remove'](_0x556021);}_findOptimalIndex(_0x3e6cba){const _0x29435d=this['comments']['find'](_0x1f1afe=>new Date(_0x1f1afe['authoredAt'])['getTime']()>new Date(_0x3e6cba['authoredAt'])['getTime']());return _0x29435d?this['comments']['getIndex'](_0x29435d):this['length'];}},mi=class extends ci{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x37edf3,_0x68ee94){super();const _0x282844=_0x37edf3['context']['plugins']['get'](_0x2993b9)['me'],_0x4a462f=_0x37edf3['getCommentThread'](_0x68ee94['threadId']),_0x58cf42=0x0===_0x4a462f['comments']['length'],_0x2e76a9=_0x282844===_0x68ee94['author'];this['id']=_0x68ee94['id'],this['threadId']=_0x68ee94['threadId'],this['author']=_0x68ee94['author'],this['creator']=_0x68ee94['creator'],this['set']('content',_0x68ee94['content']),this['createdAt']=_0x68ee94['createdAt']||new Date(),this['set']('authoredAt',_0x68ee94['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4a462f,'resolvedAt'),this['set']('attributes',_0x68ee94['attributes']||{}),this['bind']('isEditable')['to'](_0x37edf3,'_permissions',()=>{const _0x2fa2a3=_0x37edf3['getPermissions'](_0x4a462f['channelId'])['write'],_0x5a3012=_0x37edf3['getPermissions'](_0x4a462f['channelId'])['modifyAll'];return _0x2e76a9&&_0x2fa2a3||!_0x2e76a9&&_0x5a3012;}),this['bind']('isRemovable')['to'](_0x4a462f,'isRemovable',_0x37edf3,'_permissions',_0x3ce97b=>{const _0x447c9a=_0x37edf3['getPermissions'](_0x4a462f['channelId'])['write'],_0x4281ec=_0x37edf3['getPermissions'](_0x4a462f['channelId'])['modifyAll'];return _0x2e76a9&&_0x447c9a||_0x3ce97b&&_0x58cf42||!_0x2e76a9&&_0x4281ec&&!_0x58cf42;}),this['bind']('isReadOnly')['to'](_0x4a462f,'isReadOnly'),this['_repository']=_0x37edf3;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x39780a){const _0xd12327=document['createElement']('div');return _0xd12327['innerHTML']=_0x50acdc(_0x39780a),_0xd12327['textContent']['length'];}(this['content']),0xc8);}update(_0x4670a8){const {threadId:_0x5b4675,id:_0x3c6683}=this;if(!this['_repository']['hasCommentThread'](_0x5b4675))throw new _0x288533('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x28887f}=this['_repository']['getCommentThread'](_0x5b4675);this['_repository']['fire'](ui('updateComment',_0x28887f,_0x5b4675),{'channelId':_0x28887f,'threadId':_0x5b4675,'commentId':_0x3c6683,..._0x4670a8});}setAttribute(_0x223217,_0xcb4b84){const _0x22f284=_0x209f4f(this['attributes']);_0x4c488d(_0x22f284,_0x223217,_0xcb4b84),this['update']({'attributes':_0x22f284});}removeAttribute(_0x3de2ba){const _0x377ba6=_0x209f4f(this['attributes']);_0x48278f(_0x377ba6,_0x3de2ba),this['update']({'attributes':_0x377ba6});}['remove'](_0x5b3868={}){if(!_0x5b3868['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1e8cb8,id:_0x50653f}=this;if(!this['_repository']['hasCommentThread'](_0x1e8cb8))throw new _0x288533('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x246835}=this['_repository']['getCommentThread'](_0x1e8cb8);this['_repository']['fire'](ui('removeComment',_0x246835,_0x1e8cb8),{'channelId':_0x246835,'threadId':_0x1e8cb8,'commentId':_0x50653f,..._0x5b3868});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ui(_0x5a4983,..._0x290b0f){for(const _0x148057 of _0x290b0f)void 0x0!==_0x148057&&(_0x5a4983+=':'+String(_0x148057));return _0x5a4983;}var fi=class extends _0x4b5229{constructor(_0x92280){super(_0x92280),this['set']('hasContent',!0x1);}['refresh'](){const _0x165b4d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x443e2e of _0x165b4d['getRanges']())if(this['_hasContent'](_0x443e2e))return void(this['hasContent']=!0x0);}execute({threadId:_0x14937a=_0x1f5374(),ranges:_0x57bf85,comment:_0x2965b9}={}){const _0x45f17a=this['editor']['model'],_0x499914=_0x57bf85??Array['from'](_0x45f17a['document']['selection']['getRanges']()),_0x13ae17=[];for(const _0x160a9a of _0x499914)this['_hasContent'](_0x160a9a)&&_0x13ae17['push'](this['_trimToContent'](_0x160a9a));if(!_0x13ae17['length'])throw new _0x288533('addcommentthreadcommand-incorrect-ranges',null);_0x2965b9&&this['_createCommentThread'](_0x14937a,_0x2965b9),this['_createMarkersFromRanges'](_0x14937a,_0x13ae17,!!_0x2965b9);}_createMarkersFromRanges(_0x36f271,_0x476c00,_0xb59b22){this['editor']['model']['change'](_0x152a92=>{for(const _0x595e4b of _0x476c00){const _0xbd6540='comment:'+_0x36f271+':'+_0x1f5374()['substr'](0x1,0x5);_0x152a92['addMarker'](_0xbd6540,{'range':_0x595e4b,'usingOperation':_0xb59b22,'affectsData':_0xb59b22});}});}_createCommentThread(_0x57f020,_0x1dbcd3){const _0x216910=this['editor']['plugins']['get']('CommentsRepository'),_0x4cbf52=this['editor']['config']['get']('collaboration.channelId'),_0x20779b=this['editor']['plugins']['get']('Users')['me'];if(!_0x20779b)throw new _0x288533('addcommentthreadcommand-user-not-found',null);_0x216910['addCommentThread']({'threadId':_0x57f020,'channelId':_0x4cbf52,'comments':[{'authorId':_0x20779b['id'],'content':_0x1dbcd3,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0xd4f0fd){for(const _0x17340b of _0xd4f0fd['getItems']())if(this['_itemIsContent'](_0x17340b))return!0x0;return!0x1;}_itemIsContent(_0x345404){return _0x345404['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x345404)&&!_0x345404['is']('element','tableCell');}_trimToContent(_0x30d338){const _0x21bc20=_0x5ca31e=>!this['_itemIsContent'](_0x5ca31e['item']),_0x40cf8f=_0x30d338['start']['getLastMatchingPosition'](_0x21bc20),_0x309925=_0x30d338['end']['getLastMatchingPosition'](_0x21bc20,{'direction':'backward'});return this['editor']['model']['createRange'](_0x40cf8f,_0x309925);}},pi=class extends _0x36fb8a{_dataCollectors;_editorAnnotations;static get requires(){return[oi];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2baf57){super(_0x2baf57),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x1859b4=this['editor'],_0x323fb9=_0x1859b4['model']['document']['selection'],_0x284757=_0x423b2b(()=>this['refreshSelectedViews'](),0xa);_0x323fb9['on']('change:range',(_0x486720,_0x59eacb)=>{_0x59eacb['directChange']&&(_0x284757['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1859b4['editing']['view']['document'],'change:isFocused',(_0x511fd3,_0x4c78d6,_0x495a5a)=>{_0x495a5a&&_0x284757();}),this['listenTo'](_0x1859b4['ui']['focusTracker'],'change:isFocused',(_0x471097,_0x1e12cb,_0x272f15)=>{_0x272f15||this['fire']('blur',{'isAnnotationTracked':_0x1b70d3=>this['_editorAnnotationsData']['has'](_0x1b70d3['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x13b560){if(this['_editorAnnotations']['has'](_0x13b560['view']))return;this['_editorAnnotations']['add'](_0x13b560['view']),this['editor']['ui']['focusTracker']['add'](_0x13b560['view']['element']);const _0xbec30b=this['editor']['plugins']['get'](oi);this['listenTo'](_0xbec30b['collection'],'remove',(_0x2632bb,_0xbdd8e3)=>{this['editor']['ui']['focusTracker']['remove'](_0xbdd8e3['view']['element']),this['_editorAnnotations']['delete'](_0xbdd8e3['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x391971){if('function'!=typeof _0x391971)throw new _0x288533('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x391971);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x5a2334,annotations:_0x4615d7}){const _0x20b678=[],_0x2d6069=this['editor']['model']['document']['selection'],_0x17f9cb=Array['from'](_0x2d6069['getRanges']());for(const [_0x1a20f7,_0x23c041]of this['_editorAnnotationsData']){const _0x102077=_0x2e5ff2(_0x23c041),_0x126693=_0x4615d7['getByInnerView'](_0x1a20f7);_0x102077&&_0x126693&&_0x20b678['push']({'annotation':_0x126693,'range':_0x102077});}function _0x2e5ff2(_0x520e8e){for(const _0x599ebb of _0x520e8e)for(const _0x350220 of _0x17f9cb)if(_0x599ebb['containsRange'](_0x350220,!_0x2d6069['isCollapsed']))return _0x599ebb;return null;}const _0x431e89=new Map(Array['from'](_0x4615d7,(_0x19fcd6,_0x5333f6)=>[_0x19fcd6,_0x5333f6]));return _0x20b678['sort']((_0x40ed81,_0x1798ed)=>{const _0x1054b4=_0x40ed81['range'],_0x368094=_0x1798ed['range'];if(!_0x1054b4['start']['isTouching'](_0x368094['start'])||!_0x1054b4['end']['isTouching'](_0x368094['end'])){if(_0x1054b4['containsRange'](_0x368094,!0x0))return 0x1;if(_0x368094['containsRange'](_0x1054b4,!0x0))return-0x1;}return _0x40ed81['annotation']==_0x5a2334?-0x1:_0x1798ed['annotation']==_0x5a2334?0x1:(_0x431e89['get'](_0x40ed81['annotation'])??0x0)-(_0x431e89['get'](_0x1798ed['annotation'])??0x0);})['map'](_0x460228=>_0x460228['annotation']);}get _editorAnnotationsData(){const _0x1b599f=new Map();for(const _0x3bee02 of Array['from'](this['_dataCollectors']))for(const [_0x5d03c3,_0x3b9f06]of _0x3bee02())_0x1b599f['set'](_0x5d03c3,_0x3b9f06);return _0x1b599f;}},wi=class extends _0x36fb8a{afterInit(){const _0x428171=this['editor'];_0x428171['plugins']['has']('RestrictedEditingModeEditing')&&_0x428171['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},gi=class extends _0x36fb8a{constructor(_0x2f5204){super(_0x2f5204),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x5cf165=this['editor'],_0xb186a2=_0x5cf165['commands']['get']('importWord'),_0x24f69b=_0x5cf165['plugins']['get'](_0x2993b9);_0xb186a2&&(_0xb186a2['on']('execute',(_0x33d265,[,_0x1357e1])=>{_0x1357e1['collaboration_features']={'comments':!0x0,'user_id':_0x24f69b['me']['id']};},{'priority':_0x2280ad['high']+0xa}),this['listenTo'](_0xb186a2,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x725fde,_0x5b72bf){const {comment_threads:_0x9d2ac3}=_0x5b72bf;_0x9d2ac3&&_0x9d2ac3['forEach'](({thread_id:_0x36134b,comments:_0x5f1466,is_resolved:_0x3e7602})=>{const _0x41f5df=new Date(),_0x1f8960=_0x5f1466['map'](({author:_0x37e837,content:_0x148f73,created_at:_0x45a43c})=>({'content':_0x148f73,'authorId':this['editor']['plugins']['get'](_0x2993b9)['me']['id'],'createdAt':_0x41f5df,'attributes':{'@external':{'authorName':_0x37e837,'createdAt':_0x45a43c?new Date(_0x45a43c):new Date(),'source':'importWord'}}})),_0x43f5da=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](di)['addCommentThread']({'channelId':_0x43f5da,'threadId':_0x36134b,'comments':_0x1f8960,'resolvedAt':_0x3e7602?_0x41f5df:null});});}},_i=class extends _0x36fb8a{constructor(_0x47410e){super(_0x47410e),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[vt,yt];}afterInit(){const _0x16ac04=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x16ac04,'contentInsertion',(_0x5f0fee,_0x437511)=>this['_removeMarkersWithoutThreads'](_0x437511['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x288031){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x288031;const _0x31d0d4=this['editor']['plugins']['get']('CommentsRepository');for(const _0xafaea2 of _0x288031['keys']()){const [_0x25d04c,_0xaee251]=_0xafaea2['split'](':');'comment'!=_0x25d04c||_0x31d0d4['hasCommentThread'](_0xaee251)||_0x288031['delete'](_0xafaea2);}return _0x288031;}_registerMarkerInClipboardPipeline(){const _0x3593fe=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xf07d8a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xf07d8a&&_0x3593fe['_registerMarkerToCopy']('comment',_0xf07d8a);}_mapCommentsCopyConfigToRegisterConfiguration(_0x3eb3d9){switch(_0x3eb3d9){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function Ai(_0x3a2b63){const _0x29bc45=_0x3a2b63['split'](':');return{'group':_0x29bc45[0x0],'id':_0x29bc45[0x1],'part':_0x29bc45[0x2]};}var vi=class extends _0x36fb8a{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x46f7aa,_0xe43e34)=>{if(!_0xe43e34['options']['showCommentHighlights'])return null;if(_0xe43e34['options']['ignoreResolvedComments']){const {id:_0x4a4d99}=Ai(_0x46f7aa['markerName']);if(this['editor']['plugins']['get'](di)['getCommentThread'](_0x4a4d99)?.['isResolved']&&_0x46f7aa['item'])return _0xe43e34['consumable']['consume'](_0x46f7aa['item'],'addMarker:'+_0x46f7aa['markerName']),_0xe43e34['consumable']['consume'](_0x46f7aa['item'],'removeMarker:'+_0x46f7aa['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x24a4ad=>{_0x24a4ad['on']('addMarker:comment',(_0x38a484,_0x4c9056,_0x4897e3)=>{if(!_0x4897e3['options']['showCommentHighlights'])return;const _0x468cd2=_0x4c9056['item'];if(!_0x468cd2)return;const _0x3a2720=_0x4897e3['mapper']['toViewElement'](_0x468cd2);this['editor']['model']['schema']['isObject'](_0x468cd2)&&_0x3a2720&&!_0x3a2720['getCustomProperty']('widget')&&_0x3a2720['is']('containerElement')&&Nt(_0x3a2720,_0x4897e3['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x39e85a,{writer:_0x3db546,options:_0x4b4d6e})=>{if(!_0x4b4d6e['showCommentHighlights'])return null;const _0x304c73=_0x3db546['createContainerElement']('div'),_0x13df81=_0x3db546['createEmptyElement']('hr');return _0x3db546['addClass']('ck-horizontal-line',_0x304c73),_0x3db546['insert'](_0x3db546['createPositionAt'](_0x304c73,0x0),_0x13df81),_0x304c73;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x170adb,{writer:_0x56762e,options:_0x2aa5c})=>{if(!_0x2aa5c['showCommentHighlights'])return null;const _0x56b730=_0x56762e['createContainerElement']('span'),_0x186a1c=_0x56762e['createEmptyElement']('img');return _0x56762e['addClass']('image-inline',_0x56b730),_0x56762e['insert'](_0x56762e['createPositionAt'](_0x56b730,0x0),_0x186a1c),_0x56b730;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x58873c,{writer:_0x346312,options:_0x575f0f})=>{if(_0x575f0f['showCommentHighlights'])return _0x346312['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2e43ac,_0x5b05f9,_0x1f1ebd)=>{_0x1f1ebd['options']['showCommentHighlights']&&_0x2e43ac['stop']();},{'priority':'high'});}},yi=class extends _0x36fb8a{static get requires(){return[di,pi,_0x2993b9,wi,gi,_i,vi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x416b8c){super(_0x416b8c),this['set']('isThreadsLoadingPaused',!0x0),_0x416b8c['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2f66d2,_0x5d5067,_0x1bfff8,_0x108b63)=>{const _0x23e1dc=_0x416b8c['plugins']['get'](di),_0x1cd1f6=_0x1bfff8?Ai(_0x1bfff8)['id']:null;_0x416b8c['model']['change'](()=>{if(_0x1cd1f6){const _0x22047f=this['getAllMarkersForId'](_0x1cd1f6);for(const _0x1c3e59 of _0x22047f)_0x416b8c['editing']['reconvertMarker'](_0x1c3e59);}if(_0x108b63){const {id:_0x49745b}=Ai(_0x108b63),_0x5e3f7e=_0x23e1dc['getCommentThread'](_0x49745b);if(_0x5e3f7e&&_0x5e3f7e['unlinkedAt'])return;if(_0x5e3f7e&&!_0x5e3f7e['isAttached'])return;const _0x20824d=this['getAllMarkersForId'](_0x49745b);for(const _0x129e5c of _0x20824d)_0x416b8c['editing']['reconvertMarker'](_0x129e5c);}}),_0x1cd1f6&&this['scrollToThreadMarker'](_0x1cd1f6);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x44df21=this['editor'],_0x3240bc=_0x44df21['plugins']['get'](di),_0x11c79a=_0x44df21['config']['get']('collaboration.channelId'),_0x4b781d=_0x3240bc['getCommentThreads']()['filter'](_0x4b53da=>_0x4b53da['channelId']!==_0x11c79a);_0x44df21['commands']['add']('addCommentThread',new fi(_0x44df21)),this['listenTo'](_0x44df21,'change:isReadOnly',(_0x1ea2c0,_0x425e7b,_0x4d47f1)=>{_0x3240bc['switchReadOnly'](_0x4d47f1,_0x44df21['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3240bc,Ci('addCommentThread',_0x11c79a),(_0x3bf637,{threadId:_0x4420b6})=>{this['editor']['plugins']['get'](di)['getCommentThread'](_0x4420b6)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4420b6);}),this['listenTo'](_0x3240bc,Ci('removeCommentThread',_0x11c79a),(_0x402a9f,{threadId:_0xe692fc})=>{_0x44df21['model']['enqueueChange']({'isUndoable':!0x1},_0x584f5f=>{const _0x5e4578=this['getAllMarkersForId'](_0xe692fc);for(const _0x40745e of _0x5e4578)_0x584f5f['removeMarker'](_0x40745e);});}),this['listenTo'](_0x3240bc,Ci('resolveCommentThread',_0x11c79a),(_0x5d9882,{threadId:_0x352ac5})=>{this['_reconvertMarkers'](_0x352ac5);const _0x20fd05=this['editor']['plugins']['get'](oi);(this['editor']['editing']['view']['hasDomSelection']||_0x20fd05['collection']['isFocused'])&&(this['editor']['plugins']['get'](di)['getCommentThread'](_0x352ac5)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3240bc,Ci('reopenCommentThread',_0x11c79a),(_0x444118,{threadId:_0x4a726e})=>{this['_reconvertMarkers'](_0x4a726e);},{'priority':'low'}),this['listenTo'](_0x3240bc,Ci('addComment',_0x11c79a),(_0x5abe06,{threadId:_0x56b9c8,isFromAdapter:_0x1fecfc})=>{const _0x18995f=this['getAllMarkersForId'](_0x56b9c8);!_0x1fecfc&&0x0!=_0x18995f['length']&&_0x3240bc['hasCommentThread'](_0x56b9c8)&&0x1===_0x3240bc['getCommentThread'](_0x56b9c8)['length']&&_0x44df21['model']['enqueueChange']({'isUndoable':!0x1},_0x19aed9=>{for(const _0x32d495 of _0x18995f)_0x19aed9['updateMarker'](_0x32d495,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4b781d);}afterInit(){!async function(_0x511e0f){const _0x5afc8a='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x11c09f=0x79758,_0x149945={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x40f5f9(_0x383a72){const _0x23bc99=new window['Promise'](_0xdd482a=>{_0x383a72['once']('ready',_0xdd482a);}),_0x487fec=window['Date']['now'](),_0x1e2881=_0x383a72['config']['get']('licenseKey');async function _0x3c8b84(){let _0x32641c,_0x1ff7ac=null,_0x27dc0c=null;try{return'GPL'==_0x1e2881?'NotAllowed':(_0x32641c=_0x5f5b6d(),_0x32641c?(_0x32641c['usageEndpoint']&&(_0x27dc0c=_0x47f5af(_0x32641c['usageEndpoint'],_0x32641c['jti'])),await _0x34fdcf()?_0x15c5d9()?_0x262ebf()?'Expired':_0x454ada()?('evaluation'==_0x32641c['licenseType']&&(_0x1ff7ac=_0x4e3a8d('EvaluationLimit')),await _0x362ae5()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x262ebf(){const _0x38410a=['evaluation','trial']['includes'](_0x32641c['licenseType'])?_0x487fec/0x3e8:0xe10*_0x11c09f;return _0x32641c['exp']<_0x38410a;}function _0x15c5d9(){const _0x4a1580=_0x32641c['features'];if(!_0x4a1580)return!0x1;if(_0x4a1580['includes']('*'))return!0x0;if(_0x4a1580['includes']('CMT'))return!0x0;if(_0x4a1580['includes']('TRILIUM')&&_0x375fd4())return!0x0;if(_0x4a1580['includes']('RCMT')){if(_0x522272())return!0x0;if(_0x21dd1e()||_0x48e37f())return!0x0;}return!0x1;}function _0x454ada(){const _0x543385=_0x32641c['licensedHosts'];if(!_0x543385||0x0==_0x543385['length'])return!0x0;const {hostname:_0x5b9821}=new URL(window['location']['href']);if(_0x543385['includes'](_0x5b9821))return!0x0;const _0x1b6920=_0x5b9821['split']('.');return _0x543385['filter'](_0x268373=>_0x268373['includes']('*'))['map'](_0x13656b=>_0x13656b['split']('.'))['filter'](_0x1892ff=>_0x1892ff['length']<=_0x1b6920['length'])['map'](_0x3ad61a=>Array(_0x1b6920['length']-_0x3ad61a['length'])['fill']('*'===_0x3ad61a[0x0]?'*':'')['concat'](_0x3ad61a))['some'](_0x15c7f5=>_0x1b6920['every']((_0x11974a,_0x5c1922)=>_0x15c7f5[_0x5c1922]===_0x11974a||'*'===_0x15c7f5[_0x5c1922]));}function _0x362ae5(){return _0x1ff7ac&&_0x27dc0c?new window['Promise']((_0x375de7,_0x13af10)=>{_0x1ff7ac['then'](_0x375de7,_0x13af10),_0x27dc0c['then'](_0x349339=>{'Valid'!=_0x349339&&_0x375de7(_0x349339);},_0x13af10);}):_0x1ff7ac||_0x27dc0c||'Valid';}}function _0x47f5af(_0x19957e,_0x363599){return new window['Promise'](_0x2f433c=>{if(_0x5b2445())return _0x2f433c('Valid');_0xe2c2ad(),_0x383a72['decorate']('_sendUsageRequest');let _0x10df4b=!0x1;const _0xf4cd1f=_0x1f5374();function _0x37093e(_0x227c61){return!!_0x227c61&&('object'==typeof _0x227c61||'function'==typeof _0x227c61)&&'function'==typeof _0x227c61['then']&&'function'==typeof _0x227c61['catch'];}function _0x33e820(_0x32b14b){_0x1b0743(_0x32b14b)['then'](_0x224e9b=>_0x224e9b&&'ok'==_0x224e9b['status']?_0x18a660(_0x3ac150(_0xf4cd1f+_0x363599))!=_0x224e9b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x255b6f=>(_0x7f8d2f(),_0x255b6f),()=>{const _0x6c0935=_0x20759a();return null==_0x6c0935?(_0x7f8d2f(),'Valid'):_0x487fec-_0x6c0935>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2f433c)['catch'](()=>{_0x2f433c('UsageLimit');});const _0x1a4404=0x36ee80;function _0x7f8d2f(){const _0x5538be='llct-'+_0x18a660(_0x3ac150(_0x19957e)),_0x3581c5=_0x36fd35(_0x18a660(window['Math']['ceil'](_0x487fec/_0x1a4404)));window['localStorage']['setItem'](_0x5538be,_0x3581c5);}function _0x20759a(){const _0xdfae89='llct-'+_0x18a660(_0x3ac150(_0x19957e)),_0x1efa02=window['localStorage']['getItem'](_0xdfae89);return _0x1efa02?window['parseInt'](_0x36fd35(_0x1efa02),0x10)*_0x1a4404:null;}function _0x1b0743(_0x44ee16){return new window['Promise']((_0x3b6b83,_0x21f57e)=>{_0x44ee16['then'](_0x3b6b83,_0x21f57e),window['setTimeout'](_0x21f57e,0x1d4c0);});}}_0x383a72['on']('_sendUsageRequest',(_0x18296f,_0x2bb326)=>{if(_0x2bb326[0x0]!=_0x19957e)return _0x2f433c('UsageLimit');_0x2bb326[0x1]={..._0x2bb326[0x1],'requestId':_0xf4cd1f};},{'priority':'high'}),_0x383a72['on']('_sendUsageRequest',_0x40ab6b=>{_0x37093e(_0x40ab6b['return'])&&(_0x10df4b=!0x0,_0x33e820(_0x40ab6b['return']));},{'priority':'low'}),_0x23bc99['then'](()=>{_0x10df4b||_0x2f433c('UsageLimit');});});function _0x5b2445(){return'auto'==_0x383a72['editing']['view']['_overlayModeHint'];}function _0xe2c2ad(){_0x383a72['editing']['view']['_overlayModeHint']='auto';}}function _0x4e3a8d(_0x3d2525){const _0x2299ab=[new window['Promise'](_0x546d1d=>setTimeout(_0x546d1d,0x93ecc)),_0x23bc99['then'](()=>new window['Promise'](_0x5b3c00=>{let _0x1d8bc1=0x0;_0x383a72['model']['on']('applyOperation',(_0x3ab1d3,_0x5b3633)=>{_0x5b3633[0x0]['isDocumentOperation']&&_0x1d8bc1++,0x5e8==_0x1d8bc1&&(_0x5b3c00(),_0x3ab1d3['off']());});}))];return window['Promise']['race'](_0x2299ab)['then'](()=>_0x3d2525);}async function _0x26e44a(){await _0x23bc99,_0x383a72['model']['change']=_0x4a1cb3,_0x383a72['model']['enqueueChange']=_0x4a1cb3,_0x383a72['enableReadOnlyMode']('model');}function _0x375fd4(){return window['glob']&&window['glob']['triliumVersion'];}function _0x522272(){return _0x52f8ce('WebSocketGateway')&&'connected'==_0x45d2ae('WebSocketGateway')['state'];}function _0x21dd1e(){return _0x52f8ce('RevisionViewerIntegration');}function _0x48e37f(){return _0x52f8ce('TrackChangesDataGetter');}function _0x4632ab(_0x446005){const _0x2ceb62=_0x4e8de0();_0x383a72[_0x2ceb62]='commentsLicenseKey'+_0x446005,'Valid'!=_0x446005&&_0x26e44a();}function _0x4e8de0(){const _0x3ccc0b=window['String'](window['performance']['now']())['replace']('.','');let _0x433657='m';for(let _0x5eceeb=0x0;_0x5eceeb<_0x3ccc0b['length'];_0x5eceeb+=0x2){let _0x428a2d=window['parseInt'](_0x3ccc0b['substring'](_0x5eceeb,_0x5eceeb+0x2));_0x428a2d>=0x3e&&(_0x428a2d-=0x3e),_0x433657+=_0x5afc8a[_0x428a2d];}return _0x433657;}function _0x5f5b6d(){const _0x230d14=_0x1e2881['split']('.');if(0x3!=_0x230d14['length'])return null;return _0x1446e0(_0x230d14[0x1]);function _0x1446e0(_0x263c6d){const _0xd2264=_0x28e9dc(_0x263c6d);return _0xd2264&&_0x2c36fb()?_0xd2264:null;function _0x2c36fb(){const _0x19353c=_0xd2264['jti'],_0x22976c=window['parseInt'](_0x19353c['substring'](_0x19353c['length']-0x8),0x10),_0x55eaeb={..._0xd2264,'jti':_0x19353c['substring'](0x0,_0x19353c['length']-0x8)};return delete _0x55eaeb['vc'],_0x3ac150(_0x55eaeb)==_0x22976c;}}}async function _0x34fdcf(){let _0x244854=!0x0;try{const [_0x3a520b,_0x1e69c1,_0x3da016]=_0x1e2881['split']('.');return _0x47f769(_0x3a520b),await _0x5e76d8(_0x3a520b,_0x1e69c1,_0x3da016),_0x244854;}catch{return!0x1;}function _0x47f769(_0x5cf5fb){const _0x858bb5=_0x28e9dc(_0x5cf5fb);_0x858bb5&&'ES256'==_0x858bb5['alg']||(_0x244854=!0x1);}async function _0x5e76d8(_0x4523ff,_0x463e35,_0x3d177b){const _0x4a90ba=window['Uint8Array']['from'](_0x102e33(_0x3d177b),_0x2e09b3=>_0x2e09b3['charCodeAt'](0x0)),_0x4d9360=new window['TextEncoder']()['encode'](_0x4523ff+'.'+_0x463e35),_0x3e2b95=window['crypto']['subtle'];if(!_0x3e2b95)return;const _0x181e40=await _0x3e2b95['importKey']('jwk',_0x149945,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3e2b95['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x181e40,_0x4a90ba,_0x4d9360)||(_0x244854=!0x1);}}function _0x28e9dc(_0x1dd2c6){return _0x1dd2c6['startsWith']('ey')?JSON['parse'](_0x102e33(_0x1dd2c6)):null;}function _0x102e33(_0x17899e){return window['atob'](_0x17899e['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3ac150(_0xb4e614){let _0x101993=0x1505;function _0x4e113e(_0x3898fe){for(let _0x4f3996=0x0;_0x4f3996<_0x3898fe['length'];_0x4f3996++){const _0x2dd980=_0x3898fe['charCodeAt'](_0x4f3996);_0x101993=(_0x101993<<0x5)+_0x101993+_0x2dd980,_0x101993&=_0x101993;}}function _0x1c76f0(_0x26e609){Array['isArray'](_0x26e609)?_0x26e609['forEach'](_0x1c76f0):_0x26e609&&'object'==typeof _0x26e609?Object['entries'](_0x26e609)['sort']()['forEach'](([_0x3b0dc6,_0x431565])=>{_0x4e113e(_0x3b0dc6),_0x1c76f0(_0x431565);}):_0x4e113e(window['String'](_0x26e609));}return _0x1c76f0(_0xb4e614),_0x101993>>>0x0;}function _0x18a660(_0x2c36ff){return _0x2c36ff['toString'](0x10)['padStart'](0x8,'0');}function _0x36fd35(_0x2efd0b){return _0x2efd0b['split']('')['reverse']()['join']('');}function _0x52f8ce(_0x559660){return _0x383a72['plugins']['has'](_0x559660);}function _0x45d2ae(_0x102ca2){return _0x383a72['plugins']['get'](_0x102ca2);}function _0x4a1cb3(){}_0x4632ab(await _0x3c8b84());}_0x40f5f9(_0x511e0f['editor']);}(this);}destroy(){const _0x24c0d9=this['editor']['plugins']['get'](di),_0x52ee61=this['editor']['config']['get']('collaboration.channelId');for(const _0x1de149 of _0x24c0d9['getCommentThreads']({'channelId':_0x52ee61}))_0x24c0d9['_detachCommentThread'](_0x1de149['id']),_0x24c0d9['_threads']['delete'](_0x1de149['id']);super['destroy']();}['hasMarkerForId'](_0x7d91ef){return this['getAllMarkersForId'](_0x7d91ef)['length']>0x0;}getAllMarkersForId(_0x409124){const _0x2da356=[];for(const _0x2ada85 of this['editor']['model']['markers'])_0x2ada85['name']['startsWith']('comment:'+_0x409124)&&_0x2da356['push'](_0x2ada85);return _0x2da356;}['scrollToThreadMarker'](_0x38cbda){setTimeout(()=>{const _0xea7524=this['_getTargetForId'](_0x38cbda);_0xea7524&&this['activeMarker']&&Ai(this['activeMarker'])['id']===_0x38cbda&&_0x31bb72({'target':_0xea7524[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x3d065b){this['editor']['model']['change'](()=>{for(const _0x1e240e of this['getAllMarkersForId'](_0x3d065b))this['editor']['editing']['reconvertMarker'](_0x1e240e);});}_attachArchivedThread(_0x2467cf){const _0x238fb2=this['editor']['plugins']['get'](di),_0x450b83=this['editor']['plugins']['get'](pi),_0x26f096=_0x238fb2['getCommentThread'](_0x2467cf);if(!_0x26f096['isAttached']){const _0x21a09b=_0x26f096['attachTo'](()=>this['_getTargetForId'](_0x26f096['id']));_0x450b83['registerAnnotation'](_0x21a09b),_0x26f096['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x19205e=this['editor'],_0x209dab=_0x19205e['plugins']['get'](_0x2993b9);_0x19205e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x19ea4d,_0x26b4d7)=>{const {id:_0x405d81}=Ai(_0x19ea4d['markerName']),_0x64b3ae=_0x19205e['plugins']['get'](di)['getCommentThread'](_0x405d81),_0x437748=this['activeMarker']&&Ai(this['activeMarker'])['id']===_0x405d81;let _0x1595e0;if(_0x64b3ae&&_0x64b3ae['isResolved']&&!_0x437748&&_0x19ea4d['item'])return _0x26b4d7['consumable']['consume'](_0x19ea4d['item'],'addMarker:'+_0x19ea4d['markerName']),_0x26b4d7['consumable']['consume'](_0x19ea4d['item'],'removeMarker:'+_0x19ea4d['markerName']),null;const _0x1c69a8=['ck-comment-marker'];return _0x437748&&_0x1c69a8['push']('ck-comment-marker--active'),_0x1595e0=_0x64b3ae?.['length']?_0x64b3ae['comments']['first']['author']['id']:_0x209dab['me']['id'],{'classes':_0x1c69a8,'attributes':{'data-comment':_0x405d81,'data-author-id':_0x1595e0}};}}),_0x19205e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1842cf,{options:_0xb1be7c})=>{if(_0xb1be7c['showCommentHighlights'])return null;const _0x126c0a=_0x19205e['plugins']['get'](di),_0x3a10b3=_0x19205e['model']['markers']['get'](_0x1842cf),{id:_0x136f0a,part:_0x353765}=Ai(_0x1842cf);return _0x3a10b3&&!_0x3a10b3['affectsData']||_0xb1be7c['ignoreResolvedComments']&&_0x126c0a['getCommentThread'](_0x136f0a)?.['isResolved']?null:{'group':'comment','name':_0x353765?_0x136f0a+':'+_0x353765:_0x136f0a};}}),_0x19205e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x49d8fb,{writer:_0x5fe250})=>_0x5fe250['createElement']('$marker',{'data-name':'comment:'+_0x49d8fb['getAttribute']('id')})}),_0x19205e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x66af20=this['editor'],_0x464dcb=_0x66af20['plugins']['get'](di),_0x2ea9ef=new Set(),_0xd1fc81=new Set();_0x66af20['model']['document']['registerPostFixer'](_0x3b5d3d=>{let _0x4563a8=!0x1;for(const {name:_0x2c8887,data:_0x34a4e3}of _0x66af20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x29f1d0,id:_0xa87efe}=Ai(_0x2c8887);let _0x51967e=_0x34a4e3['newRange'];if('comment'!==_0x29f1d0||!_0x51967e)continue;const _0x3b7680='$graveyard'===_0x51967e['root']['rootName'];_0x3b7680||(_0x51967e=Ti(_0x51967e,_0x66af20['model']),!_0x51967e||_0x51967e['isCollapsed']||!_0x34a4e3['newRange']||_0x51967e['isEqual'](_0x34a4e3['newRange']))?_0x66af20['model']['hasContent'](_0x51967e)&&!_0x3b7680?this['isThreadsLoadingPaused']?_0x2ea9ef['add'](_0x2c8887):this['_handleThreadMarker'](_0x2c8887,_0xa87efe):(_0xd1fc81['add'](_0x2c8887),_0x2ea9ef['delete'](_0x2c8887),_0x3b5d3d['removeMarker'](_0x2c8887),_0x4563a8=!0x0):(_0x3b5d3d['updateMarker'](_0x2c8887,{'range':_0x51967e}),_0x4563a8=!0x0);}return _0x4563a8;}),this['on']('change:isThreadsLoadingPaused',(_0x412333,_0x52bb19,_0x3566b3)=>{if(!_0x3566b3&&_0x2ea9ef['size'])for(const _0x28edba of _0x2ea9ef){const {id:_0x43f744}=Ai(_0x28edba);_0x2ea9ef['delete'](_0x28edba),_0x66af20['model']['markers']['get'](_0x28edba)&&this['_handleThreadMarker'](_0x28edba,_0x43f744);}}),this['listenTo'](_0x66af20['model']['document'],'change',()=>{for(const {name:_0xb4eb63,data:{newRange:_0x307024}}of _0x66af20['model']['document']['differ']['getChangedMarkers']()){const {group:_0xa44e5,id:_0x46f0b6}=Ai(_0xb4eb63);if('comment'!==_0xa44e5)continue;const _0x2c29a5=_0x464dcb['getCommentThread'](_0x46f0b6),_0x326c07=this['hasMarkerForId'](_0x46f0b6);_0x2c29a5&&(!_0x2c29a5['_hasTargetInContent']&&_0x307024&&_0x66af20['editing']['view']['once']('render',()=>{const _0x57a112=_0x66af20['plugins']['get'](oi),_0x10f9d2=_0x464dcb['_threadToController']['get'](_0x2c29a5)['view'];_0x57a112['getByInnerView'](_0x10f9d2)['refreshVisibility']();},{'priority':'low'}),_0x2c29a5['_hasTargetInContent']=_0x326c07||!!_0x307024),_0x307024||(_0xd1fc81['add'](_0xb4eb63),_0x2ea9ef['delete'](_0xb4eb63));}for(const _0x4a1882 of _0xd1fc81){const {id:_0x141755}=Ai(_0x4a1882),_0x1b2ebb=_0x464dcb['getCommentThread'](_0x141755);if(_0x2ea9ef['delete'](_0x4a1882),!_0x1b2ebb)continue;const _0x4f96ee=this['hasMarkerForId'](_0x141755);_0x4f96ee||_0x1b2ebb['isSubmitted']?_0x4f96ee||_0x1b2ebb['unlinkedAt']||_0x1b2ebb['setUnlinkedAt'](new Date()):_0x1b2ebb['remove']();}_0xd1fc81['clear']();});}_handleInitialThreads(_0x1b4976){_0x1b4976['forEach'](_0x2490bc=>{_0x2490bc['unlinkedAt']&&this['_attachArchivedThread'](_0x2490bc['id']);});}_getTargetForId(_0x4a68f4){const _0x3ec749=this['editor'],_0x4efa07=this['getAllMarkersForId'](_0x4a68f4);return _0xd39c98(_0x3ec749['editing'],_0x4efa07);}_getTextContext(_0x100ca7){const _0x55cc33=this['getAllMarkersForId'](_0x100ca7);let _0x4a15b2='',_0x49a00d=!0x1;for(const _0x161643 of _0x55cc33){const _0x4b4541=_0x161643['getRange']();for(const _0x45e4f8 of Array['from'](_0x4b4541['getItems']()))_0x45e4f8['is']('$textProxy')?(_0x4a15b2&&_0x49a00d&&(_0x4a15b2+='\x20',_0x49a00d=!0x1),_0x4a15b2+=_0x45e4f8['data']):_0x49a00d=!0x0;_0x49a00d=!0x0;}return _0x4a15b2['substring'](0x0,0x96);}_attachMarkerToThread(_0x39dd6b,_0x453904){const _0xda8155=this['editor'],_0x33b3eb=_0xda8155['plugins']['get'](di);let _0x9c7c2=_0x33b3eb['getCommentThread'](_0x453904);const _0x121276=_0xda8155['config']['get']('collaboration.channelId'),_0x5a4df4=_0xda8155['plugins']['get'](pi);return _0x9c7c2&&(_0x9c7c2['unlinkedAt']&&_0x9c7c2['setUnlinkedAt'](null),_0x9c7c2['isAttached'])||(this['getAllMarkersForId'](_0x453904)[0x0]['managedUsingOperations']?_0x33b3eb['fetchCommentThread']({'channelId':_0x121276,'threadId':_0x453904})['then'](_0x331b6c=>{if('destroyed'!==_0xda8155['state']){if(_0x9c7c2=_0x331b6c,_0x9c7c2&&!_0x9c7c2['isAttached']){const _0x1587be=_0x9c7c2['attachTo'](()=>this['_getTargetForId'](_0x453904));_0x5a4df4['registerAnnotation'](_0x1587be),_0x9c7c2['isResolved']&&this['_reconvertMarkers'](_0x453904);}else{if(!_0x9c7c2){const _0x55e48e=this['getAllMarkersForId'](_0x453904);_0xda8155['model']['change'](_0x1178d6=>{for(const _0x12ab41 of _0x55e48e)_0x1178d6['removeMarker'](_0x12ab41);});}}}}):_0xda8155['editing']['view']['once']('render',()=>{if(_0x33b3eb['getCommentThread'](_0x453904))return;const _0x2ce853=_0xda8155['plugins']['get'](oi);_0x9c7c2=_0x33b3eb['openNewCommentThread']({'channelId':_0x121276,'threadId':_0x453904,'target':()=>this['_getTargetForId'](_0x453904),'context':{'type':'text','value':this['_getTextContext'](_0x453904)}});const _0x4817c6=_0x33b3eb['_threadToController']['get'](_0x9c7c2)['view'],_0x4add94=_0x2ce853['getByInnerView'](_0x4817c6);_0x4add94&&_0x5a4df4['registerAnnotation'](_0x4add94);},{'priority':'low'})),_0x9c7c2;}['_handleThreadMarker'](_0x64700d,_0x28d1e9){const _0x5da9cf=this['_attachMarkerToThread'](_0x64700d,_0x28d1e9);_0x5da9cf&&!_0x5da9cf['context']&&_0x5da9cf['setContext']({'type':'text','value':this['_getTextContext'](_0x28d1e9)});}_initAriaMarkerChangeAnnouncements(){const _0x5cd6f0=this['editor'];_0x1e3862(_0x5cd6f0['model'],({left:_0xc6d580,entered:_0x576256})=>{for(const _0x110176 of _0xc6d580)if(Ii(_0x110176)){_0x5cd6f0['ui']['ariaLiveAnnouncer']['announce'](Rt(_0x5cd6f0['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x119c4a of _0x576256)if(Ii(_0x119c4a)){_0x5cd6f0['ui']['ariaLiveAnnouncer']['announce'](Rt(_0x5cd6f0['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x3db22c(_0xc4f94a)));break;}});}};function Ci(_0x40134b,_0x1ae4dd){return _0x1ae4dd?_0x40134b+':'+_0x1ae4dd:_0x40134b;}function Ti(_0x3850af,_0x25a383){const _0xca0ad2=_0x25a383['schema'],_0x1422b4=_0x25a383['createRange'](_0x3850af['start']);for(const _0x38df0c of _0x3850af['getWalker']()){const {type:_0x5ed6aa,item:_0x5500bc,nextPosition:_0x1915c7}=_0x38df0c;if('text'===_0x5ed6aa||_0xca0ad2['isObject'](_0x5500bc)){const _0x359d42=_0x25a383['createPositionBefore'](_0x5500bc);_0x1422b4['isCollapsed']&&(_0x1422b4['start']=_0x359d42),_0x1422b4['end']=_0x1915c7;}}return _0x1422b4;}function Ii(_0x391852){return'comment'===Ai(_0x391852['name'])['group'];}var bi=class extends _0x36fb8a{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[di,yi,pi,oi];}get CommentsListView(){return Ut;}get CommentThreadInputView(){return Bt;}init(){const _0xaba3aa=this['editor'],_0x52c79d=_0xaba3aa['plugins']['get'](di),_0x3b4971=_0xaba3aa['plugins']['get'](yi),_0x4ffe70=_0xaba3aa['plugins']['get'](oi),_0x4389af=_0xaba3aa['plugins']['get'](pi);_0xaba3aa['ui']['componentFactory']['add']('comment',()=>{const _0x2adf43=this['_createUIButton'](_0x997752);return _0x2adf43['tooltip']=!0x0,_0x2adf43;}),_0xaba3aa['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ct)),_0x4389af['addSourceCollector'](()=>{const _0x323f90=[];for(const [_0x541cdd,_0x1e13d9]of _0x52c79d['_threadToController']){const _0x443e1c=_0x3b4971['getAllMarkersForId'](_0x541cdd['id']),_0x317940=_0x443e1c['map'](_0x404b25=>_0x404b25['getRange']());_0x443e1c['length']>0x0&&_0x323f90['push']([_0x1e13d9['view'],_0x317940]);}return _0x323f90;}),this['listenTo'](_0x4ffe70,'change:activeAnnotations',(_0x10540e,_0x32043c,_0x396417)=>{const _0x49a8c1=Array['from'](_0x396417)['map'](_0xcf3a82=>_0xcf3a82['innerView'])['find'](_0x14f8b1=>_0x52c79d['_viewToController']['has'](_0x14f8b1));if(!_0x49a8c1)return void(_0x3b4971['activeMarker']=null);const _0x54a341=_0x52c79d['_viewToController']['get'](_0x49a8c1)['model']['id'],_0x4b7732='comment:'+_0x54a341;_0x54a341&&_0x3b4971['hasMarkerForId'](_0x54a341)?_0x3b4971['activeMarker']=_0x4b7732:_0x3b4971['activeMarker']&&(_0x3b4971['activeMarker']=null);}),this['listenTo'](_0x52c79d,'removeCommentThread',(_0x4f29a2,{threadId:_0x459357,isFromAdapter:_0x3d4eac})=>{!_0x3d4eac&&_0xaba3aa['ui']['focusTracker']['isFocused']&&_0x3b4971['hasMarkerForId'](_0x459357)&&_0xaba3aa['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x52c79d,'addComment',(_0x2495b6,{threadId:_0x56bebe,isFromAdapter:_0xf0e6b2})=>{!_0xf0e6b2&&_0x3b4971['hasMarkerForId'](_0x56bebe)&&_0x52c79d['hasCommentThread'](_0x56bebe)&&0x1===_0x52c79d['getCommentThread'](_0x56bebe)['length']&&(_0xaba3aa['editing']['view']['focus'](),_0x2495b6['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x4c8744=[this['editor']];for(const _0x38e25b of _0x4c8744){let _0x34dfa0;for(const _0x2130d6 in _0x38e25b){const _0x6ef33d=_0x2130d6,_0x293536=_0x38e25b[_0x6ef33d];if('commentsLicenseKeyValid'==_0x293536||'commentsLicenseKeyInvalid'==_0x293536||'commentsLicenseKeyExpired'==_0x293536||'commentsLicenseKeyDomainLimit'==_0x293536||'commentsLicenseKeyNotAllowed'==_0x293536||'commentsLicenseKeyEvaluationLimit'==_0x293536||'commentsLicenseKeyUsageLimit'==_0x293536){delete _0x38e25b[_0x6ef33d],_0x34dfa0=_0x293536,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x34dfa0&&_0x38e25b['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x34dfa0&&_0x38e25b['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x34dfa0&&_0x38e25b['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x34dfa0&&_0x38e25b['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x34dfa0&&_0x38e25b['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x34dfa0&&_0x38e25b['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x19aa06){const _0x4e392b=this['editor'],_0x3981b2=new _0x19aa06(_0x4e392b['locale']),_0x3d971b=_0x4e392b['commands']['get']('addCommentThread');return _0x3981b2['set']({'label':Rt(_0x4e392b['locale'],'Comment'),'icon':_0x3c6248}),_0x3981b2['bind']('isEnabled')['to'](_0x3d971b,'isEnabled',_0x3d971b,'hasContent',(_0x193d6c,_0x493d47)=>_0x193d6c&&_0x493d47),this['listenTo'](_0x3981b2,'execute',()=>{_0x3d971b['execute']();}),_0x3981b2;}},Ei=class extends _0x36fb8a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[yi];}constructor(_0x15ff7e){super(_0x15ff7e),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xc093f3,_0x2c1f50,_0x59bcab)=>{_0x59bcab?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x2f518c,_0x461216]of this['editor']['commands'])_0x461216['affectsData']&&'addCommentThread'!==_0x2f518c&&_0x461216['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 _0x24b531=this['editor']['editing']['view']['document'];this['listenTo'](_0x24b531,'cut',_0x4d87a4=>_0x4d87a4['stop'](),{'priority':'highest'}),this['listenTo'](_0x24b531,'clipboardInput',_0x54fe3e=>_0x54fe3e['stop'](),{'priority':'highest'}),this['listenTo'](_0x24b531,'delete',_0x221321=>_0x221321['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0xd042a1,_0xeb5453]of this['editor']['commands'])_0xeb5453['affectsData']&&'addCommentThread'!==_0xd042a1&&_0xeb5453['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']);}},ki=class extends _0x4388ae{activeUIs;uisData;['_uis'];static get requires(){return[oi];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54a342){super(_0x54a342),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x560688=this['context']['plugins']['get'](oi);this['listenTo'](_0x560688,'_activateAnnotation',(_0x35178b,_0x4d3c2f)=>{for(const _0x3ff310 of this['activeUIs']){const _0x1f7570=this['_uis']['get'](_0x3ff310);(0x0,this['uisData']['get'](_0x3ff310)['filter'])(_0x4d3c2f)&&_0x1f7570['setActiveAnnotation'](_0x4d3c2f);}}),this['listenTo'](_0x560688,'_deactivateAllAnnotations',()=>{for(const _0x42b809 of this['activeUIs'])this['_uis']['get'](_0x42b809)['setActiveAnnotation'](null);}),this['listenTo'](_0x560688['_visibleAnnotations'],'add',(_0x4a4f82,_0x3efd4f)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3efd4f);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x4e2314){return this['activeUIs']['has'](_0x4e2314);}activate(_0x118e1d,_0x1b0f00=this['defaultFilter']){const _0x9e5f8a=this['context']['plugins']['get'](oi);if(!this['_uis']['has'](_0x118e1d))throw new _0x288533('annotationsuis-missing-ui',this,{'uiName':_0x118e1d});this['isActive'](_0x118e1d)&&this['deactivate'](_0x118e1d),this['activeUIs']['add'](_0x118e1d);const _0x182072=new ei();si({'source':_0x9e5f8a['_visibleAnnotations'],'target':_0x182072,'filter':_0x1b0f00}),this['uisData']['set'](_0x118e1d,{'collection':_0x182072,'filter':_0x1b0f00});const _0xcee111=this['_uis']['get'](_0x118e1d);_0xcee111['attach'](_0x182072),this['listenTo'](_0xcee111,'change:activeAnnotation',(_0x3cc86d,_0x45d040,_0x244b6a,_0x3296db)=>{_0x3296db&&_0x9e5f8a['_removeActiveAnnotation'](_0x3296db),_0x244b6a&&_0x9e5f8a['_addActiveAnnotation'](_0x244b6a);});}deactivate(_0x144f80){if(this['activeUIs']['delete'](_0x144f80),!this['_uis']['has'](_0x144f80))throw new _0x288533('annotationsuis-missing-ui',this,{'uiName':_0x144f80});const _0x26ad77=this['_uis']['get'](_0x144f80);_0x26ad77['detach'](),this['stopListening'](_0x26ad77),this['uisData']['get'](_0x144f80)['collection']['destroy'](),this['uisData']['delete'](_0x144f80);}switchTo(_0x122c28){if(!this['_uis']['has'](_0x122c28))throw new _0x288533('annotationsuis-missing-ui',this,{'uiName':_0x122c28});const _0x47c833=this['context']['plugins']['get'](oi),_0x368b0e=Array['from'](_0x47c833['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x122c28);const _0x502110=this['_uis']['get'](_0x122c28);_0x502110['setActiveAnnotation'](_0x368b0e),_0x502110['_setSelectedAnnotations']&&_0x368b0e&&_0x502110['_setSelectedAnnotations']([_0x368b0e]);}deactivateAll(){for(const _0x3d56ef of this['activeUIs'])this['deactivate'](_0x3d56ef);}register(_0x24bd72,_0x3529f5){if(this['_uis']['has'](_0x24bd72))throw new _0x288533('annotationsuis-register-already-registered');if('function'!=typeof _0x3529f5['attach']||'function'!=typeof _0x3529f5['detach']||'function'!=typeof _0x3529f5['setActiveAnnotation'])throw new _0x288533('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x24bd72,_0x3529f5);}refilterAnnotations(){const _0x5c4696=this['context']['plugins']['get'](oi)['collection'],_0x760ade=new Map(),_0x37101a=Array['from'](this['activeUIs']);for(const _0x1c36e7 of this['activeUIs']){const _0x4188ca=this['uisData']['get'](_0x1c36e7)['collection'];for(const _0x414c87 of _0x4188ca)_0x760ade['set'](_0x414c87,_0x1c36e7);}for(const _0x4f6a02 of _0x5c4696){const _0x27ca8f=_0x760ade['get'](_0x4f6a02);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4f6a02);const _0xfbb93b=_0x37101a['find'](_0x1c436c=>this['uisData']['get'](_0x1c436c)['filter'](_0x4f6a02));_0x27ca8f!==_0xfbb93b&&(_0x27ca8f&&this['uisData']['get'](_0x27ca8f)['collection']['remove'](_0x4f6a02),_0xfbb93b&&this['uisData']['get'](_0xfbb93b)['collection']['add'](_0x4f6a02));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x20fa3a){const _0x30f4ff=[];for(const _0x3c4436 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3c4436)['filter'])(_0x20fa3a)&&_0x30f4ff['push'](_0x3c4436);}if(_0x30f4ff['length']>0x1)throw new _0x288533('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x30f4ff,'annotationType':_0x20fa3a['type']});}};const Ni=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x4f11ba('px');var Oi=class extends lt{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x3d66be){super(_0x3d66be);const _0x507d84=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 _0x48a359(),this['focusCycler']=new ot({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x507d84['to']('class')],'style':{'minHeight':_0x507d84['to']('minHeight',_0x5d4aa9=>'number'==typeof _0x5d4aa9?Ni(_0x5d4aa9+0xa):null)},'dir':_0x3d66be['uiLanguageDirection'],'role':'application','aria-label':Rt(_0x3d66be,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Rt(_0x3d66be,'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',_0x3eb072=>{this['_updateItemPositionInFocusables'](_0x3eb072['source']);}),this['list']['forEach'](_0x5813df=>{this['focusTracker']['add'](_0x5813df['element']),this['_updateItemPositionInFocusables'](_0x5813df);}),this['list']['on']('change',(_0x5610e5,_0x54e5d3)=>{for(const _0x42a30e of _0x54e5d3['removed'])this['focusTracker']['remove'](_0x42a30e['element']),this['focusables']['remove'](_0x42a30e);for(const _0x3101d3 of _0x54e5d3['added'])this['focusTracker']['add'](_0x3101d3['element']),this['_updateItemPositionInFocusables'](_0x3101d3);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0xaaf33e){const _0xd66b2b=this['focusables']['getIndex'](_0xaaf33e);let _0x40ff17,_0x5414c6;for(const _0x2efe2e of this['focusables'])if(_0xaaf33e['top']<_0x2efe2e['top']){_0x40ff17=_0x2efe2e;break;}if(_0x5414c6=_0x40ff17?this['focusables']['getIndex'](_0x40ff17):this['focusables']['length'],-0x1!==_0xd66b2b){if(_0xd66b2b===_0x5414c6-0x1)return;this['focusables']['remove'](_0xaaf33e),_0x5414c6=_0x40ff17?this['focusables']['getIndex'](_0x40ff17):this['focusables']['length'];}this['focusables']['add'](_0xaaf33e,_0x5414c6);}};const Mi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x4f11ba('px');var Ri=class extends lt{content;_targetTop;_mutationObserver;constructor(_0x48dbcc){super(_0x48dbcc),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x12b5f3,_0x23e409)=>_0x12b5f3+_0x23e409),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Jt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1ee19b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1ee19b['to']('isAnimationDisabled',_0x574e0f=>_0x574e0f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1ee19b['to']('top',_0x40c6b5=>Mi(_0x40c6b5))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x120bc6=this['element']['clientHeight'];_0x120bc6&&(this['height']=_0x120bc6);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},Si=class extends _0x4388ae{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35ba4b){super(_0x35ba4b),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 _0x31ce15=this['context']['config']['get']('sidebar.container');_0x31ce15&&this['setContainer'](_0x31ce15);}setContainer(_0x5a6480){if(!Pi(_0x5a6480))throw new _0x288533('sidebar-setcontainer-invalid-element');this['container']=_0x5a6480;}_attachToContainer({viewClass:_0x3017a2='',spaceBetweenItems:_0x508fb3=0x19}={}){if(!Pi(this['container']))throw new _0x288533('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3017a2,this['_spaceBetweenItems']=_0x508fb3;}['rearrange']({removedAnnotation:_0xb8f777,previousAnnotation:_0xf9d948,nextAnnotation:_0xfd1fa7}){const _0x1791a7=this['getSidebarItemView'](_0xb8f777);this['view']['list']['remove'](_0x1791a7),this['_destroySidebarItemView'](_0xb8f777),_0xf9d948&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xf9d948)),_0xfd1fa7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xfd1fa7)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x503881,activatedAnnotation:_0x274305,disableAnimationOnActivatedAnnotation:_0x412fbe}){if(this['_activeAnnotation']=_0x274305,_0x503881){_0x503881['isActive']=!0x1;const _0x4df64b=this['getSidebarItemView'](_0x503881);_0x4df64b&&_0x412fbe&&(_0x4df64b['isAnimationDisabled']=!0x1);}if(_0x274305){const _0x1e1801=this['getSidebarItemView'](_0x274305);_0x1e1801&&(_0x274305['isActive']=!0x0,_0x412fbe&&(_0x1e1801['isAnimationDisabled']=!0x0,_0x1e1801['top']+=0x1),this['_alignToTargetRect'](_0x1e1801));}}_detachFromContainer(_0x2b369a){if(this['view']['element']['remove'](),_0x2b369a){for(const _0x5d6a3e of _0x2b369a)this['_destroySidebarItemView'](_0x5d6a3e);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0xdccb95,_0x31fa7d){_0x31fa7d||(_0x31fa7d=_0xdccb95['view']);const _0x1c3ab7=new Ri(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1c3ab7,_0xdccb95),this['_annotationToSidebarItemView']['set'](_0xdccb95,_0x1c3ab7),_0x1c3ab7['content']['add'](_0x31fa7d),this['listenTo'](_0xdccb95['view'],'change:targetRect',(_0x438670,_0x2bb6e2,_0x2031ba)=>{const _0x1508db=this['_getTargetTop'](_0xdccb95,_0x2031ba);_0x1c3ab7['_targetTop']!=_0x1508db&&(_0x1c3ab7['_targetTop']=_0x1508db,this['_setItemTop'](_0x1c3ab7,_0x1508db));}),this['listenTo'](_0x1c3ab7,'change:top',()=>{this['_recalculate'](_0x1c3ab7,'top');}),this['listenTo'](_0x1c3ab7,'change:bottom',()=>{this['_recalculate'](_0x1c3ab7,'bottom');}),this['_alignToTargetRect'](_0x1c3ab7);const _0xf8c21e=this['_getItemBefore'](_0x1c3ab7);return _0xf8c21e&&this['_alignAfterItem'](_0xf8c21e,_0x1c3ab7)||this['_alignToTargetRect'](_0x1c3ab7),this['_updateLastItem'](),this['view']['list']['add'](_0x1c3ab7),_0x1c3ab7;}['_alignForTopChange'](_0x3a66c2){if(!_0x3a66c2['content']['length'])return;const _0x55eb3f=this['_getItemBefore'](_0x3a66c2);if(!_0x55eb3f)return;const _0x3a0f41=this['_sidebarItemViewToAnnotation']['get'](_0x55eb3f),_0x26ab1d=this['_activeAnnotation'];_0x26ab1d&&_0x26ab1d===_0x3a0f41?this['_alignAfterItem'](_0x55eb3f,_0x3a66c2):this['_alignBeforeItem'](_0x3a66c2,_0x55eb3f);}_alignForBottomChange(_0x562975){if(!_0x562975['content']['length'])return;const _0x37ec37=this['_getItemAfter'](_0x562975);if(!_0x37ec37)return;const _0x305357=this['_sidebarItemViewToAnnotation']['get'](_0x37ec37),_0x4c28e0=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x49bf18=this['_activeAnnotation'];_0x49bf18&&_0x49bf18===_0x305357&&_0x4c28e0?(this['_alignBeforeItem'](_0x37ec37,_0x562975),this['_alignAfterItem'](_0x562975,_0x37ec37)):_0x49bf18&&_0x49bf18===_0x305357?this['_alignBeforeItem'](_0x37ec37,_0x562975):this['_alignAfterItem'](_0x562975,_0x37ec37);}_recalculate(_0x562bb0,_0xf557aa){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x98a1d4,changedProp:_0x50fcff}of this['_recalculateBuffer'])'top'===_0x50fcff?this['_alignForTopChange'](_0x98a1d4):this['_alignForBottomChange'](_0x98a1d4);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x562bb0,'changedProp':_0xf557aa});}getSidebarItemView(_0x45316c){return this['_annotationToSidebarItemView']['get'](_0x45316c);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x9dedaa){const _0x52299f=this['getSidebarItemView'](_0x9dedaa);this['stopListening'](_0x52299f),this['stopListening'](_0x9dedaa['view']),_0x52299f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x9dedaa),this['_sidebarItemViewToAnnotation']['delete'](_0x52299f);}_createSidebarView(){const _0xaa7379=new Oi(this['context']['locale']);return _0xaa7379['render'](),this['on']('change:_lastItem',(_0x20eb19,_0x5ba3de,_0x4968e8,_0x3259c8)=>{_0x3259c8&&_0xaa7379['unbind']('minHeight'),_0x4968e8?_0xaa7379['bind']('minHeight')['to'](_0x4968e8,'bottom'):_0xaa7379['minHeight']=null;}),_0xaa7379;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x288c01){const _0x321464=this['_sidebarItemViewToAnnotation']['get'](_0x288c01),_0x408629=_0x321464&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x321464)-0x1);return _0x408629&&this['getSidebarItemView'](_0x408629)||null;}_getItemAfter(_0xccc8e4){const _0x57ce43=this['_sidebarItemViewToAnnotation']['get'](_0xccc8e4),_0x2c00b0=_0x57ce43&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x57ce43)+0x1);return _0x2c00b0&&this['getSidebarItemView'](_0x2c00b0)||null;}_alignBeforeItem(_0x5c3538,_0x381a5c){_0x5c3538['updateHeight']();const _0x3cbbdc=xi(_0x381a5c['bottom']+this['_spaceBetweenItems'],_0x5c3538['top']);return!!_0x3cbbdc&&(this['_setItemTop'](_0x381a5c,_0x381a5c['top']-_0x3cbbdc),!0x0);}_alignAfterItem(_0x5c9606,_0x53f2bd){_0x5c9606['updateHeight']();const _0x5a6648=xi(_0x5c9606['bottom']+this['_spaceBetweenItems'],_0x53f2bd['top']);return!!_0x5a6648&&(this['_setItemTop'](_0x53f2bd,_0x53f2bd['top']+_0x5a6648,!0x1),!0x0);}_alignToTargetRect(_0x370fd3){const _0x3ba10d=this['_sidebarItemViewToAnnotation']['get'](_0x370fd3);if(!_0x3ba10d||!_0x3ba10d['target']||!_0x3ba10d['targetRect'])return;const _0x445978=this['_getTargetTop'](_0x3ba10d,_0x3ba10d['targetRect']);this['_setItemTop'](_0x370fd3,_0x445978);}_getTargetTop(_0x3c48c7,_0xf1fdd3){if(null===_0xf1fdd3)return 0x0;if(_0x3c48c7['target']instanceof _0xcec7af)return _0xf1fdd3['top'];{const _0x3f94c5=new _0xcec7af(this['view']['element'])['top'];return _0xf1fdd3['top']-_0x3f94c5;}}_setItemTop(_0xeec9c0,_0x394245,_0x6619ad=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x6619ad&&(_0x394245=Math['max'](_0x394245,this['_getMaxAvailableTop'](_0xeec9c0))),_0xeec9c0['top']=_0x394245;}_getMaxAvailableTop(_0x163619){let _0x9448b=this['_getItemBefore'](_0x163619),_0x42e250=0x0;for(;_0x9448b;)_0x9448b['updateHeight'](),_0x42e250+=this['_spaceBetweenItems']+_0x9448b['height'],_0x9448b=this['_getItemBefore'](_0x9448b);return _0x42e250;}};function xi(_0x5537ef,_0x16302a){return Math['max'](_0x5537ef-_0x16302a,0x0);}function Pi(_0x1c3c23){return null!==_0x1c3c23&&'object'==typeof _0x1c3c23&&0x1===_0x1c3c23['nodeType'];}var Li=class extends _0x4388ae{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[Si,ki];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e3485){super(_0x1e3485),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xc802da(),this['_refreshPositioningDebounced']=_0x423b2b(()=>{_0x1e3485['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x50d2dd=this['context']['plugins']['get'](ki),_0x4a0d74=this['context']['plugins']['get'](Si);_0x50d2dd['register']('wideSidebar',this),_0x4a0d74['container']&&_0x50d2dd['switchTo']('wideSidebar');}setActiveAnnotation(_0x1173b4){if(_0x1173b4===this['activeAnnotation'])return;const _0x1436ab=this['context']['plugins']['get'](Si);_0x1436ab['_activeAnnotation']=_0x1173b4;const _0x30925e=this['activeAnnotation'];_0x1436ab['refresh']({'blurredAnnotation':_0x30925e,'activatedAnnotation':_0x1173b4}),this['activeAnnotation']=_0x1173b4;}attach(_0x433c47){this['annotations']=_0x433c47;const _0x4cb677=this['context']['plugins']['get'](Si);if(_0x4cb677['_annotations']=_0x433c47,this['isAttached'])throw new _0x288533('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4cb677,'set:container',()=>{this['detach'](),this['listenTo'](_0x4cb677,'change:container',_0x48cba5=>{_0x48cba5['off'](),this['attach'](_0x433c47);});}),_0x4cb677['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3d6399=_0x2de0b2=>{_0x2de0b2['updateTargetRect'](),_0x4cb677['addAnnotation'](_0x2de0b2);};for(const _0x10b078 of _0x433c47)_0x3d6399(_0x10b078);this['listenTo'](_0x433c47,'add',(_0x220d16,_0x4314a6)=>{_0x3d6399(_0x4314a6);}),this['listenTo'](_0x433c47,'remove',(_0x32d065,_0xb88284,_0x5a6fe5)=>{_0x4cb677['rearrange']({'removedAnnotation':_0xb88284,'previousAnnotation':_0x433c47['get'](_0x5a6fe5-0x1),'nextAnnotation':_0x433c47['get'](_0x5a6fe5+0x1)}),_0xb88284===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x433c47,'focus',(_0x51906e,_0x5ebab9)=>{this['setActiveAnnotation'](_0x5ebab9);}),this['listenTo'](_0x433c47,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2fa473=this['context']instanceof _0x39482e?this['context']['editors']:new _0xc802da([this['context']]);for(const _0x3d6346 of _0x2fa473)this['_integrateWithEditorAnnotations'](_0x3d6346);this['listenTo'](_0x2fa473,'add',(_0x34dbdd,_0x5683ff)=>{this['listenTo'](_0x5683ff,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5683ff);});}),this['listenTo'](_0x2fa473,'remove',(_0x6e108c,_0x122031)=>{_0x122031['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x122031['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x288533('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x22cbbc=this['context']['plugins']['get'](Si);_0x22cbbc['_detachFromContainer'](this['annotations']),this['stopListening'](_0x22cbbc),this['stopListening'](this['annotations']),this['context']instanceof _0x39482e&&this['stopListening'](this['context']['editors']);for(const _0x211bd7 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x211bd7);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x5d3eb3){if(!_0x5d3eb3['plugins']['has']('EditorAnnotations'))return;const _0x5402e2=_0x5d3eb3['plugins']['get']('EditorAnnotations'),_0x5e888f=()=>{const _0x2edde3=_0x5402e2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2edde3[0x0]||null);};this['listenTo'](_0x5402e2,'refresh',_0x5e888f),this['listenTo'](_0x5402e2,'blur',(_0x17ccf5,{isAnnotationTracked:_0x40dd29})=>{this['activeAnnotation']&&_0x40dd29(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5402e2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x13fe06=>{_0x5402e2['hasDomSelection']()&&(_0x5e888f(),_0x13fe06['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5402e2);}_destroyEditorAnnotationsIntegration(_0x3a81d5){this['stopListening'](_0x3a81d5),this['_editorAnnotations']['remove'](_0x3a81d5);}},Di=class extends _0x997752{counterView;constructor(_0x65d058){super(_0x65d058);const _0x103407=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x30a84a,_0x4a9145)=>_0x30a84a?'...':_0x4a9145['toString']()),this['set']('annotationType',''),this['icon']=_0x3c6248,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new lt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x103407['to']('annotationType',_0x53784e=>'ck-annotation-counter__badge--'+_0x53784e),_0x103407['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x103407['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Vi=class extends _0x4388ae{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[Si,ki];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x275efd){super(_0x275efd),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x669e48())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xc802da(),this['_refreshPositioningDebounced']=_0x423b2b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](ki)['register']('narrowSidebar',this),this['_overlayHost']=new dt(this['context']['locale'],{'resolveMountTarget':()=>this['_resolveOverlayTarget'](),'resolveInlineContainer':()=>this['context']['plugins']['get'](Si)['container']}),this['_overlayHost']['sync'](),this['bodyCollection']=this['_overlayHost']['bodyCollection'],this['balloonPanelView']=new _0x1ffea2(this['context']['locale']),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x2f7865){this['annotations']=_0x2f7865;const _0x4a2ff5=this['context']['plugins']['get'](Si),_0x164a9d=this['balloonPanelView'];if(_0x4a2ff5['_annotations']=_0x2f7865,this['isAttached'])throw new _0x288533('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4a2ff5,'set:container',()=>{this['detach'](),this['listenTo'](_0x4a2ff5,'change:container',_0x3584da=>{_0x3584da['off'](),this['attach'](_0x2f7865);});}),_0x4a2ff5['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5}),this['_overlayHost']['sync']();const _0x5c4543=_0x39a19b=>{const _0x388107=new Di(this['context']['locale']);_0x4a2ff5['addAnnotation'](_0x39a19b,_0x388107),this['_annotationToNarrowView']['set'](_0x39a19b,_0x388107),_0x388107['bind']('isDirty','annotationType','number')['to'](_0x39a19b['view'],'isDirty','type','length'),_0x388107['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x164a9d['content']['first']!==_0x39a19b['view']?(this['_showBalloon'](_0x39a19b),_0x39a19b['view']['element']['focus'](),this['setActiveAnnotation'](_0x39a19b)):this['setActiveAnnotation'](null);});};for(const _0x51f36c of _0x2f7865)_0x5c4543(_0x51f36c);this['listenTo'](_0x2f7865,'add',(_0x3546d8,_0x32b52c)=>{_0x5c4543(_0x32b52c);}),this['listenTo'](_0x2f7865,'remove',(_0x4c1424,_0x3ccc61,_0x243194)=>{this['_annotationToNarrowView']['get'](_0x3ccc61)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3ccc61),_0x4a2ff5['rearrange']({'removedAnnotation':_0x3ccc61,'previousAnnotation':_0x2f7865['get'](_0x243194-0x1),'nextAnnotation':_0x2f7865['get'](_0x243194+0x1)}),_0x3ccc61===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2f7865,'focus',(_0x231be7,_0x2526fd)=>{this['setActiveAnnotation'](_0x2526fd);}),this['listenTo'](_0x2f7865,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4bd217,_0xf40e05)=>{_0xf40e05['keyCode']===_0x1b5069['esc']&&_0x164a9d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x164a9d['content']['first']),this['_hideBalloon'](),_0xf40e05['stopPropagation'](),_0xf40e05['preventDefault']());}),ut({'emitter':this['_domEmitter'],'activator':()=>_0x164a9d['isVisible']&&!this['_hasEditorDomSelection'](),'contextElements':()=>{const _0x2f0245=[_0x4a2ff5['view']['element']];return _0x164a9d['isVisible']&&_0x2f0245['push'](_0x164a9d['element']),this['activeAnnotation']&&_0x2f0245['push'](...this['activeAnnotation']['focusableElements']),_0x2f0245;},'callback':()=>{this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null);}});const _0x5e6c2d=this['context']instanceof _0x39482e?this['context']['editors']:new _0xc802da([this['context']]);for(const _0xd50597 of _0x5e6c2d)this['_integrateWithEditorAnnotations'](_0xd50597);this['listenTo'](_0x5e6c2d,'add',(_0x2b9cb3,_0x2c93ea)=>{this['listenTo'](_0x2c93ea,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2c93ea);});}),this['listenTo'](_0x5e6c2d,'remove',(_0x2b7677,_0x25cf26)=>{_0x25cf26['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x25cf26['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x56fd08){if(_0x56fd08===this['activeAnnotation'])return;const _0x38ddc1=this['context']['plugins']['get'](Si);_0x38ddc1['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x56fd08,'disableAnimationOnActivatedAnnotation':!0x0}),_0x56fd08&&_0x38ddc1['getSidebarItemView'](_0x56fd08)?this['_showBalloon'](_0x56fd08):this['_hideBalloon'](),this['activeAnnotation']=_0x56fd08;}detach(){if(!this['isAttached'])throw new _0x288533('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x486296=this['context']['plugins']['get'](Si);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x212df5=>_0x212df5['destroy']()),this['_annotationToNarrowView']['clear'](),_0x486296['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x39482e&&this['stopListening'](this['context']['editors']);for(const _0x436473 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x436473);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_overlayHost']['destroy']();}_integrateWithEditorAnnotations(_0x329f4d){if(!_0x329f4d['plugins']['has']('EditorAnnotations'))return;const _0x4a3e83=_0x329f4d['plugins']['get']('EditorAnnotations'),_0x36b1dd=this['context']['plugins']['get'](Si),_0x442009=this['annotations'],_0x15a0c4=this['balloonPanelView'],_0x41d7a3=()=>{const _0x31882f=_0x4a3e83['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x31882f),this['setActiveAnnotation'](_0x31882f[0x0]||null);};this['listenTo'](_0x4a3e83,'refresh',_0x41d7a3),this['listenTo'](_0x4a3e83,'blur',(_0x1af577,{isAnnotationTracked:_0x190961})=>{this['activeAnnotation']&&_0x190961(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4a3e83,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x442009,'blur',_0x196585=>{_0x4a3e83['hasDomSelection']()&&_0x196585['stop']();},{'priority':'high'}),ut({'emitter':this['_domEmitter'],'activator':()=>!!this['activeAnnotation'],'contextElements':()=>{const _0x13849d=[_0x36b1dd['view']['element']];return _0x15a0c4['isVisible']&&_0x13849d['push'](_0x15a0c4['element']),_0x13849d;},'callback':()=>{_0x4a3e83['hasDomSelection']()&&_0x41d7a3();}}),this['_editorAnnotations']['add'](_0x4a3e83),this['_overlayHost']['sync']();}_destroyEditorAnnotationsIntegration(_0x1023c7){_0x1023c7&&(this['stopListening'](_0x1023c7),this['_editorAnnotations']['remove'](_0x1023c7));}_hasEditorDomSelection(){return Array['from'](this['_editorAnnotations'])['some'](_0x538ee0=>_0x538ee0['hasDomSelection']());}_setSelectedAnnotations(_0x48c46c){for(const _0x47ede3 of this['_selectedAnnotations'])_0x48c46c['includes'](_0x47ede3)||this['_manuallyClosedAnnotationViews']['delete'](_0x47ede3['view']);this['_selectedAnnotations']=_0x48c46c;}_refreshPositioning(){const _0x1afe3f=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1afe3f['isVisible']&&this['_updateBalloonPosition']();}_resolveOverlayTarget(){const _0x339a3b=this['context']['config']['get']('sidebar.overlayContainer')||this['context']['config']['get']('ui.overlayContainer');if(_0x339a3b)return _0x339a3b;const _0x3fa3d2=this['context']['plugins']['get'](Si)['container'];return _0x3fa3d2?_0xd17c16(_0x3fa3d2):null;}['_showBalloon'](_0x43b633){if(this['_manuallyClosedAnnotationViews']['has'](_0x43b633['view']))return;const _0x44ebdb=this['balloonPanelView']['content']['first'];_0x44ebdb!==_0x43b633['view']?(_0x44ebdb&&this['_detachListeners'](_0x44ebdb),this['_overlayHost']['sync'](),this['_attachListeners'](_0x43b633['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x43b633['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x5df3e2=this['balloonPanelView']['content']['first'],_0x57c285=_0x5df3e2&&this['annotations']['getByView'](_0x5df3e2);if(!_0x57c285||!this['_annotationToNarrowView']['has'](_0x57c285))return;const _0x4b128e=this['_annotationToNarrowView']['get'](_0x57c285)['element'],_0x3db51a=(function(){const _0xb02315=_0x1ffea2['defaultPositions'];return[_0xb02315['southArrowNorthEast'],_0xb02315['northArrowSouthEast'],_0xb02315['southArrowNorth'],_0xb02315['northArrowSouth'],_0xb02315['southArrowNorthWest'],_0xb02315['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4b128e,'positions':_0x3db51a});}['_hideBalloon'](){const _0x9710ed=this['balloonPanelView'],_0x3e09b0=_0x9710ed['content']['first'];_0x3e09b0&&(this['_detachListeners'](_0x3e09b0),_0x9710ed['unpin'](),_0x9710ed['content']['clear']());}_attachListeners(_0x1a8c25){this['listenTo'](_0x1a8c25,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1a8c25,'Esc',(_0x2007ea,_0x3f62fd)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1a8c25),this['_hideBalloon'](),_0x3f62fd();});}_detachListeners(_0x576f19){this['stopListening'](_0x576f19);}},Bi=class extends _0x36fb8a{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[pi,tt,ki];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x234c28){super(_0x234c28),_0x234c28['editing']['view']['addObserver'](wt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x234c28['plugins']['get'](tt),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x423b2b(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x1e2c54=this['editor']['plugins']['get'](ki);_0x1e2c54['context']===this['editor']&&(_0x1e2c54['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xfb0696,_0x4d4a7d)=>{const _0x111c42=this['_balloon'];if(this['isAttached']&&_0x111c42['visibleView']){const _0x40984f=this['annotations']['getByView'](_0x111c42['visibleView']);_0x40984f&&this['_closeAnnotation'](_0x40984f),_0x4d4a7d();}}));}afterInit(){const _0xa84955=this['editor']['plugins']['get'](ki);_0xa84955['context']===this['editor']&&(_0xa84955['hasActive']()||_0xa84955['switchTo']('inline'));}setActiveAnnotation(_0x74977d){_0x74977d!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x74977d&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x74977d)&&this['_addAnnotationToBalloon'](_0x74977d,!0x0),_0x74977d['isActive']=!0x0),_0x74977d||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x74977d);}attach(_0x49bd7f){this['annotations']=_0x49bd7f;const _0x58c7cb=this['editor']['plugins']['get'](ki),_0x8e6a18=this['_balloon'];if(this['isAttached'])throw new _0x288533('inlineannotations-attach-already-attached',this);if(_0x58c7cb['context']!==this['editor'])throw new _0x288533('inlineannotations-not-allowed-with-context',this);const _0x2eb347=this['editor']['plugins']['get'](pi);this['listenTo'](_0x2eb347,'refresh',()=>{const _0x2b9e02=_0x2eb347['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x500e53,_0x13ddf9;!this['_forceRefresh']&&(_0x500e53=_0x2b9e02,_0x13ddf9=this['_selectedAnnotations'],_0x500e53['length']===_0x13ddf9['length']&&_0x500e53['every'](_0x2925a1=>_0x13ddf9['includes'](_0x2925a1)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2b9e02),this['setActiveAnnotation'](_0x2b9e02[0x0]||null));}),this['listenTo'](_0x2eb347,'blur',(_0x23e384,{isAnnotationTracked:_0x39b326})=>{this['activeAnnotation']&&_0x39b326(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2eb347,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3ea5df,_0x4d2ed5,_0x2bff84)=>{_0x2bff84||this['setActiveAnnotation'](null);}),this['listenTo'](_0x49bd7f,'remove',(_0x3898dd,_0x21e769)=>{this['_removeAnnotationFromBalloon'](_0x21e769),_0x21e769===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x8e6a18,'change:visibleView',(_0x580087,_0x5cddd5,_0x452693,_0x521730)=>{_0x521730&&this['stopListening'](_0x521730);const _0x15cc95=_0x49bd7f['getByView'](_0x452693);_0x452693&&_0x15cc95&&(this['listenTo'](_0x452693,'change:height',()=>{_0x8e6a18['updatePosition']();}),this['listenTo'](_0x452693,'Esc',()=>{this['_closeAnnotation'](_0x15cc95),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x15cc95&&this['setActiveAnnotation'](_0x15cc95));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x8e6a18['visibleView']&&_0x49bd7f['getByView'](_0x8e6a18['visibleView'])&&_0x8e6a18['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 _0x288533('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x273bc1 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x273bc1);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0xdcf889){for(const _0x132a6d of this['_selectedAnnotations'])_0xdcf889['includes'](_0x132a6d)||this['_manuallyClosed']['delete'](_0x132a6d);for(const _0x94c46c of this['annotations'])_0xdcf889['includes'](_0x94c46c)||this['_removeAnnotationFromBalloon'](_0x94c46c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x31aecd of _0xdcf889)this['_addAnnotationToBalloon'](_0x31aecd);}this['_selectedAnnotations']=_0xdcf889;}_addAnnotationToBalloon(_0x5b0d4f,_0x348a04=!0x1){this['_manuallyClosed']['has'](_0x5b0d4f)||(this['_addedAnnotations']['has'](_0x5b0d4f)||this['_balloon']['hasView'](_0x5b0d4f['view'])||(this['_addedAnnotations']['add'](_0x5b0d4f),this['_balloon']['add']({'stackId':_0x5b0d4f['view']['id'],'view':_0x5b0d4f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5b0d4f)}})),_0x348a04&&this['_balloon']['showStack'](_0x5b0d4f['view']['id']));}_getBalloonTargetForAnnotation(_0x342cfd){const _0x4688ba=_0x342cfd['target'],_0x35a9b2=this['editor']['editing']['view'],_0x3dbbb7=_0x35a9b2['document']['selection']['getFirstRange'](),_0x3fe29b=_0x35a9b2['domConverter']['viewRangeToDom'](_0x3dbbb7);if(_0x3fe29b['collapse'](!0x0),_0x4688ba){if(_0x4688ba instanceof _0xcec7af)return _0x4688ba;let _0x3bf1c3=[];for(const _0x3974cb of _0x4688ba)_0x3bf1c3['push'](..._0xcec7af['getDomElementRects'](_0x3974cb));_0x3bf1c3=function(_0x48156c){const _0x18e912=[];let _0x53c37f=_0x48156c[0x0];for(let _0x198b76=0x1;_0x198b76<_0x48156c['length'];_0x198b76++)if(Hi(_0x53c37f,_0x48156c[_0x198b76])){const _0x11a7c7=_0x48156c[_0x198b76]['width'];_0x53c37f['width']+=_0x11a7c7,_0x53c37f['right']+=_0x11a7c7;}else _0x18e912['push'](_0x53c37f),_0x53c37f=_0x48156c[_0x198b76];return _0x18e912['push'](_0x53c37f),_0x18e912;}(_0x3bf1c3);const _0x4fad0e=_0x3fe29b['getBoundingClientRect']();return _0x3bf1c3['find'](_0x45d6d7=>_0x45d6d7['top']<=_0x4fad0e['top']&&_0x45d6d7['bottom']>=_0x4fad0e['bottom']&&_0x45d6d7['left']<=_0x4fad0e['left']&&_0x45d6d7['right']>=_0x4fad0e['right'])||_0x3bf1c3[0x0];}return _0x342cfd['targetRect']||_0x3fe29b;}_removeAnnotationFromBalloon(_0x137767){this['_addedAnnotations']['has'](_0x137767)&&this['_balloon']['hasView'](_0x137767['view'])&&(this['_addedAnnotations']['delete'](_0x137767),this['_balloon']['remove'](_0x137767['view']));}_closeAnnotation(_0x4f0db5){this['_manuallyClosed']['add'](_0x4f0db5),this['_removeAnnotationFromBalloon'](_0x4f0db5);}};function Hi(_0x51767f,_0xe75380){return _0x51767f['top']===_0xe75380['top']&&_0x51767f['bottom']===_0xe75380['bottom']&&_0x51767f['right']===_0xe75380['left'];}var Ui=class extends lt{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x975225,_0x5d9aa1){super(_0x975225),this['set']('isEmpty',!_0x5d9aa1['length']),this['focusTracker']=new _0x48a359(),this['_annotationViews']=_0x5d9aa1,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new ot({'focusables':_0x5d9aa1,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5d9aa1,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5d9aa1,'remove',(_0x50e0d9,_0x40fc34)=>{_0x40fc34['isActive']&&this['focus'](),_0x5d9aa1['length']||(this['isEmpty']=!0x0);});const _0x251564=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Rt(_0x975225,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5d9aa1},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x251564['if']('isEmpty','ck-hidden',_0x3016d3=>!_0x3016d3)]},'children':[{'text':Rt(_0x975225,'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 _0x581d3d of this['_annotationViews'])this['focusTracker']['add'](_0x581d3d['element']);this['_annotationViews']['on']('change',(_0xbf08d,{added:_0x3217ce,removed:_0x160956})=>{for(const _0x4e3385 of _0x3217ce)this['focusTracker']['add'](_0x4e3385['element']);for(const _0x47d071 of _0x160956)this['focusTracker']['remove'](_0x47d071['element']);});}},Fi=class extends _0x4388ae{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[di,oi];}constructor(_0x470c3c){super(_0x470c3c),this['archivedThreads']=new _0xc802da();}init(){const _0x12d781=this['context'],_0x4dc01d=_0x12d781['plugins']['get'](di),_0x1cd38b=_0x12d781['plugins']['get'](oi);this['listenTo'](_0x4dc01d,'addCommentThread',(_0xcfd4a4,{threadId:_0x5b6b08})=>{const _0x146141=_0x4dc01d['getCommentThread'](_0x5b6b08);_0x146141['archivedAt']&&this['archivedThreads']['add'](_0x146141,this['_calculatePosition'](_0x146141['archivedAt'])),this['listenTo'](_0x146141,'change:archivedAt',(_0x3de104,_0x5498ff,_0x28e14c)=>{_0x28e14c?this['archivedThreads']['has'](_0x146141)||this['archivedThreads']['add'](_0x146141,this['_calculatePosition'](_0x146141['archivedAt'])):this['archivedThreads']['has'](_0x146141)&&this['archivedThreads']['remove'](_0x146141);});}),this['listenTo'](_0x4dc01d,'removeCommentThread',(_0x494bb1,{threadId:_0x2830b1})=>{const _0x30d40a=_0x4dc01d['getCommentThread'](_0x2830b1);this['stopListening'](_0x30d40a),this['archivedThreads']['has'](_0x30d40a)&&this['archivedThreads']['remove'](_0x30d40a);},{'priority':'highest'}),this['listenTo'](_0x1cd38b['collection'],'focus',(_0x43f956,_0x4db30e)=>{_0x4db30e['isVisible']||(_0x4db30e['isActive']=!0x0,_0x1cd38b['activate'](_0x4db30e));});}_calculatePosition(_0x387917){const _0x24d342=[...this['archivedThreads']]['findIndex'](_0x287cad=>_0x287cad['archivedAt']<_0x387917);return _0x24d342>-0x1?_0x24d342:this['archivedThreads']['length'];}},Wi=class extends _0x36fb8a{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Fi,it];}constructor(_0x311c8a){super(_0x311c8a),this['annotationViews']=new mt(),this['_pendingThreads']=[];}init(){const _0x42259a=this['editor'],_0x36e152=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x42259a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x997752,!0x0)),_0x42259a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4e9e19=this['_createCommentsArchiveButton'](ct);return _0x4e9e19['set']({'role':'menuitemcheckbox'}),_0x4e9e19;});const _0x2480ea=_0x42259a['plugins']['get'](Fi),_0x53c421=_0x42259a['plugins']['get']('Annotations'),_0x1b491b=_0x42259a['plugins']['get']('CommentsRepository');_0x2480ea['archivedThreads']['forEach'](_0x18c199=>{this['_handleNewThread'](_0x18c199);}),this['listenTo'](_0x2480ea['archivedThreads'],'add',(_0x22b224,_0x3389e4)=>{this['_handleNewThread'](_0x3389e4);}),this['listenTo'](_0x53c421['collection'],'add',(_0x2cd825,_0x4ea881)=>{const _0x25866f=this['_pendingThreads']['find'](_0x9e013f=>{const _0xfb318=_0x1b491b['_threadToController']['get'](_0x9e013f);return _0xfb318&&_0x4ea881['innerView']===_0xfb318['view'];});if(_0x25866f){const _0x44516d=this['_calculatePosition'](_0x25866f['archivedAt']);this['_addAnnotationToArchive'](_0x4ea881,_0x44516d),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x25866f),0x1);}}),this['listenTo'](_0x2480ea['archivedThreads'],'remove',(_0x1bf8c1,_0x290f0e)=>{const _0x299d18=_0x42259a['config']['get']('collaboration.channelId');if(!_0x299d18||_0x290f0e['channelId']===_0x299d18){if(this['_pendingThreads']['includes'](_0x290f0e))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x290f0e),0x1);else{const _0x2f12a7=_0x1b491b['_threadToController']['get'](_0x290f0e),_0x4b84f8=_0x53c421['getByInnerView'](_0x2f12a7['view']);this['annotationViews']['remove'](_0x4b84f8['view']),this['stopListening'](_0x4b84f8),this['stopListening'](_0x4b84f8['focusableElements']);}}}),this['listenTo'](_0x53c421['collection'],'add',(_0x53745d,_0x12cbde)=>{this['listenTo'](_0x12cbde,'escape',_0x36e152);}),this['listenTo'](_0x53c421['collection'],'remove',(_0x2308b3,_0x4c3027)=>{this['stopListening'](_0x4c3027,'escape',_0x36e152);});}_addAnnotationToArchive(_0x15bb1d,_0x16dcf4){this['listenTo'](_0x15bb1d,'set:isVisible',_0x16e5b2=>{_0x16e5b2['return']=!0x1,_0x16e5b2['stop']();}),this['annotationViews']['add'](_0x15bb1d['view'],_0x16dcf4);}['_handleNewThread'](_0x552cb4){const _0x36cd4a=this['editor']['plugins']['get']('CommentsRepository'),_0x45fbff=this['editor']['plugins']['get']('Annotations'),_0x591a04=this['editor']['config']['get']('collaboration.channelId');if(!_0x591a04||_0x552cb4['channelId']===_0x591a04){const _0x4ca4cb=_0x36cd4a['_threadToController']['get'](_0x552cb4);if(!_0x4ca4cb)return void this['_pendingThreads']['push'](_0x552cb4);const _0x1cfd2c=this['_calculatePosition'](_0x552cb4['archivedAt']),_0x1da604=_0x45fbff['getByInnerView'](_0x4ca4cb['view']);_0x1da604['isVisible']&&_0x45fbff['_visibleAnnotations']['remove'](_0x1da604),this['_addAnnotationToArchive'](_0x1da604,_0x1cfd2c);}}_calculatePosition(_0x50e50a){const _0x544073=this['editor']['config']['get']('collaboration.channelId'),_0x3aa226=[...this['editor']['plugins']['get'](Fi)['archivedThreads']]['filter'](_0x41f9f2=>_0x41f9f2['channelId']===_0x544073)['findIndex'](_0x1d2962=>_0x1d2962['archivedAt']<_0x50e50a);return _0x3aa226<0x0||_0x3aa226>this['annotationViews']['length']?this['annotationViews']['length']:_0x3aa226-0x1;}_toggleDialog(){const _0x379451=this['editor'],_0x27164d=_0x379451['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Ui(_0x379451['locale'],this['annotationViews'])),'commentsArchive'===_0x27164d['id']?_0x27164d['hide']():_0x27164d['show']({'id':'commentsArchive','title':Rt(_0x379451['locale'],'COMMENTS_ARCHIVE'),'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':et['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x18490a,_0x2f3b53=!0x1){const _0x1a7a5d=this['editor']['locale'],_0x326ff8=this['editor']['plugins']['get']('Dialog'),_0x2dac24=new _0x18490a(_0x1a7a5d);return _0x2dac24['bind']('isEnabled')['to'](this,'isEnabled'),_0x2dac24['bind']('isOn')['to'](_0x326ff8,'id',_0x4cd64e=>'commentsArchive'===_0x4cd64e),_0x2dac24['set']({'label':Rt(_0x1a7a5d,'COMMENTS_ARCHIVE'),'icon':_0x7541f7,'isToggleable':!0x0}),_0x2f3b53&&(_0x2dac24['tooltip']=!0x0),this['listenTo'](_0x2dac24,'execute',()=>this['_toggleDialog']()),_0x2dac24;}_hideDialogOnAnnotationEscape=_0x3c828d=>{const _0x476b09=_0x3c828d['source'];if(!this['annotationViews']['has'](_0x476b09['view']))return;const _0x29d290=this['editor']['plugins']['get']('Dialog');_0x29d290['isOpen']&&'commentsArchive'===_0x29d290['id']&&(_0x29d290['hide'](),_0x3c828d['stop']());};},Ki=class extends _0x36fb8a{static get requires(){return[di,yi,bi,Fi,Wi,Ei,Li,Vi,Bi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{fi as AddCommentThreadCommand,ti as Annotation,ei as AnnotationCollection,Di as AnnotationCounterButtonView,Qt as AnnotationView,oi as Annotations,Ri as AnnotationsSidebarItemView,Oi as AnnotationsSidebarView,ki as AnnotationsUIs,Gt as BaseCommentThreadView,jt as BaseCommentView,mi as Comment,li as CommentThread,Mt as CommentThreadController,Bt as CommentThreadInputView,Xt as CommentThreadView,zt as CommentView,Ki as Comments,Fi as CommentsArchive,Wi as CommentsArchiveUI,yi as CommentsEditing,Ut as CommentsListView,Ei as CommentsOnly,di as CommentsRepository,bi as CommentsUI,pi as EditorAnnotations,Bi as InlineAnnotations,Vi as NarrowSidebar,Si as Sidebar,Li as WideSidebar,si as bindAnnotationCollections};
|