@ckeditor/ckeditor5-comments 45.2.1-alpha.3 → 45.2.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x1ff89d={}){function _0x5ee419(_0x1f0ba4){return _0x1f0ba4['map'](_0xe2558f=>String['fromCharCode'](_0xe2558f))['join']('');}(_0x1ff89d=Object['assign']({},_0x1ff89d))['plugins']||(_0x1ff89d['plugins']=Qt['defaultPlugins']),super(_0x1ff89d),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x5ee419([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ee419([0x76,0x69,0x65,0x77])][_0x5ee419([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5ee419([0x61,0x75,0x74,0x6f]),this[_0x5ee419([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5ee419([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5ee419([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5ee419([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5ee419([0x6f,0x6b])});}['create'](){const _0x3347ef=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3347ef))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x19cc7a=>{const _0x193c6b=this['model']['document']['getRoot'](),_0x3abea4=_0x193c6b&&_0x193c6b['getChild'](_0x193c6b['childCount']-0x1);_0x19cc7a['setSelection'](_0x3abea4,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1e4a2c=this['editing']['view'],_0x17ed4f=_0x1e4a2c['document']['getRoot'](),_0x5c4b6e=_0x17ed4f['getChild'](0x0);_0x17ed4f['childCount']>0x1||!_0x5c4b6e||'p'!=_0x5c4b6e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x1e4a2c,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5c4b6e['placeholder']=this['placeholder']),Ft({'view':_0x1e4a2c,'element':_0x5c4b6e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5c4b6e);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x436e27,_0x2d89fe={}){super(_0x436e27),this['editor']=null,this['_editorConfig']=_0x2d89fe,this['set']('value',_0x2d89fe['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x436e27,'Reply...')),this['set']('submitLabel',E(_0x436e27,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x403ade(),this['focusCycler']=new _0x13347f({'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',(_0x5f33c8,_0x1031a8)=>{this['cancelButtonView']['fire']('execute'),_0x1031a8();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3cda09,_0x555815)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x555815());}),this['on']('submit',(_0x1229ce,_0x1fc332)=>{_0x1fc332['length']>0xfde8?(alert(E(_0x436e27,'TOO_LONG_COMMENT_ALERT',[_0x1fc332['length'],0xfde8])),_0x1229ce['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0xc35d4=this['editor'];this['element']['insertBefore'](_0xc35d4['ui']['element'],this['element']['firstChild']),_0xc35d4['model']['document']['on']('change',()=>this['value']=_0xc35d4['getData']()),_0xc35d4['bind']('placeholder')['to'](this),this['focusables']['add'](_0xc35d4['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x21aa3a){-0x1===_0x21aa3a?(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:_0x5ea1d8}=this,_0x3a705c=new _0x5bb170(_0x5ea1d8);return _0x3a705c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3a705c['withText']=!0x0,_0x3a705c['bind']('label')['to'](this,'submitLabel'),_0x3a705c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3a705c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xb30510,_0x5878fb)=>!_0x5878fb&&!!_0xb30510['trim']()),_0x3a705c;}['_createCancelButton'](){const {locale:_0x5abfac}=this,_0x1e391f=new _0x5bb170(_0x5abfac);return _0x1e391f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1e391f['label']=E(_0x5abfac,'Cancel'),_0x1e391f['withText']=!0x0,_0x1e391f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1e391f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3b517c=>{this['focusTracker']['add'](_0x3b517c['element']);}),this['focusables']['on']('change',(_0x57d9eb,_0x35ffcc)=>{for(const _0x9c67fd of Array['from'](_0x35ffcc['added'])['reverse']())this['focusTracker']['add'](_0x9c67fd['element']);});}}class ie extends kt{constructor(_0x5c742b,_0x5329e7,_0x1db021){super(_0x5c742b),this['commentInputView']=new os(_0x5c742b,_0x1db021),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2a3c6d,_0x21de25)=>_0x2a3c6d||!!_0x21de25),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 _0x2af2e9(_0x5c742b,_0x5329e7),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'](_0x3ab2f5){this['commentInputView']['focus'](_0x3ab2f5);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4592b3,_0x3da85f)=>{const {submitButtonView:_0x454b8d,cancelButtonView:_0x10127e,editor:_0x54c329}=this['commentInputView'];[_0x454b8d['element'],_0x10127e['element'],_0x54c329?_0x54c329['editing']['view']['getDomRoot']():null]['filter'](_0x3437e4=>_0x3437e4)['some'](_0x31bdb0=>_0x31bdb0['contains'](_0x3da85f['target']))||(this['focus'](),_0x3da85f['preventDefault']());});}}class cs extends kt{constructor(_0x32a17d){super(_0x32a17d);const _0x24ff94=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x24ff94['to']('count',_0x1dcb18=>E(_0x32a17d,'NUMBER_OF_COMMENTS',_0x1dcb18))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5308da,_0x425391,_0x5a97af){super(_0x5308da);const _0x25765f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x425391['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x425391,this['_config']=_0x5a97af,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x403ade(),this['keystrokes']=new jt(),this['focusCycler']=new _0x13347f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e864c=>this['commentViews']['map'](_0x26d9d5=>_0x26d9d5['element'])['includes'](_0x3e864c['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x5308da),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1b4a85=>_0x1b4a85-this['_config']['maxCommentsWhenCollapsed']);for(const _0x59920b of _0x425391['comments'])this['_handleNewCommentModel'](_0x59920b);this['_handleInfoComment'](),this['listenTo'](_0x425391['comments'],'add',(_0x41238c,_0x396218)=>{const _0x1bb3ab=this['_calculatePosition'](_0x396218);this['length']++,this['_handleNewCommentModel'](_0x396218,_0x1bb3ab),this['refreshVisibleViews']();}),this['listenTo'](_0x425391['comments'],'remove',(_0x35e7f,_0x4bba9e)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4bba9e),this['refreshVisibleViews']();}),this['listenTo'](_0x425391,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x425391,'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',_0x25765f['if']('length','ck-hidden',_0x546c35=>!_0x546c35)],'aria-label':E(_0x5308da,'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'](_0x3e90b8){-0x1===_0x3e90b8?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1cb482 of this['commentViews'])_0x1cb482['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x103e11,_0x5c2b23){const _0x27ac20=new this['_config']['CommentView'](this['locale'],_0x103e11,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x27ac20['viewUid']=_0x103e11['id'],_0x27ac20['delegate']('removeComment')['to'](this),_0x27ac20['delegate']('updateComment')['to'](this),_0x27ac20['delegate']('resolveCommentThread')['to'](this),_0x27ac20['delegate']('editorReady')['to'](this),_0x27ac20['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x27ac20,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x27ac20,_0x5c2b23);}['_calculatePosition'](_0x59e204){const _0x3a8460=this['_model']['_findOptimalIndex'](_0x59e204);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x59e204['authoredAt']?_0x3a8460-0x1:_0x3a8460:_0x3a8460-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x59cfd4={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x59cfd4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x59cfd4));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5f2512){const _0x50c751=this['commentViews']['remove'](_0x5f2512['id']);this['stopListening'](_0x50c751),_0x50c751['isEditMode']&&this['_updateHasDirtyComment'](),_0x50c751['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x10a27f=>_0x10a27f['isEditMode']);}['_rearrangeCollapse'](){const _0x2cc84d=function(_0x3fc052){const _0x11eded=new _0x1a8bd1();for(const _0x56106e of _0x3fc052)_0x11eded['add'](_0x56106e);return _0x11eded;}(this['commentViews']),_0x5eb457=this['_collapsedCommentsView']['count'];for(let _0x4263e3=0x1;_0x4263e3<=_0x5eb457;_0x4263e3++)_0x2cc84d['remove'](0x1);for(const _0x549465 of _0x2cc84d)_0x549465['collapse']();_0x5eb457>0x0&&_0x2cc84d['add'](this['_collapsedCommentsView'],0x1),ns(_0x253c25(Array['from'](this['visibleViews']),Array['from'](_0x2cc84d)),this['visibleViews'],_0x2cc84d);}['_rearrangeExpand'](){ns(_0x253c25(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1767d6 of this['visibleViews'])_0x1767d6['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1b455b=>{this['focusTracker']['add'](_0x1b455b['element']),this['keystrokes']['listenTo'](_0x1b455b['element']);}),this['commentViews']['on']('change',(_0x4234f5,_0x206ef9)=>{for(const _0x387475 of _0x206ef9['removed'])this['focusTracker']['remove'](_0x387475['element']),this['keystrokes']['stopListening'](_0x387475['element']);for(const _0x188e9d of Array['from'](_0x206ef9['added'])['reverse']())this['focusTracker']['add'](_0x188e9d['element']),this['keystrokes']['listenTo'](_0x188e9d['element']);});}}function ns(_0x424210,_0x267374,_0x4cc462){let _0x52f5b3=0x0;for(const _0x368187 of _0x424210)switch(_0x368187){case'insert':_0x267374['add'](_0x4cc462['get'](_0x52f5b3),_0x52f5b3),_0x52f5b3++;break;case'delete':_0x267374['remove'](_0x52f5b3);break;case'equal':_0x52f5b3++;}}class as extends kt{constructor(_0x2d7671){super(_0x2d7671);const _0x556c17=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x556c17['to']('contextValue',_0x3a034f=>E(_0x2d7671,'THREAD_CONTEXT_LABEL',_0x3a034f)),'tabindex':-0x1},'children':[{'text':_0x556c17['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x440bbc,_0x6c6707){super(_0x440bbc);const _0x3b344f=this['bindTemplate'];this['_model']=_0x6c6707,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x403ade(),this['keystrokes']=new jt(),this['focusCycler']=new _0x13347f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3bc3e8=>!!_0x3bc3e8),this['bind']('contextValue')['to'](this['_model'],'context',_0x4087c6=>_0x4087c6&&_0x4087c6['value']?this['_trimContextValue'](_0x4087c6['value']):E(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',_0x3b344f['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 _0x56db40=new _0x5bb170(this['locale']);return _0x56db40['label']=E(this['locale'],'Reopen'),_0x56db40['tooltip']=E(this['locale'],'Reopen'),_0x56db40['icon']=_0x53fc8d,_0x56db40['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c44a4=>!_0x4c44a4),_0x56db40['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1138ad,_0x4c88a9)=>_0x1138ad&&_0x4c88a9),_0x56db40['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x56db40;}['_trimContextValue'](_0x202f7e){if(_0x202f7e['length']<0x96)return _0x202f7e;const _0x420543=_0x202f7e['lastIndexOf']('\x20',0x93);return _0x202f7e['substring'](0x0,_0x420543>-0x1?_0x420543:0x93)+'...';}['_attachContextActions'](){const _0x2eb588=this['element']['querySelector']('.ck-context'),_0x513b74=_0x2eb588['querySelector']('.ck-context__value');this['listenTo'](_0x2eb588,'mouseenter',()=>{_0x513b74['offsetWidth']<_0x513b74['scrollWidth']&&_0x2eb588['classList']['add']('overlay');}),this['listenTo'](_0x2eb588,'mouseleave',()=>{_0x2eb588['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x582dc3 of this['focusables'])this['focusTracker']['add'](_0x582dc3['element']),this['keystrokes']['listenTo'](_0x582dc3['element']);}['_createContextView'](){const _0x5890a5=new as(this['locale']);return _0x5890a5['bind']('contextValue')['to'](this),_0x5890a5;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x28a3fa,_0x12c9c8,_0x47f3b4,_0x357472){super(_0x28a3fa),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x12c9c8,this['_localUser']=_0x47f3b4,this['_config']=_0x357472,this['commentThreadHeaderView']=new Xt(_0x28a3fa,_0x12c9c8),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x28a3fa,E(_0x28a3fa,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x28a3fa,_0x12c9c8,Object['assign']({'CommentView':this['_config']['CommentView']},_0x357472)),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',(_0x363d5d,_0x2bcd6d)=>_0x363d5d||!!_0x2bcd6d),this['bind']('isUnlinked')['to'](_0x12c9c8,'unlinkedAt',_0x27a903=>!!_0x27a903),this['bind']('ariaLabel')['to'](this,'length',_0x35d4b0=>{const _0x18ab1e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x35d4b0,_0x18ab1e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x403ade(),this['keystrokes']=new jt(),this['focusCycler']=new _0x13347f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x499fb5=>_0x499fb5['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x36d892=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0xdd8a54=_0x36d892['commentInputView'];return _0x36d892['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0xdd8a54,'value',(_0x695e8c,_0x4e994f,_0x336845,_0x228292,_0x1889ca)=>!!_0x1889ca||!!_0x228292&&_0x336845&&!_0x4e994f||_0x695e8c&&_0x336845&&!_0x4e994f),_0xdd8a54['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x43c48f,_0x59880a,_0x248bce)=>{let _0x10fb51;return _0x10fb51=_0x248bce&&_0x59880a?'Reply\x20to\x20reopen\x20discussion...':_0x43c48f?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x10fb51);}),_0xdd8a54['bind']('submitLabel')['to'](this,'length',_0x507150=>E(this['locale'],_0x507150?'Reply':'Comment')),_0xdd8a54['on']('submit',(_0x3d59d5,_0x4f428c)=>{this['fire']('addComment',_0x4f428c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0xdd8a54['on']('cancel',()=>{this['focus']();}),_0xdd8a54['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xdd8a54['on']('cancel',_0x1f5743=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1f5743['stop']());}),this['on']('change:isActive',(_0x47fcce,_0x13b35d,_0x559b68)=>{_0x559b68||this['length']||_0xdd8a54['value']||this['fire']('removeCommentThread');}),_0x36d892;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x3fe266(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5ad172,target:_0x482693,type:_0x5d1a93,isVisible:_0x385009=!0x0}){super(),this['view']=_0x5ad172,this['view']['element']||this['view']['render'](),this['_type']=_0x5d1a93,this['_target']=_0x482693,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1a8bd1([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4206ba,_0x44728b)=>{this['view']['focusTracker']['add'](_0x44728b);}),this['focusableElements']['on']('remove',(_0xd0a6a4,_0x20659c)=>{this['view']['focusTracker']['remove'](_0x20659c);}),this['set']('isVisible',_0x385009);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4c286b=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x4c286b),_0x4c286b;}get['targetRect'](){const _0x441eac=this['target'];if(null===_0x441eac)return null;if(_0x441eac instanceof _0x56eef8)return _0x441eac;const _0x44f10d=_0x441eac['filter'](_0x4a4189=>function(_0x4b44bb){const _0x20b539=_0x4b44bb['offsetParent'];if(_0x20b539)return!0x0;const _0x152e17=_0x4b44bb['getClientRects']()['item'](0x0);return!!_0x152e17;}(_0x4a4189));return 0x0===_0x44f10d['length']?null:new _0x56eef8(_0x44f10d[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x47d690){this['view']['isActive']=_0x47d690,this['view']['mainView']['isActive']=_0x47d690;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x39491b){if(!(null===_0x39491b||_0x39491b instanceof _0x56eef8||Array['isArray'](_0x39491b)&&_0x39491b['every'](_0x4abe73=>li(_0x4abe73))))throw new _0x4835fd('annotation-invalid-target',null,{'target':_0x39491b});}['_getNormalizedTarget'](){const _0x4c411f='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x4c411f)?[_0x4c411f]:_0x4c411f;}}function li(_0x37cbac){return null!==_0x37cbac&&'object'==typeof _0x37cbac&&'nodeType'in _0x37cbac&&0x1===_0x37cbac['nodeType'];}class _ extends _0x1a8bd1{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x530532=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x403ade(),this['_focusTracker']['on']('change:isFocused',(_0x1599b3,_0x5b542a,_0xdfed26)=>{_0xdfed26||this['fire']('blur');});for(const _0x72e13 of _0x530532)this['add'](_0x72e13);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x5ed3e2){if(this['has'](_0x5ed3e2))throw new _0x4835fd('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x5ed3e2['innerView'],_0x5ed3e2),this['_viewToAnnotation']['set'](_0x5ed3e2['view'],_0x5ed3e2);for(const _0x442f83 of _0x5ed3e2['focusableElements'])this['_focusTracker']['add'](_0x442f83);this['listenTo'](_0x5ed3e2['focusableElements'],'add',(_0x59643e,_0x21c616)=>{this['_focusTracker']['add'](_0x21c616);}),this['listenTo'](_0x5ed3e2['focusableElements'],'remove',(_0x489f36,_0x5f06d8)=>{this['_focusTracker']['remove'](_0x5f06d8);}),this['listenTo'](_0x5ed3e2['view']['focusTracker'],'change:isFocused',(_0x1871a8,_0x41d469,_0x4ef9b9)=>{_0x4ef9b9&&this['fire']('focus',_0x5ed3e2);}),_0x5ed3e2['updateTargetRect']();const _0x599279=this['_getOrderInContent'](_0x5ed3e2['view']['targetRect']);return super['add'](_0x5ed3e2,_0x599279);}['remove'](_0x41778c){if(!this['has'](_0x41778c))throw new _0x4835fd('annotationcollection-not-existing-item',null);this['stopListening'](_0x41778c['view']['focusTracker']),this['stopListening'](_0x41778c['focusableElements']);for(const _0x296516 of _0x41778c['focusableElements'])this['_focusTracker']['remove'](_0x296516);return this['_viewToAnnotation']['delete'](_0x41778c['view']),this['_innerViewToAnnotation']['delete'](_0x41778c['innerView']),super['remove'](_0x41778c);}['getByInnerView'](_0x3b372a){return this['_innerViewToAnnotation']['get'](_0x3b372a);}['getByView'](_0x4a0e32){return this['_viewToAnnotation']['get'](_0x4a0e32);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2f8ada of this)_0x2f8ada['updateTargetRect']();this['_sort']();}['_sort'](){const _0x7ddde9=Array['from'](this)['sort']((_0x57e42b,_0x3644ee)=>v(_0x57e42b['view']['targetRect'],_0x3644ee['view']['targetRect']));for(let _0x5f51f4=_0x7ddde9['length']-0x1;_0x5f51f4>0x0;_0x5f51f4--){const _0x2e68c1=_0x7ddde9[_0x5f51f4];_0x5f51f4!==this['getIndex'](_0x2e68c1)&&(this['remove'](_0x2e68c1),this['add'](_0x2e68c1));}}['_getOrderInContent'](_0x21dafa){let _0x5a3c4d=0x0;if(!_0x21dafa)return this['length'];for(const _0x51edd7 of this){const _0x3044f8=_0x51edd7['view']['targetRect'];if(_0x3044f8){if(v(_0x21dafa,_0x3044f8)<0x0)return _0x5a3c4d;_0x5a3c4d++;}}return _0x5a3c4d;}}function v(_0x180d7a,_0x26fcfa){if(null===_0x180d7a&&null===_0x26fcfa)return 0x0;if(null===_0x180d7a)return-0x1;if(null===_0x26fcfa)return 0x1;const _0xbd0471=_0x180d7a['top']-_0x26fcfa['top'];return 0x0==_0xbd0471?_0x180d7a['left']-_0x26fcfa['left']:_0xbd0471;}class O extends _0xce78b4{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c235a){if(super(_0x2c235a),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2c235a instanceof _0x431851){const _0x2e0a80=_0x2c235a['locale'];_0x2c235a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x2e0a80,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x2e0a80,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x2e0a80,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x2e0a80,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x2e0a80,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x2e0a80,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x2e0a80,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x19c2f9){this['collection']['add'](_0x19c2f9);}['remove'](_0x141a65){this['collection']['remove'](_0x141a65),_0x141a65['destroy']();}['refreshVisibility'](){for(const _0x2a7558 of this['collection'])_0x2a7558['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x175ae2){return this['collection']['getByInnerView'](_0x175ae2);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x393392 of this['collection'])_0x393392['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x17ce7a){this['fire']('_activateAnnotation',_0x17ce7a);}['createAnnotation'](_0x4575c8){return new d(_0x4575c8);}['createAnnotationView'](_0x40ba74,_0x31de19){return new S(_0x40ba74,_0x31de19);}['_addActiveAnnotation'](_0x5f49dc){const _0x28e250=new Set(this['activeAnnotations']);_0x28e250['add'](_0x5f49dc),this['activeAnnotations']=_0x28e250;}['_removeActiveAnnotation'](_0xa23236){const _0x47d588=new Set(this['activeAnnotations']);_0x47d588['delete'](_0xa23236),this['activeAnnotations']=_0x47d588;}['_bindAnnotationsToVisibleAnnotations'](){const _0x19c6c5=this['collection'],_0x2b7581=this['_visibleAnnotations'];function _0x2ec7d8(_0x4ab674){const _0x2efd62=_0x4ab674['source'];_0x2efd62['isVisible']&&!_0x2b7581['has'](_0x2efd62)?_0x2b7581['add'](_0x2efd62):!_0x2efd62['isVisible']&&_0x2b7581['has'](_0x2efd62)&&_0x2b7581['remove'](_0x2efd62),_0x2efd62['view']['focusTracker']['remove'](_0x2efd62['view']['element']),_0x2efd62['view']['focusTracker']['add'](_0x2efd62['view']['element']);}this['listenTo'](_0x19c6c5,'add',(_0x2e74d5,_0x24d04f)=>{_0x24d04f['isVisible']&&_0x2b7581['add'](_0x24d04f),this['listenTo'](_0x24d04f,'change:isVisible',_0x2ec7d8);}),this['listenTo'](_0x19c6c5,'remove',(_0x3e733f,_0x2f24c6)=>{_0x2b7581['has'](_0x2f24c6)&&_0x2b7581['remove'](_0x2f24c6),this['stopListening'](_0x2f24c6,'change:isVisible',_0x2ec7d8);});}['_setupEnterAnnotationKeystroke'](){const _0x51450e=_0x11ae8b=>{_0x11ae8b['on']('ready',()=>{_0x11ae8b['keystrokes']['set'](_0x272f50,(_0x59cd97,_0x4a0340)=>{const _0x3b0d8f=_0x30c8a0(this['activeAnnotations']['values']());_0x3b0d8f&&(_0x3b0d8f['view']['focus'](),_0x4a0340());});});};this['context']instanceof _0x431851?_0x51450e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2a713f,_0x1178d4)=>{_0x51450e(_0x1178d4);});}['_setupEscapeAnnotationHandling'](){const _0x451a62=_0x21cecc=>{const _0x354056=_0x21cecc['source'],_0x41ad13=[];let _0x5b8f3a;if(Array['isArray'](_0x354056['target'])){_0x5b8f3a=_0x354056['target'][0x0],this['context']instanceof _0x431851?_0x41ad13['push'](this['context']):this['context']['editors']&&_0x41ad13['push'](...this['context']['editors']);for(const _0x2bda34 of _0x41ad13)for(const _0x15f671 of _0x2bda34['editing']['view']['domRoots']['values']())if(_0x15f671['contains'](_0x5b8f3a))return void _0x2bda34['editing']['view']['focus']();_0x5b8f3a['focus']();}};this['listenTo'](this['collection'],'add',(_0x5379ef,_0x5a1c08)=>{this['listenTo'](_0x5a1c08,'escape',_0x451a62,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x12ce8d,_0x4702a2)=>{this['stopListening'](_0x4702a2,'escape',_0x451a62);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xce78b4{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x14faa5){super(_0x14faa5),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x21f97e=this['context']['config'];_0x21f97e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x21f97e['define']('comments.maxThreadTotalWeight',0x1f4),_0x21f97e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x21f97e['define']('comments.CommentThreadView',vt),_0x21f97e['define']('comments.CommentView',gt),_0x21f97e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2d3ba8=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5aada4,_0x2076db)=>this['_addCommentThread'](_0x2076db)),this['on']('submitCommentThread',(_0x50558a,_0x32a3c6)=>this['_submitCommentThread'](_0x32a3c6)),this['on']('resolveCommentThread',(_0x40fc9a,_0x19b242)=>this['_resolveCommentThread'](_0x19b242)),this['on']('resolveCommentThread',(_0x9a833b,_0x1ca522)=>this['_updateActiveAnnotation'](_0x1ca522),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x109cff,_0x154fc2)=>this['_reopenCommentThread'](_0x154fc2)),this['on']('reopenCommentThread',(_0x372823,_0x1372ad)=>this['_updateActiveAnnotation'](_0x1372ad),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x514d19,_0x22c2c7)=>this['_removeCommentThread'](_0x22c2c7)),this['on']('updateCommentThread',(_0x3747f3,_0x413fc5)=>this['_updateCommentThread'](_0x413fc5)),this['on']('updateCommentThread',(_0x16dd9f,_0x445f33)=>this['_updateActiveAnnotation'](_0x445f33),{'priority':'lowest'}),this['on']('addComment',(_0x10d2bd,_0x50c0fb)=>this['_addComment'](_0x50c0fb)),this['on']('updateComment',(_0x42e826,_0x39c0b5)=>this['_updateComment'](_0x39c0b5)),this['on']('removeComment',(_0x46437d,_0x443d42)=>this['_removeComment'](_0x443d42)),this['on']('addComment',(_0x20dc7b,{threadId:_0xd7d6d1,isFromAdapter:_0x32f7b1})=>{if(_0x32f7b1)return;const _0x21c8a1=this['getCommentThread'](_0xd7d6d1),_0x13ebd8=_0x21c8a1&&this['_threadToController']['get'](_0x21c8a1);_0x13ebd8&&_0x13ebd8['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2d3ba8,'change:activeAnnotations',(_0x2cc47c,_0xb68a8d,_0x513183)=>{const _0x2e358f=Array['from'](_0x513183)['map'](_0x575ba4=>this['_viewToController']['get'](_0x575ba4['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x2e358f?_0x2e358f['model']:null;});}set['adapter'](_0x5cf978){if(this['_adapter'])throw new _0x4835fd('commentsrepository-adapter-already-set');this['_adapter']=_0x5cf978;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x334dc4=Tt,threadId:_0x3f4b0a=_0x4e9e71(),comments:_0x13393a=[],unlinkedAt:_0x1f0a98=null,resolvedAt:_0xc3e3bc=null,resolvedBy:_0x2fde83=null,target:_0x4acd34=null,context:_0x3b4dd8=null,attributes:_0x4e0749={},isResolvable:_0x4672bc=!0x0,isSubmitted:_0x31b8b1=!0x1,isFromAdapter:_0x26dc6a=!0x1}={}){return this['fire'](bt('addCommentThread',_0x334dc4),{'channelId':_0x334dc4,'threadId':_0x3f4b0a,'comments':_0x13393a,'unlinkedAt':_0x1f0a98,'resolvedAt':_0xc3e3bc,'resolvedBy':_0x2fde83,'target':_0x4acd34,'context':_0x3b4dd8,'attributes':_0x4e0749,'isFromAdapter':_0x26dc6a,'isResolvable':_0x4672bc,'isSubmitted':_0x31b8b1}),this['getCommentThread'](_0x3f4b0a);}['openNewCommentThread']({channelId:_0x2e236a=Tt,threadId:_0x35783f=_0x4e9e71(),target:_0x3047cb,context:_0x3c6cec=null,isResolvable:_0xc16cf1=!0x0}){if(this['_readOnlyChannels']['has'](_0x2e236a)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3047cb)throw new _0x4835fd('commentsrepository-missing-target');const _0x97b119=this['addCommentThread']({'channelId':_0x2e236a,'threadId':_0x35783f,'target':_0x3047cb,'context':_0x3c6cec,'isResolvable':_0xc16cf1});if(!_0x97b119)return null;const _0x547e45=this['_threadToController']['get'](_0x97b119),_0x1527e0=_0x547e45['view']['commentThreadInputView']['commentInputView'],_0x1b0cc7=this['context']['plugins']['get'](O),_0xce0b49=_0x1b0cc7['getByInnerView'](_0x547e45['view']);return _0x1b0cc7['activate'](_0xce0b49),_0x1527e0['once']('editorReady',()=>_0x1527e0['focus']()),_0x97b119;}['hasCommentThread'](_0x3cc392){if('string'!=typeof _0x3cc392)throw new _0x4835fd('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3cc392);}['updateCommentThread']({channelId:_0x4bae8f=Tt,threadId:_0x3189ab,context:_0x494efa,unlinkedAt:_0x2c67d2,attributes:_0x5d005a,isFromAdapter:_0x57b75e=!0x1}){return this['fire'](bt('updateCommentThread',_0x4bae8f),{'channelId':_0x4bae8f,'threadId':_0x3189ab,'context':_0x494efa,'unlinkedAt':_0x2c67d2,'attributes':_0x5d005a,'isFromAdapter':_0x57b75e}),this['getCommentThread'](_0x3189ab);}['getCommentThread'](_0x3efeb6){if('string'!=typeof _0x3efeb6)throw new _0x4835fd('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3efeb6);}['fetchCommentThread']({channelId:_0x4daa20,threadId:_0x566d6d}={}){const _0x4149d7=this['getCommentThread'](_0x566d6d);if(_0x4149d7)return Promise['resolve'](_0x4149d7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4835fd('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4daa20,'threadId':_0x566d6d})['then'](_0x7651da=>this['hasCommentThread'](_0x566d6d)?this['getCommentThread'](_0x566d6d):_0x7651da?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4daa20},_0x7651da)):void 0x0)['catch'](_0x3418d6=>{throw console['error'](_0x3418d6),new _0x4835fd('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x38d92d,skipNotAttached:_0x370724=!0x1,skipEmpty:_0x38bb9e=!0x1,toJSON:_0x232472=!0x1}={}){const _0x2dfbf9=[];for(const _0x27dada of this['_threads']['values']())_0x38d92d&&_0x27dada['channelId']!==_0x38d92d||_0x370724&&!_0x27dada['isAttached']||_0x38bb9e&&0x0===_0x27dada['length']||_0x2dfbf9['push'](_0x27dada);return _0x232472?_0x2dfbf9['map'](_0x255950=>_0x255950['toJSON']()):_0x2dfbf9;}['setActiveCommentThread'](_0x5d0dd9){const _0x43803a=this['context']['plugins']['get'](O);if(!_0x5d0dd9)return void(this['activeCommentThread']&&_0x43803a['deactivateAll']());const _0x5832b7=this['getCommentThread'](_0x5d0dd9);if(!_0x5832b7)throw new _0x4835fd('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5d0dd9});if(!this['_threadToController']['has'](_0x5832b7))throw new _0x4835fd('commentsrepository-active-not-attached',null,{'threadId':_0x5d0dd9});const _0x4a280f=_0x43803a['getByInnerView'](this['_threadToController']['get'](_0x5832b7)['view']);_0x43803a['activate'](_0x4a280f);}['switchReadOnly'](_0x2df8a9,_0x28b51c){_0x2df8a9?this['_readOnlyChannels']['add'](_0x28b51c):this['_readOnlyChannels']['delete'](_0x28b51c),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x13b992){return this['_readOnlyChannels']['has'](_0x13b992)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x44e1d9,_0x26c2db){return new Ct(_0x44e1d9,_0x26c2db);}['setPermissions'](_0x3a6bf9,_0x5c14ef=Tt){this['_permissions']['set'](_0x5c14ef,_0x3a6bf9),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x235e92=Tt){return this['_permissions']['has'](_0x235e92)?this['_permissions']['get'](_0x235e92):_t;}['_addCommentThread']({channelId:_0x27b375,threadId:_0x5965a2,comments:_0x4bf3a2,unlinkedAt:_0x107423,resolvedAt:_0x1fa6c8,resolvedBy:_0x5923bb,target:_0x44d705,context:_0x13df38,attributes:_0x2f05c4,isFromAdapter:_0x1b7648,isResolvable:_0x3ca915,isSubmitted:_0x56eb42}){if('string'!=typeof _0x5965a2)throw new _0x4835fd('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5965a2});if(this['hasCommentThread'](_0x5965a2))throw new _0x4835fd('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5965a2});const _0x40458e=new ui(this,{'channelId':_0x27b375,'id':_0x5965a2,'context':_0x13df38,'attributes':_0x2f05c4,'unlinkedAt':_0x107423,'resolvedAt':_0x1fa6c8,'resolvedBy':_0x5923bb?this['context']['plugins']['get'](it)['getUser'](_0x5923bb):null,'isResolvable':_0x3ca915,'isSubmitted':_0x56eb42||_0x1b7648});this['_threads']['set'](_0x5965a2,_0x40458e);for(const _0x3eb248 of _0x4bf3a2)_0x40458e['_add'](this['_createNewComment']({'threadId':_0x5965a2,..._0x3eb248}));return _0x44d705&&_0x40458e['attachTo'](_0x44d705),_0x1b7648||!_0x40458e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x27b375,'threadId':_0x5965a2});}['_submitCommentThread']({channelId:_0x3e2074,threadId:_0x1482cf}){if(!this['hasCommentThread'](_0x1482cf))throw new _0x4835fd('commentsrepository-missing-comment-thread',this);const _0x13238=this['getCommentThread'](_0x1482cf);if(_0x13238['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x522e3b,comments:_0x496afe,resolvedAt:_0x678f71,resolvedBy:_0x542a45,context:_0x5a5e14,attributes:_0x11ebcf}=_0x13238,_0x3d4198=this['context']['plugins']['get']('PendingActions'),_0x2e1163=_0x3d4198['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3e2074,'threadId':_0x522e3b,'comments':_0x496afe['map'](_0x4dd477=>_0x4dd477['toJSON']()),'resolvedAt':_0x678f71,'resolvedBy':_0x542a45?_0x542a45['id']:_0x542a45,'context':_0x5a5e14,'attributes':_0x11ebcf})['then'](({comments:_0x372100})=>{_0x3d4198['remove'](_0x2e1163);for(const _0xe9a3e5 of _0x372100)this['_updateComment']({'channelId':_0x3e2074,'threadId':_0x1482cf,'commentId':_0xe9a3e5['commentId'],'createdAt':_0xe9a3e5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x270d88=>{throw console['error'](_0x270d88),new _0x4835fd('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4e1fd0,target:_0x54f9d2}){const _0x37b8b5=this['getCommentThread'](_0x4e1fd0);if(!_0x37b8b5)throw new _0x4835fd('commentsrepository-attach-missing-comment-thread',this);const _0x46b340=this['context']['plugins']['get']('PendingActions'),_0x21d4a8=this['context']['plugins']['get'](O),_0xab0b5c=this['_createCommentThreadView'](_0x37b8b5),_0x17e583=new Ct(_0x37b8b5,_0xab0b5c);let _0xcbc054=null;_0xab0b5c['on']('change:isDirty',(_0x3c4d26,_0x2bca7d,_0x580084)=>{_0x580084?_0xcbc054=_0x46b340['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xcbc054&&(_0x46b340['remove'](_0xcbc054),_0xcbc054=null);}),this['_threadToController']['set'](_0x37b8b5,_0x17e583),this['_viewToController']['set'](_0xab0b5c,_0x17e583);const _0x1ae02d=new S(this['context']['locale'],_0xab0b5c);_0x1ae02d['bind']('length')['to'](_0xab0b5c),_0x1ae02d['bind']('isDirty')['to'](_0xab0b5c,'isDirty',_0xab0b5c,'length',(_0x43d149,_0x4e26bf)=>_0x43d149||!_0x4e26bf),_0x1ae02d['bind']('isActive')['to'](_0xab0b5c),_0x1ae02d['type']='comment';const _0x24a2ae=new d({'view':_0x1ae02d,'target':_0x54f9d2,'type':'comment','isVisible':!_0x37b8b5['archivedAt']});return _0xab0b5c['on']('escape',()=>{_0x24a2ae['fire']('escape');}),this['_bindAnnotationToEditors'](_0xab0b5c,_0x24a2ae),_0x21d4a8['add'](_0x24a2ae),_0x24a2ae;}['_bindAnnotationToEditors'](_0x24a7d2,_0x107d44){this['listenTo'](_0x24a7d2,'editorReady',(_0x18328d,_0x5422ab)=>{const _0xfe7334=_0x5422ab['ui']['view']['body']['bodyCollectionContainer'];_0x107d44['focusableElements']['add'](_0xfe7334),this['context']instanceof _0x431851&&this['context']['ui']['focusTracker']['add'](_0xfe7334);},{'priority':'highest'}),this['listenTo'](_0x24a7d2,'editorDestroyed',(_0x323746,_0x6aeb7b)=>{const _0x169e19=_0x6aeb7b['ui']['view']['body']['bodyCollectionContainer'];_0x107d44['focusableElements']['has'](_0x169e19)&&_0x107d44['focusableElements']['remove'](_0x169e19),this['context']instanceof _0x431851&&this['context']['ui']['focusTracker']['remove'](_0x169e19);});}['_unbindEditors'](_0xa4da56){this['stopListening'](_0xa4da56,'editorReady'),this['stopListening'](_0xa4da56,'editorDestroyed');}['_createCommentThreadView'](_0x3e9961){const _0x3e91c0=this['context']['plugins']['get'](it),{config:_0x385ddc,locale:_0x379f4a}=this['context'],_0x4426d3=lt(_0x385ddc['get']('locale'),_0x379f4a);return new(0x0,(_0x385ddc['get']('comments'))['CommentThreadView'])(_0x379f4a,_0x3e9961,_0x3e91c0['me'],{'editorConfig':{..._0x385ddc['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x385ddc['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x385ddc['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x385ddc['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x385ddc['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4426d3,'CommentView':_0x385ddc['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1c82f9,channelId:_0x565467,resolvedAt:_0x1c27fd,resolvedBy:_0x5909ba,isFromAdapter:_0x2c1d9b}){if(!this['hasCommentThread'](_0x1c82f9))throw new _0x4835fd('commentsrepository-missing-comment-thread',null,{'threadId':_0x1c82f9});const _0x32af91=this['getCommentThread'](_0x1c82f9);if(_0x32af91['isResolved'])throw new _0x4835fd('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1c82f9});const _0xa1811c=this['context']['plugins']['get'](it);if(_0x32af91['resolvedBy']=_0xa1811c['getUser'](_0x5909ba),_0x32af91['resolvedAt']=_0x1c27fd,_0x2c1d9b||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x94b6d0=this['context']['plugins']['get']('PendingActions'),_0x1d10e1=_0x94b6d0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x565467,'threadId':_0x1c82f9})['then'](({resolvedAt:_0x362374,resolvedBy:_0x19798b})=>{_0x94b6d0['remove'](_0x1d10e1),_0x32af91['resolvedBy']['id']!==_0x19798b&&(_0x32af91['resolvedBy']=_0xa1811c['getUser'](_0x19798b)),_0x32af91['resolvedAt']=_0x362374;})['catch'](_0x434319=>{throw console['error'](_0x434319),new _0x4835fd('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x521443,channelId:_0x217d3d,isFromAdapter:_0x4eb592}){if(!this['hasCommentThread'](_0x521443))throw new _0x4835fd('commentsrepository-missing-comment-thread',null,{'threadId':_0x521443});const _0x47d2dc=this['getCommentThread'](_0x521443);if(!_0x47d2dc['isResolved'])throw new _0x4835fd('commentsrepository-reopen-comment-thread',null,{'threadId':_0x521443});if(_0x47d2dc['resolvedBy']=null,_0x47d2dc['resolvedAt']=null,_0x4eb592||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5010be=this['context']['plugins']['get']('PendingActions'),_0x389400=_0x5010be['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x217d3d,'threadId':_0x521443})['then'](()=>_0x5010be['remove'](_0x389400))['catch'](_0x261406=>{throw console['error'](_0x261406),new _0x4835fd('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4c6abd,isFromAdapter:_0x4172f0}){const _0x1da8d5=this['getCommentThread'](_0x4c6abd);if(!_0x1da8d5)throw new _0x4835fd('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4c6abd),this['_threads']['delete'](_0x4c6abd),!_0x1da8d5['isSubmitted']||_0x4172f0||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2d670f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x6f6755}=_0x1da8d5,_0x47a1fe=_0x2d670f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x6f6755,'threadId':_0x4c6abd})['then'](()=>_0x2d670f['remove'](_0x47a1fe))['catch'](_0xebcffd=>{throw console['error'](_0xebcffd),new _0x4835fd('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4e7511,unlinkedAt:_0x41849a,context:_0x1ae522,attributes:_0x3d63bf,isFromAdapter:_0x418fe4}){if('string'!=typeof _0x4e7511)throw new _0x4835fd('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4e7511});if(!this['hasCommentThread'](_0x4e7511))throw new _0x4835fd('commentsrepository-missing-comment-thread',null,{'threadId':_0x4e7511});const _0x4ff97f=this['getCommentThread'](_0x4e7511);let _0x312cc8=!0x1;if(void 0x0!==_0x1ae522&&_0x4ff97f['context']!==_0x1ae522&&(_0x4ff97f['context']=_0x1ae522,_0x312cc8=!0x0),void 0x0!==_0x41849a&&_0x4ff97f['unlinkedAt']!==_0x41849a&&(_0x4ff97f['unlinkedAt']=_0x41849a,_0x312cc8=!0x0),_0x3d63bf&&!wt(_0x3d63bf,_0x4ff97f['attributes'])&&(_0x4ff97f['attributes']=_0x3d63bf,_0x312cc8=!0x0),!_0x312cc8)return Promise['resolve']();if(!_0x4ff97f['isSubmitted']||_0x418fe4||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x633fad=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5331cd}=_0x4ff97f,_0x2412e5=_0x633fad['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5331cd,'threadId':_0x4e7511,'context':_0x1ae522,'unlinkedAt':_0x41849a,'attributes':_0x3d63bf})['then'](()=>_0x633fad['remove'](_0x2412e5))['catch'](_0x2d193a=>{throw console['error'](_0x2d193a),new _0x4835fd('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4db6d8){const _0x30de04=this['context']['plugins']['get'](O),_0x3777bf=this['getCommentThread'](_0x4db6d8);if(_0x3777bf['_isAttached']=!0x1,this['_threadToController']['has'](_0x3777bf)){const _0x14ddee=this['_threadToController']['get'](_0x3777bf),_0x3851fa=_0x14ddee['view'],_0x5a715b=_0x30de04['getByInnerView'](_0x3851fa);this['_threadToController']['delete'](_0x3777bf),this['_viewToController']['delete'](_0x3851fa),_0x5a715b&&_0x30de04['remove'](_0x5a715b),_0x14ddee['destroy'](),_0x3851fa['destroy']()['then'](()=>{this['_unbindEditors'](_0x3851fa);});}}['_updateActiveAnnotation']({threadId:_0x11db44,resolvedAt:_0x167d55,unlinkedAt:_0x1196b9}){const _0x1d2f57=!!_0x167d55,_0x397ebd=this['context']['plugins']['get'](O),_0xda337e=this['getCommentThread'](_0x11db44);if(this['_threadToController']['has'](_0xda337e)){const _0x1a80c8=this['_threadToController']['get'](_0xda337e)['view'],_0x58a687=_0x397ebd['getByInnerView'](_0x1a80c8);_0x58a687&&(_0x1d2f57&&_0x397ebd['_removeActiveAnnotation'](_0x58a687),_0x1196b9?_0x58a687['isVisible']=!0x1:_0x58a687['refreshVisibility']());}}['_getExternalAuthor'](_0x28124c){const _0x15fc5d=this['context']['plugins']['get'](it),_0x111475=pt('external:'+_0x28124c),_0x421a1e=_0x15fc5d['getUser'](_0x111475);return _0x421a1e||_0x15fc5d['addUser']({'id':_0x111475,'name':_0x28124c});}['_createNewComment']({threadId:_0x15097d,commentId:_0xfafea8=_0x4e9e71(),content:_0x3fd66a,authorId:_0x31a985,createdAt:_0x5c2827,attributes:_0x50d1d3}){if('string'!=typeof _0xfafea8)throw new _0x4835fd('commentsrepository-invalid-commentid');if('string'!=typeof _0x31a985)throw new _0x4835fd('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3fd66a||!_0x3fd66a['trim']())throw new _0x4835fd('commentsrepository-invalid-comment-content');const _0x218cfe=this['context']['plugins']['get'](it)['getUser'](_0x31a985);if(!_0x218cfe)throw new _0x4835fd('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x31a985});let _0x307168=null,_0x1821f5=_0x5c2827;return _0x50d1d3?.['@external']&&(_0x307168=this['_getExternalAuthor'](_0x50d1d3['@external']['authorName']),_0x1821f5=new Date(_0x50d1d3['@external']['createdAt'])),new fi(this,{'threadId':_0x15097d,'id':_0xfafea8,'author':_0x307168||_0x218cfe,'creator':_0x218cfe,'content':_0x3fd66a,'createdAt':_0x5c2827,'authoredAt':_0x1821f5,'attributes':_0x50d1d3});}['_addComment'](_0x595a65){let {threadId:_0x57d925,content:_0x143e76,attributes:_0x1bd26b,isFromAdapter:_0x1dff23}=_0x595a65;const _0x5a7d9f=this['getCommentThread'](_0x595a65['threadId']);if(!_0x5a7d9f)throw new _0x4835fd('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x625a19=this['_createNewComment'](_0x595a65),{id:_0x4846ec}=_0x625a19;if(_0x5a7d9f['_add'](_0x625a19),_0x1dff23||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5a7d9f['isSubmitted'])return Promise['resolve']();const _0x525cfd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x987134}=_0x5a7d9f,_0xd5d9da=_0x525cfd['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1bd26b||(_0x1bd26b={}),this['adapter']['addComment']({'channelId':_0x987134,'threadId':_0x57d925,'commentId':_0x4846ec,'content':_0x143e76,'attributes':_0x1bd26b})['then'](_0x405f57=>{_0x525cfd['remove'](_0xd5d9da),_0x405f57&&this['_updateComment']({'channelId':_0x987134,'threadId':_0x57d925,'commentId':_0x4846ec,'createdAt':_0x405f57['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x329ba3=>{throw console['error'](_0x329ba3),new _0x4835fd('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x57afb2,commentId:_0x654e3,content:_0x26097a,createdAt:_0x4138f5,attributes:_0xdb11f8,isFromAdapter:_0x5c20ff}){if(void 0x0!==_0x26097a&&('string'!=typeof _0x26097a||!_0x26097a['trim']()['length']))throw new _0x4835fd('commentsrepository-update-comment-invalid-content');const _0x4bd79d=this['getCommentThread'](_0x57afb2),_0x3c6dd3=_0x4bd79d['getComment'](_0x654e3);if(!_0x3c6dd3)throw new _0x4835fd('commentsrepository-update-missing-comment',this);let _0x4cc1e5=!0x1;if(_0x26097a&&_0x26097a!==_0x3c6dd3['content']&&(_0x3c6dd3['isEditable']||_0x5c20ff)&&(_0x3c6dd3['content']=_0x26097a,_0x4cc1e5=!0x0),_0x4138f5&&_0x4138f5!==_0x3c6dd3['createdAt']&&(_0x3c6dd3['createdAt']=_0x4138f5,_0x3c6dd3['attributes']&&_0x3c6dd3['attributes']['@external']||(_0x3c6dd3['authoredAt']=_0x4138f5),_0x4cc1e5=!0x0),_0xdb11f8&&!wt(_0xdb11f8,_0x3c6dd3['attributes'])&&(_0x3c6dd3['attributes']=_0xdb11f8,_0x4cc1e5=!0x0),!_0x4cc1e5)return Promise['resolve']();if(_0x4bd79d['fire']('commentUpdated'),_0x5c20ff||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x8d2ee6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x190fda}=this['getCommentThread'](_0x3c6dd3['threadId']),_0xbe844b=_0x8d2ee6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x190fda,'threadId':_0x57afb2,'commentId':_0x654e3,'content':_0x26097a,'attributes':_0xdb11f8})['then'](()=>_0x8d2ee6['remove'](_0xbe844b))['catch'](_0x2da59d=>{throw console['error'](_0x2da59d),new _0x4835fd('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x33da3e,commentId:_0x5c70a0,isFromAdapter:_0x4f8855}){const _0x36c679=this['getCommentThread'](_0x33da3e),_0x2d44d9=_0x36c679['getComment'](_0x5c70a0);if(!_0x2d44d9)throw new _0x4835fd('commentsrepository-remove-missing-comment',this);if(_0x36c679['_remove'](_0x2d44d9),_0x4f8855||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x438772=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3c2f17}=_0x36c679,_0xc06eb9=_0x438772['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3c2f17,'threadId':_0x33da3e,'commentId':_0x5c70a0})['then'](()=>_0x438772['remove'](_0xc06eb9))['catch'](_0x48759c=>{throw console['error'](_0x48759c),new _0x4835fd('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3fe266(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2e4b49,_0x55aba9){super();const _0x317beb=_0x2e4b49['context']['plugins']['get'](it)['me'],_0x280a39=_0x2e4b49['getCommentThread'](_0x55aba9['threadId']),_0x5ee332=0x0===_0x280a39['comments']['length'],_0x3b3194=_0x317beb===_0x55aba9['author'];this['id']=_0x55aba9['id'],this['threadId']=_0x55aba9['threadId'],this['author']=_0x55aba9['author'],this['creator']=_0x55aba9['creator'],this['isExternal']=Boolean(_0x55aba9['attributes']&&_0x55aba9['attributes']['@external']),this['set']('content',_0x55aba9['content']),this['createdAt']=_0x55aba9['createdAt']||new Date(),this['set']('authoredAt',_0x55aba9['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x280a39,'resolvedAt'),this['set']('attributes',_0x55aba9['attributes']||{}),this['bind']('isEditable')['to'](_0x2e4b49,'_permissions',()=>{const _0x3bcdee=_0x2e4b49['getPermissions'](_0x280a39['channelId'])['write'],_0x44deed=_0x2e4b49['getPermissions'](_0x280a39['channelId'])['modifyAll'];return _0x3b3194&&_0x3bcdee||!_0x3b3194&&_0x44deed;}),this['bind']('isRemovable')['to'](_0x280a39,'isRemovable',_0x2e4b49,'_permissions',_0x3b0a5c=>{const _0x5d6390=_0x2e4b49['getPermissions'](_0x280a39['channelId'])['write'],_0x5ac797=_0x2e4b49['getPermissions'](_0x280a39['channelId'])['modifyAll'];return _0x3b3194&&_0x5d6390||_0x3b0a5c&&_0x5ee332||!_0x3b3194&&_0x5ac797&&!_0x5ee332;}),this['bind']('isReadOnly')['to'](_0x280a39,'isReadOnly'),this['_repository']=_0x2e4b49;}get['weight'](){return Math['max'](function(_0x83c420){const _0x21f969=document['createElement']('div');return _0x21f969['innerHTML']=_0x83c420,_0x21f969['textContent']['length'];}(this['content']),0xc8);}['update'](_0x4fcb0f){const {threadId:_0xfd43d0,id:_0x5e9e86}=this;if(!this['_repository']['hasCommentThread'](_0xfd43d0))throw new _0x4835fd('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xba0bf6}=this['_repository']['getCommentThread'](_0xfd43d0);this['_repository']['fire'](bt('updateComment',_0xba0bf6,_0xfd43d0),{'channelId':_0xba0bf6,'threadId':_0xfd43d0,'commentId':_0x5e9e86,..._0x4fcb0f});}['setAttribute'](_0x475e48,_0x2b74e0){const _0x4865a8=It(this['attributes']);At(_0x4865a8,_0x475e48,_0x2b74e0),this['update']({'attributes':_0x4865a8});}['removeAttribute'](_0x14eefc){const _0x5e5351=It(this['attributes']);yt(_0x5e5351,_0x14eefc),this['update']({'attributes':_0x5e5351});}['remove'](_0x21a797={}){if(!_0x21a797['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xeacea4,id:_0x27da87}=this;if(!this['_repository']['hasCommentThread'](_0xeacea4))throw new _0x4835fd('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x129728}=this['_repository']['getCommentThread'](_0xeacea4);this['_repository']['fire'](bt('removeComment',_0x129728,_0xeacea4),{'channelId':_0x129728,'threadId':_0xeacea4,'commentId':_0x27da87,..._0x21a797});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x54fda8,..._0x485fe6){for(const _0xa932b0 of _0x485fe6)void 0x0!==_0xa932b0&&(_0x54fda8+=':'+String(_0xa932b0));return _0x54fda8;}class J extends _0x27904e{['refresh'](){const _0x1567c1=this['editor']['model']['document']['selection'];for(const _0x495a0c of _0x1567c1['getRanges']())if(this['_hasContent'](_0x495a0c))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x59bee1=_0x4e9e71()}={}){const _0x2b45a6=this['editor']['model'],_0x22c3cb=[];for(const _0x11c020 of _0x2b45a6['document']['selection']['getRanges']())this['_hasContent'](_0x11c020)&&_0x22c3cb['push'](this['_trimToContent'](_0x11c020));_0x2b45a6['change'](_0x2b8e3d=>{for(const _0x30ce6d of _0x22c3cb){const _0x3a0fd4=_0x4e9e71()['substr'](0x1,0x5),_0x23d906='comment:'+_0x59bee1+':'+_0x3a0fd4;_0x2b8e3d['addMarker'](_0x23d906,{'range':_0x30ce6d,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x527aac){for(const _0x526ec0 of _0x527aac['getItems']())if(this['_itemIsContent'](_0x526ec0))return!0x0;return!0x1;}['_itemIsContent'](_0x2edc45){return _0x2edc45['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x2edc45)&&!_0x2edc45['is']('element','tableCell');}['_trimToContent'](_0x353b09){const _0x1a3e39=_0x5c38f7=>!this['_itemIsContent'](_0x5c38f7['item']),_0x3b5ab7=_0x353b09['start']['getLastMatchingPosition'](_0x1a3e39),_0x41fe33=_0x353b09['end']['getLastMatchingPosition'](_0x1a3e39,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3b5ab7,_0x41fe33);}}class P extends _0x1b086d{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x397dfc){super(_0x397dfc),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3c1fda=this['editor'],_0x26c3ac=_0x3c1fda['model']['document']['selection'],_0x441775=_0x3f14f3(()=>this['refreshSelectedViews'](),0xa);_0x26c3ac['on']('change:range',(_0xadb82f,_0x52e801)=>{_0x52e801['directChange']&&(_0x441775['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3c1fda['editing']['view']['document'],'change:isFocused',(_0x2372fa,_0x2fec14,_0x425d31)=>{_0x425d31&&_0x441775();}),this['listenTo'](_0x3c1fda['ui']['focusTracker'],'change:isFocused',(_0x2a345d,_0xeb8677,_0x4e4d69)=>{_0x4e4d69||_0x3c1fda['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x5c3c6b=>this['_editorAnnotationsData']['has'](_0x5c3c6b['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x9b9279){if(this['_editorAnnotations']['has'](_0x9b9279['view']))return;this['_editorAnnotations']['add'](_0x9b9279['view']),this['editor']['ui']['focusTracker']['add'](_0x9b9279['view']['element']);const _0x188b29=this['editor']['plugins']['get'](O);this['listenTo'](_0x188b29['collection'],'remove',(_0x18bc4c,_0x32c2e2)=>{this['editor']['ui']['focusTracker']['remove'](_0x32c2e2['view']['element']),this['_editorAnnotations']['delete'](_0x32c2e2['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x40669c){if('function'!=typeof _0x40669c)throw new _0x4835fd('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x40669c);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2fb5a4,annotations:_0x237db2}){const _0x5e7982=[],_0x94e8b7=this['editor']['model']['document']['selection'],_0x535188=Array['from'](_0x94e8b7['getRanges']());for(const [_0x5392da,_0xf39859]of this['_editorAnnotationsData']){const _0x47d83e=_0x245fba(_0xf39859),_0xeadbba=_0x237db2['getByInnerView'](_0x5392da);_0x47d83e&&_0xeadbba&&_0x5e7982['push']({'annotation':_0xeadbba,'range':_0x47d83e});}function _0x245fba(_0xe8a3d){for(const _0x25f8a5 of _0xe8a3d)for(const _0x355735 of _0x535188)if(_0x25f8a5['containsRange'](_0x355735,!_0x94e8b7['isCollapsed']))return _0x25f8a5;return null;}return _0x5e7982['sort']((_0x46701c,_0x438632)=>{const _0x209552=_0x46701c['range'],_0xcd5da6=_0x438632['range'];if(!_0x209552['isEqual'](_0xcd5da6)){if(_0x209552['containsRange'](_0xcd5da6,!0x0))return 0x1;if(_0xcd5da6['containsRange'](_0x209552,!0x0))return-0x1;}return _0x46701c['annotation']==_0x2fb5a4?-0x1:_0x438632['annotation']==_0x2fb5a4?0x1:0x0;})['map'](_0x3d9f71=>_0x3d9f71['annotation']);}get['_editorAnnotationsData'](){const _0x41c845=new Map();for(const _0x42c585 of Array['from'](this['_dataCollectors']))for(const [_0x147bd9,_0x4f696e]of _0x42c585())_0x41c845['set'](_0x147bd9,_0x4f696e);return _0x41c845;}}class st extends _0x1b086d{['afterInit'](){const _0x12697f=this['editor'];if(!_0x12697f['plugins']['has']('RestrictedEditingModeEditing'))return;_0x12697f['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x1b086d{constructor(_0x4035d9){super(_0x4035d9),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x105e72=this['editor'],_0x424df0=_0x105e72['commands']['get']('importWord'),_0x465add=_0x105e72['plugins']['get'](it);_0x424df0&&(_0x424df0['on']('execute',(_0x1a2f4f,[,_0x38a20a])=>{_0x38a20a['collaboration_features']={'comments':!0x0,'user_id':_0x465add['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x424df0,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3401d6,_0x432c14){const {comment_threads:_0x50b7ee}=_0x432c14;_0x50b7ee&&_0x50b7ee['forEach'](({thread_id:_0x5de792,comments:_0x1b9230,is_resolved:_0x56196d})=>{const _0x5846eb=new Date(),_0x243fa8=_0x1b9230['map'](({author:_0x2e4479,content:_0x42f50a,created_at:_0xe81342})=>({'content':_0x42f50a,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x5846eb,'attributes':{'@external':{'authorName':_0x2e4479,'createdAt':_0xe81342?new Date(_0xe81342):new Date(),'source':'importWord'}}})),_0x5c103a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x5c103a,'threadId':_0x5de792,'comments':_0x243fa8,'resolvedAt':_0x56196d?_0x5846eb:null});});}}class at extends _0x1b086d{constructor(_0x254798){super(_0x254798),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x11642e=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x11642e,'contentInsertion',(_0x55eaf6,_0x3a5aa6)=>this['_removeMarkersWithoutThreads'](_0x3a5aa6['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x21755d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x21755d;const _0x3e1d53=this['editor']['plugins']['get']('CommentsRepository');for(const _0x27a491 of _0x21755d['keys']()){const [_0x5144e2,_0x2934a2]=_0x27a491['split'](':');'comment'!=_0x5144e2||_0x3e1d53['hasCommentThread'](_0x2934a2)||_0x21755d['delete'](_0x27a491);}return _0x21755d;}['_registerMarkerInClipboardPipeline'](){const _0x3bfde3=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x241973=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x241973&&_0x3bfde3['_registerMarkerToCopy']('comment',_0x241973);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x924058){switch(_0x924058){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x1b086d{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5198a9,_0x4c77aa)=>{if(!_0x4c77aa['options']['showCommentHighlights'])return null;if(_0x4c77aa['options']['ignoreResolvedComments']){const {id:_0x74aff4}=er(_0x5198a9['markerName']),_0x5b6c0f=this['editor']['plugins']['get'](o);if(_0x5b6c0f['getCommentThread'](_0x74aff4)?.['isResolved']&&_0x5198a9['item'])return _0x4c77aa['consumable']['consume'](_0x5198a9['item'],'addMarker:'+_0x5198a9['markerName']),_0x4c77aa['consumable']['consume'](_0x5198a9['item'],'removeMarker:'+_0x5198a9['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x41982a=>{_0x41982a['on']('addMarker:comment',(_0xbea871,_0x50bd4d,_0x5a35aa)=>{if(!_0x5a35aa['options']['showCommentHighlights'])return;const _0x46da0e=_0x50bd4d['item'];if(!_0x46da0e)return;const _0x492028=_0x5a35aa['mapper']['toViewElement'](_0x46da0e);this['editor']['model']['schema']['isObject'](_0x46da0e)&&_0x492028&&!_0x492028['getCustomProperty']('widget')&&_0x492028['is']('containerElement')&&_0x3ff71c(_0x492028,_0x5a35aa['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5097bf,{writer:_0x46b1ab,options:_0x41fd4f})=>{if(!_0x41fd4f['showCommentHighlights'])return null;const _0x17cfae=_0x46b1ab['createContainerElement']('div'),_0x57ca83=_0x46b1ab['createEmptyElement']('hr');return _0x46b1ab['addClass']('ck-horizontal-line',_0x17cfae),_0x46b1ab['insert'](_0x46b1ab['createPositionAt'](_0x17cfae,0x0),_0x57ca83),_0x17cfae;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x468906,{writer:_0x49910b,options:_0x560a41})=>{if(!_0x560a41['showCommentHighlights'])return null;const _0x5ef066=_0x49910b['createContainerElement']('span'),_0x4c7509=_0x49910b['createEmptyElement']('img');return _0x49910b['addClass']('image-inline',_0x5ef066),_0x49910b['insert'](_0x49910b['createPositionAt'](_0x5ef066,0x0),_0x4c7509),_0x5ef066;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1b9be6,{writer:_0x4e5028,options:_0x5ee58c})=>{if(_0x5ee58c['showCommentHighlights'])return _0x4e5028['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2b14b4,_0x40bed9,_0x53d765)=>{_0x53d765['options']['showCommentHighlights']&&_0x2b14b4['stop']();},{'priority':'high'});}}class r extends _0x1b086d{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x474dea){super(_0x474dea),this['set']('isThreadsLoadingPaused',!0x0),_0x474dea['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x36f912,_0xfe3b1a,_0x5d0132,_0x470f1f)=>{const _0x3e19e3=_0x474dea['plugins']['get'](o),_0x991a1f=_0x5d0132?er(_0x5d0132)['id']:null;_0x474dea['model']['change'](()=>{if(_0x991a1f){const _0x2b7c9f=this['getAllMarkersForId'](_0x991a1f);for(const _0x4ea816 of _0x2b7c9f)_0x474dea['editing']['reconvertMarker'](_0x4ea816);}if(_0x470f1f){const {id:_0x5a8832}=er(_0x470f1f),_0x57ee2d=_0x3e19e3['getCommentThread'](_0x5a8832);if(_0x57ee2d&&_0x57ee2d['unlinkedAt'])return;if(_0x57ee2d&&!_0x57ee2d['isAttached'])return;const _0x31db93=this['getAllMarkersForId'](_0x5a8832);for(const _0x527e6e of _0x31db93)_0x474dea['editing']['reconvertMarker'](_0x527e6e);}}),_0x991a1f&&this['scrollToThreadMarker'](_0x991a1f);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4c6a5a=this['editor'],_0x52621a=_0x4c6a5a['plugins']['get'](o),_0x3edf9b=_0x4c6a5a['config']['get']('collaboration.channelId'),_0x3bbdca=_0x52621a['getCommentThreads']()['filter'](_0x13c067=>_0x13c067['channelId']!==_0x3edf9b);_0x4c6a5a['commands']['add']('addCommentThread',new J(_0x4c6a5a)),this['listenTo'](_0x4c6a5a,'change:isReadOnly',(_0x5e6f1c,_0x2d8455,_0x553032)=>{_0x52621a['switchReadOnly'](_0x553032,_0x4c6a5a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x52621a,ft('addCommentThread',_0x3edf9b),(_0x2ba1ae,{threadId:_0x312920})=>{const _0x205cf7=this['editor']['plugins']['get'](o)['getCommentThread'](_0x312920);_0x205cf7?.['unlinkedAt']&&this['_attachArchivedThread'](_0x312920);}),this['listenTo'](_0x52621a,ft('removeCommentThread',_0x3edf9b),(_0x24db06,{threadId:_0x11150d})=>{_0x4c6a5a['model']['enqueueChange']({'isUndoable':!0x1},_0x4ec750=>{const _0xa5e029=this['getAllMarkersForId'](_0x11150d);for(const _0x56072e of _0xa5e029)_0x4ec750['removeMarker'](_0x56072e);});}),this['listenTo'](_0x52621a,ft('resolveCommentThread',_0x3edf9b),(_0x4a098f,{threadId:_0x5d9e85})=>{(this['_reconvertMarkers'](_0x5d9e85),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5d9e85)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x52621a,ft('reopenCommentThread',_0x3edf9b),(_0x23f3cb,{threadId:_0x20fc74})=>{this['_reconvertMarkers'](_0x20fc74);},{'priority':'low'}),this['listenTo'](_0x52621a,ft('addComment',_0x3edf9b),(_0x2166b2,{threadId:_0xa1fab7,isFromAdapter:_0x31e2d1})=>{const _0x42294d=this['getAllMarkersForId'](_0xa1fab7);if(_0x31e2d1||0x0==_0x42294d['length']||!_0x52621a['hasCommentThread'](_0xa1fab7))return;0x1===_0x52621a['getCommentThread'](_0xa1fab7)['length']&&_0x4c6a5a['model']['enqueueChange']({'isUndoable':!0x1},_0x227282=>{for(const _0x374a60 of _0x42294d)_0x227282['updateMarker'](_0x374a60,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3bbdca);}['afterInit'](){!async function(_0x31a4e7){const _0x4899d4=_0x33ec26([0x53,0x62,0x7a,0x6a,0x36,0x6e,0x66,0x51,0x77,0x52,0x33,0x54,0x74,0x47,0x39,0x67,0x78,0x32,0x76,0x6b,0x44,0x43,0x35,0x34,0x37,0x58,0x50,0x48,0x4e,0x6f,0x6d,0x57,0x4f,0x5a,0x38,0x56,0x79,0x70,0x61,0x71,0x63,0x72,0x64,0x46,0x30,0x31,0x41,0x4a,0x68,0x45,0x69,0x65,0x4c,0x4d,0x59,0x75,0x55,0x42,0x73,0x6c,0x49,0x4b]),_0x2aae82=0x26046f52,_0x3d4c10=0x260305ba^_0x2aae82,_0xe6efda=window[_0x33ec26([0x44,0x61,0x74,0x65])][_0x33ec26([0x6e,0x6f,0x77])](),_0xc9363e=_0x31a4e7[_0x33ec26([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x75afe7=new window[(_0x33ec26([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18512a=>{_0xc9363e[_0x33ec26([0x6f,0x6e,0x63,0x65])](_0x33ec26([0x72,0x65,0x61,0x64,0x79]),_0x18512a);}),_0x193c87={[_0x33ec26([0x6b,0x74,0x79])]:_0x33ec26([0x45,0x43]),[_0x33ec26([0x75,0x73,0x65])]:_0x33ec26([0x73,0x69,0x67]),[_0x33ec26([0x63,0x72,0x76])]:_0x33ec26([0x50,0x2d,0x32,0x35,0x36]),[_0x33ec26([0x78])]:_0x33ec26([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]),[_0x33ec26([0x79])]:_0x33ec26([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]),[_0x33ec26([0x61,0x6c,0x67])]:_0x33ec26([0x45,0x53,0x32,0x35,0x36])},_0x38124e=_0xc9363e[_0x33ec26([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x33ec26([0x67,0x65,0x74])](_0x33ec26([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xfb1fa1(){let _0x5dbcd5,_0x2b20ea=null,_0x22407a=null;try{if(_0x38124e==_0x33ec26([0x47,0x50,0x4c]))return _0x33ec26([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5dbcd5=_0x45c9b7(),!_0x5dbcd5)return _0x33ec26([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5dbcd5[_0x33ec26([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x22407a=_0x23db67(_0x5dbcd5[_0x33ec26([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5dbcd5[_0x33ec26([0x6a,0x74,0x69])])),await _0x23ffaf()?_0x3719b()?_0x36fb6e()?_0x33ec26([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x378ca8()?(_0x5dbcd5[_0x33ec26([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x33ec26([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2b20ea=_0x3e107c(_0x33ec26([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5dbcd5[_0x33ec26([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x33ec26([0x74,0x72,0x69,0x61,0x6c])&&(_0x2b20ea=_0x3e107c(_0x33ec26([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x596038()):_0x33ec26([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x33ec26([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x33ec26([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x33ec26([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x36fb6e(){const _0x597071=[_0x33ec26([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x33ec26([0x74,0x72,0x69,0x61,0x6c])][_0x33ec26([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5dbcd5[_0x33ec26([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe6efda/0x3e8:0xe10*_0x3d4c10;return _0x5dbcd5[_0x33ec26([0x65,0x78,0x70])]<_0x597071;}function _0x3719b(){const _0x6e0023=_0x5dbcd5[_0x33ec26([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x6e0023)return!0x1;if(_0x6e0023[_0x33ec26([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33ec26([0x2a])))return!0x0;if(_0x6e0023[_0x33ec26([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33ec26([0x43,0x4d,0x54])))return!0x0;if(_0x6e0023[_0x33ec26([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33ec26([0x52,0x43,0x4d,0x54]))){if(_0x2c6d1f())return!0x0;if(_0x1f7dd9()||_0x1644f0())return!0x0;}return!0x1;}function _0x378ca8(){const _0x1890d0=_0x5dbcd5[_0x33ec26([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1890d0||0x0==_0x1890d0[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3295b4}=new URL(window[_0x33ec26([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1890d0[_0x33ec26([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3295b4))return!0x0;const _0x4660d4=_0x3295b4[_0x33ec26([0x73,0x70,0x6c,0x69,0x74])](_0x33ec26([0x2e]));return _0x1890d0[_0x33ec26([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x48cfd4=>_0x48cfd4[_0x33ec26([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33ec26([0x2a])))[_0x33ec26([0x6d,0x61,0x70])](_0x2bcdbf=>_0x2bcdbf[_0x33ec26([0x73,0x70,0x6c,0x69,0x74])](_0x33ec26([0x2e])))[_0x33ec26([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xaddda1=>_0xaddda1[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4660d4[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x33ec26([0x6d,0x61,0x70])](_0x44dd7f=>Array(_0x4660d4[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x44dd7f[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x33ec26([0x66,0x69,0x6c,0x6c])](_0x44dd7f[0x0]===_0x33ec26([0x2a])?_0x33ec26([0x2a]):'')[_0x33ec26([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x44dd7f))[_0x33ec26([0x73,0x6f,0x6d,0x65])](_0x1f5119=>_0x4660d4[_0x33ec26([0x65,0x76,0x65,0x72,0x79])]((_0x3cdc55,_0x2b6a1e)=>_0x1f5119[_0x2b6a1e]===_0x3cdc55||_0x1f5119[_0x2b6a1e]===_0x33ec26([0x2a])));}function _0x596038(){return _0x2b20ea&&_0x22407a?new window[(_0x33ec26([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x18b568,_0x52a0c6)=>{_0x2b20ea[_0x33ec26([0x74,0x68,0x65,0x6e])](_0x18b568,_0x52a0c6),_0x22407a[_0x33ec26([0x74,0x68,0x65,0x6e])](_0x1497bc=>{_0x1497bc!=_0x33ec26([0x56,0x61,0x6c,0x69,0x64])&&_0x18b568(_0x1497bc);},_0x52a0c6);}):_0x2b20ea||_0x22407a||_0x33ec26([0x56,0x61,0x6c,0x69,0x64]);}}function _0x23db67(_0xf9bc18,_0x23fb66){return new window[(_0x33ec26([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d9226=>{if(_0xf9a8a8())return _0x2d9226(_0x33ec26([0x56,0x61,0x6c,0x69,0x64]));_0x38ea12(),_0xc9363e[_0x33ec26([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x33ec26([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x342507=!0x1;const _0x180e6c=_0x4e9e71();function _0x36288d(_0x1ff549){return!!_0x1ff549&&(typeof _0x1ff549===_0x33ec26([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ff549===_0x33ec26([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ff549[_0x33ec26([0x74,0x68,0x65,0x6e])]===_0x33ec26([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ff549[_0x33ec26([0x63,0x61,0x74,0x63,0x68])]===_0x33ec26([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5abf63(_0x1f511d){_0x1b09ff(_0x1f511d)[_0x33ec26([0x74,0x68,0x65,0x6e])](_0x542215=>{if(!_0x542215||_0x542215[_0x33ec26([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x33ec26([0x6f,0x6b]))return _0x33ec26([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5cda87(_0x3ff331(_0x180e6c+_0x23fb66))!=_0x542215[_0x33ec26([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x33ec26([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x33ec26([0x56,0x61,0x6c,0x69,0x64]);})[_0x33ec26([0x74,0x68,0x65,0x6e])](_0x3e2b1d=>(_0x5433cb(),_0x3e2b1d),()=>{const _0x27b43e=_0x1144f2();return null==_0x27b43e?(_0x5433cb(),_0x33ec26([0x56,0x61,0x6c,0x69,0x64])):_0x33ec26(_0xe6efda-_0x27b43e>(0x208eb52^_0x2aae82)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x33ec26([0x74,0x68,0x65,0x6e])](_0x2d9226)[_0x33ec26([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2d9226(_0x33ec26([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1f73f8=0x263281d2^_0x2aae82;function _0x5433cb(){const _0x4c1b65=_0x33ec26([0x6c,0x6c,0x63,0x74,0x2d])+_0x5cda87(_0x3ff331(_0xf9bc18)),_0x3749dd=_0x1ecccc(_0x5cda87(window[_0x33ec26([0x4d,0x61,0x74,0x68])][_0x33ec26([0x63,0x65,0x69,0x6c])](_0xe6efda/_0x1f73f8)));window[_0x33ec26([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x33ec26([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4c1b65,_0x3749dd);}function _0x1144f2(){const _0x4cf5f4=_0x33ec26([0x6c,0x6c,0x63,0x74,0x2d])+_0x5cda87(_0x3ff331(_0xf9bc18)),_0x2e92b5=window[_0x33ec26([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x33ec26([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4cf5f4);return _0x2e92b5?window[_0x33ec26([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ecccc(_0x2e92b5),0x10)*_0x1f73f8:null;}function _0x1b09ff(_0x16b5a4){return new window[(_0x33ec26([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d3f14,_0x20c03f)=>{_0x16b5a4[_0x33ec26([0x74,0x68,0x65,0x6e])](_0x2d3f14,_0x20c03f),window[_0x33ec26([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x20c03f,0x2605bb92^_0x2aae82);});}}_0xc9363e[_0x33ec26([0x6f,0x6e])](_0x33ec26([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x9a59d2,_0x3cf0e7)=>{if(_0x3cf0e7[0x0]!=_0xf9bc18)return _0x2d9226(_0x33ec26([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3cf0e7[0x1]={..._0x3cf0e7[0x1],[_0x33ec26([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x180e6c};},{[_0x33ec26([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x33ec26([0x68,0x69,0x67,0x68])}),_0xc9363e[_0x33ec26([0x6f,0x6e])](_0x33ec26([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1aaf29=>{_0x36288d(_0x1aaf29[_0x33ec26([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x342507=!0x0,_0x5abf63(_0x1aaf29[_0x33ec26([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x33ec26([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x33ec26([0x6c,0x6f,0x77])}),_0x75afe7[_0x33ec26([0x74,0x68,0x65,0x6e])](()=>{_0x342507||_0x2d9226(_0x33ec26([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xf9a8a8(){return _0xc9363e[_0x33ec26([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33ec26([0x76,0x69,0x65,0x77])][_0x33ec26([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x33ec26([0x61,0x75,0x74,0x6f]);}function _0x38ea12(){_0xc9363e[_0x33ec26([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33ec26([0x76,0x69,0x65,0x77])][_0x33ec26([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x33ec26([0x61,0x75,0x74,0x6f]);}}function _0x3e107c(_0x296136){const _0x5b4fde=[new window[(_0x33ec26([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x41f20e=>setTimeout(_0x41f20e,0x260d519e^_0x2aae82)),_0x75afe7[_0x33ec26([0x74,0x68,0x65,0x6e])](()=>new window[(_0x33ec26([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3eced9=>{let _0x200576=0x0;_0xc9363e[_0x33ec26([0x6d,0x6f,0x64,0x65,0x6c])][_0x33ec26([0x6f,0x6e])](_0x33ec26([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x6b07b9,_0x26b9ac)=>{_0x26b9ac[0x0][_0x33ec26([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x200576++,_0x200576==(0x26046eaa^_0x2aae82)&&(_0x3eced9(),_0x6b07b9[_0x33ec26([0x6f,0x66,0x66])]());});}))];return window[_0x33ec26([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x33ec26([0x72,0x61,0x63,0x65])](_0x5b4fde)[_0x33ec26([0x74,0x68,0x65,0x6e])](()=>_0x296136);}async function _0x28ce57(){await _0x75afe7,_0xc9363e[_0x33ec26([0x6d,0x6f,0x64,0x65,0x6c])][_0x33ec26([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5c306f,_0xc9363e[_0x33ec26([0x6d,0x6f,0x64,0x65,0x6c])][_0x33ec26([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5c306f,_0xc9363e[_0x33ec26([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x33ec26([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2c6d1f(){return _0x17479e(_0x33ec26([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3f99bf(_0x33ec26([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x33ec26([0x73,0x74,0x61,0x74,0x65])]==_0x33ec26([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1f7dd9(){return _0x17479e(_0x33ec26([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 _0x1644f0(){return _0x17479e(_0x33ec26([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1404c4(_0x42ad21){const _0x458103=_0x2b26da();_0xc9363e[_0x458103]=_0x33ec26([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x42ad21,_0x42ad21!=_0x33ec26([0x56,0x61,0x6c,0x69,0x64])&&_0x28ce57();}function _0x2b26da(){const _0x1f74a2=window[_0x33ec26([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x33ec26([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x33ec26([0x6e,0x6f,0x77])]())[_0x33ec26([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x33ec26([0x2e]),'');let _0x35e831=_0x33ec26([0x53]);for(let _0x5e9ab2=0x0;_0x5e9ab2<_0x1f74a2[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5e9ab2+=0x2){let _0x11728f=window[_0x33ec26([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f74a2[_0x33ec26([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5e9ab2,_0x5e9ab2+0x2));_0x11728f>=_0x4899d4[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x11728f-=_0x4899d4[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x35e831+=_0x4899d4[_0x11728f];}return _0x35e831;}function _0x45c9b7(){const _0x3726b6=_0x38124e[_0x33ec26([0x73,0x70,0x6c,0x69,0x74])](_0x33ec26([0x2e]));if(0x3!=_0x3726b6[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x547c3d(_0x3726b6[0x1]);function _0x547c3d(_0x2fb305){const _0x5dac79=_0x1ead27(_0x2fb305);return _0x5dac79&&_0x3d2cd7()?_0x5dac79:null;function _0x3d2cd7(){const _0x50a8a6=_0x5dac79[_0x33ec26([0x6a,0x74,0x69])],_0x250c4d=window[_0x33ec26([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x50a8a6[_0x33ec26([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x50a8a6[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x597da8={..._0x5dac79,[_0x33ec26([0x6a,0x74,0x69])]:_0x50a8a6[_0x33ec26([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x50a8a6[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x597da8[_0x33ec26([0x76,0x63])],_0x3ff331(_0x597da8)==_0x250c4d;}}}async function _0x23ffaf(){let _0x385af3=!0x0;try{const _0x56cad4=_0x38124e[_0x33ec26([0x73,0x70,0x6c,0x69,0x74])](_0x33ec26([0x2e])),[_0x306ddb,_0x1bb127,_0xd4f68c]=_0x56cad4;return _0x5d93fb(_0x306ddb),await _0x52a6bc(_0x306ddb,_0x1bb127,_0xd4f68c),_0x385af3;}catch{return!0x1;}function _0x5d93fb(_0x7419e){const _0x1c77b2=_0x1ead27(_0x7419e);_0x1c77b2&&_0x1c77b2[_0x33ec26([0x61,0x6c,0x67])]==_0x33ec26([0x45,0x53,0x32,0x35,0x36])||(_0x385af3=!0x1);}async function _0x52a6bc(_0x4c7bf5,_0x3568fd,_0x2bcf64){const _0xce0188=window[_0x33ec26([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x33ec26([0x66,0x72,0x6f,0x6d])](_0x30dd67(_0x2bcf64),_0x288624=>_0x288624[_0x33ec26([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1f891c=new window[(_0x33ec26([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x33ec26([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4c7bf5+_0x33ec26([0x2e])+_0x3568fd),_0x1e7ab9=window[_0x33ec26([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x33ec26([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1e7ab9)return;const _0x25720f=await _0x1e7ab9[_0x33ec26([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x33ec26([0x6a,0x77,0x6b]),_0x193c87,{[_0x33ec26([0x6e,0x61,0x6d,0x65])]:_0x33ec26([0x45,0x43,0x44,0x53,0x41]),[_0x33ec26([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x33ec26([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x33ec26([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1e7ab9[_0x33ec26([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x33ec26([0x6e,0x61,0x6d,0x65])]:_0x33ec26([0x45,0x43,0x44,0x53,0x41]),[_0x33ec26([0x68,0x61,0x73,0x68])]:{[_0x33ec26([0x6e,0x61,0x6d,0x65])]:_0x33ec26([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x25720f,_0xce0188,_0x1f891c)||(_0x385af3=!0x1);}}function _0x1ead27(_0x557f4d){return _0x557f4d[_0x33ec26([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x33ec26([0x65,0x79]))?JSON[_0x33ec26([0x70,0x61,0x72,0x73,0x65])](_0x30dd67(_0x557f4d)):null;}function _0x30dd67(_0x428a97){return window[_0x33ec26([0x61,0x74,0x6f,0x62])](_0x428a97[_0x33ec26([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x33ec26([0x2b]))[_0x33ec26([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x33ec26([0x2f])));}function _0x3ff331(_0xafef2f){let _0x236407=0x1505;function _0x49d503(_0x402ca0){for(let _0x1c63d7=0x0;_0x1c63d7<_0x402ca0[_0x33ec26([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c63d7++){const _0x2baf3c=_0x402ca0[_0x33ec26([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c63d7);_0x236407=(_0x236407<<0x5)+_0x236407+_0x2baf3c,_0x236407&=_0x236407;}}function _0x480a04(_0x577e4b){Array[_0x33ec26([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x577e4b)?_0x577e4b[_0x33ec26([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x480a04):_0x577e4b&&typeof _0x577e4b==_0x33ec26([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x33ec26([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x577e4b)[_0x33ec26([0x73,0x6f,0x72,0x74])]()[_0x33ec26([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2b6b46,_0x267a35])=>{_0x49d503(_0x2b6b46),_0x480a04(_0x267a35);}):_0x49d503(window[_0x33ec26([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x577e4b));}return _0x480a04(_0xafef2f),_0x236407>>>0x0;}function _0x5cda87(_0x4f1f4a){return _0x4f1f4a[_0x33ec26([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x33ec26([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x33ec26([0x30]));}function _0x1ecccc(_0x25fbd6){return _0x25fbd6[_0x33ec26([0x73,0x70,0x6c,0x69,0x74])]('')[_0x33ec26([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x33ec26([0x6a,0x6f,0x69,0x6e])]('');}function _0x17479e(_0x2d8b83){return _0xc9363e[_0x33ec26([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x33ec26([0x68,0x61,0x73])](_0x2d8b83);}function _0x3f99bf(_0x6f0f69){return _0xc9363e[_0x33ec26([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x33ec26([0x67,0x65,0x74])](_0x6f0f69);}function _0x5c306f(){}function _0x33ec26(_0x1c93bb){return _0x1c93bb['map'](_0x34b68f=>String['fromCharCode'](_0x34b68f))['join']('');}_0x1404c4(await _0xfb1fa1());}(this);}['destroy'](){const _0x5110c2=this['editor']['plugins']['get'](o),_0x4798da=this['editor']['config']['get']('collaboration.channelId');for(const _0x14eff2 of _0x5110c2['getCommentThreads']({'channelId':_0x4798da}))_0x5110c2['_detachCommentThread'](_0x14eff2['id']),_0x5110c2['_threads']['delete'](_0x14eff2['id']);super['destroy']();}['hasMarkerForId'](_0x16741a){return this['getAllMarkersForId'](_0x16741a)['length']>0x0;}['getAllMarkersForId'](_0x27e585){const _0x25c184=[];for(const _0x457ff3 of this['editor']['model']['markers'])_0x457ff3['name']['startsWith']('comment:'+_0x27e585)&&_0x25c184['push'](_0x457ff3);return _0x25c184;}['scrollToThreadMarker'](_0x566d19){const _0xf364ae=this['_getTargetForId'](_0x566d19);_0xf364ae&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x566d19&&rt({'target':_0xf364ae[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x59eb55){this['editor']['model']['change'](()=>{for(const _0x1e9bf8 of this['getAllMarkersForId'](_0x59eb55))this['editor']['editing']['reconvertMarker'](_0x1e9bf8);});}['_attachArchivedThread'](_0x3b92eb){const _0x602309=this['editor']['plugins']['get'](o),_0x1809d9=this['editor']['plugins']['get'](P),_0x5b117f=_0x602309['getCommentThread'](_0x3b92eb);if(!_0x5b117f['isAttached']){const _0x5bca6c=_0x5b117f['attachTo'](()=>this['_getTargetForId'](_0x5b117f['id']));_0x1809d9['registerAnnotation'](_0x5bca6c),_0x5b117f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x310cd9=this['editor'],_0x48425c=_0x310cd9['plugins']['get'](it);_0x310cd9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x24b266,_0x225ac9)=>{const {id:_0x1e94cf}=er(_0x24b266['markerName']),_0x11a6b5=_0x310cd9['plugins']['get'](o)['getCommentThread'](_0x1e94cf),_0x1629c6=this['activeMarker']&&er(this['activeMarker'])['id']===_0x1e94cf;let _0x113761;if(_0x11a6b5&&_0x11a6b5['isResolved']&&!_0x1629c6&&_0x24b266['item'])return _0x225ac9['consumable']['consume'](_0x24b266['item'],'addMarker:'+_0x24b266['markerName']),_0x225ac9['consumable']['consume'](_0x24b266['item'],'removeMarker:'+_0x24b266['markerName']),null;const _0x4826fa=['ck-comment-marker'];return _0x1629c6&&_0x4826fa['push']('ck-comment-marker--active'),_0x113761=_0x11a6b5?.['length']?_0x11a6b5['comments']['first']['author']['id']:_0x48425c['me']['id'],{'classes':_0x4826fa,'attributes':{'data-comment':_0x1e94cf,'data-author-id':_0x113761}};}}),_0x310cd9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x15fb82,{options:_0x522f8d})=>{if(_0x522f8d['showCommentHighlights'])return null;const _0x3eb5de=_0x310cd9['plugins']['get'](o),_0x394b82=_0x310cd9['model']['markers']['get'](_0x15fb82),{id:_0x3f47de,part:_0x30455d}=er(_0x15fb82);return _0x394b82&&!_0x394b82['affectsData']||_0x522f8d['ignoreResolvedComments']&&_0x3eb5de['getCommentThread'](_0x3f47de)?.['isResolved']?null:{'group':'comment','name':_0x30455d?_0x3f47de+':'+_0x30455d:_0x3f47de};}}),_0x310cd9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x488d4e,{writer:_0x5dd59b})=>_0x5dd59b['createElement']('$marker',{'data-name':'comment:'+_0x488d4e['getAttribute']('id')})}),_0x310cd9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3e4f0a=this['editor'],_0x5c9aab=_0x3e4f0a['plugins']['get'](o),_0x24f565=new Set(),_0x3ffc5b=new Set();_0x3e4f0a['model']['document']['registerPostFixer'](_0x429b43=>{let _0x1cc407=!0x1;for(const {name:_0x4b97ae,data:_0x44e068}of _0x3e4f0a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x45a3ef,id:_0x4c2902}=er(_0x4b97ae);let _0x432f56=_0x44e068['newRange'];if('comment'!==_0x45a3ef||!_0x432f56)continue;const _0x2e5648='$graveyard'===_0x432f56['root']['rootName'];_0x2e5648||(_0x432f56=dt(_0x432f56,_0x3e4f0a['model']),!_0x432f56||_0x432f56['isCollapsed']||!_0x44e068['newRange']||_0x432f56['isEqual'](_0x44e068['newRange']))?_0x3e4f0a['model']['hasContent'](_0x432f56)&&!_0x2e5648?this['isThreadsLoadingPaused']?_0x24f565['add'](_0x4b97ae):this['_handleThreadMarker'](_0x4b97ae,_0x4c2902):(_0x3ffc5b['add'](_0x4b97ae),_0x24f565['delete'](_0x4b97ae),_0x429b43['removeMarker'](_0x4b97ae),_0x1cc407=!0x0):(_0x429b43['updateMarker'](_0x4b97ae,{'range':_0x432f56}),_0x1cc407=!0x0);}return _0x1cc407;}),this['on']('change:isThreadsLoadingPaused',(_0x35f7a8,_0x40ca98,_0x41a6a3)=>{if(!_0x41a6a3&&_0x24f565['size'])for(const _0x8a05d7 of _0x24f565){const {id:_0x1f4fe5}=er(_0x8a05d7);_0x24f565['delete'](_0x8a05d7),_0x3e4f0a['model']['markers']['get'](_0x8a05d7)&&this['_handleThreadMarker'](_0x8a05d7,_0x1f4fe5);}}),this['listenTo'](_0x3e4f0a['model']['document'],'change',()=>{for(const {name:_0x4e9e89,data:{newRange:_0x3966db}}of _0x3e4f0a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x148e83,id:_0x4676e9}=er(_0x4e9e89);if('comment'!==_0x148e83)continue;const _0x9294e2=_0x5c9aab['getCommentThread'](_0x4676e9),_0x54f2b3=this['hasMarkerForId'](_0x4676e9);_0x9294e2&&(!_0x9294e2['_hasTargetInContent']&&_0x3966db&&_0x3e4f0a['editing']['view']['once']('render',()=>{const _0x5b832c=_0x3e4f0a['plugins']['get'](O),_0x142841=_0x5c9aab['_threadToController']['get'](_0x9294e2)['view'];_0x5b832c['getByInnerView'](_0x142841)['refreshVisibility']();},{'priority':'low'}),_0x9294e2['_hasTargetInContent']=_0x54f2b3||!!_0x3966db),_0x3966db||(_0x3ffc5b['add'](_0x4e9e89),_0x24f565['delete'](_0x4e9e89));}for(const _0x5a56e2 of _0x3ffc5b){const {id:_0x2064fe}=er(_0x5a56e2),_0x58e4c0=_0x5c9aab['getCommentThread'](_0x2064fe);if(_0x24f565['delete'](_0x5a56e2),!_0x58e4c0)continue;const _0x2f4dcd=this['hasMarkerForId'](_0x2064fe);_0x2f4dcd||_0x58e4c0['isSubmitted']?_0x2f4dcd||_0x58e4c0['unlinkedAt']||_0x58e4c0['setUnlinkedAt'](new Date()):_0x58e4c0['remove']();}_0x3ffc5b['clear']();});}['_handleInitialThreads'](_0xae4a1e){_0xae4a1e['forEach'](_0x2f9f3c=>{_0x2f9f3c['unlinkedAt']&&this['_attachArchivedThread'](_0x2f9f3c['id']);});}['_getTargetForId'](_0x44ced0){const _0x13be68=this['editor'],_0xf6dee0=this['getAllMarkersForId'](_0x44ced0);return et(_0x13be68['editing'],_0xf6dee0);}['_getTextContext'](_0x56b9a){const _0x53eb9c=this['getAllMarkersForId'](_0x56b9a);let _0x38f8a1='',_0x5854ee=!0x1;for(const _0x232513 of _0x53eb9c){const _0x5dd7a4=_0x232513['getRange']();for(const _0x4223c5 of Array['from'](_0x5dd7a4['getItems']()))_0x4223c5['is']('$textProxy')?(_0x38f8a1&&_0x5854ee&&(_0x38f8a1+='\x20',_0x5854ee=!0x1),_0x38f8a1+=_0x4223c5['data']):_0x5854ee=!0x0;_0x5854ee=!0x0;}return _0x38f8a1['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5f4b53,_0x5a634f){const _0x59f31a=this['editor'],_0xa11ae=_0x59f31a['plugins']['get'](o);let _0x30789a=_0xa11ae['getCommentThread'](_0x5a634f);const _0x14189c=_0x59f31a['config']['get']('collaboration.channelId'),_0xd19ce7=_0x59f31a['plugins']['get'](P);if(_0x30789a&&(_0x30789a['unlinkedAt']&&_0x30789a['setUnlinkedAt'](null),_0x30789a['isAttached']))return _0x30789a;return!this['getAllMarkersForId'](_0x5a634f)[0x0]['managedUsingOperations']?_0x59f31a['editing']['view']['once']('render',()=>{if(_0xa11ae['getCommentThread'](_0x5a634f))return;const _0x126a4e=_0x59f31a['plugins']['get'](O);_0x30789a=_0xa11ae['openNewCommentThread']({'channelId':_0x14189c,'threadId':_0x5a634f,'target':()=>this['_getTargetForId'](_0x5a634f),'context':{'type':'text','value':this['_getTextContext'](_0x5a634f)}});const _0x199c8b=_0xa11ae['_threadToController']['get'](_0x30789a)['view'],_0x14ad8c=_0x126a4e['getByInnerView'](_0x199c8b);_0x14ad8c&&_0xd19ce7['registerAnnotation'](_0x14ad8c);},{'priority':'low'}):_0xa11ae['fetchCommentThread']({'channelId':_0x14189c,'threadId':_0x5a634f})['then'](_0x2ad11a=>{if('destroyed'!==_0x59f31a['state']){if(_0x30789a=_0x2ad11a,_0x30789a&&!_0x30789a['isAttached']){const _0xb7eb10=_0x30789a['attachTo'](()=>this['_getTargetForId'](_0x5a634f));_0xd19ce7['registerAnnotation'](_0xb7eb10),_0x30789a['isResolved']&&this['_reconvertMarkers'](_0x5a634f);}else{if(!_0x30789a){const _0x119e3f=this['getAllMarkersForId'](_0x5a634f);_0x59f31a['model']['change'](_0x263e88=>{for(const _0x5a83d2 of _0x119e3f)_0x263e88['removeMarker'](_0x5a83d2);});}}}}),_0x30789a;}['_handleThreadMarker'](_0x6d9593,_0x45e833){const _0x28c53c=this['_attachMarkerToThread'](_0x6d9593,_0x45e833);_0x28c53c&&!_0x28c53c['context']&&_0x28c53c['setContext']({'type':'text','value':this['_getTextContext'](_0x45e833)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4365d5=this['editor'];ot(_0x4365d5['model'],({left:_0x46ad85,entered:_0x380a65})=>{for(const _0x211500 of _0x46ad85)if(mt(_0x211500)){_0x4365d5['ui']['ariaLiveAnnouncer']['announce'](E(_0x4365d5['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x943142 of _0x380a65)if(mt(_0x943142)){_0x4365d5['ui']['ariaLiveAnnouncer']['announce'](E(_0x4365d5['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x17bf43)));break;}});}}function ft(_0x3b7ac2,_0x340f2e){return _0x340f2e?_0x3b7ac2+':'+_0x340f2e:_0x3b7ac2;}function er(_0x3892d4){const _0x1fa5a4=_0x3892d4['split'](':');return{'group':_0x1fa5a4[0x0],'id':_0x1fa5a4[0x1],'part':_0x1fa5a4[0x2]};}function dt(_0x18aff4,_0x5b128d){const _0x2a7fd9=_0x5b128d['schema'],_0xd65487=_0x5b128d['createRange'](_0x18aff4['start']);for(const _0x127483 of _0x18aff4['getWalker']()){const {type:_0x2d1cad,item:_0x34d05b,nextPosition:_0x508f6f}=_0x127483;if('text'===_0x2d1cad||_0x2a7fd9['isObject'](_0x34d05b)){const _0x58cb1c=_0x5b128d['createPositionBefore'](_0x34d05b);_0xd65487['isCollapsed']&&(_0xd65487['start']=_0x58cb1c),_0xd65487['end']=_0x508f6f;}}return _0xd65487;}function mt(_0x1cdff2){return'comment'===er(_0x1cdff2['name'])['group'];}class i extends _0x1b086d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x1aa7be=this['editor'],_0x274210=_0x1aa7be['plugins']['get'](o),_0x19e5d4=_0x1aa7be['plugins']['get'](r),_0x254b84=_0x1aa7be['plugins']['get'](O),_0x5c7e6f=_0x1aa7be['plugins']['get'](P);_0x1aa7be['ui']['componentFactory']['add']('comment',()=>{const _0x1cafd3=this['_createUIButton'](_0x5bb170);return _0x1cafd3['tooltip']=!0x0,_0x1cafd3;}),_0x1aa7be['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x4293e7)),_0x5c7e6f['addSourceCollector'](()=>{const _0x55efe8=[];for(const [_0x47cac1,_0x492c6f]of _0x274210['_threadToController']){const _0x16cd9b=_0x19e5d4['getAllMarkersForId'](_0x47cac1['id']),_0xd1a5e9=_0x16cd9b['map'](_0x3c787a=>_0x3c787a['getRange']());_0x16cd9b['length']>0x0&&_0x55efe8['push']([_0x492c6f['view'],_0xd1a5e9]);}return _0x55efe8;}),this['listenTo'](_0x254b84,'change:activeAnnotations',(_0x3a59d0,_0xbbf21,_0x4b80f0)=>{const _0xa62c36=Array['from'](_0x4b80f0)['map'](_0x2a649b=>_0x2a649b['innerView'])['find'](_0x5e0495=>_0x274210['_viewToController']['has'](_0x5e0495));if(!_0xa62c36)return void(_0x19e5d4['activeMarker']=null);const _0x3c66b4=_0x274210['_viewToController']['get'](_0xa62c36)['model']['id'],_0xdb9556='comment:'+_0x3c66b4;_0x3c66b4&&_0x19e5d4['hasMarkerForId'](_0x3c66b4)?_0x19e5d4['activeMarker']=_0xdb9556:_0x19e5d4['activeMarker']&&(_0x19e5d4['activeMarker']=null);}),this['listenTo'](_0x274210,'removeCommentThread',(_0x3bdf88,{threadId:_0x2f19bc,isFromAdapter:_0x2a0aca})=>{!_0x2a0aca&&_0x1aa7be['ui']['focusTracker']['isFocused']&&_0x19e5d4['hasMarkerForId'](_0x2f19bc)&&_0x1aa7be['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x274210,'addComment',(_0x349d5c,{threadId:_0x4a2537,isFromAdapter:_0x53e2f5})=>{if(_0x53e2f5||!_0x19e5d4['hasMarkerForId'](_0x4a2537)||!_0x274210['hasCommentThread'](_0x4a2537))return;0x1===_0x274210['getCommentThread'](_0x4a2537)['length']&&(_0x1aa7be['editing']['view']['focus'](),_0x349d5c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x18f72f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x59092e;for(const _0x40aab0 in _0x18f72f){const _0x52556a=_0x40aab0,_0x2a5738=_0x18f72f[_0x52556a];if('commentsLicenseKeyValid'==_0x2a5738||'commentsLicenseKeyInvalid'==_0x2a5738||'commentsLicenseKeyExpired'==_0x2a5738||'commentsLicenseKeyDomainLimit'==_0x2a5738||'commentsLicenseKeyNotAllowed'==_0x2a5738||'commentsLicenseKeyEvaluationLimit'==_0x2a5738||'commentsLicenseKeyTrialLimit'==_0x2a5738||'commentsLicenseKeyUsageLimit'==_0x2a5738){delete _0x18f72f[_0x52556a],_0x59092e=_0x2a5738,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x59092e&&_0x18f72f['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x59092e&&_0x18f72f['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x59092e&&_0x18f72f['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x59092e&&_0x18f72f['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x59092e&&_0x18f72f['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x59092e&&_0x18f72f['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x59092e&&_0x18f72f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x59cd40){const _0x3abd0b=this['editor'],_0x4e59bb=new _0x59cd40(_0x3abd0b['locale']),_0x27a471=_0x3abd0b['commands']['get']('addCommentThread');return _0x4e59bb['set']({'label':E(_0x3abd0b['locale'],'Comment'),'icon':_0xe2ba73}),_0x4e59bb['bind']('isEnabled')['to'](_0x27a471),this['listenTo'](_0x4e59bb,'execute',()=>{_0x27a471['execute']();}),_0x4e59bb;}}class s extends _0x1b086d{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x25b46c){super(_0x25b46c),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x619f09,_0x44b7c4,_0x200037)=>{_0x200037?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xb05b20,_0x52c99e]of this['editor']['commands'])_0x52c99e['affectsData']&&'addCommentThread'!==_0xb05b20&&_0x52c99e['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x5f544a=this['editor']['editing']['view']['document'];this['listenTo'](_0x5f544a,'cut',_0x2d0036=>_0x2d0036['stop'](),{'priority':'highest'}),this['listenTo'](_0x5f544a,'clipboardInput',_0x4b7486=>_0x4b7486['stop'](),{'priority':'highest'}),this['listenTo'](_0x5f544a,'delete',_0x1ca49d=>_0x1ca49d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x180c2e,_0x5750de]of this['editor']['commands'])_0x5750de['affectsData']&&'addCommentThread'!==_0x180c2e&&_0x5750de['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 M extends _0xce78b4{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1fc0ec){super(_0x1fc0ec),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2d5e08=this['context']['plugins']['get'](O);this['listenTo'](_0x2d5e08,'_activateAnnotation',(_0x392d2d,_0x4a4f4c)=>{for(const _0x281457 of this['activeUIs']){const _0x5fa5c0=this['_uis']['get'](_0x281457);(0x0,this['uisData']['get'](_0x281457)['filter'])(_0x4a4f4c)&&_0x5fa5c0['setActiveAnnotation'](_0x4a4f4c);}}),this['listenTo'](_0x2d5e08,'_deactivateAllAnnotations',()=>{for(const _0x53795b of this['activeUIs']){this['_uis']['get'](_0x53795b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2d5e08['_visibleAnnotations'],'add',(_0x4cc9de,_0x244fc2)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x244fc2);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x6cb9cc){return this['activeUIs']['has'](_0x6cb9cc);}['activate'](_0x541f62,_0xbf9b4a=this['defaultFilter']){const _0x45d436=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x541f62))throw new _0x4835fd('annotationsuis-missing-ui',this,{'uiName':_0x541f62});this['isActive'](_0x541f62)&&this['deactivate'](_0x541f62),this['activeUIs']['add'](_0x541f62);const _0x245ae5=new _();!function({source:_0xe67f5d,target:_0x25bfbf,filter:_0x571c67}){for(const _0x236d52 of _0xe67f5d)_0x571c67(_0x236d52)&&_0x25bfbf['add'](_0x236d52);_0x25bfbf['listenTo'](_0xe67f5d,'add',(_0x48c8ba,_0x5b6abe)=>{_0x571c67(_0x5b6abe)&&_0x25bfbf['add'](_0x5b6abe);}),_0x25bfbf['listenTo'](_0xe67f5d,'remove',(_0x210f15,_0x4fcb3a)=>{_0x25bfbf['has'](_0x4fcb3a)&&_0x25bfbf['remove'](_0x4fcb3a);});}({'source':_0x45d436['_visibleAnnotations'],'target':_0x245ae5,'filter':_0xbf9b4a}),this['uisData']['set'](_0x541f62,{'collection':_0x245ae5,'filter':_0xbf9b4a});const _0x3b9b1a=this['_uis']['get'](_0x541f62);_0x3b9b1a['attach'](_0x245ae5),this['listenTo'](_0x3b9b1a,'change:activeAnnotation',(_0x39c5e9,_0x5c815a,_0x1383e5,_0x245243)=>{_0x245243&&_0x45d436['_removeActiveAnnotation'](_0x245243),_0x1383e5&&_0x45d436['_addActiveAnnotation'](_0x1383e5);});}['deactivate'](_0x44ad38){if(this['activeUIs']['delete'](_0x44ad38),!this['_uis']['has'](_0x44ad38))throw new _0x4835fd('annotationsuis-missing-ui',this,{'uiName':_0x44ad38});const _0x3fe6e9=this['_uis']['get'](_0x44ad38);_0x3fe6e9['detach'](),this['stopListening'](_0x3fe6e9),this['uisData']['get'](_0x44ad38)['collection']['destroy'](),this['uisData']['delete'](_0x44ad38);}['switchTo'](_0x399fec){if(!this['_uis']['has'](_0x399fec))throw new _0x4835fd('annotationsuis-missing-ui',this,{'uiName':_0x399fec});const _0x572e48=this['context']['plugins']['get'](O),_0x19a543=Array['from'](_0x572e48['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x399fec);const _0x18f8e2=this['_uis']['get'](_0x399fec);_0x18f8e2['setActiveAnnotation'](_0x19a543),_0x18f8e2['_setSelectedAnnotations']&&_0x19a543&&_0x18f8e2['_setSelectedAnnotations']([_0x19a543]);}['deactivateAll'](){for(const _0x3b08a5 of this['activeUIs'])this['deactivate'](_0x3b08a5);}['register'](_0x3310d9,_0x509c41){if(this['_uis']['has'](_0x3310d9))throw new _0x4835fd('annotationsuis-register-already-registered');if('function'!=typeof _0x509c41['attach']||'function'!=typeof _0x509c41['detach']||'function'!=typeof _0x509c41['setActiveAnnotation'])throw new _0x4835fd('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3310d9,_0x509c41);}['refilterAnnotations'](){const _0x5c732e=this['context']['plugins']['get'](O)['collection'],_0x5e5298=new Map(),_0x5b31dd=Array['from'](this['activeUIs']);for(const _0x4cb518 of this['activeUIs']){const _0x4f713d=this['uisData']['get'](_0x4cb518)['collection'];for(const _0x5ca328 of _0x4f713d)_0x5e5298['set'](_0x5ca328,_0x4cb518);}for(const _0x55a0a5 of _0x5c732e){const _0x2d6a6b=_0x5e5298['get'](_0x55a0a5);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x55a0a5);const _0x24d0f3=_0x5b31dd['find'](_0x12f464=>this['uisData']['get'](_0x12f464)['filter'](_0x55a0a5));_0x2d6a6b!==_0x24d0f3&&(_0x2d6a6b&&this['uisData']['get'](_0x2d6a6b)['collection']['remove'](_0x55a0a5),_0x24d0f3&&this['uisData']['get'](_0x24d0f3)['collection']['add'](_0x55a0a5));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x37a84a){const _0x410839=[];for(const _0x5d97bd of this['activeUIs']){(0x0,this['uisData']['get'](_0x5d97bd)['filter'])(_0x37a84a)&&_0x410839['push'](_0x5d97bd);}if(_0x410839['length']>0x1)throw new _0x4835fd('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x410839,'annotationType':_0x37a84a['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x12f96e){super(_0x12f96e);const _0x209451=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 _0x403ade(),this['focusCycler']=new _0x13347f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x209451['to']('class')],'style':{'minHeight':_0x209451['to']('minHeight',_0x446e82=>'number'==typeof _0x446e82?pi(_0x446e82+0xa):null)},'dir':_0x12f96e['uiLanguageDirection'],'role':'application','aria-label':E(_0x12f96e,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x12f96e,'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',_0x3551fa=>{this['_updateItemPositionInFocusables'](_0x3551fa['source']);}),this['list']['forEach'](_0x5d854b=>{this['focusTracker']['add'](_0x5d854b['element']),this['_updateItemPositionInFocusables'](_0x5d854b);}),this['list']['on']('change',(_0x2ca839,_0x370d2c)=>{for(const _0x2e3722 of _0x370d2c['removed'])this['focusTracker']['remove'](_0x2e3722['element']),this['focusables']['remove'](_0x2e3722);for(const _0x4e6f9c of _0x370d2c['added'])this['focusTracker']['add'](_0x4e6f9c['element']),this['_updateItemPositionInFocusables'](_0x4e6f9c);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5a08a9){const _0x520ed5=this['focusables']['getIndex'](_0x5a08a9);let _0x47736f,_0x2ee43d;for(const _0x5cf720 of this['focusables'])if(_0x5a08a9['top']<_0x5cf720['top']){_0x47736f=_0x5cf720;break;}if(_0x2ee43d=_0x47736f?this['focusables']['getIndex'](_0x47736f):this['focusables']['length'],-0x1!==_0x520ed5){if(_0x520ed5===_0x2ee43d-0x1)return;this['focusables']['remove'](_0x5a08a9),_0x2ee43d=_0x47736f?this['focusables']['getIndex'](_0x47736f):this['focusables']['length'];}this['focusables']['add'](_0x5a08a9,_0x2ee43d);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x446858){super(_0x446858),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x53613a,_0x5455cf)=>_0x53613a+_0x5455cf),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x23beaf=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x23beaf['to']('isAnimationDisabled',_0x42a42d=>_0x42a42d?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x23beaf['to']('top',_0x2267a8=>Ht(_0x2267a8))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1d7235=this['element']['clientHeight'];_0x1d7235&&(this['height']=_0x1d7235);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xce78b4{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7dc01a){super(_0x7dc01a),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 _0x32e451=this['context']['config']['get']('sidebar.container');_0x32e451&&this['setContainer'](_0x32e451);}['setContainer'](_0x2b11e0){if(!y(_0x2b11e0))throw new _0x4835fd('sidebar-setcontainer-invalid-element');this['container']=_0x2b11e0;}['_attachToContainer']({viewClass:_0x1c41a8='',spaceBetweenItems:_0x33a6af=0x19}={}){if(!y(this['container']))throw new _0x4835fd('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1c41a8,this['_spaceBetweenItems']=_0x33a6af;}['rearrange']({removedAnnotation:_0x3a1609,previousAnnotation:_0x5649e2,nextAnnotation:_0x1cac54}){const _0x481550=this['getSidebarItemView'](_0x3a1609);this['view']['list']['remove'](_0x481550),this['_destroySidebarItemView'](_0x3a1609),_0x5649e2&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5649e2)),_0x1cac54&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1cac54)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3d7aae,activatedAnnotation:_0x1b402f,disableAnimationOnActivatedAnnotation:_0x54a274}){if(this['_activeAnnotation']=_0x1b402f,_0x3d7aae){_0x3d7aae['isActive']=!0x1;const _0x5a2035=this['getSidebarItemView'](_0x3d7aae);_0x5a2035&&_0x54a274&&(_0x5a2035['isAnimationDisabled']=!0x1);}if(_0x1b402f){const _0x2ff551=this['getSidebarItemView'](_0x1b402f);_0x2ff551&&(_0x1b402f['isActive']=!0x0,_0x54a274&&(_0x2ff551['isAnimationDisabled']=!0x0,_0x2ff551['top']+=0x1),this['_alignToTargetRect'](_0x2ff551));}}['_detachFromContainer'](_0x4af924){if(this['view']['element']['remove'](),_0x4af924){for(const _0x3ec115 of _0x4af924)this['_destroySidebarItemView'](_0x3ec115);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x415ea1,_0x2158e9){_0x2158e9||(_0x2158e9=_0x415ea1['view']);const _0x410f0c=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x410f0c,_0x415ea1),this['_annotationToSidebarItemView']['set'](_0x415ea1,_0x410f0c),_0x410f0c['content']['add'](_0x2158e9),this['listenTo'](_0x415ea1['view'],'change:targetRect',(_0x16153c,_0x26a80f,_0x51e0b9)=>{const _0x44b6f6=this['_getTargetTop'](_0x415ea1,_0x51e0b9);_0x410f0c['_targetTop']!=_0x44b6f6&&(_0x410f0c['_targetTop']=_0x44b6f6,this['_setItemTop'](_0x410f0c,_0x44b6f6));}),this['listenTo'](_0x410f0c,'change:top',()=>{this['_recalculate'](_0x410f0c,'top');}),this['listenTo'](_0x410f0c,'change:bottom',()=>{this['_recalculate'](_0x410f0c,'bottom');}),this['_alignToTargetRect'](_0x410f0c);const _0xd25d64=this['_getItemBefore'](_0x410f0c);if(_0xd25d64)this['_alignAfterItem'](_0xd25d64,_0x410f0c)||this['_alignToTargetRect'](_0x410f0c);else this['_alignToTargetRect'](_0x410f0c);return this['_updateLastItem'](),this['view']['list']['add'](_0x410f0c),_0x410f0c;}['_alignForTopChange'](_0x1b754e){if(!_0x1b754e['content']['length'])return;const _0x43deb6=this['_getItemBefore'](_0x1b754e);if(!_0x43deb6)return;const _0x4bde51=this['_sidebarItemViewToAnnotation']['get'](_0x43deb6),_0x35274a=this['_activeAnnotation'];_0x35274a&&_0x35274a===_0x4bde51?this['_alignAfterItem'](_0x43deb6,_0x1b754e):this['_alignBeforeItem'](_0x1b754e,_0x43deb6);}['_alignForBottomChange'](_0x58f474){if(!_0x58f474['content']['length'])return;const _0x1f4e3f=this['_getItemAfter'](_0x58f474);if(!_0x1f4e3f)return;const _0x48cf2b=this['_sidebarItemViewToAnnotation']['get'](_0x1f4e3f),_0x36b994=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x13098a=this['_activeAnnotation'];_0x13098a&&_0x13098a===_0x48cf2b&&_0x36b994?(this['_alignBeforeItem'](_0x1f4e3f,_0x58f474),this['_alignAfterItem'](_0x58f474,_0x1f4e3f)):_0x13098a&&_0x13098a===_0x48cf2b?this['_alignBeforeItem'](_0x1f4e3f,_0x58f474):this['_alignAfterItem'](_0x58f474,_0x1f4e3f);}['_recalculate'](_0x2ba13b,_0x2f77f6){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1c3ec2,changedProp:_0x2bc292}of this['_recalculateBuffer'])'top'===_0x2bc292?this['_alignForTopChange'](_0x1c3ec2):this['_alignForBottomChange'](_0x1c3ec2);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2ba13b,'changedProp':_0x2f77f6});}['getSidebarItemView'](_0x1728c0){return this['_annotationToSidebarItemView']['get'](_0x1728c0);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5ddbe2){const _0xb0af2b=this['getSidebarItemView'](_0x5ddbe2);this['stopListening'](_0xb0af2b),this['stopListening'](_0x5ddbe2['view']),_0xb0af2b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5ddbe2),this['_sidebarItemViewToAnnotation']['delete'](_0xb0af2b);}['_createSidebarView'](){const _0x425cbd=new F(this['context']['locale']);return _0x425cbd['render'](),this['on']('change:_lastItem',(_0x19037c,_0x2c0959,_0x1ba00b,_0x5832fc)=>{_0x5832fc&&_0x425cbd['unbind']('minHeight'),_0x1ba00b?_0x425cbd['bind']('minHeight')['to'](_0x1ba00b,'bottom'):_0x425cbd['minHeight']=null;}),_0x425cbd;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x56de7f){const _0x54cc6f=this['_sidebarItemViewToAnnotation']['get'](_0x56de7f),_0x329779=_0x54cc6f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x54cc6f)-0x1);return _0x329779&&this['getSidebarItemView'](_0x329779)||null;}['_getItemAfter'](_0x31de1b){const _0x358c5c=this['_sidebarItemViewToAnnotation']['get'](_0x31de1b),_0x5a26ec=_0x358c5c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x358c5c)+0x1);return _0x5a26ec&&this['getSidebarItemView'](_0x5a26ec)||null;}['_alignBeforeItem'](_0x2ac375,_0x2a7130){_0x2ac375['updateHeight']();const _0x4a405d=R(_0x2a7130['bottom']+this['_spaceBetweenItems'],_0x2ac375['top']);return!!_0x4a405d&&(this['_setItemTop'](_0x2a7130,_0x2a7130['top']-_0x4a405d),!0x0);}['_alignAfterItem'](_0x167439,_0x3a6e7e){_0x167439['updateHeight']();const _0x41e200=R(_0x167439['bottom']+this['_spaceBetweenItems'],_0x3a6e7e['top']);return!!_0x41e200&&(this['_setItemTop'](_0x3a6e7e,_0x3a6e7e['top']+_0x41e200,!0x1),!0x0);}['_alignToTargetRect'](_0x4d1453){const _0x38edc6=this['_sidebarItemViewToAnnotation']['get'](_0x4d1453);if(!_0x38edc6||!_0x38edc6['target']||!_0x38edc6['targetRect'])return;const _0x207be9=this['_getTargetTop'](_0x38edc6,_0x38edc6['targetRect']);this['_setItemTop'](_0x4d1453,_0x207be9);}['_getTargetTop'](_0x51f039,_0x1db46f){if(null===_0x1db46f)return 0x0;if(_0x51f039['target']instanceof _0x56eef8)return _0x1db46f['top'];{const _0x3ae313=new _0x56eef8(this['view']['element'])['top'];return _0x1db46f['top']-_0x3ae313;}}['_setItemTop'](_0x2789a4,_0x2e32a5,_0x486829=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x486829&&(_0x2e32a5=Math['max'](_0x2e32a5,this['_getMaxAvailableTop'](_0x2789a4))),_0x2789a4['top']=_0x2e32a5;}['_getMaxAvailableTop'](_0x58f7ec){let _0x2ee93c=this['_getItemBefore'](_0x58f7ec),_0x2dfd92=0x0;for(;_0x2ee93c;)_0x2ee93c['updateHeight'](),_0x2dfd92+=this['_spaceBetweenItems']+_0x2ee93c['height'],_0x2ee93c=this['_getItemBefore'](_0x2ee93c);return _0x2dfd92;}}function R(_0x354fa8,_0x182067){return Math['max'](_0x354fa8-_0x182067,0x0);}function y(_0x53ea04){return null!==_0x53ea04&&'object'==typeof _0x53ea04&&0x1===_0x53ea04['nodeType'];}class e extends _0xce78b4{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4bfb8a){super(_0x4bfb8a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1a8bd1(),this['_refreshPositioningDebounced']=_0x3f14f3(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0xf59ab3=this['context']['plugins']['get'](M),_0x223abd=this['context']['plugins']['get'](z);_0xf59ab3['register']('wideSidebar',this),_0x223abd['container']&&_0xf59ab3['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5c7030){if(_0x5c7030===this['activeAnnotation'])return;const _0x320fb7=this['context']['plugins']['get'](z);_0x320fb7['_activeAnnotation']=_0x5c7030;const _0x1acad3=this['activeAnnotation'];_0x320fb7['refresh']({'blurredAnnotation':_0x1acad3,'activatedAnnotation':_0x5c7030}),this['activeAnnotation']=_0x5c7030;}['attach'](_0x4e4a64){this['annotations']=_0x4e4a64;const _0x2f5851=this['context']['plugins']['get'](z);if(_0x2f5851['_annotations']=_0x4e4a64,this['isAttached'])throw new _0x4835fd('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2f5851,'set:container',()=>{this['detach'](),this['listenTo'](_0x2f5851,'change:container',_0xcb8411=>{_0xcb8411['off'](),this['attach'](_0x4e4a64);});}),_0x2f5851['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x43badd=_0x14ba6d=>{_0x14ba6d['updateTargetRect'](),_0x2f5851['addAnnotation'](_0x14ba6d);};for(const _0x31ae3c of _0x4e4a64)_0x43badd(_0x31ae3c);this['listenTo'](_0x4e4a64,'add',(_0x2bb555,_0x1a5558)=>{_0x43badd(_0x1a5558);}),this['listenTo'](_0x4e4a64,'remove',(_0x318290,_0x5e891d,_0x5377e2)=>{_0x2f5851['rearrange']({'removedAnnotation':_0x5e891d,'previousAnnotation':_0x4e4a64['get'](_0x5377e2-0x1),'nextAnnotation':_0x4e4a64['get'](_0x5377e2+0x1)}),_0x5e891d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4e4a64,'focus',(_0x1571f1,_0x3d6837)=>{this['setActiveAnnotation'](_0x3d6837);}),this['listenTo'](_0x4e4a64,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3f85bd=this['context']instanceof _0x1b9b18?this['context']['editors']:new _0x1a8bd1([this['context']]);for(const _0x4d8fb3 of _0x3f85bd)this['_integrateWithEditorAnnotations'](_0x4d8fb3);this['listenTo'](_0x3f85bd,'add',(_0x3a0b89,_0x20d34a)=>{this['listenTo'](_0x20d34a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x20d34a);});}),this['listenTo'](_0x3f85bd,'remove',(_0x430967,_0xa714c1)=>{_0xa714c1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xa714c1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4835fd('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4600df=this['context']['plugins']['get'](z);_0x4600df['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4600df),this['stopListening'](this['annotations']),this['context']instanceof _0x1b9b18&&this['stopListening'](this['context']['editors']);for(const _0x4fbf9a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4fbf9a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x200d9b){if(!_0x200d9b['plugins']['has']('EditorAnnotations'))return;const _0x5d9b60=_0x200d9b['plugins']['get']('EditorAnnotations'),_0x4909d1=()=>{const _0x246eb1=_0x5d9b60['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x246eb1[0x0]||null);};this['listenTo'](_0x5d9b60,'refresh',_0x4909d1),this['listenTo'](_0x5d9b60,'blur',(_0x1f1bef,{isAnnotationTracked:_0x67970})=>{this['activeAnnotation']&&_0x67970(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5d9b60,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x376bd9=>{_0x5d9b60['hasDomSelection']()&&(_0x4909d1(),_0x376bd9['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5d9b60);}['_destroyEditorAnnotationsIntegration'](_0x5183bf){this['stopListening'](_0x5183bf),this['_editorAnnotations']['remove'](_0x5183bf);}}class C extends _0x5bb170{['counterView'];constructor(_0x254015){super(_0x254015);const _0x3ee365=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x69b4d5,_0x2dbe9f)=>_0x69b4d5?'...':_0x2dbe9f['toString']()),this['set']('annotationType',''),this['icon']=_0xe2ba73,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3ee365['to']('annotationType',_0x2eabf3=>'ck-annotation-counter__badge--'+_0x2eabf3),_0x3ee365['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3ee365['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xce78b4{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x256f11){super(_0x256f11),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x5e3726),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1a8bd1(),this['_refreshPositioningDebounced']=_0x3f14f3(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x26f4b1(this['context']['locale']),this['balloonPanelView']=new _0x3efa23(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x43cd4e){this['annotations']=_0x43cd4e;const _0x1d6ffc=this['context']['plugins']['get'](z),_0x1afa7a=this['balloonPanelView'];if(_0x1d6ffc['_annotations']=_0x43cd4e,this['isAttached'])throw new _0x4835fd('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1d6ffc,'set:container',()=>{this['detach'](),this['listenTo'](_0x1d6ffc,'change:container',_0x570bee=>{_0x570bee['off'](),this['attach'](_0x43cd4e);});}),_0x1d6ffc['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x37eb11=_0x4da349=>{const _0x5364ad=new C(this['context']['locale']);_0x1d6ffc['addAnnotation'](_0x4da349,_0x5364ad),this['_annotationToNarrowView']['set'](_0x4da349,_0x5364ad),_0x5364ad['bind']('isDirty','annotationType','number')['to'](_0x4da349['view'],'isDirty','type','length'),_0x5364ad['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1afa7a['content']['first']!==_0x4da349['view']?(this['_showBalloon'](_0x4da349),_0x4da349['view']['element']['focus'](),this['setActiveAnnotation'](_0x4da349)):this['setActiveAnnotation'](null);});};for(const _0x3c1edc of _0x43cd4e)_0x37eb11(_0x3c1edc);this['listenTo'](_0x43cd4e,'add',(_0x7a3be,_0x1e35b3)=>{_0x37eb11(_0x1e35b3);}),this['listenTo'](_0x43cd4e,'remove',(_0x4497bc,_0x3a2b0d,_0x2c7369)=>{this['_annotationToNarrowView']['get'](_0x3a2b0d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3a2b0d),_0x1d6ffc['rearrange']({'removedAnnotation':_0x3a2b0d,'previousAnnotation':_0x43cd4e['get'](_0x2c7369-0x1),'nextAnnotation':_0x43cd4e['get'](_0x2c7369+0x1)}),_0x3a2b0d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x43cd4e,'focus',(_0x1518e6,_0x275d09)=>{this['setActiveAnnotation'](_0x275d09);}),this['listenTo'](_0x43cd4e,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2521f0,_0xd27d9)=>{_0xd27d9['keyCode']===_0x22c8f9['esc']&&_0x1afa7a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1afa7a['content']['first']),this['_hideBalloon'](),_0xd27d9['stopPropagation'](),_0xd27d9['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x354d4e,_0x52efd8)=>{const _0x5859e1=_0x52efd8['target'];_0x1afa7a['isVisible']&&_0x1afa7a['element']['contains'](_0x5859e1)||_0x1d6ffc['view']['element']['contains'](_0x5859e1)||_0x354d4e['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x247fe5=>_0x247fe5['contains'](_0x5859e1))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1e8218=this['context']instanceof _0x1b9b18?this['context']['editors']:new _0x1a8bd1([this['context']]);for(const _0x1556db of _0x1e8218)this['_integrateWithEditorAnnotations'](_0x1556db);this['listenTo'](_0x1e8218,'add',(_0x4d1afe,_0x3fbf03)=>{this['listenTo'](_0x3fbf03,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3fbf03);});}),this['listenTo'](_0x1e8218,'remove',(_0x250400,_0x50a367)=>{_0x50a367['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x50a367['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4f09d3){if(_0x4f09d3===this['activeAnnotation'])return;const _0x4b4e2f=this['context']['plugins']['get'](z);if(_0x4b4e2f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4f09d3,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4f09d3)_0x4b4e2f['getSidebarItemView'](_0x4f09d3)?this['_showBalloon'](_0x4f09d3):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4f09d3;}['detach'](){if(!this['isAttached'])throw new _0x4835fd('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xd00def=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x38bbe0=>_0x38bbe0['destroy']()),this['_annotationToNarrowView']['clear'](),_0xd00def['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1b9b18&&this['stopListening'](this['context']['editors']);for(const _0x3a2b8b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3a2b8b);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'](_0x115e8){if(!_0x115e8['plugins']['has']('EditorAnnotations'))return;const _0x570c70=_0x115e8['plugins']['get']('EditorAnnotations'),_0x36aeb7=this['context']['plugins']['get'](z),_0x37d3a7=this['annotations'],_0x7fac5a=this['balloonPanelView'],_0x5f210e=()=>{const _0x543c15=_0x570c70['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x543c15),this['setActiveAnnotation'](_0x543c15[0x0]||null);};this['listenTo'](_0x570c70,'refresh',_0x5f210e),this['listenTo'](_0x570c70,'blur',(_0x16d33f,{isAnnotationTracked:_0x481236})=>{this['activeAnnotation']&&_0x481236(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x570c70,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x37d3a7,'blur',_0x108297=>{_0x570c70['hasDomSelection']()&&_0x108297['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2197b7,_0x5b80a9)=>{const _0x617f27=_0x5b80a9['target'];_0x7fac5a['isVisible']&&_0x7fac5a['element']['contains'](_0x617f27)||_0x36aeb7['view']['element']['contains'](_0x617f27)||this['activeAnnotation']&&_0x570c70['hasDomSelection']()&&(_0x5f210e(),_0x2197b7['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x570c70);}['_destroyEditorAnnotationsIntegration'](_0xe005fa){_0xe005fa&&(this['stopListening'](_0xe005fa),this['_editorAnnotations']['remove'](_0xe005fa));}['_setSelectedAnnotations'](_0xbc5d6b){for(const _0xabcbf8 of this['_selectedAnnotations'])_0xbc5d6b['includes'](_0xabcbf8)||this['_manuallyClosedAnnotationViews']['delete'](_0xabcbf8['view']);this['_selectedAnnotations']=_0xbc5d6b;}['_refreshPositioning'](){const _0x173b7a=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x173b7a['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2a4511){if(this['_manuallyClosedAnnotationViews']['has'](_0x2a4511['view']))return;const _0x13e8e6=this['balloonPanelView']['content']['first'];_0x13e8e6!==_0x2a4511['view']?(_0x13e8e6&&this['_detachListeners'](_0x13e8e6),this['_attachListeners'](_0x2a4511['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2a4511['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x283859=this['balloonPanelView']['content']['first'],_0xa63e8a=_0x283859&&this['annotations']['getByView'](_0x283859);if(!_0xa63e8a||!this['_annotationToNarrowView']['has'](_0xa63e8a))return;const _0x54fca2=this['_annotationToNarrowView']['get'](_0xa63e8a)['element'],_0x30d737=(function(){const _0x236b86=_0x3efa23['defaultPositions'];return[_0x236b86['southArrowNorthEast'],_0x236b86['northArrowSouthEast'],_0x236b86['southArrowNorth'],_0x236b86['northArrowSouth'],_0x236b86['southArrowNorthWest'],_0x236b86['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x54fca2,'positions':_0x30d737});}['_hideBalloon'](){const _0x1ba1e9=this['balloonPanelView'],_0x7d19f9=_0x1ba1e9['content']['first'];_0x7d19f9&&(this['_detachListeners'](_0x7d19f9),_0x1ba1e9['unpin'](),_0x1ba1e9['content']['clear']());}['_attachListeners'](_0x818f1){this['listenTo'](_0x818f1,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x818f1,'Esc',(_0x5b98bf,_0x1b7f65)=>{this['_manuallyClosedAnnotationViews']['add'](_0x818f1),this['_hideBalloon'](),_0x1b7f65();});}['_detachListeners'](_0x53720e){this['stopListening'](_0x53720e);}}class c extends _0x1b086d{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x34b239,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ad164){super(_0x3ad164),_0x3ad164['editing']['view']['addObserver'](_0x11725f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3ad164['plugins']['get'](_0x34b239),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x19737a=this['editor']['plugins']['get'](M);_0x19737a['context']===this['editor']&&(_0x19737a['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x213eb9,_0xc2d0f1)=>{const _0x10a9ff=this['_balloon'];if(this['isAttached']&&_0x10a9ff['visibleView']){const _0x1413f6=this['annotations']['getByView'](_0x10a9ff['visibleView']);_0x1413f6&&this['_closeAnnotation'](_0x1413f6),_0xc2d0f1();}}));}['afterInit'](){const _0x16df6c=this['editor']['plugins']['get'](M);_0x16df6c['context']===this['editor']&&(_0x16df6c['hasActive']()||_0x16df6c['switchTo']('inline'));}['setActiveAnnotation'](_0x2fa034){_0x2fa034!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2fa034&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2fa034)&&this['_addAnnotationToBalloon'](_0x2fa034,!0x0),_0x2fa034['isActive']=!0x0),_0x2fa034||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2fa034);}['attach'](_0x5b7119){this['annotations']=_0x5b7119;const _0x36044f=this['editor']['plugins']['get'](M),_0xe388=this['_balloon'];if(this['isAttached'])throw new _0x4835fd('inlineannotations-attach-already-attached',this);if(_0x36044f['context']!==this['editor'])throw new _0x4835fd('inlineannotations-not-allowed-with-context',this);const _0x3e98bf=this['editor']['plugins']['get'](P);this['listenTo'](_0x3e98bf,'refresh',()=>{const _0x1449dd=_0x3e98bf['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2f9cff,_0xda5eb8;!this['_forceRefresh']&&(_0x2f9cff=_0x1449dd,_0xda5eb8=this['_selectedAnnotations'],_0x2f9cff['length']===_0xda5eb8['length']&&_0x2f9cff['every'](_0xa8262e=>_0xda5eb8['includes'](_0xa8262e)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1449dd),this['setActiveAnnotation'](_0x1449dd[0x0]||null));}),this['listenTo'](_0x3e98bf,'blur',(_0x20fc5d,{isAnnotationTracked:_0x436701})=>{this['activeAnnotation']&&_0x436701(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1891d7,_0x5277fa,_0x571895)=>{_0x571895||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5b7119,'remove',(_0x4b9719,_0x5b7211)=>{this['_removeAnnotationFromBalloon'](_0x5b7211),_0x5b7211===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe388,'change:visibleView',(_0x56466f,_0x1195ae,_0x4a90c8,_0x164091)=>{_0x164091&&this['stopListening'](_0x164091);const _0x2eb40e=_0x5b7119['getByView'](_0x4a90c8);_0x4a90c8&&_0x2eb40e&&(this['listenTo'](_0x4a90c8,'change:height',()=>{_0xe388['updatePosition']();}),this['listenTo'](_0x4a90c8,'Esc',()=>{this['_closeAnnotation'](_0x2eb40e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2eb40e&&this['setActiveAnnotation'](_0x2eb40e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xe388['visibleView']&&(_0x5b7119['getByView'](_0xe388['visibleView'])&&_0xe388['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 _0x4835fd('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2a1784 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2a1784);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x1279cf){for(const _0x3caa63 of this['_selectedAnnotations'])_0x1279cf['includes'](_0x3caa63)||this['_manuallyClosed']['delete'](_0x3caa63);for(const _0x591378 of this['annotations'])_0x1279cf['includes'](_0x591378)||this['_removeAnnotationFromBalloon'](_0x591378);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x38795f of _0x1279cf)this['_addAnnotationToBalloon'](_0x38795f);}this['_selectedAnnotations']=_0x1279cf;}['_addAnnotationToBalloon'](_0x4edabb,_0x933b87=!0x1){this['_manuallyClosed']['has'](_0x4edabb)||(this['_addedAnnotations']['has'](_0x4edabb)||this['_balloon']['hasView'](_0x4edabb['view'])||(this['_addedAnnotations']['add'](_0x4edabb),this['_balloon']['add']({'stackId':_0x4edabb['view']['id'],'view':_0x4edabb['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4edabb)}})),_0x933b87&&this['_balloon']['showStack'](_0x4edabb['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5612cf){const _0x5921d1=_0x5612cf['target'],_0x42c6a3=this['editor']['editing']['view'],_0x4f2186=_0x42c6a3['document']['selection']['getFirstRange'](),_0x288628=_0x42c6a3['domConverter']['viewRangeToDom'](_0x4f2186);if(_0x288628['collapse'](!0x0),_0x5921d1){if(_0x5921d1 instanceof _0x56eef8)return _0x5921d1;let _0xa92ee2=[];for(const _0x240375 of _0x5921d1)_0xa92ee2['push'](...(_0x2b4a6d=_0x240375['getClientRects'](),Array['from'](_0x2b4a6d)['map'](DOMRect['fromRect'])));_0xa92ee2=function(_0x59ff38){const _0x27e45c=[];let _0x740b9f=_0x59ff38[0x0];for(let _0x3cf8ac=0x1;_0x3cf8ac<_0x59ff38['length'];_0x3cf8ac++)B(_0x740b9f,_0x59ff38[_0x3cf8ac])?_0x740b9f['width']+=_0x59ff38[_0x3cf8ac]['width']:(_0x27e45c['push'](_0x740b9f),_0x740b9f=_0x59ff38[_0x3cf8ac]);return _0x27e45c['push'](_0x740b9f),_0x27e45c;}(_0xa92ee2);const _0x5a6442=_0x288628['getBoundingClientRect']();return _0xa92ee2['find'](_0x142b66=>_0x142b66['top']<=_0x5a6442['top']&&_0x142b66['bottom']>=_0x5a6442['bottom']&&_0x142b66['left']<=_0x5a6442['left']&&_0x142b66['right']>=_0x5a6442['right'])||_0xa92ee2[0x0];}var _0x2b4a6d;return _0x5612cf['targetRect']||_0x288628;}['_removeAnnotationFromBalloon'](_0x49861c){this['_addedAnnotations']['has'](_0x49861c)&&this['_balloon']['hasView'](_0x49861c['view'])&&(this['_addedAnnotations']['delete'](_0x49861c),this['_balloon']['remove'](_0x49861c['view']));}['_closeAnnotation'](_0xd82eb7){this['_manuallyClosed']['add'](_0xd82eb7),this['_removeAnnotationFromBalloon'](_0xd82eb7);}}function B(_0x2f3801,_0x307ff2){return _0x2f3801['top']===_0x307ff2['top']&&_0x2f3801['bottom']===_0x307ff2['bottom']&&_0x2f3801['right']===_0x307ff2['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4cbd3c,_0x1ad9de){super(_0x4cbd3c),this['set']('isEmpty',!_0x1ad9de['length']),this['focusTracker']=new _0x403ade(),this['_annotationViews']=_0x1ad9de,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x13347f({'focusables':_0x1ad9de,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1ad9de,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1ad9de,'remove',(_0x2799ec,_0x115515)=>{_0x115515['isActive']&&this['focus'](),_0x1ad9de['length']||(this['isEmpty']=!0x0);});const _0x33e67e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x4cbd3c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1ad9de},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x33e67e['if']('isEmpty','ck-hidden',_0x353c39=>!_0x353c39)]},'children':[{'text':E(_0x4cbd3c,'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 _0x3b655c of this['_annotationViews'])this['focusTracker']['add'](_0x3b655c['element']);this['_annotationViews']['on']('change',(_0x268041,{added:_0x58d9dc,removed:_0x23c1a5})=>{for(const _0x39a5ad of _0x58d9dc)this['focusTracker']['add'](_0x39a5ad['element']);for(const _0x2c9871 of _0x23c1a5)this['focusTracker']['remove'](_0x2c9871['element']);});}}class f extends _0xce78b4{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x2a9aef){super(_0x2a9aef),this['archivedThreads']=new _0x1a8bd1();}['init'](){const _0x560c80=this['context'],_0x379d1b=_0x560c80['plugins']['get'](o),_0x18aa82=_0x560c80['plugins']['get'](O);this['listenTo'](_0x379d1b,'addCommentThread',(_0x59ecf5,{threadId:_0x1440b1})=>{const _0x1f9f71=_0x379d1b['getCommentThread'](_0x1440b1);_0x1f9f71['archivedAt']&&this['archivedThreads']['add'](_0x1f9f71,this['_calculatePosition'](_0x1f9f71['archivedAt'])),this['listenTo'](_0x1f9f71,'change:archivedAt',(_0x4015a9,_0x15fe04,_0x3332d0)=>{_0x3332d0?this['archivedThreads']['has'](_0x1f9f71)||this['archivedThreads']['add'](_0x1f9f71,this['_calculatePosition'](_0x1f9f71['archivedAt'])):this['archivedThreads']['has'](_0x1f9f71)&&this['archivedThreads']['remove'](_0x1f9f71);});}),this['listenTo'](_0x379d1b,'removeCommentThread',(_0x488977,{threadId:_0x16cdff})=>{const _0x44172c=_0x379d1b['getCommentThread'](_0x16cdff);this['stopListening'](_0x44172c),this['archivedThreads']['has'](_0x44172c)&&this['archivedThreads']['remove'](_0x44172c);},{'priority':'highest'}),this['listenTo'](_0x18aa82['collection'],'focus',(_0x547d3c,_0xc69c45)=>{_0xc69c45['isVisible']||(_0xc69c45['isActive']=!0x0,_0x18aa82['activate'](_0xc69c45));});}['_calculatePosition'](_0x5652a2){const _0x9156e6=[...this['archivedThreads']]['findIndex'](_0x5c2a8d=>_0x5c2a8d['archivedAt']<_0x5652a2);return _0x9156e6>-0x1?_0x9156e6:this['archivedThreads']['length'];}}class a extends _0x1b086d{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x161003];}constructor(_0xcd02c4){super(_0xcd02c4),this['annotationViews']=new _0x1750d2(),this['_pendingThreads']=[];}['init'](){const _0x42bde6=this['editor'],_0x1bd03c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x42bde6['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5bb170,!0x0)),_0x42bde6['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x52f4f8=this['_createCommentsArchiveButton'](_0x4293e7);return _0x52f4f8['set']({'role':'menuitemcheckbox'}),_0x52f4f8;});const _0x106d25=_0x42bde6['plugins']['get'](f),_0x3d3f69=_0x42bde6['plugins']['get']('Annotations'),_0x21a5b4=_0x42bde6['plugins']['get']('CommentsRepository');_0x106d25['archivedThreads']['forEach'](_0x2b2dba=>{this['_handleNewThread'](_0x2b2dba);}),this['listenTo'](_0x106d25['archivedThreads'],'add',(_0x223a57,_0xf92ea1)=>{this['_handleNewThread'](_0xf92ea1);}),this['listenTo'](_0x3d3f69['collection'],'add',(_0x1109f6,_0x36aecc)=>{const _0x4fc612=this['_pendingThreads']['find'](_0x1ac310=>{const _0x33798a=_0x21a5b4['_threadToController']['get'](_0x1ac310);return _0x33798a&&_0x36aecc['innerView']===_0x33798a['view'];});if(_0x4fc612){const _0x4eb5b7=this['_calculatePosition'](_0x4fc612['archivedAt']);this['annotationViews']['add'](_0x36aecc['view'],_0x4eb5b7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4fc612),0x1);}}),this['listenTo'](_0x106d25['archivedThreads'],'remove',(_0x59eb47,_0x5ef927)=>{const _0xf3b149=_0x42bde6['config']['get']('collaboration.channelId');if(!_0xf3b149||_0x5ef927['channelId']===_0xf3b149){if(this['_pendingThreads']['includes'](_0x5ef927))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5ef927),0x1);else{const _0x29a4f0=_0x21a5b4['_threadToController']['get'](_0x5ef927),_0x10cc4c=_0x3d3f69['getByInnerView'](_0x29a4f0['view']);this['annotationViews']['remove'](_0x10cc4c['view']),this['stopListening'](_0x10cc4c['focusableElements']);}}}),this['listenTo'](_0x3d3f69['collection'],'add',(_0x188829,_0x478de6)=>{this['listenTo'](_0x478de6,'escape',_0x1bd03c);}),this['listenTo'](_0x3d3f69['collection'],'remove',(_0x2d9abc,_0x44931b)=>{this['stopListening'](_0x44931b,'escape',_0x1bd03c);});}['_handleNewThread'](_0x50a147){const _0x487719=this['editor']['plugins']['get']('CommentsRepository'),_0xfa7d8e=this['editor']['plugins']['get']('Annotations'),_0x227d9d=this['editor']['config']['get']('collaboration.channelId');if(!_0x227d9d||_0x50a147['channelId']===_0x227d9d){const _0x396c51=_0x487719['_threadToController']['get'](_0x50a147);if(!_0x396c51)return void this['_pendingThreads']['push'](_0x50a147);const _0x4db724=this['_calculatePosition'](_0x50a147['archivedAt']),_0x352e28=_0xfa7d8e['getByInnerView'](_0x396c51['view']);_0x352e28['isVisible']&&_0xfa7d8e['_visibleAnnotations']['remove'](_0x352e28),this['annotationViews']['add'](_0x352e28['view'],_0x4db724);}}['_calculatePosition'](_0x5ccbfa){const _0x4fd86b=this['editor']['config']['get']('collaboration.channelId'),_0x16ccae=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x375099=>_0x375099['channelId']===_0x4fd86b)['findIndex'](_0x50b15a=>_0x50b15a['archivedAt']<_0x5ccbfa);return _0x16ccae<0x0||_0x16ccae>this['annotationViews']['length']?this['annotationViews']['length']:_0x16ccae-0x1;}['_toggleDialog'](){const _0x4d80ae=this['editor'],_0x4c99ce=_0x4d80ae['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x4d80ae['locale'],this['annotationViews'])),'commentsArchive'===_0x4c99ce['id']?_0x4c99ce['hide']():_0x4c99ce['show']({'id':'commentsArchive','title':E(_0x4d80ae['locale'],'COMMENTS_ARCHIVE'),'icon':_0x18281e,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x437c6a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x108319,_0x2daedc=!0x1){const _0x214444=this['editor']['locale'],_0x6d369=this['editor']['plugins']['get']('Dialog'),_0x231512=new _0x108319(_0x214444);return _0x231512['bind']('isEnabled')['to'](this,'isEnabled'),_0x231512['bind']('isOn')['to'](_0x6d369,'id',_0x3a874e=>'commentsArchive'===_0x3a874e),_0x231512['set']({'label':E(_0x214444,'COMMENTS_ARCHIVE'),'icon':_0x18281e,'isToggleable':!0x0}),_0x2daedc&&(_0x231512['tooltip']=!0x0),this['listenTo'](_0x231512,'execute',()=>this['_toggleDialog']()),_0x231512;}['_hideDialogOnAnnotationEscape']=_0x1939bd=>{const _0x3e8404=_0x1939bd['source'];if(!this['annotationViews']['has'](_0x3e8404['view']))return;const _0x347a46=this['editor']['plugins']['get']('Dialog');_0x347a46['isOpen']&&'commentsArchive'===_0x347a46['id']&&(_0x347a46['hide'](),_0x1939bd['stop']());};}class p extends _0x1b086d{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x12638d,ContextPlugin as _0x52c4e0,PendingActions as ht,Command as _0x20aed2,Plugin as _0x5e77f7,Context as _0x22c4ee}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x31e545,uid as _0x544806,KeystrokeHandler as jt,FocusTracker as _0x3568ce,diff as _0x20a4d9,Collection as _0x4d1d56,Rect as _0x17a49c,CKEditorError as _0x27cf80,first as _0x2ffab9,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x448200,keyCodes as _0x18b9d9}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x357216,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x408ca6,trimHtml as _0xeb5a5c,LateFocusDropdownButtonView as _0x348650,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x204b59}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x3276fe}from'es-toolkit/compat';import{IconUndo as _0x1bb31f,IconCheck as _0x3c8c53,IconPencil as _0xac936e,IconRemoveComment as _0x552b7e,IconThreeVerticalDots as _0x33421c,IconAddComment as _0x44c03a,IconCommentsArchive as _0x2197b5}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0xcb58dc,ButtonView as _0x39c35a,ViewCollection as _0x1267d4,createDropdown as _0x5d2e39,ListView as _0x14a095,focusChildOnDropdownOpen as _0x34cb24,ListItemView as _0x499a89,MenuBarMenuListItemButtonView as _0x515eaf,BodyCollection as _0x43aafa,BalloonPanelView as _0x19188c,ContextualBalloon as _0x2e5d60,Dialog as _0x4a98a9,DialogViewPosition as _0x252338}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x5d01b8}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x437b54}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3e1204}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x31e545(){['model'];['view'];constructor(_0x26b5b6,_0x281eeb){super(),this['model']=_0x26b5b6,this['model']['_isAttached']=!0x0,this['view']=_0x281eeb,this['listenTo'](_0x281eeb,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x281eeb,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x281eeb,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x281eeb,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x281eeb,'addComment',(_0x1c30a9,_0x4a7721)=>this['addComment'](_0x4a7721)),this['listenTo'](_0x281eeb,'updateComment',(_0x1946c4,_0x286015,_0x520ffd)=>this['updateComment'](_0x286015,_0x520ffd)),this['listenTo'](_0x281eeb,'removeComment',(_0x2a60c8,_0x25e17a)=>this['removeComment'](_0x25e17a));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x25c197){this['model']['addComment']({'content':_0x25c197,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x32a193,_0x550797){this['model']['getComment'](_0x32a193)['update']({'content':_0x550797});}['removeComment'](_0x1102bb){this['model']['getComment'](_0x1102bb)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x4c0cd5,_0x34aef1,_0x22d432){const t=_0x4c0cd5['t'];switch(_0x34aef1){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'},_0x22d432);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'},_0x22d432);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'},_0x22d432);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'},_0x22d432);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x22d432);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'},_0x22d432);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'},_0x22d432);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'},_0x22d432);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 Ut extends Vt{['main'];['editable'];constructor(_0x1f7f4b,_0x2987e7){super(_0x1f7f4b);const _0x12a0fc=_0x544806();this['main']=this['createCollection'](),this['editable']=new $t(_0x1f7f4b,_0x2987e7,void 0x0,{'label':()=>E(_0x1f7f4b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1f7f4b['uiLanguageDirection'],'lang':_0x1f7f4b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x12a0fc},'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 Ot extends Rt{['view'];constructor(_0x425c30){super(_0x425c30),this['view']=new Ut(_0x425c30['locale'],_0x425c30['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2b544e=this['editor']['editing']['view'],_0x5a171d=this['view']['editable'],_0x3287c2=_0x2b544e['document']['getRoot']();_0x5a171d['name']=_0x3287c2['rootName'],this['view']['render']();const _0x3cacb6=_0x5a171d['element'];this['setEditableElement'](_0x5a171d['name'],_0x3cacb6),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2b544e['attachDomRoot'](_0x3cacb6),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x31e545(_0x12638d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x53ea12={}){function _0x4bbc74(_0x3d2fb3){return _0x3d2fb3['map'](_0x160a15=>String['fromCharCode'](_0x160a15))['join']('');}(_0x53ea12=Object['assign']({},_0x53ea12))['plugins']||(_0x53ea12['plugins']=Qt['defaultPlugins']),super(_0x53ea12),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4bbc74([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4bbc74([0x76,0x69,0x65,0x77])][_0x4bbc74([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4bbc74([0x61,0x75,0x74,0x6f]),this[_0x4bbc74([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4bbc74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4bbc74([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4bbc74([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4bbc74([0x6f,0x6b])});}['create'](){const _0x4be4c8=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4be4c8))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x408cf1=>{const _0x37a22d=this['model']['document']['getRoot'](),_0x26f0e6=_0x37a22d&&_0x37a22d['getChild'](_0x37a22d['childCount']-0x1);_0x408cf1['setSelection'](_0x26f0e6,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x49c62c=this['editing']['view'],_0x5c6fa2=_0x49c62c['document']['getRoot'](),_0x49c1c8=_0x5c6fa2['getChild'](0x0);_0x5c6fa2['childCount']>0x1||!_0x49c1c8||'p'!=_0x49c1c8['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x49c62c,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x49c1c8['placeholder']=this['placeholder']),Ft({'view':_0x49c62c,'element':_0x49c1c8,'keepOnFocus':!0x0}),this['placeholderElement']=_0x49c1c8);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x29d725,_0xbefc26={}){super(_0x29d725),this['editor']=null,this['_editorConfig']=_0xbefc26,this['set']('value',_0xbefc26['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x29d725,'Reply...')),this['set']('submitLabel',E(_0x29d725,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x3568ce(),this['focusCycler']=new _0xcb58dc({'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',(_0x3b57f6,_0x10e098)=>{this['cancelButtonView']['fire']('execute'),_0x10e098();}),this['keystrokes']['set']('Ctrl+Enter',(_0x9c3abb,_0x373a04)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x373a04());}),this['on']('submit',(_0x298848,_0x8b2119)=>{_0x8b2119['length']>0xfde8?(alert(E(_0x29d725,'TOO_LONG_COMMENT_ALERT',[_0x8b2119['length'],0xfde8])),_0x298848['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1d6d93=this['editor'];this['element']['insertBefore'](_0x1d6d93['ui']['element'],this['element']['firstChild']),_0x1d6d93['model']['document']['on']('change',()=>this['value']=_0x1d6d93['getData']()),_0x1d6d93['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1d6d93['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x53d006){-0x1===_0x53d006?(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:_0xb325f5}=this,_0x486f15=new _0x39c35a(_0xb325f5);return _0x486f15['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x486f15['withText']=!0x0,_0x486f15['bind']('label')['to'](this,'submitLabel'),_0x486f15['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x486f15['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x295f48,_0x1ac05e)=>!_0x1ac05e&&!!_0x295f48['trim']()),_0x486f15;}['_createCancelButton'](){const {locale:_0x46b437}=this,_0x8cd1d8=new _0x39c35a(_0x46b437);return _0x8cd1d8['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x8cd1d8['label']=E(_0x46b437,'Cancel'),_0x8cd1d8['withText']=!0x0,_0x8cd1d8['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x8cd1d8;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5370bf=>{this['focusTracker']['add'](_0x5370bf['element']);}),this['focusables']['on']('change',(_0x30d20d,_0x33d93a)=>{for(const _0x243698 of Array['from'](_0x33d93a['added'])['reverse']())this['focusTracker']['add'](_0x243698['element']);});}}class ie extends kt{constructor(_0x3cd563,_0x4524d5,_0x15ef17){super(_0x3cd563),this['commentInputView']=new os(_0x3cd563,_0x15ef17),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x54b0ed,_0x4e298e)=>_0x54b0ed||!!_0x4e298e),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 _0x357216(_0x3cd563,_0x4524d5),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'](_0x55977c){this['commentInputView']['focus'](_0x55977c);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x55770d,_0x35421c)=>{const {submitButtonView:_0x16b8be,cancelButtonView:_0x5e4b54,editor:_0x555bc2}=this['commentInputView'];[_0x16b8be['element'],_0x5e4b54['element'],_0x555bc2?_0x555bc2['editing']['view']['getDomRoot']():null]['filter'](_0x463f71=>_0x463f71)['some'](_0x451e98=>_0x451e98['contains'](_0x35421c['target']))||(this['focus'](),_0x35421c['preventDefault']());});}}class cs extends kt{constructor(_0x14e092){super(_0x14e092);const _0x148d69=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x148d69['to']('count',_0x52a956=>E(_0x14e092,'NUMBER_OF_COMMENTS',_0x52a956))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x594e15,_0x197526,_0xb2d76b){super(_0x594e15);const _0x158073=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x197526['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x197526,this['_config']=_0xb2d76b,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3568ce(),this['keystrokes']=new jt(),this['focusCycler']=new _0xcb58dc({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x12482d=>this['commentViews']['map'](_0xf0dd0b=>_0xf0dd0b['element'])['includes'](_0x12482d['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x594e15),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4a225d=>_0x4a225d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x135247 of _0x197526['comments'])this['_handleNewCommentModel'](_0x135247);this['_handleInfoComment'](),this['listenTo'](_0x197526['comments'],'add',(_0x52295b,_0x1591a7)=>{const _0x782511=this['_calculatePosition'](_0x1591a7);this['length']++,this['_handleNewCommentModel'](_0x1591a7,_0x782511),this['refreshVisibleViews']();}),this['listenTo'](_0x197526['comments'],'remove',(_0x327801,_0x1b5cc2)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1b5cc2),this['refreshVisibleViews']();}),this['listenTo'](_0x197526,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x197526,'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',_0x158073['if']('length','ck-hidden',_0xbf409e=>!_0xbf409e)],'aria-label':E(_0x594e15,'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'](_0x1fb330){-0x1===_0x1fb330?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xfa18 of this['commentViews'])_0xfa18['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0xce1fa2,_0x4622dc){const _0x4e85f8=new this['_config']['CommentView'](this['locale'],_0xce1fa2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4e85f8['viewUid']=_0xce1fa2['id'],_0x4e85f8['delegate']('removeComment')['to'](this),_0x4e85f8['delegate']('updateComment')['to'](this),_0x4e85f8['delegate']('resolveCommentThread')['to'](this),_0x4e85f8['delegate']('editorReady')['to'](this),_0x4e85f8['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4e85f8,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4e85f8,_0x4622dc);}['_calculatePosition'](_0x36ba53){const _0x3f62ef=this['_model']['_findOptimalIndex'](_0x36ba53);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x36ba53['authoredAt']?_0x3f62ef-0x1:_0x3f62ef:_0x3f62ef-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4cc4e6={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4cc4e6,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4cc4e6));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xa2f7fe){const _0xca4b2d=this['commentViews']['remove'](_0xa2f7fe['id']);this['stopListening'](_0xca4b2d),_0xca4b2d['isEditMode']&&this['_updateHasDirtyComment'](),_0xca4b2d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x39b2e0=>_0x39b2e0['isEditMode']);}['_rearrangeCollapse'](){const _0x4c9c6b=function(_0x998c5e){const _0x9c4c39=new _0x4d1d56();for(const _0x91891b of _0x998c5e)_0x9c4c39['add'](_0x91891b);return _0x9c4c39;}(this['commentViews']),_0x305cd8=this['_collapsedCommentsView']['count'];for(let _0xebecaf=0x1;_0xebecaf<=_0x305cd8;_0xebecaf++)_0x4c9c6b['remove'](0x1);for(const _0x4ccaac of _0x4c9c6b)_0x4ccaac['collapse']();_0x305cd8>0x0&&_0x4c9c6b['add'](this['_collapsedCommentsView'],0x1),ns(_0x20a4d9(Array['from'](this['visibleViews']),Array['from'](_0x4c9c6b)),this['visibleViews'],_0x4c9c6b);}['_rearrangeExpand'](){ns(_0x20a4d9(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x109dea of this['visibleViews'])_0x109dea['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x56021d=>{this['focusTracker']['add'](_0x56021d['element']),this['keystrokes']['listenTo'](_0x56021d['element']);}),this['commentViews']['on']('change',(_0x5f1844,_0x2df7f1)=>{for(const _0x5a5d8f of _0x2df7f1['removed'])this['focusTracker']['remove'](_0x5a5d8f['element']),this['keystrokes']['stopListening'](_0x5a5d8f['element']);for(const _0x16495f of Array['from'](_0x2df7f1['added'])['reverse']())this['focusTracker']['add'](_0x16495f['element']),this['keystrokes']['listenTo'](_0x16495f['element']);});}}function ns(_0x453006,_0x288b3e,_0xca122e){let _0x5af722=0x0;for(const _0x2f8fd7 of _0x453006)switch(_0x2f8fd7){case'insert':_0x288b3e['add'](_0xca122e['get'](_0x5af722),_0x5af722),_0x5af722++;break;case'delete':_0x288b3e['remove'](_0x5af722);break;case'equal':_0x5af722++;}}class as extends kt{constructor(_0x428f8e){super(_0x428f8e);const _0x33301b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x33301b['to']('contextValue',_0x9690d=>E(_0x428f8e,'THREAD_CONTEXT_LABEL',_0x9690d)),'tabindex':-0x1},'children':[{'text':_0x33301b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3b99d7,_0x1de4b9){super(_0x3b99d7);const _0x4cc1df=this['bindTemplate'];this['_model']=_0x1de4b9,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3568ce(),this['keystrokes']=new jt(),this['focusCycler']=new _0xcb58dc({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x486d5f=>!!_0x486d5f),this['bind']('contextValue')['to'](this['_model'],'context',_0x9defb8=>_0x9defb8&&_0x9defb8['value']?this['_trimContextValue'](_0x9defb8['value']):E(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',_0x4cc1df['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 _0x5799fd=new _0x39c35a(this['locale']);return _0x5799fd['label']=E(this['locale'],'Reopen'),_0x5799fd['tooltip']=E(this['locale'],'Reopen'),_0x5799fd['icon']=_0x1bb31f,_0x5799fd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x36cd22=>!_0x36cd22),_0x5799fd['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x444d25,_0x50453f)=>_0x444d25&&_0x50453f),_0x5799fd['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5799fd;}['_trimContextValue'](_0x2b9d12){if(_0x2b9d12['length']<0x96)return _0x2b9d12;const _0x8fddf7=_0x2b9d12['lastIndexOf']('\x20',0x93);return _0x2b9d12['substring'](0x0,_0x8fddf7>-0x1?_0x8fddf7:0x93)+'...';}['_attachContextActions'](){const _0x47f62e=this['element']['querySelector']('.ck-context'),_0x25a65d=_0x47f62e['querySelector']('.ck-context__value');this['listenTo'](_0x47f62e,'mouseenter',()=>{_0x25a65d['offsetWidth']<_0x25a65d['scrollWidth']&&_0x47f62e['classList']['add']('overlay');}),this['listenTo'](_0x47f62e,'mouseleave',()=>{_0x47f62e['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x472162 of this['focusables'])this['focusTracker']['add'](_0x472162['element']),this['keystrokes']['listenTo'](_0x472162['element']);}['_createContextView'](){const _0x3fc940=new as(this['locale']);return _0x3fc940['bind']('contextValue')['to'](this),_0x3fc940;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xd113d8,_0x3f88e3,_0x325931,_0x112df6){super(_0xd113d8),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3f88e3,this['_localUser']=_0x325931,this['_config']=_0x112df6,this['commentThreadHeaderView']=new Xt(_0xd113d8,_0x3f88e3),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0xd113d8,E(_0xd113d8,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xd113d8,_0x3f88e3,Object['assign']({'CommentView':this['_config']['CommentView']},_0x112df6)),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',(_0x3a4ce5,_0x969eb7)=>_0x3a4ce5||!!_0x969eb7),this['bind']('isUnlinked')['to'](_0x3f88e3,'unlinkedAt',_0x2fe9a1=>!!_0x2fe9a1),this['bind']('ariaLabel')['to'](this,'length',_0x28a3ba=>{const _0x35fff0=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x28a3ba,_0x35fff0]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3568ce(),this['keystrokes']=new jt(),this['focusCycler']=new _0xcb58dc({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2d4ec1=>_0x2d4ec1['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x33752b=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4b3b2b=_0x33752b['commentInputView'];return _0x33752b['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4b3b2b,'value',(_0x3e5b51,_0x32934e,_0xe1545f,_0xd2a820,_0x247fe9)=>!!_0x247fe9||!!_0xd2a820&&_0xe1545f&&!_0x32934e||_0x3e5b51&&_0xe1545f&&!_0x32934e),_0x4b3b2b['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x12c452,_0x5b4b96,_0x109842)=>{let _0x2ae6aa;return _0x2ae6aa=_0x109842&&_0x5b4b96?'Reply\x20to\x20reopen\x20discussion...':_0x12c452?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x2ae6aa);}),_0x4b3b2b['bind']('submitLabel')['to'](this,'length',_0x4c1143=>E(this['locale'],_0x4c1143?'Reply':'Comment')),_0x4b3b2b['on']('submit',(_0x107f58,_0x397a8c)=>{this['fire']('addComment',_0x397a8c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4b3b2b['on']('cancel',()=>{this['focus']();}),_0x4b3b2b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4b3b2b['on']('cancel',_0x191bea=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x191bea['stop']());}),this['on']('change:isActive',(_0x590401,_0xab2fbc,_0x1a2141)=>{_0x1a2141||this['length']||_0x4b3b2b['value']||this['fire']('removeCommentThread');}),_0x33752b;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2d537f,_0xde01d6,_0x2f06d7,_0x449c62){super(_0x2d537f,_0xde01d6,_0x2f06d7,_0x449c62),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2d537f,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x17159e,_0x2dafb4,_0x4d39c8)=>{_0x4d39c8||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x33e814,_0x2e1458,_0x4ff594)=>{_0x4ff594&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4e2cd3=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4e2cd3['if']('isActive','ck-thread--active'),_0x4e2cd3['if']('isUnlinked','ck-thread--unlinked'),_0x4e2cd3['if']('isConfirm','ck-thread--remove-confirmation'),_0x4e2cd3['to']('actionIndicator',_0x5c734d=>_0x5c734d?'ck-thread--'+_0x5c734d:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4e2cd3['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 _0x13e7e1 of this['commentsListView']['commentViews'])_0x13e7e1['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x52ef43}=this,_0x472e85=this['commentsListView']['commentViews']['get'](0x0);_0x472e85===this['_boundFirstCommentView']||_0x472e85['isSystemComment']||(this['_boundFirstCommentView']=_0x472e85,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x472e85,'actionIndicator',_0x2cadbf=>'remove'===_0x2cadbf?'remove':null),_0x472e85['placeholder']=E(_0x52ef43,'Write\x20a\x20comment...'),_0x472e85['removeButton']['on']('execute',_0x420bff=>{_0x420bff['stop'](),this['showConfirm'](E(_0x52ef43,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x472e85['focus']();}),_0x472e85['actionBar']['add'](this['resolveButton'],0x0),_0x472e85['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x17be26=new _0x408ca6(this['locale']);return _0x17be26['label']=E(this['locale'],'Resolve'),_0x17be26['tooltip']=E(this['locale'],'Resolve'),_0x17be26['icon']=_0x3c8c53,_0x17be26['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x17be26['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d0039=>!_0x1d0039),_0x17be26['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4f9c1f,_0x1b5620)=>_0x4f9c1f&&!_0x1b5620),_0x17be26['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x17be26;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x3db662){super(_0x3db662),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x3fd96c,_0x4bf8d0,_0x1a52a6)=>{this['element']['innerHTML']=_0x1a52a6;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3a3690,_0x5e8177,_0xc64dbd){super(_0x3a3690),this['_model']=_0x5e8177,this['_config']=_0xc64dbd,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5e8177,'content',_0x5e8177,'authoredAt',(_0x8af8c5,_0x4b8306)=>E(_0x3a3690,'COMMENT_ARIA_LABEL',[_0x5e8177['author']['name'],_0xc64dbd['formatDateTime'](_0x4b8306),new DOMParser()['parseFromString'](_0x8af8c5,'text/html')['body']['textContent'],_0x5e8177['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x3a3690,E(_0x3a3690,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x1267d4(),this['focusTracker']=new _0x3568ce(),this['keystrokes']=new jt(),this['focusCycler']=new _0xcb58dc({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3de5b5=>_0x3de5b5['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x2d5820=new es(this['locale']);return _0x2d5820['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x216fae,_0x23aae4)=>_0x23aae4?_0xeb5a5c(_0x216fae,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x216fae),_0x2d5820;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4262b8=new os(this['locale'],this['_config']['editorConfig']);return _0x4262b8['value']=this['_model']['content'],_0x4262b8['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4262b8['submitLabel']=E(this['locale'],'Save'),_0x4262b8['on']('submit',(_0x1b0483,_0x421fef)=>{this['fire']('updateComment',this['_model']['id'],_0x421fef),this['switchToDisplayMode'](),this['focus']();}),_0x4262b8['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4262b8['once']('editorReady',()=>{_0x4262b8['focus']();}),_0x4262b8['createEditor'](),_0x4262b8['delegate']('editorReady')['to'](this),_0x4262b8['delegate']('editorDestroyed')['to'](this),_0x4262b8;}['_setupKeyboardNavigation'](){const _0x2fb8a3=this['element'];this['keystrokes']['listenTo'](_0x2fb8a3);for(const _0x17ebda of this['focusables'])this['focusTracker']['add'](_0x17ebda['element']),this['keystrokes']['listenTo'](_0x17ebda['element']);this['focusables']['on']('change',(_0x506818,_0x368108)=>{for(const _0x57ab7a of _0x368108['removed'])this['focusTracker']['remove'](_0x57ab7a['element']),this['keystrokes']['stopListening'](_0x57ab7a['element']);for(const _0xad41e5 of _0x368108['added'])this['focusTracker']['add'](_0xad41e5['element']),this['keystrokes']['listenTo'](_0xad41e5['element']);}),this['keystrokes']['set']('enter',(_0x12a8a2,_0x3e1768)=>{_0x2fb8a3===_0x12a8a2['target']&&(this['focusCycler']['focusFirst'](),_0x3e1768());}),this['keystrokes']['set']('esc',(_0x588949,_0x12cc4f)=>{_0x2fb8a3!==_0x588949['target']&&(this['focus'](),_0x12cc4f());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x25c38a,_0x9910bd,_0x53dd69){super(_0x25c38a,_0x9910bd,_0x53dd69),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x25c38a,'Reply...')),this['bind']('authoredAt')['to'](_0x9910bd),this['bind']('resolvedAt')['to'](_0x9910bd),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 _0x357216(_0x25c38a,_0x9910bd['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x9910bd,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x25f83d=this['bindTemplate'],_0x540743=[{'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':_0x25f83d['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x25f83d['to']('authoredAt',_0x4342a2=>this['_config']['formatDateTime'](_0x4342a2))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x25f83d['if']('isEditMode','ck-comment__actions--hidden'),_0x25f83d['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']&&_0x540743['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x25f83d['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x25f83d['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x25f83d['if']('isEditMode','ck-comment--edit'),_0x25f83d['if']('isSystemComment','ck-comment--info'),_0x25f83d['to']('actionIndicator',_0x1f6d0d=>_0x1f6d0d?'ck-comment--'+_0x1f6d0d:'')],'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':_0x540743}]}]};}['_createEditButton'](){const _0x394f22=new _0x39c35a(this['locale']);return _0x394f22['label']=E(this['locale'],'Edit'),_0x394f22['icon']=_0xac936e,_0x394f22['withText']=!0x0,_0x394f22['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x394f22['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5653d3=>!_0x5653d3),_0x394f22['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x394f22['on']('execute',()=>this['switchToEditMode']()),_0x394f22;}['_createRemoveButton'](){const _0x4c4a3f=new _0x39c35a(this['locale']);return _0x4c4a3f['label']=E(this['locale'],'Remove'),_0x4c4a3f['icon']=_0x552b7e,_0x4c4a3f['withText']=!0x0,_0x4c4a3f['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4c4a3f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2ca864=>!_0x2ca864),_0x4c4a3f['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4c4a3f['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4c4a3f;}['_createDropdown'](){const _0x4cbc44=_0x5d2e39(this['locale'],_0x348650),_0x25a63a=_0x4cbc44['panelView']['children'],_0x51bcf9=new _0x14a095(this['locale']),_0x505823=_0x4cbc44['bindTemplate'];_0x34cb24(_0x4cbc44,()=>this['items']['find'](_0x5bbc42=>_0x5bbc42['isVisible'])),_0x4cbc44['extendTemplate']({'attributes':{'class':[_0x505823['if']('isVisible','ck-hidden',_0x1896f5=>!_0x1896f5)]}});const _0x1ab7ad=(_0x89125f,_0x20e466=-0x1)=>{const _0x4cebba=new _0x499a89(this['locale']);_0x4cebba['children']['add'](_0x89125f);const _0xf83e97=_0x20e466>-0x1?_0x20e466:_0x51bcf9['items']['length'];_0x51bcf9['items']['add'](_0x4cebba,_0xf83e97);const _0x10acfe=Array['from'](this['items']);_0x4cbc44['unbind']('isEnabled','isVisible'),_0x4cbc44['bind']('isEnabled')['toMany'](_0x10acfe,'isEnabled',(..._0x2da406)=>_0x2da406['some'](_0x485e2e=>_0x485e2e)),_0x4cbc44['bind']('isVisible')['toMany'](_0x10acfe,'isVisible',(..._0xb0171c)=>_0xb0171c['some'](_0x5146b2=>_0x5146b2));};_0x4cbc44['panelPosition']='sw',_0x4cbc44['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x33421c});for(const _0x4cf918 of this['items'])_0x1ab7ad(_0x4cf918);return _0x25a63a['add'](_0x51bcf9),_0x4cbc44['listenTo'](this['items'],'add',(_0x54c99e,_0x21b1a7,_0xb86e02)=>{_0x1ab7ad(_0x21b1a7,_0xb86e02);}),_0x4cbc44['listenTo'](this['items'],'remove',(_0x55aaa9,_0x48f01a,_0x38256b)=>{_0x51bcf9['items']['remove'](_0x38256b);}),_0x4cbc44;}['_attachActions'](_0x124eed,_0x3c0938){const _0x3a50e2=_0x124eed&&_0x124eed['element'];_0x3a50e2&&(this['listenTo'](_0x3a50e2,'mouseenter',()=>this['actionIndicator']=_0x3c0938),this['listenTo'](_0x3a50e2,'focus',()=>this['actionIndicator']=_0x3c0938),this['listenTo'](_0x3a50e2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3a50e2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x4ec415=super['_createCommentInputView']();return _0x4ec415['bind']('placeholder')['to'](this),_0x4ec415;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x3e2c7f){const _0x390795=Dt(_0x3e2c7f,0x1e),_0x14b555=new MutationObserver(_0x1f193b=>{for(const _0x2ac99e of _0x1f193b)('attributes'==_0x2ac99e['type']&&'class'==_0x2ac99e['attributeName']||'childList'==_0x2ac99e['type']||'characterData'==_0x2ac99e['type'])&&_0x390795();});return{'attach'(_0x57c73e){_0x14b555['observe'](_0x57c73e,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x14b555['disconnect'](),_0x390795['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5e9a83,_0x4d3f3e){super(_0x5e9a83),this['id']=_0x544806(),this['focusTracker']=new _0x3568ce(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x13d194,_0x32ec3c)=>this['fire']('Esc',_0x32ec3c)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4d3f3e),this['mainView']=_0x4d3f3e;const _0x1c466b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1c466b['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 _0x506525=this['element']['clientHeight'];_0x506525&&(this['height']=_0x506525);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x31e545(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x50daa7,target:_0xc5f0c2,type:_0x59c272,isVisible:_0x21bffa=!0x0}){super(),this['view']=_0x50daa7,this['view']['element']||this['view']['render'](),this['_type']=_0x59c272,this['_target']=_0xc5f0c2,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4d1d56([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xf8d85c,_0x14ae67)=>{this['view']['focusTracker']['add'](_0x14ae67);}),this['focusableElements']['on']('remove',(_0x2a3f71,_0x481841)=>{this['view']['focusTracker']['remove'](_0x481841);}),this['set']('isVisible',_0x21bffa);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2d0601=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x2d0601),_0x2d0601;}get['targetRect'](){const _0x578590=this['target'];if(null===_0x578590)return null;if(_0x578590 instanceof _0x17a49c)return _0x578590;const _0x6f50d5=_0x578590['filter'](_0x142a03=>function(_0x3c41ee){const _0x44d7d2=_0x3c41ee['offsetParent'];if(_0x44d7d2)return!0x0;const _0x419efc=_0x3c41ee['getClientRects']()['item'](0x0);return!!_0x419efc;}(_0x142a03));return 0x0===_0x6f50d5['length']?null:new _0x17a49c(_0x6f50d5[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3efff0){this['view']['isActive']=_0x3efff0,this['view']['mainView']['isActive']=_0x3efff0;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x119782){if(!(null===_0x119782||_0x119782 instanceof _0x17a49c||Array['isArray'](_0x119782)&&_0x119782['every'](_0x17ed2a=>li(_0x17ed2a))))throw new _0x27cf80('annotation-invalid-target',null,{'target':_0x119782});}['_getNormalizedTarget'](){const _0x5c1d41='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x5c1d41)?[_0x5c1d41]:_0x5c1d41;}}function li(_0x56c863){return null!==_0x56c863&&'object'==typeof _0x56c863&&'nodeType'in _0x56c863&&0x1===_0x56c863['nodeType'];}class _ extends _0x4d1d56{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2b2147=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3568ce(),this['_focusTracker']['on']('change:isFocused',(_0x56b89d,_0x5b9313,_0xf1075b)=>{_0xf1075b||this['fire']('blur');});for(const _0x3c93c2 of _0x2b2147)this['add'](_0x3c93c2);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4fe043){if(this['has'](_0x4fe043))throw new _0x27cf80('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4fe043['innerView'],_0x4fe043),this['_viewToAnnotation']['set'](_0x4fe043['view'],_0x4fe043);for(const _0x23a77d of _0x4fe043['focusableElements'])this['_focusTracker']['add'](_0x23a77d);this['listenTo'](_0x4fe043['focusableElements'],'add',(_0x6470fd,_0x1aa3d5)=>{this['_focusTracker']['add'](_0x1aa3d5);}),this['listenTo'](_0x4fe043['focusableElements'],'remove',(_0x1560e6,_0x132b7f)=>{this['_focusTracker']['remove'](_0x132b7f);}),this['listenTo'](_0x4fe043['view']['focusTracker'],'change:isFocused',(_0x51c8e1,_0x5f0f49,_0x294d97)=>{_0x294d97&&this['fire']('focus',_0x4fe043);}),_0x4fe043['updateTargetRect']();const _0x4c5caa=this['_getOrderInContent'](_0x4fe043['view']['targetRect']);return super['add'](_0x4fe043,_0x4c5caa);}['remove'](_0x540fff){if(!this['has'](_0x540fff))throw new _0x27cf80('annotationcollection-not-existing-item',null);this['stopListening'](_0x540fff['view']['focusTracker']),this['stopListening'](_0x540fff['focusableElements']);for(const _0xa961e7 of _0x540fff['focusableElements'])this['_focusTracker']['remove'](_0xa961e7);return this['_viewToAnnotation']['delete'](_0x540fff['view']),this['_innerViewToAnnotation']['delete'](_0x540fff['innerView']),super['remove'](_0x540fff);}['getByInnerView'](_0x205f72){return this['_innerViewToAnnotation']['get'](_0x205f72);}['getByView'](_0x323136){return this['_viewToAnnotation']['get'](_0x323136);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x40900b of this)_0x40900b['updateTargetRect']();this['_sort']();}['_sort'](){const _0x585ab0=Array['from'](this)['sort']((_0x3aa0ba,_0x142018)=>v(_0x3aa0ba['view']['targetRect'],_0x142018['view']['targetRect']));for(let _0x56eb01=_0x585ab0['length']-0x1;_0x56eb01>0x0;_0x56eb01--){const _0x5887e2=_0x585ab0[_0x56eb01];_0x56eb01!==this['getIndex'](_0x5887e2)&&(this['remove'](_0x5887e2),this['add'](_0x5887e2));}}['_getOrderInContent'](_0x3e5c42){let _0x317e17=0x0;if(!_0x3e5c42)return this['length'];for(const _0x177548 of this){const _0x1446a1=_0x177548['view']['targetRect'];if(_0x1446a1){if(v(_0x3e5c42,_0x1446a1)<0x0)return _0x317e17;_0x317e17++;}}return _0x317e17;}}function v(_0xfd6f3e,_0x30713a){if(null===_0xfd6f3e&&null===_0x30713a)return 0x0;if(null===_0xfd6f3e)return-0x1;if(null===_0x30713a)return 0x1;const _0x179d0c=_0xfd6f3e['top']-_0x30713a['top'];return 0x0==_0x179d0c?_0xfd6f3e['left']-_0x30713a['left']:_0x179d0c;}class O extends _0x52c4e0{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x17c4eb){if(super(_0x17c4eb),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x17c4eb instanceof _0x12638d){const _0x1f1644=_0x17c4eb['locale'];_0x17c4eb['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x1f1644,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x1f1644,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x1f1644,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x1f1644,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x1f1644,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x1f1644,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x1f1644,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x40de70){this['collection']['add'](_0x40de70);}['remove'](_0x5eeea0){this['collection']['remove'](_0x5eeea0),_0x5eeea0['destroy']();}['refreshVisibility'](){for(const _0x3e15cb of this['collection'])_0x3e15cb['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xd8ed71){return this['collection']['getByInnerView'](_0xd8ed71);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1f3286 of this['collection'])_0x1f3286['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3e4375){this['fire']('_activateAnnotation',_0x3e4375);}['createAnnotation'](_0x3d694d){return new d(_0x3d694d);}['createAnnotationView'](_0x3147ba,_0x1b0b9d){return new S(_0x3147ba,_0x1b0b9d);}['_addActiveAnnotation'](_0x38bd99){const _0x1283e8=new Set(this['activeAnnotations']);_0x1283e8['add'](_0x38bd99),this['activeAnnotations']=_0x1283e8;}['_removeActiveAnnotation'](_0x14e341){const _0x35ca91=new Set(this['activeAnnotations']);_0x35ca91['delete'](_0x14e341),this['activeAnnotations']=_0x35ca91;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4010a1=this['collection'],_0x3a6042=this['_visibleAnnotations'];function _0x58adaf(_0x7ab23b){const _0x4279f5=_0x7ab23b['source'];_0x4279f5['isVisible']&&!_0x3a6042['has'](_0x4279f5)?_0x3a6042['add'](_0x4279f5):!_0x4279f5['isVisible']&&_0x3a6042['has'](_0x4279f5)&&_0x3a6042['remove'](_0x4279f5),_0x4279f5['view']['focusTracker']['remove'](_0x4279f5['view']['element']),_0x4279f5['view']['focusTracker']['add'](_0x4279f5['view']['element']);}this['listenTo'](_0x4010a1,'add',(_0x2df31c,_0x181c58)=>{_0x181c58['isVisible']&&_0x3a6042['add'](_0x181c58),this['listenTo'](_0x181c58,'change:isVisible',_0x58adaf);}),this['listenTo'](_0x4010a1,'remove',(_0x338ba7,_0x4c7d3e)=>{_0x3a6042['has'](_0x4c7d3e)&&_0x3a6042['remove'](_0x4c7d3e),this['stopListening'](_0x4c7d3e,'change:isVisible',_0x58adaf);});}['_setupEnterAnnotationKeystroke'](){const _0x34eba6=_0x174469=>{_0x174469['on']('ready',()=>{_0x174469['keystrokes']['set'](_0x437b54,(_0x29b2b2,_0x3eeda3)=>{const _0x58406=_0x2ffab9(this['activeAnnotations']['values']());_0x58406&&(_0x58406['view']['focus'](),_0x3eeda3());});});};this['context']instanceof _0x12638d?_0x34eba6(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x23ad21,_0x522ffb)=>{_0x34eba6(_0x522ffb);});}['_setupEscapeAnnotationHandling'](){const _0x29f910=_0x14d595=>{const _0x4d3c63=_0x14d595['source'],_0xe120a=[];let _0x3ffaef;if(Array['isArray'](_0x4d3c63['target'])){_0x3ffaef=_0x4d3c63['target'][0x0],this['context']instanceof _0x12638d?_0xe120a['push'](this['context']):this['context']['editors']&&_0xe120a['push'](...this['context']['editors']);for(const _0x2502a2 of _0xe120a)for(const _0x56efd5 of _0x2502a2['editing']['view']['domRoots']['values']())if(_0x56efd5['contains'](_0x3ffaef))return void _0x2502a2['editing']['view']['focus']();_0x3ffaef['focus']();}};this['listenTo'](this['collection'],'add',(_0x1276b4,_0x548d9a)=>{this['listenTo'](_0x548d9a,'escape',_0x29f910,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5bb0fc,_0x4d93ed)=>{this['stopListening'](_0x4d93ed,'escape',_0x29f910);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x52c4e0{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52ddd7){super(_0x52ddd7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x48e7a7=this['context']['config'];_0x48e7a7['define']('comments.maxCommentsWhenCollapsed',0x2),_0x48e7a7['define']('comments.maxThreadTotalWeight',0x1f4),_0x48e7a7['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x48e7a7['define']('comments.CommentThreadView',vt),_0x48e7a7['define']('comments.CommentView',gt),_0x48e7a7['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x49b1b0=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x677da5,_0x5a0181)=>this['_addCommentThread'](_0x5a0181)),this['on']('submitCommentThread',(_0x1f0c03,_0x213d7e)=>this['_submitCommentThread'](_0x213d7e)),this['on']('resolveCommentThread',(_0x541322,_0x1af706)=>this['_resolveCommentThread'](_0x1af706)),this['on']('resolveCommentThread',(_0x49b3d6,_0x5f475d)=>this['_updateActiveAnnotation'](_0x5f475d),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2342e4,_0x5962a2)=>this['_reopenCommentThread'](_0x5962a2)),this['on']('reopenCommentThread',(_0x45463d,_0x59f587)=>this['_updateActiveAnnotation'](_0x59f587),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2b8d0f,_0x42a99b)=>this['_removeCommentThread'](_0x42a99b)),this['on']('updateCommentThread',(_0x15a5f8,_0x53a85d)=>this['_updateCommentThread'](_0x53a85d)),this['on']('updateCommentThread',(_0x14bac0,_0x40f17f)=>this['_updateActiveAnnotation'](_0x40f17f),{'priority':'lowest'}),this['on']('addComment',(_0x3e6ea1,_0x34a7fd)=>this['_addComment'](_0x34a7fd)),this['on']('updateComment',(_0x1de737,_0x2a3f26)=>this['_updateComment'](_0x2a3f26)),this['on']('removeComment',(_0x2ed016,_0x491e8b)=>this['_removeComment'](_0x491e8b)),this['on']('addComment',(_0x3fd1ac,{threadId:_0x5f08ad,isFromAdapter:_0x2e2d63})=>{if(_0x2e2d63)return;const _0x42cf3b=this['getCommentThread'](_0x5f08ad),_0x30c297=_0x42cf3b&&this['_threadToController']['get'](_0x42cf3b);_0x30c297&&_0x30c297['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x49b1b0,'change:activeAnnotations',(_0x2a6141,_0x2e15da,_0x2553d6)=>{const _0x3f7c03=Array['from'](_0x2553d6)['map'](_0x3bc0e3=>this['_viewToController']['get'](_0x3bc0e3['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3f7c03?_0x3f7c03['model']:null;});}set['adapter'](_0x1ccf75){if(this['_adapter'])throw new _0x27cf80('commentsrepository-adapter-already-set');this['_adapter']=_0x1ccf75;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x129b9f=Tt,threadId:_0xfec704=_0x544806(),comments:_0x4b19a7=[],unlinkedAt:_0x62751e=null,resolvedAt:_0x22cc67=null,resolvedBy:_0x5436dd=null,target:_0x2d8169=null,context:_0x35aa4d=null,attributes:_0xef8ac0={},isResolvable:_0x331394=!0x0,isSubmitted:_0x4d84b7=!0x1,isFromAdapter:_0x12b0ec=!0x1}={}){return this['fire'](bt('addCommentThread',_0x129b9f),{'channelId':_0x129b9f,'threadId':_0xfec704,'comments':_0x4b19a7,'unlinkedAt':_0x62751e,'resolvedAt':_0x22cc67,'resolvedBy':_0x5436dd,'target':_0x2d8169,'context':_0x35aa4d,'attributes':_0xef8ac0,'isFromAdapter':_0x12b0ec,'isResolvable':_0x331394,'isSubmitted':_0x4d84b7}),this['getCommentThread'](_0xfec704);}['openNewCommentThread']({channelId:_0x3ec803=Tt,threadId:_0x4cfb70=_0x544806(),target:_0x3b09bb,context:_0x58c9f4=null,isResolvable:_0x551bb2=!0x0}){if(this['_readOnlyChannels']['has'](_0x3ec803)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3b09bb)throw new _0x27cf80('commentsrepository-missing-target');const _0x189119=this['addCommentThread']({'channelId':_0x3ec803,'threadId':_0x4cfb70,'target':_0x3b09bb,'context':_0x58c9f4,'isResolvable':_0x551bb2});if(!_0x189119)return null;const _0xf0865a=this['_threadToController']['get'](_0x189119),_0x45a906=_0xf0865a['view']['commentThreadInputView']['commentInputView'],_0x4567c0=this['context']['plugins']['get'](O),_0x44ead3=_0x4567c0['getByInnerView'](_0xf0865a['view']);return _0x4567c0['activate'](_0x44ead3),_0x45a906['once']('editorReady',()=>_0x45a906['focus']()),_0x189119;}['hasCommentThread'](_0x1bcb73){if('string'!=typeof _0x1bcb73)throw new _0x27cf80('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1bcb73);}['updateCommentThread']({channelId:_0x29839a=Tt,threadId:_0x5dd9b1,context:_0x425a5c,unlinkedAt:_0xd1f89e,attributes:_0x1de49f,isFromAdapter:_0x48e34c=!0x1}){return this['fire'](bt('updateCommentThread',_0x29839a),{'channelId':_0x29839a,'threadId':_0x5dd9b1,'context':_0x425a5c,'unlinkedAt':_0xd1f89e,'attributes':_0x1de49f,'isFromAdapter':_0x48e34c}),this['getCommentThread'](_0x5dd9b1);}['getCommentThread'](_0x488822){if('string'!=typeof _0x488822)throw new _0x27cf80('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x488822);}['fetchCommentThread']({channelId:_0x33dd9f,threadId:_0x516928}={}){const _0x604132=this['getCommentThread'](_0x516928);if(_0x604132)return Promise['resolve'](_0x604132);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x27cf80('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x33dd9f,'threadId':_0x516928})['then'](_0x55697a=>this['hasCommentThread'](_0x516928)?this['getCommentThread'](_0x516928):_0x55697a?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x33dd9f},_0x55697a)):void 0x0)['catch'](_0x474330=>{throw console['error'](_0x474330),new _0x27cf80('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x925253,skipNotAttached:_0x20255a=!0x1,skipEmpty:_0x4253d3=!0x1,toJSON:_0x2bc2af=!0x1}={}){const _0x377722=[];for(const _0x3ee24b of this['_threads']['values']())_0x925253&&_0x3ee24b['channelId']!==_0x925253||_0x20255a&&!_0x3ee24b['isAttached']||_0x4253d3&&0x0===_0x3ee24b['length']||_0x377722['push'](_0x3ee24b);return _0x2bc2af?_0x377722['map'](_0x43f29e=>_0x43f29e['toJSON']()):_0x377722;}['setActiveCommentThread'](_0xbea03b){const _0x2e0da0=this['context']['plugins']['get'](O);if(!_0xbea03b)return void(this['activeCommentThread']&&_0x2e0da0['deactivateAll']());const _0x4b35c9=this['getCommentThread'](_0xbea03b);if(!_0x4b35c9)throw new _0x27cf80('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xbea03b});if(!this['_threadToController']['has'](_0x4b35c9))throw new _0x27cf80('commentsrepository-active-not-attached',null,{'threadId':_0xbea03b});const _0x562136=_0x2e0da0['getByInnerView'](this['_threadToController']['get'](_0x4b35c9)['view']);_0x2e0da0['activate'](_0x562136);}['switchReadOnly'](_0x36a650,_0x4ad8cb){_0x36a650?this['_readOnlyChannels']['add'](_0x4ad8cb):this['_readOnlyChannels']['delete'](_0x4ad8cb),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1a414c){return this['_readOnlyChannels']['has'](_0x1a414c)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xbbc00f,_0x4f296){return new Ct(_0xbbc00f,_0x4f296);}['setPermissions'](_0x3a986c,_0x534745=Tt){this['_permissions']['set'](_0x534745,_0x3a986c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4faf68=Tt){return this['_permissions']['has'](_0x4faf68)?this['_permissions']['get'](_0x4faf68):_t;}['_addCommentThread']({channelId:_0x4ad684,threadId:_0x39ef02,comments:_0x460411,unlinkedAt:_0x48624d,resolvedAt:_0x400d8f,resolvedBy:_0x2b8c45,target:_0x4aaf63,context:_0x203120,attributes:_0x59ccae,isFromAdapter:_0x28c3c4,isResolvable:_0xa6b27a,isSubmitted:_0x474663}){if('string'!=typeof _0x39ef02)throw new _0x27cf80('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x39ef02});if(this['hasCommentThread'](_0x39ef02))throw new _0x27cf80('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x39ef02});const _0x5655bd=new ui(this,{'channelId':_0x4ad684,'id':_0x39ef02,'context':_0x203120,'attributes':_0x59ccae,'unlinkedAt':_0x48624d,'resolvedAt':_0x400d8f,'resolvedBy':_0x2b8c45?this['context']['plugins']['get'](it)['getUser'](_0x2b8c45):null,'isResolvable':_0xa6b27a,'isSubmitted':_0x474663||_0x28c3c4});this['_threads']['set'](_0x39ef02,_0x5655bd);for(const _0x179523 of _0x460411)_0x5655bd['_add'](this['_createNewComment']({'threadId':_0x39ef02,..._0x179523}));return _0x4aaf63&&_0x5655bd['attachTo'](_0x4aaf63),_0x28c3c4||!_0x5655bd['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4ad684,'threadId':_0x39ef02});}['_submitCommentThread']({channelId:_0x3b35b7,threadId:_0xbb3ed6}){if(!this['hasCommentThread'](_0xbb3ed6))throw new _0x27cf80('commentsrepository-missing-comment-thread',this);const _0x5c68c2=this['getCommentThread'](_0xbb3ed6);if(_0x5c68c2['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x359222,comments:_0x42c276,resolvedAt:_0x884c16,resolvedBy:_0x5956f9,context:_0x924ca2,attributes:_0x14e446}=_0x5c68c2,_0x418551=this['context']['plugins']['get']('PendingActions'),_0x382150=_0x418551['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3b35b7,'threadId':_0x359222,'comments':_0x42c276['map'](_0x366968=>_0x366968['toJSON']()),'resolvedAt':_0x884c16,'resolvedBy':_0x5956f9?_0x5956f9['id']:_0x5956f9,'context':_0x924ca2,'attributes':_0x14e446})['then'](({comments:_0x26dfeb})=>{_0x418551['remove'](_0x382150);for(const _0xfe41c5 of _0x26dfeb)this['_updateComment']({'channelId':_0x3b35b7,'threadId':_0xbb3ed6,'commentId':_0xfe41c5['commentId'],'createdAt':_0xfe41c5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3e9c46=>{throw console['error'](_0x3e9c46),new _0x27cf80('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x403a9c,target:_0x205781}){const _0x114b88=this['getCommentThread'](_0x403a9c);if(!_0x114b88)throw new _0x27cf80('commentsrepository-attach-missing-comment-thread',this);const _0x2a7427=this['context']['plugins']['get']('PendingActions'),_0x201ae9=this['context']['plugins']['get'](O),_0x118749=this['_createCommentThreadView'](_0x114b88),_0x248718=new Ct(_0x114b88,_0x118749);let _0x1dec5f=null;_0x118749['on']('change:isDirty',(_0x2e9866,_0x4b7cb5,_0x332913)=>{_0x332913?_0x1dec5f=_0x2a7427['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1dec5f&&(_0x2a7427['remove'](_0x1dec5f),_0x1dec5f=null);}),this['_threadToController']['set'](_0x114b88,_0x248718),this['_viewToController']['set'](_0x118749,_0x248718);const _0xd6b477=new S(this['context']['locale'],_0x118749);_0xd6b477['bind']('length')['to'](_0x118749),_0xd6b477['bind']('isDirty')['to'](_0x118749,'isDirty',_0x118749,'length',(_0x4c1804,_0x322ccd)=>_0x4c1804||!_0x322ccd),_0xd6b477['bind']('isActive')['to'](_0x118749),_0xd6b477['type']='comment';const _0x8da3c2=new d({'view':_0xd6b477,'target':_0x205781,'type':'comment','isVisible':!_0x114b88['archivedAt']});return _0x118749['on']('escape',()=>{_0x8da3c2['fire']('escape');}),this['_bindAnnotationToEditors'](_0x118749,_0x8da3c2),_0x201ae9['add'](_0x8da3c2),_0x8da3c2;}['_bindAnnotationToEditors'](_0x295a83,_0x3c3f1c){this['listenTo'](_0x295a83,'editorReady',(_0x32b82f,_0x266e52)=>{const _0x2a5641=_0x266e52['ui']['view']['body']['bodyCollectionContainer'];_0x3c3f1c['focusableElements']['add'](_0x2a5641),this['context']instanceof _0x12638d&&this['context']['ui']['focusTracker']['add'](_0x2a5641);},{'priority':'highest'}),this['listenTo'](_0x295a83,'editorDestroyed',(_0x16a8d2,_0x6867cf)=>{const _0x5a67f6=_0x6867cf['ui']['view']['body']['bodyCollectionContainer'];_0x3c3f1c['focusableElements']['has'](_0x5a67f6)&&_0x3c3f1c['focusableElements']['remove'](_0x5a67f6),this['context']instanceof _0x12638d&&this['context']['ui']['focusTracker']['remove'](_0x5a67f6);});}['_unbindEditors'](_0x2050fe){this['stopListening'](_0x2050fe,'editorReady'),this['stopListening'](_0x2050fe,'editorDestroyed');}['_createCommentThreadView'](_0x3f3991){const _0x2472b6=this['context']['plugins']['get'](it),{config:_0x131817,locale:_0xe5514a}=this['context'],_0x2e0e61=lt(_0x131817['get']('locale'),_0xe5514a);return new(0x0,(_0x131817['get']('comments'))['CommentThreadView'])(_0xe5514a,_0x3f3991,_0x2472b6['me'],{'editorConfig':{..._0x131817['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x131817['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x131817['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x131817['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x131817['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2e0e61,'CommentView':_0x131817['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x514289,channelId:_0x198083,resolvedAt:_0x757936,resolvedBy:_0x576c3e,isFromAdapter:_0x2f36a0}){if(!this['hasCommentThread'](_0x514289))throw new _0x27cf80('commentsrepository-missing-comment-thread',null,{'threadId':_0x514289});const _0x41409b=this['getCommentThread'](_0x514289);if(_0x41409b['isResolved'])throw new _0x27cf80('commentsrepository-resolved-comment-thread',null,{'threadId':_0x514289});const _0x4ccf9d=this['context']['plugins']['get'](it);if(_0x41409b['resolvedBy']=_0x4ccf9d['getUser'](_0x576c3e),_0x41409b['resolvedAt']=_0x757936,_0x2f36a0||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x187974=this['context']['plugins']['get']('PendingActions'),_0x2fea3d=_0x187974['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x198083,'threadId':_0x514289})['then'](({resolvedAt:_0x329a92,resolvedBy:_0x5361c7})=>{_0x187974['remove'](_0x2fea3d),_0x41409b['resolvedBy']['id']!==_0x5361c7&&(_0x41409b['resolvedBy']=_0x4ccf9d['getUser'](_0x5361c7)),_0x41409b['resolvedAt']=_0x329a92;})['catch'](_0x2daed=>{throw console['error'](_0x2daed),new _0x27cf80('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3c0fe5,channelId:_0x124ca9,isFromAdapter:_0x1c270f}){if(!this['hasCommentThread'](_0x3c0fe5))throw new _0x27cf80('commentsrepository-missing-comment-thread',null,{'threadId':_0x3c0fe5});const _0x4e068b=this['getCommentThread'](_0x3c0fe5);if(!_0x4e068b['isResolved'])throw new _0x27cf80('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3c0fe5});if(_0x4e068b['resolvedBy']=null,_0x4e068b['resolvedAt']=null,_0x1c270f||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x187b49=this['context']['plugins']['get']('PendingActions'),_0x758337=_0x187b49['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x124ca9,'threadId':_0x3c0fe5})['then'](()=>_0x187b49['remove'](_0x758337))['catch'](_0x3452a7=>{throw console['error'](_0x3452a7),new _0x27cf80('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0xc86334,isFromAdapter:_0x4aef22}){const _0x4f789b=this['getCommentThread'](_0xc86334);if(!_0x4f789b)throw new _0x27cf80('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0xc86334),this['_threads']['delete'](_0xc86334),!_0x4f789b['isSubmitted']||_0x4aef22||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5a4735=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c0a5c}=_0x4f789b,_0x1c7d22=_0x5a4735['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5c0a5c,'threadId':_0xc86334})['then'](()=>_0x5a4735['remove'](_0x1c7d22))['catch'](_0x142ef6=>{throw console['error'](_0x142ef6),new _0x27cf80('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1c6a7b,unlinkedAt:_0x384128,context:_0x35b6b2,attributes:_0x4324bd,isFromAdapter:_0x9ee959}){if('string'!=typeof _0x1c6a7b)throw new _0x27cf80('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1c6a7b});if(!this['hasCommentThread'](_0x1c6a7b))throw new _0x27cf80('commentsrepository-missing-comment-thread',null,{'threadId':_0x1c6a7b});const _0x2486b9=this['getCommentThread'](_0x1c6a7b);let _0x5d0b62=!0x1;if(void 0x0!==_0x35b6b2&&_0x2486b9['context']!==_0x35b6b2&&(_0x2486b9['context']=_0x35b6b2,_0x5d0b62=!0x0),void 0x0!==_0x384128&&_0x2486b9['unlinkedAt']!==_0x384128&&(_0x2486b9['unlinkedAt']=_0x384128,_0x5d0b62=!0x0),_0x4324bd&&!wt(_0x4324bd,_0x2486b9['attributes'])&&(_0x2486b9['attributes']=_0x4324bd,_0x5d0b62=!0x0),!_0x5d0b62)return Promise['resolve']();if(!_0x2486b9['isSubmitted']||_0x9ee959||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2c059b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cea87}=_0x2486b9,_0x218614=_0x2c059b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4cea87,'threadId':_0x1c6a7b,'context':_0x35b6b2,'unlinkedAt':_0x384128,'attributes':_0x4324bd})['then'](()=>_0x2c059b['remove'](_0x218614))['catch'](_0x5effb4=>{throw console['error'](_0x5effb4),new _0x27cf80('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x30df1a){const _0x8ff42=this['context']['plugins']['get'](O),_0x32f823=this['getCommentThread'](_0x30df1a);if(_0x32f823['_isAttached']=!0x1,this['_threadToController']['has'](_0x32f823)){const _0x1e3290=this['_threadToController']['get'](_0x32f823),_0x8ac363=_0x1e3290['view'],_0x430728=_0x8ff42['getByInnerView'](_0x8ac363);this['_threadToController']['delete'](_0x32f823),this['_viewToController']['delete'](_0x8ac363),_0x430728&&_0x8ff42['remove'](_0x430728),_0x1e3290['destroy'](),_0x8ac363['destroy']()['then'](()=>{this['_unbindEditors'](_0x8ac363);});}}['_updateActiveAnnotation']({threadId:_0x2106e8,resolvedAt:_0x5ce953,unlinkedAt:_0x5cc10c}){const _0x3dd814=!!_0x5ce953,_0x300136=this['context']['plugins']['get'](O),_0x22c888=this['getCommentThread'](_0x2106e8);if(this['_threadToController']['has'](_0x22c888)){const _0x58b830=this['_threadToController']['get'](_0x22c888)['view'],_0x131e28=_0x300136['getByInnerView'](_0x58b830);_0x131e28&&(_0x3dd814&&_0x300136['_removeActiveAnnotation'](_0x131e28),_0x5cc10c?_0x131e28['isVisible']=!0x1:_0x131e28['refreshVisibility']());}}['_getExternalAuthor'](_0x3112d1){const _0x586ed0=this['context']['plugins']['get'](it),_0x34548f=pt('external:'+_0x3112d1),_0x1acf7f=_0x586ed0['getUser'](_0x34548f);return _0x1acf7f||_0x586ed0['addUser']({'id':_0x34548f,'name':_0x3112d1});}['_createNewComment']({threadId:_0xe3e87e,commentId:_0xb13192=_0x544806(),content:_0x531545,authorId:_0x1f1649,createdAt:_0x51a98f,attributes:_0x47b777}){if('string'!=typeof _0xb13192)throw new _0x27cf80('commentsrepository-invalid-commentid');if('string'!=typeof _0x1f1649)throw new _0x27cf80('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x531545||!_0x531545['trim']())throw new _0x27cf80('commentsrepository-invalid-comment-content');const _0x16056c=this['context']['plugins']['get'](it)['getUser'](_0x1f1649);if(!_0x16056c)throw new _0x27cf80('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1f1649});let _0x56888c=null,_0x3c5020=_0x51a98f;return _0x47b777?.['@external']&&(_0x56888c=this['_getExternalAuthor'](_0x47b777['@external']['authorName']),_0x3c5020=new Date(_0x47b777['@external']['createdAt'])),new fi(this,{'threadId':_0xe3e87e,'id':_0xb13192,'author':_0x56888c||_0x16056c,'creator':_0x16056c,'content':_0x531545,'createdAt':_0x51a98f,'authoredAt':_0x3c5020,'attributes':_0x47b777});}['_addComment'](_0x2fb09d){let {threadId:_0x3aaf46,content:_0x28150b,attributes:_0xbfaf75,isFromAdapter:_0x16c2df}=_0x2fb09d;const _0x1fb12e=this['getCommentThread'](_0x2fb09d['threadId']);if(!_0x1fb12e)throw new _0x27cf80('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x52bafe=this['_createNewComment'](_0x2fb09d),{id:_0x4879ab}=_0x52bafe;if(_0x1fb12e['_add'](_0x52bafe),_0x16c2df||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1fb12e['isSubmitted'])return Promise['resolve']();const _0x3abd90=this['context']['plugins']['get']('PendingActions'),{channelId:_0x59e454}=_0x1fb12e,_0x1a97bd=_0x3abd90['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xbfaf75||(_0xbfaf75={}),this['adapter']['addComment']({'channelId':_0x59e454,'threadId':_0x3aaf46,'commentId':_0x4879ab,'content':_0x28150b,'attributes':_0xbfaf75})['then'](_0x517381=>{_0x3abd90['remove'](_0x1a97bd),_0x517381&&this['_updateComment']({'channelId':_0x59e454,'threadId':_0x3aaf46,'commentId':_0x4879ab,'createdAt':_0x517381['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2d2f55=>{throw console['error'](_0x2d2f55),new _0x27cf80('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1f8e90,commentId:_0x1d5829,content:_0x2159c3,createdAt:_0x3d4e5a,attributes:_0xac1aca,isFromAdapter:_0xf03db3}){if(void 0x0!==_0x2159c3&&('string'!=typeof _0x2159c3||!_0x2159c3['trim']()['length']))throw new _0x27cf80('commentsrepository-update-comment-invalid-content');const _0x1e98ef=this['getCommentThread'](_0x1f8e90),_0x49d599=_0x1e98ef['getComment'](_0x1d5829);if(!_0x49d599)throw new _0x27cf80('commentsrepository-update-missing-comment',this);let _0x4aff65=!0x1;if(_0x2159c3&&_0x2159c3!==_0x49d599['content']&&(_0x49d599['isEditable']||_0xf03db3)&&(_0x49d599['content']=_0x2159c3,_0x4aff65=!0x0),_0x3d4e5a&&_0x3d4e5a!==_0x49d599['createdAt']&&(_0x49d599['createdAt']=_0x3d4e5a,_0x49d599['attributes']&&_0x49d599['attributes']['@external']||(_0x49d599['authoredAt']=_0x3d4e5a),_0x4aff65=!0x0),_0xac1aca&&!wt(_0xac1aca,_0x49d599['attributes'])&&(_0x49d599['attributes']=_0xac1aca,_0x4aff65=!0x0),!_0x4aff65)return Promise['resolve']();if(_0x1e98ef['fire']('commentUpdated'),_0xf03db3||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x30a531=this['context']['plugins']['get']('PendingActions'),{channelId:_0x289232}=this['getCommentThread'](_0x49d599['threadId']),_0x386f25=_0x30a531['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x289232,'threadId':_0x1f8e90,'commentId':_0x1d5829,'content':_0x2159c3,'attributes':_0xac1aca})['then'](()=>_0x30a531['remove'](_0x386f25))['catch'](_0x4c2d94=>{throw console['error'](_0x4c2d94),new _0x27cf80('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x27b8ba,commentId:_0x1e24f4,isFromAdapter:_0x176046}){const _0x1f44f1=this['getCommentThread'](_0x27b8ba),_0x1d2f4d=_0x1f44f1['getComment'](_0x1e24f4);if(!_0x1d2f4d)throw new _0x27cf80('commentsrepository-remove-missing-comment',this);if(_0x1f44f1['_remove'](_0x1d2f4d),_0x176046||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x46efcc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x352043}=_0x1f44f1,_0x3bbc07=_0x46efcc['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x352043,'threadId':_0x27b8ba,'commentId':_0x1e24f4})['then'](()=>_0x46efcc['remove'](_0x3bbc07))['catch'](_0x707638=>{throw console['error'](_0x707638),new _0x27cf80('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x31e545(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x221453,_0x57876a){super();const _0xe8f980=_0x57876a['isResolvable'];this['channelId']=_0x57876a['channelId'],this['id']=_0x57876a['id'],this['comments']=new _0x4d1d56(),this['_repository']=_0x221453,this['_isAttached']=!0x1,this['_isSubmitted']=_0x57876a['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x221453,'_permissions',_0x221453,'_readOnlyChannels',()=>_0x221453['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x221453,'_permissions',()=>_0x221453['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x221453,'_permissions',()=>{const _0x1e5f56=_0x221453['getPermissions'](this['channelId']);return _0x1e5f56['write']||_0x1e5f56['admin'];}),this['bind']('isResolvable')['to'](_0x221453,'_permissions',()=>_0xe8f980&&_0x221453['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x57876a['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4bb8e8,_0x4ef5db)=>_0x4bb8e8?_0x4ef5db?_0x4bb8e8<_0x4ef5db?_0x4bb8e8:_0x4ef5db:_0x4bb8e8:_0x4ef5db),this['set']('unlinkedAt',_0x57876a['unlinkedAt']||null),this['set']('resolvedAt',_0x57876a['resolvedAt']||null),this['set']('resolvedBy',_0x57876a['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5cf4ea=>!!_0x5cf4ea),this['set']('attributes',_0x57876a['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3c9a46,_0xe3ff55)=>_0x3c9a46+_0xe3ff55['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x479b7f,id:_0x2c2a8f}=this;this['_repository']['fire'](bt('submitCommentThread',_0x479b7f),{'channelId':_0x479b7f,'threadId':_0x2c2a8f});}['setUnlinkedAt'](_0xcbbca7){this['_update']({'unlinkedAt':_0xcbbca7});}['resolve']({resolvedAt:_0x398089=new Date(),resolvedBy:_0x13edd1=null,isFromAdapter:_0x33aa5c=!0x1}={}){const _0x52f20c=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x5b150a,id:_0x2cc7bc}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x5b150a),{'channelId':_0x5b150a,'threadId':_0x2cc7bc,'resolvedAt':_0x398089,'resolvedBy':_0x13edd1||_0x52f20c['id'],'isFromAdapter':_0x33aa5c});}['reopen']({isFromAdapter:_0x331703=!0x1}={}){const {channelId:_0x10bf82,id:_0x10c9eb}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x10bf82),{'channelId':_0x10bf82,'threadId':_0x10c9eb,'isFromAdapter':_0x331703});}['setContext'](_0x50b4b0){this['context']||this['_update']({'context':_0x50b4b0});}['setAttribute'](_0x4db404,_0x14ce8c){const _0x4bdfe7=It(this['attributes']);At(_0x4bdfe7,_0x4db404,_0x14ce8c),this['_update']({'attributes':_0x4bdfe7});}['removeAttribute'](_0x23ff65){const _0x244873=It(this['attributes']);yt(_0x244873,_0x23ff65),this['_update']({'attributes':_0x244873});}['remove']({isFromAdapter:_0x103ea7=!0x1}={}){const {channelId:_0x4fad25,id:_0x4042c5}=this;this['_repository']['fire'](bt('removeCommentThread',_0x4fad25),{'channelId':_0x4fad25,'threadId':_0x4042c5,'isFromAdapter':_0x103ea7});}['attachTo'](_0x48a6d2){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x48a6d2});}['addComment'](_0x556dbc){const {channelId:_0x22eace,id:_0x2971c8}=this;this['_repository']['fire'](bt('addComment',_0x22eace,_0x2971c8),Object['assign']({'channelId':_0x22eace,'threadId':_0x2971c8},_0x556dbc));}['getComment'](_0x5843f){if('string'!=typeof _0x5843f)throw new _0x27cf80('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5843f});return this['comments']['get'](_0x5843f);}['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'](_0x15a997=>_0x15a997['toJSON']()),'attributes':this['attributes']};}['_add'](_0x27fbff){return this['listenTo'](_0x27fbff,'change:authoredAt',()=>{const _0x49a717=this['_findOptimalIndex'](_0x27fbff),_0x13c7fd=this['comments'];_0x49a717-0x1!=_0x13c7fd['getIndex'](_0x27fbff)&&_0x49a717+0x1!=_0x13c7fd['getIndex'](_0x27fbff)&&(this['_remove'](_0x27fbff),this['_add'](_0x27fbff));}),this['comments']['add'](_0x27fbff,this['_findOptimalIndex'](_0x27fbff));}['_update'](_0x10083d){const {channelId:_0x38f84e,id:_0x108396}=this;this['_repository']['fire'](bt('updateCommentThread',_0x38f84e),{..._0x10083d,'channelId':_0x38f84e,'threadId':_0x108396});}['_remove'](_0x5c5a45){return this['stopListening'](_0x5c5a45),_0x5c5a45['destroy'](),this['comments']['remove'](_0x5c5a45);}['_findOptimalIndex'](_0x5ba5e4){const _0x56ec7e=this['comments']['find'](_0x40e38b=>new Date(_0x40e38b['authoredAt'])['getTime']()>new Date(_0x5ba5e4['authoredAt'])['getTime']());return _0x56ec7e?this['comments']['getIndex'](_0x56ec7e):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x31e545(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x47e5d7,_0x28c29e){super();const _0x1f9736=_0x47e5d7['context']['plugins']['get'](it)['me'],_0x2fcd61=_0x47e5d7['getCommentThread'](_0x28c29e['threadId']),_0x2d89ba=0x0===_0x2fcd61['comments']['length'],_0x35b351=_0x1f9736===_0x28c29e['author'];this['id']=_0x28c29e['id'],this['threadId']=_0x28c29e['threadId'],this['author']=_0x28c29e['author'],this['creator']=_0x28c29e['creator'],this['isExternal']=Boolean(_0x28c29e['attributes']&&_0x28c29e['attributes']['@external']),this['set']('content',_0x28c29e['content']),this['createdAt']=_0x28c29e['createdAt']||new Date(),this['set']('authoredAt',_0x28c29e['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2fcd61,'resolvedAt'),this['set']('attributes',_0x28c29e['attributes']||{}),this['bind']('isEditable')['to'](_0x47e5d7,'_permissions',()=>{const _0x4a843f=_0x47e5d7['getPermissions'](_0x2fcd61['channelId'])['write'],_0x5d1717=_0x47e5d7['getPermissions'](_0x2fcd61['channelId'])['modifyAll'];return _0x35b351&&_0x4a843f||!_0x35b351&&_0x5d1717;}),this['bind']('isRemovable')['to'](_0x2fcd61,'isRemovable',_0x47e5d7,'_permissions',_0x2ffe19=>{const _0x2a8619=_0x47e5d7['getPermissions'](_0x2fcd61['channelId'])['write'],_0x4930b9=_0x47e5d7['getPermissions'](_0x2fcd61['channelId'])['modifyAll'];return _0x35b351&&_0x2a8619||_0x2ffe19&&_0x2d89ba||!_0x35b351&&_0x4930b9&&!_0x2d89ba;}),this['bind']('isReadOnly')['to'](_0x2fcd61,'isReadOnly'),this['_repository']=_0x47e5d7;}get['weight'](){return Math['max'](function(_0x1c0a63){const _0x2b20d2=document['createElement']('div');return _0x2b20d2['innerHTML']=_0x1c0a63,_0x2b20d2['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1f8ce0){const {threadId:_0x170b4c,id:_0x508870}=this;if(!this['_repository']['hasCommentThread'](_0x170b4c))throw new _0x27cf80('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xb2cffd}=this['_repository']['getCommentThread'](_0x170b4c);this['_repository']['fire'](bt('updateComment',_0xb2cffd,_0x170b4c),{'channelId':_0xb2cffd,'threadId':_0x170b4c,'commentId':_0x508870,..._0x1f8ce0});}['setAttribute'](_0x4e800a,_0x4e42ac){const _0x106033=It(this['attributes']);At(_0x106033,_0x4e800a,_0x4e42ac),this['update']({'attributes':_0x106033});}['removeAttribute'](_0x124f2c){const _0x177677=It(this['attributes']);yt(_0x177677,_0x124f2c),this['update']({'attributes':_0x177677});}['remove'](_0x474181={}){if(!_0x474181['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1bc50c,id:_0x893e40}=this;if(!this['_repository']['hasCommentThread'](_0x1bc50c))throw new _0x27cf80('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x34dea3}=this['_repository']['getCommentThread'](_0x1bc50c);this['_repository']['fire'](bt('removeComment',_0x34dea3,_0x1bc50c),{'channelId':_0x34dea3,'threadId':_0x1bc50c,'commentId':_0x893e40,..._0x474181});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x37f88f,..._0x32cb60){for(const _0x203109 of _0x32cb60)void 0x0!==_0x203109&&(_0x37f88f+=':'+String(_0x203109));return _0x37f88f;}class J extends _0x20aed2{['refresh'](){const _0x35a7aa=this['editor']['model']['document']['selection'];for(const _0x19cd5b of _0x35a7aa['getRanges']())if(this['_hasContent'](_0x19cd5b))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x22d470=_0x544806()}={}){const _0x1d2e3d=this['editor']['model'],_0x5a9a7e=[];for(const _0x1acf4e of _0x1d2e3d['document']['selection']['getRanges']())this['_hasContent'](_0x1acf4e)&&_0x5a9a7e['push'](this['_trimToContent'](_0x1acf4e));_0x1d2e3d['change'](_0x3b9a92=>{for(const _0x486592 of _0x5a9a7e){const _0x3e1ffc=_0x544806()['substr'](0x1,0x5),_0x5d0123='comment:'+_0x22d470+':'+_0x3e1ffc;_0x3b9a92['addMarker'](_0x5d0123,{'range':_0x486592,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x1d83e0){for(const _0x156986 of _0x1d83e0['getItems']())if(this['_itemIsContent'](_0x156986))return!0x0;return!0x1;}['_itemIsContent'](_0x42cc35){return _0x42cc35['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x42cc35)&&!_0x42cc35['is']('element','tableCell');}['_trimToContent'](_0x78d5ac){const _0x2e7377=_0x4fb282=>!this['_itemIsContent'](_0x4fb282['item']),_0x4271be=_0x78d5ac['start']['getLastMatchingPosition'](_0x2e7377),_0x296406=_0x78d5ac['end']['getLastMatchingPosition'](_0x2e7377,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4271be,_0x296406);}}class P extends _0x5e77f7{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x344420){super(_0x344420),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x220f8e=this['editor'],_0x33bd7a=_0x220f8e['model']['document']['selection'],_0x4ab6d7=_0x3276fe(()=>this['refreshSelectedViews'](),0xa);_0x33bd7a['on']('change:range',(_0x1198d1,_0x309946)=>{_0x309946['directChange']&&(_0x4ab6d7['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x220f8e['editing']['view']['document'],'change:isFocused',(_0x38cf51,_0x4e8500,_0x486665)=>{_0x486665&&_0x4ab6d7();}),this['listenTo'](_0x220f8e['ui']['focusTracker'],'change:isFocused',(_0x2dddc7,_0x3c7d95,_0x42d19d)=>{_0x42d19d||_0x220f8e['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x56104c=>this['_editorAnnotationsData']['has'](_0x56104c['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2e1dc5){if(this['_editorAnnotations']['has'](_0x2e1dc5['view']))return;this['_editorAnnotations']['add'](_0x2e1dc5['view']),this['editor']['ui']['focusTracker']['add'](_0x2e1dc5['view']['element']);const _0x34de34=this['editor']['plugins']['get'](O);this['listenTo'](_0x34de34['collection'],'remove',(_0x58ab26,_0x4249dc)=>{this['editor']['ui']['focusTracker']['remove'](_0x4249dc['view']['element']),this['_editorAnnotations']['delete'](_0x4249dc['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4d6636){if('function'!=typeof _0x4d6636)throw new _0x27cf80('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4d6636);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3bae0f,annotations:_0x28bdaf}){const _0x536b4c=[],_0x4718af=this['editor']['model']['document']['selection'],_0x31c61e=Array['from'](_0x4718af['getRanges']());for(const [_0x52873b,_0x38a64c]of this['_editorAnnotationsData']){const _0x47eb57=_0x232341(_0x38a64c),_0x16f6f9=_0x28bdaf['getByInnerView'](_0x52873b);_0x47eb57&&_0x16f6f9&&_0x536b4c['push']({'annotation':_0x16f6f9,'range':_0x47eb57});}function _0x232341(_0x30ad18){for(const _0x537534 of _0x30ad18)for(const _0x26d0a3 of _0x31c61e)if(_0x537534['containsRange'](_0x26d0a3,!_0x4718af['isCollapsed']))return _0x537534;return null;}return _0x536b4c['sort']((_0x2a14d2,_0x10e4f0)=>{const _0x333443=_0x2a14d2['range'],_0x42dde2=_0x10e4f0['range'];if(!_0x333443['isEqual'](_0x42dde2)){if(_0x333443['containsRange'](_0x42dde2,!0x0))return 0x1;if(_0x42dde2['containsRange'](_0x333443,!0x0))return-0x1;}return _0x2a14d2['annotation']==_0x3bae0f?-0x1:_0x10e4f0['annotation']==_0x3bae0f?0x1:0x0;})['map'](_0x8d4fc=>_0x8d4fc['annotation']);}get['_editorAnnotationsData'](){const _0x235e92=new Map();for(const _0x4801b5 of Array['from'](this['_dataCollectors']))for(const [_0x2e3654,_0x56f224]of _0x4801b5())_0x235e92['set'](_0x2e3654,_0x56f224);return _0x235e92;}}class st extends _0x5e77f7{['afterInit'](){const _0x461699=this['editor'];if(!_0x461699['plugins']['has']('RestrictedEditingModeEditing'))return;_0x461699['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x5e77f7{constructor(_0x377fed){super(_0x377fed),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x16662c=this['editor'],_0xaa5977=_0x16662c['commands']['get']('importWord'),_0x108f88=_0x16662c['plugins']['get'](it);_0xaa5977&&(_0xaa5977['on']('execute',(_0x3daceb,[,_0x5236fc])=>{_0x5236fc['collaboration_features']={'comments':!0x0,'user_id':_0x108f88['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0xaa5977,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3e720e,_0x38b457){const {comment_threads:_0x4b7776}=_0x38b457;_0x4b7776&&_0x4b7776['forEach'](({thread_id:_0xaac47,comments:_0x5ba6ac,is_resolved:_0x30083c})=>{const _0x3f9ed4=new Date(),_0xd35ce3=_0x5ba6ac['map'](({author:_0x30a81c,content:_0x11cbf0,created_at:_0x2aa4b0})=>({'content':_0x11cbf0,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x3f9ed4,'attributes':{'@external':{'authorName':_0x30a81c,'createdAt':_0x2aa4b0?new Date(_0x2aa4b0):new Date(),'source':'importWord'}}})),_0x206d91=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x206d91,'threadId':_0xaac47,'comments':_0xd35ce3,'resolvedAt':_0x30083c?_0x3f9ed4:null});});}}class at extends _0x5e77f7{constructor(_0x1d9ecb){super(_0x1d9ecb),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x23e0bf=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x23e0bf,'contentInsertion',(_0x4df0bf,_0x36e9e8)=>this['_removeMarkersWithoutThreads'](_0x36e9e8['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x5cbbd2){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5cbbd2;const _0x51510a=this['editor']['plugins']['get']('CommentsRepository');for(const _0x15f0aa of _0x5cbbd2['keys']()){const [_0x53dafa,_0x458314]=_0x15f0aa['split'](':');'comment'!=_0x53dafa||_0x51510a['hasCommentThread'](_0x458314)||_0x5cbbd2['delete'](_0x15f0aa);}return _0x5cbbd2;}['_registerMarkerInClipboardPipeline'](){const _0x2ac017=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x6009e7=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x6009e7&&_0x2ac017['_registerMarkerToCopy']('comment',_0x6009e7);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x127249){switch(_0x127249){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x5e77f7{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xc7d327,_0x2712d7)=>{if(!_0x2712d7['options']['showCommentHighlights'])return null;if(_0x2712d7['options']['ignoreResolvedComments']){const {id:_0x4b9907}=er(_0xc7d327['markerName']),_0x5adf8b=this['editor']['plugins']['get'](o);if(_0x5adf8b['getCommentThread'](_0x4b9907)?.['isResolved']&&_0xc7d327['item'])return _0x2712d7['consumable']['consume'](_0xc7d327['item'],'addMarker:'+_0xc7d327['markerName']),_0x2712d7['consumable']['consume'](_0xc7d327['item'],'removeMarker:'+_0xc7d327['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2b8837=>{_0x2b8837['on']('addMarker:comment',(_0x115c42,_0x57016c,_0x341641)=>{if(!_0x341641['options']['showCommentHighlights'])return;const _0x397728=_0x57016c['item'];if(!_0x397728)return;const _0x28b873=_0x341641['mapper']['toViewElement'](_0x397728);this['editor']['model']['schema']['isObject'](_0x397728)&&_0x28b873&&!_0x28b873['getCustomProperty']('widget')&&_0x28b873['is']('containerElement')&&_0x3e1204(_0x28b873,_0x341641['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x547fca,{writer:_0x56f127,options:_0x5d1365})=>{if(!_0x5d1365['showCommentHighlights'])return null;const _0x29e462=_0x56f127['createContainerElement']('div'),_0x408b4f=_0x56f127['createEmptyElement']('hr');return _0x56f127['addClass']('ck-horizontal-line',_0x29e462),_0x56f127['insert'](_0x56f127['createPositionAt'](_0x29e462,0x0),_0x408b4f),_0x29e462;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5e3c7e,{writer:_0x590489,options:_0x1d5917})=>{if(!_0x1d5917['showCommentHighlights'])return null;const _0x20ea1=_0x590489['createContainerElement']('span'),_0x2c87ac=_0x590489['createEmptyElement']('img');return _0x590489['addClass']('image-inline',_0x20ea1),_0x590489['insert'](_0x590489['createPositionAt'](_0x20ea1,0x0),_0x2c87ac),_0x20ea1;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2d3cfc,{writer:_0x3f1229,options:_0x5f47fb})=>{if(_0x5f47fb['showCommentHighlights'])return _0x3f1229['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xd5391d,_0xf29cea,_0x17119e)=>{_0x17119e['options']['showCommentHighlights']&&_0xd5391d['stop']();},{'priority':'high'});}}class r extends _0x5e77f7{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12cd82){super(_0x12cd82),this['set']('isThreadsLoadingPaused',!0x0),_0x12cd82['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3a4145,_0x2e67f5,_0x29006d,_0x4e9fe8)=>{const _0x4efa38=_0x12cd82['plugins']['get'](o),_0xcd38a=_0x29006d?er(_0x29006d)['id']:null;_0x12cd82['model']['change'](()=>{if(_0xcd38a){const _0x5720d9=this['getAllMarkersForId'](_0xcd38a);for(const _0x2343ae of _0x5720d9)_0x12cd82['editing']['reconvertMarker'](_0x2343ae);}if(_0x4e9fe8){const {id:_0x5a8d79}=er(_0x4e9fe8),_0x25c211=_0x4efa38['getCommentThread'](_0x5a8d79);if(_0x25c211&&_0x25c211['unlinkedAt'])return;if(_0x25c211&&!_0x25c211['isAttached'])return;const _0x27a489=this['getAllMarkersForId'](_0x5a8d79);for(const _0x5ec0b0 of _0x27a489)_0x12cd82['editing']['reconvertMarker'](_0x5ec0b0);}}),_0xcd38a&&this['scrollToThreadMarker'](_0xcd38a);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5063c1=this['editor'],_0x59b38e=_0x5063c1['plugins']['get'](o),_0x1c2859=_0x5063c1['config']['get']('collaboration.channelId'),_0x3d3334=_0x59b38e['getCommentThreads']()['filter'](_0x3a6700=>_0x3a6700['channelId']!==_0x1c2859);_0x5063c1['commands']['add']('addCommentThread',new J(_0x5063c1)),this['listenTo'](_0x5063c1,'change:isReadOnly',(_0x2dd038,_0x2b5b7a,_0x26e08f)=>{_0x59b38e['switchReadOnly'](_0x26e08f,_0x5063c1['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x59b38e,ft('addCommentThread',_0x1c2859),(_0x111563,{threadId:_0x43cd4e})=>{const _0x4919e2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x43cd4e);_0x4919e2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x43cd4e);}),this['listenTo'](_0x59b38e,ft('removeCommentThread',_0x1c2859),(_0x2cf234,{threadId:_0x1cd9fb})=>{_0x5063c1['model']['enqueueChange']({'isUndoable':!0x1},_0x3941e0=>{const _0x50b20f=this['getAllMarkersForId'](_0x1cd9fb);for(const _0xabc354 of _0x50b20f)_0x3941e0['removeMarker'](_0xabc354);});}),this['listenTo'](_0x59b38e,ft('resolveCommentThread',_0x1c2859),(_0x2311fb,{threadId:_0x48395f})=>{(this['_reconvertMarkers'](_0x48395f),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x48395f)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x59b38e,ft('reopenCommentThread',_0x1c2859),(_0x25a5a9,{threadId:_0x573cbb})=>{this['_reconvertMarkers'](_0x573cbb);},{'priority':'low'}),this['listenTo'](_0x59b38e,ft('addComment',_0x1c2859),(_0x26ba1d,{threadId:_0x562884,isFromAdapter:_0x2f6bbd})=>{const _0x2fd6ed=this['getAllMarkersForId'](_0x562884);if(_0x2f6bbd||0x0==_0x2fd6ed['length']||!_0x59b38e['hasCommentThread'](_0x562884))return;0x1===_0x59b38e['getCommentThread'](_0x562884)['length']&&_0x5063c1['model']['enqueueChange']({'isUndoable':!0x1},_0xa2a720=>{for(const _0x435c92 of _0x2fd6ed)_0xa2a720['updateMarker'](_0x435c92,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3d3334);}['afterInit'](){!async function(_0x5ec96c){const _0x51d389=_0x4f751c([0x34,0x72,0x6d,0x6f,0x32,0x6a,0x31,0x7a,0x46,0x61,0x51,0x4c,0x70,0x64,0x5a,0x77,0x55,0x45,0x44,0x56,0x33,0x69,0x75,0x30,0x54,0x41,0x62,0x47,0x76,0x68,0x4d,0x79,0x36,0x6e,0x66,0x4b,0x4f,0x78,0x67,0x59,0x52,0x4e,0x65,0x50,0x38,0x73,0x49,0x74,0x42,0x6c,0x71,0x58,0x39,0x48,0x4a,0x37,0x63,0x6b,0x57,0x53,0x35,0x43]),_0x5ea6f3=0x1deed81e,_0xd69b8=0x1de9b31e^_0x5ea6f3,_0x3404b7=window[_0x4f751c([0x44,0x61,0x74,0x65])][_0x4f751c([0x6e,0x6f,0x77])](),_0x47d72d=_0x5ec96c[_0x4f751c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x26115e=new window[(_0x4f751c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x433ea3=>{_0x47d72d[_0x4f751c([0x6f,0x6e,0x63,0x65])](_0x4f751c([0x72,0x65,0x61,0x64,0x79]),_0x433ea3);}),_0x1cdd42={[_0x4f751c([0x6b,0x74,0x79])]:_0x4f751c([0x45,0x43]),[_0x4f751c([0x75,0x73,0x65])]:_0x4f751c([0x73,0x69,0x67]),[_0x4f751c([0x63,0x72,0x76])]:_0x4f751c([0x50,0x2d,0x32,0x35,0x36]),[_0x4f751c([0x78])]:_0x4f751c([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]),[_0x4f751c([0x79])]:_0x4f751c([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]),[_0x4f751c([0x61,0x6c,0x67])]:_0x4f751c([0x45,0x53,0x32,0x35,0x36])},_0xece2eb=_0x47d72d[_0x4f751c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f751c([0x67,0x65,0x74])](_0x4f751c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1dff13(){let _0x1edd83,_0x5dc3a1=null,_0xd13024=null;try{if(_0xece2eb==_0x4f751c([0x47,0x50,0x4c]))return _0x4f751c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1edd83=_0x59a184(),!_0x1edd83)return _0x4f751c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1edd83[_0x4f751c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xd13024=_0x58cede(_0x1edd83[_0x4f751c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1edd83[_0x4f751c([0x6a,0x74,0x69])])),await _0x52d48a()?_0x11d7b2()?_0x3a7853()?_0x4f751c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x29d2ce()?(_0x1edd83[_0x4f751c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f751c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5dc3a1=_0x10a405(_0x4f751c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1edd83[_0x4f751c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f751c([0x74,0x72,0x69,0x61,0x6c])&&(_0x5dc3a1=_0x10a405(_0x4f751c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x28002b()):_0x4f751c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f751c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f751c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4f751c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3a7853(){const _0x5e4640=[_0x4f751c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f751c([0x74,0x72,0x69,0x61,0x6c])][_0x4f751c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1edd83[_0x4f751c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3404b7/0x3e8:0xe10*_0xd69b8;return _0x1edd83[_0x4f751c([0x65,0x78,0x70])]<_0x5e4640;}function _0x11d7b2(){const _0x2ceaf2=_0x1edd83[_0x4f751c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2ceaf2)return!0x1;if(_0x2ceaf2[_0x4f751c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f751c([0x2a])))return!0x0;if(_0x2ceaf2[_0x4f751c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f751c([0x43,0x4d,0x54])))return!0x0;if(_0x2ceaf2[_0x4f751c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f751c([0x52,0x43,0x4d,0x54]))){if(_0x1babc9())return!0x0;if(_0x20a7cc()||_0x58f45f())return!0x0;}return!0x1;}function _0x29d2ce(){const _0x2a43ef=_0x1edd83[_0x4f751c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2a43ef||0x0==_0x2a43ef[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xbe9a32}=new URL(window[_0x4f751c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2a43ef[_0x4f751c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbe9a32))return!0x0;const _0x3df995=_0xbe9a32[_0x4f751c([0x73,0x70,0x6c,0x69,0x74])](_0x4f751c([0x2e]));return _0x2a43ef[_0x4f751c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5d0889=>_0x5d0889[_0x4f751c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f751c([0x2a])))[_0x4f751c([0x6d,0x61,0x70])](_0x2e923e=>_0x2e923e[_0x4f751c([0x73,0x70,0x6c,0x69,0x74])](_0x4f751c([0x2e])))[_0x4f751c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb91a49=>_0xb91a49[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3df995[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f751c([0x6d,0x61,0x70])](_0x5d5bb7=>Array(_0x3df995[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5d5bb7[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f751c([0x66,0x69,0x6c,0x6c])](_0x5d5bb7[0x0]===_0x4f751c([0x2a])?_0x4f751c([0x2a]):'')[_0x4f751c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5d5bb7))[_0x4f751c([0x73,0x6f,0x6d,0x65])](_0x3a6064=>_0x3df995[_0x4f751c([0x65,0x76,0x65,0x72,0x79])]((_0x4728b4,_0x1073f9)=>_0x3a6064[_0x1073f9]===_0x4728b4||_0x3a6064[_0x1073f9]===_0x4f751c([0x2a])));}function _0x28002b(){return _0x5dc3a1&&_0xd13024?new window[(_0x4f751c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x51b1cd,_0x334855)=>{_0x5dc3a1[_0x4f751c([0x74,0x68,0x65,0x6e])](_0x51b1cd,_0x334855),_0xd13024[_0x4f751c([0x74,0x68,0x65,0x6e])](_0xe1c2cb=>{_0xe1c2cb!=_0x4f751c([0x56,0x61,0x6c,0x69,0x64])&&_0x51b1cd(_0xe1c2cb);},_0x334855);}):_0x5dc3a1||_0xd13024||_0x4f751c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x58cede(_0x33c0ad,_0x343b55){return new window[(_0x4f751c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3729e7=>{if(_0x2882a7())return _0x3729e7(_0x4f751c([0x56,0x61,0x6c,0x69,0x64]));_0x3c7ac2(),_0x47d72d[_0x4f751c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f751c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4d44f3=!0x1;const _0x122e6a=_0x544806();function _0x28fc86(_0x72d554){return!!_0x72d554&&(typeof _0x72d554===_0x4f751c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x72d554===_0x4f751c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x72d554[_0x4f751c([0x74,0x68,0x65,0x6e])]===_0x4f751c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x72d554[_0x4f751c([0x63,0x61,0x74,0x63,0x68])]===_0x4f751c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x23ff6d(_0x54cc63){_0x412b55(_0x54cc63)[_0x4f751c([0x74,0x68,0x65,0x6e])](_0x2b93fc=>{if(!_0x2b93fc||_0x2b93fc[_0x4f751c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f751c([0x6f,0x6b]))return _0x4f751c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x45b250(_0x7f8095(_0x122e6a+_0x343b55))!=_0x2b93fc[_0x4f751c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f751c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f751c([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f751c([0x74,0x68,0x65,0x6e])](_0x18e63e=>(_0x181c3c(),_0x18e63e),()=>{const _0x4462b2=_0x531832();return null==_0x4462b2?(_0x181c3c(),_0x4f751c([0x56,0x61,0x6c,0x69,0x64])):_0x4f751c(_0x3404b7-_0x4462b2>(0x39e25c1e^_0x5ea6f3)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f751c([0x74,0x68,0x65,0x6e])](_0x3729e7)[_0x4f751c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3729e7(_0x4f751c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xb76ff4=0x1dd8369e^_0x5ea6f3;function _0x181c3c(){const _0x2a6ead=_0x4f751c([0x6c,0x6c,0x63,0x74,0x2d])+_0x45b250(_0x7f8095(_0x33c0ad)),_0x58955b=_0x4e3ab4(_0x45b250(window[_0x4f751c([0x4d,0x61,0x74,0x68])][_0x4f751c([0x63,0x65,0x69,0x6c])](_0x3404b7/_0xb76ff4)));window[_0x4f751c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f751c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2a6ead,_0x58955b);}function _0x531832(){const _0x5a7a16=_0x4f751c([0x6c,0x6c,0x63,0x74,0x2d])+_0x45b250(_0x7f8095(_0x33c0ad)),_0x41c9c4=window[_0x4f751c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f751c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5a7a16);return _0x41c9c4?window[_0x4f751c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e3ab4(_0x41c9c4),0x10)*_0xb76ff4:null;}function _0x412b55(_0x41682){return new window[(_0x4f751c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x17ba4b,_0x22ff7b)=>{_0x41682[_0x4f751c([0x74,0x68,0x65,0x6e])](_0x17ba4b,_0x22ff7b),window[_0x4f751c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x22ff7b,0x1def0cde^_0x5ea6f3);});}}_0x47d72d[_0x4f751c([0x6f,0x6e])](_0x4f751c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xf6c4c4,_0xbd248d)=>{if(_0xbd248d[0x0]!=_0x33c0ad)return _0x3729e7(_0x4f751c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xbd248d[0x1]={..._0xbd248d[0x1],[_0x4f751c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x122e6a};},{[_0x4f751c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f751c([0x68,0x69,0x67,0x68])}),_0x47d72d[_0x4f751c([0x6f,0x6e])](_0x4f751c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x437b06=>{_0x28fc86(_0x437b06[_0x4f751c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4d44f3=!0x0,_0x23ff6d(_0x437b06[_0x4f751c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f751c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f751c([0x6c,0x6f,0x77])}),_0x26115e[_0x4f751c([0x74,0x68,0x65,0x6e])](()=>{_0x4d44f3||_0x3729e7(_0x4f751c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2882a7(){return _0x47d72d[_0x4f751c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f751c([0x76,0x69,0x65,0x77])][_0x4f751c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f751c([0x61,0x75,0x74,0x6f]);}function _0x3c7ac2(){_0x47d72d[_0x4f751c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f751c([0x76,0x69,0x65,0x77])][_0x4f751c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f751c([0x61,0x75,0x74,0x6f]);}}function _0x10a405(_0x25b061){const _0x185ae4=[new window[(_0x4f751c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a1d92=>setTimeout(_0x5a1d92,0x1de7e6d2^_0x5ea6f3)),_0x26115e[_0x4f751c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f751c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x23e727=>{let _0x2f701a=0x0;_0x47d72d[_0x4f751c([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f751c([0x6f,0x6e])](_0x4f751c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x37d575,_0x2f437d)=>{_0x2f437d[0x0][_0x4f751c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2f701a++,_0x2f701a==(0x1deed9e6^_0x5ea6f3)&&(_0x23e727(),_0x37d575[_0x4f751c([0x6f,0x66,0x66])]());});}))];return window[_0x4f751c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f751c([0x72,0x61,0x63,0x65])](_0x185ae4)[_0x4f751c([0x74,0x68,0x65,0x6e])](()=>_0x25b061);}async function _0x863dd7(){await _0x26115e,_0x47d72d[_0x4f751c([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f751c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1e855f,_0x47d72d[_0x4f751c([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f751c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1e855f,_0x47d72d[_0x4f751c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f751c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1babc9(){return _0xbdc275(_0x4f751c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x303716(_0x4f751c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4f751c([0x73,0x74,0x61,0x74,0x65])]==_0x4f751c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x20a7cc(){return _0xbdc275(_0x4f751c([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 _0x58f45f(){return _0xbdc275(_0x4f751c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x19340e(_0x2f922b){const _0x12b253=_0x5a7953();_0x47d72d[_0x12b253]=_0x4f751c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2f922b,_0x2f922b!=_0x4f751c([0x56,0x61,0x6c,0x69,0x64])&&_0x863dd7();}function _0x5a7953(){const _0x4e9208=window[_0x4f751c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f751c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f751c([0x6e,0x6f,0x77])]())[_0x4f751c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f751c([0x2e]),'');let _0x5368aa=_0x4f751c([0x72]);for(let _0x20e1b9=0x0;_0x20e1b9<_0x4e9208[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20e1b9+=0x2){let _0x100994=window[_0x4f751c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e9208[_0x4f751c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x20e1b9,_0x20e1b9+0x2));_0x100994>=_0x51d389[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x100994-=_0x51d389[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5368aa+=_0x51d389[_0x100994];}return _0x5368aa;}function _0x59a184(){const _0x14f907=_0xece2eb[_0x4f751c([0x73,0x70,0x6c,0x69,0x74])](_0x4f751c([0x2e]));if(0x3!=_0x14f907[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2a6f1f(_0x14f907[0x1]);function _0x2a6f1f(_0x52dc2b){const _0x306227=_0x3ec1ff(_0x52dc2b);return _0x306227&&_0x2b5557()?_0x306227:null;function _0x2b5557(){const _0x4584b1=_0x306227[_0x4f751c([0x6a,0x74,0x69])],_0x5b20d6=window[_0x4f751c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4584b1[_0x4f751c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4584b1[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x6ef417={..._0x306227,[_0x4f751c([0x6a,0x74,0x69])]:_0x4584b1[_0x4f751c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4584b1[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x6ef417[_0x4f751c([0x76,0x63])],_0x7f8095(_0x6ef417)==_0x5b20d6;}}}async function _0x52d48a(){let _0x3e02fc=!0x0;try{const _0x1df0e8=_0xece2eb[_0x4f751c([0x73,0x70,0x6c,0x69,0x74])](_0x4f751c([0x2e])),[_0x3c8737,_0x5b8986,_0x50fb07]=_0x1df0e8;return _0x3e9c3f(_0x3c8737),await _0x447af6(_0x3c8737,_0x5b8986,_0x50fb07),_0x3e02fc;}catch{return!0x1;}function _0x3e9c3f(_0x15ee27){const _0x471a39=_0x3ec1ff(_0x15ee27);_0x471a39&&_0x471a39[_0x4f751c([0x61,0x6c,0x67])]==_0x4f751c([0x45,0x53,0x32,0x35,0x36])||(_0x3e02fc=!0x1);}async function _0x447af6(_0x31ce41,_0x470ad1,_0x58a202){const _0x2b7ffd=window[_0x4f751c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f751c([0x66,0x72,0x6f,0x6d])](_0x179d85(_0x58a202),_0x329daf=>_0x329daf[_0x4f751c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4f549f=new window[(_0x4f751c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f751c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x31ce41+_0x4f751c([0x2e])+_0x470ad1),_0x340b26=window[_0x4f751c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f751c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x340b26)return;const _0xe321b9=await _0x340b26[_0x4f751c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f751c([0x6a,0x77,0x6b]),_0x1cdd42,{[_0x4f751c([0x6e,0x61,0x6d,0x65])]:_0x4f751c([0x45,0x43,0x44,0x53,0x41]),[_0x4f751c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f751c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f751c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x340b26[_0x4f751c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f751c([0x6e,0x61,0x6d,0x65])]:_0x4f751c([0x45,0x43,0x44,0x53,0x41]),[_0x4f751c([0x68,0x61,0x73,0x68])]:{[_0x4f751c([0x6e,0x61,0x6d,0x65])]:_0x4f751c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xe321b9,_0x2b7ffd,_0x4f549f)||(_0x3e02fc=!0x1);}}function _0x3ec1ff(_0x398940){return _0x398940[_0x4f751c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f751c([0x65,0x79]))?JSON[_0x4f751c([0x70,0x61,0x72,0x73,0x65])](_0x179d85(_0x398940)):null;}function _0x179d85(_0x5dae3a){return window[_0x4f751c([0x61,0x74,0x6f,0x62])](_0x5dae3a[_0x4f751c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f751c([0x2b]))[_0x4f751c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f751c([0x2f])));}function _0x7f8095(_0x4d37b8){let _0x5a9077=0x1505;function _0x651929(_0x4112c5){for(let _0x25d5ab=0x0;_0x25d5ab<_0x4112c5[_0x4f751c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25d5ab++){const _0x3953bb=_0x4112c5[_0x4f751c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x25d5ab);_0x5a9077=(_0x5a9077<<0x5)+_0x5a9077+_0x3953bb,_0x5a9077&=_0x5a9077;}}function _0x4d7275(_0x1819c7){Array[_0x4f751c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1819c7)?_0x1819c7[_0x4f751c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4d7275):_0x1819c7&&typeof _0x1819c7==_0x4f751c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f751c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1819c7)[_0x4f751c([0x73,0x6f,0x72,0x74])]()[_0x4f751c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4a5829,_0x39e90a])=>{_0x651929(_0x4a5829),_0x4d7275(_0x39e90a);}):_0x651929(window[_0x4f751c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1819c7));}return _0x4d7275(_0x4d37b8),_0x5a9077>>>0x0;}function _0x45b250(_0x3eea2d){return _0x3eea2d[_0x4f751c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f751c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f751c([0x30]));}function _0x4e3ab4(_0x18f794){return _0x18f794[_0x4f751c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f751c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f751c([0x6a,0x6f,0x69,0x6e])]('');}function _0xbdc275(_0x2532e8){return _0x47d72d[_0x4f751c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f751c([0x68,0x61,0x73])](_0x2532e8);}function _0x303716(_0x3addce){return _0x47d72d[_0x4f751c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f751c([0x67,0x65,0x74])](_0x3addce);}function _0x1e855f(){}function _0x4f751c(_0x4c7d60){return _0x4c7d60['map'](_0x214b8a=>String['fromCharCode'](_0x214b8a))['join']('');}_0x19340e(await _0x1dff13());}(this);}['destroy'](){const _0x25cccc=this['editor']['plugins']['get'](o),_0xb270d7=this['editor']['config']['get']('collaboration.channelId');for(const _0x38d7bd of _0x25cccc['getCommentThreads']({'channelId':_0xb270d7}))_0x25cccc['_detachCommentThread'](_0x38d7bd['id']),_0x25cccc['_threads']['delete'](_0x38d7bd['id']);super['destroy']();}['hasMarkerForId'](_0x42460c){return this['getAllMarkersForId'](_0x42460c)['length']>0x0;}['getAllMarkersForId'](_0x168e5b){const _0x534b62=[];for(const _0x148cd7 of this['editor']['model']['markers'])_0x148cd7['name']['startsWith']('comment:'+_0x168e5b)&&_0x534b62['push'](_0x148cd7);return _0x534b62;}['scrollToThreadMarker'](_0x2ec64b){const _0x177452=this['_getTargetForId'](_0x2ec64b);_0x177452&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x2ec64b&&rt({'target':_0x177452[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xd03bf1){this['editor']['model']['change'](()=>{for(const _0x4e0196 of this['getAllMarkersForId'](_0xd03bf1))this['editor']['editing']['reconvertMarker'](_0x4e0196);});}['_attachArchivedThread'](_0x206f99){const _0xfbc01=this['editor']['plugins']['get'](o),_0x552187=this['editor']['plugins']['get'](P),_0x19ea3f=_0xfbc01['getCommentThread'](_0x206f99);if(!_0x19ea3f['isAttached']){const _0x429c7a=_0x19ea3f['attachTo'](()=>this['_getTargetForId'](_0x19ea3f['id']));_0x552187['registerAnnotation'](_0x429c7a),_0x19ea3f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x352f68=this['editor'],_0x411eed=_0x352f68['plugins']['get'](it);_0x352f68['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x329272,_0x7cdc7)=>{const {id:_0x549028}=er(_0x329272['markerName']),_0x35e754=_0x352f68['plugins']['get'](o)['getCommentThread'](_0x549028),_0x5822a7=this['activeMarker']&&er(this['activeMarker'])['id']===_0x549028;let _0x2c56b6;if(_0x35e754&&_0x35e754['isResolved']&&!_0x5822a7&&_0x329272['item'])return _0x7cdc7['consumable']['consume'](_0x329272['item'],'addMarker:'+_0x329272['markerName']),_0x7cdc7['consumable']['consume'](_0x329272['item'],'removeMarker:'+_0x329272['markerName']),null;const _0x15db71=['ck-comment-marker'];return _0x5822a7&&_0x15db71['push']('ck-comment-marker--active'),_0x2c56b6=_0x35e754?.['length']?_0x35e754['comments']['first']['author']['id']:_0x411eed['me']['id'],{'classes':_0x15db71,'attributes':{'data-comment':_0x549028,'data-author-id':_0x2c56b6}};}}),_0x352f68['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x59e395,{options:_0x51467c})=>{if(_0x51467c['showCommentHighlights'])return null;const _0x5d7af1=_0x352f68['plugins']['get'](o),_0x1efe48=_0x352f68['model']['markers']['get'](_0x59e395),{id:_0x4e6154,part:_0x219927}=er(_0x59e395);return _0x1efe48&&!_0x1efe48['affectsData']||_0x51467c['ignoreResolvedComments']&&_0x5d7af1['getCommentThread'](_0x4e6154)?.['isResolved']?null:{'group':'comment','name':_0x219927?_0x4e6154+':'+_0x219927:_0x4e6154};}}),_0x352f68['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1076ff,{writer:_0x1e32e1})=>_0x1e32e1['createElement']('$marker',{'data-name':'comment:'+_0x1076ff['getAttribute']('id')})}),_0x352f68['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x28aa91=this['editor'],_0x4e2159=_0x28aa91['plugins']['get'](o),_0x569704=new Set(),_0x4cccb8=new Set();_0x28aa91['model']['document']['registerPostFixer'](_0xb575fe=>{let _0x12cb21=!0x1;for(const {name:_0x43f171,data:_0x43ce7f}of _0x28aa91['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3a16f3,id:_0x541e77}=er(_0x43f171);let _0xabe622=_0x43ce7f['newRange'];if('comment'!==_0x3a16f3||!_0xabe622)continue;const _0x32457d='$graveyard'===_0xabe622['root']['rootName'];_0x32457d||(_0xabe622=dt(_0xabe622,_0x28aa91['model']),!_0xabe622||_0xabe622['isCollapsed']||!_0x43ce7f['newRange']||_0xabe622['isEqual'](_0x43ce7f['newRange']))?_0x28aa91['model']['hasContent'](_0xabe622)&&!_0x32457d?this['isThreadsLoadingPaused']?_0x569704['add'](_0x43f171):this['_handleThreadMarker'](_0x43f171,_0x541e77):(_0x4cccb8['add'](_0x43f171),_0x569704['delete'](_0x43f171),_0xb575fe['removeMarker'](_0x43f171),_0x12cb21=!0x0):(_0xb575fe['updateMarker'](_0x43f171,{'range':_0xabe622}),_0x12cb21=!0x0);}return _0x12cb21;}),this['on']('change:isThreadsLoadingPaused',(_0x34a53f,_0x581a96,_0x132fb4)=>{if(!_0x132fb4&&_0x569704['size'])for(const _0x1a5e48 of _0x569704){const {id:_0x1297e4}=er(_0x1a5e48);_0x569704['delete'](_0x1a5e48),_0x28aa91['model']['markers']['get'](_0x1a5e48)&&this['_handleThreadMarker'](_0x1a5e48,_0x1297e4);}}),this['listenTo'](_0x28aa91['model']['document'],'change',()=>{for(const {name:_0x1c0d4e,data:{newRange:_0x382db5}}of _0x28aa91['model']['document']['differ']['getChangedMarkers']()){const {group:_0x45a8fb,id:_0x57848b}=er(_0x1c0d4e);if('comment'!==_0x45a8fb)continue;const _0x1e5b21=_0x4e2159['getCommentThread'](_0x57848b),_0x161ccf=this['hasMarkerForId'](_0x57848b);_0x1e5b21&&(!_0x1e5b21['_hasTargetInContent']&&_0x382db5&&_0x28aa91['editing']['view']['once']('render',()=>{const _0x1b8601=_0x28aa91['plugins']['get'](O),_0x197528=_0x4e2159['_threadToController']['get'](_0x1e5b21)['view'];_0x1b8601['getByInnerView'](_0x197528)['refreshVisibility']();},{'priority':'low'}),_0x1e5b21['_hasTargetInContent']=_0x161ccf||!!_0x382db5),_0x382db5||(_0x4cccb8['add'](_0x1c0d4e),_0x569704['delete'](_0x1c0d4e));}for(const _0x33a3d9 of _0x4cccb8){const {id:_0xb7c8be}=er(_0x33a3d9),_0xd2cbeb=_0x4e2159['getCommentThread'](_0xb7c8be);if(_0x569704['delete'](_0x33a3d9),!_0xd2cbeb)continue;const _0x5d3bf7=this['hasMarkerForId'](_0xb7c8be);_0x5d3bf7||_0xd2cbeb['isSubmitted']?_0x5d3bf7||_0xd2cbeb['unlinkedAt']||_0xd2cbeb['setUnlinkedAt'](new Date()):_0xd2cbeb['remove']();}_0x4cccb8['clear']();});}['_handleInitialThreads'](_0x2b00b8){_0x2b00b8['forEach'](_0x48ff27=>{_0x48ff27['unlinkedAt']&&this['_attachArchivedThread'](_0x48ff27['id']);});}['_getTargetForId'](_0x2a1891){const _0x360328=this['editor'],_0x4a9aa6=this['getAllMarkersForId'](_0x2a1891);return et(_0x360328['editing'],_0x4a9aa6);}['_getTextContext'](_0x12b342){const _0x597b91=this['getAllMarkersForId'](_0x12b342);let _0x1d621d='',_0x46380d=!0x1;for(const _0x3e1712 of _0x597b91){const _0x1d4047=_0x3e1712['getRange']();for(const _0x38174c of Array['from'](_0x1d4047['getItems']()))_0x38174c['is']('$textProxy')?(_0x1d621d&&_0x46380d&&(_0x1d621d+='\x20',_0x46380d=!0x1),_0x1d621d+=_0x38174c['data']):_0x46380d=!0x0;_0x46380d=!0x0;}return _0x1d621d['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x526d31,_0x1c4954){const _0x207787=this['editor'],_0x2c97dc=_0x207787['plugins']['get'](o);let _0x51960a=_0x2c97dc['getCommentThread'](_0x1c4954);const _0xa66bb2=_0x207787['config']['get']('collaboration.channelId'),_0x22a8d5=_0x207787['plugins']['get'](P);if(_0x51960a&&(_0x51960a['unlinkedAt']&&_0x51960a['setUnlinkedAt'](null),_0x51960a['isAttached']))return _0x51960a;return!this['getAllMarkersForId'](_0x1c4954)[0x0]['managedUsingOperations']?_0x207787['editing']['view']['once']('render',()=>{if(_0x2c97dc['getCommentThread'](_0x1c4954))return;const _0x5265b1=_0x207787['plugins']['get'](O);_0x51960a=_0x2c97dc['openNewCommentThread']({'channelId':_0xa66bb2,'threadId':_0x1c4954,'target':()=>this['_getTargetForId'](_0x1c4954),'context':{'type':'text','value':this['_getTextContext'](_0x1c4954)}});const _0x4d5252=_0x2c97dc['_threadToController']['get'](_0x51960a)['view'],_0x434bcd=_0x5265b1['getByInnerView'](_0x4d5252);_0x434bcd&&_0x22a8d5['registerAnnotation'](_0x434bcd);},{'priority':'low'}):_0x2c97dc['fetchCommentThread']({'channelId':_0xa66bb2,'threadId':_0x1c4954})['then'](_0x4789bb=>{if('destroyed'!==_0x207787['state']){if(_0x51960a=_0x4789bb,_0x51960a&&!_0x51960a['isAttached']){const _0x14d4ca=_0x51960a['attachTo'](()=>this['_getTargetForId'](_0x1c4954));_0x22a8d5['registerAnnotation'](_0x14d4ca),_0x51960a['isResolved']&&this['_reconvertMarkers'](_0x1c4954);}else{if(!_0x51960a){const _0x37797f=this['getAllMarkersForId'](_0x1c4954);_0x207787['model']['change'](_0x2d83d3=>{for(const _0x105a4b of _0x37797f)_0x2d83d3['removeMarker'](_0x105a4b);});}}}}),_0x51960a;}['_handleThreadMarker'](_0x1b27c6,_0x4c9e99){const _0x910aab=this['_attachMarkerToThread'](_0x1b27c6,_0x4c9e99);_0x910aab&&!_0x910aab['context']&&_0x910aab['setContext']({'type':'text','value':this['_getTextContext'](_0x4c9e99)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3f0b5a=this['editor'];ot(_0x3f0b5a['model'],({left:_0x5036f2,entered:_0x532cda})=>{for(const _0x2a658e of _0x5036f2)if(mt(_0x2a658e)){_0x3f0b5a['ui']['ariaLiveAnnouncer']['announce'](E(_0x3f0b5a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x52d648 of _0x532cda)if(mt(_0x52d648)){_0x3f0b5a['ui']['ariaLiveAnnouncer']['announce'](E(_0x3f0b5a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x204b59)));break;}});}}function ft(_0x4c2730,_0x4f3b06){return _0x4f3b06?_0x4c2730+':'+_0x4f3b06:_0x4c2730;}function er(_0x1bbb83){const _0x49e4d8=_0x1bbb83['split'](':');return{'group':_0x49e4d8[0x0],'id':_0x49e4d8[0x1],'part':_0x49e4d8[0x2]};}function dt(_0x2e23db,_0x462c34){const _0x2f2532=_0x462c34['schema'],_0x3c3a39=_0x462c34['createRange'](_0x2e23db['start']);for(const _0x4dd9b9 of _0x2e23db['getWalker']()){const {type:_0x4410f3,item:_0x443eb6,nextPosition:_0x1528c5}=_0x4dd9b9;if('text'===_0x4410f3||_0x2f2532['isObject'](_0x443eb6)){const _0x4cda42=_0x462c34['createPositionBefore'](_0x443eb6);_0x3c3a39['isCollapsed']&&(_0x3c3a39['start']=_0x4cda42),_0x3c3a39['end']=_0x1528c5;}}return _0x3c3a39;}function mt(_0x7a3fa4){return'comment'===er(_0x7a3fa4['name'])['group'];}class i extends _0x5e77f7{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x29edb2=this['editor'],_0x5c938d=_0x29edb2['plugins']['get'](o),_0x4e2a97=_0x29edb2['plugins']['get'](r),_0x1d3184=_0x29edb2['plugins']['get'](O),_0xd72b78=_0x29edb2['plugins']['get'](P);_0x29edb2['ui']['componentFactory']['add']('comment',()=>{const _0x29122b=this['_createUIButton'](_0x39c35a);return _0x29122b['tooltip']=!0x0,_0x29122b;}),_0x29edb2['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x515eaf)),_0xd72b78['addSourceCollector'](()=>{const _0x4b35f8=[];for(const [_0x2e83b4,_0x29d6b5]of _0x5c938d['_threadToController']){const _0x3411fc=_0x4e2a97['getAllMarkersForId'](_0x2e83b4['id']),_0x250371=_0x3411fc['map'](_0x321916=>_0x321916['getRange']());_0x3411fc['length']>0x0&&_0x4b35f8['push']([_0x29d6b5['view'],_0x250371]);}return _0x4b35f8;}),this['listenTo'](_0x1d3184,'change:activeAnnotations',(_0x31fea1,_0x22b4d1,_0x410e38)=>{const _0x4d67bc=Array['from'](_0x410e38)['map'](_0x544840=>_0x544840['innerView'])['find'](_0x23baa3=>_0x5c938d['_viewToController']['has'](_0x23baa3));if(!_0x4d67bc)return void(_0x4e2a97['activeMarker']=null);const _0x56a839=_0x5c938d['_viewToController']['get'](_0x4d67bc)['model']['id'],_0x10dcdc='comment:'+_0x56a839;_0x56a839&&_0x4e2a97['hasMarkerForId'](_0x56a839)?_0x4e2a97['activeMarker']=_0x10dcdc:_0x4e2a97['activeMarker']&&(_0x4e2a97['activeMarker']=null);}),this['listenTo'](_0x5c938d,'removeCommentThread',(_0x4a2eda,{threadId:_0x8184e0,isFromAdapter:_0x318a7a})=>{!_0x318a7a&&_0x29edb2['ui']['focusTracker']['isFocused']&&_0x4e2a97['hasMarkerForId'](_0x8184e0)&&_0x29edb2['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5c938d,'addComment',(_0x569d97,{threadId:_0x3ab639,isFromAdapter:_0x410944})=>{if(_0x410944||!_0x4e2a97['hasMarkerForId'](_0x3ab639)||!_0x5c938d['hasCommentThread'](_0x3ab639))return;0x1===_0x5c938d['getCommentThread'](_0x3ab639)['length']&&(_0x29edb2['editing']['view']['focus'](),_0x569d97['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x57cab8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2d3984;for(const _0x20666f in _0x57cab8){const _0x432224=_0x20666f,_0x248984=_0x57cab8[_0x432224];if('commentsLicenseKeyValid'==_0x248984||'commentsLicenseKeyInvalid'==_0x248984||'commentsLicenseKeyExpired'==_0x248984||'commentsLicenseKeyDomainLimit'==_0x248984||'commentsLicenseKeyNotAllowed'==_0x248984||'commentsLicenseKeyEvaluationLimit'==_0x248984||'commentsLicenseKeyTrialLimit'==_0x248984||'commentsLicenseKeyUsageLimit'==_0x248984){delete _0x57cab8[_0x432224],_0x2d3984=_0x248984,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2d3984&&_0x57cab8['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2d3984&&_0x57cab8['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2d3984&&_0x57cab8['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2d3984&&_0x57cab8['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2d3984&&_0x57cab8['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x2d3984&&_0x57cab8['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x2d3984&&_0x57cab8['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x329437){const _0x2c8ed6=this['editor'],_0x7891c=new _0x329437(_0x2c8ed6['locale']),_0x463722=_0x2c8ed6['commands']['get']('addCommentThread');return _0x7891c['set']({'label':E(_0x2c8ed6['locale'],'Comment'),'icon':_0x44c03a}),_0x7891c['bind']('isEnabled')['to'](_0x463722),this['listenTo'](_0x7891c,'execute',()=>{_0x463722['execute']();}),_0x7891c;}}class s extends _0x5e77f7{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x24cc7e){super(_0x24cc7e),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x59b01e,_0x554505,_0x23001e)=>{_0x23001e?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x462cad,_0x2e8b73]of this['editor']['commands'])_0x2e8b73['affectsData']&&'addCommentThread'!==_0x462cad&&_0x2e8b73['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4eb984=this['editor']['editing']['view']['document'];this['listenTo'](_0x4eb984,'cut',_0x2a629a=>_0x2a629a['stop'](),{'priority':'highest'}),this['listenTo'](_0x4eb984,'clipboardInput',_0x3755df=>_0x3755df['stop'](),{'priority':'highest'}),this['listenTo'](_0x4eb984,'delete',_0x3cea1d=>_0x3cea1d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2576af,_0x19e736]of this['editor']['commands'])_0x19e736['affectsData']&&'addCommentThread'!==_0x2576af&&_0x19e736['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 M extends _0x52c4e0{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49cc1a){super(_0x49cc1a),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x44c000=this['context']['plugins']['get'](O);this['listenTo'](_0x44c000,'_activateAnnotation',(_0x1cb2cb,_0x4a18ca)=>{for(const _0x4e7f59 of this['activeUIs']){const _0x4d038d=this['_uis']['get'](_0x4e7f59);(0x0,this['uisData']['get'](_0x4e7f59)['filter'])(_0x4a18ca)&&_0x4d038d['setActiveAnnotation'](_0x4a18ca);}}),this['listenTo'](_0x44c000,'_deactivateAllAnnotations',()=>{for(const _0x2fff26 of this['activeUIs']){this['_uis']['get'](_0x2fff26)['setActiveAnnotation'](null);}}),this['listenTo'](_0x44c000['_visibleAnnotations'],'add',(_0x2cf982,_0x101f6e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x101f6e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x534ed9){return this['activeUIs']['has'](_0x534ed9);}['activate'](_0x449e84,_0x3ea944=this['defaultFilter']){const _0x6a00d8=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x449e84))throw new _0x27cf80('annotationsuis-missing-ui',this,{'uiName':_0x449e84});this['isActive'](_0x449e84)&&this['deactivate'](_0x449e84),this['activeUIs']['add'](_0x449e84);const _0x36132d=new _();!function({source:_0xc3b82e,target:_0x30ca37,filter:_0x1b78dc}){for(const _0x32f410 of _0xc3b82e)_0x1b78dc(_0x32f410)&&_0x30ca37['add'](_0x32f410);_0x30ca37['listenTo'](_0xc3b82e,'add',(_0x3ed38f,_0x4c8f7f)=>{_0x1b78dc(_0x4c8f7f)&&_0x30ca37['add'](_0x4c8f7f);}),_0x30ca37['listenTo'](_0xc3b82e,'remove',(_0x21311f,_0x11fed2)=>{_0x30ca37['has'](_0x11fed2)&&_0x30ca37['remove'](_0x11fed2);});}({'source':_0x6a00d8['_visibleAnnotations'],'target':_0x36132d,'filter':_0x3ea944}),this['uisData']['set'](_0x449e84,{'collection':_0x36132d,'filter':_0x3ea944});const _0xbb45e6=this['_uis']['get'](_0x449e84);_0xbb45e6['attach'](_0x36132d),this['listenTo'](_0xbb45e6,'change:activeAnnotation',(_0x467f95,_0xed159a,_0x2d9f7f,_0x46dfa5)=>{_0x46dfa5&&_0x6a00d8['_removeActiveAnnotation'](_0x46dfa5),_0x2d9f7f&&_0x6a00d8['_addActiveAnnotation'](_0x2d9f7f);});}['deactivate'](_0x57a114){if(this['activeUIs']['delete'](_0x57a114),!this['_uis']['has'](_0x57a114))throw new _0x27cf80('annotationsuis-missing-ui',this,{'uiName':_0x57a114});const _0x31184c=this['_uis']['get'](_0x57a114);_0x31184c['detach'](),this['stopListening'](_0x31184c),this['uisData']['get'](_0x57a114)['collection']['destroy'](),this['uisData']['delete'](_0x57a114);}['switchTo'](_0x5a90e1){if(!this['_uis']['has'](_0x5a90e1))throw new _0x27cf80('annotationsuis-missing-ui',this,{'uiName':_0x5a90e1});const _0x47ca28=this['context']['plugins']['get'](O),_0x18b9f8=Array['from'](_0x47ca28['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5a90e1);const _0x2ab041=this['_uis']['get'](_0x5a90e1);_0x2ab041['setActiveAnnotation'](_0x18b9f8),_0x2ab041['_setSelectedAnnotations']&&_0x18b9f8&&_0x2ab041['_setSelectedAnnotations']([_0x18b9f8]);}['deactivateAll'](){for(const _0xf8bc0b of this['activeUIs'])this['deactivate'](_0xf8bc0b);}['register'](_0x4f8cd8,_0x8d4106){if(this['_uis']['has'](_0x4f8cd8))throw new _0x27cf80('annotationsuis-register-already-registered');if('function'!=typeof _0x8d4106['attach']||'function'!=typeof _0x8d4106['detach']||'function'!=typeof _0x8d4106['setActiveAnnotation'])throw new _0x27cf80('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4f8cd8,_0x8d4106);}['refilterAnnotations'](){const _0xf17388=this['context']['plugins']['get'](O)['collection'],_0x1c404c=new Map(),_0x18f626=Array['from'](this['activeUIs']);for(const _0x2cba25 of this['activeUIs']){const _0x587e37=this['uisData']['get'](_0x2cba25)['collection'];for(const _0x5cb085 of _0x587e37)_0x1c404c['set'](_0x5cb085,_0x2cba25);}for(const _0x3f489a of _0xf17388){const _0x1e9c08=_0x1c404c['get'](_0x3f489a);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3f489a);const _0xcf9e2=_0x18f626['find'](_0x3879ca=>this['uisData']['get'](_0x3879ca)['filter'](_0x3f489a));_0x1e9c08!==_0xcf9e2&&(_0x1e9c08&&this['uisData']['get'](_0x1e9c08)['collection']['remove'](_0x3f489a),_0xcf9e2&&this['uisData']['get'](_0xcf9e2)['collection']['add'](_0x3f489a));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5d0a2c){const _0x5b4b64=[];for(const _0x481796 of this['activeUIs']){(0x0,this['uisData']['get'](_0x481796)['filter'])(_0x5d0a2c)&&_0x5b4b64['push'](_0x481796);}if(_0x5b4b64['length']>0x1)throw new _0x27cf80('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5b4b64,'annotationType':_0x5d0a2c['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1b16a3){super(_0x1b16a3);const _0x14fb43=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 _0x3568ce(),this['focusCycler']=new _0xcb58dc({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x14fb43['to']('class')],'style':{'minHeight':_0x14fb43['to']('minHeight',_0x1e3257=>'number'==typeof _0x1e3257?pi(_0x1e3257+0xa):null)},'dir':_0x1b16a3['uiLanguageDirection'],'role':'application','aria-label':E(_0x1b16a3,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x1b16a3,'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',_0x1d8af2=>{this['_updateItemPositionInFocusables'](_0x1d8af2['source']);}),this['list']['forEach'](_0x1c26b3=>{this['focusTracker']['add'](_0x1c26b3['element']),this['_updateItemPositionInFocusables'](_0x1c26b3);}),this['list']['on']('change',(_0x19d168,_0xba3e3a)=>{for(const _0x53c748 of _0xba3e3a['removed'])this['focusTracker']['remove'](_0x53c748['element']),this['focusables']['remove'](_0x53c748);for(const _0xa1fd9 of _0xba3e3a['added'])this['focusTracker']['add'](_0xa1fd9['element']),this['_updateItemPositionInFocusables'](_0xa1fd9);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2e2a24){const _0x5bd309=this['focusables']['getIndex'](_0x2e2a24);let _0x59e5b3,_0x104654;for(const _0x323409 of this['focusables'])if(_0x2e2a24['top']<_0x323409['top']){_0x59e5b3=_0x323409;break;}if(_0x104654=_0x59e5b3?this['focusables']['getIndex'](_0x59e5b3):this['focusables']['length'],-0x1!==_0x5bd309){if(_0x5bd309===_0x104654-0x1)return;this['focusables']['remove'](_0x2e2a24),_0x104654=_0x59e5b3?this['focusables']['getIndex'](_0x59e5b3):this['focusables']['length'];}this['focusables']['add'](_0x2e2a24,_0x104654);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x37f6dc){super(_0x37f6dc),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x274e00,_0x2ffb0f)=>_0x274e00+_0x2ffb0f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3adc5b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3adc5b['to']('isAnimationDisabled',_0x41e968=>_0x41e968?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3adc5b['to']('top',_0x1f0d8f=>Ht(_0x1f0d8f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1a1f87=this['element']['clientHeight'];_0x1a1f87&&(this['height']=_0x1a1f87);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x52c4e0{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e6b37){super(_0x4e6b37),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 _0x1e308c=this['context']['config']['get']('sidebar.container');_0x1e308c&&this['setContainer'](_0x1e308c);}['setContainer'](_0x24a282){if(!y(_0x24a282))throw new _0x27cf80('sidebar-setcontainer-invalid-element');this['container']=_0x24a282;}['_attachToContainer']({viewClass:_0x58d65e='',spaceBetweenItems:_0x51a343=0x19}={}){if(!y(this['container']))throw new _0x27cf80('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x58d65e,this['_spaceBetweenItems']=_0x51a343;}['rearrange']({removedAnnotation:_0x3db8bc,previousAnnotation:_0x27b344,nextAnnotation:_0x2b1af1}){const _0x46d082=this['getSidebarItemView'](_0x3db8bc);this['view']['list']['remove'](_0x46d082),this['_destroySidebarItemView'](_0x3db8bc),_0x27b344&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x27b344)),_0x2b1af1&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2b1af1)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xc45a74,activatedAnnotation:_0x26374d,disableAnimationOnActivatedAnnotation:_0x3a2265}){if(this['_activeAnnotation']=_0x26374d,_0xc45a74){_0xc45a74['isActive']=!0x1;const _0x23b894=this['getSidebarItemView'](_0xc45a74);_0x23b894&&_0x3a2265&&(_0x23b894['isAnimationDisabled']=!0x1);}if(_0x26374d){const _0x5735ff=this['getSidebarItemView'](_0x26374d);_0x5735ff&&(_0x26374d['isActive']=!0x0,_0x3a2265&&(_0x5735ff['isAnimationDisabled']=!0x0,_0x5735ff['top']+=0x1),this['_alignToTargetRect'](_0x5735ff));}}['_detachFromContainer'](_0x59907c){if(this['view']['element']['remove'](),_0x59907c){for(const _0x268444 of _0x59907c)this['_destroySidebarItemView'](_0x268444);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x33bb8a,_0x557d93){_0x557d93||(_0x557d93=_0x33bb8a['view']);const _0x2c68ed=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2c68ed,_0x33bb8a),this['_annotationToSidebarItemView']['set'](_0x33bb8a,_0x2c68ed),_0x2c68ed['content']['add'](_0x557d93),this['listenTo'](_0x33bb8a['view'],'change:targetRect',(_0x39ad24,_0x27a75b,_0x1a4aa1)=>{const _0x3b18d3=this['_getTargetTop'](_0x33bb8a,_0x1a4aa1);_0x2c68ed['_targetTop']!=_0x3b18d3&&(_0x2c68ed['_targetTop']=_0x3b18d3,this['_setItemTop'](_0x2c68ed,_0x3b18d3));}),this['listenTo'](_0x2c68ed,'change:top',()=>{this['_recalculate'](_0x2c68ed,'top');}),this['listenTo'](_0x2c68ed,'change:bottom',()=>{this['_recalculate'](_0x2c68ed,'bottom');}),this['_alignToTargetRect'](_0x2c68ed);const _0x44d0ca=this['_getItemBefore'](_0x2c68ed);if(_0x44d0ca)this['_alignAfterItem'](_0x44d0ca,_0x2c68ed)||this['_alignToTargetRect'](_0x2c68ed);else this['_alignToTargetRect'](_0x2c68ed);return this['_updateLastItem'](),this['view']['list']['add'](_0x2c68ed),_0x2c68ed;}['_alignForTopChange'](_0x3480a7){if(!_0x3480a7['content']['length'])return;const _0x311ce4=this['_getItemBefore'](_0x3480a7);if(!_0x311ce4)return;const _0x22c025=this['_sidebarItemViewToAnnotation']['get'](_0x311ce4),_0x4cc287=this['_activeAnnotation'];_0x4cc287&&_0x4cc287===_0x22c025?this['_alignAfterItem'](_0x311ce4,_0x3480a7):this['_alignBeforeItem'](_0x3480a7,_0x311ce4);}['_alignForBottomChange'](_0x297559){if(!_0x297559['content']['length'])return;const _0x1ea44a=this['_getItemAfter'](_0x297559);if(!_0x1ea44a)return;const _0x4ff8af=this['_sidebarItemViewToAnnotation']['get'](_0x1ea44a),_0x2d87ba=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x53d05e=this['_activeAnnotation'];_0x53d05e&&_0x53d05e===_0x4ff8af&&_0x2d87ba?(this['_alignBeforeItem'](_0x1ea44a,_0x297559),this['_alignAfterItem'](_0x297559,_0x1ea44a)):_0x53d05e&&_0x53d05e===_0x4ff8af?this['_alignBeforeItem'](_0x1ea44a,_0x297559):this['_alignAfterItem'](_0x297559,_0x1ea44a);}['_recalculate'](_0x683093,_0x5804d0){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x473d4b,changedProp:_0x19f085}of this['_recalculateBuffer'])'top'===_0x19f085?this['_alignForTopChange'](_0x473d4b):this['_alignForBottomChange'](_0x473d4b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x683093,'changedProp':_0x5804d0});}['getSidebarItemView'](_0x1aed12){return this['_annotationToSidebarItemView']['get'](_0x1aed12);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3df5e4){const _0x5a2bde=this['getSidebarItemView'](_0x3df5e4);this['stopListening'](_0x5a2bde),this['stopListening'](_0x3df5e4['view']),_0x5a2bde['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3df5e4),this['_sidebarItemViewToAnnotation']['delete'](_0x5a2bde);}['_createSidebarView'](){const _0x1a1233=new F(this['context']['locale']);return _0x1a1233['render'](),this['on']('change:_lastItem',(_0xe320f9,_0x13316a,_0x53b451,_0xeca1b3)=>{_0xeca1b3&&_0x1a1233['unbind']('minHeight'),_0x53b451?_0x1a1233['bind']('minHeight')['to'](_0x53b451,'bottom'):_0x1a1233['minHeight']=null;}),_0x1a1233;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x156942){const _0x2890c0=this['_sidebarItemViewToAnnotation']['get'](_0x156942),_0x32da81=_0x2890c0&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2890c0)-0x1);return _0x32da81&&this['getSidebarItemView'](_0x32da81)||null;}['_getItemAfter'](_0x2c52f3){const _0x3ab78b=this['_sidebarItemViewToAnnotation']['get'](_0x2c52f3),_0x380534=_0x3ab78b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3ab78b)+0x1);return _0x380534&&this['getSidebarItemView'](_0x380534)||null;}['_alignBeforeItem'](_0x2c1fcd,_0x19bb3d){_0x2c1fcd['updateHeight']();const _0x2b8092=R(_0x19bb3d['bottom']+this['_spaceBetweenItems'],_0x2c1fcd['top']);return!!_0x2b8092&&(this['_setItemTop'](_0x19bb3d,_0x19bb3d['top']-_0x2b8092),!0x0);}['_alignAfterItem'](_0x2c6391,_0xb3aca9){_0x2c6391['updateHeight']();const _0x5e7505=R(_0x2c6391['bottom']+this['_spaceBetweenItems'],_0xb3aca9['top']);return!!_0x5e7505&&(this['_setItemTop'](_0xb3aca9,_0xb3aca9['top']+_0x5e7505,!0x1),!0x0);}['_alignToTargetRect'](_0x55f7b0){const _0x46a16a=this['_sidebarItemViewToAnnotation']['get'](_0x55f7b0);if(!_0x46a16a||!_0x46a16a['target']||!_0x46a16a['targetRect'])return;const _0x33e65a=this['_getTargetTop'](_0x46a16a,_0x46a16a['targetRect']);this['_setItemTop'](_0x55f7b0,_0x33e65a);}['_getTargetTop'](_0xa337be,_0x4a4ed6){if(null===_0x4a4ed6)return 0x0;if(_0xa337be['target']instanceof _0x17a49c)return _0x4a4ed6['top'];{const _0x34a7ec=new _0x17a49c(this['view']['element'])['top'];return _0x4a4ed6['top']-_0x34a7ec;}}['_setItemTop'](_0x5eefb8,_0x536af9,_0x1f766a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1f766a&&(_0x536af9=Math['max'](_0x536af9,this['_getMaxAvailableTop'](_0x5eefb8))),_0x5eefb8['top']=_0x536af9;}['_getMaxAvailableTop'](_0x3b76cb){let _0x58b3d9=this['_getItemBefore'](_0x3b76cb),_0x465293=0x0;for(;_0x58b3d9;)_0x58b3d9['updateHeight'](),_0x465293+=this['_spaceBetweenItems']+_0x58b3d9['height'],_0x58b3d9=this['_getItemBefore'](_0x58b3d9);return _0x465293;}}function R(_0x48b4dc,_0x48eeb3){return Math['max'](_0x48b4dc-_0x48eeb3,0x0);}function y(_0x3a74dc){return null!==_0x3a74dc&&'object'==typeof _0x3a74dc&&0x1===_0x3a74dc['nodeType'];}class e extends _0x52c4e0{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e1d50){super(_0x1e1d50),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4d1d56(),this['_refreshPositioningDebounced']=_0x3276fe(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4988dc=this['context']['plugins']['get'](M),_0xcee029=this['context']['plugins']['get'](z);_0x4988dc['register']('wideSidebar',this),_0xcee029['container']&&_0x4988dc['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x309297){if(_0x309297===this['activeAnnotation'])return;const _0x5ef1c4=this['context']['plugins']['get'](z);_0x5ef1c4['_activeAnnotation']=_0x309297;const _0x3e30b1=this['activeAnnotation'];_0x5ef1c4['refresh']({'blurredAnnotation':_0x3e30b1,'activatedAnnotation':_0x309297}),this['activeAnnotation']=_0x309297;}['attach'](_0x552f94){this['annotations']=_0x552f94;const _0x398acc=this['context']['plugins']['get'](z);if(_0x398acc['_annotations']=_0x552f94,this['isAttached'])throw new _0x27cf80('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x398acc,'set:container',()=>{this['detach'](),this['listenTo'](_0x398acc,'change:container',_0x20cd39=>{_0x20cd39['off'](),this['attach'](_0x552f94);});}),_0x398acc['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x34a667=_0x1638ee=>{_0x1638ee['updateTargetRect'](),_0x398acc['addAnnotation'](_0x1638ee);};for(const _0x1174d1 of _0x552f94)_0x34a667(_0x1174d1);this['listenTo'](_0x552f94,'add',(_0x2b1862,_0x10083c)=>{_0x34a667(_0x10083c);}),this['listenTo'](_0x552f94,'remove',(_0x56c83b,_0x276f61,_0xd860ff)=>{_0x398acc['rearrange']({'removedAnnotation':_0x276f61,'previousAnnotation':_0x552f94['get'](_0xd860ff-0x1),'nextAnnotation':_0x552f94['get'](_0xd860ff+0x1)}),_0x276f61===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x552f94,'focus',(_0x475f00,_0x3337dd)=>{this['setActiveAnnotation'](_0x3337dd);}),this['listenTo'](_0x552f94,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2edf7c=this['context']instanceof _0x22c4ee?this['context']['editors']:new _0x4d1d56([this['context']]);for(const _0x46cf54 of _0x2edf7c)this['_integrateWithEditorAnnotations'](_0x46cf54);this['listenTo'](_0x2edf7c,'add',(_0x5e9567,_0x51386b)=>{this['listenTo'](_0x51386b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x51386b);});}),this['listenTo'](_0x2edf7c,'remove',(_0xa515d2,_0x45fa53)=>{_0x45fa53['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x45fa53['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x27cf80('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xee9bc9=this['context']['plugins']['get'](z);_0xee9bc9['_detachFromContainer'](this['annotations']),this['stopListening'](_0xee9bc9),this['stopListening'](this['annotations']),this['context']instanceof _0x22c4ee&&this['stopListening'](this['context']['editors']);for(const _0x8f7131 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x8f7131);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2820f6){if(!_0x2820f6['plugins']['has']('EditorAnnotations'))return;const _0x14f5cb=_0x2820f6['plugins']['get']('EditorAnnotations'),_0x5b7077=()=>{const _0x390e1b=_0x14f5cb['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x390e1b[0x0]||null);};this['listenTo'](_0x14f5cb,'refresh',_0x5b7077),this['listenTo'](_0x14f5cb,'blur',(_0x166d05,{isAnnotationTracked:_0x5cd913})=>{this['activeAnnotation']&&_0x5cd913(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x14f5cb,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x44c105=>{_0x14f5cb['hasDomSelection']()&&(_0x5b7077(),_0x44c105['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x14f5cb);}['_destroyEditorAnnotationsIntegration'](_0x48187a){this['stopListening'](_0x48187a),this['_editorAnnotations']['remove'](_0x48187a);}}class C extends _0x39c35a{['counterView'];constructor(_0x4de811){super(_0x4de811);const _0x490e0b=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x35de3f,_0x14add2)=>_0x35de3f?'...':_0x14add2['toString']()),this['set']('annotationType',''),this['icon']=_0x44c03a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x490e0b['to']('annotationType',_0x21a96d=>'ck-annotation-counter__badge--'+_0x21a96d),_0x490e0b['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x490e0b['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x52c4e0{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3cdc91){super(_0x3cdc91),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x448200),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4d1d56(),this['_refreshPositioningDebounced']=_0x3276fe(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x43aafa(this['context']['locale']),this['balloonPanelView']=new _0x19188c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x455aed){this['annotations']=_0x455aed;const _0x270176=this['context']['plugins']['get'](z),_0xe4745f=this['balloonPanelView'];if(_0x270176['_annotations']=_0x455aed,this['isAttached'])throw new _0x27cf80('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x270176,'set:container',()=>{this['detach'](),this['listenTo'](_0x270176,'change:container',_0x327af2=>{_0x327af2['off'](),this['attach'](_0x455aed);});}),_0x270176['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x13d78c=_0x4f62bf=>{const _0x365a2c=new C(this['context']['locale']);_0x270176['addAnnotation'](_0x4f62bf,_0x365a2c),this['_annotationToNarrowView']['set'](_0x4f62bf,_0x365a2c),_0x365a2c['bind']('isDirty','annotationType','number')['to'](_0x4f62bf['view'],'isDirty','type','length'),_0x365a2c['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xe4745f['content']['first']!==_0x4f62bf['view']?(this['_showBalloon'](_0x4f62bf),_0x4f62bf['view']['element']['focus'](),this['setActiveAnnotation'](_0x4f62bf)):this['setActiveAnnotation'](null);});};for(const _0x15cfd2 of _0x455aed)_0x13d78c(_0x15cfd2);this['listenTo'](_0x455aed,'add',(_0x90a61f,_0x4ade06)=>{_0x13d78c(_0x4ade06);}),this['listenTo'](_0x455aed,'remove',(_0x4e09f5,_0x318ca6,_0x3c21ed)=>{this['_annotationToNarrowView']['get'](_0x318ca6)['destroy'](),this['_annotationToNarrowView']['delete'](_0x318ca6),_0x270176['rearrange']({'removedAnnotation':_0x318ca6,'previousAnnotation':_0x455aed['get'](_0x3c21ed-0x1),'nextAnnotation':_0x455aed['get'](_0x3c21ed+0x1)}),_0x318ca6===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x455aed,'focus',(_0x12b70c,_0x5268a8)=>{this['setActiveAnnotation'](_0x5268a8);}),this['listenTo'](_0x455aed,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xdd92a5,_0x18806b)=>{_0x18806b['keyCode']===_0x18b9d9['esc']&&_0xe4745f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xe4745f['content']['first']),this['_hideBalloon'](),_0x18806b['stopPropagation'](),_0x18806b['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1da8dd,_0x20c066)=>{const _0x2a0f0a=_0x20c066['target'];_0xe4745f['isVisible']&&_0xe4745f['element']['contains'](_0x2a0f0a)||_0x270176['view']['element']['contains'](_0x2a0f0a)||_0x1da8dd['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x33b72c=>_0x33b72c['contains'](_0x2a0f0a))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xa9839a=this['context']instanceof _0x22c4ee?this['context']['editors']:new _0x4d1d56([this['context']]);for(const _0x3bb865 of _0xa9839a)this['_integrateWithEditorAnnotations'](_0x3bb865);this['listenTo'](_0xa9839a,'add',(_0x998b74,_0x19c68b)=>{this['listenTo'](_0x19c68b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x19c68b);});}),this['listenTo'](_0xa9839a,'remove',(_0xc54d7d,_0x5a6d01)=>{_0x5a6d01['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5a6d01['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4fc52c){if(_0x4fc52c===this['activeAnnotation'])return;const _0x50808d=this['context']['plugins']['get'](z);if(_0x50808d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4fc52c,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4fc52c)_0x50808d['getSidebarItemView'](_0x4fc52c)?this['_showBalloon'](_0x4fc52c):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4fc52c;}['detach'](){if(!this['isAttached'])throw new _0x27cf80('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x51b9fc=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x25c8e7=>_0x25c8e7['destroy']()),this['_annotationToNarrowView']['clear'](),_0x51b9fc['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x22c4ee&&this['stopListening'](this['context']['editors']);for(const _0x2ad85b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2ad85b);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'](_0x32483e){if(!_0x32483e['plugins']['has']('EditorAnnotations'))return;const _0x3583b6=_0x32483e['plugins']['get']('EditorAnnotations'),_0x3adaa8=this['context']['plugins']['get'](z),_0x5396af=this['annotations'],_0x586624=this['balloonPanelView'],_0x3fae98=()=>{const _0x3bf93f=_0x3583b6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3bf93f),this['setActiveAnnotation'](_0x3bf93f[0x0]||null);};this['listenTo'](_0x3583b6,'refresh',_0x3fae98),this['listenTo'](_0x3583b6,'blur',(_0x2af350,{isAnnotationTracked:_0x2891ec})=>{this['activeAnnotation']&&_0x2891ec(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3583b6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x5396af,'blur',_0x578ae2=>{_0x3583b6['hasDomSelection']()&&_0x578ae2['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1a718a,_0xc531a9)=>{const _0x3176a2=_0xc531a9['target'];_0x586624['isVisible']&&_0x586624['element']['contains'](_0x3176a2)||_0x3adaa8['view']['element']['contains'](_0x3176a2)||this['activeAnnotation']&&_0x3583b6['hasDomSelection']()&&(_0x3fae98(),_0x1a718a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3583b6);}['_destroyEditorAnnotationsIntegration'](_0xb71f99){_0xb71f99&&(this['stopListening'](_0xb71f99),this['_editorAnnotations']['remove'](_0xb71f99));}['_setSelectedAnnotations'](_0x5ea6dc){for(const _0x24ad9b of this['_selectedAnnotations'])_0x5ea6dc['includes'](_0x24ad9b)||this['_manuallyClosedAnnotationViews']['delete'](_0x24ad9b['view']);this['_selectedAnnotations']=_0x5ea6dc;}['_refreshPositioning'](){const _0x41d19d=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x41d19d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x9a5b86){if(this['_manuallyClosedAnnotationViews']['has'](_0x9a5b86['view']))return;const _0x79ecef=this['balloonPanelView']['content']['first'];_0x79ecef!==_0x9a5b86['view']?(_0x79ecef&&this['_detachListeners'](_0x79ecef),this['_attachListeners'](_0x9a5b86['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x9a5b86['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x253c90=this['balloonPanelView']['content']['first'],_0x382090=_0x253c90&&this['annotations']['getByView'](_0x253c90);if(!_0x382090||!this['_annotationToNarrowView']['has'](_0x382090))return;const _0x17ff80=this['_annotationToNarrowView']['get'](_0x382090)['element'],_0x131229=(function(){const _0x920bb5=_0x19188c['defaultPositions'];return[_0x920bb5['southArrowNorthEast'],_0x920bb5['northArrowSouthEast'],_0x920bb5['southArrowNorth'],_0x920bb5['northArrowSouth'],_0x920bb5['southArrowNorthWest'],_0x920bb5['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x17ff80,'positions':_0x131229});}['_hideBalloon'](){const _0x2b8f80=this['balloonPanelView'],_0x28fa30=_0x2b8f80['content']['first'];_0x28fa30&&(this['_detachListeners'](_0x28fa30),_0x2b8f80['unpin'](),_0x2b8f80['content']['clear']());}['_attachListeners'](_0x7df9d5){this['listenTo'](_0x7df9d5,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x7df9d5,'Esc',(_0x4d6282,_0x132e02)=>{this['_manuallyClosedAnnotationViews']['add'](_0x7df9d5),this['_hideBalloon'](),_0x132e02();});}['_detachListeners'](_0x4b1b61){this['stopListening'](_0x4b1b61);}}class c extends _0x5e77f7{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x2e5d60,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe53747){super(_0xe53747),_0xe53747['editing']['view']['addObserver'](_0x5d01b8),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xe53747['plugins']['get'](_0x2e5d60),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x46dd91=this['editor']['plugins']['get'](M);_0x46dd91['context']===this['editor']&&(_0x46dd91['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1446de,_0x27424c)=>{const _0x576b9c=this['_balloon'];if(this['isAttached']&&_0x576b9c['visibleView']){const _0x4dfdf5=this['annotations']['getByView'](_0x576b9c['visibleView']);_0x4dfdf5&&this['_closeAnnotation'](_0x4dfdf5),_0x27424c();}}));}['afterInit'](){const _0x34b48f=this['editor']['plugins']['get'](M);_0x34b48f['context']===this['editor']&&(_0x34b48f['hasActive']()||_0x34b48f['switchTo']('inline'));}['setActiveAnnotation'](_0x200112){_0x200112!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x200112&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x200112)&&this['_addAnnotationToBalloon'](_0x200112,!0x0),_0x200112['isActive']=!0x0),_0x200112||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x200112);}['attach'](_0x18faed){this['annotations']=_0x18faed;const _0x1dee76=this['editor']['plugins']['get'](M),_0x1906d1=this['_balloon'];if(this['isAttached'])throw new _0x27cf80('inlineannotations-attach-already-attached',this);if(_0x1dee76['context']!==this['editor'])throw new _0x27cf80('inlineannotations-not-allowed-with-context',this);const _0x428167=this['editor']['plugins']['get'](P);this['listenTo'](_0x428167,'refresh',()=>{const _0x4a18cf=_0x428167['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5cb92a,_0x597d21;!this['_forceRefresh']&&(_0x5cb92a=_0x4a18cf,_0x597d21=this['_selectedAnnotations'],_0x5cb92a['length']===_0x597d21['length']&&_0x5cb92a['every'](_0x2bba8b=>_0x597d21['includes'](_0x2bba8b)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4a18cf),this['setActiveAnnotation'](_0x4a18cf[0x0]||null));}),this['listenTo'](_0x428167,'blur',(_0x4cd607,{isAnnotationTracked:_0x1e32c0})=>{this['activeAnnotation']&&_0x1e32c0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3a4699,_0x31cab6,_0xc9cd3c)=>{_0xc9cd3c||this['setActiveAnnotation'](null);}),this['listenTo'](_0x18faed,'remove',(_0xb4cc97,_0x5ec0e0)=>{this['_removeAnnotationFromBalloon'](_0x5ec0e0),_0x5ec0e0===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1906d1,'change:visibleView',(_0x5d2926,_0x2afaf0,_0x1f9f82,_0x3f040b)=>{_0x3f040b&&this['stopListening'](_0x3f040b);const _0x328bde=_0x18faed['getByView'](_0x1f9f82);_0x1f9f82&&_0x328bde&&(this['listenTo'](_0x1f9f82,'change:height',()=>{_0x1906d1['updatePosition']();}),this['listenTo'](_0x1f9f82,'Esc',()=>{this['_closeAnnotation'](_0x328bde),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x328bde&&this['setActiveAnnotation'](_0x328bde));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1906d1['visibleView']&&(_0x18faed['getByView'](_0x1906d1['visibleView'])&&_0x1906d1['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 _0x27cf80('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x42bab0 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x42bab0);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x4bbf73){for(const _0x2bf19c of this['_selectedAnnotations'])_0x4bbf73['includes'](_0x2bf19c)||this['_manuallyClosed']['delete'](_0x2bf19c);for(const _0x144e41 of this['annotations'])_0x4bbf73['includes'](_0x144e41)||this['_removeAnnotationFromBalloon'](_0x144e41);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x25b2cc of _0x4bbf73)this['_addAnnotationToBalloon'](_0x25b2cc);}this['_selectedAnnotations']=_0x4bbf73;}['_addAnnotationToBalloon'](_0x509d56,_0xed3ac5=!0x1){this['_manuallyClosed']['has'](_0x509d56)||(this['_addedAnnotations']['has'](_0x509d56)||this['_balloon']['hasView'](_0x509d56['view'])||(this['_addedAnnotations']['add'](_0x509d56),this['_balloon']['add']({'stackId':_0x509d56['view']['id'],'view':_0x509d56['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x509d56)}})),_0xed3ac5&&this['_balloon']['showStack'](_0x509d56['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1026e3){const _0x1b8933=_0x1026e3['target'],_0x5e074a=this['editor']['editing']['view'],_0x3c6a48=_0x5e074a['document']['selection']['getFirstRange'](),_0x5a4d2c=_0x5e074a['domConverter']['viewRangeToDom'](_0x3c6a48);if(_0x5a4d2c['collapse'](!0x0),_0x1b8933){if(_0x1b8933 instanceof _0x17a49c)return _0x1b8933;let _0x1e2855=[];for(const _0x53097d of _0x1b8933)_0x1e2855['push'](...(_0x52021b=_0x53097d['getClientRects'](),Array['from'](_0x52021b)['map'](DOMRect['fromRect'])));_0x1e2855=function(_0xae21b3){const _0x548f32=[];let _0x63d54a=_0xae21b3[0x0];for(let _0x474d9d=0x1;_0x474d9d<_0xae21b3['length'];_0x474d9d++)B(_0x63d54a,_0xae21b3[_0x474d9d])?_0x63d54a['width']+=_0xae21b3[_0x474d9d]['width']:(_0x548f32['push'](_0x63d54a),_0x63d54a=_0xae21b3[_0x474d9d]);return _0x548f32['push'](_0x63d54a),_0x548f32;}(_0x1e2855);const _0x137e2d=_0x5a4d2c['getBoundingClientRect']();return _0x1e2855['find'](_0x7ce259=>_0x7ce259['top']<=_0x137e2d['top']&&_0x7ce259['bottom']>=_0x137e2d['bottom']&&_0x7ce259['left']<=_0x137e2d['left']&&_0x7ce259['right']>=_0x137e2d['right'])||_0x1e2855[0x0];}var _0x52021b;return _0x1026e3['targetRect']||_0x5a4d2c;}['_removeAnnotationFromBalloon'](_0xdf21af){this['_addedAnnotations']['has'](_0xdf21af)&&this['_balloon']['hasView'](_0xdf21af['view'])&&(this['_addedAnnotations']['delete'](_0xdf21af),this['_balloon']['remove'](_0xdf21af['view']));}['_closeAnnotation'](_0x517fda){this['_manuallyClosed']['add'](_0x517fda),this['_removeAnnotationFromBalloon'](_0x517fda);}}function B(_0x3e0290,_0x391fcf){return _0x3e0290['top']===_0x391fcf['top']&&_0x3e0290['bottom']===_0x391fcf['bottom']&&_0x3e0290['right']===_0x391fcf['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x17c73e,_0x1eecaf){super(_0x17c73e),this['set']('isEmpty',!_0x1eecaf['length']),this['focusTracker']=new _0x3568ce(),this['_annotationViews']=_0x1eecaf,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xcb58dc({'focusables':_0x1eecaf,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1eecaf,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1eecaf,'remove',(_0x29d5cd,_0x5b3c28)=>{_0x5b3c28['isActive']&&this['focus'](),_0x1eecaf['length']||(this['isEmpty']=!0x0);});const _0x3d422d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x17c73e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1eecaf},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3d422d['if']('isEmpty','ck-hidden',_0x5084f1=>!_0x5084f1)]},'children':[{'text':E(_0x17c73e,'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 _0x2ab14e of this['_annotationViews'])this['focusTracker']['add'](_0x2ab14e['element']);this['_annotationViews']['on']('change',(_0xcf2c64,{added:_0x3d8a37,removed:_0x913e23})=>{for(const _0x132f2a of _0x3d8a37)this['focusTracker']['add'](_0x132f2a['element']);for(const _0xec327f of _0x913e23)this['focusTracker']['remove'](_0xec327f['element']);});}}class f extends _0x52c4e0{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x591556){super(_0x591556),this['archivedThreads']=new _0x4d1d56();}['init'](){const _0x1d6eaf=this['context'],_0x3a95f7=_0x1d6eaf['plugins']['get'](o),_0x101c9e=_0x1d6eaf['plugins']['get'](O);this['listenTo'](_0x3a95f7,'addCommentThread',(_0x4e2446,{threadId:_0x225e4b})=>{const _0x4858b9=_0x3a95f7['getCommentThread'](_0x225e4b);_0x4858b9['archivedAt']&&this['archivedThreads']['add'](_0x4858b9,this['_calculatePosition'](_0x4858b9['archivedAt'])),this['listenTo'](_0x4858b9,'change:archivedAt',(_0x1797b1,_0x3f480f,_0x4ea54d)=>{_0x4ea54d?this['archivedThreads']['has'](_0x4858b9)||this['archivedThreads']['add'](_0x4858b9,this['_calculatePosition'](_0x4858b9['archivedAt'])):this['archivedThreads']['has'](_0x4858b9)&&this['archivedThreads']['remove'](_0x4858b9);});}),this['listenTo'](_0x3a95f7,'removeCommentThread',(_0x10c77a,{threadId:_0x24f242})=>{const _0xe3cc2c=_0x3a95f7['getCommentThread'](_0x24f242);this['stopListening'](_0xe3cc2c),this['archivedThreads']['has'](_0xe3cc2c)&&this['archivedThreads']['remove'](_0xe3cc2c);},{'priority':'highest'}),this['listenTo'](_0x101c9e['collection'],'focus',(_0x356cb8,_0x4fc16a)=>{_0x4fc16a['isVisible']||(_0x4fc16a['isActive']=!0x0,_0x101c9e['activate'](_0x4fc16a));});}['_calculatePosition'](_0x36f531){const _0x129a7f=[...this['archivedThreads']]['findIndex'](_0xfb0b04=>_0xfb0b04['archivedAt']<_0x36f531);return _0x129a7f>-0x1?_0x129a7f:this['archivedThreads']['length'];}}class a extends _0x5e77f7{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x4a98a9];}constructor(_0x381149){super(_0x381149),this['annotationViews']=new _0x1267d4(),this['_pendingThreads']=[];}['init'](){const _0x4c7198=this['editor'],_0x4fe06f=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4c7198['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x39c35a,!0x0)),_0x4c7198['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5293b6=this['_createCommentsArchiveButton'](_0x515eaf);return _0x5293b6['set']({'role':'menuitemcheckbox'}),_0x5293b6;});const _0x1c1817=_0x4c7198['plugins']['get'](f),_0x8374ee=_0x4c7198['plugins']['get']('Annotations'),_0x2efb69=_0x4c7198['plugins']['get']('CommentsRepository');_0x1c1817['archivedThreads']['forEach'](_0xd5c263=>{this['_handleNewThread'](_0xd5c263);}),this['listenTo'](_0x1c1817['archivedThreads'],'add',(_0x1785d2,_0x3a148e)=>{this['_handleNewThread'](_0x3a148e);}),this['listenTo'](_0x8374ee['collection'],'add',(_0x1f24cf,_0x4dbb9e)=>{const _0x5d0db1=this['_pendingThreads']['find'](_0x27de94=>{const _0x4d6387=_0x2efb69['_threadToController']['get'](_0x27de94);return _0x4d6387&&_0x4dbb9e['innerView']===_0x4d6387['view'];});if(_0x5d0db1){const _0x3ba261=this['_calculatePosition'](_0x5d0db1['archivedAt']);this['annotationViews']['add'](_0x4dbb9e['view'],_0x3ba261),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5d0db1),0x1);}}),this['listenTo'](_0x1c1817['archivedThreads'],'remove',(_0x42cbbb,_0x1c9f7b)=>{const _0x160857=_0x4c7198['config']['get']('collaboration.channelId');if(!_0x160857||_0x1c9f7b['channelId']===_0x160857){if(this['_pendingThreads']['includes'](_0x1c9f7b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1c9f7b),0x1);else{const _0x302adf=_0x2efb69['_threadToController']['get'](_0x1c9f7b),_0x199bea=_0x8374ee['getByInnerView'](_0x302adf['view']);this['annotationViews']['remove'](_0x199bea['view']),this['stopListening'](_0x199bea['focusableElements']);}}}),this['listenTo'](_0x8374ee['collection'],'add',(_0x58c3ed,_0x7a115b)=>{this['listenTo'](_0x7a115b,'escape',_0x4fe06f);}),this['listenTo'](_0x8374ee['collection'],'remove',(_0x57810d,_0x2a4539)=>{this['stopListening'](_0x2a4539,'escape',_0x4fe06f);});}['_handleNewThread'](_0x5cfd32){const _0x3a1918=this['editor']['plugins']['get']('CommentsRepository'),_0x431996=this['editor']['plugins']['get']('Annotations'),_0x42dadd=this['editor']['config']['get']('collaboration.channelId');if(!_0x42dadd||_0x5cfd32['channelId']===_0x42dadd){const _0x499aae=_0x3a1918['_threadToController']['get'](_0x5cfd32);if(!_0x499aae)return void this['_pendingThreads']['push'](_0x5cfd32);const _0x59c303=this['_calculatePosition'](_0x5cfd32['archivedAt']),_0x30c010=_0x431996['getByInnerView'](_0x499aae['view']);_0x30c010['isVisible']&&_0x431996['_visibleAnnotations']['remove'](_0x30c010),this['annotationViews']['add'](_0x30c010['view'],_0x59c303);}}['_calculatePosition'](_0x2cbed7){const _0x37ef4f=this['editor']['config']['get']('collaboration.channelId'),_0x289cd5=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x4b180c=>_0x4b180c['channelId']===_0x37ef4f)['findIndex'](_0x56b0fa=>_0x56b0fa['archivedAt']<_0x2cbed7);return _0x289cd5<0x0||_0x289cd5>this['annotationViews']['length']?this['annotationViews']['length']:_0x289cd5-0x1;}['_toggleDialog'](){const _0xe6330c=this['editor'],_0x613876=_0xe6330c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0xe6330c['locale'],this['annotationViews'])),'commentsArchive'===_0x613876['id']?_0x613876['hide']():_0x613876['show']({'id':'commentsArchive','title':E(_0xe6330c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2197b5,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x252338['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x517817,_0x9b77b0=!0x1){const _0xbe00fd=this['editor']['locale'],_0xfc5898=this['editor']['plugins']['get']('Dialog'),_0x58de85=new _0x517817(_0xbe00fd);return _0x58de85['bind']('isEnabled')['to'](this,'isEnabled'),_0x58de85['bind']('isOn')['to'](_0xfc5898,'id',_0x17df77=>'commentsArchive'===_0x17df77),_0x58de85['set']({'label':E(_0xbe00fd,'COMMENTS_ARCHIVE'),'icon':_0x2197b5,'isToggleable':!0x0}),_0x9b77b0&&(_0x58de85['tooltip']=!0x0),this['listenTo'](_0x58de85,'execute',()=>this['_toggleDialog']()),_0x58de85;}['_hideDialogOnAnnotationEscape']=_0x318394=>{const _0x555fba=_0x318394['source'];if(!this['annotationViews']['has'](_0x555fba['view']))return;const _0x5b6817=this['editor']['plugins']['get']('Dialog');_0x5b6817['isOpen']&&'commentsArchive'===_0x5b6817['id']&&(_0x5b6817['hide'](),_0x318394['stop']());};}class p extends _0x5e77f7{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|