@ckeditor/ckeditor5-comments 48.0.0-alpha.5 → 48.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>kt)());constructor(_0x207601={}){function _0x35009c(_0x28cf77){return _0x28cf77['map'](_0x1164a0=>String['fromCharCode'](_0x1164a0))['join']('');}(_0x207601=Object['assign']({},_0x207601))['plugins']||(_0x207601['plugins']=Ot['defaultPlugins']),super(_0x207601),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x35009c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x35009c([0x76,0x69,0x65,0x77])][_0x35009c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x35009c([0x61,0x75,0x74,0x6f]),this[_0x35009c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x35009c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x35009c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x35009c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x35009c([0x6f,0x6b])});}['create'](){const _0x2cda8d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2cda8d))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2dd50d=>{const _0x17ac82=this['model']['document']['getRoot'](),_0x3ed85a=_0x17ac82&&_0x17ac82['getChild'](_0x17ac82['childCount']-0x1);_0x2dd50d['setSelection'](_0x3ed85a,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3ab6bb=this['editing']['view'],_0x776290=_0x3ab6bb['document']['getRoot'](),_0x40c2b6=_0x776290['getChild'](0x0);_0x776290['childCount']>0x1||!_0x40c2b6||'p'!=_0x40c2b6['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x3ab6bb,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x40c2b6['placeholder']=this['placeholder']),ut({'view':_0x3ab6bb,'element':_0x40c2b6,'keepOnFocus':!0x0}),this['placeholderElement']=_0x40c2b6);}}class Mt extends _0x2f7517{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x334e93,_0xdff034={}){super(_0x334e93),this['editor']=null,this['_editorConfig']=_0xdff034,this['set']('value',_0xdff034['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x334e93,'Reply...')),this['set']('submitLabel',bt(_0x334e93,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x4265bb(),this['focusTracker']=new _0x616088(),this['focusCycler']=new _0x15b20c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x9629f8,_0x1cf759)=>{this['cancelButtonView']['fire']('execute'),_0x1cf759();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4deaec,_0x13611d)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x13611d());}),this['on']('submit',(_0xf36f31,_0x508648)=>{_0x508648['length']>0xfde8?(alert(bt(_0x334e93,'TOO_LONG_COMMENT_ALERT',[_0x508648['length'],0xfde8])),_0xf36f31['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x537ecd=this['editor'];this['element']['insertBefore'](_0x537ecd['ui']['element'],this['element']['firstChild']),_0x537ecd['model']['document']['on']('change',()=>this['value']=_0x537ecd['getData']()),_0x537ecd['bind']('placeholder')['to'](this),this['focusables']['add'](_0x537ecd['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4a30d4){-0x1===_0x4a30d4?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x13163}=this,_0x400bd3=new _0x50e620(_0x13163);return _0x400bd3['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x400bd3['withText']=!0x0,_0x400bd3['bind']('label')['to'](this,'submitLabel'),_0x400bd3['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x400bd3['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x28727c,_0x3b3198)=>!_0x3b3198&&!!_0x28727c['trim']()),_0x400bd3;}['_createCancelButton'](){const {locale:_0x23d8f5}=this,_0x294e3f=new _0x50e620(_0x23d8f5);return _0x294e3f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x294e3f['label']=bt(_0x23d8f5,'Cancel'),_0x294e3f['withText']=!0x0,_0x294e3f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x294e3f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x314fef=>{this['focusTracker']['add'](_0x314fef['element']);}),this['focusables']['on']('change',(_0x260bfa,_0x175f2a)=>{for(const _0x2279c7 of Array['from'](_0x175f2a['added'])['reverse']())this['focusTracker']['add'](_0x2279c7['element']);});}}class Rt extends _0x2f7517{constructor(_0x18e61e,_0x44c23e,_0x6ab81c){super(_0x18e61e),this['commentInputView']=new Mt(_0x18e61e,_0x6ab81c),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1c5b04,_0x40cc38)=>_0x1c5b04||!!_0x40cc38),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x185abd(_0x18e61e,_0x44c23e),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x1a7727){this['commentInputView']['focus'](_0x1a7727);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x37d98c,_0x54cc67)=>{const {submitButtonView:_0x11aa25,cancelButtonView:_0x539f47,editor:_0x34e5f7}=this['commentInputView'];[_0x11aa25['element'],_0x539f47['element'],_0x34e5f7?_0x34e5f7['editing']['view']['getDomRoot']():null]['filter'](_0x203fee=>_0x203fee)['some'](_0x54dc15=>_0x54dc15['contains'](_0x54cc67['target']))||(this['focus'](),_0x54cc67['preventDefault']());});}}class xt extends _0x2f7517{constructor(_0x47b5e4){super(_0x47b5e4);const _0x11fe96=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x11fe96['to']('count',_0x42cc2c=>bt(_0x47b5e4,'NUMBER_OF_COMMENTS',_0x42cc2c))}]});}}class St extends _0x2f7517{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5f7896,_0x1c9d4e,_0x8c4d42){super(_0x5f7896);const _0x4f270c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1c9d4e['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1c9d4e,this['_config']=_0x8c4d42,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x616088(),this['keystrokes']=new _0x4265bb(),this['focusCycler']=new _0x15b20c({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4c6241=>this['commentViews']['map'](_0xa45415=>_0xa45415['element'])['includes'](_0x4c6241['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x5f7896),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4994a4=>_0x4994a4-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2fe69a of _0x1c9d4e['comments'])this['_handleNewCommentModel'](_0x2fe69a);this['_handleInfoComment'](),this['listenTo'](_0x1c9d4e['comments'],'add',(_0x3bf5f1,_0x4844b9)=>{const _0x4ebd1c=this['_calculatePosition'](_0x4844b9);this['length']++,this['_handleNewCommentModel'](_0x4844b9,_0x4ebd1c),this['refreshVisibleViews']();}),this['listenTo'](_0x1c9d4e['comments'],'remove',(_0x4e2d56,_0x341aeb)=>{this['length']--,this['_handleRemoveCommentModel'](_0x341aeb),this['refreshVisibleViews']();}),this['listenTo'](_0x1c9d4e,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1c9d4e,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x4f270c['if']('length','ck-hidden',_0x9c9db2=>!_0x9c9db2)],'aria-label':bt(_0x5f7896,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x446f65){-0x1===_0x446f65?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x28c2c8 of this['commentViews'])_0x28c2c8['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2074bc,_0x10baee){const _0x7feed2=new this['_config']['CommentView'](this['locale'],_0x2074bc,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x7feed2['viewUid']=_0x2074bc['id'],_0x7feed2['delegate']('removeComment')['to'](this),_0x7feed2['delegate']('updateComment')['to'](this),_0x7feed2['delegate']('resolveCommentThread')['to'](this),_0x7feed2['delegate']('editorReady')['to'](this),_0x7feed2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x7feed2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x7feed2,_0x10baee);}['_calculatePosition'](_0x276c32){const _0x43d1f8=this['_model']['_findOptimalIndex'](_0x276c32);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x276c32['authoredAt']?_0x43d1f8-0x1:_0x43d1f8:_0x43d1f8-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3bb975={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3bb975,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3bb975));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5d83da){const _0x14b114=this['commentViews']['remove'](_0x5d83da['id']);this['stopListening'](_0x14b114),_0x14b114['isEditMode']&&this['_updateHasDirtyComment'](),_0x14b114['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2f76fd=>_0x2f76fd['isEditMode']);}['_rearrangeCollapse'](){const _0x3d55f0=function(_0x5a4aef){const _0x4b238b=new _0xf4c9ca();for(const _0x16c25a of _0x5a4aef)_0x4b238b['add'](_0x16c25a);return _0x4b238b;}(this['commentViews']),_0x2e3dc5=this['_collapsedCommentsView']['count'];for(let _0x4c4e53=0x1;_0x4c4e53<=_0x2e3dc5;_0x4c4e53++)_0x3d55f0['remove'](0x1);for(const _0x48e644 of _0x3d55f0)_0x48e644['collapse']();_0x2e3dc5>0x0&&_0x3d55f0['add'](this['_collapsedCommentsView'],0x1),Pt(_0x33c926(Array['from'](this['visibleViews']),Array['from'](_0x3d55f0)),this['visibleViews'],_0x3d55f0);}['_rearrangeExpand'](){Pt(_0x33c926(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2a8b0c of this['visibleViews'])_0x2a8b0c['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5b7257=>{this['focusTracker']['add'](_0x5b7257['element']),this['keystrokes']['listenTo'](_0x5b7257['element']);}),this['commentViews']['on']('change',(_0xd1418f,_0x2c5229)=>{for(const _0x23be6f of _0x2c5229['removed'])this['focusTracker']['remove'](_0x23be6f['element']),this['keystrokes']['stopListening'](_0x23be6f['element']);for(const _0x4d4b17 of Array['from'](_0x2c5229['added'])['reverse']())this['focusTracker']['add'](_0x4d4b17['element']),this['keystrokes']['listenTo'](_0x4d4b17['element']);});}}function Pt(_0x5e2e0b,_0x5a062d,_0x582b8b){let _0x5a2986=0x0;for(const _0xb7fa49 of _0x5e2e0b)switch(_0xb7fa49){case'insert':_0x5a062d['add'](_0x582b8b['get'](_0x5a2986),_0x5a2986),_0x5a2986++;break;case'delete':_0x5a062d['remove'](_0x5a2986);break;case'equal':_0x5a2986++;}}class Lt extends _0x2f7517{constructor(_0x4bdbb5){super(_0x4bdbb5);const _0xf8a946=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xf8a946['to']('contextValue',_0x238cd7=>bt(_0x4bdbb5,'THREAD_CONTEXT_LABEL',_0x238cd7)),'tabindex':-0x1},'children':[{'text':_0xf8a946['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x2f7517{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1d2c6a,_0x48b1b9){super(_0x1d2c6a);const _0x30714a=this['bindTemplate'];this['_model']=_0x48b1b9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x616088(),this['keystrokes']=new _0x4265bb(),this['focusCycler']=new _0x15b20c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x22bc9e=>!!_0x22bc9e),this['bind']('contextValue')['to'](this['_model'],'context',_0x1031ab=>_0x1031ab&&_0x1031ab['value']?this['_trimContextValue'](_0x1031ab['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x30714a['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x3c4322=new _0x50e620(this['locale']);return _0x3c4322['label']=bt(this['locale'],'Reopen'),_0x3c4322['tooltip']=bt(this['locale'],'Reopen'),_0x3c4322['icon']=_0x5e0d33,_0x3c4322['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1172c4=>!_0x1172c4),_0x3c4322['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xcac0f1,_0x1a0ad8)=>_0xcac0f1&&_0x1a0ad8),_0x3c4322['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3c4322;}['_trimContextValue'](_0x21c3f3){if(_0x21c3f3['length']<0x96)return _0x21c3f3;const _0x1d7c29=_0x21c3f3['lastIndexOf']('\x20',0x93);return _0x21c3f3['substring'](0x0,_0x1d7c29>-0x1?_0x1d7c29:0x93)+'...';}['_attachContextActions'](){const _0x4daa28=this['element']['querySelector']('.ck-context'),_0x4ec7ab=_0x4daa28['querySelector']('.ck-context__value');this['listenTo'](_0x4daa28,'mouseenter',()=>{_0x4ec7ab['offsetWidth']<_0x4ec7ab['scrollWidth']&&_0x4daa28['classList']['add']('overlay');}),this['listenTo'](_0x4daa28,'mouseleave',()=>{_0x4daa28['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2a878d of this['focusables'])this['focusTracker']['add'](_0x2a878d['element']),this['keystrokes']['listenTo'](_0x2a878d['element']);}['_createContextView'](){const _0x2d3e70=new Lt(this['locale']);return _0x2d3e70['bind']('contextValue')['to'](this),_0x2d3e70;}}class Vt extends _0x2f7517{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x522dc3,_0x20817,_0x20d6a1,_0x47e8d8){super(_0x522dc3),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x20817,this['_localUser']=_0x20d6a1,this['_config']=_0x47e8d8,this['commentThreadHeaderView']=new Dt(_0x522dc3,_0x20817),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x5712d2(_0x522dc3,bt(_0x522dc3,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x522dc3,_0x20817,Object['assign']({'CommentView':this['_config']['CommentView']},_0x47e8d8)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x504455,_0x27f90a)=>_0x504455||!!_0x27f90a),this['bind']('isUnlinked')['to'](_0x20817,'unlinkedAt',_0x580c9a=>!!_0x580c9a),this['bind']('ariaLabel')['to'](this,'length',_0xc471e0=>{const _0x16e4af=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0xc471e0,_0x16e4af]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x616088(),this['keystrokes']=new _0x4265bb(),this['focusCycler']=new _0x15b20c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5c3213=>_0x5c3213['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x562b1d(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4a587e=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3df242=_0x4a587e['commentInputView'];return _0x4a587e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3df242,'value',(_0xa46828,_0x4fa434,_0x367f0d,_0x2255a4,_0x4f99c1)=>!!_0x4f99c1||!!_0x2255a4&&_0x367f0d&&!_0x4fa434||_0xa46828&&_0x367f0d&&!_0x4fa434),_0x3df242['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x270c5d,_0xf852f8,_0x43f571)=>{let _0x57e2b4;return _0x57e2b4=_0x43f571&&_0xf852f8?'Reply\x20to\x20reopen\x20discussion...':_0x270c5d?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x57e2b4);}),_0x3df242['bind']('submitLabel')['to'](this,'length',_0x303e94=>bt(this['locale'],_0x303e94?'Reply':'Comment')),_0x3df242['on']('submit',(_0xe5b9f0,_0x331cb)=>{this['fire']('addComment',_0x331cb),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3df242['on']('cancel',()=>{this['focus']();}),_0x3df242['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3df242['on']('cancel',_0x21fff5=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x21fff5['stop']());}),this['on']('change:isActive',(_0x486b0a,_0x582d9f,_0x2d1fb5)=>{_0x2d1fb5||this['length']||_0x3df242['value']||this['fire']('removeCommentThread');}),_0x4a587e;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x222b58(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xd94610,target:_0x1545c1,type:_0x37b502,isVisible:_0x25006e=!0x0}){super(),this['view']=_0xd94610,this['view']['element']||this['view']['render'](),this['_type']=_0x37b502,this['_target']=_0x1545c1,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xf4c9ca([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3579b3,_0x4f91e7)=>{this['view']['focusTracker']['add'](_0x4f91e7);}),this['focusableElements']['on']('remove',(_0x3fbf56,_0x2e7d64)=>{this['view']['focusTracker']['remove'](_0x2e7d64);}),this['set']('isVisible',_0x25006e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x399a6a=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x399a6a),_0x399a6a;}get['targetRect'](){const _0x2fd843=this['target'];if(null===_0x2fd843)return null;if(_0x2fd843 instanceof _0x1ed994)return _0x2fd843;const _0x288b56=_0x2fd843['filter'](_0x5ddb79=>function(_0x358fd6){const _0x3a2958=_0x358fd6['offsetParent'];if(_0x3a2958)return!0x0;const _0xbd9098=_0x358fd6['getClientRects']()['item'](0x0);return!!_0xbd9098;}(_0x5ddb79));return 0x0===_0x288b56['length']?null:_0x1ed994['getDomElementRects'](_0x288b56[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2ad984){this['view']['isActive']=_0x2ad984,this['view']['mainView']['isActive']=_0x2ad984;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x4a384a){if(!(null===_0x4a384a||_0x4a384a instanceof _0x1ed994||Array['isArray'](_0x4a384a)&&_0x4a384a['every'](_0x2b18b0=>Gt(_0x2b18b0))))throw new _0x2d21f6('annotation-invalid-target',null,{'target':_0x4a384a});}['_getNormalizedTarget'](){const _0x5f3052='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x5f3052)?[_0x5f3052]:_0x5f3052;}}function Gt(_0x187fca){return null!==_0x187fca&&'object'==typeof _0x187fca&&'nodeType'in _0x187fca&&0x1===_0x187fca['nodeType'];}class jt extends _0xf4c9ca{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x26948e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x616088(),this['_focusTracker']['on']('change:isFocused',(_0x532cf5,_0x39f3e4,_0x107e5a)=>{_0x107e5a||this['fire']('blur');});for(const _0x5b1e44 of _0x26948e)this['add'](_0x5b1e44);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x15b2f7){if(this['has'](_0x15b2f7))throw new _0x2d21f6('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x15b2f7['innerView'],_0x15b2f7),this['_viewToAnnotation']['set'](_0x15b2f7['view'],_0x15b2f7);for(const _0x372e65 of _0x15b2f7['focusableElements'])this['_focusTracker']['add'](_0x372e65);this['listenTo'](_0x15b2f7['focusableElements'],'add',(_0x2bde3a,_0x29dc1d)=>{this['_focusTracker']['add'](_0x29dc1d);}),this['listenTo'](_0x15b2f7['focusableElements'],'remove',(_0x107474,_0x392d55)=>{this['_focusTracker']['remove'](_0x392d55);}),this['listenTo'](_0x15b2f7['view']['focusTracker'],'change:isFocused',(_0x3c1a00,_0x2f8050,_0x175649)=>{_0x175649&&this['fire']('focus',_0x15b2f7);}),_0x15b2f7['updateTargetRect']();const _0x4a7bda=this['_getOrderInContent'](_0x15b2f7['view']['targetRect']);return super['add'](_0x15b2f7,_0x4a7bda);}['remove'](_0xfccc1c){if(!this['has'](_0xfccc1c))throw new _0x2d21f6('annotationcollection-not-existing-item',null);this['stopListening'](_0xfccc1c['view']['focusTracker']),this['stopListening'](_0xfccc1c['focusableElements']);for(const _0x2b6806 of _0xfccc1c['focusableElements'])this['_focusTracker']['remove'](_0x2b6806);return this['_viewToAnnotation']['delete'](_0xfccc1c['view']),this['_innerViewToAnnotation']['delete'](_0xfccc1c['innerView']),super['remove'](_0xfccc1c);}['getByInnerView'](_0x31dd7d){return this['_innerViewToAnnotation']['get'](_0x31dd7d);}['getByView'](_0x2659ac){return this['_viewToAnnotation']['get'](_0x2659ac);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2b07e9 of this)_0x2b07e9['updateTargetRect']();this['_sort']();}['_sort'](){const _0x473add=Array['from'](this)['sort']((_0x3e01e3,_0x4b5027)=>qt(_0x3e01e3['view']['targetRect'],_0x4b5027['view']['targetRect']));for(let _0x2567a4=_0x473add['length']-0x1;_0x2567a4>0x0;_0x2567a4--){const _0x333954=_0x473add[_0x2567a4];_0x2567a4!==this['getIndex'](_0x333954)&&(this['remove'](_0x333954),this['add'](_0x333954));}}['_getOrderInContent'](_0xa2a5f6){let _0x2bd158=0x0;if(!_0xa2a5f6)return this['length'];for(const _0xde02db of this){const _0x45995b=_0xde02db['view']['targetRect'];if(_0x45995b){if(qt(_0xa2a5f6,_0x45995b)<0x0)return _0x2bd158;_0x2bd158++;}}return _0x2bd158;}}function Xt({source:_0x677e9,target:_0x281314,filter:_0x1f50ea}){for(const _0x1ca575 of _0x677e9)_0x1f50ea(_0x1ca575)&&_0x281314['add'](_0x1ca575);_0x281314['listenTo'](_0x677e9,'add',(_0x13c6e1,_0x362fd3)=>{_0x1f50ea(_0x362fd3)&&_0x281314['add'](_0x362fd3);}),_0x281314['listenTo'](_0x677e9,'remove',(_0x704b53,_0x4073f0)=>{_0x281314['has'](_0x4073f0)&&_0x281314['remove'](_0x4073f0);});}function qt(_0x2ce551,_0x45120e){if(null===_0x2ce551&&null===_0x45120e)return 0x0;if(null===_0x2ce551)return-0x1;if(null===_0x45120e)return 0x1;const _0x2810f6=_0x2ce551['top']-_0x45120e['top'];return 0x0==_0x2810f6?_0x2ce551['left']-_0x45120e['left']:_0x2810f6;}class $t extends _0xf6081e{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa10164){if(super(_0xa10164),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xa10164 instanceof _0x343be2){const _0x3ce02e=_0xa10164['locale'];_0xa10164['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x3ce02e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xfd9382){this['collection']['add'](_0xfd9382);}['remove'](_0x4070ad){this['collection']['remove'](_0x4070ad),_0x4070ad['destroy']();}['refreshVisibility'](){for(const _0x51b111 of this['collection'])_0x51b111['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1a2e84){return this['collection']['getByInnerView'](_0x1a2e84);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x315b92 of this['collection'])_0x315b92['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x21743b){this['fire']('_activateAnnotation',_0x21743b);}['createAnnotation'](_0x14d56e){return new Yt(_0x14d56e);}['createAnnotationView'](_0xb594f6,_0x164722){return new Kt(_0xb594f6,_0x164722);}['_addActiveAnnotation'](_0x3b92e3){const _0x1d4b75=new Set(this['activeAnnotations']);_0x1d4b75['add'](_0x3b92e3),this['activeAnnotations']=_0x1d4b75;}['_removeActiveAnnotation'](_0x25ff42){const _0x118609=new Set(this['activeAnnotations']);_0x118609['delete'](_0x25ff42),this['activeAnnotations']=_0x118609;}['_bindAnnotationsToVisibleAnnotations'](){const _0x517a35=this['collection'],_0x2741c4=this['_visibleAnnotations'];function _0x2e1e3(_0x1963bb){const _0xeddcc3=_0x1963bb['source'];_0xeddcc3['isVisible']&&!_0x2741c4['has'](_0xeddcc3)?_0x2741c4['add'](_0xeddcc3):!_0xeddcc3['isVisible']&&_0x2741c4['has'](_0xeddcc3)&&_0x2741c4['remove'](_0xeddcc3),_0xeddcc3['view']['focusTracker']['remove'](_0xeddcc3['view']['element']),_0xeddcc3['view']['focusTracker']['add'](_0xeddcc3['view']['element']);}this['listenTo'](_0x517a35,'add',(_0x41e920,_0x254648)=>{_0x254648['isVisible']&&_0x2741c4['add'](_0x254648),this['listenTo'](_0x254648,'change:isVisible',_0x2e1e3);}),this['listenTo'](_0x517a35,'remove',(_0x22a58f,_0x1cd232)=>{_0x2741c4['has'](_0x1cd232)&&_0x2741c4['remove'](_0x1cd232),this['stopListening'](_0x1cd232,'change:isVisible',_0x2e1e3);});}['_setupEnterAnnotationKeystroke'](){const _0x27a1ad=_0x580c3d=>{_0x580c3d['on']('ready',()=>{_0x580c3d['keystrokes']['set'](_0x131ff7,(_0x577a98,_0x2bb919)=>{const _0x12d219=_0x2ed043(this['activeAnnotations']['values']());_0x12d219&&(_0x12d219['view']['focus'](),_0x2bb919());});});};this['context']instanceof _0x343be2?_0x27a1ad(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x40d86d,_0x45f000)=>{_0x27a1ad(_0x45f000);});}['_setupEscapeAnnotationHandling'](){const _0x3ae8b9=_0x27d112=>{const _0x369ac5=_0x27d112['source'],_0xbffbc1=[];let _0x529855;if(Array['isArray'](_0x369ac5['target'])){_0x529855=_0x369ac5['target'][0x0],this['context']instanceof _0x343be2?_0xbffbc1['push'](this['context']):this['context']['editors']&&_0xbffbc1['push'](...this['context']['editors']);for(const _0x5e077a of _0xbffbc1)for(const _0x64d372 of _0x5e077a['editing']['view']['domRoots']['values']())if(_0x64d372['contains'](_0x529855))return void _0x5e077a['editing']['view']['focus']();_0x529855['focus']();}};this['listenTo'](this['collection'],'add',(_0x5ee612,_0x53404e)=>{this['listenTo'](_0x53404e,'escape',_0x3ae8b9,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4ac732,_0x33c67d)=>{this['stopListening'](_0x33c67d,'escape',_0x3ae8b9);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0xf6081e{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0x3dc0c8,_0x4472e4];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x229b82){super(_0x229b82),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x57b016=this['context']['config'];_0x57b016['define']('comments.maxCommentsWhenCollapsed',0x2),_0x57b016['define']('comments.maxThreadTotalWeight',0x1f4),_0x57b016['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x57b016['define']('comments.CommentThreadView',Bt),_0x57b016['define']('comments.CommentView',Ut),_0x57b016['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1298f8=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1b6059,_0x5b82d6)=>this['_addCommentThread'](_0x5b82d6)),this['on']('submitCommentThread',(_0xfd632b,_0x21f3e1)=>this['_submitCommentThread'](_0x21f3e1)),this['on']('resolveCommentThread',(_0x14bc3e,_0x5b5925)=>this['_resolveCommentThread'](_0x5b5925)),this['on']('resolveCommentThread',(_0x4f6503,_0x46442c)=>this['_updateActiveAnnotation'](_0x46442c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5a8d9,_0x45cdb5)=>this['_reopenCommentThread'](_0x45cdb5)),this['on']('reopenCommentThread',(_0xf3e36d,_0x142efb)=>this['_updateActiveAnnotation'](_0x142efb),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2c85f9,_0x14844b)=>this['_removeCommentThread'](_0x14844b)),this['on']('updateCommentThread',(_0x104a73,_0x43b499)=>this['_updateCommentThread'](_0x43b499)),this['on']('updateCommentThread',(_0x5cf5ed,_0x3d6d69)=>this['_updateActiveAnnotation'](_0x3d6d69),{'priority':'lowest'}),this['on']('addComment',(_0x3a709f,_0x1d3f95)=>this['_addComment'](_0x1d3f95)),this['on']('updateComment',(_0x4cd8c5,_0x276e66)=>this['_updateComment'](_0x276e66)),this['on']('removeComment',(_0x937c2e,_0x5e2fda)=>this['_removeComment'](_0x5e2fda)),this['on']('addComment',(_0x36ebac,{threadId:_0x9e630d,isFromAdapter:_0x9fdf6e})=>{if(_0x9fdf6e)return;const _0x2897ea=this['getCommentThread'](_0x9e630d),_0x569680=_0x2897ea&&this['_threadToController']['get'](_0x2897ea);_0x569680&&_0x569680['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1298f8,'change:activeAnnotations',(_0x35c38a,_0x4d5b7f,_0x51fd8e)=>{const _0x19387f=Array['from'](_0x51fd8e)['map'](_0x3f697e=>this['_viewToController']['get'](_0x3f697e['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x19387f?_0x19387f['model']:null;});}set['adapter'](_0x5154a1){if(this['_adapter'])throw new _0x2d21f6('commentsrepository-adapter-already-set');this['_adapter']=_0x5154a1;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4d7c8b=zt,threadId:_0x4a4a28=_0x3edb58(),comments:_0x4c0418=[],unlinkedAt:_0x56a0ea=null,resolvedAt:_0x222a35=null,resolvedBy:_0x2d4947=null,target:_0x571019=null,context:_0x903c29=null,attributes:_0x589d98={},isResolvable:_0x3209cd=!0x0,isSubmitted:_0x33dc8c=!0x1,isFromAdapter:_0x20125e=!0x1}={}){return this['fire'](ii('addCommentThread',_0x4d7c8b),{'channelId':_0x4d7c8b,'threadId':_0x4a4a28,'comments':_0x4c0418,'unlinkedAt':_0x56a0ea,'resolvedAt':_0x222a35,'resolvedBy':_0x2d4947,'target':_0x571019,'context':_0x903c29,'attributes':_0x589d98,'isFromAdapter':_0x20125e,'isResolvable':_0x3209cd,'isSubmitted':_0x33dc8c}),this['getCommentThread'](_0x4a4a28);}['openNewCommentThread']({channelId:_0x3527fe=zt,threadId:_0x52e8a7=_0x3edb58(),target:_0x171b04,context:_0x44fdaa=null,isResolvable:_0x59504d=!0x0}){if(this['_readOnlyChannels']['has'](_0x3527fe)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x171b04)throw new _0x2d21f6('commentsrepository-missing-target');const _0x25c849=this['addCommentThread']({'channelId':_0x3527fe,'threadId':_0x52e8a7,'target':_0x171b04,'context':_0x44fdaa,'isResolvable':_0x59504d});if(!_0x25c849)return null;const _0x26be6b=this['_threadToController']['get'](_0x25c849),_0x1d4532=_0x26be6b['view']['commentThreadInputView']['commentInputView'],_0xc24a8e=this['context']['plugins']['get']($t),_0x1d388d=_0xc24a8e['getByInnerView'](_0x26be6b['view']);return _0xc24a8e['activate'](_0x1d388d),_0x1d4532['once']('editorReady',()=>_0x1d4532['focus']()),_0x25c849;}['hasCommentThread'](_0x4adf12){if('string'!=typeof _0x4adf12)throw new _0x2d21f6('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4adf12);}['updateCommentThread']({channelId:_0x352d7a=zt,threadId:_0x135a8c,context:_0xe3c441,unlinkedAt:_0x44bf78,attributes:_0x5377a6,isFromAdapter:_0x4b64f8=!0x1}){return this['fire'](ii('updateCommentThread',_0x352d7a),{'channelId':_0x352d7a,'threadId':_0x135a8c,'context':_0xe3c441,'unlinkedAt':_0x44bf78,'attributes':_0x5377a6,'isFromAdapter':_0x4b64f8}),this['getCommentThread'](_0x135a8c);}['getCommentThread'](_0x4a6c74){if('string'!=typeof _0x4a6c74)throw new _0x2d21f6('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4a6c74);}['fetchCommentThread']({channelId:_0x52f7c9,threadId:_0x3803fe}={}){const _0x19a723=this['getCommentThread'](_0x3803fe);if(_0x19a723)return Promise['resolve'](_0x19a723);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2d21f6('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x52f7c9,'threadId':_0x3803fe})['then'](_0x3c6de1=>this['hasCommentThread'](_0x3803fe)?this['getCommentThread'](_0x3803fe):_0x3c6de1?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x52f7c9},_0x3c6de1)):void 0x0)['catch'](_0x5297cf=>{throw console['error'](_0x5297cf),new _0x2d21f6('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4121bd,skipNotAttached:_0x2195b9=!0x1,skipEmpty:_0x25a0a2=!0x1,toJSON:_0x3705c0=!0x1}={}){const _0x24ffa4=[];for(const _0x50366e of this['_threads']['values']())_0x4121bd&&_0x50366e['channelId']!==_0x4121bd||_0x2195b9&&!_0x50366e['isAttached']||_0x25a0a2&&0x0===_0x50366e['length']||_0x24ffa4['push'](_0x50366e);return _0x3705c0?_0x24ffa4['map'](_0x4ccc12=>_0x4ccc12['toJSON']()):_0x24ffa4;}['getAnnotationForCommentThread'](_0x52a038){const _0x43c78c=this['_threadToController']['get'](_0x52a038);if(!_0x43c78c)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x43c78c['view'])||null;}['getCommentThreadForAnnotation'](_0x5ec141){const _0x23f64f=this['_viewToController']['get'](_0x5ec141['innerView']);return _0x23f64f?_0x23f64f['model']:null;}['setActiveCommentThread'](_0x4a436c){const _0x3ccd8f=this['context']['plugins']['get']($t);if(!_0x4a436c)return void(this['activeCommentThread']&&_0x3ccd8f['deactivateAll']());const _0xcaa6ef=this['getCommentThread'](_0x4a436c);if(!_0xcaa6ef)throw new _0x2d21f6('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4a436c});if(!this['_threadToController']['has'](_0xcaa6ef))throw new _0x2d21f6('commentsrepository-active-not-attached',null,{'threadId':_0x4a436c});const _0x4ff715=_0x3ccd8f['getByInnerView'](this['_threadToController']['get'](_0xcaa6ef)['view']);_0x3ccd8f['activate'](_0x4ff715);}['switchReadOnly'](_0x376637,_0x8f44be){_0x376637?this['_readOnlyChannels']['add'](_0x8f44be):this['_readOnlyChannels']['delete'](_0x8f44be),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x43d666){return this['_readOnlyChannels']['has'](_0x43d666)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x565ec0,_0x302cb5){return new It(_0x565ec0,_0x302cb5);}['setPermissions'](_0x43b6cd,_0x5dffea=zt){this['_permissions']['set'](_0x5dffea,_0x43b6cd),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xac1b30=zt){return this['_permissions']['has'](_0xac1b30)?this['_permissions']['get'](_0xac1b30):Jt;}['_addCommentThread']({channelId:_0x26aca7,threadId:_0x1b35c0,comments:_0x13937a,unlinkedAt:_0x24a9be,resolvedAt:_0x45627f,resolvedBy:_0x32c547,target:_0x2333db,context:_0x492b16,attributes:_0x2445cb,isFromAdapter:_0x26eb95,isResolvable:_0x13ba9e,isSubmitted:_0x1482da}){if('string'!=typeof _0x1b35c0)throw new _0x2d21f6('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1b35c0});if(this['hasCommentThread'](_0x1b35c0))throw new _0x2d21f6('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1b35c0});const _0x461f38=new Zt(this,{'channelId':_0x26aca7,'id':_0x1b35c0,'context':_0x492b16,'attributes':_0x2445cb,'unlinkedAt':_0x24a9be,'resolvedAt':_0x45627f,'resolvedBy':_0x32c547?this['context']['plugins']['get'](_0x4472e4)['getUser'](_0x32c547):null,'isResolvable':_0x13ba9e,'isSubmitted':_0x1482da||_0x26eb95});this['_threads']['set'](_0x1b35c0,_0x461f38);for(const _0x5d7769 of _0x13937a)_0x461f38['_add'](this['_createNewComment']({'threadId':_0x1b35c0,..._0x5d7769}));return _0x2333db&&_0x461f38['attachTo'](_0x2333db),_0x26eb95||!_0x461f38['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x26aca7,'threadId':_0x1b35c0});}['_submitCommentThread']({channelId:_0x36bf14,threadId:_0x5f8f0f}){if(!this['hasCommentThread'](_0x5f8f0f))throw new _0x2d21f6('commentsrepository-missing-comment-thread',this);const _0x1967f1=this['getCommentThread'](_0x5f8f0f);if(_0x1967f1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4f16df,comments:_0x3dbcd6,resolvedAt:_0x2b20ef,resolvedBy:_0x385d41,context:_0x3eb7c1,attributes:_0x3913ee}=_0x1967f1,_0x3df2ef=this['context']['plugins']['get']('PendingActions'),_0x59ddcc=_0x3df2ef['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x36bf14,'threadId':_0x4f16df,'comments':_0x3dbcd6['map'](_0x204846=>_0x204846['toJSON']()),'resolvedAt':_0x2b20ef,'resolvedBy':_0x385d41?_0x385d41['id']:_0x385d41,'context':_0x3eb7c1,'attributes':_0x3913ee})['then'](({comments:_0x55479c})=>{_0x3df2ef['remove'](_0x59ddcc);for(const _0x105eca of _0x55479c)this['_updateComment']({'channelId':_0x36bf14,'threadId':_0x5f8f0f,'commentId':_0x105eca['commentId'],'createdAt':_0x105eca['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1f8294=>{throw console['error'](_0x1f8294),new _0x2d21f6('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x1d7b21,target:_0x20917f}){const _0x50e4a2=this['getCommentThread'](_0x1d7b21);if(!_0x50e4a2)throw new _0x2d21f6('commentsrepository-attach-missing-comment-thread',this);const _0x263658=this['context']['plugins']['get']('PendingActions'),_0x5ac2f4=this['context']['plugins']['get']($t),_0x47af5f=this['_createCommentThreadView'](_0x50e4a2),_0x20350f=new It(_0x50e4a2,_0x47af5f);let _0x3ed5c7=null;_0x47af5f['on']('change:isDirty',(_0x2cea80,_0x1a9157,_0x796193)=>{_0x796193?_0x3ed5c7=_0x263658['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3ed5c7&&(_0x263658['remove'](_0x3ed5c7),_0x3ed5c7=null);}),this['_threadToController']['set'](_0x50e4a2,_0x20350f),this['_viewToController']['set'](_0x47af5f,_0x20350f);const _0x426812=new Kt(this['context']['locale'],_0x47af5f);_0x426812['bind']('length')['to'](_0x47af5f),_0x426812['bind']('isDirty')['to'](_0x47af5f,'isDirty',_0x47af5f,'length',(_0x35af07,_0x5f5971)=>_0x35af07||!_0x5f5971),_0x426812['bind']('isActive')['to'](_0x47af5f),_0x426812['type']='comment';const _0x3a59e6=new Yt({'view':_0x426812,'target':_0x20917f,'type':'comment','isVisible':!_0x50e4a2['archivedAt']&&!!('function'==typeof _0x20917f?_0x20917f():_0x20917f)});return _0x47af5f['on']('escape',()=>{_0x3a59e6['fire']('escape');}),this['_bindAnnotationToEditors'](_0x47af5f,_0x3a59e6),_0x5ac2f4['add'](_0x3a59e6),_0x3a59e6;}['_bindAnnotationToEditors'](_0x581cb1,_0x478b96){this['listenTo'](_0x581cb1,'editorReady',(_0x119106,_0x3fcf8f)=>{const _0x3833bb=_0x3fcf8f['ui']['view']['body']['bodyCollectionContainer'];_0x478b96['focusableElements']['add'](_0x3833bb),this['context']instanceof _0x343be2&&this['context']['ui']['focusTracker']['add'](_0x3833bb);},{'priority':'highest'}),this['listenTo'](_0x581cb1,'editorDestroyed',(_0x4beb0b,_0x50364e)=>{const _0x566b1b=_0x50364e['ui']['view']['body']['bodyCollectionContainer'];_0x478b96['focusableElements']['has'](_0x566b1b)&&_0x478b96['focusableElements']['remove'](_0x566b1b),this['context']instanceof _0x343be2&&this['context']['ui']['focusTracker']['remove'](_0x566b1b);});}['_unbindEditors'](_0x9b26af){this['stopListening'](_0x9b26af,'editorReady'),this['stopListening'](_0x9b26af,'editorDestroyed');}['_createCommentThreadView'](_0x33b917){const _0x4ae3ca=this['context']['plugins']['get'](_0x4472e4),{config:_0x52155a,locale:_0x569567}=this['context'],_0x13ba84=_0x5dc671(_0x52155a['get']('locale'),_0x569567);return new(0x0,(_0x52155a['get']('comments'))['CommentThreadView'])(_0x569567,_0x33b917,_0x4ae3ca['me'],{'editorConfig':{..._0x52155a['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x52155a['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x52155a['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x52155a['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x52155a['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x13ba84,'CommentView':_0x52155a['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x12e620,channelId:_0x446e35,resolvedAt:_0x20d614,resolvedBy:_0x2ece06,isFromAdapter:_0x5bc89c}){if(!this['hasCommentThread'](_0x12e620))throw new _0x2d21f6('commentsrepository-missing-comment-thread',null,{'threadId':_0x12e620});const _0x50b9ee=this['getCommentThread'](_0x12e620);if(_0x50b9ee['isResolved'])throw new _0x2d21f6('commentsrepository-resolved-comment-thread',null,{'threadId':_0x12e620});const _0x1ff7b3=this['context']['plugins']['get'](_0x4472e4);if(_0x50b9ee['resolvedBy']=_0x1ff7b3['getUser'](_0x2ece06),_0x50b9ee['resolvedAt']=_0x20d614,_0x5bc89c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5be477=this['context']['plugins']['get']('PendingActions'),_0x104cce=_0x5be477['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x446e35,'threadId':_0x12e620})['then'](({resolvedAt:_0x536c81,resolvedBy:_0x423ec1})=>{_0x5be477['remove'](_0x104cce),_0x50b9ee['resolvedBy']['id']!==_0x423ec1&&(_0x50b9ee['resolvedBy']=_0x1ff7b3['getUser'](_0x423ec1)),_0x50b9ee['resolvedAt']=_0x536c81;})['catch'](_0x5ccc52=>{throw console['error'](_0x5ccc52),new _0x2d21f6('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x14f173,channelId:_0x5d644f,isFromAdapter:_0x53fe96}){if(!this['hasCommentThread'](_0x14f173))throw new _0x2d21f6('commentsrepository-missing-comment-thread',null,{'threadId':_0x14f173});const _0x1019ff=this['getCommentThread'](_0x14f173);if(!_0x1019ff['isResolved'])throw new _0x2d21f6('commentsrepository-reopen-comment-thread',null,{'threadId':_0x14f173});if(_0x1019ff['resolvedBy']=null,_0x1019ff['resolvedAt']=null,_0x53fe96||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2fdbf4=this['context']['plugins']['get']('PendingActions'),_0xe9ccd6=_0x2fdbf4['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5d644f,'threadId':_0x14f173})['then'](()=>_0x2fdbf4['remove'](_0xe9ccd6))['catch'](_0x53d9d1=>{throw console['error'](_0x53d9d1),new _0x2d21f6('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3b6626,isFromAdapter:_0x2bb9fb}){const _0xd0a52e=this['getCommentThread'](_0x3b6626);if(!_0xd0a52e)throw new _0x2d21f6('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3b6626),this['_threads']['delete'](_0x3b6626),!_0xd0a52e['isSubmitted']||_0x2bb9fb||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x597b5e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x48d6f5}=_0xd0a52e,_0xc74c9e=_0x597b5e['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x48d6f5,'threadId':_0x3b6626})['then'](()=>_0x597b5e['remove'](_0xc74c9e))['catch'](_0x381da4=>{throw console['error'](_0x381da4),new _0x2d21f6('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x18ea57,unlinkedAt:_0x48991b,context:_0x12196a,attributes:_0x2ca66b,isFromAdapter:_0x5b4334}){if('string'!=typeof _0x18ea57)throw new _0x2d21f6('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x18ea57});if(!this['hasCommentThread'](_0x18ea57))throw new _0x2d21f6('commentsrepository-missing-comment-thread',null,{'threadId':_0x18ea57});const _0x1b93a2=this['getCommentThread'](_0x18ea57);let _0x4845fb=!0x1;if(void 0x0!==_0x12196a&&_0x1b93a2['context']!==_0x12196a&&(_0x1b93a2['context']=_0x12196a,_0x4845fb=!0x0),void 0x0!==_0x48991b&&_0x1b93a2['unlinkedAt']!==_0x48991b&&(_0x1b93a2['unlinkedAt']=_0x48991b,_0x4845fb=!0x0),_0x2ca66b&&!_0x482118(_0x2ca66b,_0x1b93a2['attributes'])&&(_0x1b93a2['attributes']=_0x2ca66b,_0x4845fb=!0x0),!_0x4845fb)return Promise['resolve']();if(!_0x1b93a2['isSubmitted']||_0x5b4334||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x514b34=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cb826}=_0x1b93a2,_0x4daa71=_0x514b34['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4cb826,'threadId':_0x18ea57,'context':_0x12196a,'unlinkedAt':_0x48991b,'attributes':_0x2ca66b})['then'](()=>_0x514b34['remove'](_0x4daa71))['catch'](_0x58b100=>{throw console['error'](_0x58b100),new _0x2d21f6('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4c0209){const _0x1af14d=this['context']['plugins']['get']($t),_0x1ddc4a=this['getCommentThread'](_0x4c0209);if(_0x1ddc4a['_isAttached']=!0x1,this['_threadToController']['has'](_0x1ddc4a)){const _0x333240=this['_threadToController']['get'](_0x1ddc4a),_0x2b80c7=_0x333240['view'],_0x5e4265=_0x1af14d['getByInnerView'](_0x2b80c7);this['_threadToController']['delete'](_0x1ddc4a),this['_viewToController']['delete'](_0x2b80c7),_0x5e4265&&_0x1af14d['remove'](_0x5e4265),_0x333240['destroy'](),_0x2b80c7['destroy']()['then'](()=>{this['_unbindEditors'](_0x2b80c7);});}}['_updateActiveAnnotation']({threadId:_0x2cc57e,resolvedAt:_0x5e9464,unlinkedAt:_0x29da68}){const _0x2c5987=!!_0x5e9464,_0x14ba52=this['context']['plugins']['get']($t),_0x28fbce=this['getCommentThread'](_0x2cc57e);if(this['_threadToController']['has'](_0x28fbce)){const _0x4d7f9d=this['_threadToController']['get'](_0x28fbce)['view'],_0x5d25d5=_0x14ba52['getByInnerView'](_0x4d7f9d);_0x5d25d5&&(_0x2c5987&&_0x14ba52['_removeActiveAnnotation'](_0x5d25d5),_0x29da68?_0x5d25d5['isVisible']=!0x1:_0x5d25d5['refreshVisibility']());}}['_getExternalAuthor'](_0x1efd71){const _0x1c61a9=this['context']['plugins']['get'](_0x4472e4),_0x3c9024=_0x39a18b('external:'+_0x1efd71),_0x495dff=_0x1c61a9['getUser'](_0x3c9024);return _0x495dff||_0x1c61a9['addUser']({'id':_0x3c9024,'name':_0x1efd71});}['_createNewComment']({threadId:_0x3781fa,commentId:_0x5055c0=_0x3edb58(),content:_0x2a88b5,authorId:_0xc0be3c,createdAt:_0x50d0e7,attributes:_0x19a6f6}){if('string'!=typeof _0x5055c0)throw new _0x2d21f6('commentsrepository-invalid-commentid');if('string'!=typeof _0xc0be3c)throw new _0x2d21f6('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2a88b5||!_0x2a88b5['trim']())throw new _0x2d21f6('commentsrepository-invalid-comment-content');const _0x336210=this['context']['plugins']['get'](_0x4472e4)['getUser'](_0xc0be3c);if(!_0x336210)throw new _0x2d21f6('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xc0be3c});let _0x331a5c=null,_0x3d39f2=_0x50d0e7;return _0x19a6f6?.['@external']&&(_0x331a5c=this['_getExternalAuthor'](_0x19a6f6['@external']['authorName']),_0x3d39f2=new Date(_0x19a6f6['@external']['createdAt'])),new ti(this,{'threadId':_0x3781fa,'id':_0x5055c0,'author':_0x331a5c||_0x336210,'creator':_0x336210,'content':_0x2a88b5,'createdAt':_0x50d0e7,'authoredAt':_0x3d39f2,'attributes':_0x19a6f6});}['_addComment'](_0x5d3703){let {threadId:_0x57aae0,content:_0x2dd107,attributes:_0x5d1ce7,isFromAdapter:_0x159ca7}=_0x5d3703;const _0x460f63=this['getCommentThread'](_0x5d3703['threadId']);if(!_0x460f63)throw new _0x2d21f6('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1062c6=this['_createNewComment'](_0x5d3703),{id:_0x374190}=_0x1062c6;if(_0x460f63['_add'](_0x1062c6),_0x159ca7||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x460f63['isSubmitted'])return Promise['resolve']();const _0x2f0800=this['context']['plugins']['get']('PendingActions'),{channelId:_0x21a605}=_0x460f63,_0x7640fe=_0x2f0800['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5d1ce7||(_0x5d1ce7={}),this['adapter']['addComment']({'channelId':_0x21a605,'threadId':_0x57aae0,'commentId':_0x374190,'content':_0x2dd107,'attributes':_0x5d1ce7})['then'](_0x5b88b0=>{_0x2f0800['remove'](_0x7640fe),_0x5b88b0&&this['_updateComment']({'channelId':_0x21a605,'threadId':_0x57aae0,'commentId':_0x374190,'createdAt':_0x5b88b0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4d80ac=>{throw console['error'](_0x4d80ac),new _0x2d21f6('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5a2cad,commentId:_0x5e1711,content:_0x57e054,createdAt:_0x1904c1,attributes:_0x2d2497,isFromAdapter:_0x1bc661}){if(void 0x0!==_0x57e054&&('string'!=typeof _0x57e054||!_0x57e054['trim']()['length']))throw new _0x2d21f6('commentsrepository-update-comment-invalid-content');const _0x430c64=this['getCommentThread'](_0x5a2cad),_0x502a33=_0x430c64['getComment'](_0x5e1711);if(!_0x502a33)throw new _0x2d21f6('commentsrepository-update-missing-comment',this);let _0x350376=!0x1;if(_0x57e054&&_0x57e054!==_0x502a33['content']&&(_0x502a33['isEditable']||_0x1bc661)&&(_0x502a33['content']=_0x57e054,_0x350376=!0x0),_0x1904c1&&_0x1904c1!==_0x502a33['createdAt']&&(_0x502a33['createdAt']=_0x1904c1,_0x502a33['attributes']&&_0x502a33['attributes']['@external']||(_0x502a33['authoredAt']=_0x1904c1),_0x350376=!0x0),_0x2d2497&&!_0x482118(_0x2d2497,_0x502a33['attributes'])&&(_0x502a33['attributes']=_0x2d2497,_0x350376=!0x0),!_0x350376)return Promise['resolve']();if(_0x430c64['fire']('commentUpdated'),_0x1bc661||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x278f94=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5309f5}=this['getCommentThread'](_0x502a33['threadId']),_0x556e31=_0x278f94['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5309f5,'threadId':_0x5a2cad,'commentId':_0x5e1711,'content':_0x57e054,'attributes':_0x2d2497})['then'](()=>_0x278f94['remove'](_0x556e31))['catch'](_0x19275f=>{throw console['error'](_0x19275f),new _0x2d21f6('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x54a8d9,commentId:_0x3923b9,isFromAdapter:_0x2e13e8}){const _0x2ac3e5=this['getCommentThread'](_0x54a8d9),_0x1862b0=_0x2ac3e5['getComment'](_0x3923b9);if(!_0x1862b0)throw new _0x2d21f6('commentsrepository-remove-missing-comment',this);if(_0x2ac3e5['_remove'](_0x1862b0),_0x2e13e8||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x910b00=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4dad17}=_0x2ac3e5,_0x396bd8=_0x910b00['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4dad17,'threadId':_0x54a8d9,'commentId':_0x3923b9})['then'](()=>_0x910b00['remove'](_0x396bd8))['catch'](_0x3a149f=>{throw console['error'](_0x3a149f),new _0x2d21f6('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x222b58(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x22f44a,_0x32ea07){super();const _0x33b8ee=_0x22f44a['context']['plugins']['get'](_0x4472e4)['me'],_0x1b1e32=_0x22f44a['getCommentThread'](_0x32ea07['threadId']),_0x533b23=0x0===_0x1b1e32['comments']['length'],_0x1c1695=_0x33b8ee===_0x32ea07['author'];this['id']=_0x32ea07['id'],this['threadId']=_0x32ea07['threadId'],this['author']=_0x32ea07['author'],this['creator']=_0x32ea07['creator'],this['isExternal']=Boolean(_0x32ea07['attributes']&&_0x32ea07['attributes']['@external']),this['set']('content',_0x32ea07['content']),this['createdAt']=_0x32ea07['createdAt']||new Date(),this['set']('authoredAt',_0x32ea07['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1b1e32,'resolvedAt'),this['set']('attributes',_0x32ea07['attributes']||{}),this['bind']('isEditable')['to'](_0x22f44a,'_permissions',()=>{const _0x860072=_0x22f44a['getPermissions'](_0x1b1e32['channelId'])['write'],_0x53f1cb=_0x22f44a['getPermissions'](_0x1b1e32['channelId'])['modifyAll'];return _0x1c1695&&_0x860072||!_0x1c1695&&_0x53f1cb;}),this['bind']('isRemovable')['to'](_0x1b1e32,'isRemovable',_0x22f44a,'_permissions',_0x2ebc3b=>{const _0x4fbaa4=_0x22f44a['getPermissions'](_0x1b1e32['channelId'])['write'],_0x478df3=_0x22f44a['getPermissions'](_0x1b1e32['channelId'])['modifyAll'];return _0x1c1695&&_0x4fbaa4||_0x2ebc3b&&_0x533b23||!_0x1c1695&&_0x478df3&&!_0x533b23;}),this['bind']('isReadOnly')['to'](_0x1b1e32,'isReadOnly'),this['_repository']=_0x22f44a;}get['weight'](){return Math['max'](function(_0x120cc5){const _0x14658a=document['createElement']('div');return _0x14658a['innerHTML']=_0x120cc5,_0x14658a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2156e5){const {threadId:_0x3e9b28,id:_0x71aa06}=this;if(!this['_repository']['hasCommentThread'](_0x3e9b28))throw new _0x2d21f6('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3e5a8b}=this['_repository']['getCommentThread'](_0x3e9b28);this['_repository']['fire'](ii('updateComment',_0x3e5a8b,_0x3e9b28),{'channelId':_0x3e5a8b,'threadId':_0x3e9b28,'commentId':_0x71aa06,..._0x2156e5});}['setAttribute'](_0xb2fe1d,_0x443578){const _0x15c9e3=_0x5ef8ad(this['attributes']);_0x67627a(_0x15c9e3,_0xb2fe1d,_0x443578),this['update']({'attributes':_0x15c9e3});}['removeAttribute'](_0x3bc43d){const _0x3e0ab3=_0x5ef8ad(this['attributes']);_0x413a05(_0x3e0ab3,_0x3bc43d),this['update']({'attributes':_0x3e0ab3});}['remove'](_0x3d880f={}){if(!_0x3d880f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2efe97,id:_0x2f4946}=this;if(!this['_repository']['hasCommentThread'](_0x2efe97))throw new _0x2d21f6('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xef3e71}=this['_repository']['getCommentThread'](_0x2efe97);this['_repository']['fire'](ii('removeComment',_0xef3e71,_0x2efe97),{'channelId':_0xef3e71,'threadId':_0x2efe97,'commentId':_0x2f4946,..._0x3d880f});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x23ccbe,..._0x57f3a7){for(const _0x5dda9a of _0x57f3a7)void 0x0!==_0x5dda9a&&(_0x23ccbe+=':'+String(_0x5dda9a));return _0x23ccbe;}class ei extends _0x150035{constructor(_0x2447b6){super(_0x2447b6),this['set']('hasContent',!0x1);}['refresh'](){const _0x5ced21=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x50034e of _0x5ced21['getRanges']())if(this['_hasContent'](_0x50034e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x2da1f4=_0x3edb58(),ranges:_0x1a123a,comment:_0x2d78e7}={}){const _0x3e9a6e=this['editor']['model'],_0x435495=_0x1a123a??Array['from'](_0x3e9a6e['document']['selection']['getRanges']()),_0x49a6da=[];for(const _0x5259bd of _0x435495)this['_hasContent'](_0x5259bd)&&_0x49a6da['push'](this['_trimToContent'](_0x5259bd));if(!_0x49a6da['length'])throw new _0x2d21f6('addcommentthreadcommand-incorrect-ranges',null);_0x2d78e7&&this['_createCommentThread'](_0x2da1f4,_0x2d78e7),this['_createMarkersFromRanges'](_0x2da1f4,_0x49a6da,!!_0x2d78e7);}['_createMarkersFromRanges'](_0x55615b,_0x7eb075,_0x3d6f22){this['editor']['model']['change'](_0x21de3f=>{for(const _0x27de94 of _0x7eb075){const _0x3aa3aa=_0x3edb58()['substr'](0x1,0x5),_0xc84642='comment:'+_0x55615b+':'+_0x3aa3aa;_0x21de3f['addMarker'](_0xc84642,{'range':_0x27de94,'usingOperation':_0x3d6f22,'affectsData':_0x3d6f22});}});}['_createCommentThread'](_0x47f28a,_0x2baefd){const _0x1fea24=this['editor']['plugins']['get']('CommentsRepository'),_0x318f58=this['editor']['config']['get']('collaboration.channelId'),_0x4b5db9=this['editor']['plugins']['get']('Users')['me'];if(!_0x4b5db9)throw new _0x2d21f6('addcommentthreadcommand-user-not-found',null);_0x1fea24['addCommentThread']({'threadId':_0x47f28a,'channelId':_0x318f58,'comments':[{'authorId':_0x4b5db9['id'],'content':_0x2baefd,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3956c3){for(const _0x4fec5c of _0x3956c3['getItems']())if(this['_itemIsContent'](_0x4fec5c))return!0x0;return!0x1;}['_itemIsContent'](_0x59c98b){return _0x59c98b['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x59c98b)&&!_0x59c98b['is']('element','tableCell');}['_trimToContent'](_0x10e87d){const _0x955feb=_0x1bb177=>!this['_itemIsContent'](_0x1bb177['item']),_0x206695=_0x10e87d['start']['getLastMatchingPosition'](_0x955feb),_0x29a963=_0x10e87d['end']['getLastMatchingPosition'](_0x955feb,{'direction':'backward'});return this['editor']['model']['createRange'](_0x206695,_0x29a963);}}class si extends _0x91311a{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e9a20){super(_0x4e9a20),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5b51f3=this['editor'],_0x5d4998=_0x5b51f3['model']['document']['selection'],_0x298190=_0x51df8a(()=>this['refreshSelectedViews'](),0xa);_0x5d4998['on']('change:range',(_0x208f7f,_0x435324)=>{_0x435324['directChange']&&(_0x298190['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5b51f3['editing']['view']['document'],'change:isFocused',(_0x4f69fa,_0x45a73e,_0x14b797)=>{_0x14b797&&_0x298190();}),this['listenTo'](_0x5b51f3['ui']['focusTracker'],'change:isFocused',(_0x54823a,_0xe14387,_0x50cc48)=>{_0x50cc48||this['fire']('blur',{'isAnnotationTracked':_0x2fcdea=>this['_editorAnnotationsData']['has'](_0x2fcdea['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5f478d){if(this['_editorAnnotations']['has'](_0x5f478d['view']))return;this['_editorAnnotations']['add'](_0x5f478d['view']),this['editor']['ui']['focusTracker']['add'](_0x5f478d['view']['element']);const _0x35bbe5=this['editor']['plugins']['get']($t);this['listenTo'](_0x35bbe5['collection'],'remove',(_0x3ad1c5,_0x551a90)=>{this['editor']['ui']['focusTracker']['remove'](_0x551a90['view']['element']),this['_editorAnnotations']['delete'](_0x551a90['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x335840){if('function'!=typeof _0x335840)throw new _0x2d21f6('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x335840);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x291554,annotations:_0x4e2d71}){const _0x371665=[],_0x1a5f2d=this['editor']['model']['document']['selection'],_0x6a1c6f=Array['from'](_0x1a5f2d['getRanges']());for(const [_0x1fed2a,_0x35c970]of this['_editorAnnotationsData']){const _0x3be55c=_0x45687a(_0x35c970),_0x409fdb=_0x4e2d71['getByInnerView'](_0x1fed2a);_0x3be55c&&_0x409fdb&&_0x371665['push']({'annotation':_0x409fdb,'range':_0x3be55c});}function _0x45687a(_0x1a948e){for(const _0x499f36 of _0x1a948e)for(const _0x3eab7c of _0x6a1c6f)if(_0x499f36['containsRange'](_0x3eab7c,!_0x1a5f2d['isCollapsed']))return _0x499f36;return null;}return _0x371665['sort']((_0x15f70b,_0x55850d)=>{const _0x17df49=_0x15f70b['range'],_0x40f4aa=_0x55850d['range'];if(!_0x17df49['isEqual'](_0x40f4aa)){if(_0x17df49['containsRange'](_0x40f4aa,!0x0))return 0x1;if(_0x40f4aa['containsRange'](_0x17df49,!0x0))return-0x1;}return _0x15f70b['annotation']==_0x291554?-0x1:_0x55850d['annotation']==_0x291554?0x1:0x0;})['map'](_0xed2a82=>_0xed2a82['annotation']);}get['_editorAnnotationsData'](){const _0x4f6b99=new Map();for(const _0x4a9eb6 of Array['from'](this['_dataCollectors']))for(const [_0x1af683,_0x3db525]of _0x4a9eb6())_0x4f6b99['set'](_0x1af683,_0x3db525);return _0x4f6b99;}}class ni extends _0x91311a{['afterInit'](){const _0x5b30cf=this['editor'];if(!_0x5b30cf['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5b30cf['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x91311a{constructor(_0x476413){super(_0x476413),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x48e0cb=this['editor'],_0x5844a5=_0x48e0cb['commands']['get']('importWord'),_0x158ae9=_0x48e0cb['plugins']['get'](_0x4472e4);_0x5844a5&&(_0x5844a5['on']('execute',(_0x4ab2a3,[,_0x21bf1b])=>{_0x21bf1b['collaboration_features']={'comments':!0x0,'user_id':_0x158ae9['me']['id']};},{'priority':_0x1948af['high']+0xa}),this['listenTo'](_0x5844a5,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x20eaed,_0x2e490d){const {comment_threads:_0x530b74}=_0x2e490d;_0x530b74&&_0x530b74['forEach'](({thread_id:_0x277b3f,comments:_0x11af2a,is_resolved:_0x5190ba})=>{const _0x177651=new Date(),_0x1bfce8=_0x11af2a['map'](({author:_0x20c398,content:_0x499132,created_at:_0x13343e})=>({'content':_0x499132,'authorId':this['editor']['plugins']['get'](_0x4472e4)['me']['id'],'createdAt':_0x177651,'attributes':{'@external':{'authorName':_0x20c398,'createdAt':_0x13343e?new Date(_0x13343e):new Date(),'source':'importWord'}}})),_0x5e389d=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x5e389d,'threadId':_0x277b3f,'comments':_0x1bfce8,'resolvedAt':_0x5190ba?_0x177651:null});});}}class ri extends _0x91311a{constructor(_0x47381a){super(_0x47381a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x512d6e=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x512d6e,'contentInsertion',(_0x3c5ffc,_0x2f673c)=>this['_removeMarkersWithoutThreads'](_0x2f673c['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x22772d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x22772d;const _0x32ea94=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4c5aa3 of _0x22772d['keys']()){const [_0x3c3f66,_0x45d2be]=_0x4c5aa3['split'](':');'comment'!=_0x3c3f66||_0x32ea94['hasCommentThread'](_0x45d2be)||_0x22772d['delete'](_0x4c5aa3);}return _0x22772d;}['_registerMarkerInClipboardPipeline'](){const _0x51ea36=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x357245=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x357245&&_0x51ea36['_registerMarkerToCopy']('comment',_0x357245);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xf6284b){switch(_0xf6284b){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x8334d5){const _0x4b53c3=_0x8334d5['split'](':');return{'group':_0x4b53c3[0x0],'id':_0x4b53c3[0x1],'part':_0x4b53c3[0x2]};}class ai extends _0x91311a{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x16dcd9,_0x216da7)=>{if(!_0x216da7['options']['showCommentHighlights'])return null;if(_0x216da7['options']['ignoreResolvedComments']){const {id:_0x4bc412}=hi(_0x16dcd9['markerName']),_0x4d49e5=this['editor']['plugins']['get'](Qt);if(_0x4d49e5['getCommentThread'](_0x4bc412)?.['isResolved']&&_0x16dcd9['item'])return _0x216da7['consumable']['consume'](_0x16dcd9['item'],'addMarker:'+_0x16dcd9['markerName']),_0x216da7['consumable']['consume'](_0x16dcd9['item'],'removeMarker:'+_0x16dcd9['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2ad84c=>{_0x2ad84c['on']('addMarker:comment',(_0x42e1c3,_0x5acf83,_0x1f0439)=>{if(!_0x1f0439['options']['showCommentHighlights'])return;const _0x3ffb0f=_0x5acf83['item'];if(!_0x3ffb0f)return;const _0x412bb6=_0x1f0439['mapper']['toViewElement'](_0x3ffb0f);this['editor']['model']['schema']['isObject'](_0x3ffb0f)&&_0x412bb6&&!_0x412bb6['getCustomProperty']('widget')&&_0x412bb6['is']('containerElement')&&Ct(_0x412bb6,_0x1f0439['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x21e349,{writer:_0x2f3022,options:_0x5a1bf6})=>{if(!_0x5a1bf6['showCommentHighlights'])return null;const _0x2bd9c1=_0x2f3022['createContainerElement']('div'),_0x16428c=_0x2f3022['createEmptyElement']('hr');return _0x2f3022['addClass']('ck-horizontal-line',_0x2bd9c1),_0x2f3022['insert'](_0x2f3022['createPositionAt'](_0x2bd9c1,0x0),_0x16428c),_0x2bd9c1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x574afd,{writer:_0x344469,options:_0x18d662})=>{if(!_0x18d662['showCommentHighlights'])return null;const _0x17be8d=_0x344469['createContainerElement']('span'),_0x21d06c=_0x344469['createEmptyElement']('img');return _0x344469['addClass']('image-inline',_0x17be8d),_0x344469['insert'](_0x344469['createPositionAt'](_0x17be8d,0x0),_0x21d06c),_0x17be8d;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2962f2,{writer:_0x43432c,options:_0x685e56})=>{if(_0x685e56['showCommentHighlights'])return _0x43432c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1461ba,_0x44ad91,_0x431f3e)=>{_0x431f3e['options']['showCommentHighlights']&&_0x1461ba['stop']();},{'priority':'high'});}}class ci extends _0x91311a{static get['requires'](){return[Qt,si,_0x4472e4,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1263cb){super(_0x1263cb),this['set']('isThreadsLoadingPaused',!0x0),_0x1263cb['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3022ae,_0x131f3f,_0x401630,_0x3d7d6c)=>{const _0xc1011c=_0x1263cb['plugins']['get'](Qt),_0x235244=_0x401630?hi(_0x401630)['id']:null;_0x1263cb['model']['change'](()=>{if(_0x235244){const _0x91e0fe=this['getAllMarkersForId'](_0x235244);for(const _0x3bfd02 of _0x91e0fe)_0x1263cb['editing']['reconvertMarker'](_0x3bfd02);}if(_0x3d7d6c){const {id:_0x5cc86d}=hi(_0x3d7d6c),_0x534cc3=_0xc1011c['getCommentThread'](_0x5cc86d);if(_0x534cc3&&_0x534cc3['unlinkedAt'])return;if(_0x534cc3&&!_0x534cc3['isAttached'])return;const _0x3cb495=this['getAllMarkersForId'](_0x5cc86d);for(const _0x4bf93c of _0x3cb495)_0x1263cb['editing']['reconvertMarker'](_0x4bf93c);}}),_0x235244&&this['scrollToThreadMarker'](_0x235244);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x16a73f=this['editor'],_0x678074=_0x16a73f['plugins']['get'](Qt),_0x1a64b4=_0x16a73f['config']['get']('collaboration.channelId'),_0x185c40=_0x678074['getCommentThreads']()['filter'](_0x2a3cd5=>_0x2a3cd5['channelId']!==_0x1a64b4);_0x16a73f['commands']['add']('addCommentThread',new ei(_0x16a73f)),this['listenTo'](_0x16a73f,'change:isReadOnly',(_0xadabf3,_0x10a32d,_0x1ef457)=>{_0x678074['switchReadOnly'](_0x1ef457,_0x16a73f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x678074,di('addCommentThread',_0x1a64b4),(_0x50b60a,{threadId:_0x1c2b9a})=>{const _0xb34266=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x1c2b9a);_0xb34266?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1c2b9a);}),this['listenTo'](_0x678074,di('removeCommentThread',_0x1a64b4),(_0x3a313c,{threadId:_0x154575})=>{_0x16a73f['model']['enqueueChange']({'isUndoable':!0x1},_0x27e962=>{const _0x17d7c5=this['getAllMarkersForId'](_0x154575);for(const _0x5b503d of _0x17d7c5)_0x27e962['removeMarker'](_0x5b503d);});}),this['listenTo'](_0x678074,di('resolveCommentThread',_0x1a64b4),(_0x7faf50,{threadId:_0x292303})=>{(this['_reconvertMarkers'](_0x292303),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x292303)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x678074,di('reopenCommentThread',_0x1a64b4),(_0x27d80e,{threadId:_0x11b6da})=>{this['_reconvertMarkers'](_0x11b6da);},{'priority':'low'}),this['listenTo'](_0x678074,di('addComment',_0x1a64b4),(_0x1dbd5c,{threadId:_0x252f3c,isFromAdapter:_0x4f4a84})=>{const _0x146df7=this['getAllMarkersForId'](_0x252f3c);if(_0x4f4a84||0x0==_0x146df7['length']||!_0x678074['hasCommentThread'](_0x252f3c))return;0x1===_0x678074['getCommentThread'](_0x252f3c)['length']&&_0x16a73f['model']['enqueueChange']({'isUndoable':!0x1},_0x3e5648=>{for(const _0x313d9d of _0x146df7)_0x3e5648['updateMarker'](_0x313d9d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x185c40);}['afterInit'](){!async function(_0x403730){const _0x11a3ae=_0x3504c8([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x5e578b=0x73460ab3,_0x50b52e=0x73418ff3^_0x5e578b,_0x4906e5=window[_0x3504c8([0x44,0x61,0x74,0x65])][_0x3504c8([0x6e,0x6f,0x77])](),_0x3ffea4=_0x403730[_0x3504c8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a8a1d=new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x196393=>{_0x3ffea4[_0x3504c8([0x6f,0x6e,0x63,0x65])](_0x3504c8([0x72,0x65,0x61,0x64,0x79]),_0x196393);}),_0x3725cb={[_0x3504c8([0x6b,0x74,0x79])]:_0x3504c8([0x45,0x43]),[_0x3504c8([0x75,0x73,0x65])]:_0x3504c8([0x73,0x69,0x67]),[_0x3504c8([0x63,0x72,0x76])]:_0x3504c8([0x50,0x2d,0x32,0x35,0x36]),[_0x3504c8([0x78])]:_0x3504c8([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x3504c8([0x79])]:_0x3504c8([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x3504c8([0x61,0x6c,0x67])]:_0x3504c8([0x45,0x53,0x32,0x35,0x36])},_0x219216=_0x3ffea4[_0x3504c8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3504c8([0x67,0x65,0x74])](_0x3504c8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xd501b6(){let _0xc27c4a,_0x37d163=null,_0x595ec2=null;try{if(_0x219216==_0x3504c8([0x47,0x50,0x4c]))return _0x3504c8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xc27c4a=_0x426539(),!_0xc27c4a)return _0x3504c8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xc27c4a[_0x3504c8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x595ec2=_0x493902(_0xc27c4a[_0x3504c8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xc27c4a[_0x3504c8([0x6a,0x74,0x69])])),await _0x5f0143()?_0x25cde0()?_0x56acc6()?_0x3504c8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x210fcd()?(_0xc27c4a[_0x3504c8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3504c8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x37d163=_0x2b6fb0(_0x3504c8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x320d1b()):_0x3504c8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3504c8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3504c8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3504c8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x56acc6(){const _0x45a0e1=[_0x3504c8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3504c8([0x74,0x72,0x69,0x61,0x6c])][_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc27c4a[_0x3504c8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4906e5/0x3e8:0xe10*_0x50b52e;return _0xc27c4a[_0x3504c8([0x65,0x78,0x70])]<_0x45a0e1;}function _0x25cde0(){const _0x4b2497=_0xc27c4a[_0x3504c8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4b2497)return!0x1;if(_0x4b2497[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x2a])))return!0x0;if(_0x4b2497[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x43,0x4d,0x54])))return!0x0;if(_0x4b2497[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x2ef731())return!0x0;if(_0x4b2497[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x52,0x43,0x4d,0x54]))){if(_0x50f8a8())return!0x0;if(_0x52467c()||_0x23527d())return!0x0;}return!0x1;}function _0x210fcd(){const _0x359ede=_0xc27c4a[_0x3504c8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x359ede||0x0==_0x359ede[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3dacc4}=new URL(window[_0x3504c8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x359ede[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3dacc4))return!0x0;const _0x4c8c1=_0x3dacc4[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])](_0x3504c8([0x2e]));return _0x359ede[_0x3504c8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf9e70b=>_0xf9e70b[_0x3504c8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3504c8([0x2a])))[_0x3504c8([0x6d,0x61,0x70])](_0x133334=>_0x133334[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])](_0x3504c8([0x2e])))[_0x3504c8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3df14b=>_0x3df14b[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4c8c1[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3504c8([0x6d,0x61,0x70])](_0x39031d=>Array(_0x4c8c1[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x39031d[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3504c8([0x66,0x69,0x6c,0x6c])](_0x39031d[0x0]===_0x3504c8([0x2a])?_0x3504c8([0x2a]):'')[_0x3504c8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x39031d))[_0x3504c8([0x73,0x6f,0x6d,0x65])](_0x33f63e=>_0x4c8c1[_0x3504c8([0x65,0x76,0x65,0x72,0x79])]((_0x2d43e0,_0x4101fb)=>_0x33f63e[_0x4101fb]===_0x2d43e0||_0x33f63e[_0x4101fb]===_0x3504c8([0x2a])));}function _0x320d1b(){return _0x37d163&&_0x595ec2?new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2ba5a2,_0xe101e1)=>{_0x37d163[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x2ba5a2,_0xe101e1),_0x595ec2[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x19c431=>{_0x19c431!=_0x3504c8([0x56,0x61,0x6c,0x69,0x64])&&_0x2ba5a2(_0x19c431);},_0xe101e1);}):_0x37d163||_0x595ec2||_0x3504c8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x493902(_0x248bd2,_0x51fd97){return new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x276a03=>{if(_0x3217a1())return _0x276a03(_0x3504c8([0x56,0x61,0x6c,0x69,0x64]));_0x52b864(),_0x3ffea4[_0x3504c8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3504c8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4d6c96=!0x1;const _0x5192b3=_0x3edb58();function _0x593a7d(_0xd4b0e1){return!!_0xd4b0e1&&(typeof _0xd4b0e1===_0x3504c8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xd4b0e1===_0x3504c8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xd4b0e1[_0x3504c8([0x74,0x68,0x65,0x6e])]===_0x3504c8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xd4b0e1[_0x3504c8([0x63,0x61,0x74,0x63,0x68])]===_0x3504c8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5f54b7(_0x5e4d51){_0x2b0278(_0x5e4d51)[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x40ea25=>{if(!_0x40ea25||_0x40ea25[_0x3504c8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3504c8([0x6f,0x6b]))return _0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x40e378(_0x234b2d(_0x5192b3+_0x51fd97))!=_0x40ea25[_0x3504c8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3504c8([0x56,0x61,0x6c,0x69,0x64]);})[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x522012=>(_0x1a44ac(),_0x522012),()=>{const _0x5e54d5=_0x2d0f50();return null==_0x5e54d5?(_0x1a44ac(),_0x3504c8([0x56,0x61,0x6c,0x69,0x64])):_0x3504c8(_0x4906e5-_0x5e54d5>(0x574a8eb3^_0x5e578b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x276a03)[_0x3504c8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x276a03(_0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x20a140=0x7370e433^_0x5e578b;function _0x1a44ac(){const _0x55c159=_0x3504c8([0x6c,0x6c,0x63,0x74,0x2d])+_0x40e378(_0x234b2d(_0x248bd2)),_0x18d3e3=_0x47af5b(_0x40e378(window[_0x3504c8([0x4d,0x61,0x74,0x68])][_0x3504c8([0x63,0x65,0x69,0x6c])](_0x4906e5/_0x20a140)));window[_0x3504c8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3504c8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x55c159,_0x18d3e3);}function _0x2d0f50(){const _0x7df399=_0x3504c8([0x6c,0x6c,0x63,0x74,0x2d])+_0x40e378(_0x234b2d(_0x248bd2)),_0x2f2f1c=window[_0x3504c8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3504c8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x7df399);return _0x2f2f1c?window[_0x3504c8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47af5b(_0x2f2f1c),0x10)*_0x20a140:null;}function _0x2b0278(_0x5d7a8b){return new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4cfe28,_0x8a6b91)=>{_0x5d7a8b[_0x3504c8([0x74,0x68,0x65,0x6e])](_0x4cfe28,_0x8a6b91),window[_0x3504c8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x8a6b91,0x7347de73^_0x5e578b);});}}_0x3ffea4[_0x3504c8([0x6f,0x6e])](_0x3504c8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3b7674,_0xceb7e3)=>{if(_0xceb7e3[0x0]!=_0x248bd2)return _0x276a03(_0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xceb7e3[0x1]={..._0xceb7e3[0x1],[_0x3504c8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5192b3};},{[_0x3504c8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3504c8([0x68,0x69,0x67,0x68])}),_0x3ffea4[_0x3504c8([0x6f,0x6e])](_0x3504c8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x556e4e=>{_0x593a7d(_0x556e4e[_0x3504c8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4d6c96=!0x0,_0x5f54b7(_0x556e4e[_0x3504c8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3504c8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3504c8([0x6c,0x6f,0x77])}),_0x4a8a1d[_0x3504c8([0x74,0x68,0x65,0x6e])](()=>{_0x4d6c96||_0x276a03(_0x3504c8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3217a1(){return _0x3ffea4[_0x3504c8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3504c8([0x76,0x69,0x65,0x77])][_0x3504c8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3504c8([0x61,0x75,0x74,0x6f]);}function _0x52b864(){_0x3ffea4[_0x3504c8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3504c8([0x76,0x69,0x65,0x77])][_0x3504c8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3504c8([0x61,0x75,0x74,0x6f]);}}function _0x2b6fb0(_0x431e7c){const _0x401d6f=[new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5120bd=>setTimeout(_0x5120bd,0x734f347f^_0x5e578b)),_0x4a8a1d[_0x3504c8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x586fe1=>{let _0x502cea=0x0;_0x3ffea4[_0x3504c8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3504c8([0x6f,0x6e])](_0x3504c8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d8902,_0x4b0b77)=>{_0x4b0b77[0x0][_0x3504c8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x502cea++,_0x502cea==(0x73460f5b^_0x5e578b)&&(_0x586fe1(),_0x2d8902[_0x3504c8([0x6f,0x66,0x66])]());});}))];return window[_0x3504c8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3504c8([0x72,0x61,0x63,0x65])](_0x401d6f)[_0x3504c8([0x74,0x68,0x65,0x6e])](()=>_0x431e7c);}async function _0x177196(){await _0x4a8a1d,_0x3ffea4[_0x3504c8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3504c8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1550ee,_0x3ffea4[_0x3504c8([0x6d,0x6f,0x64,0x65,0x6c])][_0x3504c8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1550ee,_0x3ffea4[_0x3504c8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3504c8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2ef731(){return window[_0x3504c8([0x67,0x6c,0x6f,0x62])]&&window[_0x3504c8([0x67,0x6c,0x6f,0x62])][_0x3504c8([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x50f8a8(){return _0x37dfc1(_0x3504c8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2fbfc2(_0x3504c8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3504c8([0x73,0x74,0x61,0x74,0x65])]==_0x3504c8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x52467c(){return _0x37dfc1(_0x3504c8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x23527d(){return _0x37dfc1(_0x3504c8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x34ce1a(_0x2d1699){const _0x3c76e3=_0x5e7f63();_0x3ffea4[_0x3c76e3]=_0x3504c8([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2d1699,_0x2d1699!=_0x3504c8([0x56,0x61,0x6c,0x69,0x64])&&_0x177196();}function _0x5e7f63(){const _0x9aaf57=window[_0x3504c8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3504c8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3504c8([0x6e,0x6f,0x77])]())[_0x3504c8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3504c8([0x2e]),'');let _0x4ce6b1=_0x3504c8([0x4b]);for(let _0x558cda=0x0;_0x558cda<_0x9aaf57[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x558cda+=0x2){let _0xd8a763=window[_0x3504c8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9aaf57[_0x3504c8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x558cda,_0x558cda+0x2));_0xd8a763>=_0x11a3ae[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xd8a763-=_0x11a3ae[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4ce6b1+=_0x11a3ae[_0xd8a763];}return _0x4ce6b1;}function _0x426539(){const _0x4f5ad8=_0x219216[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])](_0x3504c8([0x2e]));if(0x3!=_0x4f5ad8[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x34575d(_0x4f5ad8[0x1]);function _0x34575d(_0x3fa153){const _0x220fdb=_0x88d9a0(_0x3fa153);return _0x220fdb&&_0x2ddc66()?_0x220fdb:null;function _0x2ddc66(){const _0x331b5e=_0x220fdb[_0x3504c8([0x6a,0x74,0x69])],_0x562b2d=window[_0x3504c8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x331b5e[_0x3504c8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x331b5e[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5258ee={..._0x220fdb,[_0x3504c8([0x6a,0x74,0x69])]:_0x331b5e[_0x3504c8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x331b5e[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5258ee[_0x3504c8([0x76,0x63])],_0x234b2d(_0x5258ee)==_0x562b2d;}}}async function _0x5f0143(){let _0x3a969e=!0x0;try{const _0x59c221=_0x219216[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])](_0x3504c8([0x2e])),[_0xde09d0,_0x1ccc2b,_0x2415fe]=_0x59c221;return _0x308450(_0xde09d0),await _0x257d62(_0xde09d0,_0x1ccc2b,_0x2415fe),_0x3a969e;}catch{return!0x1;}function _0x308450(_0x406cf7){const _0x399e91=_0x88d9a0(_0x406cf7);_0x399e91&&_0x399e91[_0x3504c8([0x61,0x6c,0x67])]==_0x3504c8([0x45,0x53,0x32,0x35,0x36])||(_0x3a969e=!0x1);}async function _0x257d62(_0x356cad,_0x4ffaf5,_0xadf727){const _0x4f6bee=window[_0x3504c8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3504c8([0x66,0x72,0x6f,0x6d])](_0x10f869(_0xadf727),_0x31d7cc=>_0x31d7cc[_0x3504c8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1b7611=new window[(_0x3504c8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3504c8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x356cad+_0x3504c8([0x2e])+_0x4ffaf5),_0xcbf4e6=window[_0x3504c8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3504c8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xcbf4e6)return;const _0x24dfee=await _0xcbf4e6[_0x3504c8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3504c8([0x6a,0x77,0x6b]),_0x3725cb,{[_0x3504c8([0x6e,0x61,0x6d,0x65])]:_0x3504c8([0x45,0x43,0x44,0x53,0x41]),[_0x3504c8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3504c8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3504c8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xcbf4e6[_0x3504c8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3504c8([0x6e,0x61,0x6d,0x65])]:_0x3504c8([0x45,0x43,0x44,0x53,0x41]),[_0x3504c8([0x68,0x61,0x73,0x68])]:{[_0x3504c8([0x6e,0x61,0x6d,0x65])]:_0x3504c8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x24dfee,_0x4f6bee,_0x1b7611)||(_0x3a969e=!0x1);}}function _0x88d9a0(_0x464956){return _0x464956[_0x3504c8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3504c8([0x65,0x79]))?JSON[_0x3504c8([0x70,0x61,0x72,0x73,0x65])](_0x10f869(_0x464956)):null;}function _0x10f869(_0x4ab2dc){return window[_0x3504c8([0x61,0x74,0x6f,0x62])](_0x4ab2dc[_0x3504c8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3504c8([0x2b]))[_0x3504c8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3504c8([0x2f])));}function _0x234b2d(_0x417b92){let _0x447428=0x1505;function _0x3bd6a0(_0xb82b55){for(let _0x42a198=0x0;_0x42a198<_0xb82b55[_0x3504c8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x42a198++){const _0x173f12=_0xb82b55[_0x3504c8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x42a198);_0x447428=(_0x447428<<0x5)+_0x447428+_0x173f12,_0x447428&=_0x447428;}}function _0x18dad5(_0x3643e6){Array[_0x3504c8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3643e6)?_0x3643e6[_0x3504c8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x18dad5):_0x3643e6&&typeof _0x3643e6==_0x3504c8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3504c8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3643e6)[_0x3504c8([0x73,0x6f,0x72,0x74])]()[_0x3504c8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xd42c2d,_0x102a1d])=>{_0x3bd6a0(_0xd42c2d),_0x18dad5(_0x102a1d);}):_0x3bd6a0(window[_0x3504c8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3643e6));}return _0x18dad5(_0x417b92),_0x447428>>>0x0;}function _0x40e378(_0x1602af){return _0x1602af[_0x3504c8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3504c8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3504c8([0x30]));}function _0x47af5b(_0x60afb7){return _0x60afb7[_0x3504c8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3504c8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3504c8([0x6a,0x6f,0x69,0x6e])]('');}function _0x37dfc1(_0x584a96){return _0x3ffea4[_0x3504c8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3504c8([0x68,0x61,0x73])](_0x584a96);}function _0x2fbfc2(_0x263ad1){return _0x3ffea4[_0x3504c8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3504c8([0x67,0x65,0x74])](_0x263ad1);}function _0x1550ee(){}function _0x3504c8(_0x46fcc4){return _0x46fcc4['map'](_0x189987=>String['fromCharCode'](_0x189987))['join']('');}_0x34ce1a(await _0xd501b6());}(this);}['destroy'](){const _0x55d4b5=this['editor']['plugins']['get'](Qt),_0x33737a=this['editor']['config']['get']('collaboration.channelId');for(const _0x2d5347 of _0x55d4b5['getCommentThreads']({'channelId':_0x33737a}))_0x55d4b5['_detachCommentThread'](_0x2d5347['id']),_0x55d4b5['_threads']['delete'](_0x2d5347['id']);super['destroy']();}['hasMarkerForId'](_0x9100c8){return this['getAllMarkersForId'](_0x9100c8)['length']>0x0;}['getAllMarkersForId'](_0x48c4bb){const _0x21dc93=[];for(const _0x324234 of this['editor']['model']['markers'])_0x324234['name']['startsWith']('comment:'+_0x48c4bb)&&_0x21dc93['push'](_0x324234);return _0x21dc93;}['scrollToThreadMarker'](_0x4b6461){setTimeout(()=>{const _0x525b75=this['_getTargetForId'](_0x4b6461);if(!_0x525b75)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x4b6461&&_0x2ba192({'target':_0x525b75[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1e7936){this['editor']['model']['change'](()=>{for(const _0xe13671 of this['getAllMarkersForId'](_0x1e7936))this['editor']['editing']['reconvertMarker'](_0xe13671);});}['_attachArchivedThread'](_0x30b5f1){const _0x537575=this['editor']['plugins']['get'](Qt),_0xa61d85=this['editor']['plugins']['get'](si),_0x113e1d=_0x537575['getCommentThread'](_0x30b5f1);if(!_0x113e1d['isAttached']){const _0x1eae77=_0x113e1d['attachTo'](()=>this['_getTargetForId'](_0x113e1d['id']));_0xa61d85['registerAnnotation'](_0x1eae77),_0x113e1d['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3b15ba=this['editor'],_0x16b7bd=_0x3b15ba['plugins']['get'](_0x4472e4);_0x3b15ba['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x24e158,_0x17ce71)=>{const {id:_0x1be04b}=hi(_0x24e158['markerName']),_0x4855d6=_0x3b15ba['plugins']['get'](Qt)['getCommentThread'](_0x1be04b),_0x57f301=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x1be04b;let _0x16a56a;if(_0x4855d6&&_0x4855d6['isResolved']&&!_0x57f301&&_0x24e158['item'])return _0x17ce71['consumable']['consume'](_0x24e158['item'],'addMarker:'+_0x24e158['markerName']),_0x17ce71['consumable']['consume'](_0x24e158['item'],'removeMarker:'+_0x24e158['markerName']),null;const _0x161c5=['ck-comment-marker'];return _0x57f301&&_0x161c5['push']('ck-comment-marker--active'),_0x16a56a=_0x4855d6?.['length']?_0x4855d6['comments']['first']['author']['id']:_0x16b7bd['me']['id'],{'classes':_0x161c5,'attributes':{'data-comment':_0x1be04b,'data-author-id':_0x16a56a}};}}),_0x3b15ba['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5d7269,{options:_0x128d9f})=>{if(_0x128d9f['showCommentHighlights'])return null;const _0x3c7e65=_0x3b15ba['plugins']['get'](Qt),_0x529f6d=_0x3b15ba['model']['markers']['get'](_0x5d7269),{id:_0x1fb14c,part:_0x374fb1}=hi(_0x5d7269);return _0x529f6d&&!_0x529f6d['affectsData']||_0x128d9f['ignoreResolvedComments']&&_0x3c7e65['getCommentThread'](_0x1fb14c)?.['isResolved']?null:{'group':'comment','name':_0x374fb1?_0x1fb14c+':'+_0x374fb1:_0x1fb14c};}}),_0x3b15ba['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x17c44f,{writer:_0x3df40c})=>_0x3df40c['createElement']('$marker',{'data-name':'comment:'+_0x17c44f['getAttribute']('id')})}),_0x3b15ba['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4f2e20=this['editor'],_0x43c577=_0x4f2e20['plugins']['get'](Qt),_0xcf4fc8=new Set(),_0x4f7802=new Set();_0x4f2e20['model']['document']['registerPostFixer'](_0xbd88f2=>{let _0x4c10b1=!0x1;for(const {name:_0x5f1454,data:_0x3f0077}of _0x4f2e20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d6380,id:_0x1ac240}=hi(_0x5f1454);let _0x523c48=_0x3f0077['newRange'];if('comment'!==_0x3d6380||!_0x523c48)continue;const _0x58a17b='$graveyard'===_0x523c48['root']['rootName'];_0x58a17b||(_0x523c48=li(_0x523c48,_0x4f2e20['model']),!_0x523c48||_0x523c48['isCollapsed']||!_0x3f0077['newRange']||_0x523c48['isEqual'](_0x3f0077['newRange']))?_0x4f2e20['model']['hasContent'](_0x523c48)&&!_0x58a17b?this['isThreadsLoadingPaused']?_0xcf4fc8['add'](_0x5f1454):this['_handleThreadMarker'](_0x5f1454,_0x1ac240):(_0x4f7802['add'](_0x5f1454),_0xcf4fc8['delete'](_0x5f1454),_0xbd88f2['removeMarker'](_0x5f1454),_0x4c10b1=!0x0):(_0xbd88f2['updateMarker'](_0x5f1454,{'range':_0x523c48}),_0x4c10b1=!0x0);}return _0x4c10b1;}),this['on']('change:isThreadsLoadingPaused',(_0x521487,_0x2bd62c,_0x57f294)=>{if(!_0x57f294&&_0xcf4fc8['size'])for(const _0x3ebd1f of _0xcf4fc8){const {id:_0x2f2a13}=hi(_0x3ebd1f);_0xcf4fc8['delete'](_0x3ebd1f),_0x4f2e20['model']['markers']['get'](_0x3ebd1f)&&this['_handleThreadMarker'](_0x3ebd1f,_0x2f2a13);}}),this['listenTo'](_0x4f2e20['model']['document'],'change',()=>{for(const {name:_0xfe479c,data:{newRange:_0x2c7e00}}of _0x4f2e20['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4919f1,id:_0x4fa601}=hi(_0xfe479c);if('comment'!==_0x4919f1)continue;const _0x435828=_0x43c577['getCommentThread'](_0x4fa601),_0x45f541=this['hasMarkerForId'](_0x4fa601);_0x435828&&(!_0x435828['_hasTargetInContent']&&_0x2c7e00&&_0x4f2e20['editing']['view']['once']('render',()=>{const _0x5b8587=_0x4f2e20['plugins']['get']($t),_0x4fa4ea=_0x43c577['_threadToController']['get'](_0x435828)['view'];_0x5b8587['getByInnerView'](_0x4fa4ea)['refreshVisibility']();},{'priority':'low'}),_0x435828['_hasTargetInContent']=_0x45f541||!!_0x2c7e00),_0x2c7e00||(_0x4f7802['add'](_0xfe479c),_0xcf4fc8['delete'](_0xfe479c));}for(const _0x53645e of _0x4f7802){const {id:_0x3520aa}=hi(_0x53645e),_0xf1a8fd=_0x43c577['getCommentThread'](_0x3520aa);if(_0xcf4fc8['delete'](_0x53645e),!_0xf1a8fd)continue;const _0x2c73b7=this['hasMarkerForId'](_0x3520aa);_0x2c73b7||_0xf1a8fd['isSubmitted']?_0x2c73b7||_0xf1a8fd['unlinkedAt']||_0xf1a8fd['setUnlinkedAt'](new Date()):_0xf1a8fd['remove']();}_0x4f7802['clear']();});}['_handleInitialThreads'](_0x58b7cc){_0x58b7cc['forEach'](_0x538228=>{_0x538228['unlinkedAt']&&this['_attachArchivedThread'](_0x538228['id']);});}['_getTargetForId'](_0x46ab9e){const _0x449003=this['editor'],_0x32fcb7=this['getAllMarkersForId'](_0x46ab9e);return _0x685d32(_0x449003['editing'],_0x32fcb7);}['_getTextContext'](_0x2de3a5){const _0x5d858c=this['getAllMarkersForId'](_0x2de3a5);let _0x38d9e7='',_0x162e3e=!0x1;for(const _0x531add of _0x5d858c){const _0x3f2efd=_0x531add['getRange']();for(const _0x5b774f of Array['from'](_0x3f2efd['getItems']()))_0x5b774f['is']('$textProxy')?(_0x38d9e7&&_0x162e3e&&(_0x38d9e7+='\x20',_0x162e3e=!0x1),_0x38d9e7+=_0x5b774f['data']):_0x162e3e=!0x0;_0x162e3e=!0x0;}return _0x38d9e7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1c79c8,_0x93f7dd){const _0x1b761d=this['editor'],_0xf610ae=_0x1b761d['plugins']['get'](Qt);let _0x238043=_0xf610ae['getCommentThread'](_0x93f7dd);const _0x539c3c=_0x1b761d['config']['get']('collaboration.channelId'),_0x4977d7=_0x1b761d['plugins']['get'](si);if(_0x238043&&(_0x238043['unlinkedAt']&&_0x238043['setUnlinkedAt'](null),_0x238043['isAttached']))return _0x238043;return!this['getAllMarkersForId'](_0x93f7dd)[0x0]['managedUsingOperations']?_0x1b761d['editing']['view']['once']('render',()=>{if(_0xf610ae['getCommentThread'](_0x93f7dd))return;const _0x11f502=_0x1b761d['plugins']['get']($t);_0x238043=_0xf610ae['openNewCommentThread']({'channelId':_0x539c3c,'threadId':_0x93f7dd,'target':()=>this['_getTargetForId'](_0x93f7dd),'context':{'type':'text','value':this['_getTextContext'](_0x93f7dd)}});const _0x1c143d=_0xf610ae['_threadToController']['get'](_0x238043)['view'],_0x21badf=_0x11f502['getByInnerView'](_0x1c143d);_0x21badf&&_0x4977d7['registerAnnotation'](_0x21badf);},{'priority':'low'}):_0xf610ae['fetchCommentThread']({'channelId':_0x539c3c,'threadId':_0x93f7dd})['then'](_0x35c76a=>{if('destroyed'!==_0x1b761d['state']){if(_0x238043=_0x35c76a,_0x238043&&!_0x238043['isAttached']){const _0x30caef=_0x238043['attachTo'](()=>this['_getTargetForId'](_0x93f7dd));_0x4977d7['registerAnnotation'](_0x30caef),_0x238043['isResolved']&&this['_reconvertMarkers'](_0x93f7dd);}else{if(!_0x238043){const _0x261f32=this['getAllMarkersForId'](_0x93f7dd);_0x1b761d['model']['change'](_0x26f655=>{for(const _0x3bd274 of _0x261f32)_0x26f655['removeMarker'](_0x3bd274);});}}}}),_0x238043;}['_handleThreadMarker'](_0x53f1b5,_0xd84134){const _0x8fa607=this['_attachMarkerToThread'](_0x53f1b5,_0xd84134);_0x8fa607&&!_0x8fa607['context']&&_0x8fa607['setContext']({'type':'text','value':this['_getTextContext'](_0xd84134)});}['_initAriaMarkerChangeAnnouncements'](){const _0x2024e6=this['editor'];_0x24df33(_0x2024e6['model'],({left:_0x25ec0a,entered:_0x2e7a95})=>{for(const _0x361b3e of _0x25ec0a)if(ui(_0x361b3e)){_0x2024e6['ui']['ariaLiveAnnouncer']['announce'](bt(_0x2024e6['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x60c86c of _0x2e7a95)if(ui(_0x60c86c)){_0x2024e6['ui']['ariaLiveAnnouncer']['announce'](bt(_0x2024e6['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x1381e4(_0x131ff7)));break;}});}}function di(_0x45849c,_0x4cf6d8){return _0x4cf6d8?_0x45849c+':'+_0x4cf6d8:_0x45849c;}function li(_0x3711fe,_0x4c0f08){const _0x312777=_0x4c0f08['schema'],_0x326ee1=_0x4c0f08['createRange'](_0x3711fe['start']);for(const _0x1ddbe4 of _0x3711fe['getWalker']()){const {type:_0x5269fb,item:_0x4b7ae3,nextPosition:_0x335348}=_0x1ddbe4;if('text'===_0x5269fb||_0x312777['isObject'](_0x4b7ae3)){const _0x4bc63d=_0x4c0f08['createPositionBefore'](_0x4b7ae3);_0x326ee1['isCollapsed']&&(_0x326ee1['start']=_0x4bc63d),_0x326ee1['end']=_0x335348;}}return _0x326ee1;}function ui(_0xf25c6d){return'comment'===hi(_0xf25c6d['name'])['group'];}class mi extends _0x91311a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x56b22d=this['editor'],_0x3335d0=_0x56b22d['plugins']['get'](Qt),_0x16f3d7=_0x56b22d['plugins']['get'](ci),_0x452f00=_0x56b22d['plugins']['get']($t),_0x3ffea6=_0x56b22d['plugins']['get'](si);_0x56b22d['ui']['componentFactory']['add']('comment',()=>{const _0x5d6f0e=this['_createUIButton'](_0x50e620);return _0x5d6f0e['tooltip']=!0x0,_0x5d6f0e;}),_0x56b22d['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x3ffea6['addSourceCollector'](()=>{const _0x3feab8=[];for(const [_0x4022f6,_0x2e2ba3]of _0x3335d0['_threadToController']){const _0x5a3b95=_0x16f3d7['getAllMarkersForId'](_0x4022f6['id']),_0x204542=_0x5a3b95['map'](_0x41db3f=>_0x41db3f['getRange']());_0x5a3b95['length']>0x0&&_0x3feab8['push']([_0x2e2ba3['view'],_0x204542]);}return _0x3feab8;}),this['listenTo'](_0x452f00,'change:activeAnnotations',(_0x16111c,_0x43ead7,_0x49bd99)=>{const _0x1d055e=Array['from'](_0x49bd99)['map'](_0x1e9f6a=>_0x1e9f6a['innerView'])['find'](_0x1f9ab5=>_0x3335d0['_viewToController']['has'](_0x1f9ab5));if(!_0x1d055e)return void(_0x16f3d7['activeMarker']=null);const _0x306274=_0x3335d0['_viewToController']['get'](_0x1d055e)['model']['id'],_0x3ac4e3='comment:'+_0x306274;_0x306274&&_0x16f3d7['hasMarkerForId'](_0x306274)?_0x16f3d7['activeMarker']=_0x3ac4e3:_0x16f3d7['activeMarker']&&(_0x16f3d7['activeMarker']=null);}),this['listenTo'](_0x3335d0,'removeCommentThread',(_0x5a4dfb,{threadId:_0x528b51,isFromAdapter:_0x1e97f5})=>{!_0x1e97f5&&_0x56b22d['ui']['focusTracker']['isFocused']&&_0x16f3d7['hasMarkerForId'](_0x528b51)&&_0x56b22d['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3335d0,'addComment',(_0x573e61,{threadId:_0x23881f,isFromAdapter:_0x180755})=>{if(_0x180755||!_0x16f3d7['hasMarkerForId'](_0x23881f)||!_0x3335d0['hasCommentThread'](_0x23881f))return;0x1===_0x3335d0['getCommentThread'](_0x23881f)['length']&&(_0x56b22d['editing']['view']['focus'](),_0x573e61['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x379cc2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x311a2a;for(const _0x32ea9c in _0x379cc2){const _0x35d2c3=_0x32ea9c,_0x194089=_0x379cc2[_0x35d2c3];if('commentsLicenseKeyValid'==_0x194089||'commentsLicenseKeyInvalid'==_0x194089||'commentsLicenseKeyExpired'==_0x194089||'commentsLicenseKeyDomainLimit'==_0x194089||'commentsLicenseKeyNotAllowed'==_0x194089||'commentsLicenseKeyEvaluationLimit'==_0x194089||'commentsLicenseKeyUsageLimit'==_0x194089){delete _0x379cc2[_0x35d2c3],_0x311a2a=_0x194089,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x311a2a&&_0x379cc2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x311a2a&&_0x379cc2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x311a2a&&_0x379cc2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x311a2a&&_0x379cc2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x311a2a&&_0x379cc2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x311a2a&&_0x379cc2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4e796b){const _0x1a7b57=this['editor'],_0x30ccc5=new _0x4e796b(_0x1a7b57['locale']),_0x565c54=_0x1a7b57['commands']['get']('addCommentThread');return _0x30ccc5['set']({'label':bt(_0x1a7b57['locale'],'Comment'),'icon':_0x44a19c}),_0x30ccc5['bind']('isEnabled')['to'](_0x565c54,'isEnabled',_0x565c54,'hasContent',(_0x16f36b,_0x919a7a)=>_0x16f36b&&_0x919a7a),this['listenTo'](_0x30ccc5,'execute',()=>{_0x565c54['execute']();}),_0x30ccc5;}}class fi extends _0x91311a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x24da4a){super(_0x24da4a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x46dc5c,_0x2a283f,_0x1ad141)=>{_0x1ad141?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x466487,_0x52f1ac]of this['editor']['commands'])_0x52f1ac['affectsData']&&'addCommentThread'!==_0x466487&&_0x52f1ac['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x2e7cb5=this['editor']['editing']['view']['document'];this['listenTo'](_0x2e7cb5,'cut',_0x4ffdce=>_0x4ffdce['stop'](),{'priority':'highest'}),this['listenTo'](_0x2e7cb5,'clipboardInput',_0x37edd4=>_0x37edd4['stop'](),{'priority':'highest'}),this['listenTo'](_0x2e7cb5,'delete',_0x359233=>_0x359233['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4e97e4,_0x5b3c78]of this['editor']['commands'])_0x5b3c78['affectsData']&&'addCommentThread'!==_0x4e97e4&&_0x5b3c78['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0xf6081e{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x113eb5){super(_0x113eb5),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5e2add=this['context']['plugins']['get']($t);this['listenTo'](_0x5e2add,'_activateAnnotation',(_0x2beed1,_0x4e5d8e)=>{for(const _0x4c05e2 of this['activeUIs']){const _0x120e21=this['_uis']['get'](_0x4c05e2);(0x0,this['uisData']['get'](_0x4c05e2)['filter'])(_0x4e5d8e)&&_0x120e21['setActiveAnnotation'](_0x4e5d8e);}}),this['listenTo'](_0x5e2add,'_deactivateAllAnnotations',()=>{for(const _0x888a96 of this['activeUIs']){this['_uis']['get'](_0x888a96)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5e2add['_visibleAnnotations'],'add',(_0xe1b57e,_0x2f658e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2f658e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x931527){return this['activeUIs']['has'](_0x931527);}['activate'](_0x54b81f,_0x34f6b2=this['defaultFilter']){const _0x2ab4a6=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x54b81f))throw new _0x2d21f6('annotationsuis-missing-ui',this,{'uiName':_0x54b81f});this['isActive'](_0x54b81f)&&this['deactivate'](_0x54b81f),this['activeUIs']['add'](_0x54b81f);const _0x4824de=new jt();Xt({'source':_0x2ab4a6['_visibleAnnotations'],'target':_0x4824de,'filter':_0x34f6b2}),this['uisData']['set'](_0x54b81f,{'collection':_0x4824de,'filter':_0x34f6b2});const _0x1bd462=this['_uis']['get'](_0x54b81f);_0x1bd462['attach'](_0x4824de),this['listenTo'](_0x1bd462,'change:activeAnnotation',(_0x192517,_0x355e1d,_0x47631d,_0x232983)=>{_0x232983&&_0x2ab4a6['_removeActiveAnnotation'](_0x232983),_0x47631d&&_0x2ab4a6['_addActiveAnnotation'](_0x47631d);});}['deactivate'](_0x26af59){if(this['activeUIs']['delete'](_0x26af59),!this['_uis']['has'](_0x26af59))throw new _0x2d21f6('annotationsuis-missing-ui',this,{'uiName':_0x26af59});const _0x327643=this['_uis']['get'](_0x26af59);_0x327643['detach'](),this['stopListening'](_0x327643),this['uisData']['get'](_0x26af59)['collection']['destroy'](),this['uisData']['delete'](_0x26af59);}['switchTo'](_0x5c93ab){if(!this['_uis']['has'](_0x5c93ab))throw new _0x2d21f6('annotationsuis-missing-ui',this,{'uiName':_0x5c93ab});const _0x16503d=this['context']['plugins']['get']($t),_0xee00dd=Array['from'](_0x16503d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5c93ab);const _0x165c80=this['_uis']['get'](_0x5c93ab);_0x165c80['setActiveAnnotation'](_0xee00dd),_0x165c80['_setSelectedAnnotations']&&_0xee00dd&&_0x165c80['_setSelectedAnnotations']([_0xee00dd]);}['deactivateAll'](){for(const _0x5d92b0 of this['activeUIs'])this['deactivate'](_0x5d92b0);}['register'](_0x11a994,_0x4903e5){if(this['_uis']['has'](_0x11a994))throw new _0x2d21f6('annotationsuis-register-already-registered');if('function'!=typeof _0x4903e5['attach']||'function'!=typeof _0x4903e5['detach']||'function'!=typeof _0x4903e5['setActiveAnnotation'])throw new _0x2d21f6('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x11a994,_0x4903e5);}['refilterAnnotations'](){const _0x38801f=this['context']['plugins']['get']($t)['collection'],_0x4fcd08=new Map(),_0x557376=Array['from'](this['activeUIs']);for(const _0x167400 of this['activeUIs']){const _0x1556ef=this['uisData']['get'](_0x167400)['collection'];for(const _0x18a864 of _0x1556ef)_0x4fcd08['set'](_0x18a864,_0x167400);}for(const _0x8a7aab of _0x38801f){const _0x1a217b=_0x4fcd08['get'](_0x8a7aab);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x8a7aab);const _0x604b69=_0x557376['find'](_0xafb93e=>this['uisData']['get'](_0xafb93e)['filter'](_0x8a7aab));_0x1a217b!==_0x604b69&&(_0x1a217b&&this['uisData']['get'](_0x1a217b)['collection']['remove'](_0x8a7aab),_0x604b69&&this['uisData']['get'](_0x604b69)['collection']['add'](_0x8a7aab));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4ee837){const _0x27436b=[];for(const _0x2fbc54 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2fbc54)['filter'])(_0x4ee837)&&_0x27436b['push'](_0x2fbc54);}if(_0x27436b['length']>0x1)throw new _0x2d21f6('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x27436b,'annotationType':_0x4ee837['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x55d622('px');class Ai extends _0x2f7517{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5adb66){super(_0x5adb66),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x549f73,_0x9bf956)=>_0x549f73+_0x9bf956),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4e80e2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4e80e2['to']('isAnimationDisabled',_0x194584=>_0x194584?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4e80e2['to']('top',_0x549bcc=>gi(_0x549bcc))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x46fb97=this['element']['clientHeight'];_0x46fb97&&(this['height']=_0x46fb97);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0xf6081e{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b434a){super(_0x1b434a),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x1e553a=this['context']['config']['get']('sidebar.container');_0x1e553a&&this['setContainer'](_0x1e553a);}['setContainer'](_0x3689be){if(!yi(_0x3689be))throw new _0x2d21f6('sidebar-setcontainer-invalid-element');this['container']=_0x3689be;}['_attachToContainer']({viewClass:_0x1fdfde='',spaceBetweenItems:_0x273460=0x19}={}){if(!yi(this['container']))throw new _0x2d21f6('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1fdfde,this['_spaceBetweenItems']=_0x273460;}['rearrange']({removedAnnotation:_0x2c6437,previousAnnotation:_0x518e30,nextAnnotation:_0x383422}){const _0x271abf=this['getSidebarItemView'](_0x2c6437);this['view']['list']['remove'](_0x271abf),this['_destroySidebarItemView'](_0x2c6437),_0x518e30&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x518e30)),_0x383422&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x383422)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x545edb,activatedAnnotation:_0x4a4c6e,disableAnimationOnActivatedAnnotation:_0x4b65f7}){if(this['_activeAnnotation']=_0x4a4c6e,_0x545edb){_0x545edb['isActive']=!0x1;const _0x4577c0=this['getSidebarItemView'](_0x545edb);_0x4577c0&&_0x4b65f7&&(_0x4577c0['isAnimationDisabled']=!0x1);}if(_0x4a4c6e){const _0x5cd8fe=this['getSidebarItemView'](_0x4a4c6e);_0x5cd8fe&&(_0x4a4c6e['isActive']=!0x0,_0x4b65f7&&(_0x5cd8fe['isAnimationDisabled']=!0x0,_0x5cd8fe['top']+=0x1),this['_alignToTargetRect'](_0x5cd8fe));}}['_detachFromContainer'](_0x1e03dd){if(this['view']['element']['remove'](),_0x1e03dd){for(const _0x31cb1f of _0x1e03dd)this['_destroySidebarItemView'](_0x31cb1f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3d069e,_0x51ced0){_0x51ced0||(_0x51ced0=_0x3d069e['view']);const _0x8835d1=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x8835d1,_0x3d069e),this['_annotationToSidebarItemView']['set'](_0x3d069e,_0x8835d1),_0x8835d1['content']['add'](_0x51ced0),this['listenTo'](_0x3d069e['view'],'change:targetRect',(_0x20bbd0,_0x501807,_0x5312ec)=>{const _0x5005df=this['_getTargetTop'](_0x3d069e,_0x5312ec);_0x8835d1['_targetTop']!=_0x5005df&&(_0x8835d1['_targetTop']=_0x5005df,this['_setItemTop'](_0x8835d1,_0x5005df));}),this['listenTo'](_0x8835d1,'change:top',()=>{this['_recalculate'](_0x8835d1,'top');}),this['listenTo'](_0x8835d1,'change:bottom',()=>{this['_recalculate'](_0x8835d1,'bottom');}),this['_alignToTargetRect'](_0x8835d1);const _0x4d2ff7=this['_getItemBefore'](_0x8835d1);if(_0x4d2ff7)this['_alignAfterItem'](_0x4d2ff7,_0x8835d1)||this['_alignToTargetRect'](_0x8835d1);else this['_alignToTargetRect'](_0x8835d1);return this['_updateLastItem'](),this['view']['list']['add'](_0x8835d1),_0x8835d1;}['_alignForTopChange'](_0x4ac5cd){if(!_0x4ac5cd['content']['length'])return;const _0x17c955=this['_getItemBefore'](_0x4ac5cd);if(!_0x17c955)return;const _0x56ebb7=this['_sidebarItemViewToAnnotation']['get'](_0x17c955),_0x37b486=this['_activeAnnotation'];_0x37b486&&_0x37b486===_0x56ebb7?this['_alignAfterItem'](_0x17c955,_0x4ac5cd):this['_alignBeforeItem'](_0x4ac5cd,_0x17c955);}['_alignForBottomChange'](_0x7ff1a0){if(!_0x7ff1a0['content']['length'])return;const _0x3aa6a6=this['_getItemAfter'](_0x7ff1a0);if(!_0x3aa6a6)return;const _0x45196e=this['_sidebarItemViewToAnnotation']['get'](_0x3aa6a6),_0x4f794a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4e877e=this['_activeAnnotation'];_0x4e877e&&_0x4e877e===_0x45196e&&_0x4f794a?(this['_alignBeforeItem'](_0x3aa6a6,_0x7ff1a0),this['_alignAfterItem'](_0x7ff1a0,_0x3aa6a6)):_0x4e877e&&_0x4e877e===_0x45196e?this['_alignBeforeItem'](_0x3aa6a6,_0x7ff1a0):this['_alignAfterItem'](_0x7ff1a0,_0x3aa6a6);}['_recalculate'](_0x2a4a9a,_0x4a3b67){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2002ae,changedProp:_0x3e272b}of this['_recalculateBuffer'])'top'===_0x3e272b?this['_alignForTopChange'](_0x2002ae):this['_alignForBottomChange'](_0x2002ae);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2a4a9a,'changedProp':_0x4a3b67});}['getSidebarItemView'](_0x43f36c){return this['_annotationToSidebarItemView']['get'](_0x43f36c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5b5ce3){const _0x4e1e38=this['getSidebarItemView'](_0x5b5ce3);this['stopListening'](_0x4e1e38),this['stopListening'](_0x5b5ce3['view']),_0x4e1e38['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5b5ce3),this['_sidebarItemViewToAnnotation']['delete'](_0x4e1e38);}['_createSidebarView'](){const _0x560b0d=new _i(this['context']['locale']);return _0x560b0d['render'](),this['on']('change:_lastItem',(_0x2933a3,_0x26020f,_0x68e586,_0x231b0d)=>{_0x231b0d&&_0x560b0d['unbind']('minHeight'),_0x68e586?_0x560b0d['bind']('minHeight')['to'](_0x68e586,'bottom'):_0x560b0d['minHeight']=null;}),_0x560b0d;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x39a1c1){const _0x17478f=this['_sidebarItemViewToAnnotation']['get'](_0x39a1c1),_0x4309e2=_0x17478f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x17478f)-0x1);return _0x4309e2&&this['getSidebarItemView'](_0x4309e2)||null;}['_getItemAfter'](_0x71c71e){const _0x547d12=this['_sidebarItemViewToAnnotation']['get'](_0x71c71e),_0x291398=_0x547d12&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x547d12)+0x1);return _0x291398&&this['getSidebarItemView'](_0x291398)||null;}['_alignBeforeItem'](_0x34a284,_0x1fa53a){_0x34a284['updateHeight']();const _0x56b39b=vi(_0x1fa53a['bottom']+this['_spaceBetweenItems'],_0x34a284['top']);return!!_0x56b39b&&(this['_setItemTop'](_0x1fa53a,_0x1fa53a['top']-_0x56b39b),!0x0);}['_alignAfterItem'](_0x128aa9,_0x2e4bae){_0x128aa9['updateHeight']();const _0x719b0a=vi(_0x128aa9['bottom']+this['_spaceBetweenItems'],_0x2e4bae['top']);return!!_0x719b0a&&(this['_setItemTop'](_0x2e4bae,_0x2e4bae['top']+_0x719b0a,!0x1),!0x0);}['_alignToTargetRect'](_0x176269){const _0x2035e6=this['_sidebarItemViewToAnnotation']['get'](_0x176269);if(!_0x2035e6||!_0x2035e6['target']||!_0x2035e6['targetRect'])return;const _0x4ae2f9=this['_getTargetTop'](_0x2035e6,_0x2035e6['targetRect']);this['_setItemTop'](_0x176269,_0x4ae2f9);}['_getTargetTop'](_0x46ac36,_0x30d163){if(null===_0x30d163)return 0x0;if(_0x46ac36['target']instanceof _0x1ed994)return _0x30d163['top'];{const _0x256640=new _0x1ed994(this['view']['element'])['top'];return _0x30d163['top']-_0x256640;}}['_setItemTop'](_0x8b86cf,_0x48754c,_0x1f2cdb=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1f2cdb&&(_0x48754c=Math['max'](_0x48754c,this['_getMaxAvailableTop'](_0x8b86cf))),_0x8b86cf['top']=_0x48754c;}['_getMaxAvailableTop'](_0x1991b1){let _0x2bff19=this['_getItemBefore'](_0x1991b1),_0x374562=0x0;for(;_0x2bff19;)_0x2bff19['updateHeight'](),_0x374562+=this['_spaceBetweenItems']+_0x2bff19['height'],_0x2bff19=this['_getItemBefore'](_0x2bff19);return _0x374562;}}function vi(_0x13749,_0x46f0a0){return Math['max'](_0x13749-_0x46f0a0,0x0);}function yi(_0x1c1738){return null!==_0x1c1738&&'object'==typeof _0x1c1738&&0x1===_0x1c1738['nodeType'];}class Ci extends _0xf6081e{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x202b0a){super(_0x202b0a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xf4c9ca(),this['_refreshPositioningDebounced']=_0x51df8a(()=>{_0x202b0a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2839a4=this['context']['plugins']['get'](pi),_0x484bae=this['context']['plugins']['get'](Ti);_0x2839a4['register']('wideSidebar',this),_0x484bae['container']&&_0x2839a4['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x446b34){if(_0x446b34===this['activeAnnotation'])return;const _0x41b792=this['context']['plugins']['get'](Ti);_0x41b792['_activeAnnotation']=_0x446b34;const _0x1b77a6=this['activeAnnotation'];_0x41b792['refresh']({'blurredAnnotation':_0x1b77a6,'activatedAnnotation':_0x446b34}),this['activeAnnotation']=_0x446b34;}['attach'](_0x414aca){this['annotations']=_0x414aca;const _0x711308=this['context']['plugins']['get'](Ti);if(_0x711308['_annotations']=_0x414aca,this['isAttached'])throw new _0x2d21f6('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x711308,'set:container',()=>{this['detach'](),this['listenTo'](_0x711308,'change:container',_0x2ff43f=>{_0x2ff43f['off'](),this['attach'](_0x414aca);});}),_0x711308['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3e3954=_0x1f7a70=>{_0x1f7a70['updateTargetRect'](),_0x711308['addAnnotation'](_0x1f7a70);};for(const _0x49ff97 of _0x414aca)_0x3e3954(_0x49ff97);this['listenTo'](_0x414aca,'add',(_0x44f5c7,_0x9c1763)=>{_0x3e3954(_0x9c1763);}),this['listenTo'](_0x414aca,'remove',(_0x486507,_0x3a7c75,_0x4173ed)=>{_0x711308['rearrange']({'removedAnnotation':_0x3a7c75,'previousAnnotation':_0x414aca['get'](_0x4173ed-0x1),'nextAnnotation':_0x414aca['get'](_0x4173ed+0x1)}),_0x3a7c75===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x414aca,'focus',(_0x390bf7,_0x437b6e)=>{this['setActiveAnnotation'](_0x437b6e);}),this['listenTo'](_0x414aca,'blur',()=>{this['setActiveAnnotation'](null);});const _0x7927a7=this['context']instanceof _0x25049f?this['context']['editors']:new _0xf4c9ca([this['context']]);for(const _0x23c0a5 of _0x7927a7)this['_integrateWithEditorAnnotations'](_0x23c0a5);this['listenTo'](_0x7927a7,'add',(_0x22d691,_0x30a5e7)=>{this['listenTo'](_0x30a5e7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x30a5e7);});}),this['listenTo'](_0x7927a7,'remove',(_0xb6c28f,_0x2f911a)=>{_0x2f911a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2f911a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2d21f6('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2ed280=this['context']['plugins']['get'](Ti);_0x2ed280['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2ed280),this['stopListening'](this['annotations']),this['context']instanceof _0x25049f&&this['stopListening'](this['context']['editors']);for(const _0x280c4b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x280c4b);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2c0249){if(!_0x2c0249['plugins']['has']('EditorAnnotations'))return;const _0x5a0224=_0x2c0249['plugins']['get']('EditorAnnotations'),_0x59302d=()=>{const _0x3e0f84=_0x5a0224['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3e0f84[0x0]||null);};this['listenTo'](_0x5a0224,'refresh',_0x59302d),this['listenTo'](_0x5a0224,'blur',(_0x36201a,{isAnnotationTracked:_0x3151b8})=>{this['activeAnnotation']&&_0x3151b8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5a0224,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x59af68=>{_0x5a0224['hasDomSelection']()&&(_0x59302d(),_0x59af68['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5a0224);}['_destroyEditorAnnotationsIntegration'](_0x1dff4d){this['stopListening'](_0x1dff4d),this['_editorAnnotations']['remove'](_0x1dff4d);}}class Ii extends _0x50e620{['counterView'];constructor(_0x2b3fe0){super(_0x2b3fe0);const _0x774483=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4bba03,_0x56786c)=>_0x4bba03?'...':_0x56786c['toString']()),this['set']('annotationType',''),this['icon']=_0x44a19c,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x2f7517(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x774483['to']('annotationType',_0x2e5257=>'ck-annotation-counter__badge--'+_0x2e5257),_0x774483['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x774483['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0xf6081e{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x171868){super(_0x171868),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x357f19())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xf4c9ca(),this['_refreshPositioningDebounced']=_0x51df8a(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2ed903){this['annotations']=_0x2ed903;const _0x2541ee=this['context']['plugins']['get'](Ti),_0x19607d=this['balloonPanelView'];if(_0x2541ee['_annotations']=_0x2ed903,this['isAttached'])throw new _0x2d21f6('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2541ee,'set:container',()=>{this['detach'](),this['listenTo'](_0x2541ee,'change:container',_0x2f7378=>{_0x2f7378['off'](),this['attach'](_0x2ed903);});}),_0x2541ee['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x444991=_0x18c74d=>{const _0x338aea=new Ii(this['context']['locale']);_0x2541ee['addAnnotation'](_0x18c74d,_0x338aea),this['_annotationToNarrowView']['set'](_0x18c74d,_0x338aea),_0x338aea['bind']('isDirty','annotationType','number')['to'](_0x18c74d['view'],'isDirty','type','length'),_0x338aea['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x19607d['content']['first']!==_0x18c74d['view']?(this['_showBalloon'](_0x18c74d),_0x18c74d['view']['element']['focus'](),this['setActiveAnnotation'](_0x18c74d)):this['setActiveAnnotation'](null);});};for(const _0x19d8e9 of _0x2ed903)_0x444991(_0x19d8e9);this['listenTo'](_0x2ed903,'add',(_0x3d0bdd,_0x6bd3bc)=>{_0x444991(_0x6bd3bc);}),this['listenTo'](_0x2ed903,'remove',(_0x2373d9,_0x5e524a,_0xb7bb75)=>{this['_annotationToNarrowView']['get'](_0x5e524a)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5e524a),_0x2541ee['rearrange']({'removedAnnotation':_0x5e524a,'previousAnnotation':_0x2ed903['get'](_0xb7bb75-0x1),'nextAnnotation':_0x2ed903['get'](_0xb7bb75+0x1)}),_0x5e524a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2ed903,'focus',(_0x4c44ba,_0x412de8)=>{this['setActiveAnnotation'](_0x412de8);}),this['listenTo'](_0x2ed903,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2e095b,_0x55975d)=>{_0x55975d['keyCode']===_0x2c96d0['esc']&&_0x19607d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x19607d['content']['first']),this['_hideBalloon'](),_0x55975d['stopPropagation'](),_0x55975d['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x46dcbf,_0x45618e)=>{const _0x141552=_0x45618e['target'];_0x19607d['isVisible']&&_0x19607d['element']['contains'](_0x141552)||_0x2541ee['view']['element']['contains'](_0x141552)||_0x46dcbf['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x278caa=>_0x278caa['contains'](_0x141552))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x124f03=this['context']instanceof _0x25049f?this['context']['editors']:new _0xf4c9ca([this['context']]);for(const _0x132b05 of _0x124f03)this['_integrateWithEditorAnnotations'](_0x132b05);this['listenTo'](_0x124f03,'add',(_0x5242cb,_0x1980bf)=>{this['listenTo'](_0x1980bf,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1980bf);});}),this['listenTo'](_0x124f03,'remove',(_0x5e117e,_0x3c0bab)=>{_0x3c0bab['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3c0bab['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x572a48){if(_0x572a48===this['activeAnnotation'])return;const _0x21b779=this['context']['plugins']['get'](Ti);if(_0x21b779['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x572a48,'disableAnimationOnActivatedAnnotation':!0x0}),_0x572a48)_0x21b779['getSidebarItemView'](_0x572a48)?this['_showBalloon'](_0x572a48):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x572a48;}['detach'](){if(!this['isAttached'])throw new _0x2d21f6('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4b3e19=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4a7d98=>_0x4a7d98['destroy']()),this['_annotationToNarrowView']['clear'](),_0x4b3e19['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x25049f&&this['stopListening'](this['context']['editors']);for(const _0x281139 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x281139);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x58ceb5){if(!_0x58ceb5['plugins']['has']('EditorAnnotations'))return;const _0x4cdeb2=_0x58ceb5['plugins']['get']('EditorAnnotations'),_0x14c567=this['context']['plugins']['get'](Ti),_0x1d718e=this['annotations'],_0x4deeb2=this['balloonPanelView'],_0x10c3ab=()=>{const _0x38c25=_0x4cdeb2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x38c25),this['setActiveAnnotation'](_0x38c25[0x0]||null);};this['listenTo'](_0x4cdeb2,'refresh',_0x10c3ab),this['listenTo'](_0x4cdeb2,'blur',(_0x54de71,{isAnnotationTracked:_0x50a104})=>{this['activeAnnotation']&&_0x50a104(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4cdeb2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1d718e,'blur',_0xe88ece=>{_0x4cdeb2['hasDomSelection']()&&_0xe88ece['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x43b265,_0xf4e180)=>{const _0x2ac64f=_0xf4e180['target'];_0x4deeb2['isVisible']&&_0x4deeb2['element']['contains'](_0x2ac64f)||_0x14c567['view']['element']['contains'](_0x2ac64f)||this['activeAnnotation']&&_0x4cdeb2['hasDomSelection']()&&(_0x10c3ab(),_0x43b265['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4cdeb2);}['_destroyEditorAnnotationsIntegration'](_0x344a11){_0x344a11&&(this['stopListening'](_0x344a11),this['_editorAnnotations']['remove'](_0x344a11));}['_setSelectedAnnotations'](_0x5a9117){for(const _0x3b65df of this['_selectedAnnotations'])_0x5a9117['includes'](_0x3b65df)||this['_manuallyClosedAnnotationViews']['delete'](_0x3b65df['view']);this['_selectedAnnotations']=_0x5a9117;}['_refreshPositioning'](){const _0x30ee11=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x30ee11['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x14523a){if(this['_manuallyClosedAnnotationViews']['has'](_0x14523a['view']))return;const _0x2464ab=this['balloonPanelView']['content']['first'];_0x2464ab!==_0x14523a['view']?(_0x2464ab&&this['_detachListeners'](_0x2464ab),this['_attachListeners'](_0x14523a['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x14523a['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3d9920=this['balloonPanelView']['content']['first'],_0x907dfd=_0x3d9920&&this['annotations']['getByView'](_0x3d9920);if(!_0x907dfd||!this['_annotationToNarrowView']['has'](_0x907dfd))return;const _0x38f198=this['_annotationToNarrowView']['get'](_0x907dfd)['element'],_0x28e638=(function(){const _0xc6535b=ht['defaultPositions'];return[_0xc6535b['southArrowNorthEast'],_0xc6535b['northArrowSouthEast'],_0xc6535b['southArrowNorth'],_0xc6535b['northArrowSouth'],_0xc6535b['southArrowNorthWest'],_0xc6535b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x38f198,'positions':_0x28e638});}['_hideBalloon'](){const _0x2723bf=this['balloonPanelView'],_0x2ccad7=_0x2723bf['content']['first'];_0x2ccad7&&(this['_detachListeners'](_0x2ccad7),_0x2723bf['unpin'](),_0x2723bf['content']['clear']());}['_attachListeners'](_0x3bf637){this['listenTo'](_0x3bf637,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3bf637,'Esc',(_0x4fc926,_0x3d9419)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3bf637),this['_hideBalloon'](),_0x3d9419();});}['_detachListeners'](_0x30ef50){this['stopListening'](_0x30ef50);}}class Ei extends _0x91311a{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x559a07){super(_0x559a07),_0x559a07['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x559a07['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x51df8a(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x40a8ff=this['editor']['plugins']['get'](pi);_0x40a8ff['context']===this['editor']&&(_0x40a8ff['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x23b5d9,_0x4efd7c)=>{const _0x3ea282=this['_balloon'];if(this['isAttached']&&_0x3ea282['visibleView']){const _0x1793f9=this['annotations']['getByView'](_0x3ea282['visibleView']);_0x1793f9&&this['_closeAnnotation'](_0x1793f9),_0x4efd7c();}}));}['afterInit'](){const _0x24c796=this['editor']['plugins']['get'](pi);_0x24c796['context']===this['editor']&&(_0x24c796['hasActive']()||_0x24c796['switchTo']('inline'));}['setActiveAnnotation'](_0x33aa34){_0x33aa34!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x33aa34&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x33aa34)&&this['_addAnnotationToBalloon'](_0x33aa34,!0x0),_0x33aa34['isActive']=!0x0),_0x33aa34||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x33aa34);}['attach'](_0x3da50a){this['annotations']=_0x3da50a;const _0x461ca1=this['editor']['plugins']['get'](pi),_0x3df79e=this['_balloon'];if(this['isAttached'])throw new _0x2d21f6('inlineannotations-attach-already-attached',this);if(_0x461ca1['context']!==this['editor'])throw new _0x2d21f6('inlineannotations-not-allowed-with-context',this);const _0x37f5bd=this['editor']['plugins']['get'](si);this['listenTo'](_0x37f5bd,'refresh',()=>{const _0x5e01af=_0x37f5bd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x189b1e,_0x8f721b;!this['_forceRefresh']&&(_0x189b1e=_0x5e01af,_0x8f721b=this['_selectedAnnotations'],_0x189b1e['length']===_0x8f721b['length']&&_0x189b1e['every'](_0x1e06af=>_0x8f721b['includes'](_0x1e06af)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5e01af),this['setActiveAnnotation'](_0x5e01af[0x0]||null));}),this['listenTo'](_0x37f5bd,'blur',(_0x98b91b,{isAnnotationTracked:_0x25b30b})=>{this['activeAnnotation']&&_0x25b30b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x37f5bd,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0xa13c83,_0x3f323a,_0x4b8bfc)=>{_0x4b8bfc||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3da50a,'remove',(_0x14475d,_0x20031f)=>{this['_removeAnnotationFromBalloon'](_0x20031f),_0x20031f===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3df79e,'change:visibleView',(_0x39c68f,_0x265c19,_0x402906,_0x49f323)=>{_0x49f323&&this['stopListening'](_0x49f323);const _0x10a37b=_0x3da50a['getByView'](_0x402906);_0x402906&&_0x10a37b&&(this['listenTo'](_0x402906,'change:height',()=>{_0x3df79e['updatePosition']();}),this['listenTo'](_0x402906,'Esc',()=>{this['_closeAnnotation'](_0x10a37b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x10a37b&&this['setActiveAnnotation'](_0x10a37b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3df79e['visibleView']&&(_0x3da50a['getByView'](_0x3df79e['visibleView'])&&_0x3df79e['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x2d21f6('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x263afb of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x263afb);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x39bab2){for(const _0x3e1e8a of this['_selectedAnnotations'])_0x39bab2['includes'](_0x3e1e8a)||this['_manuallyClosed']['delete'](_0x3e1e8a);for(const _0x2de9b5 of this['annotations'])_0x39bab2['includes'](_0x2de9b5)||this['_removeAnnotationFromBalloon'](_0x2de9b5);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2231cd of _0x39bab2)this['_addAnnotationToBalloon'](_0x2231cd);}this['_selectedAnnotations']=_0x39bab2;}['_addAnnotationToBalloon'](_0xac4e97,_0x380ab6=!0x1){this['_manuallyClosed']['has'](_0xac4e97)||(this['_addedAnnotations']['has'](_0xac4e97)||this['_balloon']['hasView'](_0xac4e97['view'])||(this['_addedAnnotations']['add'](_0xac4e97),this['_balloon']['add']({'stackId':_0xac4e97['view']['id'],'view':_0xac4e97['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xac4e97)}})),_0x380ab6&&this['_balloon']['showStack'](_0xac4e97['view']['id']));}['_getBalloonTargetForAnnotation'](_0x295285){const _0x347442=_0x295285['target'],_0x31bd61=this['editor']['editing']['view'],_0xec054f=_0x31bd61['document']['selection']['getFirstRange'](),_0x53dbe6=_0x31bd61['domConverter']['viewRangeToDom'](_0xec054f);if(_0x53dbe6['collapse'](!0x0),_0x347442){if(_0x347442 instanceof _0x1ed994)return _0x347442;let _0x8cd076=[];for(const _0x5d786a of _0x347442)_0x8cd076['push'](..._0x1ed994['getDomElementRects'](_0x5d786a));_0x8cd076=function(_0x28529d){const _0x7bdf5b=[];let _0x2feb01=_0x28529d[0x0];for(let _0x1c0298=0x1;_0x1c0298<_0x28529d['length'];_0x1c0298++)if(Ni(_0x2feb01,_0x28529d[_0x1c0298])){const _0x44b11d=_0x28529d[_0x1c0298]['width'];_0x2feb01['width']+=_0x44b11d,_0x2feb01['right']+=_0x44b11d;}else _0x7bdf5b['push'](_0x2feb01),_0x2feb01=_0x28529d[_0x1c0298];return _0x7bdf5b['push'](_0x2feb01),_0x7bdf5b;}(_0x8cd076);const _0xaf5aa1=_0x53dbe6['getBoundingClientRect']();return _0x8cd076['find'](_0x4be5ce=>_0x4be5ce['top']<=_0xaf5aa1['top']&&_0x4be5ce['bottom']>=_0xaf5aa1['bottom']&&_0x4be5ce['left']<=_0xaf5aa1['left']&&_0x4be5ce['right']>=_0xaf5aa1['right'])||_0x8cd076[0x0];}return _0x295285['targetRect']||_0x53dbe6;}['_removeAnnotationFromBalloon'](_0x261b1f){this['_addedAnnotations']['has'](_0x261b1f)&&this['_balloon']['hasView'](_0x261b1f['view'])&&(this['_addedAnnotations']['delete'](_0x261b1f),this['_balloon']['remove'](_0x261b1f['view']));}['_closeAnnotation'](_0x376ec9){this['_manuallyClosed']['add'](_0x376ec9),this['_removeAnnotationFromBalloon'](_0x376ec9);}}function Ni(_0x21cb59,_0x4a6564){return _0x21cb59['top']===_0x4a6564['top']&&_0x21cb59['bottom']===_0x4a6564['bottom']&&_0x21cb59['right']===_0x4a6564['left'];}class ki extends _0x2f7517{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x9e7e1c,_0x1e3222){super(_0x9e7e1c),this['set']('isEmpty',!_0x1e3222['length']),this['focusTracker']=new _0x616088(),this['_annotationViews']=_0x1e3222,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x15b20c({'focusables':_0x1e3222,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1e3222,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1e3222,'remove',(_0x4b1c6d,_0x3aab15)=>{_0x3aab15['isActive']&&this['focus'](),_0x1e3222['length']||(this['isEmpty']=!0x0);});const _0x20e82f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x9e7e1c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1e3222},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x20e82f['if']('isEmpty','ck-hidden',_0x2b6545=>!_0x2b6545)]},'children':[{'text':bt(_0x9e7e1c,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x3ffb46 of this['_annotationViews'])this['focusTracker']['add'](_0x3ffb46['element']);this['_annotationViews']['on']('change',(_0x284ebf,{added:_0x6ec115,removed:_0x323da0})=>{for(const _0x598978 of _0x6ec115)this['focusTracker']['add'](_0x598978['element']);for(const _0xfe680e of _0x323da0)this['focusTracker']['remove'](_0xfe680e['element']);});}}class Oi extends _0xf6081e{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x44321e){super(_0x44321e),this['archivedThreads']=new _0xf4c9ca();}['init'](){const _0x14a06f=this['context'],_0x56bd90=_0x14a06f['plugins']['get'](Qt),_0x2ed5c3=_0x14a06f['plugins']['get']($t);this['listenTo'](_0x56bd90,'addCommentThread',(_0x30ea88,{threadId:_0x13c586})=>{const _0x49dd2b=_0x56bd90['getCommentThread'](_0x13c586);_0x49dd2b['archivedAt']&&this['archivedThreads']['add'](_0x49dd2b,this['_calculatePosition'](_0x49dd2b['archivedAt'])),this['listenTo'](_0x49dd2b,'change:archivedAt',(_0x5b3f96,_0x1042f6,_0x1e44d3)=>{_0x1e44d3?this['archivedThreads']['has'](_0x49dd2b)||this['archivedThreads']['add'](_0x49dd2b,this['_calculatePosition'](_0x49dd2b['archivedAt'])):this['archivedThreads']['has'](_0x49dd2b)&&this['archivedThreads']['remove'](_0x49dd2b);});}),this['listenTo'](_0x56bd90,'removeCommentThread',(_0x378123,{threadId:_0x565c5d})=>{const _0x1c3833=_0x56bd90['getCommentThread'](_0x565c5d);this['stopListening'](_0x1c3833),this['archivedThreads']['has'](_0x1c3833)&&this['archivedThreads']['remove'](_0x1c3833);},{'priority':'highest'}),this['listenTo'](_0x2ed5c3['collection'],'focus',(_0xef86e,_0x26c14c)=>{_0x26c14c['isVisible']||(_0x26c14c['isActive']=!0x0,_0x2ed5c3['activate'](_0x26c14c));});}['_calculatePosition'](_0x548fdb){const _0x2557bd=[...this['archivedThreads']]['findIndex'](_0x3dea6c=>_0x3dea6c['archivedAt']<_0x548fdb);return _0x2557bd>-0x1?_0x2557bd:this['archivedThreads']['length'];}}class Mi extends _0x91311a{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x22e059){super(_0x22e059),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4c9efa=this['editor'],_0x4cc093=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4c9efa['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x50e620,!0x0)),_0x4c9efa['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x31757a=this['_createCommentsArchiveButton'](ot);return _0x31757a['set']({'role':'menuitemcheckbox'}),_0x31757a;});const _0x3385cc=_0x4c9efa['plugins']['get'](Oi),_0x393393=_0x4c9efa['plugins']['get']('Annotations'),_0x205029=_0x4c9efa['plugins']['get']('CommentsRepository');_0x3385cc['archivedThreads']['forEach'](_0x5c6ee9=>{this['_handleNewThread'](_0x5c6ee9);}),this['listenTo'](_0x3385cc['archivedThreads'],'add',(_0x49c3ae,_0x954ee4)=>{this['_handleNewThread'](_0x954ee4);}),this['listenTo'](_0x393393['collection'],'add',(_0x36de36,_0x2cab3b)=>{const _0x584e8d=this['_pendingThreads']['find'](_0x5b5d32=>{const _0x3ce9fe=_0x205029['_threadToController']['get'](_0x5b5d32);return _0x3ce9fe&&_0x2cab3b['innerView']===_0x3ce9fe['view'];});if(_0x584e8d){const _0x31fb54=this['_calculatePosition'](_0x584e8d['archivedAt']);this['_addAnnotationToArchive'](_0x2cab3b,_0x31fb54),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x584e8d),0x1);}}),this['listenTo'](_0x3385cc['archivedThreads'],'remove',(_0x37bd14,_0x1c6ca6)=>{const _0x389585=_0x4c9efa['config']['get']('collaboration.channelId');if(!_0x389585||_0x1c6ca6['channelId']===_0x389585){if(this['_pendingThreads']['includes'](_0x1c6ca6))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1c6ca6),0x1);else{const _0x21cb84=_0x205029['_threadToController']['get'](_0x1c6ca6),_0x6c8771=_0x393393['getByInnerView'](_0x21cb84['view']);this['annotationViews']['remove'](_0x6c8771['view']),this['stopListening'](_0x6c8771),this['stopListening'](_0x6c8771['focusableElements']);}}}),this['listenTo'](_0x393393['collection'],'add',(_0x5b8a7f,_0x2e43fd)=>{this['listenTo'](_0x2e43fd,'escape',_0x4cc093);}),this['listenTo'](_0x393393['collection'],'remove',(_0xa22bc6,_0x4aee2d)=>{this['stopListening'](_0x4aee2d,'escape',_0x4cc093);});}['_addAnnotationToArchive'](_0x53aa29,_0x542979){this['listenTo'](_0x53aa29,'set:isVisible',_0x28a91c=>{_0x28a91c['return']=!0x1,_0x28a91c['stop']();}),this['annotationViews']['add'](_0x53aa29['view'],_0x542979);}['_handleNewThread'](_0x49ffe1){const _0x6e21bc=this['editor']['plugins']['get']('CommentsRepository'),_0x316843=this['editor']['plugins']['get']('Annotations'),_0x30afd7=this['editor']['config']['get']('collaboration.channelId');if(!_0x30afd7||_0x49ffe1['channelId']===_0x30afd7){const _0xb8482d=_0x6e21bc['_threadToController']['get'](_0x49ffe1);if(!_0xb8482d)return void this['_pendingThreads']['push'](_0x49ffe1);const _0x33f5e4=this['_calculatePosition'](_0x49ffe1['archivedAt']),_0x9a1457=_0x316843['getByInnerView'](_0xb8482d['view']);_0x9a1457['isVisible']&&_0x316843['_visibleAnnotations']['remove'](_0x9a1457),this['_addAnnotationToArchive'](_0x9a1457,_0x33f5e4);}}['_calculatePosition'](_0x19a36a){const _0x586190=this['editor']['config']['get']('collaboration.channelId'),_0x16b3d8=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0xd13020=>_0xd13020['channelId']===_0x586190)['findIndex'](_0x4347ce=>_0x4347ce['archivedAt']<_0x19a36a);return _0x16b3d8<0x0||_0x16b3d8>this['annotationViews']['length']?this['annotationViews']['length']:_0x16b3d8-0x1;}['_toggleDialog'](){const _0xc88500=this['editor'],_0xd282e2=_0xc88500['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0xc88500['locale'],this['annotationViews'])),'commentsArchive'===_0xd282e2['id']?_0xd282e2['hide']():_0xd282e2['show']({'id':'commentsArchive','title':bt(_0xc88500['locale'],'COMMENTS_ARCHIVE'),'icon':_0x24e872,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x22c988,_0x36afa7=!0x1){const _0x34a886=this['editor']['locale'],_0x343885=this['editor']['plugins']['get']('Dialog'),_0x2c5d4b=new _0x22c988(_0x34a886);return _0x2c5d4b['bind']('isEnabled')['to'](this,'isEnabled'),_0x2c5d4b['bind']('isOn')['to'](_0x343885,'id',_0x15372a=>'commentsArchive'===_0x15372a),_0x2c5d4b['set']({'label':bt(_0x34a886,'COMMENTS_ARCHIVE'),'icon':_0x24e872,'isToggleable':!0x0}),_0x36afa7&&(_0x2c5d4b['tooltip']=!0x0),this['listenTo'](_0x2c5d4b,'execute',()=>this['_toggleDialog']()),_0x2c5d4b;}['_hideDialogOnAnnotationEscape']=_0x3589fe=>{const _0xcf9a5f=_0x3589fe['source'];if(!this['annotationViews']['has'](_0xcf9a5f['view']))return;const _0x4298aa=this['editor']['plugins']['get']('Dialog');_0x4298aa['isOpen']&&'commentsArchive'===_0x4298aa['id']&&(_0x4298aa['hide'](),_0x3589fe['stop']());};}class Ri extends _0x91311a{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x3b513d,ContextPlugin as _0x1b2568,PendingActions as _0xa4ae56,Command as _0x596559,Plugin as _0x4edfe9,Context as _0x1a46e3}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1cc06c,uid as _0x1b80c2,KeystrokeHandler as _0x4c4bad,FocusTracker as _0x37d37b,diff as _0x356816,Collection as _0x5c5ef1,Rect as _0x50bd0c,CKEditorError as _0x14a8d1,first as _0x477662,priorities as _0x1c06c6,scrollViewportToShowTarget as _0x5b12c0,getEnvKeystrokeText as _0x12f398,toUnit as _0x2dc104,DomEmitterMixin as _0x1a633f,keyCodes as _0x13c0db}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x12e0d7,AriaDescriptionView as _0x5a1787,setupThreadKeyboardNavigation as _0x19091d,ConfirmMixin as _0xdfe38d,LateFocusButtonView as _0x4a627a,trimHtml as _0x39f09d,LateFocusDropdownButtonView as _0x3f7faa,FOCUS_ANNOTATION_KEYSTROKE as _0x4bf999,Users as _0x2911ec,getDateTimeFormatter as _0xf732fd,hashObject as _0x34883d,getAllMarkersDomElementsSorted as _0x4c499d,surroundingMarkersDetector as _0x310275}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x588486,cloneDeep as _0x103628,set as _0x5212f2,unset as _0x19194c,isEqual as _0x3515a0,debounce as _0x1b709e}from'es-toolkit/compat';import{IconUndo as _0x2890fd,IconCheck as _0x36f9d0,IconPencil as _0x5211a7,IconRemoveComment as _0x310348,IconThreeVerticalDots as _0x47166c,IconAddComment as _0x32646e,IconCommentsArchive as _0x337582}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x4869b8,InlineEditableUIView as _0x13b36c,EditorUI as _0x1190b8,View as _0x4e9ac4,FocusCycler as _0x3a36bc,ButtonView as _0x4cf22d,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1cc06c(){['model'];['view'];constructor(_0x385c5b,_0x3a070e){super(),this['model']=_0x385c5b,this['model']['_isAttached']=!0x0,this['view']=_0x3a070e,this['listenTo'](_0x3a070e,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x3a070e,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x3a070e,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x3a070e,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x3a070e,'addComment',(_0x3c8373,_0x3cd9d0)=>this['addComment'](_0x3cd9d0)),this['listenTo'](_0x3a070e,'updateComment',(_0x385035,_0x1d204e,_0x9a5481)=>this['updateComment'](_0x1d204e,_0x9a5481)),this['listenTo'](_0x3a070e,'removeComment',(_0x4f890c,_0x53dac4)=>this['removeComment'](_0x53dac4));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x297653){this['model']['addComment']({'content':_0x297653,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xe8e0ac,_0x1149c7){this['model']['getComment'](_0xe8e0ac)['update']({'content':_0x1149c7});}['removeComment'](_0x5691a0){this['model']['getComment'](_0x5691a0)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x1e032b,_0x1b7b4d,_0x73e9d4){const t=_0x1e032b['t'];switch(_0x1b7b4d){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'},_0x73e9d4);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x73e9d4);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'},_0x73e9d4);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'},_0x73e9d4);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x73e9d4);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'},_0x73e9d4);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'},_0x73e9d4);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'},_0x73e9d4);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0x4869b8{['main'];['editable'];constructor(_0x482ea5,_0x5b427a){super(_0x482ea5);const _0x5873fc=_0x1b80c2();this['main']=this['createCollection'](),this['editable']=new _0x13b36c(_0x482ea5,_0x5b427a,void 0x0,{'label':()=>bt(_0x482ea5,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x482ea5['uiLanguageDirection'],'lang':_0x482ea5['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5873fc},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0x1190b8{['view'];constructor(_0x475ea1){super(_0x475ea1),this['view']=new Et(_0x475ea1['locale'],_0x475ea1['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1744ad=this['editor']['editing']['view'],_0x2eddcf=this['view']['editable'],_0x2d8e41=_0x1744ad['document']['getRoot']();_0x2eddcf['name']=_0x2d8e41['rootName'],this['view']['render']();const _0x3a66f5=_0x2eddcf['element'];this['setEditableElement'](_0x2eddcf['name'],_0x3a66f5),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1744ad['attachDomRoot'](_0x3a66f5),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1cc06c(_0x3b513d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>kt)());constructor(_0x564c4c={}){function _0x1dc1d7(_0xdbeffb){return _0xdbeffb['map'](_0x59046c=>String['fromCharCode'](_0x59046c))['join']('');}(_0x564c4c=Object['assign']({},_0x564c4c))['plugins']||(_0x564c4c['plugins']=Ot['defaultPlugins']),super(_0x564c4c),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x1dc1d7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1dc1d7([0x76,0x69,0x65,0x77])][_0x1dc1d7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1dc1d7([0x61,0x75,0x74,0x6f]),this[_0x1dc1d7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1dc1d7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1dc1d7([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1dc1d7([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1dc1d7([0x6f,0x6b])});}['create'](){const _0x27fcb9=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x27fcb9))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3fe17f=>{const _0x344915=this['model']['document']['getRoot'](),_0x156a01=_0x344915&&_0x344915['getChild'](_0x344915['childCount']-0x1);_0x3fe17f['setSelection'](_0x156a01,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x57866a=this['editing']['view'],_0x28ee9c=_0x57866a['document']['getRoot'](),_0x4be8b1=_0x28ee9c['getChild'](0x0);_0x28ee9c['childCount']>0x1||!_0x4be8b1||'p'!=_0x4be8b1['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x57866a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4be8b1['placeholder']=this['placeholder']),ut({'view':_0x57866a,'element':_0x4be8b1,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4be8b1);}}class Mt extends _0x4e9ac4{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1ae9fb,_0x2a8e27={}){super(_0x1ae9fb),this['editor']=null,this['_editorConfig']=_0x2a8e27,this['set']('value',_0x2a8e27['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x1ae9fb,'Reply...')),this['set']('submitLabel',bt(_0x1ae9fb,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x4c4bad(),this['focusTracker']=new _0x37d37b(),this['focusCycler']=new _0x3a36bc({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x340a47,_0x5553cc)=>{this['cancelButtonView']['fire']('execute'),_0x5553cc();}),this['keystrokes']['set']('Ctrl+Enter',(_0xc048ef,_0x3d147d)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3d147d());}),this['on']('submit',(_0x1066ae,_0x59b0e5)=>{_0x59b0e5['length']>0xfde8?(alert(bt(_0x1ae9fb,'TOO_LONG_COMMENT_ALERT',[_0x59b0e5['length'],0xfde8])),_0x1066ae['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3b9c0e=this['editor'];this['element']['insertBefore'](_0x3b9c0e['ui']['element'],this['element']['firstChild']),_0x3b9c0e['model']['document']['on']('change',()=>this['value']=_0x3b9c0e['getData']()),_0x3b9c0e['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3b9c0e['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x56ead0){-0x1===_0x56ead0?(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:_0x133004}=this,_0x4fce9f=new _0x4cf22d(_0x133004);return _0x4fce9f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4fce9f['withText']=!0x0,_0x4fce9f['bind']('label')['to'](this,'submitLabel'),_0x4fce9f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4fce9f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x20ba75,_0x2e01c7)=>!_0x2e01c7&&!!_0x20ba75['trim']()),_0x4fce9f;}['_createCancelButton'](){const {locale:_0x4ef090}=this,_0x135feb=new _0x4cf22d(_0x4ef090);return _0x135feb['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x135feb['label']=bt(_0x4ef090,'Cancel'),_0x135feb['withText']=!0x0,_0x135feb['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x135feb;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x13eab9=>{this['focusTracker']['add'](_0x13eab9['element']);}),this['focusables']['on']('change',(_0x13ea27,_0x594672)=>{for(const _0x30faa2 of Array['from'](_0x594672['added'])['reverse']())this['focusTracker']['add'](_0x30faa2['element']);});}}class Rt extends _0x4e9ac4{constructor(_0x11ee54,_0x34b1c5,_0x4ba0d){super(_0x11ee54),this['commentInputView']=new Mt(_0x11ee54,_0x4ba0d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x173f4b,_0x433c88)=>_0x173f4b||!!_0x433c88),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 _0x12e0d7(_0x11ee54,_0x34b1c5),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'](_0xfe02bf){this['commentInputView']['focus'](_0xfe02bf);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x13149d,_0x243786)=>{const {submitButtonView:_0x4d75e4,cancelButtonView:_0x3aff52,editor:_0x3803d8}=this['commentInputView'];[_0x4d75e4['element'],_0x3aff52['element'],_0x3803d8?_0x3803d8['editing']['view']['getDomRoot']():null]['filter'](_0x44912c=>_0x44912c)['some'](_0x4060c8=>_0x4060c8['contains'](_0x243786['target']))||(this['focus'](),_0x243786['preventDefault']());});}}class xt extends _0x4e9ac4{constructor(_0x333136){super(_0x333136);const _0x1c6b51=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1c6b51['to']('count',_0x498a99=>bt(_0x333136,'NUMBER_OF_COMMENTS',_0x498a99))}]});}}class St extends _0x4e9ac4{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x386eaa,_0x48755f,_0x347793){super(_0x386eaa);const _0x3ed1dd=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x48755f['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x48755f,this['_config']=_0x347793,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x37d37b(),this['keystrokes']=new _0x4c4bad(),this['focusCycler']=new _0x3a36bc({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4042fb=>this['commentViews']['map'](_0x4bcb42=>_0x4bcb42['element'])['includes'](_0x4042fb['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x386eaa),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x540006=>_0x540006-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5554eb of _0x48755f['comments'])this['_handleNewCommentModel'](_0x5554eb);this['_handleInfoComment'](),this['listenTo'](_0x48755f['comments'],'add',(_0x39ca8f,_0x4bd9de)=>{const _0x418cec=this['_calculatePosition'](_0x4bd9de);this['length']++,this['_handleNewCommentModel'](_0x4bd9de,_0x418cec),this['refreshVisibleViews']();}),this['listenTo'](_0x48755f['comments'],'remove',(_0xe1e481,_0x41e90e)=>{this['length']--,this['_handleRemoveCommentModel'](_0x41e90e),this['refreshVisibleViews']();}),this['listenTo'](_0x48755f,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x48755f,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x3ed1dd['if']('length','ck-hidden',_0x26be17=>!_0x26be17)],'aria-label':bt(_0x386eaa,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x4641d0){-0x1===_0x4641d0?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x466846 of this['commentViews'])_0x466846['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x202fbd,_0x35339d){const _0x11b9f0=new this['_config']['CommentView'](this['locale'],_0x202fbd,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x11b9f0['viewUid']=_0x202fbd['id'],_0x11b9f0['delegate']('removeComment')['to'](this),_0x11b9f0['delegate']('updateComment')['to'](this),_0x11b9f0['delegate']('resolveCommentThread')['to'](this),_0x11b9f0['delegate']('editorReady')['to'](this),_0x11b9f0['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x11b9f0,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x11b9f0,_0x35339d);}['_calculatePosition'](_0x520a7e){const _0x376125=this['_model']['_findOptimalIndex'](_0x520a7e);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x520a7e['authoredAt']?_0x376125-0x1:_0x376125:_0x376125-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x31337b={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x31337b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x31337b));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1fa255){const _0x133347=this['commentViews']['remove'](_0x1fa255['id']);this['stopListening'](_0x133347),_0x133347['isEditMode']&&this['_updateHasDirtyComment'](),_0x133347['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x81cd17=>_0x81cd17['isEditMode']);}['_rearrangeCollapse'](){const _0x1d08a8=function(_0x395078){const _0x1844bb=new _0x5c5ef1();for(const _0x5adeb9 of _0x395078)_0x1844bb['add'](_0x5adeb9);return _0x1844bb;}(this['commentViews']),_0xb67508=this['_collapsedCommentsView']['count'];for(let _0x12ee18=0x1;_0x12ee18<=_0xb67508;_0x12ee18++)_0x1d08a8['remove'](0x1);for(const _0x1fa485 of _0x1d08a8)_0x1fa485['collapse']();_0xb67508>0x0&&_0x1d08a8['add'](this['_collapsedCommentsView'],0x1),Pt(_0x356816(Array['from'](this['visibleViews']),Array['from'](_0x1d08a8)),this['visibleViews'],_0x1d08a8);}['_rearrangeExpand'](){Pt(_0x356816(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x13ece5 of this['visibleViews'])_0x13ece5['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x22fa03=>{this['focusTracker']['add'](_0x22fa03['element']),this['keystrokes']['listenTo'](_0x22fa03['element']);}),this['commentViews']['on']('change',(_0x380683,_0x2b2229)=>{for(const _0x27ae14 of _0x2b2229['removed'])this['focusTracker']['remove'](_0x27ae14['element']),this['keystrokes']['stopListening'](_0x27ae14['element']);for(const _0x22cd62 of Array['from'](_0x2b2229['added'])['reverse']())this['focusTracker']['add'](_0x22cd62['element']),this['keystrokes']['listenTo'](_0x22cd62['element']);});}}function Pt(_0x59d8f9,_0x4356f5,_0x4e5010){let _0x54be64=0x0;for(const _0x404a23 of _0x59d8f9)switch(_0x404a23){case'insert':_0x4356f5['add'](_0x4e5010['get'](_0x54be64),_0x54be64),_0x54be64++;break;case'delete':_0x4356f5['remove'](_0x54be64);break;case'equal':_0x54be64++;}}class Lt extends _0x4e9ac4{constructor(_0x538b79){super(_0x538b79);const _0x387ed2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x387ed2['to']('contextValue',_0x4f29b1=>bt(_0x538b79,'THREAD_CONTEXT_LABEL',_0x4f29b1)),'tabindex':-0x1},'children':[{'text':_0x387ed2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x4e9ac4{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4ee609,_0x1a32be){super(_0x4ee609);const _0x24edff=this['bindTemplate'];this['_model']=_0x1a32be,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x37d37b(),this['keystrokes']=new _0x4c4bad(),this['focusCycler']=new _0x3a36bc({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4c3453=>!!_0x4c3453),this['bind']('contextValue')['to'](this['_model'],'context',_0x13d890=>_0x13d890&&_0x13d890['value']?this['_trimContextValue'](_0x13d890['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x24edff['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 _0x2bcd31=new _0x4cf22d(this['locale']);return _0x2bcd31['label']=bt(this['locale'],'Reopen'),_0x2bcd31['tooltip']=bt(this['locale'],'Reopen'),_0x2bcd31['icon']=_0x2890fd,_0x2bcd31['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a2c4b=>!_0x2a2c4b),_0x2bcd31['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x272d85,_0xe7b62c)=>_0x272d85&&_0xe7b62c),_0x2bcd31['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2bcd31;}['_trimContextValue'](_0x3d4e29){if(_0x3d4e29['length']<0x96)return _0x3d4e29;const _0x5d03aa=_0x3d4e29['lastIndexOf']('\x20',0x93);return _0x3d4e29['substring'](0x0,_0x5d03aa>-0x1?_0x5d03aa:0x93)+'...';}['_attachContextActions'](){const _0x3cb95b=this['element']['querySelector']('.ck-context'),_0x3862fa=_0x3cb95b['querySelector']('.ck-context__value');this['listenTo'](_0x3cb95b,'mouseenter',()=>{_0x3862fa['offsetWidth']<_0x3862fa['scrollWidth']&&_0x3cb95b['classList']['add']('overlay');}),this['listenTo'](_0x3cb95b,'mouseleave',()=>{_0x3cb95b['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x480b07 of this['focusables'])this['focusTracker']['add'](_0x480b07['element']),this['keystrokes']['listenTo'](_0x480b07['element']);}['_createContextView'](){const _0x38d89e=new Lt(this['locale']);return _0x38d89e['bind']('contextValue')['to'](this),_0x38d89e;}}class Vt extends _0x4e9ac4{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x140fb5,_0x1ba36c,_0x3fcc64,_0x439e3a){super(_0x140fb5),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1ba36c,this['_localUser']=_0x3fcc64,this['_config']=_0x439e3a,this['commentThreadHeaderView']=new Dt(_0x140fb5,_0x1ba36c),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x5a1787(_0x140fb5,bt(_0x140fb5,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x140fb5,_0x1ba36c,Object['assign']({'CommentView':this['_config']['CommentView']},_0x439e3a)),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',(_0x3e41ff,_0x53a145)=>_0x3e41ff||!!_0x53a145),this['bind']('isUnlinked')['to'](_0x1ba36c,'unlinkedAt',_0x142f6b=>!!_0x142f6b),this['bind']('ariaLabel')['to'](this,'length',_0x43b5a3=>{const _0x5db52c=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x43b5a3,_0x5db52c]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x37d37b(),this['keystrokes']=new _0x4c4bad(),this['focusCycler']=new _0x3a36bc({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x181358=>_0x181358['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x19091d(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2e3b47=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x945740=_0x2e3b47['commentInputView'];return _0x2e3b47['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x945740,'value',(_0x19f424,_0x1712b4,_0x487897,_0x2e4dce,_0xaabb76)=>!!_0xaabb76||!!_0x2e4dce&&_0x487897&&!_0x1712b4||_0x19f424&&_0x487897&&!_0x1712b4),_0x945740['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x6e63fb,_0x2d957f,_0x41a112)=>{let _0xcdc232;return _0xcdc232=_0x41a112&&_0x2d957f?'Reply\x20to\x20reopen\x20discussion...':_0x6e63fb?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0xcdc232);}),_0x945740['bind']('submitLabel')['to'](this,'length',_0x140ca3=>bt(this['locale'],_0x140ca3?'Reply':'Comment')),_0x945740['on']('submit',(_0xd3d7e4,_0x9d3e99)=>{this['fire']('addComment',_0x9d3e99),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x945740['on']('cancel',()=>{this['focus']();}),_0x945740['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x945740['on']('cancel',_0x269d60=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x269d60['stop']());}),this['on']('change:isActive',(_0x3c1ecd,_0x3c399d,_0x293d8b)=>{_0x293d8b||this['length']||_0x945740['value']||this['fire']('removeCommentThread');}),_0x2e3b47;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0xdfe38d(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x22fb2f,_0x3826c9,_0x3076a3,_0xe05af1){super(_0x22fb2f,_0x3826c9,_0x3076a3,_0xe05af1),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x22fb2f,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0xf5c11c,_0x4301ac,_0x25879c)=>{_0x25879c||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x79d6b1,_0x58c02d,_0x435af2)=>{_0x435af2&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4b4305=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4b4305['if']('isActive','ck-thread--active'),_0x4b4305['if']('isUnlinked','ck-thread--unlinked'),_0x4b4305['to']('actionIndicator',_0x1146c4=>_0x1146c4?'ck-thread--'+_0x1146c4:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4b4305['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 _0x459987 of this['commentsListView']['commentViews'])_0x459987['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x297f94}=this,_0x2ab97f=this['commentsListView']['commentViews']['get'](0x0);_0x2ab97f===this['_boundFirstCommentView']||_0x2ab97f['isSystemComment']||(this['_boundFirstCommentView']=_0x2ab97f,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2ab97f,'actionIndicator',_0x47d9b9=>'remove'===_0x47d9b9?'remove':null),_0x2ab97f['placeholder']=bt(_0x297f94,'Write\x20a\x20comment...'),_0x2ab97f['removeButton']['on']('execute',_0x1205a1=>{_0x1205a1['stop'](),this['showConfirm'](bt(_0x297f94,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2ab97f['focus']();}),_0x2ab97f['actionBar']['add'](this['resolveButton'],0x0),_0x2ab97f['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xb87bd5=new _0x4a627a(this['locale']);return _0xb87bd5['label']=bt(this['locale'],'Resolve'),_0xb87bd5['tooltip']=bt(this['locale'],'Resolve'),_0xb87bd5['icon']=_0x36f9d0,_0xb87bd5['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xb87bd5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x23e28b=>!_0x23e28b),_0xb87bd5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x509d93,_0x892641)=>_0x509d93&&!_0x892641),_0xb87bd5['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xb87bd5;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x4e9ac4{constructor(_0x5c424a){super(_0x5c424a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5431c9,_0x36b755,_0x20e7d7)=>{this['element']['innerHTML']=_0x20e7d7;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x4e9ac4{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x28d26f,_0x5ada55,_0x4c13d2){super(_0x28d26f),this['_model']=_0x5ada55,this['_config']=_0x4c13d2,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5ada55,'content',_0x5ada55,'authoredAt',(_0x562e4b,_0x57acbe)=>bt(_0x28d26f,'COMMENT_ARIA_LABEL',[_0x5ada55['author']['name'],_0x4c13d2['formatDateTime'](_0x57acbe),new DOMParser()['parseFromString'](_0x562e4b,'text/html')['body']['textContent'],_0x5ada55['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x5a1787(_0x28d26f,bt(_0x28d26f,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x37d37b(),this['keystrokes']=new _0x4c4bad(),this['focusCycler']=new _0x3a36bc({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xa6ac89=>_0xa6ac89['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x1cc4e1=new Ht(this['locale']);return _0x1cc4e1['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4eb058,_0x1ff5de)=>_0x1ff5de?_0x39f09d(_0x4eb058,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4eb058),_0x1cc4e1;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x51a183=new Mt(this['locale'],this['_config']['editorConfig']);return _0x51a183['value']=this['_model']['content'],_0x51a183['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x51a183['submitLabel']=bt(this['locale'],'Save'),_0x51a183['on']('submit',(_0x20610b,_0x1620e9)=>{this['fire']('updateComment',this['_model']['id'],_0x1620e9),this['switchToDisplayMode'](),this['focus']();}),_0x51a183['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x51a183['once']('editorReady',()=>{_0x51a183['focus']();}),_0x51a183['createEditor'](),_0x51a183['delegate']('editorReady')['to'](this),_0x51a183['delegate']('editorDestroyed')['to'](this),_0x51a183;}['_setupKeyboardNavigation'](){const _0x2d639d=this['element'];this['keystrokes']['listenTo'](_0x2d639d);for(const _0x2ca09c of this['focusables'])this['focusTracker']['add'](_0x2ca09c['element']),this['keystrokes']['listenTo'](_0x2ca09c['element']);this['focusables']['on']('change',(_0x102888,_0x4f0cb6)=>{for(const _0x595d98 of _0x4f0cb6['removed'])this['focusTracker']['remove'](_0x595d98['element']),this['keystrokes']['stopListening'](_0x595d98['element']);for(const _0x586e93 of _0x4f0cb6['added'])this['focusTracker']['add'](_0x586e93['element']),this['keystrokes']['listenTo'](_0x586e93['element']);}),this['keystrokes']['set']('enter',(_0x2c601f,_0x48e865)=>{_0x2d639d===_0x2c601f['target']&&(this['focusCycler']['focusFirst'](),_0x48e865());}),this['keystrokes']['set']('esc',(_0x3fbb42,_0x3c02c4)=>{_0x2d639d!==_0x3fbb42['target']&&(this['focus'](),_0x3c02c4());});}}class Ut extends/* #__PURE__ -- @preserve */
|
|
28
|
+
_0xdfe38d(Ft){['actionBar'];['userView'];constructor(_0x1162e9,_0x26107d,_0x65aa8e){super(_0x1162e9,_0x26107d,_0x65aa8e),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x1162e9,'Reply...')),this['bind']('authoredAt')['to'](_0x26107d),this['bind']('resolvedAt')['to'](_0x26107d),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 _0x12e0d7(_0x1162e9,_0x26107d['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x26107d,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x55a1cc=this['bindTemplate'],_0x18d9e4=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x55a1cc['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x55a1cc['to']('authoredAt',_0xe5a3ca=>this['_config']['formatDateTime'](_0xe5a3ca))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x55a1cc['if']('isEditMode','ck-comment__actions--hidden'),_0x55a1cc['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']&&_0x18d9e4['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x55a1cc['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x55a1cc['if']('isEditMode','ck-comment--edit'),_0x55a1cc['if']('isSystemComment','ck-comment--info'),_0x55a1cc['to']('actionIndicator',_0x504cc6=>_0x504cc6?'ck-comment--'+_0x504cc6:'')],'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':_0x18d9e4}]}]};}['_createEditButton'](){const _0x4ba8bb=new _0x4cf22d(this['locale']);return _0x4ba8bb['label']=bt(this['locale'],'Edit'),_0x4ba8bb['icon']=_0x5211a7,_0x4ba8bb['withText']=!0x0,_0x4ba8bb['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4ba8bb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2aba71=>!_0x2aba71),_0x4ba8bb['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4ba8bb['on']('execute',()=>this['switchToEditMode']()),_0x4ba8bb;}['_createRemoveButton'](){const _0xb6ff=new _0x4cf22d(this['locale']);return _0xb6ff['label']=bt(this['locale'],'Remove'),_0xb6ff['icon']=_0x310348,_0xb6ff['withText']=!0x0,_0xb6ff['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xb6ff['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3cbb93=>!_0x3cbb93),_0xb6ff['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xb6ff['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xb6ff;}['_createDropdown'](){const _0xb09a3f=it(this['locale'],_0x3f7faa),_0x1ca1f2=_0xb09a3f['panelView']['children'],_0x3a869a=new et(this['locale']),_0x3453dc=_0xb09a3f['bindTemplate'];st(_0xb09a3f,()=>this['items']['find'](_0x14b914=>_0x14b914['isVisible'])),_0xb09a3f['extendTemplate']({'attributes':{'class':[_0x3453dc['if']('isVisible','ck-hidden',_0x4bb663=>!_0x4bb663)]}});const _0x41e9ba=(_0x4d3354,_0x531591=-0x1)=>{const _0x24f31b=new nt(this['locale']);_0x24f31b['children']['add'](_0x4d3354);const _0x8dc63b=_0x531591>-0x1?_0x531591:_0x3a869a['items']['length'];_0x3a869a['items']['add'](_0x24f31b,_0x8dc63b);const _0x11a6b2=Array['from'](this['items']);_0xb09a3f['unbind']('isEnabled','isVisible'),_0xb09a3f['bind']('isEnabled')['toMany'](_0x11a6b2,'isEnabled',(..._0x3181a3)=>_0x3181a3['some'](_0x50b446=>_0x50b446)),_0xb09a3f['bind']('isVisible')['toMany'](_0x11a6b2,'isVisible',(..._0x5b3800)=>_0x5b3800['some'](_0x4d79a1=>_0x4d79a1));};_0xb09a3f['panelPosition']='sw',_0xb09a3f['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0x47166c});for(const _0x3a671d of this['items'])_0x41e9ba(_0x3a671d);return _0x1ca1f2['add'](_0x3a869a),_0xb09a3f['listenTo'](this['items'],'add',(_0x43ee81,_0x171c03,_0x4a5ef9)=>{_0x41e9ba(_0x171c03,_0x4a5ef9);}),_0xb09a3f['listenTo'](this['items'],'remove',(_0x47357f,_0x15ee46,_0x4f29db)=>{_0x3a869a['items']['remove'](_0x4f29db);}),_0xb09a3f;}['_attachActions'](_0x11fe7f,_0x587376){const _0x30d598=_0x11fe7f&&_0x11fe7f['element'];_0x30d598&&(this['listenTo'](_0x30d598,'mouseenter',()=>this['actionIndicator']=_0x587376),this['listenTo'](_0x30d598,'focus',()=>this['actionIndicator']=_0x587376),this['listenTo'](_0x30d598,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x30d598,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x404b41=super['_createCommentInputView']();return _0x404b41['bind']('placeholder')['to'](this),_0x404b41;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x21b93a){const _0x16f731=_0x588486(_0x21b93a,0x1e),_0x4c7436=new MutationObserver(_0x40df9f=>{for(const _0x20d693 of _0x40df9f)('attributes'==_0x20d693['type']&&'class'==_0x20d693['attributeName']||'childList'==_0x20d693['type']||'characterData'==_0x20d693['type'])&&_0x16f731();});return{'attach'(_0x166294){_0x4c7436['observe'](_0x166294,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4c7436['disconnect'](),_0x16f731['cancel']();}};}class Kt extends _0x4e9ac4{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x49bff0,_0x2cdb0f){super(_0x49bff0),this['id']=_0x1b80c2(),this['focusTracker']=new _0x37d37b(),this['keystrokes']=new _0x4c4bad(),this['keystrokes']['set']('Esc',(_0x57e2cc,_0x3c9b89)=>this['fire']('Esc',_0x3c9b89)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x2cdb0f),this['mainView']=_0x2cdb0f;const _0x4a10e0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4a10e0['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 _0x25e396=this['element']['clientHeight'];_0x25e396&&(this['height']=_0x25e396);}}class Yt extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1cc06c(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2ae75f,target:_0x449d4e,type:_0x5b5a1d,isVisible:_0x94f5c2=!0x0}){super(),this['view']=_0x2ae75f,this['view']['element']||this['view']['render'](),this['_type']=_0x5b5a1d,this['_target']=_0x449d4e,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5c5ef1([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5c0622,_0x3d6718)=>{this['view']['focusTracker']['add'](_0x3d6718);}),this['focusableElements']['on']('remove',(_0x57379a,_0xc0c225)=>{this['view']['focusTracker']['remove'](_0xc0c225);}),this['set']('isVisible',_0x94f5c2);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4ea88b=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x4ea88b),_0x4ea88b;}get['targetRect'](){const _0x13acff=this['target'];if(null===_0x13acff)return null;if(_0x13acff instanceof _0x50bd0c)return _0x13acff;const _0x24eca7=_0x13acff['filter'](_0x564f3a=>function(_0x3eac23){const _0x3e51f1=_0x3eac23['offsetParent'];if(_0x3e51f1)return!0x0;const _0x4adb99=_0x3eac23['getClientRects']()['item'](0x0);return!!_0x4adb99;}(_0x564f3a));return 0x0===_0x24eca7['length']?null:_0x50bd0c['getDomElementRects'](_0x24eca7[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4beb45){this['view']['isActive']=_0x4beb45,this['view']['mainView']['isActive']=_0x4beb45;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x483100){if(!(null===_0x483100||_0x483100 instanceof _0x50bd0c||Array['isArray'](_0x483100)&&_0x483100['every'](_0x36e710=>Gt(_0x36e710))))throw new _0x14a8d1('annotation-invalid-target',null,{'target':_0x483100});}['_getNormalizedTarget'](){const _0x19f4c4='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x19f4c4)?[_0x19f4c4]:_0x19f4c4;}}function Gt(_0x484749){return null!==_0x484749&&'object'==typeof _0x484749&&'nodeType'in _0x484749&&0x1===_0x484749['nodeType'];}class jt extends _0x5c5ef1{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5daad3=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x37d37b(),this['_focusTracker']['on']('change:isFocused',(_0x73cb0f,_0x225328,_0x454d5b)=>{_0x454d5b||this['fire']('blur');});for(const _0x40b95c of _0x5daad3)this['add'](_0x40b95c);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x39b7ec){if(this['has'](_0x39b7ec))throw new _0x14a8d1('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x39b7ec['innerView'],_0x39b7ec),this['_viewToAnnotation']['set'](_0x39b7ec['view'],_0x39b7ec);for(const _0x47730d of _0x39b7ec['focusableElements'])this['_focusTracker']['add'](_0x47730d);this['listenTo'](_0x39b7ec['focusableElements'],'add',(_0x2f9b57,_0x11d171)=>{this['_focusTracker']['add'](_0x11d171);}),this['listenTo'](_0x39b7ec['focusableElements'],'remove',(_0xfc8199,_0x12d22f)=>{this['_focusTracker']['remove'](_0x12d22f);}),this['listenTo'](_0x39b7ec['view']['focusTracker'],'change:isFocused',(_0x3b390c,_0xacfec5,_0x1b2946)=>{_0x1b2946&&this['fire']('focus',_0x39b7ec);}),_0x39b7ec['updateTargetRect']();const _0x5c1d07=this['_getOrderInContent'](_0x39b7ec['view']['targetRect']);return super['add'](_0x39b7ec,_0x5c1d07);}['remove'](_0x313cf1){if(!this['has'](_0x313cf1))throw new _0x14a8d1('annotationcollection-not-existing-item',null);this['stopListening'](_0x313cf1['view']['focusTracker']),this['stopListening'](_0x313cf1['focusableElements']);for(const _0x46bf1b of _0x313cf1['focusableElements'])this['_focusTracker']['remove'](_0x46bf1b);return this['_viewToAnnotation']['delete'](_0x313cf1['view']),this['_innerViewToAnnotation']['delete'](_0x313cf1['innerView']),super['remove'](_0x313cf1);}['getByInnerView'](_0x5eca4f){return this['_innerViewToAnnotation']['get'](_0x5eca4f);}['getByView'](_0x533a32){return this['_viewToAnnotation']['get'](_0x533a32);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xfabb of this)_0xfabb['updateTargetRect']();this['_sort']();}['_sort'](){const _0x38a8b8=Array['from'](this)['sort']((_0x4ed0d1,_0x243744)=>qt(_0x4ed0d1['view']['targetRect'],_0x243744['view']['targetRect']));for(let _0x4c359e=_0x38a8b8['length']-0x1;_0x4c359e>0x0;_0x4c359e--){const _0x2a077e=_0x38a8b8[_0x4c359e];_0x4c359e!==this['getIndex'](_0x2a077e)&&(this['remove'](_0x2a077e),this['add'](_0x2a077e));}}['_getOrderInContent'](_0x503705){let _0x51868e=0x0;if(!_0x503705)return this['length'];for(const _0x246625 of this){const _0x3669cc=_0x246625['view']['targetRect'];if(_0x3669cc){if(qt(_0x503705,_0x3669cc)<0x0)return _0x51868e;_0x51868e++;}}return _0x51868e;}}function Xt({source:_0x2f529d,target:_0x217f36,filter:_0x2ec2e0}){for(const _0x32ba45 of _0x2f529d)_0x2ec2e0(_0x32ba45)&&_0x217f36['add'](_0x32ba45);_0x217f36['listenTo'](_0x2f529d,'add',(_0x3f8b7d,_0x4edf0b)=>{_0x2ec2e0(_0x4edf0b)&&_0x217f36['add'](_0x4edf0b);}),_0x217f36['listenTo'](_0x2f529d,'remove',(_0x4352a,_0xeec022)=>{_0x217f36['has'](_0xeec022)&&_0x217f36['remove'](_0xeec022);});}function qt(_0x2e2bc9,_0x5314cd){if(null===_0x2e2bc9&&null===_0x5314cd)return 0x0;if(null===_0x2e2bc9)return-0x1;if(null===_0x5314cd)return 0x1;const _0xf6b76d=_0x2e2bc9['top']-_0x5314cd['top'];return 0x0==_0xf6b76d?_0x2e2bc9['left']-_0x5314cd['left']:_0xf6b76d;}class $t extends _0x1b2568{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44d948){if(super(_0x44d948),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x44d948 instanceof _0x3b513d){const _0x1140ab=_0x44d948['locale'];_0x44d948['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x1140ab,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x1140ab,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x1140ab,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x1140ab,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x1140ab,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x1140ab,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x1140ab,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x13560e){this['collection']['add'](_0x13560e);}['remove'](_0x4dac39){this['collection']['remove'](_0x4dac39),_0x4dac39['destroy']();}['refreshVisibility'](){for(const _0x22f246 of this['collection'])_0x22f246['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x32deae){return this['collection']['getByInnerView'](_0x32deae);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xe01bf9 of this['collection'])_0xe01bf9['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1a58cf){this['fire']('_activateAnnotation',_0x1a58cf);}['createAnnotation'](_0x482ae0){return new Yt(_0x482ae0);}['createAnnotationView'](_0x5f0ca0,_0x3793d3){return new Kt(_0x5f0ca0,_0x3793d3);}['_addActiveAnnotation'](_0x22ad1a){const _0x22ff45=new Set(this['activeAnnotations']);_0x22ff45['add'](_0x22ad1a),this['activeAnnotations']=_0x22ff45;}['_removeActiveAnnotation'](_0x7bd094){const _0x5241dc=new Set(this['activeAnnotations']);_0x5241dc['delete'](_0x7bd094),this['activeAnnotations']=_0x5241dc;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3dedf7=this['collection'],_0x32a369=this['_visibleAnnotations'];function _0x5481f8(_0x3bd69c){const _0x19b12f=_0x3bd69c['source'];_0x19b12f['isVisible']&&!_0x32a369['has'](_0x19b12f)?_0x32a369['add'](_0x19b12f):!_0x19b12f['isVisible']&&_0x32a369['has'](_0x19b12f)&&_0x32a369['remove'](_0x19b12f),_0x19b12f['view']['focusTracker']['remove'](_0x19b12f['view']['element']),_0x19b12f['view']['focusTracker']['add'](_0x19b12f['view']['element']);}this['listenTo'](_0x3dedf7,'add',(_0x15b3fd,_0x4d2965)=>{_0x4d2965['isVisible']&&_0x32a369['add'](_0x4d2965),this['listenTo'](_0x4d2965,'change:isVisible',_0x5481f8);}),this['listenTo'](_0x3dedf7,'remove',(_0x3c5e7e,_0x154195)=>{_0x32a369['has'](_0x154195)&&_0x32a369['remove'](_0x154195),this['stopListening'](_0x154195,'change:isVisible',_0x5481f8);});}['_setupEnterAnnotationKeystroke'](){const _0xedf447=_0x2efac0=>{_0x2efac0['on']('ready',()=>{_0x2efac0['keystrokes']['set'](_0x4bf999,(_0x3cfb20,_0x4c09d6)=>{const _0x22e165=_0x477662(this['activeAnnotations']['values']());_0x22e165&&(_0x22e165['view']['focus'](),_0x4c09d6());});});};this['context']instanceof _0x3b513d?_0xedf447(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x473616,_0x4048bd)=>{_0xedf447(_0x4048bd);});}['_setupEscapeAnnotationHandling'](){const _0x11447a=_0x423ca9=>{const _0x43001f=_0x423ca9['source'],_0x1a4740=[];let _0x22a8f2;if(Array['isArray'](_0x43001f['target'])){_0x22a8f2=_0x43001f['target'][0x0],this['context']instanceof _0x3b513d?_0x1a4740['push'](this['context']):this['context']['editors']&&_0x1a4740['push'](...this['context']['editors']);for(const _0x45e7ca of _0x1a4740)for(const _0x57ee89 of _0x45e7ca['editing']['view']['domRoots']['values']())if(_0x57ee89['contains'](_0x22a8f2))return void _0x45e7ca['editing']['view']['focus']();_0x22a8f2['focus']();}};this['listenTo'](this['collection'],'add',(_0x363a13,_0x276d3d)=>{this['listenTo'](_0x276d3d,'escape',_0x11447a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x43c5dc,_0x1c4b3e)=>{this['stopListening'](_0x1c4b3e,'escape',_0x11447a);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x1b2568{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0xa4ae56,_0x2911ec];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15a339){super(_0x15a339),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1015d3=this['context']['config'];_0x1015d3['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1015d3['define']('comments.maxThreadTotalWeight',0x1f4),_0x1015d3['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1015d3['define']('comments.CommentThreadView',Bt),_0x1015d3['define']('comments.CommentView',Ut),_0x1015d3['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x50c09f=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x135ba9,_0x23f955)=>this['_addCommentThread'](_0x23f955)),this['on']('submitCommentThread',(_0xbd9709,_0x32a224)=>this['_submitCommentThread'](_0x32a224)),this['on']('resolveCommentThread',(_0x2de53b,_0xa8385c)=>this['_resolveCommentThread'](_0xa8385c)),this['on']('resolveCommentThread',(_0x2d67c4,_0x4336e0)=>this['_updateActiveAnnotation'](_0x4336e0),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x265a72,_0x1cb2ce)=>this['_reopenCommentThread'](_0x1cb2ce)),this['on']('reopenCommentThread',(_0x56597b,_0x5221bf)=>this['_updateActiveAnnotation'](_0x5221bf),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4ae0b5,_0x4276c0)=>this['_removeCommentThread'](_0x4276c0)),this['on']('updateCommentThread',(_0x251556,_0x3ec3bc)=>this['_updateCommentThread'](_0x3ec3bc)),this['on']('updateCommentThread',(_0x55b801,_0x147fa6)=>this['_updateActiveAnnotation'](_0x147fa6),{'priority':'lowest'}),this['on']('addComment',(_0x10e1c1,_0x36fa1a)=>this['_addComment'](_0x36fa1a)),this['on']('updateComment',(_0x187f9f,_0x4ad7d4)=>this['_updateComment'](_0x4ad7d4)),this['on']('removeComment',(_0x3fad1d,_0x4d04f5)=>this['_removeComment'](_0x4d04f5)),this['on']('addComment',(_0x2542aa,{threadId:_0x410869,isFromAdapter:_0x3a60ec})=>{if(_0x3a60ec)return;const _0x55e8cb=this['getCommentThread'](_0x410869),_0x207eae=_0x55e8cb&&this['_threadToController']['get'](_0x55e8cb);_0x207eae&&_0x207eae['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x50c09f,'change:activeAnnotations',(_0x328655,_0x44a137,_0x12ce07)=>{const _0x557dae=Array['from'](_0x12ce07)['map'](_0x55664f=>this['_viewToController']['get'](_0x55664f['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x557dae?_0x557dae['model']:null;});}set['adapter'](_0x4a94a6){if(this['_adapter'])throw new _0x14a8d1('commentsrepository-adapter-already-set');this['_adapter']=_0x4a94a6;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4ae313=zt,threadId:_0x1d38b7=_0x1b80c2(),comments:_0x1e024d=[],unlinkedAt:_0xea51df=null,resolvedAt:_0x418674=null,resolvedBy:_0x15613c=null,target:_0x59a5a8=null,context:_0x172486=null,attributes:_0x264df3={},isResolvable:_0x473069=!0x0,isSubmitted:_0x484ca6=!0x1,isFromAdapter:_0x51d09d=!0x1}={}){return this['fire'](ii('addCommentThread',_0x4ae313),{'channelId':_0x4ae313,'threadId':_0x1d38b7,'comments':_0x1e024d,'unlinkedAt':_0xea51df,'resolvedAt':_0x418674,'resolvedBy':_0x15613c,'target':_0x59a5a8,'context':_0x172486,'attributes':_0x264df3,'isFromAdapter':_0x51d09d,'isResolvable':_0x473069,'isSubmitted':_0x484ca6}),this['getCommentThread'](_0x1d38b7);}['openNewCommentThread']({channelId:_0x32119f=zt,threadId:_0x4ccdb8=_0x1b80c2(),target:_0x1792a7,context:_0x1b79e4=null,isResolvable:_0x3c2f81=!0x0}){if(this['_readOnlyChannels']['has'](_0x32119f)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1792a7)throw new _0x14a8d1('commentsrepository-missing-target');const _0x216620=this['addCommentThread']({'channelId':_0x32119f,'threadId':_0x4ccdb8,'target':_0x1792a7,'context':_0x1b79e4,'isResolvable':_0x3c2f81});if(!_0x216620)return null;const _0x976b71=this['_threadToController']['get'](_0x216620),_0x135c9c=_0x976b71['view']['commentThreadInputView']['commentInputView'],_0x531143=this['context']['plugins']['get']($t),_0x3b00ad=_0x531143['getByInnerView'](_0x976b71['view']);return _0x531143['activate'](_0x3b00ad),_0x135c9c['once']('editorReady',()=>_0x135c9c['focus']()),_0x216620;}['hasCommentThread'](_0x5da39e){if('string'!=typeof _0x5da39e)throw new _0x14a8d1('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5da39e);}['updateCommentThread']({channelId:_0x60e678=zt,threadId:_0x3945ff,context:_0x317797,unlinkedAt:_0x445043,attributes:_0x2c9d1d,isFromAdapter:_0x36815a=!0x1}){return this['fire'](ii('updateCommentThread',_0x60e678),{'channelId':_0x60e678,'threadId':_0x3945ff,'context':_0x317797,'unlinkedAt':_0x445043,'attributes':_0x2c9d1d,'isFromAdapter':_0x36815a}),this['getCommentThread'](_0x3945ff);}['getCommentThread'](_0x356e42){if('string'!=typeof _0x356e42)throw new _0x14a8d1('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x356e42);}['fetchCommentThread']({channelId:_0x1d3656,threadId:_0x2d8426}={}){const _0x238dc1=this['getCommentThread'](_0x2d8426);if(_0x238dc1)return Promise['resolve'](_0x238dc1);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x14a8d1('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1d3656,'threadId':_0x2d8426})['then'](_0x3a5de4=>this['hasCommentThread'](_0x2d8426)?this['getCommentThread'](_0x2d8426):_0x3a5de4?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1d3656},_0x3a5de4)):void 0x0)['catch'](_0x5d3585=>{throw console['error'](_0x5d3585),new _0x14a8d1('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4c2747,skipNotAttached:_0x343843=!0x1,skipEmpty:_0x33557f=!0x1,toJSON:_0x5621a9=!0x1}={}){const _0xa17e22=[];for(const _0x4a4636 of this['_threads']['values']())_0x4c2747&&_0x4a4636['channelId']!==_0x4c2747||_0x343843&&!_0x4a4636['isAttached']||_0x33557f&&0x0===_0x4a4636['length']||_0xa17e22['push'](_0x4a4636);return _0x5621a9?_0xa17e22['map'](_0x10290c=>_0x10290c['toJSON']()):_0xa17e22;}['getAnnotationForCommentThread'](_0x4ce321){const _0x24a655=this['_threadToController']['get'](_0x4ce321);if(!_0x24a655)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x24a655['view'])||null;}['getCommentThreadForAnnotation'](_0x284dd1){const _0x34d87b=this['_viewToController']['get'](_0x284dd1['innerView']);return _0x34d87b?_0x34d87b['model']:null;}['setActiveCommentThread'](_0x48ea6f){const _0x400982=this['context']['plugins']['get']($t);if(!_0x48ea6f)return void(this['activeCommentThread']&&_0x400982['deactivateAll']());const _0xc4e0be=this['getCommentThread'](_0x48ea6f);if(!_0xc4e0be)throw new _0x14a8d1('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x48ea6f});if(!this['_threadToController']['has'](_0xc4e0be))throw new _0x14a8d1('commentsrepository-active-not-attached',null,{'threadId':_0x48ea6f});const _0x11477f=_0x400982['getByInnerView'](this['_threadToController']['get'](_0xc4e0be)['view']);_0x400982['activate'](_0x11477f);}['switchReadOnly'](_0x274dee,_0x1ea2d2){_0x274dee?this['_readOnlyChannels']['add'](_0x1ea2d2):this['_readOnlyChannels']['delete'](_0x1ea2d2),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3fb3d8){return this['_readOnlyChannels']['has'](_0x3fb3d8)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5ad4a9,_0x25709e){return new It(_0x5ad4a9,_0x25709e);}['setPermissions'](_0x5c98d0,_0xba6f48=zt){this['_permissions']['set'](_0xba6f48,_0x5c98d0),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4232f5=zt){return this['_permissions']['has'](_0x4232f5)?this['_permissions']['get'](_0x4232f5):Jt;}['_addCommentThread']({channelId:_0x103720,threadId:_0x26149e,comments:_0xbeb37a,unlinkedAt:_0x3efffe,resolvedAt:_0x358aa6,resolvedBy:_0x1f46d1,target:_0x2e40a2,context:_0x3c3abc,attributes:_0x539e0d,isFromAdapter:_0x565816,isResolvable:_0x89e71c,isSubmitted:_0x470f86}){if('string'!=typeof _0x26149e)throw new _0x14a8d1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x26149e});if(this['hasCommentThread'](_0x26149e))throw new _0x14a8d1('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x26149e});const _0x408b39=new Zt(this,{'channelId':_0x103720,'id':_0x26149e,'context':_0x3c3abc,'attributes':_0x539e0d,'unlinkedAt':_0x3efffe,'resolvedAt':_0x358aa6,'resolvedBy':_0x1f46d1?this['context']['plugins']['get'](_0x2911ec)['getUser'](_0x1f46d1):null,'isResolvable':_0x89e71c,'isSubmitted':_0x470f86||_0x565816});this['_threads']['set'](_0x26149e,_0x408b39);for(const _0x163173 of _0xbeb37a)_0x408b39['_add'](this['_createNewComment']({'threadId':_0x26149e,..._0x163173}));return _0x2e40a2&&_0x408b39['attachTo'](_0x2e40a2),_0x565816||!_0x408b39['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x103720,'threadId':_0x26149e});}['_submitCommentThread']({channelId:_0x1cd517,threadId:_0x139768}){if(!this['hasCommentThread'](_0x139768))throw new _0x14a8d1('commentsrepository-missing-comment-thread',this);const _0x1c9161=this['getCommentThread'](_0x139768);if(_0x1c9161['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xf79ca6,comments:_0x2bcb88,resolvedAt:_0x5276ae,resolvedBy:_0x1ae9b1,context:_0x519311,attributes:_0x50a27a}=_0x1c9161,_0x38377b=this['context']['plugins']['get']('PendingActions'),_0x492bfd=_0x38377b['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1cd517,'threadId':_0xf79ca6,'comments':_0x2bcb88['map'](_0x4d654c=>_0x4d654c['toJSON']()),'resolvedAt':_0x5276ae,'resolvedBy':_0x1ae9b1?_0x1ae9b1['id']:_0x1ae9b1,'context':_0x519311,'attributes':_0x50a27a})['then'](({comments:_0x56f310})=>{_0x38377b['remove'](_0x492bfd);for(const _0x309297 of _0x56f310)this['_updateComment']({'channelId':_0x1cd517,'threadId':_0x139768,'commentId':_0x309297['commentId'],'createdAt':_0x309297['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4ee1af=>{throw console['error'](_0x4ee1af),new _0x14a8d1('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5bc979,target:_0x51f120}){const _0x11a70e=this['getCommentThread'](_0x5bc979);if(!_0x11a70e)throw new _0x14a8d1('commentsrepository-attach-missing-comment-thread',this);const _0x4cd398=this['context']['plugins']['get']('PendingActions'),_0x347841=this['context']['plugins']['get']($t),_0x4fd8c2=this['_createCommentThreadView'](_0x11a70e),_0x17153d=new It(_0x11a70e,_0x4fd8c2);let _0x1481c3=null;_0x4fd8c2['on']('change:isDirty',(_0x3976fd,_0x233a11,_0x172c7b)=>{_0x172c7b?_0x1481c3=_0x4cd398['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1481c3&&(_0x4cd398['remove'](_0x1481c3),_0x1481c3=null);}),this['_threadToController']['set'](_0x11a70e,_0x17153d),this['_viewToController']['set'](_0x4fd8c2,_0x17153d);const _0x3f6759=new Kt(this['context']['locale'],_0x4fd8c2);_0x3f6759['bind']('length')['to'](_0x4fd8c2),_0x3f6759['bind']('isDirty')['to'](_0x4fd8c2,'isDirty',_0x4fd8c2,'length',(_0x1b4779,_0x503b0c)=>_0x1b4779||!_0x503b0c),_0x3f6759['bind']('isActive')['to'](_0x4fd8c2),_0x3f6759['type']='comment';const _0x25a708=new Yt({'view':_0x3f6759,'target':_0x51f120,'type':'comment','isVisible':!_0x11a70e['archivedAt']&&!!('function'==typeof _0x51f120?_0x51f120():_0x51f120)});return _0x4fd8c2['on']('escape',()=>{_0x25a708['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4fd8c2,_0x25a708),_0x347841['add'](_0x25a708),_0x25a708;}['_bindAnnotationToEditors'](_0x69a225,_0x1ab667){this['listenTo'](_0x69a225,'editorReady',(_0x19d5d7,_0x55f919)=>{const _0x3f6fd8=_0x55f919['ui']['view']['body']['bodyCollectionContainer'];_0x1ab667['focusableElements']['add'](_0x3f6fd8),this['context']instanceof _0x3b513d&&this['context']['ui']['focusTracker']['add'](_0x3f6fd8);},{'priority':'highest'}),this['listenTo'](_0x69a225,'editorDestroyed',(_0x461f97,_0xfb9cd2)=>{const _0xa0c814=_0xfb9cd2['ui']['view']['body']['bodyCollectionContainer'];_0x1ab667['focusableElements']['has'](_0xa0c814)&&_0x1ab667['focusableElements']['remove'](_0xa0c814),this['context']instanceof _0x3b513d&&this['context']['ui']['focusTracker']['remove'](_0xa0c814);});}['_unbindEditors'](_0x6697d9){this['stopListening'](_0x6697d9,'editorReady'),this['stopListening'](_0x6697d9,'editorDestroyed');}['_createCommentThreadView'](_0x47e41a){const _0x192cc3=this['context']['plugins']['get'](_0x2911ec),{config:_0x1a30b8,locale:_0x2dced8}=this['context'],_0x29c107=_0xf732fd(_0x1a30b8['get']('locale'),_0x2dced8);return new(0x0,(_0x1a30b8['get']('comments'))['CommentThreadView'])(_0x2dced8,_0x47e41a,_0x192cc3['me'],{'editorConfig':{..._0x1a30b8['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1a30b8['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1a30b8['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1a30b8['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1a30b8['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x29c107,'CommentView':_0x1a30b8['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1cb1f5,channelId:_0xf9e11b,resolvedAt:_0x35deef,resolvedBy:_0x370e1c,isFromAdapter:_0xda7e69}){if(!this['hasCommentThread'](_0x1cb1f5))throw new _0x14a8d1('commentsrepository-missing-comment-thread',null,{'threadId':_0x1cb1f5});const _0x3c860d=this['getCommentThread'](_0x1cb1f5);if(_0x3c860d['isResolved'])throw new _0x14a8d1('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1cb1f5});const _0x5db7af=this['context']['plugins']['get'](_0x2911ec);if(_0x3c860d['resolvedBy']=_0x5db7af['getUser'](_0x370e1c),_0x3c860d['resolvedAt']=_0x35deef,_0xda7e69||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0xf2e7e4=this['context']['plugins']['get']('PendingActions'),_0x140d6f=_0xf2e7e4['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xf9e11b,'threadId':_0x1cb1f5})['then'](({resolvedAt:_0x3e0f3f,resolvedBy:_0x5ab4df})=>{_0xf2e7e4['remove'](_0x140d6f),_0x3c860d['resolvedBy']['id']!==_0x5ab4df&&(_0x3c860d['resolvedBy']=_0x5db7af['getUser'](_0x5ab4df)),_0x3c860d['resolvedAt']=_0x3e0f3f;})['catch'](_0x360721=>{throw console['error'](_0x360721),new _0x14a8d1('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5bb478,channelId:_0x1313a0,isFromAdapter:_0x1b521f}){if(!this['hasCommentThread'](_0x5bb478))throw new _0x14a8d1('commentsrepository-missing-comment-thread',null,{'threadId':_0x5bb478});const _0x53078a=this['getCommentThread'](_0x5bb478);if(!_0x53078a['isResolved'])throw new _0x14a8d1('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5bb478});if(_0x53078a['resolvedBy']=null,_0x53078a['resolvedAt']=null,_0x1b521f||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x59f5d1=this['context']['plugins']['get']('PendingActions'),_0x422551=_0x59f5d1['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1313a0,'threadId':_0x5bb478})['then'](()=>_0x59f5d1['remove'](_0x422551))['catch'](_0x5d44fd=>{throw console['error'](_0x5d44fd),new _0x14a8d1('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4e4c0d,isFromAdapter:_0x4e29fd}){const _0x467cae=this['getCommentThread'](_0x4e4c0d);if(!_0x467cae)throw new _0x14a8d1('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4e4c0d),this['_threads']['delete'](_0x4e4c0d),!_0x467cae['isSubmitted']||_0x4e29fd||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5cfeac=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4957dc}=_0x467cae,_0xd69c34=_0x5cfeac['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4957dc,'threadId':_0x4e4c0d})['then'](()=>_0x5cfeac['remove'](_0xd69c34))['catch'](_0x43692c=>{throw console['error'](_0x43692c),new _0x14a8d1('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x13171a,unlinkedAt:_0x2b789f,context:_0x54e786,attributes:_0x1c7271,isFromAdapter:_0x4a4c79}){if('string'!=typeof _0x13171a)throw new _0x14a8d1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x13171a});if(!this['hasCommentThread'](_0x13171a))throw new _0x14a8d1('commentsrepository-missing-comment-thread',null,{'threadId':_0x13171a});const _0xe3f8e3=this['getCommentThread'](_0x13171a);let _0x2ae57d=!0x1;if(void 0x0!==_0x54e786&&_0xe3f8e3['context']!==_0x54e786&&(_0xe3f8e3['context']=_0x54e786,_0x2ae57d=!0x0),void 0x0!==_0x2b789f&&_0xe3f8e3['unlinkedAt']!==_0x2b789f&&(_0xe3f8e3['unlinkedAt']=_0x2b789f,_0x2ae57d=!0x0),_0x1c7271&&!_0x3515a0(_0x1c7271,_0xe3f8e3['attributes'])&&(_0xe3f8e3['attributes']=_0x1c7271,_0x2ae57d=!0x0),!_0x2ae57d)return Promise['resolve']();if(!_0xe3f8e3['isSubmitted']||_0x4a4c79||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xd4e0cf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5db771}=_0xe3f8e3,_0x50fac1=_0xd4e0cf['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5db771,'threadId':_0x13171a,'context':_0x54e786,'unlinkedAt':_0x2b789f,'attributes':_0x1c7271})['then'](()=>_0xd4e0cf['remove'](_0x50fac1))['catch'](_0x53f543=>{throw console['error'](_0x53f543),new _0x14a8d1('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x54ec4b){const _0x1b653c=this['context']['plugins']['get']($t),_0x1338e1=this['getCommentThread'](_0x54ec4b);if(_0x1338e1['_isAttached']=!0x1,this['_threadToController']['has'](_0x1338e1)){const _0x14b67c=this['_threadToController']['get'](_0x1338e1),_0x700ad7=_0x14b67c['view'],_0x153d4a=_0x1b653c['getByInnerView'](_0x700ad7);this['_threadToController']['delete'](_0x1338e1),this['_viewToController']['delete'](_0x700ad7),_0x153d4a&&_0x1b653c['remove'](_0x153d4a),_0x14b67c['destroy'](),_0x700ad7['destroy']()['then'](()=>{this['_unbindEditors'](_0x700ad7);});}}['_updateActiveAnnotation']({threadId:_0x46d9a9,resolvedAt:_0x3ea3aa,unlinkedAt:_0xfac29}){const _0x47f324=!!_0x3ea3aa,_0x46c0cd=this['context']['plugins']['get']($t),_0x181303=this['getCommentThread'](_0x46d9a9);if(this['_threadToController']['has'](_0x181303)){const _0x430b88=this['_threadToController']['get'](_0x181303)['view'],_0x43439a=_0x46c0cd['getByInnerView'](_0x430b88);_0x43439a&&(_0x47f324&&_0x46c0cd['_removeActiveAnnotation'](_0x43439a),_0xfac29?_0x43439a['isVisible']=!0x1:_0x43439a['refreshVisibility']());}}['_getExternalAuthor'](_0x3fc176){const _0x27b3db=this['context']['plugins']['get'](_0x2911ec),_0x2e260c=_0x34883d('external:'+_0x3fc176),_0x5651d8=_0x27b3db['getUser'](_0x2e260c);return _0x5651d8||_0x27b3db['addUser']({'id':_0x2e260c,'name':_0x3fc176});}['_createNewComment']({threadId:_0x294b68,commentId:_0x1b9766=_0x1b80c2(),content:_0x45a4b3,authorId:_0x380778,createdAt:_0x45d9f6,attributes:_0x432ed1}){if('string'!=typeof _0x1b9766)throw new _0x14a8d1('commentsrepository-invalid-commentid');if('string'!=typeof _0x380778)throw new _0x14a8d1('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x45a4b3||!_0x45a4b3['trim']())throw new _0x14a8d1('commentsrepository-invalid-comment-content');const _0x17c237=this['context']['plugins']['get'](_0x2911ec)['getUser'](_0x380778);if(!_0x17c237)throw new _0x14a8d1('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x380778});let _0x2cba96=null,_0x9a556e=_0x45d9f6;return _0x432ed1?.['@external']&&(_0x2cba96=this['_getExternalAuthor'](_0x432ed1['@external']['authorName']),_0x9a556e=new Date(_0x432ed1['@external']['createdAt'])),new ti(this,{'threadId':_0x294b68,'id':_0x1b9766,'author':_0x2cba96||_0x17c237,'creator':_0x17c237,'content':_0x45a4b3,'createdAt':_0x45d9f6,'authoredAt':_0x9a556e,'attributes':_0x432ed1});}['_addComment'](_0x430036){let {threadId:_0xc54d01,content:_0x5d68a7,attributes:_0x4e0a26,isFromAdapter:_0x4f625c}=_0x430036;const _0x2061cd=this['getCommentThread'](_0x430036['threadId']);if(!_0x2061cd)throw new _0x14a8d1('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x48a5f4=this['_createNewComment'](_0x430036),{id:_0xf4b49d}=_0x48a5f4;if(_0x2061cd['_add'](_0x48a5f4),_0x4f625c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2061cd['isSubmitted'])return Promise['resolve']();const _0x48b09a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x54b427}=_0x2061cd,_0x23eac7=_0x48b09a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4e0a26||(_0x4e0a26={}),this['adapter']['addComment']({'channelId':_0x54b427,'threadId':_0xc54d01,'commentId':_0xf4b49d,'content':_0x5d68a7,'attributes':_0x4e0a26})['then'](_0x1e8442=>{_0x48b09a['remove'](_0x23eac7),_0x1e8442&&this['_updateComment']({'channelId':_0x54b427,'threadId':_0xc54d01,'commentId':_0xf4b49d,'createdAt':_0x1e8442['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5e7910=>{throw console['error'](_0x5e7910),new _0x14a8d1('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5785c5,commentId:_0x3b03a6,content:_0x98c604,createdAt:_0x329daf,attributes:_0x3a517f,isFromAdapter:_0x14c648}){if(void 0x0!==_0x98c604&&('string'!=typeof _0x98c604||!_0x98c604['trim']()['length']))throw new _0x14a8d1('commentsrepository-update-comment-invalid-content');const _0x5e655d=this['getCommentThread'](_0x5785c5),_0x5831de=_0x5e655d['getComment'](_0x3b03a6);if(!_0x5831de)throw new _0x14a8d1('commentsrepository-update-missing-comment',this);let _0x91a276=!0x1;if(_0x98c604&&_0x98c604!==_0x5831de['content']&&(_0x5831de['isEditable']||_0x14c648)&&(_0x5831de['content']=_0x98c604,_0x91a276=!0x0),_0x329daf&&_0x329daf!==_0x5831de['createdAt']&&(_0x5831de['createdAt']=_0x329daf,_0x5831de['attributes']&&_0x5831de['attributes']['@external']||(_0x5831de['authoredAt']=_0x329daf),_0x91a276=!0x0),_0x3a517f&&!_0x3515a0(_0x3a517f,_0x5831de['attributes'])&&(_0x5831de['attributes']=_0x3a517f,_0x91a276=!0x0),!_0x91a276)return Promise['resolve']();if(_0x5e655d['fire']('commentUpdated'),_0x14c648||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xe1e8c6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x27fa0e}=this['getCommentThread'](_0x5831de['threadId']),_0x569264=_0xe1e8c6['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x27fa0e,'threadId':_0x5785c5,'commentId':_0x3b03a6,'content':_0x98c604,'attributes':_0x3a517f})['then'](()=>_0xe1e8c6['remove'](_0x569264))['catch'](_0x1e2eb0=>{throw console['error'](_0x1e2eb0),new _0x14a8d1('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3e872c,commentId:_0xeab6cb,isFromAdapter:_0x618980}){const _0x4dcc7a=this['getCommentThread'](_0x3e872c),_0x342c94=_0x4dcc7a['getComment'](_0xeab6cb);if(!_0x342c94)throw new _0x14a8d1('commentsrepository-remove-missing-comment',this);if(_0x4dcc7a['_remove'](_0x342c94),_0x618980||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5c4e06=this['context']['plugins']['get']('PendingActions'),{channelId:_0x36ef64}=_0x4dcc7a,_0x1d415d=_0x5c4e06['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x36ef64,'threadId':_0x3e872c,'commentId':_0xeab6cb})['then'](()=>_0x5c4e06['remove'](_0x1d415d))['catch'](_0x4693e5=>{throw console['error'](_0x4693e5),new _0x14a8d1('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1cc06c(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x135e24,_0x4516e9){super();const _0x2df56a=_0x4516e9['isResolvable'];this['channelId']=_0x4516e9['channelId'],this['id']=_0x4516e9['id'],this['comments']=new _0x5c5ef1(),this['_repository']=_0x135e24,this['_isAttached']=!0x1,this['_isSubmitted']=_0x4516e9['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x135e24,'_permissions',_0x135e24,'_readOnlyChannels',()=>_0x135e24['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x135e24,'_permissions',()=>_0x135e24['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x135e24,'_permissions',()=>{const _0x3f4520=_0x135e24['getPermissions'](this['channelId']);return _0x3f4520['write']||_0x3f4520['admin'];}),this['bind']('isResolvable')['to'](_0x135e24,'_permissions',()=>_0x2df56a&&_0x135e24['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x4516e9['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1ac2e5,_0x4d7104)=>_0x1ac2e5?_0x4d7104?_0x1ac2e5<_0x4d7104?_0x1ac2e5:_0x4d7104:_0x1ac2e5:_0x4d7104),this['set']('unlinkedAt',_0x4516e9['unlinkedAt']||null),this['set']('resolvedAt',_0x4516e9['resolvedAt']||null),this['set']('resolvedBy',_0x4516e9['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1a9858=>!!_0x1a9858),this['set']('attributes',_0x4516e9['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2a929e,_0x551201)=>_0x2a929e+_0x551201['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x10639f,id:_0x133d20}=this;this['_repository']['fire'](ii('submitCommentThread',_0x10639f),{'channelId':_0x10639f,'threadId':_0x133d20});}['setUnlinkedAt'](_0x3f6f44){this['_update']({'unlinkedAt':_0x3f6f44});}['resolve']({resolvedAt:_0x121480=new Date(),resolvedBy:_0x564431='',isFromAdapter:_0x3a5a7f=!0x1}={}){const _0x5ea705=this['_repository']['context']['plugins']['get'](_0x2911ec)['me'],{channelId:_0x55f9a3,id:_0x1c71b0}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x55f9a3),{'channelId':_0x55f9a3,'threadId':_0x1c71b0,'resolvedAt':_0x121480,'resolvedBy':_0x564431||_0x5ea705['id'],'isFromAdapter':_0x3a5a7f});}['reopen']({isFromAdapter:_0x2051ad=!0x1}={}){const {channelId:_0xb8d168,id:_0x27520d}=this;this['_repository']['fire'](ii('reopenCommentThread',_0xb8d168),{'channelId':_0xb8d168,'threadId':_0x27520d,'isFromAdapter':_0x2051ad});}['setContext'](_0x86ad57){this['context']||this['_update']({'context':_0x86ad57});}['setAttribute'](_0x179a51,_0x2fc14a){const _0x46df78=_0x103628(this['attributes']);_0x5212f2(_0x46df78,_0x179a51,_0x2fc14a),this['_update']({'attributes':_0x46df78});}['removeAttribute'](_0xb716c3){const _0x1a87c6=_0x103628(this['attributes']);_0x19194c(_0x1a87c6,_0xb716c3),this['_update']({'attributes':_0x1a87c6});}['remove']({isFromAdapter:_0x3c9880=!0x1}={}){const {channelId:_0x3a0be3,id:_0x4cb415}=this;this['_repository']['fire'](ii('removeCommentThread',_0x3a0be3),{'channelId':_0x3a0be3,'threadId':_0x4cb415,'isFromAdapter':_0x3c9880});}['attachTo'](_0x4689a0){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x4689a0});}['addComment'](_0x1f5e9a){const {channelId:_0xdc28f3,id:_0xca0a97}=this;this['_repository']['fire'](ii('addComment',_0xdc28f3,_0xca0a97),Object['assign']({'channelId':_0xdc28f3,'threadId':_0xca0a97},_0x1f5e9a));}['getComment'](_0x233796){if('string'!=typeof _0x233796)throw new _0x14a8d1('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x233796});return this['comments']['get'](_0x233796);}['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'](_0x193135=>_0x193135['toJSON']()),'attributes':this['attributes']};}['_add'](_0x44ef3a){return this['listenTo'](_0x44ef3a,'change:authoredAt',()=>{const _0x22a423=this['_findOptimalIndex'](_0x44ef3a),_0x5ce16d=this['comments'];_0x22a423-0x1!=_0x5ce16d['getIndex'](_0x44ef3a)&&_0x22a423+0x1!=_0x5ce16d['getIndex'](_0x44ef3a)&&(this['_remove'](_0x44ef3a),this['_add'](_0x44ef3a));}),this['comments']['add'](_0x44ef3a,this['_findOptimalIndex'](_0x44ef3a));}['_update'](_0xa6d0f){const {channelId:_0x41ca49,id:_0x3b240f}=this;this['_repository']['fire'](ii('updateCommentThread',_0x41ca49),{..._0xa6d0f,'channelId':_0x41ca49,'threadId':_0x3b240f});}['_remove'](_0x455327){return this['stopListening'](_0x455327),_0x455327['destroy'](),this['comments']['remove'](_0x455327);}['_findOptimalIndex'](_0xc508cd){const _0x4645cf=this['comments']['find'](_0x1fd582=>new Date(_0x1fd582['authoredAt'])['getTime']()>new Date(_0xc508cd['authoredAt'])['getTime']());return _0x4645cf?this['comments']['getIndex'](_0x4645cf):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1cc06c(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x18955c,_0x510c47){super();const _0x3e4fcc=_0x18955c['context']['plugins']['get'](_0x2911ec)['me'],_0x47f058=_0x18955c['getCommentThread'](_0x510c47['threadId']),_0x8ce6f5=0x0===_0x47f058['comments']['length'],_0x4c2856=_0x3e4fcc===_0x510c47['author'];this['id']=_0x510c47['id'],this['threadId']=_0x510c47['threadId'],this['author']=_0x510c47['author'],this['creator']=_0x510c47['creator'],this['isExternal']=Boolean(_0x510c47['attributes']&&_0x510c47['attributes']['@external']),this['set']('content',_0x510c47['content']),this['createdAt']=_0x510c47['createdAt']||new Date(),this['set']('authoredAt',_0x510c47['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x47f058,'resolvedAt'),this['set']('attributes',_0x510c47['attributes']||{}),this['bind']('isEditable')['to'](_0x18955c,'_permissions',()=>{const _0x3f3d13=_0x18955c['getPermissions'](_0x47f058['channelId'])['write'],_0x4d0538=_0x18955c['getPermissions'](_0x47f058['channelId'])['modifyAll'];return _0x4c2856&&_0x3f3d13||!_0x4c2856&&_0x4d0538;}),this['bind']('isRemovable')['to'](_0x47f058,'isRemovable',_0x18955c,'_permissions',_0x4dea2e=>{const _0x32dac9=_0x18955c['getPermissions'](_0x47f058['channelId'])['write'],_0xe2a053=_0x18955c['getPermissions'](_0x47f058['channelId'])['modifyAll'];return _0x4c2856&&_0x32dac9||_0x4dea2e&&_0x8ce6f5||!_0x4c2856&&_0xe2a053&&!_0x8ce6f5;}),this['bind']('isReadOnly')['to'](_0x47f058,'isReadOnly'),this['_repository']=_0x18955c;}get['weight'](){return Math['max'](function(_0x561d49){const _0x1b6bae=document['createElement']('div');return _0x1b6bae['innerHTML']=_0x561d49,_0x1b6bae['textContent']['length'];}(this['content']),0xc8);}['update'](_0x31784d){const {threadId:_0x5a4781,id:_0x48ad92}=this;if(!this['_repository']['hasCommentThread'](_0x5a4781))throw new _0x14a8d1('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x1b7838}=this['_repository']['getCommentThread'](_0x5a4781);this['_repository']['fire'](ii('updateComment',_0x1b7838,_0x5a4781),{'channelId':_0x1b7838,'threadId':_0x5a4781,'commentId':_0x48ad92,..._0x31784d});}['setAttribute'](_0x1b71f2,_0xb7dc12){const _0x46189c=_0x103628(this['attributes']);_0x5212f2(_0x46189c,_0x1b71f2,_0xb7dc12),this['update']({'attributes':_0x46189c});}['removeAttribute'](_0x35125b){const _0x1af64d=_0x103628(this['attributes']);_0x19194c(_0x1af64d,_0x35125b),this['update']({'attributes':_0x1af64d});}['remove'](_0x1692c8={}){if(!_0x1692c8['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x130e34,id:_0x4c7b5d}=this;if(!this['_repository']['hasCommentThread'](_0x130e34))throw new _0x14a8d1('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4a8652}=this['_repository']['getCommentThread'](_0x130e34);this['_repository']['fire'](ii('removeComment',_0x4a8652,_0x130e34),{'channelId':_0x4a8652,'threadId':_0x130e34,'commentId':_0x4c7b5d,..._0x1692c8});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x181ffc,..._0x2ebf84){for(const _0x3d2aba of _0x2ebf84)void 0x0!==_0x3d2aba&&(_0x181ffc+=':'+String(_0x3d2aba));return _0x181ffc;}class ei extends _0x596559{constructor(_0x3b5cd2){super(_0x3b5cd2),this['set']('hasContent',!0x1);}['refresh'](){const _0x219cf7=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x11b887 of _0x219cf7['getRanges']())if(this['_hasContent'](_0x11b887))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x136b21=_0x1b80c2(),ranges:_0x38c8b0,comment:_0x3db00d}={}){const _0x3ad5f3=this['editor']['model'],_0x50ad58=_0x38c8b0??Array['from'](_0x3ad5f3['document']['selection']['getRanges']()),_0x113dfa=[];for(const _0x1cc03c of _0x50ad58)this['_hasContent'](_0x1cc03c)&&_0x113dfa['push'](this['_trimToContent'](_0x1cc03c));if(!_0x113dfa['length'])throw new _0x14a8d1('addcommentthreadcommand-incorrect-ranges',null);_0x3db00d&&this['_createCommentThread'](_0x136b21,_0x3db00d),this['_createMarkersFromRanges'](_0x136b21,_0x113dfa,!!_0x3db00d);}['_createMarkersFromRanges'](_0x401046,_0x5ad725,_0x2b399d){this['editor']['model']['change'](_0x329156=>{for(const _0x15553f of _0x5ad725){const _0x1e1de2=_0x1b80c2()['substr'](0x1,0x5),_0x165da6='comment:'+_0x401046+':'+_0x1e1de2;_0x329156['addMarker'](_0x165da6,{'range':_0x15553f,'usingOperation':_0x2b399d,'affectsData':_0x2b399d});}});}['_createCommentThread'](_0x12b2da,_0x53b539){const _0x4e8f98=this['editor']['plugins']['get']('CommentsRepository'),_0x40684a=this['editor']['config']['get']('collaboration.channelId'),_0x330a4a=this['editor']['plugins']['get']('Users')['me'];if(!_0x330a4a)throw new _0x14a8d1('addcommentthreadcommand-user-not-found',null);_0x4e8f98['addCommentThread']({'threadId':_0x12b2da,'channelId':_0x40684a,'comments':[{'authorId':_0x330a4a['id'],'content':_0x53b539,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x94e33b){for(const _0x4dacfd of _0x94e33b['getItems']())if(this['_itemIsContent'](_0x4dacfd))return!0x0;return!0x1;}['_itemIsContent'](_0x34e318){return _0x34e318['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x34e318)&&!_0x34e318['is']('element','tableCell');}['_trimToContent'](_0x5d8a5f){const _0x26e162=_0x228a91=>!this['_itemIsContent'](_0x228a91['item']),_0x32f28f=_0x5d8a5f['start']['getLastMatchingPosition'](_0x26e162),_0x426f38=_0x5d8a5f['end']['getLastMatchingPosition'](_0x26e162,{'direction':'backward'});return this['editor']['model']['createRange'](_0x32f28f,_0x426f38);}}class si extends _0x4edfe9{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4bdadf){super(_0x4bdadf),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4d24d9=this['editor'],_0x7f8cc7=_0x4d24d9['model']['document']['selection'],_0x55c8f1=_0x1b709e(()=>this['refreshSelectedViews'](),0xa);_0x7f8cc7['on']('change:range',(_0x1e9094,_0x1b9c89)=>{_0x1b9c89['directChange']&&(_0x55c8f1['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4d24d9['editing']['view']['document'],'change:isFocused',(_0x18d8a0,_0x2291c8,_0x3771eb)=>{_0x3771eb&&_0x55c8f1();}),this['listenTo'](_0x4d24d9['ui']['focusTracker'],'change:isFocused',(_0x12818e,_0xaacf37,_0x450e1e)=>{_0x450e1e||this['fire']('blur',{'isAnnotationTracked':_0x128d6b=>this['_editorAnnotationsData']['has'](_0x128d6b['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5c5ffc){if(this['_editorAnnotations']['has'](_0x5c5ffc['view']))return;this['_editorAnnotations']['add'](_0x5c5ffc['view']),this['editor']['ui']['focusTracker']['add'](_0x5c5ffc['view']['element']);const _0x215f3e=this['editor']['plugins']['get']($t);this['listenTo'](_0x215f3e['collection'],'remove',(_0x31b3d0,_0x139dc9)=>{this['editor']['ui']['focusTracker']['remove'](_0x139dc9['view']['element']),this['_editorAnnotations']['delete'](_0x139dc9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x478579){if('function'!=typeof _0x478579)throw new _0x14a8d1('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x478579);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3d19b0,annotations:_0x5d9a61}){const _0x260c0f=[],_0x2fe8ec=this['editor']['model']['document']['selection'],_0x36dae6=Array['from'](_0x2fe8ec['getRanges']());for(const [_0x3bf662,_0x4d7909]of this['_editorAnnotationsData']){const _0x3ef005=_0x3c7644(_0x4d7909),_0x17ddac=_0x5d9a61['getByInnerView'](_0x3bf662);_0x3ef005&&_0x17ddac&&_0x260c0f['push']({'annotation':_0x17ddac,'range':_0x3ef005});}function _0x3c7644(_0x3125fe){for(const _0x4af43e of _0x3125fe)for(const _0x181393 of _0x36dae6)if(_0x4af43e['containsRange'](_0x181393,!_0x2fe8ec['isCollapsed']))return _0x4af43e;return null;}return _0x260c0f['sort']((_0x47328b,_0x182ec1)=>{const _0x523bc1=_0x47328b['range'],_0x47823c=_0x182ec1['range'];if(!_0x523bc1['isEqual'](_0x47823c)){if(_0x523bc1['containsRange'](_0x47823c,!0x0))return 0x1;if(_0x47823c['containsRange'](_0x523bc1,!0x0))return-0x1;}return _0x47328b['annotation']==_0x3d19b0?-0x1:_0x182ec1['annotation']==_0x3d19b0?0x1:0x0;})['map'](_0x2cd424=>_0x2cd424['annotation']);}get['_editorAnnotationsData'](){const _0x28f8c9=new Map();for(const _0x39b67d of Array['from'](this['_dataCollectors']))for(const [_0x4a167e,_0x3043e8]of _0x39b67d())_0x28f8c9['set'](_0x4a167e,_0x3043e8);return _0x28f8c9;}}class ni extends _0x4edfe9{['afterInit'](){const _0x3a8649=this['editor'];if(!_0x3a8649['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3a8649['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x4edfe9{constructor(_0x52a933){super(_0x52a933),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x175f07=this['editor'],_0x1d5aa2=_0x175f07['commands']['get']('importWord'),_0x111fe5=_0x175f07['plugins']['get'](_0x2911ec);_0x1d5aa2&&(_0x1d5aa2['on']('execute',(_0x14c500,[,_0x57408f])=>{_0x57408f['collaboration_features']={'comments':!0x0,'user_id':_0x111fe5['me']['id']};},{'priority':_0x1c06c6['high']+0xa}),this['listenTo'](_0x1d5aa2,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4b005a,_0x10a3f5){const {comment_threads:_0x3159d5}=_0x10a3f5;_0x3159d5&&_0x3159d5['forEach'](({thread_id:_0x56e533,comments:_0x2e4024,is_resolved:_0x38c874})=>{const _0x2e8973=new Date(),_0x412edc=_0x2e4024['map'](({author:_0xfa4187,content:_0x4569fc,created_at:_0x59b581})=>({'content':_0x4569fc,'authorId':this['editor']['plugins']['get'](_0x2911ec)['me']['id'],'createdAt':_0x2e8973,'attributes':{'@external':{'authorName':_0xfa4187,'createdAt':_0x59b581?new Date(_0x59b581):new Date(),'source':'importWord'}}})),_0x24d1c1=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x24d1c1,'threadId':_0x56e533,'comments':_0x412edc,'resolvedAt':_0x38c874?_0x2e8973:null});});}}class ri extends _0x4edfe9{constructor(_0xd7fd4){super(_0xd7fd4),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x5786b7=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5786b7,'contentInsertion',(_0x37fdee,_0x1d9690)=>this['_removeMarkersWithoutThreads'](_0x1d9690['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3b7b4f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3b7b4f;const _0x292e36=this['editor']['plugins']['get']('CommentsRepository');for(const _0x39bb65 of _0x3b7b4f['keys']()){const [_0x5b31ad,_0x1069fd]=_0x39bb65['split'](':');'comment'!=_0x5b31ad||_0x292e36['hasCommentThread'](_0x1069fd)||_0x3b7b4f['delete'](_0x39bb65);}return _0x3b7b4f;}['_registerMarkerInClipboardPipeline'](){const _0x19512d=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2e9740=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2e9740&&_0x19512d['_registerMarkerToCopy']('comment',_0x2e9740);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xa22983){switch(_0xa22983){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x5ec601){const _0x33c025=_0x5ec601['split'](':');return{'group':_0x33c025[0x0],'id':_0x33c025[0x1],'part':_0x33c025[0x2]};}class ai extends _0x4edfe9{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x37a599,_0xbe22ed)=>{if(!_0xbe22ed['options']['showCommentHighlights'])return null;if(_0xbe22ed['options']['ignoreResolvedComments']){const {id:_0x5275d4}=hi(_0x37a599['markerName']),_0x5aa59e=this['editor']['plugins']['get'](Qt);if(_0x5aa59e['getCommentThread'](_0x5275d4)?.['isResolved']&&_0x37a599['item'])return _0xbe22ed['consumable']['consume'](_0x37a599['item'],'addMarker:'+_0x37a599['markerName']),_0xbe22ed['consumable']['consume'](_0x37a599['item'],'removeMarker:'+_0x37a599['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x172ea6=>{_0x172ea6['on']('addMarker:comment',(_0x65e1a6,_0x5bf185,_0x1eeac0)=>{if(!_0x1eeac0['options']['showCommentHighlights'])return;const _0xf38ae=_0x5bf185['item'];if(!_0xf38ae)return;const _0x1e9871=_0x1eeac0['mapper']['toViewElement'](_0xf38ae);this['editor']['model']['schema']['isObject'](_0xf38ae)&&_0x1e9871&&!_0x1e9871['getCustomProperty']('widget')&&_0x1e9871['is']('containerElement')&&Ct(_0x1e9871,_0x1eeac0['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x70aa3d,{writer:_0x423a87,options:_0x49bfdb})=>{if(!_0x49bfdb['showCommentHighlights'])return null;const _0x4107d0=_0x423a87['createContainerElement']('div'),_0x4bbf61=_0x423a87['createEmptyElement']('hr');return _0x423a87['addClass']('ck-horizontal-line',_0x4107d0),_0x423a87['insert'](_0x423a87['createPositionAt'](_0x4107d0,0x0),_0x4bbf61),_0x4107d0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x29171c,{writer:_0x6d49df,options:_0x466abc})=>{if(!_0x466abc['showCommentHighlights'])return null;const _0x45298f=_0x6d49df['createContainerElement']('span'),_0x1c1532=_0x6d49df['createEmptyElement']('img');return _0x6d49df['addClass']('image-inline',_0x45298f),_0x6d49df['insert'](_0x6d49df['createPositionAt'](_0x45298f,0x0),_0x1c1532),_0x45298f;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x669254,{writer:_0x1f3fd7,options:_0x13d8c2})=>{if(_0x13d8c2['showCommentHighlights'])return _0x1f3fd7['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5799a5,_0x15df7e,_0x15c036)=>{_0x15c036['options']['showCommentHighlights']&&_0x5799a5['stop']();},{'priority':'high'});}}class ci extends _0x4edfe9{static get['requires'](){return[Qt,si,_0x2911ec,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c0e3f){super(_0x3c0e3f),this['set']('isThreadsLoadingPaused',!0x0),_0x3c0e3f['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3472fc,_0x2116e0,_0x4d6fc6,_0x290b49)=>{const _0x51018a=_0x3c0e3f['plugins']['get'](Qt),_0x39c58e=_0x4d6fc6?hi(_0x4d6fc6)['id']:null;_0x3c0e3f['model']['change'](()=>{if(_0x39c58e){const _0x35563f=this['getAllMarkersForId'](_0x39c58e);for(const _0x24c240 of _0x35563f)_0x3c0e3f['editing']['reconvertMarker'](_0x24c240);}if(_0x290b49){const {id:_0x5b4f31}=hi(_0x290b49),_0x2eb322=_0x51018a['getCommentThread'](_0x5b4f31);if(_0x2eb322&&_0x2eb322['unlinkedAt'])return;if(_0x2eb322&&!_0x2eb322['isAttached'])return;const _0x50290c=this['getAllMarkersForId'](_0x5b4f31);for(const _0x40f7bc of _0x50290c)_0x3c0e3f['editing']['reconvertMarker'](_0x40f7bc);}}),_0x39c58e&&this['scrollToThreadMarker'](_0x39c58e);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x463ed6=this['editor'],_0x3e2fc3=_0x463ed6['plugins']['get'](Qt),_0x33bab9=_0x463ed6['config']['get']('collaboration.channelId'),_0x30f0c5=_0x3e2fc3['getCommentThreads']()['filter'](_0x3961c4=>_0x3961c4['channelId']!==_0x33bab9);_0x463ed6['commands']['add']('addCommentThread',new ei(_0x463ed6)),this['listenTo'](_0x463ed6,'change:isReadOnly',(_0x576c84,_0xf08a25,_0x276b0d)=>{_0x3e2fc3['switchReadOnly'](_0x276b0d,_0x463ed6['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3e2fc3,di('addCommentThread',_0x33bab9),(_0x43a0f4,{threadId:_0x4fc30f})=>{const _0x375dfb=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x4fc30f);_0x375dfb?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4fc30f);}),this['listenTo'](_0x3e2fc3,di('removeCommentThread',_0x33bab9),(_0x3d850c,{threadId:_0x3a982e})=>{_0x463ed6['model']['enqueueChange']({'isUndoable':!0x1},_0x4d84de=>{const _0x5b463d=this['getAllMarkersForId'](_0x3a982e);for(const _0x378110 of _0x5b463d)_0x4d84de['removeMarker'](_0x378110);});}),this['listenTo'](_0x3e2fc3,di('resolveCommentThread',_0x33bab9),(_0x29a929,{threadId:_0xe66d55})=>{(this['_reconvertMarkers'](_0xe66d55),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0xe66d55)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3e2fc3,di('reopenCommentThread',_0x33bab9),(_0x377e06,{threadId:_0x5c255a})=>{this['_reconvertMarkers'](_0x5c255a);},{'priority':'low'}),this['listenTo'](_0x3e2fc3,di('addComment',_0x33bab9),(_0x26659e,{threadId:_0x4b6081,isFromAdapter:_0x505e7a})=>{const _0x3b5106=this['getAllMarkersForId'](_0x4b6081);if(_0x505e7a||0x0==_0x3b5106['length']||!_0x3e2fc3['hasCommentThread'](_0x4b6081))return;0x1===_0x3e2fc3['getCommentThread'](_0x4b6081)['length']&&_0x463ed6['model']['enqueueChange']({'isUndoable':!0x1},_0x2fd70b=>{for(const _0x2504ac of _0x3b5106)_0x2fd70b['updateMarker'](_0x2504ac,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x30f0c5);}['afterInit'](){!async function(_0xdb5235){const _0x17180d=_0x44debd([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x399ee4=0x73460ab3,_0xe25b10=0x73418feb^_0x399ee4,_0x33d86c=window[_0x44debd([0x44,0x61,0x74,0x65])][_0x44debd([0x6e,0x6f,0x77])](),_0x4e3543=_0xdb5235[_0x44debd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xc15c3c=new window[(_0x44debd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x226b09=>{_0x4e3543[_0x44debd([0x6f,0x6e,0x63,0x65])](_0x44debd([0x72,0x65,0x61,0x64,0x79]),_0x226b09);}),_0x3ef3d9={[_0x44debd([0x6b,0x74,0x79])]:_0x44debd([0x45,0x43]),[_0x44debd([0x75,0x73,0x65])]:_0x44debd([0x73,0x69,0x67]),[_0x44debd([0x63,0x72,0x76])]:_0x44debd([0x50,0x2d,0x32,0x35,0x36]),[_0x44debd([0x78])]:_0x44debd([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x44debd([0x79])]:_0x44debd([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x44debd([0x61,0x6c,0x67])]:_0x44debd([0x45,0x53,0x32,0x35,0x36])},_0x3e1d67=_0x4e3543[_0x44debd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x44debd([0x67,0x65,0x74])](_0x44debd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x42adbc(){let _0x4b9329,_0x1f9305=null,_0x1ff80a=null;try{if(_0x3e1d67==_0x44debd([0x47,0x50,0x4c]))return _0x44debd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4b9329=_0x597a53(),!_0x4b9329)return _0x44debd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4b9329[_0x44debd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1ff80a=_0x3de5ed(_0x4b9329[_0x44debd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4b9329[_0x44debd([0x6a,0x74,0x69])])),await _0x24a164()?_0x39a1a3()?_0x2ef930()?_0x44debd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5334ab()?(_0x4b9329[_0x44debd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x44debd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1f9305=_0x864f4b(_0x44debd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x271cd2()):_0x44debd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x44debd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x44debd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x44debd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2ef930(){const _0x54a27f=[_0x44debd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x44debd([0x74,0x72,0x69,0x61,0x6c])][_0x44debd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b9329[_0x44debd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x33d86c/0x3e8:0xe10*_0xe25b10;return _0x4b9329[_0x44debd([0x65,0x78,0x70])]<_0x54a27f;}function _0x39a1a3(){const _0x5ccb3e=_0x4b9329[_0x44debd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5ccb3e)return!0x1;if(_0x5ccb3e[_0x44debd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44debd([0x2a])))return!0x0;if(_0x5ccb3e[_0x44debd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44debd([0x43,0x4d,0x54])))return!0x0;if(_0x5ccb3e[_0x44debd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44debd([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4b5649())return!0x0;if(_0x5ccb3e[_0x44debd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44debd([0x52,0x43,0x4d,0x54]))){if(_0x42677b())return!0x0;if(_0x12fc6a()||_0x2f974f())return!0x0;}return!0x1;}function _0x5334ab(){const _0x4e3b36=_0x4b9329[_0x44debd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e3b36||0x0==_0x4e3b36[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x16d6fa}=new URL(window[_0x44debd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e3b36[_0x44debd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16d6fa))return!0x0;const _0x2f0572=_0x16d6fa[_0x44debd([0x73,0x70,0x6c,0x69,0x74])](_0x44debd([0x2e]));return _0x4e3b36[_0x44debd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e2fe0=>_0x5e2fe0[_0x44debd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44debd([0x2a])))[_0x44debd([0x6d,0x61,0x70])](_0x1431c7=>_0x1431c7[_0x44debd([0x73,0x70,0x6c,0x69,0x74])](_0x44debd([0x2e])))[_0x44debd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xe7f304=>_0xe7f304[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2f0572[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x44debd([0x6d,0x61,0x70])](_0x468e8c=>Array(_0x2f0572[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x468e8c[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x44debd([0x66,0x69,0x6c,0x6c])](_0x468e8c[0x0]===_0x44debd([0x2a])?_0x44debd([0x2a]):'')[_0x44debd([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x468e8c))[_0x44debd([0x73,0x6f,0x6d,0x65])](_0x5ada9b=>_0x2f0572[_0x44debd([0x65,0x76,0x65,0x72,0x79])]((_0x2f458d,_0x948315)=>_0x5ada9b[_0x948315]===_0x2f458d||_0x5ada9b[_0x948315]===_0x44debd([0x2a])));}function _0x271cd2(){return _0x1f9305&&_0x1ff80a?new window[(_0x44debd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4a635a,_0x58f7a1)=>{_0x1f9305[_0x44debd([0x74,0x68,0x65,0x6e])](_0x4a635a,_0x58f7a1),_0x1ff80a[_0x44debd([0x74,0x68,0x65,0x6e])](_0x266e7d=>{_0x266e7d!=_0x44debd([0x56,0x61,0x6c,0x69,0x64])&&_0x4a635a(_0x266e7d);},_0x58f7a1);}):_0x1f9305||_0x1ff80a||_0x44debd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3de5ed(_0xe996b0,_0x4e654d){return new window[(_0x44debd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x29c0b5=>{if(_0x3ab798())return _0x29c0b5(_0x44debd([0x56,0x61,0x6c,0x69,0x64]));_0x2d8b67(),_0x4e3543[_0x44debd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x44debd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2bad59=!0x1;const _0x3fb33c=_0x1b80c2();function _0x2b6813(_0x33c3f2){return!!_0x33c3f2&&(typeof _0x33c3f2===_0x44debd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x33c3f2===_0x44debd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x33c3f2[_0x44debd([0x74,0x68,0x65,0x6e])]===_0x44debd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x33c3f2[_0x44debd([0x63,0x61,0x74,0x63,0x68])]===_0x44debd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4a09e8(_0x55bb06){_0x217281(_0x55bb06)[_0x44debd([0x74,0x68,0x65,0x6e])](_0x27b54c=>{if(!_0x27b54c||_0x27b54c[_0x44debd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x44debd([0x6f,0x6b]))return _0x44debd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2e28d2(_0x4419de(_0x3fb33c+_0x4e654d))!=_0x27b54c[_0x44debd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x44debd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x44debd([0x56,0x61,0x6c,0x69,0x64]);})[_0x44debd([0x74,0x68,0x65,0x6e])](_0x2bae7a=>(_0x5653d4(),_0x2bae7a),()=>{const _0x50c11b=_0x23fabe();return null==_0x50c11b?(_0x5653d4(),_0x44debd([0x56,0x61,0x6c,0x69,0x64])):_0x44debd(_0x33d86c-_0x50c11b>(0x574a8eb3^_0x399ee4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x44debd([0x74,0x68,0x65,0x6e])](_0x29c0b5)[_0x44debd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x29c0b5(_0x44debd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3fdbe6=0x7370e433^_0x399ee4;function _0x5653d4(){const _0x4ff2fd=_0x44debd([0x6c,0x6c,0x63,0x74,0x2d])+_0x2e28d2(_0x4419de(_0xe996b0)),_0x59c783=_0x4adad2(_0x2e28d2(window[_0x44debd([0x4d,0x61,0x74,0x68])][_0x44debd([0x63,0x65,0x69,0x6c])](_0x33d86c/_0x3fdbe6)));window[_0x44debd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x44debd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4ff2fd,_0x59c783);}function _0x23fabe(){const _0x26ac6d=_0x44debd([0x6c,0x6c,0x63,0x74,0x2d])+_0x2e28d2(_0x4419de(_0xe996b0)),_0x2882c3=window[_0x44debd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x44debd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x26ac6d);return _0x2882c3?window[_0x44debd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4adad2(_0x2882c3),0x10)*_0x3fdbe6:null;}function _0x217281(_0xb9a7d4){return new window[(_0x44debd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42d16a,_0x26fad8)=>{_0xb9a7d4[_0x44debd([0x74,0x68,0x65,0x6e])](_0x42d16a,_0x26fad8),window[_0x44debd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x26fad8,0x7347de73^_0x399ee4);});}}_0x4e3543[_0x44debd([0x6f,0x6e])](_0x44debd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x423f1e,_0x37ea99)=>{if(_0x37ea99[0x0]!=_0xe996b0)return _0x29c0b5(_0x44debd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x37ea99[0x1]={..._0x37ea99[0x1],[_0x44debd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3fb33c};},{[_0x44debd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x44debd([0x68,0x69,0x67,0x68])}),_0x4e3543[_0x44debd([0x6f,0x6e])](_0x44debd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x34d77b=>{_0x2b6813(_0x34d77b[_0x44debd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2bad59=!0x0,_0x4a09e8(_0x34d77b[_0x44debd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x44debd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x44debd([0x6c,0x6f,0x77])}),_0xc15c3c[_0x44debd([0x74,0x68,0x65,0x6e])](()=>{_0x2bad59||_0x29c0b5(_0x44debd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3ab798(){return _0x4e3543[_0x44debd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44debd([0x76,0x69,0x65,0x77])][_0x44debd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x44debd([0x61,0x75,0x74,0x6f]);}function _0x2d8b67(){_0x4e3543[_0x44debd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44debd([0x76,0x69,0x65,0x77])][_0x44debd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x44debd([0x61,0x75,0x74,0x6f]);}}function _0x864f4b(_0x1bac3a){const _0x3234ac=[new window[(_0x44debd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ef7d5=>setTimeout(_0x3ef7d5,0x734f347f^_0x399ee4)),_0xc15c3c[_0x44debd([0x74,0x68,0x65,0x6e])](()=>new window[(_0x44debd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x472a8c=>{let _0x498a2d=0x0;_0x4e3543[_0x44debd([0x6d,0x6f,0x64,0x65,0x6c])][_0x44debd([0x6f,0x6e])](_0x44debd([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x587c1f,_0x128eba)=>{_0x128eba[0x0][_0x44debd([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x498a2d++,_0x498a2d==(0x73460f5b^_0x399ee4)&&(_0x472a8c(),_0x587c1f[_0x44debd([0x6f,0x66,0x66])]());});}))];return window[_0x44debd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x44debd([0x72,0x61,0x63,0x65])](_0x3234ac)[_0x44debd([0x74,0x68,0x65,0x6e])](()=>_0x1bac3a);}async function _0x8f1d71(){await _0xc15c3c,_0x4e3543[_0x44debd([0x6d,0x6f,0x64,0x65,0x6c])][_0x44debd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x329881,_0x4e3543[_0x44debd([0x6d,0x6f,0x64,0x65,0x6c])][_0x44debd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x329881,_0x4e3543[_0x44debd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x44debd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4b5649(){return window[_0x44debd([0x67,0x6c,0x6f,0x62])]&&window[_0x44debd([0x67,0x6c,0x6f,0x62])][_0x44debd([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x42677b(){return _0x3ce2cc(_0x44debd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x168162(_0x44debd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x44debd([0x73,0x74,0x61,0x74,0x65])]==_0x44debd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x12fc6a(){return _0x3ce2cc(_0x44debd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x2f974f(){return _0x3ce2cc(_0x44debd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3c2ef5(_0x5c5eef){const _0x3dbedb=_0x44e1a8();_0x4e3543[_0x3dbedb]=_0x44debd([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5c5eef,_0x5c5eef!=_0x44debd([0x56,0x61,0x6c,0x69,0x64])&&_0x8f1d71();}function _0x44e1a8(){const _0x2f6a1d=window[_0x44debd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x44debd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x44debd([0x6e,0x6f,0x77])]())[_0x44debd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x44debd([0x2e]),'');let _0x2b1b93=_0x44debd([0x4b]);for(let _0x18a2da=0x0;_0x18a2da<_0x2f6a1d[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x18a2da+=0x2){let _0x430e9d=window[_0x44debd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f6a1d[_0x44debd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x18a2da,_0x18a2da+0x2));_0x430e9d>=_0x17180d[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x430e9d-=_0x17180d[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2b1b93+=_0x17180d[_0x430e9d];}return _0x2b1b93;}function _0x597a53(){const _0x1177be=_0x3e1d67[_0x44debd([0x73,0x70,0x6c,0x69,0x74])](_0x44debd([0x2e]));if(0x3!=_0x1177be[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x390458(_0x1177be[0x1]);function _0x390458(_0x3c1d6a){const _0x2a50cb=_0x541800(_0x3c1d6a);return _0x2a50cb&&_0x15257d()?_0x2a50cb:null;function _0x15257d(){const _0x535768=_0x2a50cb[_0x44debd([0x6a,0x74,0x69])],_0x3cd0d0=window[_0x44debd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x535768[_0x44debd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x535768[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5766dd={..._0x2a50cb,[_0x44debd([0x6a,0x74,0x69])]:_0x535768[_0x44debd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x535768[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5766dd[_0x44debd([0x76,0x63])],_0x4419de(_0x5766dd)==_0x3cd0d0;}}}async function _0x24a164(){let _0x54f03d=!0x0;try{const _0x9d11ca=_0x3e1d67[_0x44debd([0x73,0x70,0x6c,0x69,0x74])](_0x44debd([0x2e])),[_0x20427e,_0x535cdb,_0x5169fa]=_0x9d11ca;return _0x24cb25(_0x20427e),await _0x22de2d(_0x20427e,_0x535cdb,_0x5169fa),_0x54f03d;}catch{return!0x1;}function _0x24cb25(_0x2dba40){const _0x3af1ce=_0x541800(_0x2dba40);_0x3af1ce&&_0x3af1ce[_0x44debd([0x61,0x6c,0x67])]==_0x44debd([0x45,0x53,0x32,0x35,0x36])||(_0x54f03d=!0x1);}async function _0x22de2d(_0x4e3aee,_0x4addaa,_0x433a9b){const _0x48a669=window[_0x44debd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x44debd([0x66,0x72,0x6f,0x6d])](_0x12507e(_0x433a9b),_0x1ea333=>_0x1ea333[_0x44debd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x54bcde=new window[(_0x44debd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x44debd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4e3aee+_0x44debd([0x2e])+_0x4addaa),_0x30754f=window[_0x44debd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x44debd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x30754f)return;const _0xecd840=await _0x30754f[_0x44debd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x44debd([0x6a,0x77,0x6b]),_0x3ef3d9,{[_0x44debd([0x6e,0x61,0x6d,0x65])]:_0x44debd([0x45,0x43,0x44,0x53,0x41]),[_0x44debd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x44debd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x44debd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x30754f[_0x44debd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x44debd([0x6e,0x61,0x6d,0x65])]:_0x44debd([0x45,0x43,0x44,0x53,0x41]),[_0x44debd([0x68,0x61,0x73,0x68])]:{[_0x44debd([0x6e,0x61,0x6d,0x65])]:_0x44debd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xecd840,_0x48a669,_0x54bcde)||(_0x54f03d=!0x1);}}function _0x541800(_0x4c9b3c){return _0x4c9b3c[_0x44debd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x44debd([0x65,0x79]))?JSON[_0x44debd([0x70,0x61,0x72,0x73,0x65])](_0x12507e(_0x4c9b3c)):null;}function _0x12507e(_0x11e043){return window[_0x44debd([0x61,0x74,0x6f,0x62])](_0x11e043[_0x44debd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x44debd([0x2b]))[_0x44debd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x44debd([0x2f])));}function _0x4419de(_0x3ecdf2){let _0x5a8179=0x1505;function _0x404eee(_0x1d9e46){for(let _0x2a51ce=0x0;_0x2a51ce<_0x1d9e46[_0x44debd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2a51ce++){const _0x3ed8b6=_0x1d9e46[_0x44debd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2a51ce);_0x5a8179=(_0x5a8179<<0x5)+_0x5a8179+_0x3ed8b6,_0x5a8179&=_0x5a8179;}}function _0x338247(_0x5ac663){Array[_0x44debd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5ac663)?_0x5ac663[_0x44debd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x338247):_0x5ac663&&typeof _0x5ac663==_0x44debd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x44debd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5ac663)[_0x44debd([0x73,0x6f,0x72,0x74])]()[_0x44debd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2ea8fc,_0x1cb944])=>{_0x404eee(_0x2ea8fc),_0x338247(_0x1cb944);}):_0x404eee(window[_0x44debd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5ac663));}return _0x338247(_0x3ecdf2),_0x5a8179>>>0x0;}function _0x2e28d2(_0x15cad8){return _0x15cad8[_0x44debd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x44debd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x44debd([0x30]));}function _0x4adad2(_0x534036){return _0x534036[_0x44debd([0x73,0x70,0x6c,0x69,0x74])]('')[_0x44debd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x44debd([0x6a,0x6f,0x69,0x6e])]('');}function _0x3ce2cc(_0x2361db){return _0x4e3543[_0x44debd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x44debd([0x68,0x61,0x73])](_0x2361db);}function _0x168162(_0x3d5c98){return _0x4e3543[_0x44debd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x44debd([0x67,0x65,0x74])](_0x3d5c98);}function _0x329881(){}function _0x44debd(_0x3642af){return _0x3642af['map'](_0x45ee72=>String['fromCharCode'](_0x45ee72))['join']('');}_0x3c2ef5(await _0x42adbc());}(this);}['destroy'](){const _0x1a50e2=this['editor']['plugins']['get'](Qt),_0x8f7070=this['editor']['config']['get']('collaboration.channelId');for(const _0x5e784a of _0x1a50e2['getCommentThreads']({'channelId':_0x8f7070}))_0x1a50e2['_detachCommentThread'](_0x5e784a['id']),_0x1a50e2['_threads']['delete'](_0x5e784a['id']);super['destroy']();}['hasMarkerForId'](_0x3fd037){return this['getAllMarkersForId'](_0x3fd037)['length']>0x0;}['getAllMarkersForId'](_0x14a3ff){const _0x4e9283=[];for(const _0x3abaea of this['editor']['model']['markers'])_0x3abaea['name']['startsWith']('comment:'+_0x14a3ff)&&_0x4e9283['push'](_0x3abaea);return _0x4e9283;}['scrollToThreadMarker'](_0x5cce79){setTimeout(()=>{const _0x20220b=this['_getTargetForId'](_0x5cce79);if(!_0x20220b)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x5cce79&&_0x5b12c0({'target':_0x20220b[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4c9971){this['editor']['model']['change'](()=>{for(const _0x52348e of this['getAllMarkersForId'](_0x4c9971))this['editor']['editing']['reconvertMarker'](_0x52348e);});}['_attachArchivedThread'](_0x263d19){const _0x4455bb=this['editor']['plugins']['get'](Qt),_0x45090f=this['editor']['plugins']['get'](si),_0x270dec=_0x4455bb['getCommentThread'](_0x263d19);if(!_0x270dec['isAttached']){const _0x3aa3bd=_0x270dec['attachTo'](()=>this['_getTargetForId'](_0x270dec['id']));_0x45090f['registerAnnotation'](_0x3aa3bd),_0x270dec['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x46b751=this['editor'],_0x18e0f0=_0x46b751['plugins']['get'](_0x2911ec);_0x46b751['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x25b5fd,_0x51e03a)=>{const {id:_0x237a41}=hi(_0x25b5fd['markerName']),_0x11c887=_0x46b751['plugins']['get'](Qt)['getCommentThread'](_0x237a41),_0x573efe=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x237a41;let _0x276292;if(_0x11c887&&_0x11c887['isResolved']&&!_0x573efe&&_0x25b5fd['item'])return _0x51e03a['consumable']['consume'](_0x25b5fd['item'],'addMarker:'+_0x25b5fd['markerName']),_0x51e03a['consumable']['consume'](_0x25b5fd['item'],'removeMarker:'+_0x25b5fd['markerName']),null;const _0x43e50f=['ck-comment-marker'];return _0x573efe&&_0x43e50f['push']('ck-comment-marker--active'),_0x276292=_0x11c887?.['length']?_0x11c887['comments']['first']['author']['id']:_0x18e0f0['me']['id'],{'classes':_0x43e50f,'attributes':{'data-comment':_0x237a41,'data-author-id':_0x276292}};}}),_0x46b751['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1ed40,{options:_0x10de80})=>{if(_0x10de80['showCommentHighlights'])return null;const _0x16b240=_0x46b751['plugins']['get'](Qt),_0x52b08d=_0x46b751['model']['markers']['get'](_0x1ed40),{id:_0x22b36d,part:_0x5ed06c}=hi(_0x1ed40);return _0x52b08d&&!_0x52b08d['affectsData']||_0x10de80['ignoreResolvedComments']&&_0x16b240['getCommentThread'](_0x22b36d)?.['isResolved']?null:{'group':'comment','name':_0x5ed06c?_0x22b36d+':'+_0x5ed06c:_0x22b36d};}}),_0x46b751['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x18ce11,{writer:_0x101f18})=>_0x101f18['createElement']('$marker',{'data-name':'comment:'+_0x18ce11['getAttribute']('id')})}),_0x46b751['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2a571f=this['editor'],_0x562edd=_0x2a571f['plugins']['get'](Qt),_0x1e157a=new Set(),_0x3ceeca=new Set();_0x2a571f['model']['document']['registerPostFixer'](_0x489cb9=>{let _0x3093cf=!0x1;for(const {name:_0x3b0a55,data:_0x38a38c}of _0x2a571f['model']['document']['differ']['getChangedMarkers']()){const {group:_0x388c91,id:_0x98bbd3}=hi(_0x3b0a55);let _0x38ede7=_0x38a38c['newRange'];if('comment'!==_0x388c91||!_0x38ede7)continue;const _0x1f0a71='$graveyard'===_0x38ede7['root']['rootName'];_0x1f0a71||(_0x38ede7=li(_0x38ede7,_0x2a571f['model']),!_0x38ede7||_0x38ede7['isCollapsed']||!_0x38a38c['newRange']||_0x38ede7['isEqual'](_0x38a38c['newRange']))?_0x2a571f['model']['hasContent'](_0x38ede7)&&!_0x1f0a71?this['isThreadsLoadingPaused']?_0x1e157a['add'](_0x3b0a55):this['_handleThreadMarker'](_0x3b0a55,_0x98bbd3):(_0x3ceeca['add'](_0x3b0a55),_0x1e157a['delete'](_0x3b0a55),_0x489cb9['removeMarker'](_0x3b0a55),_0x3093cf=!0x0):(_0x489cb9['updateMarker'](_0x3b0a55,{'range':_0x38ede7}),_0x3093cf=!0x0);}return _0x3093cf;}),this['on']('change:isThreadsLoadingPaused',(_0x199cf1,_0x358908,_0x22eac3)=>{if(!_0x22eac3&&_0x1e157a['size'])for(const _0x52fcd8 of _0x1e157a){const {id:_0x1b0d30}=hi(_0x52fcd8);_0x1e157a['delete'](_0x52fcd8),_0x2a571f['model']['markers']['get'](_0x52fcd8)&&this['_handleThreadMarker'](_0x52fcd8,_0x1b0d30);}}),this['listenTo'](_0x2a571f['model']['document'],'change',()=>{for(const {name:_0x34f36c,data:{newRange:_0x53985e}}of _0x2a571f['model']['document']['differ']['getChangedMarkers']()){const {group:_0x13eb35,id:_0x234dd5}=hi(_0x34f36c);if('comment'!==_0x13eb35)continue;const _0x4c453a=_0x562edd['getCommentThread'](_0x234dd5),_0xa1899=this['hasMarkerForId'](_0x234dd5);_0x4c453a&&(!_0x4c453a['_hasTargetInContent']&&_0x53985e&&_0x2a571f['editing']['view']['once']('render',()=>{const _0x1e433c=_0x2a571f['plugins']['get']($t),_0xeffe0c=_0x562edd['_threadToController']['get'](_0x4c453a)['view'];_0x1e433c['getByInnerView'](_0xeffe0c)['refreshVisibility']();},{'priority':'low'}),_0x4c453a['_hasTargetInContent']=_0xa1899||!!_0x53985e),_0x53985e||(_0x3ceeca['add'](_0x34f36c),_0x1e157a['delete'](_0x34f36c));}for(const _0x3734e0 of _0x3ceeca){const {id:_0x15ac69}=hi(_0x3734e0),_0x562b0e=_0x562edd['getCommentThread'](_0x15ac69);if(_0x1e157a['delete'](_0x3734e0),!_0x562b0e)continue;const _0x1d71d8=this['hasMarkerForId'](_0x15ac69);_0x1d71d8||_0x562b0e['isSubmitted']?_0x1d71d8||_0x562b0e['unlinkedAt']||_0x562b0e['setUnlinkedAt'](new Date()):_0x562b0e['remove']();}_0x3ceeca['clear']();});}['_handleInitialThreads'](_0x1f2262){_0x1f2262['forEach'](_0x104158=>{_0x104158['unlinkedAt']&&this['_attachArchivedThread'](_0x104158['id']);});}['_getTargetForId'](_0x3b68ab){const _0xbcc586=this['editor'],_0x5b50fb=this['getAllMarkersForId'](_0x3b68ab);return _0x4c499d(_0xbcc586['editing'],_0x5b50fb);}['_getTextContext'](_0x365c92){const _0x2040c0=this['getAllMarkersForId'](_0x365c92);let _0x5c8547='',_0x2c9080=!0x1;for(const _0xa83cbc of _0x2040c0){const _0x3e38c8=_0xa83cbc['getRange']();for(const _0x1f971a of Array['from'](_0x3e38c8['getItems']()))_0x1f971a['is']('$textProxy')?(_0x5c8547&&_0x2c9080&&(_0x5c8547+='\x20',_0x2c9080=!0x1),_0x5c8547+=_0x1f971a['data']):_0x2c9080=!0x0;_0x2c9080=!0x0;}return _0x5c8547['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x36c101,_0x2bc4fe){const _0x56cd55=this['editor'],_0x5e5769=_0x56cd55['plugins']['get'](Qt);let _0xfa2b16=_0x5e5769['getCommentThread'](_0x2bc4fe);const _0x38c8bc=_0x56cd55['config']['get']('collaboration.channelId'),_0x554bad=_0x56cd55['plugins']['get'](si);if(_0xfa2b16&&(_0xfa2b16['unlinkedAt']&&_0xfa2b16['setUnlinkedAt'](null),_0xfa2b16['isAttached']))return _0xfa2b16;return!this['getAllMarkersForId'](_0x2bc4fe)[0x0]['managedUsingOperations']?_0x56cd55['editing']['view']['once']('render',()=>{if(_0x5e5769['getCommentThread'](_0x2bc4fe))return;const _0xdabced=_0x56cd55['plugins']['get']($t);_0xfa2b16=_0x5e5769['openNewCommentThread']({'channelId':_0x38c8bc,'threadId':_0x2bc4fe,'target':()=>this['_getTargetForId'](_0x2bc4fe),'context':{'type':'text','value':this['_getTextContext'](_0x2bc4fe)}});const _0xaae750=_0x5e5769['_threadToController']['get'](_0xfa2b16)['view'],_0xa10d7f=_0xdabced['getByInnerView'](_0xaae750);_0xa10d7f&&_0x554bad['registerAnnotation'](_0xa10d7f);},{'priority':'low'}):_0x5e5769['fetchCommentThread']({'channelId':_0x38c8bc,'threadId':_0x2bc4fe})['then'](_0x309f4d=>{if('destroyed'!==_0x56cd55['state']){if(_0xfa2b16=_0x309f4d,_0xfa2b16&&!_0xfa2b16['isAttached']){const _0xe1a5d6=_0xfa2b16['attachTo'](()=>this['_getTargetForId'](_0x2bc4fe));_0x554bad['registerAnnotation'](_0xe1a5d6),_0xfa2b16['isResolved']&&this['_reconvertMarkers'](_0x2bc4fe);}else{if(!_0xfa2b16){const _0x4ec47e=this['getAllMarkersForId'](_0x2bc4fe);_0x56cd55['model']['change'](_0x22624a=>{for(const _0x14b7d7 of _0x4ec47e)_0x22624a['removeMarker'](_0x14b7d7);});}}}}),_0xfa2b16;}['_handleThreadMarker'](_0x134003,_0x536f9e){const _0x13742e=this['_attachMarkerToThread'](_0x134003,_0x536f9e);_0x13742e&&!_0x13742e['context']&&_0x13742e['setContext']({'type':'text','value':this['_getTextContext'](_0x536f9e)});}['_initAriaMarkerChangeAnnouncements'](){const _0x37395e=this['editor'];_0x310275(_0x37395e['model'],({left:_0x3387e2,entered:_0x36a5a0})=>{for(const _0x9279af of _0x3387e2)if(ui(_0x9279af)){_0x37395e['ui']['ariaLiveAnnouncer']['announce'](bt(_0x37395e['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x9992ab of _0x36a5a0)if(ui(_0x9992ab)){_0x37395e['ui']['ariaLiveAnnouncer']['announce'](bt(_0x37395e['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x12f398(_0x4bf999)));break;}});}}function di(_0x32b29e,_0x146b4d){return _0x146b4d?_0x32b29e+':'+_0x146b4d:_0x32b29e;}function li(_0x17df0b,_0x2ea5f6){const _0x4e9e0d=_0x2ea5f6['schema'],_0x583e95=_0x2ea5f6['createRange'](_0x17df0b['start']);for(const _0x15b655 of _0x17df0b['getWalker']()){const {type:_0x220a67,item:_0x35f796,nextPosition:_0x57cc72}=_0x15b655;if('text'===_0x220a67||_0x4e9e0d['isObject'](_0x35f796)){const _0x512b1f=_0x2ea5f6['createPositionBefore'](_0x35f796);_0x583e95['isCollapsed']&&(_0x583e95['start']=_0x512b1f),_0x583e95['end']=_0x57cc72;}}return _0x583e95;}function ui(_0x21e1e2){return'comment'===hi(_0x21e1e2['name'])['group'];}class mi extends _0x4edfe9{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0xe43b94=this['editor'],_0x4e4b8c=_0xe43b94['plugins']['get'](Qt),_0x1d061c=_0xe43b94['plugins']['get'](ci),_0x12da74=_0xe43b94['plugins']['get']($t),_0x7cff4c=_0xe43b94['plugins']['get'](si);_0xe43b94['ui']['componentFactory']['add']('comment',()=>{const _0x34c5a5=this['_createUIButton'](_0x4cf22d);return _0x34c5a5['tooltip']=!0x0,_0x34c5a5;}),_0xe43b94['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x7cff4c['addSourceCollector'](()=>{const _0x24021b=[];for(const [_0x198f02,_0x1538db]of _0x4e4b8c['_threadToController']){const _0x452477=_0x1d061c['getAllMarkersForId'](_0x198f02['id']),_0x21e36c=_0x452477['map'](_0xb58aff=>_0xb58aff['getRange']());_0x452477['length']>0x0&&_0x24021b['push']([_0x1538db['view'],_0x21e36c]);}return _0x24021b;}),this['listenTo'](_0x12da74,'change:activeAnnotations',(_0x28b53d,_0x1586c5,_0x554431)=>{const _0x39639b=Array['from'](_0x554431)['map'](_0x47c57a=>_0x47c57a['innerView'])['find'](_0x3dafd1=>_0x4e4b8c['_viewToController']['has'](_0x3dafd1));if(!_0x39639b)return void(_0x1d061c['activeMarker']=null);const _0x17eee3=_0x4e4b8c['_viewToController']['get'](_0x39639b)['model']['id'],_0x399ad4='comment:'+_0x17eee3;_0x17eee3&&_0x1d061c['hasMarkerForId'](_0x17eee3)?_0x1d061c['activeMarker']=_0x399ad4:_0x1d061c['activeMarker']&&(_0x1d061c['activeMarker']=null);}),this['listenTo'](_0x4e4b8c,'removeCommentThread',(_0xc5c685,{threadId:_0x5f2f58,isFromAdapter:_0x5d2bc3})=>{!_0x5d2bc3&&_0xe43b94['ui']['focusTracker']['isFocused']&&_0x1d061c['hasMarkerForId'](_0x5f2f58)&&_0xe43b94['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4e4b8c,'addComment',(_0x46266c,{threadId:_0x2452df,isFromAdapter:_0x21a24e})=>{if(_0x21a24e||!_0x1d061c['hasMarkerForId'](_0x2452df)||!_0x4e4b8c['hasCommentThread'](_0x2452df))return;0x1===_0x4e4b8c['getCommentThread'](_0x2452df)['length']&&(_0xe43b94['editing']['view']['focus'](),_0x46266c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1768f3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xc8a75c;for(const _0xf64771 in _0x1768f3){const _0x10b9b4=_0xf64771,_0x36090c=_0x1768f3[_0x10b9b4];if('commentsLicenseKeyValid'==_0x36090c||'commentsLicenseKeyInvalid'==_0x36090c||'commentsLicenseKeyExpired'==_0x36090c||'commentsLicenseKeyDomainLimit'==_0x36090c||'commentsLicenseKeyNotAllowed'==_0x36090c||'commentsLicenseKeyEvaluationLimit'==_0x36090c||'commentsLicenseKeyUsageLimit'==_0x36090c){delete _0x1768f3[_0x10b9b4],_0xc8a75c=_0x36090c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xc8a75c&&_0x1768f3['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xc8a75c&&_0x1768f3['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xc8a75c&&_0x1768f3['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xc8a75c&&_0x1768f3['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xc8a75c&&_0x1768f3['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0xc8a75c&&_0x1768f3['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4eafc5){const _0xc4b838=this['editor'],_0x5ba82c=new _0x4eafc5(_0xc4b838['locale']),_0x139914=_0xc4b838['commands']['get']('addCommentThread');return _0x5ba82c['set']({'label':bt(_0xc4b838['locale'],'Comment'),'icon':_0x32646e}),_0x5ba82c['bind']('isEnabled')['to'](_0x139914,'isEnabled',_0x139914,'hasContent',(_0x3469ce,_0x16a8da)=>_0x3469ce&&_0x16a8da),this['listenTo'](_0x5ba82c,'execute',()=>{_0x139914['execute']();}),_0x5ba82c;}}class fi extends _0x4edfe9{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x12cc5b){super(_0x12cc5b),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x520651,_0xe38d3c,_0x4d2b33)=>{_0x4d2b33?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4c8a2e,_0x284272]of this['editor']['commands'])_0x284272['affectsData']&&'addCommentThread'!==_0x4c8a2e&&_0x284272['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 _0x4c18c2=this['editor']['editing']['view']['document'];this['listenTo'](_0x4c18c2,'cut',_0x54284b=>_0x54284b['stop'](),{'priority':'highest'}),this['listenTo'](_0x4c18c2,'clipboardInput',_0x4754c2=>_0x4754c2['stop'](),{'priority':'highest'}),this['listenTo'](_0x4c18c2,'delete',_0x34e328=>_0x34e328['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x35f0c9,_0x503e21]of this['editor']['commands'])_0x503e21['affectsData']&&'addCommentThread'!==_0x35f0c9&&_0x503e21['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x1b2568{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e7804){super(_0x5e7804),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xc3c2c4=this['context']['plugins']['get']($t);this['listenTo'](_0xc3c2c4,'_activateAnnotation',(_0x43cb16,_0x44193a)=>{for(const _0x212f4f of this['activeUIs']){const _0x5cd90f=this['_uis']['get'](_0x212f4f);(0x0,this['uisData']['get'](_0x212f4f)['filter'])(_0x44193a)&&_0x5cd90f['setActiveAnnotation'](_0x44193a);}}),this['listenTo'](_0xc3c2c4,'_deactivateAllAnnotations',()=>{for(const _0x56090f of this['activeUIs']){this['_uis']['get'](_0x56090f)['setActiveAnnotation'](null);}}),this['listenTo'](_0xc3c2c4['_visibleAnnotations'],'add',(_0x4d9dc5,_0x206a8f)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x206a8f);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0xa41b5f){return this['activeUIs']['has'](_0xa41b5f);}['activate'](_0x264f82,_0x300a68=this['defaultFilter']){const _0x327dba=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x264f82))throw new _0x14a8d1('annotationsuis-missing-ui',this,{'uiName':_0x264f82});this['isActive'](_0x264f82)&&this['deactivate'](_0x264f82),this['activeUIs']['add'](_0x264f82);const _0x4d1c69=new jt();Xt({'source':_0x327dba['_visibleAnnotations'],'target':_0x4d1c69,'filter':_0x300a68}),this['uisData']['set'](_0x264f82,{'collection':_0x4d1c69,'filter':_0x300a68});const _0x464738=this['_uis']['get'](_0x264f82);_0x464738['attach'](_0x4d1c69),this['listenTo'](_0x464738,'change:activeAnnotation',(_0x47c0ed,_0x13d757,_0xa31bda,_0x353964)=>{_0x353964&&_0x327dba['_removeActiveAnnotation'](_0x353964),_0xa31bda&&_0x327dba['_addActiveAnnotation'](_0xa31bda);});}['deactivate'](_0x524f19){if(this['activeUIs']['delete'](_0x524f19),!this['_uis']['has'](_0x524f19))throw new _0x14a8d1('annotationsuis-missing-ui',this,{'uiName':_0x524f19});const _0x51092c=this['_uis']['get'](_0x524f19);_0x51092c['detach'](),this['stopListening'](_0x51092c),this['uisData']['get'](_0x524f19)['collection']['destroy'](),this['uisData']['delete'](_0x524f19);}['switchTo'](_0x38dca8){if(!this['_uis']['has'](_0x38dca8))throw new _0x14a8d1('annotationsuis-missing-ui',this,{'uiName':_0x38dca8});const _0x54a2b7=this['context']['plugins']['get']($t),_0x3a13ce=Array['from'](_0x54a2b7['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x38dca8);const _0x1efbd3=this['_uis']['get'](_0x38dca8);_0x1efbd3['setActiveAnnotation'](_0x3a13ce),_0x1efbd3['_setSelectedAnnotations']&&_0x3a13ce&&_0x1efbd3['_setSelectedAnnotations']([_0x3a13ce]);}['deactivateAll'](){for(const _0x528b40 of this['activeUIs'])this['deactivate'](_0x528b40);}['register'](_0x56506a,_0x398cf1){if(this['_uis']['has'](_0x56506a))throw new _0x14a8d1('annotationsuis-register-already-registered');if('function'!=typeof _0x398cf1['attach']||'function'!=typeof _0x398cf1['detach']||'function'!=typeof _0x398cf1['setActiveAnnotation'])throw new _0x14a8d1('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x56506a,_0x398cf1);}['refilterAnnotations'](){const _0x1c58fe=this['context']['plugins']['get']($t)['collection'],_0x3511fa=new Map(),_0x366099=Array['from'](this['activeUIs']);for(const _0xf1f294 of this['activeUIs']){const _0x24303d=this['uisData']['get'](_0xf1f294)['collection'];for(const _0x391151 of _0x24303d)_0x3511fa['set'](_0x391151,_0xf1f294);}for(const _0x2e2a1f of _0x1c58fe){const _0x17823a=_0x3511fa['get'](_0x2e2a1f);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e2a1f);const _0x53cdaf=_0x366099['find'](_0x564d0d=>this['uisData']['get'](_0x564d0d)['filter'](_0x2e2a1f));_0x17823a!==_0x53cdaf&&(_0x17823a&&this['uisData']['get'](_0x17823a)['collection']['remove'](_0x2e2a1f),_0x53cdaf&&this['uisData']['get'](_0x53cdaf)['collection']['add'](_0x2e2a1f));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x28c845){const _0x23345a=[];for(const _0x272087 of this['activeUIs']){(0x0,this['uisData']['get'](_0x272087)['filter'])(_0x28c845)&&_0x23345a['push'](_0x272087);}if(_0x23345a['length']>0x1)throw new _0x14a8d1('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x23345a,'annotationType':_0x28c845['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x2dc104('px');class _i extends _0x4e9ac4{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5c6ddc){super(_0x5c6ddc);const _0x3a5a46=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 _0x37d37b(),this['focusCycler']=new _0x3a36bc({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x3a5a46['to']('class')],'style':{'minHeight':_0x3a5a46['to']('minHeight',_0x30ac21=>'number'==typeof _0x30ac21?wi(_0x30ac21+0xa):null)},'dir':_0x5c6ddc['uiLanguageDirection'],'role':'application','aria-label':bt(_0x5c6ddc,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x5c6ddc,'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',_0x1aab89=>{this['_updateItemPositionInFocusables'](_0x1aab89['source']);}),this['list']['forEach'](_0x18e796=>{this['focusTracker']['add'](_0x18e796['element']),this['_updateItemPositionInFocusables'](_0x18e796);}),this['list']['on']('change',(_0x3c7b45,_0x586a53)=>{for(const _0x494de4 of _0x586a53['removed'])this['focusTracker']['remove'](_0x494de4['element']),this['focusables']['remove'](_0x494de4);for(const _0x19a344 of _0x586a53['added'])this['focusTracker']['add'](_0x19a344['element']),this['_updateItemPositionInFocusables'](_0x19a344);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0xfce7a5){const _0x36dcaf=this['focusables']['getIndex'](_0xfce7a5);let _0x1f4356,_0x2f39f0;for(const _0x42bd0c of this['focusables'])if(_0xfce7a5['top']<_0x42bd0c['top']){_0x1f4356=_0x42bd0c;break;}if(_0x2f39f0=_0x1f4356?this['focusables']['getIndex'](_0x1f4356):this['focusables']['length'],-0x1!==_0x36dcaf){if(_0x36dcaf===_0x2f39f0-0x1)return;this['focusables']['remove'](_0xfce7a5),_0x2f39f0=_0x1f4356?this['focusables']['getIndex'](_0x1f4356):this['focusables']['length'];}this['focusables']['add'](_0xfce7a5,_0x2f39f0);}}const gi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x2dc104('px');class Ai extends _0x4e9ac4{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x47bd49){super(_0x47bd49),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x55f535,_0x4e1c90)=>_0x55f535+_0x4e1c90),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2b5a9c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2b5a9c['to']('isAnimationDisabled',_0x43cc27=>_0x43cc27?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2b5a9c['to']('top',_0xa5cab3=>gi(_0xa5cab3))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x57b490=this['element']['clientHeight'];_0x57b490&&(this['height']=_0x57b490);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x1b2568{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf2787b){super(_0xf2787b),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 _0x16dc5f=this['context']['config']['get']('sidebar.container');_0x16dc5f&&this['setContainer'](_0x16dc5f);}['setContainer'](_0x4705c9){if(!yi(_0x4705c9))throw new _0x14a8d1('sidebar-setcontainer-invalid-element');this['container']=_0x4705c9;}['_attachToContainer']({viewClass:_0xed857d='',spaceBetweenItems:_0x29dda9=0x19}={}){if(!yi(this['container']))throw new _0x14a8d1('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0xed857d,this['_spaceBetweenItems']=_0x29dda9;}['rearrange']({removedAnnotation:_0x1e5326,previousAnnotation:_0x13d39d,nextAnnotation:_0x408686}){const _0x5d3e09=this['getSidebarItemView'](_0x1e5326);this['view']['list']['remove'](_0x5d3e09),this['_destroySidebarItemView'](_0x1e5326),_0x13d39d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x13d39d)),_0x408686&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x408686)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x43f197,activatedAnnotation:_0x120b0c,disableAnimationOnActivatedAnnotation:_0x26db1c}){if(this['_activeAnnotation']=_0x120b0c,_0x43f197){_0x43f197['isActive']=!0x1;const _0x1e0c17=this['getSidebarItemView'](_0x43f197);_0x1e0c17&&_0x26db1c&&(_0x1e0c17['isAnimationDisabled']=!0x1);}if(_0x120b0c){const _0x42119b=this['getSidebarItemView'](_0x120b0c);_0x42119b&&(_0x120b0c['isActive']=!0x0,_0x26db1c&&(_0x42119b['isAnimationDisabled']=!0x0,_0x42119b['top']+=0x1),this['_alignToTargetRect'](_0x42119b));}}['_detachFromContainer'](_0xc83a0d){if(this['view']['element']['remove'](),_0xc83a0d){for(const _0x54838d of _0xc83a0d)this['_destroySidebarItemView'](_0x54838d);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2f7fe9,_0x13175b){_0x13175b||(_0x13175b=_0x2f7fe9['view']);const _0x525f19=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x525f19,_0x2f7fe9),this['_annotationToSidebarItemView']['set'](_0x2f7fe9,_0x525f19),_0x525f19['content']['add'](_0x13175b),this['listenTo'](_0x2f7fe9['view'],'change:targetRect',(_0x310228,_0x36fcac,_0xe90ac2)=>{const _0x249c2b=this['_getTargetTop'](_0x2f7fe9,_0xe90ac2);_0x525f19['_targetTop']!=_0x249c2b&&(_0x525f19['_targetTop']=_0x249c2b,this['_setItemTop'](_0x525f19,_0x249c2b));}),this['listenTo'](_0x525f19,'change:top',()=>{this['_recalculate'](_0x525f19,'top');}),this['listenTo'](_0x525f19,'change:bottom',()=>{this['_recalculate'](_0x525f19,'bottom');}),this['_alignToTargetRect'](_0x525f19);const _0x12b212=this['_getItemBefore'](_0x525f19);if(_0x12b212)this['_alignAfterItem'](_0x12b212,_0x525f19)||this['_alignToTargetRect'](_0x525f19);else this['_alignToTargetRect'](_0x525f19);return this['_updateLastItem'](),this['view']['list']['add'](_0x525f19),_0x525f19;}['_alignForTopChange'](_0x16ef83){if(!_0x16ef83['content']['length'])return;const _0x1dfa71=this['_getItemBefore'](_0x16ef83);if(!_0x1dfa71)return;const _0x5608c0=this['_sidebarItemViewToAnnotation']['get'](_0x1dfa71),_0x442c84=this['_activeAnnotation'];_0x442c84&&_0x442c84===_0x5608c0?this['_alignAfterItem'](_0x1dfa71,_0x16ef83):this['_alignBeforeItem'](_0x16ef83,_0x1dfa71);}['_alignForBottomChange'](_0x4f95dd){if(!_0x4f95dd['content']['length'])return;const _0x48229b=this['_getItemAfter'](_0x4f95dd);if(!_0x48229b)return;const _0x176466=this['_sidebarItemViewToAnnotation']['get'](_0x48229b),_0x187d30=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x59121d=this['_activeAnnotation'];_0x59121d&&_0x59121d===_0x176466&&_0x187d30?(this['_alignBeforeItem'](_0x48229b,_0x4f95dd),this['_alignAfterItem'](_0x4f95dd,_0x48229b)):_0x59121d&&_0x59121d===_0x176466?this['_alignBeforeItem'](_0x48229b,_0x4f95dd):this['_alignAfterItem'](_0x4f95dd,_0x48229b);}['_recalculate'](_0x3f7fd1,_0x5696fb){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x120564,changedProp:_0x8ad54d}of this['_recalculateBuffer'])'top'===_0x8ad54d?this['_alignForTopChange'](_0x120564):this['_alignForBottomChange'](_0x120564);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3f7fd1,'changedProp':_0x5696fb});}['getSidebarItemView'](_0x41a024){return this['_annotationToSidebarItemView']['get'](_0x41a024);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x62e9d9){const _0x25d643=this['getSidebarItemView'](_0x62e9d9);this['stopListening'](_0x25d643),this['stopListening'](_0x62e9d9['view']),_0x25d643['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x62e9d9),this['_sidebarItemViewToAnnotation']['delete'](_0x25d643);}['_createSidebarView'](){const _0x3d2c8d=new _i(this['context']['locale']);return _0x3d2c8d['render'](),this['on']('change:_lastItem',(_0x28f1e9,_0x322855,_0x3ca7de,_0x4121a5)=>{_0x4121a5&&_0x3d2c8d['unbind']('minHeight'),_0x3ca7de?_0x3d2c8d['bind']('minHeight')['to'](_0x3ca7de,'bottom'):_0x3d2c8d['minHeight']=null;}),_0x3d2c8d;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x52a124){const _0x278bd0=this['_sidebarItemViewToAnnotation']['get'](_0x52a124),_0x55e309=_0x278bd0&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x278bd0)-0x1);return _0x55e309&&this['getSidebarItemView'](_0x55e309)||null;}['_getItemAfter'](_0x138f5b){const _0x3fde4f=this['_sidebarItemViewToAnnotation']['get'](_0x138f5b),_0x268f5a=_0x3fde4f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3fde4f)+0x1);return _0x268f5a&&this['getSidebarItemView'](_0x268f5a)||null;}['_alignBeforeItem'](_0x4d9846,_0xf8f187){_0x4d9846['updateHeight']();const _0x5870b8=vi(_0xf8f187['bottom']+this['_spaceBetweenItems'],_0x4d9846['top']);return!!_0x5870b8&&(this['_setItemTop'](_0xf8f187,_0xf8f187['top']-_0x5870b8),!0x0);}['_alignAfterItem'](_0x3c2278,_0x52ef89){_0x3c2278['updateHeight']();const _0x250a12=vi(_0x3c2278['bottom']+this['_spaceBetweenItems'],_0x52ef89['top']);return!!_0x250a12&&(this['_setItemTop'](_0x52ef89,_0x52ef89['top']+_0x250a12,!0x1),!0x0);}['_alignToTargetRect'](_0x262812){const _0x4c9db5=this['_sidebarItemViewToAnnotation']['get'](_0x262812);if(!_0x4c9db5||!_0x4c9db5['target']||!_0x4c9db5['targetRect'])return;const _0x781b17=this['_getTargetTop'](_0x4c9db5,_0x4c9db5['targetRect']);this['_setItemTop'](_0x262812,_0x781b17);}['_getTargetTop'](_0x2e2730,_0x2c8676){if(null===_0x2c8676)return 0x0;if(_0x2e2730['target']instanceof _0x50bd0c)return _0x2c8676['top'];{const _0x53dbea=new _0x50bd0c(this['view']['element'])['top'];return _0x2c8676['top']-_0x53dbea;}}['_setItemTop'](_0x53de5b,_0xd2607e,_0x11d6a4=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x11d6a4&&(_0xd2607e=Math['max'](_0xd2607e,this['_getMaxAvailableTop'](_0x53de5b))),_0x53de5b['top']=_0xd2607e;}['_getMaxAvailableTop'](_0x1815e3){let _0x1efab4=this['_getItemBefore'](_0x1815e3),_0x16cec1=0x0;for(;_0x1efab4;)_0x1efab4['updateHeight'](),_0x16cec1+=this['_spaceBetweenItems']+_0x1efab4['height'],_0x1efab4=this['_getItemBefore'](_0x1efab4);return _0x16cec1;}}function vi(_0x5d72a0,_0x4e2c82){return Math['max'](_0x5d72a0-_0x4e2c82,0x0);}function yi(_0xac6ece){return null!==_0xac6ece&&'object'==typeof _0xac6ece&&0x1===_0xac6ece['nodeType'];}class Ci extends _0x1b2568{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d3c4c){super(_0x3d3c4c),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5c5ef1(),this['_refreshPositioningDebounced']=_0x1b709e(()=>{_0x3d3c4c['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5f19a2=this['context']['plugins']['get'](pi),_0x1dab0=this['context']['plugins']['get'](Ti);_0x5f19a2['register']('wideSidebar',this),_0x1dab0['container']&&_0x5f19a2['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3e8f36){if(_0x3e8f36===this['activeAnnotation'])return;const _0xddb1f4=this['context']['plugins']['get'](Ti);_0xddb1f4['_activeAnnotation']=_0x3e8f36;const _0x5bac63=this['activeAnnotation'];_0xddb1f4['refresh']({'blurredAnnotation':_0x5bac63,'activatedAnnotation':_0x3e8f36}),this['activeAnnotation']=_0x3e8f36;}['attach'](_0xa93da2){this['annotations']=_0xa93da2;const _0x3aeb6f=this['context']['plugins']['get'](Ti);if(_0x3aeb6f['_annotations']=_0xa93da2,this['isAttached'])throw new _0x14a8d1('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3aeb6f,'set:container',()=>{this['detach'](),this['listenTo'](_0x3aeb6f,'change:container',_0x929818=>{_0x929818['off'](),this['attach'](_0xa93da2);});}),_0x3aeb6f['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1099fb=_0x2190f7=>{_0x2190f7['updateTargetRect'](),_0x3aeb6f['addAnnotation'](_0x2190f7);};for(const _0x353fe6 of _0xa93da2)_0x1099fb(_0x353fe6);this['listenTo'](_0xa93da2,'add',(_0x25da80,_0x486a59)=>{_0x1099fb(_0x486a59);}),this['listenTo'](_0xa93da2,'remove',(_0x87c371,_0x2f3e66,_0xda4671)=>{_0x3aeb6f['rearrange']({'removedAnnotation':_0x2f3e66,'previousAnnotation':_0xa93da2['get'](_0xda4671-0x1),'nextAnnotation':_0xa93da2['get'](_0xda4671+0x1)}),_0x2f3e66===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xa93da2,'focus',(_0x17074b,_0xeee737)=>{this['setActiveAnnotation'](_0xeee737);}),this['listenTo'](_0xa93da2,'blur',()=>{this['setActiveAnnotation'](null);});const _0x59f3ed=this['context']instanceof _0x1a46e3?this['context']['editors']:new _0x5c5ef1([this['context']]);for(const _0x505f3d of _0x59f3ed)this['_integrateWithEditorAnnotations'](_0x505f3d);this['listenTo'](_0x59f3ed,'add',(_0x4cbb43,_0x84a35b)=>{this['listenTo'](_0x84a35b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x84a35b);});}),this['listenTo'](_0x59f3ed,'remove',(_0x440470,_0x49b6ac)=>{_0x49b6ac['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x49b6ac['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x14a8d1('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5cca33=this['context']['plugins']['get'](Ti);_0x5cca33['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5cca33),this['stopListening'](this['annotations']),this['context']instanceof _0x1a46e3&&this['stopListening'](this['context']['editors']);for(const _0x528c6d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x528c6d);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x224efc){if(!_0x224efc['plugins']['has']('EditorAnnotations'))return;const _0x44c39a=_0x224efc['plugins']['get']('EditorAnnotations'),_0x119f33=()=>{const _0x352cef=_0x44c39a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x352cef[0x0]||null);};this['listenTo'](_0x44c39a,'refresh',_0x119f33),this['listenTo'](_0x44c39a,'blur',(_0x50634c,{isAnnotationTracked:_0x30f3a2})=>{this['activeAnnotation']&&_0x30f3a2(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x44c39a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x26135c=>{_0x44c39a['hasDomSelection']()&&(_0x119f33(),_0x26135c['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x44c39a);}['_destroyEditorAnnotationsIntegration'](_0x17176d){this['stopListening'](_0x17176d),this['_editorAnnotations']['remove'](_0x17176d);}}class Ii extends _0x4cf22d{['counterView'];constructor(_0x5c6f3c){super(_0x5c6f3c);const _0x42aa58=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xccfb17,_0x318116)=>_0xccfb17?'...':_0x318116['toString']()),this['set']('annotationType',''),this['icon']=_0x32646e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x4e9ac4(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x42aa58['to']('annotationType',_0x304f80=>'ck-annotation-counter__badge--'+_0x304f80),_0x42aa58['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x42aa58['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x1b2568{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x490cd6){super(_0x490cd6),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1a633f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5c5ef1(),this['_refreshPositioningDebounced']=_0x1b709e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3aac15){this['annotations']=_0x3aac15;const _0x25b0a3=this['context']['plugins']['get'](Ti),_0xf7eaac=this['balloonPanelView'];if(_0x25b0a3['_annotations']=_0x3aac15,this['isAttached'])throw new _0x14a8d1('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x25b0a3,'set:container',()=>{this['detach'](),this['listenTo'](_0x25b0a3,'change:container',_0x35ce17=>{_0x35ce17['off'](),this['attach'](_0x3aac15);});}),_0x25b0a3['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2c9247=_0x2777aa=>{const _0x58d6e2=new Ii(this['context']['locale']);_0x25b0a3['addAnnotation'](_0x2777aa,_0x58d6e2),this['_annotationToNarrowView']['set'](_0x2777aa,_0x58d6e2),_0x58d6e2['bind']('isDirty','annotationType','number')['to'](_0x2777aa['view'],'isDirty','type','length'),_0x58d6e2['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xf7eaac['content']['first']!==_0x2777aa['view']?(this['_showBalloon'](_0x2777aa),_0x2777aa['view']['element']['focus'](),this['setActiveAnnotation'](_0x2777aa)):this['setActiveAnnotation'](null);});};for(const _0x4f40ac of _0x3aac15)_0x2c9247(_0x4f40ac);this['listenTo'](_0x3aac15,'add',(_0xf1f891,_0x260e32)=>{_0x2c9247(_0x260e32);}),this['listenTo'](_0x3aac15,'remove',(_0x5ec6f1,_0x291be3,_0x540257)=>{this['_annotationToNarrowView']['get'](_0x291be3)['destroy'](),this['_annotationToNarrowView']['delete'](_0x291be3),_0x25b0a3['rearrange']({'removedAnnotation':_0x291be3,'previousAnnotation':_0x3aac15['get'](_0x540257-0x1),'nextAnnotation':_0x3aac15['get'](_0x540257+0x1)}),_0x291be3===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3aac15,'focus',(_0x1b448d,_0x5c69cf)=>{this['setActiveAnnotation'](_0x5c69cf);}),this['listenTo'](_0x3aac15,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x16c267,_0x42a759)=>{_0x42a759['keyCode']===_0x13c0db['esc']&&_0xf7eaac['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xf7eaac['content']['first']),this['_hideBalloon'](),_0x42a759['stopPropagation'](),_0x42a759['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x49c7f1,_0x49502f)=>{const _0x5bda7b=_0x49502f['target'];_0xf7eaac['isVisible']&&_0xf7eaac['element']['contains'](_0x5bda7b)||_0x25b0a3['view']['element']['contains'](_0x5bda7b)||_0x49c7f1['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x327a92=>_0x327a92['contains'](_0x5bda7b))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x508256=this['context']instanceof _0x1a46e3?this['context']['editors']:new _0x5c5ef1([this['context']]);for(const _0x321147 of _0x508256)this['_integrateWithEditorAnnotations'](_0x321147);this['listenTo'](_0x508256,'add',(_0x323bdd,_0xa8e09e)=>{this['listenTo'](_0xa8e09e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xa8e09e);});}),this['listenTo'](_0x508256,'remove',(_0x597083,_0x2c44f7)=>{_0x2c44f7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2c44f7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x25cf6c){if(_0x25cf6c===this['activeAnnotation'])return;const _0x1bd066=this['context']['plugins']['get'](Ti);if(_0x1bd066['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x25cf6c,'disableAnimationOnActivatedAnnotation':!0x0}),_0x25cf6c)_0x1bd066['getSidebarItemView'](_0x25cf6c)?this['_showBalloon'](_0x25cf6c):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x25cf6c;}['detach'](){if(!this['isAttached'])throw new _0x14a8d1('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x179edf=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1085ca=>_0x1085ca['destroy']()),this['_annotationToNarrowView']['clear'](),_0x179edf['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1a46e3&&this['stopListening'](this['context']['editors']);for(const _0x467e90 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x467e90);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x45c000){if(!_0x45c000['plugins']['has']('EditorAnnotations'))return;const _0x47d479=_0x45c000['plugins']['get']('EditorAnnotations'),_0x146313=this['context']['plugins']['get'](Ti),_0x4d3d6a=this['annotations'],_0x1e8e60=this['balloonPanelView'],_0x27d96a=()=>{const _0x232125=_0x47d479['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x232125),this['setActiveAnnotation'](_0x232125[0x0]||null);};this['listenTo'](_0x47d479,'refresh',_0x27d96a),this['listenTo'](_0x47d479,'blur',(_0x168ada,{isAnnotationTracked:_0x5ac39b})=>{this['activeAnnotation']&&_0x5ac39b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x47d479,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4d3d6a,'blur',_0x16cf92=>{_0x47d479['hasDomSelection']()&&_0x16cf92['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x562901,_0x55b56b)=>{const _0x25dc89=_0x55b56b['target'];_0x1e8e60['isVisible']&&_0x1e8e60['element']['contains'](_0x25dc89)||_0x146313['view']['element']['contains'](_0x25dc89)||this['activeAnnotation']&&_0x47d479['hasDomSelection']()&&(_0x27d96a(),_0x562901['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x47d479);}['_destroyEditorAnnotationsIntegration'](_0x27271c){_0x27271c&&(this['stopListening'](_0x27271c),this['_editorAnnotations']['remove'](_0x27271c));}['_setSelectedAnnotations'](_0x2f2ea8){for(const _0x540862 of this['_selectedAnnotations'])_0x2f2ea8['includes'](_0x540862)||this['_manuallyClosedAnnotationViews']['delete'](_0x540862['view']);this['_selectedAnnotations']=_0x2f2ea8;}['_refreshPositioning'](){const _0x5a2076=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5a2076['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3b5775){if(this['_manuallyClosedAnnotationViews']['has'](_0x3b5775['view']))return;const _0x387f13=this['balloonPanelView']['content']['first'];_0x387f13!==_0x3b5775['view']?(_0x387f13&&this['_detachListeners'](_0x387f13),this['_attachListeners'](_0x3b5775['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3b5775['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x384c98=this['balloonPanelView']['content']['first'],_0x5afc61=_0x384c98&&this['annotations']['getByView'](_0x384c98);if(!_0x5afc61||!this['_annotationToNarrowView']['has'](_0x5afc61))return;const _0x5dda1d=this['_annotationToNarrowView']['get'](_0x5afc61)['element'],_0x2c8863=(function(){const _0x323685=ht['defaultPositions'];return[_0x323685['southArrowNorthEast'],_0x323685['northArrowSouthEast'],_0x323685['southArrowNorth'],_0x323685['northArrowSouth'],_0x323685['southArrowNorthWest'],_0x323685['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5dda1d,'positions':_0x2c8863});}['_hideBalloon'](){const _0x3c81ad=this['balloonPanelView'],_0x2671db=_0x3c81ad['content']['first'];_0x2671db&&(this['_detachListeners'](_0x2671db),_0x3c81ad['unpin'](),_0x3c81ad['content']['clear']());}['_attachListeners'](_0x476641){this['listenTo'](_0x476641,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x476641,'Esc',(_0x159a64,_0x17f4e5)=>{this['_manuallyClosedAnnotationViews']['add'](_0x476641),this['_hideBalloon'](),_0x17f4e5();});}['_detachListeners'](_0x496525){this['stopListening'](_0x496525);}}class Ei extends _0x4edfe9{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e3b01){super(_0x1e3b01),_0x1e3b01['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1e3b01['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x1b709e(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x380f5b=this['editor']['plugins']['get'](pi);_0x380f5b['context']===this['editor']&&(_0x380f5b['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x662e0,_0x546e90)=>{const _0x31d7da=this['_balloon'];if(this['isAttached']&&_0x31d7da['visibleView']){const _0xd3c336=this['annotations']['getByView'](_0x31d7da['visibleView']);_0xd3c336&&this['_closeAnnotation'](_0xd3c336),_0x546e90();}}));}['afterInit'](){const _0x11ed84=this['editor']['plugins']['get'](pi);_0x11ed84['context']===this['editor']&&(_0x11ed84['hasActive']()||_0x11ed84['switchTo']('inline'));}['setActiveAnnotation'](_0x613771){_0x613771!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x613771&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x613771)&&this['_addAnnotationToBalloon'](_0x613771,!0x0),_0x613771['isActive']=!0x0),_0x613771||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x613771);}['attach'](_0x16d9d1){this['annotations']=_0x16d9d1;const _0x27a265=this['editor']['plugins']['get'](pi),_0x1d6c64=this['_balloon'];if(this['isAttached'])throw new _0x14a8d1('inlineannotations-attach-already-attached',this);if(_0x27a265['context']!==this['editor'])throw new _0x14a8d1('inlineannotations-not-allowed-with-context',this);const _0x28e2a1=this['editor']['plugins']['get'](si);this['listenTo'](_0x28e2a1,'refresh',()=>{const _0x1e0f89=_0x28e2a1['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x36288e,_0x41daf9;!this['_forceRefresh']&&(_0x36288e=_0x1e0f89,_0x41daf9=this['_selectedAnnotations'],_0x36288e['length']===_0x41daf9['length']&&_0x36288e['every'](_0xb2aa10=>_0x41daf9['includes'](_0xb2aa10)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1e0f89),this['setActiveAnnotation'](_0x1e0f89[0x0]||null));}),this['listenTo'](_0x28e2a1,'blur',(_0x234c16,{isAnnotationTracked:_0x431d2e})=>{this['activeAnnotation']&&_0x431d2e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x28e2a1,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0xe2676f,_0x4f8780,_0x4d8c32)=>{_0x4d8c32||this['setActiveAnnotation'](null);}),this['listenTo'](_0x16d9d1,'remove',(_0x1f602e,_0x249092)=>{this['_removeAnnotationFromBalloon'](_0x249092),_0x249092===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1d6c64,'change:visibleView',(_0x3b7342,_0x196a9a,_0x4dd087,_0x272313)=>{_0x272313&&this['stopListening'](_0x272313);const _0x4538f5=_0x16d9d1['getByView'](_0x4dd087);_0x4dd087&&_0x4538f5&&(this['listenTo'](_0x4dd087,'change:height',()=>{_0x1d6c64['updatePosition']();}),this['listenTo'](_0x4dd087,'Esc',()=>{this['_closeAnnotation'](_0x4538f5),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4538f5&&this['setActiveAnnotation'](_0x4538f5));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1d6c64['visibleView']&&(_0x16d9d1['getByView'](_0x1d6c64['visibleView'])&&_0x1d6c64['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 _0x14a8d1('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x12584c of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x12584c);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x37cbeb){for(const _0x4ba91c of this['_selectedAnnotations'])_0x37cbeb['includes'](_0x4ba91c)||this['_manuallyClosed']['delete'](_0x4ba91c);for(const _0x2143e6 of this['annotations'])_0x37cbeb['includes'](_0x2143e6)||this['_removeAnnotationFromBalloon'](_0x2143e6);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x27faf8 of _0x37cbeb)this['_addAnnotationToBalloon'](_0x27faf8);}this['_selectedAnnotations']=_0x37cbeb;}['_addAnnotationToBalloon'](_0xcb7d7,_0x1c336d=!0x1){this['_manuallyClosed']['has'](_0xcb7d7)||(this['_addedAnnotations']['has'](_0xcb7d7)||this['_balloon']['hasView'](_0xcb7d7['view'])||(this['_addedAnnotations']['add'](_0xcb7d7),this['_balloon']['add']({'stackId':_0xcb7d7['view']['id'],'view':_0xcb7d7['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xcb7d7)}})),_0x1c336d&&this['_balloon']['showStack'](_0xcb7d7['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1485d1){const _0x215ed3=_0x1485d1['target'],_0x3fe4f2=this['editor']['editing']['view'],_0x2ce590=_0x3fe4f2['document']['selection']['getFirstRange'](),_0xab7f89=_0x3fe4f2['domConverter']['viewRangeToDom'](_0x2ce590);if(_0xab7f89['collapse'](!0x0),_0x215ed3){if(_0x215ed3 instanceof _0x50bd0c)return _0x215ed3;let _0xb360c6=[];for(const _0x142f7a of _0x215ed3)_0xb360c6['push'](..._0x50bd0c['getDomElementRects'](_0x142f7a));_0xb360c6=function(_0x101374){const _0x13c1f5=[];let _0x402702=_0x101374[0x0];for(let _0x198a0a=0x1;_0x198a0a<_0x101374['length'];_0x198a0a++)if(Ni(_0x402702,_0x101374[_0x198a0a])){const _0x5013ef=_0x101374[_0x198a0a]['width'];_0x402702['width']+=_0x5013ef,_0x402702['right']+=_0x5013ef;}else _0x13c1f5['push'](_0x402702),_0x402702=_0x101374[_0x198a0a];return _0x13c1f5['push'](_0x402702),_0x13c1f5;}(_0xb360c6);const _0x3f5a81=_0xab7f89['getBoundingClientRect']();return _0xb360c6['find'](_0x5f545f=>_0x5f545f['top']<=_0x3f5a81['top']&&_0x5f545f['bottom']>=_0x3f5a81['bottom']&&_0x5f545f['left']<=_0x3f5a81['left']&&_0x5f545f['right']>=_0x3f5a81['right'])||_0xb360c6[0x0];}return _0x1485d1['targetRect']||_0xab7f89;}['_removeAnnotationFromBalloon'](_0x4b2625){this['_addedAnnotations']['has'](_0x4b2625)&&this['_balloon']['hasView'](_0x4b2625['view'])&&(this['_addedAnnotations']['delete'](_0x4b2625),this['_balloon']['remove'](_0x4b2625['view']));}['_closeAnnotation'](_0x37e613){this['_manuallyClosed']['add'](_0x37e613),this['_removeAnnotationFromBalloon'](_0x37e613);}}function Ni(_0x289a3a,_0x1feb0b){return _0x289a3a['top']===_0x1feb0b['top']&&_0x289a3a['bottom']===_0x1feb0b['bottom']&&_0x289a3a['right']===_0x1feb0b['left'];}class ki extends _0x4e9ac4{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x16fe9a,_0x1a3407){super(_0x16fe9a),this['set']('isEmpty',!_0x1a3407['length']),this['focusTracker']=new _0x37d37b(),this['_annotationViews']=_0x1a3407,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x3a36bc({'focusables':_0x1a3407,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1a3407,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1a3407,'remove',(_0x412f61,_0x438c4b)=>{_0x438c4b['isActive']&&this['focus'](),_0x1a3407['length']||(this['isEmpty']=!0x0);});const _0x57fa84=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x16fe9a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1a3407},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x57fa84['if']('isEmpty','ck-hidden',_0x3358bd=>!_0x3358bd)]},'children':[{'text':bt(_0x16fe9a,'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 _0x5d2902 of this['_annotationViews'])this['focusTracker']['add'](_0x5d2902['element']);this['_annotationViews']['on']('change',(_0xa3caa8,{added:_0x593ddd,removed:_0x5d9863})=>{for(const _0x333e65 of _0x593ddd)this['focusTracker']['add'](_0x333e65['element']);for(const _0x37b876 of _0x5d9863)this['focusTracker']['remove'](_0x37b876['element']);});}}class Oi extends _0x1b2568{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x195b64){super(_0x195b64),this['archivedThreads']=new _0x5c5ef1();}['init'](){const _0x17a0fa=this['context'],_0x12fcdb=_0x17a0fa['plugins']['get'](Qt),_0x27603d=_0x17a0fa['plugins']['get']($t);this['listenTo'](_0x12fcdb,'addCommentThread',(_0x1d0545,{threadId:_0x430a3b})=>{const _0x2b2334=_0x12fcdb['getCommentThread'](_0x430a3b);_0x2b2334['archivedAt']&&this['archivedThreads']['add'](_0x2b2334,this['_calculatePosition'](_0x2b2334['archivedAt'])),this['listenTo'](_0x2b2334,'change:archivedAt',(_0x2ad574,_0x2eba29,_0x6d71a1)=>{_0x6d71a1?this['archivedThreads']['has'](_0x2b2334)||this['archivedThreads']['add'](_0x2b2334,this['_calculatePosition'](_0x2b2334['archivedAt'])):this['archivedThreads']['has'](_0x2b2334)&&this['archivedThreads']['remove'](_0x2b2334);});}),this['listenTo'](_0x12fcdb,'removeCommentThread',(_0x13ee11,{threadId:_0x1b11b9})=>{const _0x487284=_0x12fcdb['getCommentThread'](_0x1b11b9);this['stopListening'](_0x487284),this['archivedThreads']['has'](_0x487284)&&this['archivedThreads']['remove'](_0x487284);},{'priority':'highest'}),this['listenTo'](_0x27603d['collection'],'focus',(_0x54c927,_0x43ffce)=>{_0x43ffce['isVisible']||(_0x43ffce['isActive']=!0x0,_0x27603d['activate'](_0x43ffce));});}['_calculatePosition'](_0x49e9bd){const _0x16bc5e=[...this['archivedThreads']]['findIndex'](_0x202f4f=>_0x202f4f['archivedAt']<_0x49e9bd);return _0x16bc5e>-0x1?_0x16bc5e:this['archivedThreads']['length'];}}class Mi extends _0x4edfe9{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x2f1aea){super(_0x2f1aea),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x3b77b1=this['editor'],_0x226a62=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3b77b1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4cf22d,!0x0)),_0x3b77b1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2de0af=this['_createCommentsArchiveButton'](ot);return _0x2de0af['set']({'role':'menuitemcheckbox'}),_0x2de0af;});const _0x5a5cc6=_0x3b77b1['plugins']['get'](Oi),_0x5e789b=_0x3b77b1['plugins']['get']('Annotations'),_0x4a64d3=_0x3b77b1['plugins']['get']('CommentsRepository');_0x5a5cc6['archivedThreads']['forEach'](_0x2b8352=>{this['_handleNewThread'](_0x2b8352);}),this['listenTo'](_0x5a5cc6['archivedThreads'],'add',(_0x3d5091,_0x24599f)=>{this['_handleNewThread'](_0x24599f);}),this['listenTo'](_0x5e789b['collection'],'add',(_0x1ea9bc,_0x491f82)=>{const _0x1a6c0c=this['_pendingThreads']['find'](_0x2df15b=>{const _0xf03c24=_0x4a64d3['_threadToController']['get'](_0x2df15b);return _0xf03c24&&_0x491f82['innerView']===_0xf03c24['view'];});if(_0x1a6c0c){const _0x3b50c1=this['_calculatePosition'](_0x1a6c0c['archivedAt']);this['_addAnnotationToArchive'](_0x491f82,_0x3b50c1),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1a6c0c),0x1);}}),this['listenTo'](_0x5a5cc6['archivedThreads'],'remove',(_0x17a544,_0x244335)=>{const _0x130e01=_0x3b77b1['config']['get']('collaboration.channelId');if(!_0x130e01||_0x244335['channelId']===_0x130e01){if(this['_pendingThreads']['includes'](_0x244335))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x244335),0x1);else{const _0x4722a2=_0x4a64d3['_threadToController']['get'](_0x244335),_0x3df4ec=_0x5e789b['getByInnerView'](_0x4722a2['view']);this['annotationViews']['remove'](_0x3df4ec['view']),this['stopListening'](_0x3df4ec),this['stopListening'](_0x3df4ec['focusableElements']);}}}),this['listenTo'](_0x5e789b['collection'],'add',(_0x5991e2,_0x42e00a)=>{this['listenTo'](_0x42e00a,'escape',_0x226a62);}),this['listenTo'](_0x5e789b['collection'],'remove',(_0x5d4680,_0x5a68b2)=>{this['stopListening'](_0x5a68b2,'escape',_0x226a62);});}['_addAnnotationToArchive'](_0xf33a97,_0x49aad2){this['listenTo'](_0xf33a97,'set:isVisible',_0x225771=>{_0x225771['return']=!0x1,_0x225771['stop']();}),this['annotationViews']['add'](_0xf33a97['view'],_0x49aad2);}['_handleNewThread'](_0x32dfe2){const _0x3c8fc0=this['editor']['plugins']['get']('CommentsRepository'),_0x524e2b=this['editor']['plugins']['get']('Annotations'),_0xbd55c7=this['editor']['config']['get']('collaboration.channelId');if(!_0xbd55c7||_0x32dfe2['channelId']===_0xbd55c7){const _0x5941cd=_0x3c8fc0['_threadToController']['get'](_0x32dfe2);if(!_0x5941cd)return void this['_pendingThreads']['push'](_0x32dfe2);const _0x300c01=this['_calculatePosition'](_0x32dfe2['archivedAt']),_0x16d7b6=_0x524e2b['getByInnerView'](_0x5941cd['view']);_0x16d7b6['isVisible']&&_0x524e2b['_visibleAnnotations']['remove'](_0x16d7b6),this['_addAnnotationToArchive'](_0x16d7b6,_0x300c01);}}['_calculatePosition'](_0x132e71){const _0x5843d4=this['editor']['config']['get']('collaboration.channelId'),_0x36eb59=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0xcda158=>_0xcda158['channelId']===_0x5843d4)['findIndex'](_0x49572f=>_0x49572f['archivedAt']<_0x132e71);return _0x36eb59<0x0||_0x36eb59>this['annotationViews']['length']?this['annotationViews']['length']:_0x36eb59-0x1;}['_toggleDialog'](){const _0x1de797=this['editor'],_0x5b6d4f=_0x1de797['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x1de797['locale'],this['annotationViews'])),'commentsArchive'===_0x5b6d4f['id']?_0x5b6d4f['hide']():_0x5b6d4f['show']({'id':'commentsArchive','title':bt(_0x1de797['locale'],'COMMENTS_ARCHIVE'),'icon':_0x337582,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x22c43d,_0x3ae090=!0x1){const _0x417b60=this['editor']['locale'],_0x636c09=this['editor']['plugins']['get']('Dialog'),_0x4ae690=new _0x22c43d(_0x417b60);return _0x4ae690['bind']('isEnabled')['to'](this,'isEnabled'),_0x4ae690['bind']('isOn')['to'](_0x636c09,'id',_0xa3175e=>'commentsArchive'===_0xa3175e),_0x4ae690['set']({'label':bt(_0x417b60,'COMMENTS_ARCHIVE'),'icon':_0x337582,'isToggleable':!0x0}),_0x3ae090&&(_0x4ae690['tooltip']=!0x0),this['listenTo'](_0x4ae690,'execute',()=>this['_toggleDialog']()),_0x4ae690;}['_hideDialogOnAnnotationEscape']=_0x29d29f=>{const _0x57ffa4=_0x29d29f['source'];if(!this['annotationViews']['has'](_0x57ffa4['view']))return;const _0x16455d=this['editor']['plugins']['get']('Dialog');_0x16455d['isOpen']&&'commentsArchive'===_0x16455d['id']&&(_0x16455d['hide'](),_0x29d29f['stop']());};}class Ri extends _0x4edfe9{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|