@ckeditor/ckeditor5-comments 45.1.0-alpha.3 → 45.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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(_0x20a7f5={}){function _0x13901e(_0x5ec5fb){return _0x5ec5fb['map'](_0x2261ee=>String['fromCharCode'](_0x2261ee))['join']('');}(_0x20a7f5=Object['assign']({},_0x20a7f5))['plugins']||(_0x20a7f5['plugins']=Qt['defaultPlugins']),super(_0x20a7f5),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[_0x13901e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13901e([0x76,0x69,0x65,0x77])][_0x13901e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x13901e([0x61,0x75,0x74,0x6f]),this[_0x13901e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x13901e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x13901e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x13901e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x13901e([0x6f,0x6b])});}['create'](){const _0x30bb50=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x30bb50))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2766a9=>{const _0x56e147=this['model']['document']['getRoot'](),_0x1522e6=_0x56e147&&_0x56e147['getChild'](_0x56e147['childCount']-0x1);_0x2766a9['setSelection'](_0x1522e6,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3cfa0e=this['editing']['view'],_0x3c0b1d=_0x3cfa0e['document']['getRoot'](),_0x12ef43=_0x3c0b1d['getChild'](0x0);_0x3c0b1d['childCount']>0x1||!_0x12ef43||'p'!=_0x12ef43['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x3cfa0e,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x12ef43['placeholder']=this['placeholder']),Ft({'view':_0x3cfa0e,'element':_0x12ef43,'keepOnFocus':!0x0}),this['placeholderElement']=_0x12ef43);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x7733f1,_0x3fa020={}){super(_0x7733f1),this['editor']=null,this['_editorConfig']=_0x3fa020,this['set']('value',_0x3fa020['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x7733f1,'Reply...')),this['set']('submitLabel',E(_0x7733f1,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xb3b6d4(),this['focusCycler']=new _0x2db88c({'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',(_0x4f9632,_0x15f276)=>{this['cancelButtonView']['fire']('execute'),_0x15f276();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3952f3,_0x3ee4eb)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3ee4eb());}),this['on']('submit',(_0xf8fd1e,_0x15c00d)=>{_0x15c00d['length']>0xfde8?(alert(E(_0x7733f1,'TOO_LONG_COMMENT_ALERT',[_0x15c00d['length'],0xfde8])),_0xf8fd1e['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 _0x5c7dad=this['editor'];this['element']['insertBefore'](_0x5c7dad['ui']['element'],this['element']['firstChild']),_0x5c7dad['model']['document']['on']('change',()=>this['value']=_0x5c7dad['getData']()),_0x5c7dad['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5c7dad['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x192947){-0x1===_0x192947?(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:_0xf4ba15}=this,_0x1a6036=new _0x181f25(_0xf4ba15);return _0x1a6036['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1a6036['withText']=!0x0,_0x1a6036['bind']('label')['to'](this,'submitLabel'),_0x1a6036['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1a6036['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x85e08d,_0x495832)=>!_0x495832&&!!_0x85e08d['trim']()),_0x1a6036;}['_createCancelButton'](){const {locale:_0x52525}=this,_0xa52103=new _0x181f25(_0x52525);return _0xa52103['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xa52103['label']=E(_0x52525,'Cancel'),_0xa52103['withText']=!0x0,_0xa52103['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xa52103;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4c0a61=>{this['focusTracker']['add'](_0x4c0a61['element']);}),this['focusables']['on']('change',(_0x4e0a36,_0x5719e9)=>{for(const _0x5a6d73 of Array['from'](_0x5719e9['added'])['reverse']())this['focusTracker']['add'](_0x5a6d73['element']);});}}class ie extends kt{constructor(_0xd4794b,_0x3969e1,_0x3c97e3){super(_0xd4794b),this['commentInputView']=new os(_0xd4794b,_0x3c97e3),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x58a567,_0x302a01)=>_0x58a567||!!_0x302a01),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 _0x2d7e2b(_0xd4794b,_0x3969e1),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'](_0x336e52){this['commentInputView']['focus'](_0x336e52);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2481bb,_0x31e721)=>{const {submitButtonView:_0x321beb,cancelButtonView:_0x4d4b42,editor:_0x28d93d}=this['commentInputView'];[_0x321beb['element'],_0x4d4b42['element'],_0x28d93d?_0x28d93d['editing']['view']['getDomRoot']():null]['filter'](_0x2fcb9b=>_0x2fcb9b)['some'](_0x6e64c3=>_0x6e64c3['contains'](_0x31e721['target']))||(this['focus'](),_0x31e721['preventDefault']());});}}class cs extends kt{constructor(_0x56c36d){super(_0x56c36d);const _0x192544=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x192544['to']('count',_0x9b0563=>E(_0x56c36d,'NUMBER_OF_COMMENTS',_0x9b0563))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xccd786,_0x148bb3,_0x2604eb){super(_0xccd786);const _0xf40831=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x148bb3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x148bb3,this['_config']=_0x2604eb,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xb3b6d4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2db88c({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1767c9=>this['commentViews']['map'](_0x2c3c4d=>_0x2c3c4d['element'])['includes'](_0x1767c9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0xccd786),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x43abea=>_0x43abea-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1ead71 of _0x148bb3['comments'])this['_handleNewCommentModel'](_0x1ead71);this['_handleInfoComment'](),this['listenTo'](_0x148bb3['comments'],'add',(_0x3be26d,_0x13c11d)=>{const _0x32386c=this['_calculatePosition'](_0x13c11d);this['length']++,this['_handleNewCommentModel'](_0x13c11d,_0x32386c),this['refreshVisibleViews']();}),this['listenTo'](_0x148bb3['comments'],'remove',(_0x27363e,_0x5221e7)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5221e7),this['refreshVisibleViews']();}),this['listenTo'](_0x148bb3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x148bb3,'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',_0xf40831['if']('length','ck-hidden',_0x32d2e3=>!_0x32d2e3)],'aria-label':E(_0xccd786,'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'](_0x4184c1){-0x1===_0x4184c1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x18b5bc of this['commentViews'])_0x18b5bc['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3449b6,_0x1daafa){const _0x23c469=new this['_config']['CommentView'](this['locale'],_0x3449b6,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x23c469['viewUid']=_0x3449b6['id'],_0x23c469['delegate']('removeComment')['to'](this),_0x23c469['delegate']('updateComment')['to'](this),_0x23c469['delegate']('resolveCommentThread')['to'](this),_0x23c469['delegate']('editorReady')['to'](this),_0x23c469['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x23c469,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x23c469,_0x1daafa);}['_calculatePosition'](_0x520651){const _0x397900=this['_model']['_findOptimalIndex'](_0x520651);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x520651['authoredAt']?_0x397900-0x1:_0x397900:_0x397900-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x40c8b7={'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'],_0x40c8b7,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x40c8b7));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1aea7f){const _0x2f6938=this['commentViews']['remove'](_0x1aea7f['id']);this['stopListening'](_0x2f6938),_0x2f6938['isEditMode']&&this['_updateHasDirtyComment'](),_0x2f6938['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4a6544=>_0x4a6544['isEditMode']);}['_rearrangeCollapse'](){const _0x3df489=function(_0xecdaf3){const _0x28736b=new _0xfcf14();for(const _0x451f1a of _0xecdaf3)_0x28736b['add'](_0x451f1a);return _0x28736b;}(this['commentViews']),_0x2d03e6=this['_collapsedCommentsView']['count'];for(let _0x41dd6f=0x1;_0x41dd6f<=_0x2d03e6;_0x41dd6f++)_0x3df489['remove'](0x1);for(const _0x2fdc8e of _0x3df489)_0x2fdc8e['collapse']();_0x2d03e6>0x0&&_0x3df489['add'](this['_collapsedCommentsView'],0x1),ns(_0x3511a1(Array['from'](this['visibleViews']),Array['from'](_0x3df489)),this['visibleViews'],_0x3df489);}['_rearrangeExpand'](){ns(_0x3511a1(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x32be06 of this['visibleViews'])_0x32be06['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x579c8d=>{this['focusTracker']['add'](_0x579c8d['element']),this['keystrokes']['listenTo'](_0x579c8d['element']);}),this['commentViews']['on']('change',(_0x525b92,_0xc81409)=>{for(const _0x494258 of _0xc81409['removed'])this['focusTracker']['remove'](_0x494258['element']),this['keystrokes']['stopListening'](_0x494258['element']);for(const _0x5bd4b2 of Array['from'](_0xc81409['added'])['reverse']())this['focusTracker']['add'](_0x5bd4b2['element']),this['keystrokes']['listenTo'](_0x5bd4b2['element']);});}}function ns(_0x3112f9,_0x39c3ee,_0x9def23){let _0xd139e0=0x0;for(const _0x4650c1 of _0x3112f9)switch(_0x4650c1){case'insert':_0x39c3ee['add'](_0x9def23['get'](_0xd139e0),_0xd139e0),_0xd139e0++;break;case'delete':_0x39c3ee['remove'](_0xd139e0);break;case'equal':_0xd139e0++;}}class as extends kt{constructor(_0x595eac){super(_0x595eac);const _0x17b2f2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x17b2f2['to']('contextValue',_0x52e8b9=>E(_0x595eac,'THREAD_CONTEXT_LABEL',_0x52e8b9)),'tabindex':-0x1},'children':[{'text':_0x17b2f2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2f591d,_0x13f76e){super(_0x2f591d);const _0x2e2e50=this['bindTemplate'];this['_model']=_0x13f76e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xb3b6d4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2db88c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5be380=>!!_0x5be380),this['bind']('contextValue')['to'](this['_model'],'context',_0x57e7b9=>_0x57e7b9&&_0x57e7b9['value']?this['_trimContextValue'](_0x57e7b9['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',_0x2e2e50['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 _0x187f13=new _0x181f25(this['locale']);return _0x187f13['label']=E(this['locale'],'Reopen'),_0x187f13['tooltip']=E(this['locale'],'Reopen'),_0x187f13['icon']=_0x3c8e41,_0x187f13['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d68c8=>!_0x1d68c8),_0x187f13['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x31035f,_0x4b15a8)=>_0x31035f&&_0x4b15a8),_0x187f13['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x187f13;}['_trimContextValue'](_0x2fce12){if(_0x2fce12['length']<0x96)return _0x2fce12;const _0x27958f=_0x2fce12['lastIndexOf']('\x20',0x93);return _0x2fce12['substring'](0x0,_0x27958f>-0x1?_0x27958f:0x93)+'...';}['_attachContextActions'](){const _0x5d751b=this['element']['querySelector']('.ck-context'),_0x4eaf01=_0x5d751b['querySelector']('.ck-context__value');this['listenTo'](_0x5d751b,'mouseenter',()=>{_0x4eaf01['offsetWidth']<_0x4eaf01['scrollWidth']&&_0x5d751b['classList']['add']('overlay');}),this['listenTo'](_0x5d751b,'mouseleave',()=>{_0x5d751b['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x24ba76 of this['focusables'])this['focusTracker']['add'](_0x24ba76['element']),this['keystrokes']['listenTo'](_0x24ba76['element']);}['_createContextView'](){const _0x996202=new as(this['locale']);return _0x996202['bind']('contextValue')['to'](this),_0x996202;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5802e1,_0x3d4c69,_0x3b5929,_0x27d02c){super(_0x5802e1),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3d4c69,this['_localUser']=_0x3b5929,this['_config']=_0x27d02c,this['commentThreadHeaderView']=new Xt(_0x5802e1,_0x3d4c69),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5802e1,E(_0x5802e1,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5802e1,_0x3d4c69,Object['assign']({'CommentView':this['_config']['CommentView']},_0x27d02c)),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',(_0x31b633,_0x1a6e76)=>_0x31b633||!!_0x1a6e76),this['bind']('isUnlinked')['to'](_0x3d4c69,'unlinkedAt',_0x5eabe7=>!!_0x5eabe7),this['bind']('ariaLabel')['to'](this,'length',_0x5a0af7=>{const _0x1fe5dc=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x5a0af7,_0x1fe5dc]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xb3b6d4(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2db88c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x34e764=>_0x34e764['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 _0x4bb081=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1cac86=_0x4bb081['commentInputView'];return _0x4bb081['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1cac86,'value',(_0x414fb0,_0x55ab02,_0x295a09,_0x3dd913,_0x2f80e9)=>!!_0x2f80e9||!!_0x3dd913&&_0x295a09&&!_0x55ab02||_0x414fb0&&_0x295a09&&!_0x55ab02),_0x1cac86['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x21e1d0,_0xdd4da7,_0x456b79)=>{let _0x154000;return _0x154000=_0x456b79&&_0xdd4da7?'Reply\x20to\x20reopen\x20discussion...':_0x21e1d0?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x154000);}),_0x1cac86['bind']('submitLabel')['to'](this,'length',_0xe8f7fb=>E(this['locale'],_0xe8f7fb?'Reply':'Comment')),_0x1cac86['on']('submit',(_0x25af2b,_0x8dd848)=>{this['fire']('addComment',_0x8dd848),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1cac86['on']('cancel',()=>{this['focus']();}),_0x1cac86['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1cac86['on']('cancel',_0x2274df=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2274df['stop']());}),this['on']('change:isActive',(_0x5b9cdd,_0x17281b,_0x3f6075)=>{_0x3f6075||this['length']||_0x1cac86['value']||this['fire']('removeCommentThread');}),_0x4bb081;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x4a1ea7(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x50fd56,target:_0x4cac29,type:_0x5efd02,isVisible:_0x58692c=!0x0}){super(),this['view']=_0x50fd56,this['view']['element']||this['view']['render'](),this['_type']=_0x5efd02,this['_target']=_0x4cac29,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xfcf14([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4a2233,_0x91e37b)=>{this['view']['focusTracker']['add'](_0x91e37b);}),this['focusableElements']['on']('remove',(_0x5936f3,_0x563b7c)=>{this['view']['focusTracker']['remove'](_0x563b7c);}),this['set']('isVisible',_0x58692c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x57d7e0=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x57d7e0),_0x57d7e0;}get['targetRect'](){const _0x3e1989=this['target'];if(null===_0x3e1989)return null;if(_0x3e1989 instanceof _0x66e728)return _0x3e1989;const _0x198748=_0x3e1989['filter'](_0x2d4231=>function(_0x1e91bf){const _0x4ecfb9=_0x1e91bf['offsetParent'];if(_0x4ecfb9)return!0x0;const _0x2176e3=_0x1e91bf['getClientRects']()['item'](0x0);return!!_0x2176e3;}(_0x2d4231));return 0x0===_0x198748['length']?null:new _0x66e728(_0x198748[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4452fa){this['view']['isActive']=_0x4452fa,this['view']['mainView']['isActive']=_0x4452fa;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3795ae){if(!(null===_0x3795ae||_0x3795ae instanceof _0x66e728||Array['isArray'](_0x3795ae)&&_0x3795ae['every'](_0x25b23d=>li(_0x25b23d))))throw new _0x167eaf('annotation-invalid-target',null,{'target':_0x3795ae});}['_getNormalizedTarget'](){const _0x5d0fa2='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x5d0fa2)?[_0x5d0fa2]:_0x5d0fa2;}}function li(_0x8d0146){return null!==_0x8d0146&&'object'==typeof _0x8d0146&&'nodeType'in _0x8d0146&&0x1===_0x8d0146['nodeType'];}class _ extends _0xfcf14{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1c3272=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xb3b6d4(),this['_focusTracker']['on']('change:isFocused',(_0x3a7cde,_0x2b854e,_0x1c67ed)=>{_0x1c67ed||this['fire']('blur');});for(const _0x35bf45 of _0x1c3272)this['add'](_0x35bf45);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xd427cc){if(this['has'](_0xd427cc))throw new _0x167eaf('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xd427cc['innerView'],_0xd427cc),this['_viewToAnnotation']['set'](_0xd427cc['view'],_0xd427cc);for(const _0x51e8a4 of _0xd427cc['focusableElements'])this['_focusTracker']['add'](_0x51e8a4);this['listenTo'](_0xd427cc['focusableElements'],'add',(_0x1bb2fa,_0x149231)=>{this['_focusTracker']['add'](_0x149231);}),this['listenTo'](_0xd427cc['focusableElements'],'remove',(_0x333e5a,_0x3a0365)=>{this['_focusTracker']['remove'](_0x3a0365);}),this['listenTo'](_0xd427cc['view']['focusTracker'],'change:isFocused',(_0x4b21ca,_0x6daee9,_0x5bd626)=>{_0x5bd626&&this['fire']('focus',_0xd427cc);}),_0xd427cc['updateTargetRect']();const _0x45ee3b=this['_getOrderInContent'](_0xd427cc['view']['targetRect']);return super['add'](_0xd427cc,_0x45ee3b);}['remove'](_0x152c1a){if(!this['has'](_0x152c1a))throw new _0x167eaf('annotationcollection-not-existing-item',null);this['stopListening'](_0x152c1a['view']['focusTracker']),this['stopListening'](_0x152c1a['focusableElements']);for(const _0x5317c5 of _0x152c1a['focusableElements'])this['_focusTracker']['remove'](_0x5317c5);return this['_viewToAnnotation']['delete'](_0x152c1a['view']),this['_innerViewToAnnotation']['delete'](_0x152c1a['innerView']),super['remove'](_0x152c1a);}['getByInnerView'](_0x13480b){return this['_innerViewToAnnotation']['get'](_0x13480b);}['getByView'](_0x10f575){return this['_viewToAnnotation']['get'](_0x10f575);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x19e959 of this)_0x19e959['updateTargetRect']();this['_sort']();}['_sort'](){const _0x14401f=Array['from'](this)['sort']((_0x46f74c,_0x332b89)=>v(_0x46f74c['view']['targetRect'],_0x332b89['view']['targetRect']));for(let _0xb40b3f=_0x14401f['length']-0x1;_0xb40b3f>0x0;_0xb40b3f--){const _0x5925f7=_0x14401f[_0xb40b3f];_0xb40b3f!==this['getIndex'](_0x5925f7)&&(this['remove'](_0x5925f7),this['add'](_0x5925f7));}}['_getOrderInContent'](_0xbe6185){let _0x2c7782=0x0;if(!_0xbe6185)return this['length'];for(const _0x3ddb04 of this){const _0x21c50c=_0x3ddb04['view']['targetRect'];if(_0x21c50c){if(v(_0xbe6185,_0x21c50c)<0x0)return _0x2c7782;_0x2c7782++;}}return _0x2c7782;}}function v(_0x109f53,_0x375b5e){if(null===_0x109f53&&null===_0x375b5e)return 0x0;if(null===_0x109f53)return-0x1;if(null===_0x375b5e)return 0x1;const _0xccb8c3=_0x109f53['top']-_0x375b5e['top'];return 0x0==_0xccb8c3?_0x109f53['left']-_0x375b5e['left']:_0xccb8c3;}class O extends _0x3ec28c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4eff5f){if(super(_0x4eff5f),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x4eff5f instanceof _0x4e56ff){const _0x1bd15c=_0x4eff5f['locale'];_0x4eff5f['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x1bd15c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3b4ef6){this['collection']['add'](_0x3b4ef6);}['remove'](_0x4f2ecc){this['collection']['remove'](_0x4f2ecc),_0x4f2ecc['destroy']();}['refreshVisibility'](){for(const _0x20da00 of this['collection'])_0x20da00['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x7170f9){return this['collection']['getByInnerView'](_0x7170f9);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4a3eba of this['collection'])_0x4a3eba['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x20eb2a){this['fire']('_activateAnnotation',_0x20eb2a);}['createAnnotation'](_0x372a7d){return new d(_0x372a7d);}['createAnnotationView'](_0x4d56dd,_0x27bb72){return new S(_0x4d56dd,_0x27bb72);}['_addActiveAnnotation'](_0x1c2602){const _0x1899ae=new Set(this['activeAnnotations']);_0x1899ae['add'](_0x1c2602),this['activeAnnotations']=_0x1899ae;}['_removeActiveAnnotation'](_0x130a18){const _0x123425=new Set(this['activeAnnotations']);_0x123425['delete'](_0x130a18),this['activeAnnotations']=_0x123425;}['_bindAnnotationsToVisibleAnnotations'](){const _0x25f159=this['collection'],_0x22ef92=this['_visibleAnnotations'];function _0x1ccf88(_0x4458b5){const _0x411156=_0x4458b5['source'];_0x411156['isVisible']&&!_0x22ef92['has'](_0x411156)?_0x22ef92['add'](_0x411156):!_0x411156['isVisible']&&_0x22ef92['has'](_0x411156)&&_0x22ef92['remove'](_0x411156),_0x411156['view']['focusTracker']['remove'](_0x411156['view']['element']),_0x411156['view']['focusTracker']['add'](_0x411156['view']['element']);}this['listenTo'](_0x25f159,'add',(_0x3de444,_0xfffcfa)=>{_0xfffcfa['isVisible']&&_0x22ef92['add'](_0xfffcfa),this['listenTo'](_0xfffcfa,'change:isVisible',_0x1ccf88);}),this['listenTo'](_0x25f159,'remove',(_0x852bc9,_0x1ca47d)=>{_0x22ef92['has'](_0x1ca47d)&&_0x22ef92['remove'](_0x1ca47d),this['stopListening'](_0x1ca47d,'change:isVisible',_0x1ccf88);});}['_setupEnterAnnotationKeystroke'](){const _0x2fe1f8=_0x557396=>{_0x557396['on']('ready',()=>{_0x557396['keystrokes']['set'](_0x5a7967,(_0x1328fd,_0x11c9ab)=>{const _0x228a33=_0x2ae980(this['activeAnnotations']['values']());_0x228a33&&(_0x228a33['view']['focus'](),_0x11c9ab());});});};this['context']instanceof _0x4e56ff?_0x2fe1f8(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4928ac,_0x56b194)=>{_0x2fe1f8(_0x56b194);});}['_setupEscapeAnnotationHandling'](){const _0x547396=_0x56b395=>{const _0x2702fc=_0x56b395['source'],_0x4e8ea7=[];let _0x4760b7;if(Array['isArray'](_0x2702fc['target'])){_0x4760b7=_0x2702fc['target'][0x0],this['context']instanceof _0x4e56ff?_0x4e8ea7['push'](this['context']):this['context']['editors']&&_0x4e8ea7['push'](...this['context']['editors']);for(const _0x10bca9 of _0x4e8ea7)for(const _0x33c043 of _0x10bca9['editing']['view']['domRoots']['values']())if(_0x33c043['contains'](_0x4760b7))return void _0x10bca9['editing']['view']['focus']();_0x4760b7['focus']();}};this['listenTo'](this['collection'],'add',(_0x24ee84,_0x9e1dab)=>{this['listenTo'](_0x9e1dab,'escape',_0x547396,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5abc4e,_0x318b9d)=>{this['stopListening'](_0x318b9d,'escape',_0x547396);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3ec28c{['_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(_0x3fc50a){super(_0x3fc50a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2f465d=this['context']['config'];_0x2f465d['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2f465d['define']('comments.maxThreadTotalWeight',0x1f4),_0x2f465d['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2f465d['define']('comments.CommentThreadView',vt),_0x2f465d['define']('comments.CommentView',gt),_0x2f465d['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5cc75f=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x294be3,_0x2663c1)=>this['_addCommentThread'](_0x2663c1)),this['on']('submitCommentThread',(_0x201d80,_0x4f928d)=>this['_submitCommentThread'](_0x4f928d)),this['on']('resolveCommentThread',(_0x40cb6b,_0x33d724)=>this['_resolveCommentThread'](_0x33d724)),this['on']('resolveCommentThread',(_0x3d6652,_0x1942ca)=>this['_updateActiveAnnotation'](_0x1942ca),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x34685e,_0x23ddf2)=>this['_reopenCommentThread'](_0x23ddf2)),this['on']('reopenCommentThread',(_0xde1c64,_0x456779)=>this['_updateActiveAnnotation'](_0x456779),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x17b274,_0x153ed1)=>this['_removeCommentThread'](_0x153ed1)),this['on']('updateCommentThread',(_0x724466,_0x2ff892)=>this['_updateCommentThread'](_0x2ff892)),this['on']('updateCommentThread',(_0x21ab08,_0x1e0cc1)=>this['_updateActiveAnnotation'](_0x1e0cc1),{'priority':'lowest'}),this['on']('addComment',(_0x59b4b8,_0x57c2e9)=>this['_addComment'](_0x57c2e9)),this['on']('updateComment',(_0x270950,_0x3a21dc)=>this['_updateComment'](_0x3a21dc)),this['on']('removeComment',(_0x3574fa,_0x2a5db3)=>this['_removeComment'](_0x2a5db3)),this['on']('addComment',(_0x33ce14,{threadId:_0x1d6a59,isFromAdapter:_0x3e61b8})=>{if(_0x3e61b8)return;const _0xfa578f=this['getCommentThread'](_0x1d6a59),_0x2fa0ec=_0xfa578f&&this['_threadToController']['get'](_0xfa578f);_0x2fa0ec&&_0x2fa0ec['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5cc75f,'change:activeAnnotations',(_0x3962f4,_0xc7c1ba,_0x38a175)=>{const _0x4c9260=Array['from'](_0x38a175)['map'](_0x24143a=>this['_viewToController']['get'](_0x24143a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4c9260?_0x4c9260['model']:null;});}set['adapter'](_0x4159f2){if(this['_adapter'])throw new _0x167eaf('commentsrepository-adapter-already-set');this['_adapter']=_0x4159f2;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x326073=Tt,threadId:_0x26dd82=_0x1ddcfe(),comments:_0x276587=[],unlinkedAt:_0x629976=null,resolvedAt:_0x578d65=null,resolvedBy:_0x4a917a=null,target:_0x6c546d=null,context:_0x576034=null,attributes:_0x36a924={},isResolvable:_0x299087=!0x0,isSubmitted:_0x14a6a7=!0x1,isFromAdapter:_0x4504ef=!0x1}={}){return this['fire'](bt('addCommentThread',_0x326073),{'channelId':_0x326073,'threadId':_0x26dd82,'comments':_0x276587,'unlinkedAt':_0x629976,'resolvedAt':_0x578d65,'resolvedBy':_0x4a917a,'target':_0x6c546d,'context':_0x576034,'attributes':_0x36a924,'isFromAdapter':_0x4504ef,'isResolvable':_0x299087,'isSubmitted':_0x14a6a7}),this['getCommentThread'](_0x26dd82);}['openNewCommentThread']({channelId:_0x3fece2=Tt,threadId:_0x208bdd=_0x1ddcfe(),target:_0x4a1bdc,context:_0x3ef29f=null,isResolvable:_0x541c9f=!0x0}){if(this['_readOnlyChannels']['has'](_0x3fece2)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4a1bdc)throw new _0x167eaf('commentsrepository-missing-target');const _0x49b6c2=this['addCommentThread']({'channelId':_0x3fece2,'threadId':_0x208bdd,'target':_0x4a1bdc,'context':_0x3ef29f,'isResolvable':_0x541c9f});if(!_0x49b6c2)return null;const _0x48758d=this['_threadToController']['get'](_0x49b6c2),_0x6b9ca2=_0x48758d['view']['commentThreadInputView']['commentInputView'],_0x12be96=this['context']['plugins']['get'](O),_0x3d434d=_0x12be96['getByInnerView'](_0x48758d['view']);return _0x12be96['activate'](_0x3d434d),_0x6b9ca2['once']('editorReady',()=>_0x6b9ca2['focus']()),_0x49b6c2;}['hasCommentThread'](_0x54a82c){if('string'!=typeof _0x54a82c)throw new _0x167eaf('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x54a82c);}['updateCommentThread']({channelId:_0x3d1dc1=Tt,threadId:_0x519258,context:_0x44e905,unlinkedAt:_0x3e2e3a,attributes:_0x5aa6ed,isFromAdapter:_0x417393=!0x1}){return this['fire'](bt('updateCommentThread',_0x3d1dc1),{'channelId':_0x3d1dc1,'threadId':_0x519258,'context':_0x44e905,'unlinkedAt':_0x3e2e3a,'attributes':_0x5aa6ed,'isFromAdapter':_0x417393}),this['getCommentThread'](_0x519258);}['getCommentThread'](_0x5416d8){if('string'!=typeof _0x5416d8)throw new _0x167eaf('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5416d8);}['fetchCommentThread']({channelId:_0x594613,threadId:_0x4b8160}={}){const _0x13a20c=this['getCommentThread'](_0x4b8160);if(_0x13a20c)return Promise['resolve'](_0x13a20c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x167eaf('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x594613,'threadId':_0x4b8160})['then'](_0x1820f3=>this['hasCommentThread'](_0x4b8160)?this['getCommentThread'](_0x4b8160):_0x1820f3?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x594613},_0x1820f3)):void 0x0)['catch'](_0x4f1e6d=>{throw console['error'](_0x4f1e6d),new _0x167eaf('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x509fa9,skipNotAttached:_0x1c978b=!0x1,skipEmpty:_0x2556cb=!0x1,toJSON:_0x12a852=!0x1}={}){const _0x494dc9=[];for(const _0x530b20 of this['_threads']['values']())_0x509fa9&&_0x530b20['channelId']!==_0x509fa9||_0x1c978b&&!_0x530b20['isAttached']||_0x2556cb&&0x0===_0x530b20['length']||_0x494dc9['push'](_0x530b20);return _0x12a852?_0x494dc9['map'](_0x3e76a6=>_0x3e76a6['toJSON']()):_0x494dc9;}['setActiveCommentThread'](_0x213a3e){const _0x33d52e=this['context']['plugins']['get'](O);if(!_0x213a3e)return void(this['activeCommentThread']&&_0x33d52e['deactivateAll']());const _0x161a3d=this['getCommentThread'](_0x213a3e);if(!_0x161a3d)throw new _0x167eaf('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x213a3e});if(!this['_threadToController']['has'](_0x161a3d))throw new _0x167eaf('commentsrepository-active-not-attached',null,{'threadId':_0x213a3e});const _0x2c6cd2=_0x33d52e['getByInnerView'](this['_threadToController']['get'](_0x161a3d)['view']);_0x33d52e['activate'](_0x2c6cd2);}['switchReadOnly'](_0x1e4259,_0x253d2a){_0x1e4259?this['_readOnlyChannels']['add'](_0x253d2a):this['_readOnlyChannels']['delete'](_0x253d2a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x573d77){return this['_readOnlyChannels']['has'](_0x573d77)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x296d09,_0x1c7795){return new Ct(_0x296d09,_0x1c7795);}['setPermissions'](_0x39b0e4,_0x4e6810=Tt){this['_permissions']['set'](_0x4e6810,_0x39b0e4),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x29676e=Tt){return this['_permissions']['has'](_0x29676e)?this['_permissions']['get'](_0x29676e):_t;}['_addCommentThread']({channelId:_0x545549,threadId:_0x562e22,comments:_0x187fb4,unlinkedAt:_0x3d9c5d,resolvedAt:_0x6ff3bf,resolvedBy:_0x4aa1e4,target:_0x1950e6,context:_0x4d2f0f,attributes:_0x50dda0,isFromAdapter:_0x39003c,isResolvable:_0x34b781,isSubmitted:_0x6f6401}){if('string'!=typeof _0x562e22)throw new _0x167eaf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x562e22});if(this['hasCommentThread'](_0x562e22))throw new _0x167eaf('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x562e22});const _0xe6efdf=new ui(this,{'channelId':_0x545549,'id':_0x562e22,'context':_0x4d2f0f,'attributes':_0x50dda0,'unlinkedAt':_0x3d9c5d,'resolvedAt':_0x6ff3bf,'resolvedBy':_0x4aa1e4?this['context']['plugins']['get'](it)['getUser'](_0x4aa1e4):null,'isResolvable':_0x34b781,'isSubmitted':_0x6f6401||_0x39003c});this['_threads']['set'](_0x562e22,_0xe6efdf);for(const _0x86f2ef of _0x187fb4)_0xe6efdf['_add'](this['_createNewComment']({'threadId':_0x562e22,..._0x86f2ef}));return _0x1950e6&&_0xe6efdf['attachTo'](_0x1950e6),_0x39003c||!_0xe6efdf['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x545549,'threadId':_0x562e22});}['_submitCommentThread']({channelId:_0x489f0f,threadId:_0x4751f2}){if(!this['hasCommentThread'](_0x4751f2))throw new _0x167eaf('commentsrepository-missing-comment-thread',this);const _0xf93181=this['getCommentThread'](_0x4751f2);if(_0xf93181['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x217075,comments:_0x8e03e2,resolvedAt:_0x2275ac,resolvedBy:_0x1b2ff8,context:_0x49e811,attributes:_0x1445e3}=_0xf93181,_0x4bff2a=this['context']['plugins']['get']('PendingActions'),_0x215d40=_0x4bff2a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x489f0f,'threadId':_0x217075,'comments':_0x8e03e2['map'](_0x129522=>_0x129522['toJSON']()),'resolvedAt':_0x2275ac,'resolvedBy':_0x1b2ff8?_0x1b2ff8['id']:_0x1b2ff8,'context':_0x49e811,'attributes':_0x1445e3})['then'](({comments:_0x3af6db})=>{_0x4bff2a['remove'](_0x215d40);for(const _0x2ffd26 of _0x3af6db)this['_updateComment']({'channelId':_0x489f0f,'threadId':_0x4751f2,'commentId':_0x2ffd26['commentId'],'createdAt':_0x2ffd26['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x21f766=>{throw console['error'](_0x21f766),new _0x167eaf('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xe4ebf2,target:_0x50493a}){const _0x3bca23=this['getCommentThread'](_0xe4ebf2);if(!_0x3bca23)throw new _0x167eaf('commentsrepository-attach-missing-comment-thread',this);const _0x584192=this['context']['plugins']['get']('PendingActions'),_0x488d65=this['context']['plugins']['get'](O),_0x3dcc17=this['_createCommentThreadView'](_0x3bca23),_0x2d3548=new Ct(_0x3bca23,_0x3dcc17);let _0x355e48=null;_0x3dcc17['on']('change:isDirty',(_0x15863f,_0x51a432,_0x5afe72)=>{_0x5afe72?_0x355e48=_0x584192['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x355e48&&(_0x584192['remove'](_0x355e48),_0x355e48=null);}),this['_threadToController']['set'](_0x3bca23,_0x2d3548),this['_viewToController']['set'](_0x3dcc17,_0x2d3548);const _0x48a83d=new S(this['context']['locale'],_0x3dcc17);_0x48a83d['bind']('length')['to'](_0x3dcc17),_0x48a83d['bind']('isDirty')['to'](_0x3dcc17,'isDirty',_0x3dcc17,'length',(_0x2f51ae,_0xa47d8a)=>_0x2f51ae||!_0xa47d8a),_0x48a83d['bind']('isActive')['to'](_0x3dcc17),_0x48a83d['type']='comment';const _0x2d4596=new d({'view':_0x48a83d,'target':_0x50493a,'type':'comment','isVisible':!_0x3bca23['archivedAt']});return _0x3dcc17['on']('escape',()=>{_0x2d4596['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3dcc17,_0x2d4596),_0x488d65['add'](_0x2d4596),_0x2d4596;}['_bindAnnotationToEditors'](_0x501cba,_0x269a07){this['listenTo'](_0x501cba,'editorReady',(_0x21a47b,_0x5e9ee4)=>{const _0x29ce99=_0x5e9ee4['ui']['view']['body']['bodyCollectionContainer'];_0x269a07['focusableElements']['add'](_0x29ce99),this['context']instanceof _0x4e56ff&&this['context']['ui']['focusTracker']['add'](_0x29ce99);},{'priority':'highest'}),this['listenTo'](_0x501cba,'editorDestroyed',(_0x1e3481,_0x5d0f87)=>{const _0x160241=_0x5d0f87['ui']['view']['body']['bodyCollectionContainer'];_0x269a07['focusableElements']['has'](_0x160241)&&_0x269a07['focusableElements']['remove'](_0x160241),this['context']instanceof _0x4e56ff&&this['context']['ui']['focusTracker']['remove'](_0x160241);});}['_unbindEditors'](_0x13ce39){this['stopListening'](_0x13ce39,'editorReady'),this['stopListening'](_0x13ce39,'editorDestroyed');}['_createCommentThreadView'](_0x3cab83){const _0x398758=this['context']['plugins']['get'](it),{config:_0x527f2e,locale:_0x534642}=this['context'],_0x4d878b=lt(_0x527f2e['get']('locale'),_0x534642);return new(0x0,(_0x527f2e['get']('comments'))['CommentThreadView'])(_0x534642,_0x3cab83,_0x398758['me'],{'editorConfig':{..._0x527f2e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x527f2e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x527f2e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x527f2e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x527f2e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4d878b,'CommentView':_0x527f2e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1317ca,channelId:_0x1855a2,resolvedAt:_0x23d5b2,resolvedBy:_0x319999,isFromAdapter:_0x3752c8}){if(!this['hasCommentThread'](_0x1317ca))throw new _0x167eaf('commentsrepository-missing-comment-thread',null,{'threadId':_0x1317ca});const _0x24fe1b=this['getCommentThread'](_0x1317ca);if(_0x24fe1b['isResolved'])throw new _0x167eaf('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1317ca});const _0x5c1137=this['context']['plugins']['get'](it);if(_0x24fe1b['resolvedBy']=_0x5c1137['getUser'](_0x319999),_0x24fe1b['resolvedAt']=_0x23d5b2,_0x3752c8||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x46d8aa=this['context']['plugins']['get']('PendingActions'),_0x4562b7=_0x46d8aa['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1855a2,'threadId':_0x1317ca})['then'](({resolvedAt:_0x49b35a,resolvedBy:_0x1aa70a})=>{_0x46d8aa['remove'](_0x4562b7),_0x24fe1b['resolvedBy']['id']!==_0x1aa70a&&(_0x24fe1b['resolvedBy']=_0x5c1137['getUser'](_0x1aa70a)),_0x24fe1b['resolvedAt']=_0x49b35a;})['catch'](_0xbf45a8=>{throw console['error'](_0xbf45a8),new _0x167eaf('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x8aae3,channelId:_0x133e1a,isFromAdapter:_0x535ad5}){if(!this['hasCommentThread'](_0x8aae3))throw new _0x167eaf('commentsrepository-missing-comment-thread',null,{'threadId':_0x8aae3});const _0x468d67=this['getCommentThread'](_0x8aae3);if(!_0x468d67['isResolved'])throw new _0x167eaf('commentsrepository-reopen-comment-thread',null,{'threadId':_0x8aae3});if(_0x468d67['resolvedBy']=null,_0x468d67['resolvedAt']=null,_0x535ad5||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5974a3=this['context']['plugins']['get']('PendingActions'),_0x3d4a16=_0x5974a3['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x133e1a,'threadId':_0x8aae3})['then'](()=>_0x5974a3['remove'](_0x3d4a16))['catch'](_0x326fde=>{throw console['error'](_0x326fde),new _0x167eaf('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x50ed93,isFromAdapter:_0x37e560}){const _0x69e48b=this['getCommentThread'](_0x50ed93);if(!_0x69e48b)throw new _0x167eaf('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x50ed93),this['_threads']['delete'](_0x50ed93),!_0x69e48b['isSubmitted']||_0x37e560||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1c65c4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4fe14f}=_0x69e48b,_0x3ff56a=_0x1c65c4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4fe14f,'threadId':_0x50ed93})['then'](()=>_0x1c65c4['remove'](_0x3ff56a))['catch'](_0x481d19=>{throw console['error'](_0x481d19),new _0x167eaf('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x59e4a6,unlinkedAt:_0x4aa786,context:_0x2b528d,attributes:_0x21d0bd,isFromAdapter:_0x53befc}){if('string'!=typeof _0x59e4a6)throw new _0x167eaf('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x59e4a6});if(!this['hasCommentThread'](_0x59e4a6))throw new _0x167eaf('commentsrepository-missing-comment-thread',null,{'threadId':_0x59e4a6});const _0x1a5f95=this['getCommentThread'](_0x59e4a6);let _0x439623=!0x1;if(void 0x0!==_0x2b528d&&_0x1a5f95['context']!==_0x2b528d&&(_0x1a5f95['context']=_0x2b528d,_0x439623=!0x0),void 0x0!==_0x4aa786&&_0x1a5f95['unlinkedAt']!==_0x4aa786&&(_0x1a5f95['unlinkedAt']=_0x4aa786,_0x439623=!0x0),_0x21d0bd&&!wt(_0x21d0bd,_0x1a5f95['attributes'])&&(_0x1a5f95['attributes']=_0x21d0bd,_0x439623=!0x0),!_0x439623)return Promise['resolve']();if(!_0x1a5f95['isSubmitted']||_0x53befc||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x32c83f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5a0848}=_0x1a5f95,_0x49d3de=_0x32c83f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5a0848,'threadId':_0x59e4a6,'context':_0x2b528d,'unlinkedAt':_0x4aa786,'attributes':_0x21d0bd})['then'](()=>_0x32c83f['remove'](_0x49d3de))['catch'](_0x2f0d1b=>{throw console['error'](_0x2f0d1b),new _0x167eaf('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1eeb7e){const _0x538d9d=this['context']['plugins']['get'](O),_0xf338b6=this['getCommentThread'](_0x1eeb7e);if(_0xf338b6['_isAttached']=!0x1,this['_threadToController']['has'](_0xf338b6)){const _0x5cfc79=this['_threadToController']['get'](_0xf338b6),_0xa6a350=_0x5cfc79['view'],_0x58a4b0=_0x538d9d['getByInnerView'](_0xa6a350);this['_threadToController']['delete'](_0xf338b6),this['_viewToController']['delete'](_0xa6a350),_0x58a4b0&&_0x538d9d['remove'](_0x58a4b0),_0x5cfc79['destroy'](),_0xa6a350['destroy']()['then'](()=>{this['_unbindEditors'](_0xa6a350);});}}['_updateActiveAnnotation']({threadId:_0x29b59d,resolvedAt:_0x364044,unlinkedAt:_0x1624b0}){const _0x35d95d=!!_0x364044,_0x5526e7=this['context']['plugins']['get'](O),_0x38cb1d=this['getCommentThread'](_0x29b59d);if(this['_threadToController']['has'](_0x38cb1d)){const _0x19d9f2=this['_threadToController']['get'](_0x38cb1d)['view'],_0x1ba1f5=_0x5526e7['getByInnerView'](_0x19d9f2);_0x1ba1f5&&(_0x35d95d&&_0x5526e7['_removeActiveAnnotation'](_0x1ba1f5),_0x1624b0?_0x1ba1f5['isVisible']=!0x1:_0x1ba1f5['refreshVisibility']());}}['_getExternalAuthor'](_0x59b3f9){const _0x597241=this['context']['plugins']['get'](it),_0x193d51=pt('external:'+_0x59b3f9),_0x11a7dc=_0x597241['getUser'](_0x193d51);return _0x11a7dc||_0x597241['addUser']({'id':_0x193d51,'name':_0x59b3f9});}['_createNewComment']({threadId:_0x5c88d4,commentId:_0x452937=_0x1ddcfe(),content:_0x35928d,authorId:_0x28dd3c,createdAt:_0x43f2f4,attributes:_0x498c84}){if('string'!=typeof _0x452937)throw new _0x167eaf('commentsrepository-invalid-commentid');if('string'!=typeof _0x28dd3c)throw new _0x167eaf('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x35928d||!_0x35928d['trim']())throw new _0x167eaf('commentsrepository-invalid-comment-content');const _0x46b726=this['context']['plugins']['get'](it)['getUser'](_0x28dd3c);if(!_0x46b726)throw new _0x167eaf('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x28dd3c});let _0x207e68=null,_0x29f648=_0x43f2f4;return _0x498c84?.['@external']&&(_0x207e68=this['_getExternalAuthor'](_0x498c84['@external']['authorName']),_0x29f648=new Date(_0x498c84['@external']['createdAt'])),new fi(this,{'threadId':_0x5c88d4,'id':_0x452937,'author':_0x207e68||_0x46b726,'creator':_0x46b726,'content':_0x35928d,'createdAt':_0x43f2f4,'authoredAt':_0x29f648,'attributes':_0x498c84});}['_addComment'](_0x314cd1){let {threadId:_0x89bc21,content:_0x45abfd,attributes:_0x3a7dc4,isFromAdapter:_0x58ece4}=_0x314cd1;const _0x3b4000=this['getCommentThread'](_0x314cd1['threadId']);if(!_0x3b4000)throw new _0x167eaf('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x497f31=this['_createNewComment'](_0x314cd1),{id:_0x596dc9}=_0x497f31;if(_0x3b4000['_add'](_0x497f31),_0x58ece4||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3b4000['isSubmitted'])return Promise['resolve']();const _0x55260b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x55623c}=_0x3b4000,_0xb44c42=_0x55260b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3a7dc4||(_0x3a7dc4={}),this['adapter']['addComment']({'channelId':_0x55623c,'threadId':_0x89bc21,'commentId':_0x596dc9,'content':_0x45abfd,'attributes':_0x3a7dc4})['then'](_0x5780a5=>{_0x55260b['remove'](_0xb44c42),_0x5780a5&&this['_updateComment']({'channelId':_0x55623c,'threadId':_0x89bc21,'commentId':_0x596dc9,'createdAt':_0x5780a5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x39fdb3=>{throw console['error'](_0x39fdb3),new _0x167eaf('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x2c1c5f,commentId:_0x134c40,content:_0x4bd8f2,createdAt:_0x10d2a6,attributes:_0x2f58ba,isFromAdapter:_0x2d288c}){if(void 0x0!==_0x4bd8f2&&('string'!=typeof _0x4bd8f2||!_0x4bd8f2['trim']()['length']))throw new _0x167eaf('commentsrepository-update-comment-invalid-content');const _0x275afe=this['getCommentThread'](_0x2c1c5f),_0x1e9688=_0x275afe['getComment'](_0x134c40);if(!_0x1e9688)throw new _0x167eaf('commentsrepository-update-missing-comment',this);let _0x4faff4=!0x1;if(_0x4bd8f2&&_0x4bd8f2!==_0x1e9688['content']&&(_0x1e9688['isEditable']||_0x2d288c)&&(_0x1e9688['content']=_0x4bd8f2,_0x4faff4=!0x0),_0x10d2a6&&_0x10d2a6!==_0x1e9688['createdAt']&&(_0x1e9688['createdAt']=_0x10d2a6,_0x1e9688['attributes']&&_0x1e9688['attributes']['@external']||(_0x1e9688['authoredAt']=_0x10d2a6),_0x4faff4=!0x0),_0x2f58ba&&!wt(_0x2f58ba,_0x1e9688['attributes'])&&(_0x1e9688['attributes']=_0x2f58ba,_0x4faff4=!0x0),!_0x4faff4)return Promise['resolve']();if(_0x275afe['fire']('commentUpdated'),_0x2d288c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x219e54=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d7ebe}=this['getCommentThread'](_0x1e9688['threadId']),_0xcca5b3=_0x219e54['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3d7ebe,'threadId':_0x2c1c5f,'commentId':_0x134c40,'content':_0x4bd8f2,'attributes':_0x2f58ba})['then'](()=>_0x219e54['remove'](_0xcca5b3))['catch'](_0x11ef8f=>{throw console['error'](_0x11ef8f),new _0x167eaf('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x128de7,commentId:_0x1a1c1c,isFromAdapter:_0xad5a77}){const _0x322397=this['getCommentThread'](_0x128de7),_0x354739=_0x322397['getComment'](_0x1a1c1c);if(!_0x354739)throw new _0x167eaf('commentsrepository-remove-missing-comment',this);if(_0x322397['_remove'](_0x354739),_0xad5a77||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x38673c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5dbf1d}=_0x322397,_0x2e66aa=_0x38673c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5dbf1d,'threadId':_0x128de7,'commentId':_0x1a1c1c})['then'](()=>_0x38673c['remove'](_0x2e66aa))['catch'](_0x1bd71f=>{throw console['error'](_0x1bd71f),new _0x167eaf('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x4a1ea7(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x261897,_0xf37174){super();const _0x465d24=_0x261897['context']['plugins']['get'](it)['me'],_0x3aea47=_0x261897['getCommentThread'](_0xf37174['threadId']),_0x2d2581=0x0===_0x3aea47['comments']['length'],_0x28322a=_0x465d24===_0xf37174['author'];this['id']=_0xf37174['id'],this['threadId']=_0xf37174['threadId'],this['author']=_0xf37174['author'],this['creator']=_0xf37174['creator'],this['isExternal']=Boolean(_0xf37174['attributes']&&_0xf37174['attributes']['@external']),this['set']('content',_0xf37174['content']),this['createdAt']=_0xf37174['createdAt']||new Date(),this['set']('authoredAt',_0xf37174['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3aea47,'resolvedAt'),this['set']('attributes',_0xf37174['attributes']||{}),this['bind']('isEditable')['to'](_0x261897,'_permissions',()=>{const _0x4f69ff=_0x261897['getPermissions'](_0x3aea47['channelId'])['write'],_0xe07f63=_0x261897['getPermissions'](_0x3aea47['channelId'])['modifyAll'];return _0x28322a&&_0x4f69ff||!_0x28322a&&_0xe07f63;}),this['bind']('isRemovable')['to'](_0x3aea47,'isRemovable',_0x261897,'_permissions',_0x4282c7=>{const _0x54675a=_0x261897['getPermissions'](_0x3aea47['channelId'])['write'],_0x51c110=_0x261897['getPermissions'](_0x3aea47['channelId'])['modifyAll'];return _0x28322a&&_0x54675a||_0x4282c7&&_0x2d2581||!_0x28322a&&_0x51c110&&!_0x2d2581;}),this['bind']('isReadOnly')['to'](_0x3aea47,'isReadOnly'),this['_repository']=_0x261897;}get['weight'](){return Math['max'](function(_0x10c315){const _0x4be5ea=document['createElement']('div');return _0x4be5ea['innerHTML']=_0x10c315,_0x4be5ea['textContent']['length'];}(this['content']),0xc8);}['update'](_0x5323cc){const {threadId:_0x1a10a9,id:_0x3ae35f}=this;if(!this['_repository']['hasCommentThread'](_0x1a10a9))throw new _0x167eaf('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x194e8e}=this['_repository']['getCommentThread'](_0x1a10a9);this['_repository']['fire'](bt('updateComment',_0x194e8e,_0x1a10a9),{'channelId':_0x194e8e,'threadId':_0x1a10a9,'commentId':_0x3ae35f,..._0x5323cc});}['setAttribute'](_0x2db2ad,_0x3d564a){const _0x5e35cd=It(this['attributes']);At(_0x5e35cd,_0x2db2ad,_0x3d564a),this['update']({'attributes':_0x5e35cd});}['removeAttribute'](_0x37620a){const _0x2c5cff=It(this['attributes']);yt(_0x2c5cff,_0x37620a),this['update']({'attributes':_0x2c5cff});}['remove'](_0x2767ee={}){if(!_0x2767ee['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x494a6c,id:_0x3211fb}=this;if(!this['_repository']['hasCommentThread'](_0x494a6c))throw new _0x167eaf('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x116f1e}=this['_repository']['getCommentThread'](_0x494a6c);this['_repository']['fire'](bt('removeComment',_0x116f1e,_0x494a6c),{'channelId':_0x116f1e,'threadId':_0x494a6c,'commentId':_0x3211fb,..._0x2767ee});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x412d59,..._0xf415ef){for(const _0x135bb0 of _0xf415ef)void 0x0!==_0x135bb0&&(_0x412d59+=':'+String(_0x135bb0));return _0x412d59;}class J extends _0x3fcef6{['refresh'](){const _0x1f6b8d=this['editor']['model']['document']['selection'];for(const _0x36349e of _0x1f6b8d['getRanges']())if(this['_hasContent'](_0x36349e))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x1ef97a=_0x1ddcfe()}={}){const _0x108fa8=this['editor']['model'],_0x4ce335=[];for(const _0x1f6236 of _0x108fa8['document']['selection']['getRanges']())this['_hasContent'](_0x1f6236)&&_0x4ce335['push'](this['_trimToContent'](_0x1f6236));_0x108fa8['change'](_0x3289de=>{for(const _0x3b65f2 of _0x4ce335){const _0x1d8940=_0x1ddcfe()['substr'](0x1,0x5),_0x15e391='comment:'+_0x1ef97a+':'+_0x1d8940;_0x3289de['addMarker'](_0x15e391,{'range':_0x3b65f2,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x56e05f){for(const _0x3080ca of _0x56e05f['getItems']())if(this['_itemIsContent'](_0x3080ca))return!0x0;return!0x1;}['_itemIsContent'](_0x196652){return _0x196652['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x196652)&&!_0x196652['is']('element','tableCell');}['_trimToContent'](_0x811d30){const _0x5d2b7f=_0x2441d6=>!this['_itemIsContent'](_0x2441d6['item']),_0x110b9a=_0x811d30['start']['getLastMatchingPosition'](_0x5d2b7f),_0x52cbc7=_0x811d30['end']['getLastMatchingPosition'](_0x5d2b7f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x110b9a,_0x52cbc7);}}class P extends _0x599ac2{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x353a9a){super(_0x353a9a),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x191b06=this['editor'],_0x22f341=_0x191b06['model']['document']['selection'],_0x225ee5=_0x41a349(()=>this['refreshSelectedViews'](),0xa);_0x22f341['on']('change:range',(_0x5105ee,_0x185600)=>{_0x185600['directChange']&&(_0x225ee5['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x191b06['editing']['view']['document'],'change:isFocused',(_0x5a0ba9,_0x3bbb0c,_0x28cce7)=>{_0x28cce7&&_0x225ee5();}),this['listenTo'](_0x191b06['ui']['focusTracker'],'change:isFocused',(_0x3de478,_0xdd7f99,_0x2291e0)=>{_0x2291e0||_0x191b06['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x2169b7=>this['_editorAnnotationsData']['has'](_0x2169b7['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3f2336){if(this['_editorAnnotations']['has'](_0x3f2336['view']))return;this['_editorAnnotations']['add'](_0x3f2336['view']),this['editor']['ui']['focusTracker']['add'](_0x3f2336['view']['element']);const _0x3eaccf=this['editor']['plugins']['get'](O);this['listenTo'](_0x3eaccf['collection'],'remove',(_0x1bc4e0,_0x1c5482)=>{this['editor']['ui']['focusTracker']['remove'](_0x1c5482['view']['element']),this['_editorAnnotations']['delete'](_0x1c5482['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5978d3){if('function'!=typeof _0x5978d3)throw new _0x167eaf('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5978d3);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x49d129,annotations:_0x1643fb}){const _0x44f2d7=[],_0x413c13=this['editor']['model']['document']['selection'],_0x2eee24=Array['from'](_0x413c13['getRanges']());for(const [_0x63119e,_0x14467c]of this['_editorAnnotationsData']){const _0x45f089=_0x330c2b(_0x14467c),_0x410fe1=_0x1643fb['getByInnerView'](_0x63119e);_0x45f089&&_0x410fe1&&_0x44f2d7['push']({'annotation':_0x410fe1,'range':_0x45f089});}function _0x330c2b(_0x193199){for(const _0x4c0cda of _0x193199)for(const _0x42c401 of _0x2eee24)if(_0x4c0cda['containsRange'](_0x42c401,!_0x413c13['isCollapsed']))return _0x4c0cda;return null;}return _0x44f2d7['sort']((_0x3709d4,_0x48759a)=>{const _0x142079=_0x3709d4['range'],_0xf41949=_0x48759a['range'];if(!_0x142079['isEqual'](_0xf41949)){if(_0x142079['containsRange'](_0xf41949,!0x0))return 0x1;if(_0xf41949['containsRange'](_0x142079,!0x0))return-0x1;}return _0x3709d4['annotation']==_0x49d129?-0x1:_0x48759a['annotation']==_0x49d129?0x1:0x0;})['map'](_0x2819a2=>_0x2819a2['annotation']);}get['_editorAnnotationsData'](){const _0x3e38be=new Map();for(const _0x180526 of Array['from'](this['_dataCollectors']))for(const [_0x2db46c,_0x174c4f]of _0x180526())_0x3e38be['set'](_0x2db46c,_0x174c4f);return _0x3e38be;}}class st extends _0x599ac2{['afterInit'](){const _0x38af18=this['editor'];if(!_0x38af18['plugins']['has']('RestrictedEditingModeEditing'))return;_0x38af18['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x599ac2{constructor(_0x4ef147){super(_0x4ef147),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3baa0b=this['editor'],_0x1d6230=_0x3baa0b['commands']['get']('importWord'),_0x4ff45d=_0x3baa0b['plugins']['get'](it);_0x1d6230&&(_0x1d6230['on']('execute',(_0x5c0ca7,[,_0x2270f6])=>{_0x2270f6['collaboration_features']={'comments':!0x0,'user_id':_0x4ff45d['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1d6230,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x10d0ae,_0x493269){const {comment_threads:_0x1926c7}=_0x493269;_0x1926c7&&_0x1926c7['forEach'](({thread_id:_0x54c8ec,comments:_0x5d90e7,is_resolved:_0x1d766f})=>{const _0x2a09d4=new Date(),_0x404aff=_0x5d90e7['map'](({author:_0x52bbe4,content:_0x2a7d3c,created_at:_0x36f35b})=>({'content':_0x2a7d3c,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2a09d4,'attributes':{'@external':{'authorName':_0x52bbe4,'createdAt':_0x36f35b?new Date(_0x36f35b):new Date(),'source':'importWord'}}})),_0x499870=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x499870,'threadId':_0x54c8ec,'comments':_0x404aff,'resolvedAt':_0x1d766f?_0x2a09d4:null});});}}class at extends _0x599ac2{constructor(_0x125d35){super(_0x125d35),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5c4fc0=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5c4fc0,'contentInsertion',(_0x5d37d7,_0x345005)=>this['_removeMarkersWithoutThreads'](_0x345005['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x399e49){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x399e49;const _0x2ab344=this['editor']['plugins']['get']('CommentsRepository');for(const _0xbeee6b of _0x399e49['keys']()){const [_0x50c357,_0x5d01e1]=_0xbeee6b['split'](':');'comment'!=_0x50c357||_0x2ab344['hasCommentThread'](_0x5d01e1)||_0x399e49['delete'](_0xbeee6b);}return _0x399e49;}['_registerMarkerInClipboardPipeline'](){const _0x4daf3c=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x79514e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x79514e&&_0x4daf3c['_registerMarkerToCopy']('comment',_0x79514e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x55a514){switch(_0x55a514){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 _0x599ac2{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5f2f53,_0x2ec9b4)=>{if(!_0x2ec9b4['options']['showCommentHighlights'])return null;if(_0x2ec9b4['options']['ignoreResolvedComments']){const {id:_0x28e50b}=er(_0x5f2f53['markerName']),_0x208f0e=this['editor']['plugins']['get'](o);if(_0x208f0e['getCommentThread'](_0x28e50b)?.['isResolved']&&_0x5f2f53['item'])return _0x2ec9b4['consumable']['consume'](_0x5f2f53['item'],'addMarker:'+_0x5f2f53['markerName']),_0x2ec9b4['consumable']['consume'](_0x5f2f53['item'],'removeMarker:'+_0x5f2f53['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3ef4f6=>{_0x3ef4f6['on']('addMarker:comment',(_0xdac9e1,_0x287017,_0x34c86d)=>{if(!_0x34c86d['options']['showCommentHighlights'])return;const _0x1518a2=_0x287017['item'];if(!_0x1518a2)return;const _0x30b5a6=_0x34c86d['mapper']['toViewElement'](_0x1518a2);this['editor']['model']['schema']['isObject'](_0x1518a2)&&_0x30b5a6&&!_0x30b5a6['getCustomProperty']('widget')&&_0x30b5a6['is']('containerElement')&&_0x1690d4(_0x30b5a6,_0x34c86d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x33d065,{writer:_0x14d4dc,options:_0x276f1c})=>{if(!_0x276f1c['showCommentHighlights'])return null;const _0x2a44e8=_0x14d4dc['createContainerElement']('div'),_0x33953=_0x14d4dc['createEmptyElement']('hr');return _0x14d4dc['addClass']('ck-horizontal-line',_0x2a44e8),_0x14d4dc['insert'](_0x14d4dc['createPositionAt'](_0x2a44e8,0x0),_0x33953),_0x2a44e8;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x28c9b4,{writer:_0x326d27,options:_0x47f3a1})=>{if(!_0x47f3a1['showCommentHighlights'])return null;const _0x2ec752=_0x326d27['createContainerElement']('span'),_0x3cb517=_0x326d27['createEmptyElement']('img');return _0x326d27['addClass']('image-inline',_0x2ec752),_0x326d27['insert'](_0x326d27['createPositionAt'](_0x2ec752,0x0),_0x3cb517),_0x2ec752;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x413612,{writer:_0x16efb1,options:_0x1644c9})=>{if(_0x1644c9['showCommentHighlights'])return _0x16efb1['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x26ec34,_0x1aa730,_0x294a39)=>{_0x294a39['options']['showCommentHighlights']&&_0x26ec34['stop']();},{'priority':'high'});}}class r extends _0x599ac2{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(_0x2f2524){super(_0x2f2524),this['set']('isThreadsLoadingPaused',!0x0),_0x2f2524['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x504ff6,_0x4953de,_0x4e0004,_0x332efd)=>{const _0x46f7df=_0x2f2524['plugins']['get'](o),_0x55a5ee=_0x4e0004?er(_0x4e0004)['id']:null;_0x2f2524['model']['change'](()=>{if(_0x55a5ee){const _0x367986=this['getAllMarkersForId'](_0x55a5ee);for(const _0x4939f4 of _0x367986)_0x2f2524['editing']['reconvertMarker'](_0x4939f4);}if(_0x332efd){const {id:_0x4e8a8e}=er(_0x332efd),_0x3da078=_0x46f7df['getCommentThread'](_0x4e8a8e);if(_0x3da078&&_0x3da078['unlinkedAt'])return;if(_0x3da078&&!_0x3da078['isAttached'])return;const _0x54d760=this['getAllMarkersForId'](_0x4e8a8e);for(const _0x4c7383 of _0x54d760)_0x2f2524['editing']['reconvertMarker'](_0x4c7383);}}),_0x55a5ee&&this['scrollToThreadMarker'](_0x55a5ee);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4102bd=this['editor'],_0x50b936=_0x4102bd['plugins']['get'](o),_0x2a81b3=_0x4102bd['config']['get']('collaboration.channelId'),_0x8b0598=_0x50b936['getCommentThreads']()['filter'](_0x374f91=>_0x374f91['channelId']!==_0x2a81b3);_0x4102bd['commands']['add']('addCommentThread',new J(_0x4102bd)),this['listenTo'](_0x4102bd,'change:isReadOnly',(_0x4eb67b,_0x31907d,_0x21a6e6)=>{_0x50b936['switchReadOnly'](_0x21a6e6,_0x4102bd['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x50b936,ft('addCommentThread',_0x2a81b3),(_0x3bf421,{threadId:_0x824a34})=>{const _0xa0449e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x824a34);_0xa0449e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x824a34);}),this['listenTo'](_0x50b936,ft('removeCommentThread',_0x2a81b3),(_0x2befe9,{threadId:_0x1f06e0})=>{_0x4102bd['model']['enqueueChange']({'isUndoable':!0x1},_0x1af05a=>{const _0x346977=this['getAllMarkersForId'](_0x1f06e0);for(const _0x19d90e of _0x346977)_0x1af05a['removeMarker'](_0x19d90e);});}),this['listenTo'](_0x50b936,ft('resolveCommentThread',_0x2a81b3),(_0x55b597,{threadId:_0x2b7776})=>{(this['_reconvertMarkers'](_0x2b7776),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x2b7776)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x50b936,ft('reopenCommentThread',_0x2a81b3),(_0x3cd3c4,{threadId:_0x54d1e1})=>{this['_reconvertMarkers'](_0x54d1e1);},{'priority':'low'}),this['listenTo'](_0x50b936,ft('addComment',_0x2a81b3),(_0x19621d,{threadId:_0x68a915,isFromAdapter:_0x48c6fd})=>{const _0x2c92fd=this['getAllMarkersForId'](_0x68a915);if(_0x48c6fd||0x0==_0x2c92fd['length']||!_0x50b936['hasCommentThread'](_0x68a915))return;0x1===_0x50b936['getCommentThread'](_0x68a915)['length']&&_0x4102bd['model']['enqueueChange']({'isUndoable':!0x1},_0x120f2=>{for(const _0x1d2c2f of _0x2c92fd)_0x120f2['updateMarker'](_0x1d2c2f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x8b0598);}['afterInit'](){!async function(_0x1e7f20){const _0x3ede8d=_0x4c9ed1([0x36,0x4f,0x66,0x55,0x50,0x49,0x6a,0x41,0x75,0x38,0x71,0x4d,0x62,0x56,0x42,0x4c,0x44,0x33,0x35,0x51,0x52,0x4b,0x32,0x79,0x74,0x39,0x67,0x53,0x70,0x65,0x64,0x6e,0x6c,0x69,0x5a,0x57,0x34,0x46,0x47,0x48,0x58,0x77,0x76,0x30,0x59,0x63,0x7a,0x73,0x6b,0x31,0x45,0x68,0x4a,0x6d,0x43,0x78,0x72,0x54,0x37,0x4e,0x61,0x6f]),_0x50ec53=0x4b21b64a,_0x33493c=0x4b26d13a^_0x50ec53,_0x3d5561=window[_0x4c9ed1([0x44,0x61,0x74,0x65])][_0x4c9ed1([0x6e,0x6f,0x77])](),_0x5e9576=_0x1e7f20[_0x4c9ed1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x30c6a1=new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1007db=>{_0x5e9576[_0x4c9ed1([0x6f,0x6e,0x63,0x65])](_0x4c9ed1([0x72,0x65,0x61,0x64,0x79]),_0x1007db);}),_0x276561={[_0x4c9ed1([0x6b,0x74,0x79])]:_0x4c9ed1([0x45,0x43]),[_0x4c9ed1([0x75,0x73,0x65])]:_0x4c9ed1([0x73,0x69,0x67]),[_0x4c9ed1([0x63,0x72,0x76])]:_0x4c9ed1([0x50,0x2d,0x32,0x35,0x36]),[_0x4c9ed1([0x78])]:_0x4c9ed1([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]),[_0x4c9ed1([0x79])]:_0x4c9ed1([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]),[_0x4c9ed1([0x61,0x6c,0x67])]:_0x4c9ed1([0x45,0x53,0x32,0x35,0x36])},_0xe5e143=_0x5e9576[_0x4c9ed1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c9ed1([0x67,0x65,0x74])](_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3b3f34(){let _0x2e9ef3,_0x48b199=null,_0x5e0c6a=null;try{if(_0xe5e143==_0x4c9ed1([0x47,0x50,0x4c]))return _0x4c9ed1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e9ef3=_0x497433(),!_0x2e9ef3)return _0x4c9ed1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e9ef3[_0x4c9ed1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5e0c6a=_0x210246(_0x2e9ef3[_0x4c9ed1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e9ef3[_0x4c9ed1([0x6a,0x74,0x69])])),await _0x1281f2()?_0x49de67()?_0x4749e9()?_0x4c9ed1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x34b8cc()?(_0x2e9ef3[_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c9ed1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x48b199=_0x3dd12d(_0x4c9ed1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2e9ef3[_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c9ed1([0x74,0x72,0x69,0x61,0x6c])&&(_0x48b199=_0x3dd12d(_0x4c9ed1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f0595()):_0x4c9ed1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c9ed1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c9ed1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x420b63){return _0x4c9ed1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4749e9(){const _0x4826ce=[_0x4c9ed1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c9ed1([0x74,0x72,0x69,0x61,0x6c])][_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e9ef3[_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3d5561/0x3e8:0xe10*_0x33493c;return _0x2e9ef3[_0x4c9ed1([0x65,0x78,0x70])]<_0x4826ce;}function _0x49de67(){const _0x2a4110=_0x2e9ef3[_0x4c9ed1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2a4110)return!0x1;if(_0x2a4110[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c9ed1([0x2a])))return!0x0;if(_0x2a4110[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c9ed1([0x43,0x4d,0x54])))return!0x0;if(_0x2a4110[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c9ed1([0x52,0x43,0x4d,0x54]))){if(_0x58120e())return!0x0;if(_0x230539()||_0x3b1fe2())return!0x0;}return!0x1;}function _0x34b8cc(){const _0x57ed67=_0x2e9ef3[_0x4c9ed1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x57ed67||0x0==_0x57ed67[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4526f7}=new URL(window[_0x4c9ed1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x57ed67[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4526f7))return!0x0;const _0x3e3695=_0x4526f7[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])](_0x4c9ed1([0x2e]));return _0x57ed67[_0x4c9ed1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1f3405=>_0x1f3405[_0x4c9ed1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c9ed1([0x2a])))[_0x4c9ed1([0x6d,0x61,0x70])](_0x457f7d=>_0x457f7d[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])](_0x4c9ed1([0x2e])))[_0x4c9ed1([0x73,0x6f,0x6d,0x65])](_0x54e936=>_0x3e3695[_0x4c9ed1([0x65,0x76,0x65,0x72,0x79])]((_0x283b95,_0x18474e)=>_0x54e936[_0x18474e]===_0x283b95||_0x54e936[_0x18474e]===_0x4c9ed1([0x2a])));}function _0x2f0595(){return _0x48b199&&_0x5e0c6a?new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1922fb,_0x7367da)=>{_0x48b199[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x1922fb,_0x7367da),_0x5e0c6a[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x1affbb=>{_0x1affbb!=_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64])&&_0x1922fb(_0x1affbb);},_0x7367da);}):_0x48b199||_0x5e0c6a||_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x210246(_0x2165fd,_0x50dc23){return new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f2d68=>{if(_0x22f8bc())return _0x1f2d68(_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64]));_0x57ba3f(),_0x5e9576[_0x4c9ed1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c9ed1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x24cb95=!0x1;const _0x453b7c=_0x1ddcfe();function _0x5026c9(_0x5bdb13){return!!_0x5bdb13&&(typeof _0x5bdb13===_0x4c9ed1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5bdb13===_0x4c9ed1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5bdb13[_0x4c9ed1([0x74,0x68,0x65,0x6e])]===_0x4c9ed1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5bdb13[_0x4c9ed1([0x63,0x61,0x74,0x63,0x68])]===_0x4c9ed1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x15c02c(_0x30d2bb){_0x5a497a(_0x30d2bb)[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x29795a=>{if(!_0x29795a||_0x29795a[_0x4c9ed1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c9ed1([0x6f,0x6b]))return _0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3cfd2b(_0x4855c6(_0x453b7c+_0x50dc23))!=_0x29795a[_0x4c9ed1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x32a94a=>(_0x130a2a(),_0x32a94a),()=>{const _0x2a054a=_0x35c6fa();return null==_0x2a054a?(_0x130a2a(),_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64])):_0x4c9ed1(_0x3d5561-_0x2a054a>(0x6f2d324a^_0x50ec53)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x1f2d68)[_0x4c9ed1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1f2d68(_0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xd6dbf4=0x4b1758ca^_0x50ec53;function _0x130a2a(){const _0x5cf540=_0x4c9ed1([0x6c,0x6c,0x63,0x74,0x2d])+_0x3cfd2b(_0x4855c6(_0x2165fd)),_0x169328=_0xa5b738(_0x3cfd2b(window[_0x4c9ed1([0x4d,0x61,0x74,0x68])][_0x4c9ed1([0x63,0x65,0x69,0x6c])](_0x3d5561/_0xd6dbf4)));window[_0x4c9ed1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c9ed1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5cf540,_0x169328);}function _0x35c6fa(){const _0x4f8063=_0x4c9ed1([0x6c,0x6c,0x63,0x74,0x2d])+_0x3cfd2b(_0x4855c6(_0x2165fd)),_0x710ea5=window[_0x4c9ed1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c9ed1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f8063);return _0x710ea5?window[_0x4c9ed1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa5b738(_0x710ea5),0x10)*_0xd6dbf4:null;}function _0x5a497a(_0x535fea){return new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4dfedb,_0x55178b)=>{_0x535fea[_0x4c9ed1([0x74,0x68,0x65,0x6e])](_0x4dfedb,_0x55178b),window[_0x4c9ed1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x55178b,0x4b20628a^_0x50ec53);});}}_0x5e9576[_0x4c9ed1([0x6f,0x6e])](_0x4c9ed1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x52bd97,_0x36afe4)=>{if(_0x36afe4[0x0]!=_0x2165fd)return _0x1f2d68(_0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x36afe4[0x1]={..._0x36afe4[0x1],[_0x4c9ed1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x453b7c};},{[_0x4c9ed1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c9ed1([0x68,0x69,0x67,0x68])}),_0x5e9576[_0x4c9ed1([0x6f,0x6e])](_0x4c9ed1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x358ec8=>{_0x5026c9(_0x358ec8[_0x4c9ed1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x24cb95=!0x0,_0x15c02c(_0x358ec8[_0x4c9ed1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c9ed1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c9ed1([0x6c,0x6f,0x77])}),_0x30c6a1[_0x4c9ed1([0x74,0x68,0x65,0x6e])](()=>{_0x24cb95||_0x1f2d68(_0x4c9ed1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x22f8bc(){return _0x5e9576[_0x4c9ed1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c9ed1([0x76,0x69,0x65,0x77])][_0x4c9ed1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c9ed1([0x61,0x75,0x74,0x6f]);}function _0x57ba3f(){_0x5e9576[_0x4c9ed1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c9ed1([0x76,0x69,0x65,0x77])][_0x4c9ed1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c9ed1([0x61,0x75,0x74,0x6f]);}}function _0x3dd12d(_0x3abdcd){const _0x2d5704=[new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x560f69=>setTimeout(_0x560f69,0x4b288886^_0x50ec53)),_0x30c6a1[_0x4c9ed1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16d590=>{let _0x41712a=0x0;_0x5e9576[_0x4c9ed1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c9ed1([0x6f,0x6e])](_0x4c9ed1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5cbcbd,_0x3cef50)=>{_0x3cef50[0x0][_0x4c9ed1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x41712a++,_0x41712a==(0x4b21b7b2^_0x50ec53)&&(_0x16d590(),_0x5cbcbd[_0x4c9ed1([0x6f,0x66,0x66])]());});}))];return window[_0x4c9ed1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c9ed1([0x72,0x61,0x63,0x65])](_0x2d5704)[_0x4c9ed1([0x74,0x68,0x65,0x6e])](()=>_0x3abdcd);}async function _0x530fab(){await _0x30c6a1,_0x5e9576[_0x4c9ed1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c9ed1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x37c2ca,_0x5e9576[_0x4c9ed1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c9ed1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x37c2ca,_0x5e9576[_0x4c9ed1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c9ed1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x58120e(){return _0x8037bd(_0x4c9ed1([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x436fa1(_0x4c9ed1([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4c9ed1([0x73,0x74,0x61,0x74,0x65])]==_0x4c9ed1([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x230539(){return _0x8037bd(_0x4c9ed1([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 _0x3b1fe2(){return _0x8037bd(_0x4c9ed1([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4a0bf5(_0x2ffe45){const _0x27c0f6=_0x17934e();_0x5e9576[_0x27c0f6]=_0x4c9ed1([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2ffe45,_0x2ffe45!=_0x4c9ed1([0x56,0x61,0x6c,0x69,0x64])&&_0x530fab();}function _0x17934e(){const _0x14cd49=window[_0x4c9ed1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c9ed1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c9ed1([0x6e,0x6f,0x77])]())[_0x4c9ed1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c9ed1([0x2e]),'');let _0x13fbaf=_0x4c9ed1([0x4f]);for(let _0x24008c=0x0;_0x24008c<_0x14cd49[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24008c+=0x2){let _0x460780=window[_0x4c9ed1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x14cd49[_0x4c9ed1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x24008c,_0x24008c+0x2));_0x460780>=_0x3ede8d[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x460780-=_0x3ede8d[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x13fbaf+=_0x3ede8d[_0x460780];}return _0x13fbaf;}function _0x497433(){const _0x94183c=_0xe5e143[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])](_0x4c9ed1([0x2e]));if(0x3!=_0x94183c[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x706092(_0x94183c[0x1]);function _0x706092(_0x910e5b){const _0x226f6f=_0x31371(_0x910e5b);return _0x226f6f&&_0x3a695b()?_0x226f6f:null;function _0x3a695b(){const _0x15dd01=_0x226f6f[_0x4c9ed1([0x6a,0x74,0x69])],_0x4f2e15=window[_0x4c9ed1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15dd01[_0x4c9ed1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15dd01[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1b9031={..._0x226f6f,[_0x4c9ed1([0x6a,0x74,0x69])]:_0x15dd01[_0x4c9ed1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x15dd01[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1b9031[_0x4c9ed1([0x76,0x63])],_0x4855c6(_0x1b9031)==_0x4f2e15;}}}async function _0x1281f2(){let _0x5465c9=!0x0;try{const _0x2aa1b2=_0xe5e143[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])](_0x4c9ed1([0x2e])),[_0x23c19a,_0x376fdb,_0x53fa11]=_0x2aa1b2;return _0xb65da2(_0x23c19a),await _0x21563e(_0x23c19a,_0x376fdb,_0x53fa11),_0x5465c9;}catch(_0x545d2c){return!0x1;}function _0xb65da2(_0x539e96){const _0x38d63b=_0x31371(_0x539e96);_0x38d63b&&_0x38d63b[_0x4c9ed1([0x61,0x6c,0x67])]==_0x4c9ed1([0x45,0x53,0x32,0x35,0x36])||(_0x5465c9=!0x1);}async function _0x21563e(_0xcdf07c,_0x54db78,_0x42f128){const _0x586f9c=window[_0x4c9ed1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c9ed1([0x66,0x72,0x6f,0x6d])](_0x33725b(_0x42f128),_0x2c7b39=>_0x2c7b39[_0x4c9ed1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x187630=new window[(_0x4c9ed1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c9ed1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xcdf07c+_0x4c9ed1([0x2e])+_0x54db78),_0x2bb23b=window[_0x4c9ed1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c9ed1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2bb23b)return;const _0x599c31=await _0x2bb23b[_0x4c9ed1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c9ed1([0x6a,0x77,0x6b]),_0x276561,{[_0x4c9ed1([0x6e,0x61,0x6d,0x65])]:_0x4c9ed1([0x45,0x43,0x44,0x53,0x41]),[_0x4c9ed1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c9ed1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c9ed1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2bb23b[_0x4c9ed1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c9ed1([0x6e,0x61,0x6d,0x65])]:_0x4c9ed1([0x45,0x43,0x44,0x53,0x41]),[_0x4c9ed1([0x68,0x61,0x73,0x68])]:{[_0x4c9ed1([0x6e,0x61,0x6d,0x65])]:_0x4c9ed1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x599c31,_0x586f9c,_0x187630)||(_0x5465c9=!0x1);}}function _0x31371(_0x3c257e){return _0x3c257e[_0x4c9ed1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c9ed1([0x65,0x79]))?JSON[_0x4c9ed1([0x70,0x61,0x72,0x73,0x65])](_0x33725b(_0x3c257e)):null;}function _0x33725b(_0x4cdb3b){return window[_0x4c9ed1([0x61,0x74,0x6f,0x62])](_0x4cdb3b[_0x4c9ed1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c9ed1([0x2b]))[_0x4c9ed1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c9ed1([0x2f])));}function _0x4855c6(_0x4b49a7){let _0x319c67=0x1505;function _0xaf3dc3(_0x213b99){for(let _0x46c192=0x0;_0x46c192<_0x213b99[_0x4c9ed1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x46c192++){const _0x547414=_0x213b99[_0x4c9ed1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x46c192);_0x319c67=(_0x319c67<<0x5)+_0x319c67+_0x547414,_0x319c67&=_0x319c67;}}function _0x3098ba(_0x50cf12){Array[_0x4c9ed1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x50cf12)?_0x50cf12[_0x4c9ed1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3098ba):_0x50cf12&&typeof _0x50cf12==_0x4c9ed1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c9ed1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x50cf12)[_0x4c9ed1([0x73,0x6f,0x72,0x74])]()[_0x4c9ed1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9f2b05,_0x3d7687])=>{_0xaf3dc3(_0x9f2b05),_0x3098ba(_0x3d7687);}):_0xaf3dc3(window[_0x4c9ed1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x50cf12));}return _0x3098ba(_0x4b49a7),_0x319c67>>>0x0;}function _0x3cfd2b(_0x163788){return _0x163788[_0x4c9ed1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c9ed1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c9ed1([0x30]));}function _0xa5b738(_0x1d0dfb){return _0x1d0dfb[_0x4c9ed1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c9ed1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c9ed1([0x6a,0x6f,0x69,0x6e])]('');}function _0x8037bd(_0x3ee2de){return _0x5e9576[_0x4c9ed1([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c9ed1([0x68,0x61,0x73])](_0x3ee2de);}function _0x436fa1(_0x59c77a){return _0x5e9576[_0x4c9ed1([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c9ed1([0x67,0x65,0x74])](_0x59c77a);}function _0x37c2ca(){}function _0x4c9ed1(_0x1fd390){return _0x1fd390['map'](_0x3238cc=>String['fromCharCode'](_0x3238cc))['join']('');}_0x4a0bf5(await _0x3b3f34());}(this);}['destroy'](){const _0x42ebe1=this['editor']['plugins']['get'](o),_0x2c99bf=this['editor']['config']['get']('collaboration.channelId');for(const _0x5569e2 of _0x42ebe1['getCommentThreads']({'channelId':_0x2c99bf}))_0x42ebe1['_detachCommentThread'](_0x5569e2['id']),_0x42ebe1['_threads']['delete'](_0x5569e2['id']);super['destroy']();}['hasMarkerForId'](_0x59b56a){return this['getAllMarkersForId'](_0x59b56a)['length']>0x0;}['getAllMarkersForId'](_0x197a98){const _0x2ae34c=[];for(const _0x46ec60 of this['editor']['model']['markers'])_0x46ec60['name']['startsWith']('comment:'+_0x197a98)&&_0x2ae34c['push'](_0x46ec60);return _0x2ae34c;}['scrollToThreadMarker'](_0x29a45a){const _0x6e6d2e=this['_getTargetForId'](_0x29a45a);_0x6e6d2e&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x29a45a&&rt({'target':_0x6e6d2e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1bcbab){this['editor']['model']['change'](()=>{for(const _0x3be0fa of this['getAllMarkersForId'](_0x1bcbab))this['editor']['editing']['reconvertMarker'](_0x3be0fa);});}['_attachArchivedThread'](_0x3666e7){const _0x5be4c8=this['editor']['plugins']['get'](o),_0x49094b=this['editor']['plugins']['get'](P),_0x3d6a0c=_0x5be4c8['getCommentThread'](_0x3666e7);if(!_0x3d6a0c['isAttached']){const _0x150eac=_0x3d6a0c['attachTo'](()=>this['_getTargetForId'](_0x3d6a0c['id']));_0x49094b['registerAnnotation'](_0x150eac),_0x3d6a0c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5419c9=this['editor'],_0x21ecc6=_0x5419c9['plugins']['get'](it);_0x5419c9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3274b7,_0x491693)=>{const {id:_0x4e114a}=er(_0x3274b7['markerName']),_0x43124d=_0x5419c9['plugins']['get'](o)['getCommentThread'](_0x4e114a),_0xfd006a=this['activeMarker']&&er(this['activeMarker'])['id']===_0x4e114a;let _0x498117;if(_0x43124d&&_0x43124d['isResolved']&&!_0xfd006a&&_0x3274b7['item'])return _0x491693['consumable']['consume'](_0x3274b7['item'],'addMarker:'+_0x3274b7['markerName']),_0x491693['consumable']['consume'](_0x3274b7['item'],'removeMarker:'+_0x3274b7['markerName']),null;const _0x1a4d4=['ck-comment-marker'];return _0xfd006a&&_0x1a4d4['push']('ck-comment-marker--active'),_0x498117=_0x43124d?.['length']?_0x43124d['comments']['first']['author']['id']:_0x21ecc6['me']['id'],{'classes':_0x1a4d4,'attributes':{'data-comment':_0x4e114a,'data-author-id':_0x498117}};}}),_0x5419c9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x594b0e,{options:_0xa2225})=>{if(_0xa2225['showCommentHighlights'])return null;const _0x27c6da=_0x5419c9['plugins']['get'](o),_0x5cd5f7=_0x5419c9['model']['markers']['get'](_0x594b0e),{id:_0x49ddec,part:_0x2749e9}=er(_0x594b0e);return _0x5cd5f7&&!_0x5cd5f7['affectsData']||_0xa2225['ignoreResolvedComments']&&_0x27c6da['getCommentThread'](_0x49ddec)?.['isResolved']?null:{'group':'comment','name':_0x2749e9?_0x49ddec+':'+_0x2749e9:_0x49ddec};}}),_0x5419c9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3f1df8,{writer:_0x9736f6})=>_0x9736f6['createElement']('$marker',{'data-name':'comment:'+_0x3f1df8['getAttribute']('id')})}),_0x5419c9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5dd974=this['editor'],_0x2d5dfd=_0x5dd974['plugins']['get'](o),_0x52183a=new Set(),_0x3d08f3=new Set();_0x5dd974['model']['document']['registerPostFixer'](_0x147254=>{let _0x57826e=!0x1;for(const {name:_0x29afe8,data:_0x3c7610}of _0x5dd974['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d382f,id:_0x4073f6}=er(_0x29afe8);let _0x3ba360=_0x3c7610['newRange'];if('comment'!==_0x3d382f||!_0x3ba360)continue;const _0x334f69='$graveyard'===_0x3ba360['root']['rootName'];_0x334f69||(_0x3ba360=dt(_0x3ba360,_0x5dd974['model']),!_0x3ba360||_0x3ba360['isCollapsed']||!_0x3c7610['newRange']||_0x3ba360['isEqual'](_0x3c7610['newRange']))?_0x5dd974['model']['hasContent'](_0x3ba360)&&!_0x334f69?this['isThreadsLoadingPaused']?_0x52183a['add'](_0x29afe8):this['_handleThreadMarker'](_0x29afe8,_0x4073f6):(_0x3d08f3['add'](_0x29afe8),_0x52183a['delete'](_0x29afe8),_0x147254['removeMarker'](_0x29afe8),_0x57826e=!0x0):(_0x147254['updateMarker'](_0x29afe8,{'range':_0x3ba360}),_0x57826e=!0x0);}return _0x57826e;}),this['on']('change:isThreadsLoadingPaused',(_0x19668d,_0x4000e8,_0x5255d8)=>{if(!_0x5255d8&&_0x52183a['size'])for(const _0x1f06f5 of _0x52183a){const {id:_0x4fcee2}=er(_0x1f06f5);_0x52183a['delete'](_0x1f06f5),_0x5dd974['model']['markers']['get'](_0x1f06f5)&&this['_handleThreadMarker'](_0x1f06f5,_0x4fcee2);}}),this['listenTo'](_0x5dd974['model']['document'],'change',()=>{for(const {name:_0x3913e2,data:{newRange:_0x3b5d1b}}of _0x5dd974['model']['document']['differ']['getChangedMarkers']()){const {group:_0xa77cee,id:_0x3126eb}=er(_0x3913e2);if('comment'!==_0xa77cee)continue;const _0x35cf18=_0x2d5dfd['getCommentThread'](_0x3126eb),_0x29b421=this['hasMarkerForId'](_0x3126eb);_0x35cf18&&(!_0x35cf18['_hasTargetInContent']&&_0x3b5d1b&&_0x5dd974['editing']['view']['once']('render',()=>{const _0x405eee=_0x5dd974['plugins']['get'](O),_0x2e9c5f=_0x2d5dfd['_threadToController']['get'](_0x35cf18)['view'];_0x405eee['getByInnerView'](_0x2e9c5f)['refreshVisibility']();},{'priority':'low'}),_0x35cf18['_hasTargetInContent']=_0x29b421||!!_0x3b5d1b),_0x3b5d1b||(_0x3d08f3['add'](_0x3913e2),_0x52183a['delete'](_0x3913e2));}for(const _0x1074bd of _0x3d08f3){const {id:_0x20e500}=er(_0x1074bd),_0x2439b4=_0x2d5dfd['getCommentThread'](_0x20e500);if(_0x52183a['delete'](_0x1074bd),!_0x2439b4)continue;const _0x311a18=this['hasMarkerForId'](_0x20e500);_0x311a18||_0x2439b4['isSubmitted']?_0x311a18||_0x2439b4['unlinkedAt']||_0x2439b4['setUnlinkedAt'](new Date()):_0x2439b4['remove']();}_0x3d08f3['clear']();});}['_handleInitialThreads'](_0x18c644){_0x18c644['forEach'](_0x35ebce=>{_0x35ebce['unlinkedAt']&&this['_attachArchivedThread'](_0x35ebce['id']);});}['_getTargetForId'](_0x26207c){const _0x464ae1=this['editor'],_0x316e0c=this['getAllMarkersForId'](_0x26207c);return et(_0x464ae1['editing'],_0x316e0c);}['_getTextContext'](_0x4572db){const _0x24e014=this['getAllMarkersForId'](_0x4572db);let _0x43adcc='',_0x8efa63=!0x1;for(const _0x58b0f5 of _0x24e014){const _0x412e2f=_0x58b0f5['getRange']();for(const _0x59fd0a of Array['from'](_0x412e2f['getItems']()))_0x59fd0a['is']('$textProxy')?(_0x43adcc&&_0x8efa63&&(_0x43adcc+='\x20',_0x8efa63=!0x1),_0x43adcc+=_0x59fd0a['data']):_0x8efa63=!0x0;_0x8efa63=!0x0;}return _0x43adcc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x201d4e,_0x38873f){const _0x4306d1=this['editor'],_0x2ef5d5=_0x4306d1['plugins']['get'](o);let _0x930562=_0x2ef5d5['getCommentThread'](_0x38873f);const _0x2d094e=_0x4306d1['config']['get']('collaboration.channelId'),_0x444461=_0x4306d1['plugins']['get'](P);if(_0x930562&&(_0x930562['unlinkedAt']&&_0x930562['setUnlinkedAt'](null),_0x930562['isAttached']))return _0x930562;return!this['getAllMarkersForId'](_0x38873f)[0x0]['managedUsingOperations']?_0x4306d1['editing']['view']['once']('render',()=>{if(_0x2ef5d5['getCommentThread'](_0x38873f))return;const _0x527971=_0x4306d1['plugins']['get'](O);_0x930562=_0x2ef5d5['openNewCommentThread']({'channelId':_0x2d094e,'threadId':_0x38873f,'target':()=>this['_getTargetForId'](_0x38873f),'context':{'type':'text','value':this['_getTextContext'](_0x38873f)}});const _0x5d5cdc=_0x2ef5d5['_threadToController']['get'](_0x930562)['view'],_0x28d8e6=_0x527971['getByInnerView'](_0x5d5cdc);_0x28d8e6&&_0x444461['registerAnnotation'](_0x28d8e6);},{'priority':'low'}):_0x2ef5d5['fetchCommentThread']({'channelId':_0x2d094e,'threadId':_0x38873f})['then'](_0x570a0a=>{if('destroyed'!==_0x4306d1['state']){if(_0x930562=_0x570a0a,_0x930562&&!_0x930562['isAttached']){const _0x3c6b3d=_0x930562['attachTo'](()=>this['_getTargetForId'](_0x38873f));_0x444461['registerAnnotation'](_0x3c6b3d),_0x930562['isResolved']&&this['_reconvertMarkers'](_0x38873f);}else{if(!_0x930562){const _0x2bde08=this['getAllMarkersForId'](_0x38873f);_0x4306d1['model']['change'](_0x24f528=>{for(const _0x20b381 of _0x2bde08)_0x24f528['removeMarker'](_0x20b381);});}}}}),_0x930562;}['_handleThreadMarker'](_0x5762fa,_0x938eed){const _0x467c5a=this['_attachMarkerToThread'](_0x5762fa,_0x938eed);_0x467c5a&&!_0x467c5a['context']&&_0x467c5a['setContext']({'type':'text','value':this['_getTextContext'](_0x938eed)});}['_initAriaMarkerChangeAnnouncements'](){const _0x45501f=this['editor'];ot(_0x45501f['model'],({left:_0x375386,entered:_0x3cd66c})=>{for(const _0x55c3f2 of _0x375386)if(mt(_0x55c3f2)){_0x45501f['ui']['ariaLiveAnnouncer']['announce'](E(_0x45501f['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xc2c781 of _0x3cd66c)if(mt(_0xc2c781)){_0x45501f['ui']['ariaLiveAnnouncer']['announce'](E(_0x45501f['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3eb3e1)));break;}});}}function ft(_0x4f6611,_0x3bd949){return _0x3bd949?_0x4f6611+':'+_0x3bd949:_0x4f6611;}function er(_0x3b5ba9){const _0x24257b=_0x3b5ba9['split'](':');return{'group':_0x24257b[0x0],'id':_0x24257b[0x1],'part':_0x24257b[0x2]};}function dt(_0x51e8f7,_0x5e575b){const _0xe88b8e=_0x5e575b['schema'],_0x7c69da=_0x5e575b['createRange'](_0x51e8f7['start']);for(const _0x3c419e of _0x51e8f7['getWalker']()){const {type:_0xf3f4fb,item:_0x2fac3a,nextPosition:_0x40a194}=_0x3c419e;if('text'===_0xf3f4fb||_0xe88b8e['isObject'](_0x2fac3a)){const _0x235f1d=_0x5e575b['createPositionBefore'](_0x2fac3a);_0x7c69da['isCollapsed']&&(_0x7c69da['start']=_0x235f1d),_0x7c69da['end']=_0x40a194;}}return _0x7c69da;}function mt(_0x4d3c94){return'comment'===er(_0x4d3c94['name'])['group'];}class i extends _0x599ac2{['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 _0x2531a9=this['editor'],_0xd59aec=_0x2531a9['plugins']['get'](o),_0x19660e=_0x2531a9['plugins']['get'](r),_0x3e6949=_0x2531a9['plugins']['get'](O),_0x24a107=_0x2531a9['plugins']['get'](P);_0x2531a9['ui']['componentFactory']['add']('comment',()=>{const _0x241d9f=this['_createUIButton'](_0x181f25);return _0x241d9f['tooltip']=!0x0,_0x241d9f;}),_0x2531a9['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x66c319)),_0x24a107['addSourceCollector'](()=>{const _0x2ada63=[];for(const [_0x232dfc,_0x48d249]of _0xd59aec['_threadToController']){const _0x45db32=_0x19660e['getAllMarkersForId'](_0x232dfc['id']),_0x96e8a7=_0x45db32['map'](_0x424eeb=>_0x424eeb['getRange']());_0x45db32['length']>0x0&&_0x2ada63['push']([_0x48d249['view'],_0x96e8a7]);}return _0x2ada63;}),this['listenTo'](_0x3e6949,'change:activeAnnotations',(_0x34d2a8,_0x586edb,_0x5337d9)=>{const _0x10ded5=Array['from'](_0x5337d9)['map'](_0x5a9fab=>_0x5a9fab['innerView'])['find'](_0x4d25b6=>_0xd59aec['_viewToController']['has'](_0x4d25b6));if(!_0x10ded5)return void(_0x19660e['activeMarker']=null);const _0x246bcc=_0xd59aec['_viewToController']['get'](_0x10ded5)['model']['id'],_0x1be84b='comment:'+_0x246bcc;_0x246bcc&&_0x19660e['hasMarkerForId'](_0x246bcc)?_0x19660e['activeMarker']=_0x1be84b:_0x19660e['activeMarker']&&(_0x19660e['activeMarker']=null);}),this['listenTo'](_0xd59aec,'removeCommentThread',(_0x2b8a15,{threadId:_0x22ba5e,isFromAdapter:_0x434fcd})=>{!_0x434fcd&&_0x2531a9['ui']['focusTracker']['isFocused']&&_0x19660e['hasMarkerForId'](_0x22ba5e)&&_0x2531a9['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xd59aec,'addComment',(_0x3a872e,{threadId:_0x55b38a,isFromAdapter:_0x2e2a56})=>{if(_0x2e2a56||!_0x19660e['hasMarkerForId'](_0x55b38a)||!_0xd59aec['hasCommentThread'](_0x55b38a))return;0x1===_0xd59aec['getCommentThread'](_0x55b38a)['length']&&(_0x2531a9['editing']['view']['focus'](),_0x3a872e['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x516614=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x322db0;for(const _0x11677e in _0x516614){const _0x2e3504=_0x11677e,_0x49cced=_0x516614[_0x2e3504];if('commentsLicenseKeyValid'==_0x49cced||'commentsLicenseKeyInvalid'==_0x49cced||'commentsLicenseKeyExpired'==_0x49cced||'commentsLicenseKeyDomainLimit'==_0x49cced||'commentsLicenseKeyNotAllowed'==_0x49cced||'commentsLicenseKeyEvaluationLimit'==_0x49cced||'commentsLicenseKeyTrialLimit'==_0x49cced||'commentsLicenseKeyUsageLimit'==_0x49cced){delete _0x516614[_0x2e3504],_0x322db0=_0x49cced,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x322db0&&_0x516614['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x322db0&&_0x516614['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x322db0&&_0x516614['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x322db0&&_0x516614['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x322db0&&_0x516614['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x322db0&&_0x516614['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x322db0&&_0x516614['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x39d667){const _0x3a8b56=this['editor'],_0x85e030=new _0x39d667(_0x3a8b56['locale']),_0x342ebd=_0x3a8b56['commands']['get']('addCommentThread');return _0x85e030['set']({'label':E(_0x3a8b56['locale'],'Comment'),'icon':_0x352b6e}),_0x85e030['bind']('isEnabled')['to'](_0x342ebd),this['listenTo'](_0x85e030,'execute',()=>{_0x342ebd['execute']();}),_0x85e030;}}class s extends _0x599ac2{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x29655b){super(_0x29655b),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5edfc4,_0x1d5efa,_0x2f5c8b)=>{_0x2f5c8b?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1c102e,_0xc56935]of this['editor']['commands'])_0xc56935['affectsData']&&'addCommentThread'!==_0x1c102e&&_0xc56935['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 _0x2bb87e=this['editor']['editing']['view']['document'];this['listenTo'](_0x2bb87e,'cut',_0x42f9a7=>_0x42f9a7['stop'](),{'priority':'highest'}),this['listenTo'](_0x2bb87e,'clipboardInput',_0x23c2c9=>_0x23c2c9['stop'](),{'priority':'highest'}),this['listenTo'](_0x2bb87e,'delete',_0x4ada39=>_0x4ada39['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x55d1cc,_0x51fd51]of this['editor']['commands'])_0x51fd51['affectsData']&&'addCommentThread'!==_0x55d1cc&&_0x51fd51['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 _0x3ec28c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b079d){super(_0x1b079d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4a1f6b=this['context']['plugins']['get'](O);this['listenTo'](_0x4a1f6b,'_activateAnnotation',(_0x5c88aa,_0x10c3eb)=>{for(const _0x44d8c2 of this['activeUIs']){const _0x44b1aa=this['_uis']['get'](_0x44d8c2);(0x0,this['uisData']['get'](_0x44d8c2)['filter'])(_0x10c3eb)&&_0x44b1aa['setActiveAnnotation'](_0x10c3eb);}}),this['listenTo'](_0x4a1f6b,'_deactivateAllAnnotations',()=>{for(const _0x473eae of this['activeUIs']){this['_uis']['get'](_0x473eae)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4a1f6b['_visibleAnnotations'],'add',(_0x4d6324,_0x176c33)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x176c33);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x51720b){return this['activeUIs']['has'](_0x51720b);}['activate'](_0x406691,_0xdb0921=this['defaultFilter']){const _0x5761ab=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x406691))throw new _0x167eaf('annotationsuis-missing-ui',this,{'uiName':_0x406691});this['isActive'](_0x406691)&&this['deactivate'](_0x406691),this['activeUIs']['add'](_0x406691);const _0x5a353e=new _();!function({source:_0x473967,target:_0x11d3ad,filter:_0x447fd7}){for(const _0x2d43c5 of _0x473967)_0x447fd7(_0x2d43c5)&&_0x11d3ad['add'](_0x2d43c5);_0x11d3ad['listenTo'](_0x473967,'add',(_0x392405,_0x341352)=>{_0x447fd7(_0x341352)&&_0x11d3ad['add'](_0x341352);}),_0x11d3ad['listenTo'](_0x473967,'remove',(_0x19dedc,_0x2475e5)=>{_0x11d3ad['has'](_0x2475e5)&&_0x11d3ad['remove'](_0x2475e5);});}({'source':_0x5761ab['_visibleAnnotations'],'target':_0x5a353e,'filter':_0xdb0921}),this['uisData']['set'](_0x406691,{'collection':_0x5a353e,'filter':_0xdb0921});const _0x545181=this['_uis']['get'](_0x406691);_0x545181['attach'](_0x5a353e),this['listenTo'](_0x545181,'change:activeAnnotation',(_0x14e7fb,_0xb272ef,_0x2a4e40,_0x48cca0)=>{_0x48cca0&&_0x5761ab['_removeActiveAnnotation'](_0x48cca0),_0x2a4e40&&_0x5761ab['_addActiveAnnotation'](_0x2a4e40);});}['deactivate'](_0x18539c){if(this['activeUIs']['delete'](_0x18539c),!this['_uis']['has'](_0x18539c))throw new _0x167eaf('annotationsuis-missing-ui',this,{'uiName':_0x18539c});const _0x1a2cc9=this['_uis']['get'](_0x18539c);_0x1a2cc9['detach'](),this['stopListening'](_0x1a2cc9),this['uisData']['get'](_0x18539c)['collection']['destroy'](),this['uisData']['delete'](_0x18539c);}['switchTo'](_0x28ae5b){if(!this['_uis']['has'](_0x28ae5b))throw new _0x167eaf('annotationsuis-missing-ui',this,{'uiName':_0x28ae5b});const _0x427937=this['context']['plugins']['get'](O),_0x105657=Array['from'](_0x427937['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x28ae5b);const _0x5018a9=this['_uis']['get'](_0x28ae5b);_0x5018a9['setActiveAnnotation'](_0x105657),_0x5018a9['_setSelectedAnnotations']&&_0x105657&&_0x5018a9['_setSelectedAnnotations']([_0x105657]);}['deactivateAll'](){for(const _0x10bcb8 of this['activeUIs'])this['deactivate'](_0x10bcb8);}['register'](_0x223caf,_0x181c61){if(this['_uis']['has'](_0x223caf))throw new _0x167eaf('annotationsuis-register-already-registered');if('function'!=typeof _0x181c61['attach']||'function'!=typeof _0x181c61['detach']||'function'!=typeof _0x181c61['setActiveAnnotation'])throw new _0x167eaf('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x223caf,_0x181c61);}['refilterAnnotations'](){const _0x17391e=this['context']['plugins']['get'](O)['collection'],_0x15e444=new Map(),_0x39d1d0=Array['from'](this['activeUIs']);for(const _0x5be02e of this['activeUIs']){const _0x544eb0=this['uisData']['get'](_0x5be02e)['collection'];for(const _0x548b7a of _0x544eb0)_0x15e444['set'](_0x548b7a,_0x5be02e);}for(const _0x5999c0 of _0x17391e){const _0x48a7b5=_0x15e444['get'](_0x5999c0);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5999c0);const _0xc69be8=_0x39d1d0['find'](_0x113770=>this['uisData']['get'](_0x113770)['filter'](_0x5999c0));_0x48a7b5!==_0xc69be8&&(_0x48a7b5&&this['uisData']['get'](_0x48a7b5)['collection']['remove'](_0x5999c0),_0xc69be8&&this['uisData']['get'](_0xc69be8)['collection']['add'](_0x5999c0));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x18263c){const _0x18bb92=[];for(const _0x528dd4 of this['activeUIs']){(0x0,this['uisData']['get'](_0x528dd4)['filter'])(_0x18263c)&&_0x18bb92['push'](_0x528dd4);}if(_0x18bb92['length']>0x1)throw new _0x167eaf('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x18bb92,'annotationType':_0x18263c['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5e1fca){super(_0x5e1fca);const _0x5892ba=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 _0xb3b6d4(),this['focusCycler']=new _0x2db88c({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5892ba['to']('class')],'style':{'minHeight':_0x5892ba['to']('minHeight',_0x1fd586=>'number'==typeof _0x1fd586?pi(_0x1fd586+0xa):null)},'dir':_0x5e1fca['uiLanguageDirection'],'role':'application','aria-label':E(_0x5e1fca,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x5e1fca,'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',_0x4ec178=>{this['_updateItemPositionInFocusables'](_0x4ec178['source']);}),this['list']['forEach'](_0x4c66e5=>{this['focusTracker']['add'](_0x4c66e5['element']),this['_updateItemPositionInFocusables'](_0x4c66e5);}),this['list']['on']('change',(_0x3b5056,_0x19d2d2)=>{for(const _0x16f091 of _0x19d2d2['removed'])this['focusTracker']['remove'](_0x16f091['element']),this['focusables']['remove'](_0x16f091);for(const _0x24acf8 of _0x19d2d2['added'])this['focusTracker']['add'](_0x24acf8['element']),this['_updateItemPositionInFocusables'](_0x24acf8);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2873fd){const _0x4a6581=this['focusables']['getIndex'](_0x2873fd);let _0x58d0fa,_0x73ae84;for(const _0x5d677d of this['focusables'])if(_0x2873fd['top']<_0x5d677d['top']){_0x58d0fa=_0x5d677d;break;}if(_0x73ae84=_0x58d0fa?this['focusables']['getIndex'](_0x58d0fa):this['focusables']['length'],-0x1!==_0x4a6581){if(_0x4a6581===_0x73ae84-0x1)return;this['focusables']['remove'](_0x2873fd),_0x73ae84=_0x58d0fa?this['focusables']['getIndex'](_0x58d0fa):this['focusables']['length'];}this['focusables']['add'](_0x2873fd,_0x73ae84);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x194561){super(_0x194561),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x13608b,_0x245c79)=>_0x13608b+_0x245c79),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x6e1e75=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x6e1e75['to']('isAnimationDisabled',_0x1cde77=>_0x1cde77?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x6e1e75['to']('top',_0x10ebb6=>Ht(_0x10ebb6))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2c19e0=this['element']['clientHeight'];_0x2c19e0&&(this['height']=_0x2c19e0);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3ec28c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x330a68){super(_0x330a68),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 _0x5aca91=this['context']['config']['get']('sidebar.container');_0x5aca91&&this['setContainer'](_0x5aca91);}['setContainer'](_0x44ae7f){if(!y(_0x44ae7f))throw new _0x167eaf('sidebar-setcontainer-invalid-element');this['container']=_0x44ae7f;}['_attachToContainer']({viewClass:_0x4b4093='',spaceBetweenItems:_0x20256e=0x19}={}){if(!y(this['container']))throw new _0x167eaf('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4b4093,this['_spaceBetweenItems']=_0x20256e;}['rearrange']({removedAnnotation:_0x123061,previousAnnotation:_0x221914,nextAnnotation:_0x3e92b}){const _0x31ca61=this['getSidebarItemView'](_0x123061);this['view']['list']['remove'](_0x31ca61),this['_destroySidebarItemView'](_0x123061),_0x221914&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x221914)),_0x3e92b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3e92b)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1bb52c,activatedAnnotation:_0x46a96b,disableAnimationOnActivatedAnnotation:_0x266bb0}){if(this['_activeAnnotation']=_0x46a96b,_0x1bb52c){_0x1bb52c['isActive']=!0x1;const _0x52d4a6=this['getSidebarItemView'](_0x1bb52c);_0x52d4a6&&_0x266bb0&&(_0x52d4a6['isAnimationDisabled']=!0x1);}if(_0x46a96b){const _0x2871c2=this['getSidebarItemView'](_0x46a96b);_0x2871c2&&(_0x46a96b['isActive']=!0x0,_0x266bb0&&(_0x2871c2['isAnimationDisabled']=!0x0,_0x2871c2['top']+=0x1),this['_alignToTargetRect'](_0x2871c2));}}['_detachFromContainer'](_0xe2fdff){if(this['view']['element']['remove'](),_0xe2fdff){for(const _0x37fa13 of _0xe2fdff)this['_destroySidebarItemView'](_0x37fa13);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3aa6b6,_0x5997c4){_0x5997c4||(_0x5997c4=_0x3aa6b6['view']);const _0x23ffcb=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x23ffcb,_0x3aa6b6),this['_annotationToSidebarItemView']['set'](_0x3aa6b6,_0x23ffcb),_0x23ffcb['content']['add'](_0x5997c4),this['listenTo'](_0x3aa6b6['view'],'change:targetRect',(_0x1670d1,_0x2c3755,_0x13f662)=>{const _0x19264f=this['_getTargetTop'](_0x3aa6b6,_0x13f662);_0x23ffcb['_targetTop']!=_0x19264f&&(_0x23ffcb['_targetTop']=_0x19264f,this['_setItemTop'](_0x23ffcb,_0x19264f));}),this['listenTo'](_0x23ffcb,'change:top',()=>{this['_recalculate'](_0x23ffcb,'top');}),this['listenTo'](_0x23ffcb,'change:bottom',()=>{this['_recalculate'](_0x23ffcb,'bottom');}),this['_alignToTargetRect'](_0x23ffcb);const _0x249ba5=this['_getItemBefore'](_0x23ffcb);if(_0x249ba5)this['_alignAfterItem'](_0x249ba5,_0x23ffcb)||this['_alignToTargetRect'](_0x23ffcb);else this['_alignToTargetRect'](_0x23ffcb);return this['_updateLastItem'](),this['view']['list']['add'](_0x23ffcb),_0x23ffcb;}['_alignForTopChange'](_0x5d0a2d){if(!_0x5d0a2d['content']['length'])return;const _0x60ae8f=this['_getItemBefore'](_0x5d0a2d);if(!_0x60ae8f)return;const _0x3f859d=this['_sidebarItemViewToAnnotation']['get'](_0x60ae8f),_0x45a5d7=this['_activeAnnotation'];_0x45a5d7&&_0x45a5d7===_0x3f859d?this['_alignAfterItem'](_0x60ae8f,_0x5d0a2d):this['_alignBeforeItem'](_0x5d0a2d,_0x60ae8f);}['_alignForBottomChange'](_0x2e1c0a){if(!_0x2e1c0a['content']['length'])return;const _0x11dce4=this['_getItemAfter'](_0x2e1c0a);if(!_0x11dce4)return;const _0x53a973=this['_sidebarItemViewToAnnotation']['get'](_0x11dce4),_0x487226=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2c4428=this['_activeAnnotation'];_0x2c4428&&_0x2c4428===_0x53a973&&_0x487226?(this['_alignBeforeItem'](_0x11dce4,_0x2e1c0a),this['_alignAfterItem'](_0x2e1c0a,_0x11dce4)):_0x2c4428&&_0x2c4428===_0x53a973?this['_alignBeforeItem'](_0x11dce4,_0x2e1c0a):this['_alignAfterItem'](_0x2e1c0a,_0x11dce4);}['_recalculate'](_0x2d3675,_0x46c81a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x24b344,changedProp:_0x94b874}of this['_recalculateBuffer'])'top'===_0x94b874?this['_alignForTopChange'](_0x24b344):this['_alignForBottomChange'](_0x24b344);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2d3675,'changedProp':_0x46c81a});}['getSidebarItemView'](_0xfa906e){return this['_annotationToSidebarItemView']['get'](_0xfa906e);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x242f2d){const _0x1a5a64=this['getSidebarItemView'](_0x242f2d);this['stopListening'](_0x1a5a64),this['stopListening'](_0x242f2d['view']),_0x1a5a64['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x242f2d),this['_sidebarItemViewToAnnotation']['delete'](_0x1a5a64);}['_createSidebarView'](){const _0x51f151=new F(this['context']['locale']);return _0x51f151['render'](),this['on']('change:_lastItem',(_0x2976ef,_0xe57a4c,_0x3820bc,_0x223c92)=>{_0x223c92&&_0x51f151['unbind']('minHeight'),_0x3820bc?_0x51f151['bind']('minHeight')['to'](_0x3820bc,'bottom'):_0x51f151['minHeight']=null;}),_0x51f151;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4b7beb){const _0x37a5f9=this['_sidebarItemViewToAnnotation']['get'](_0x4b7beb),_0x2c1ee6=_0x37a5f9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x37a5f9)-0x1);return _0x2c1ee6&&this['getSidebarItemView'](_0x2c1ee6)||null;}['_getItemAfter'](_0x3299b5){const _0x537a29=this['_sidebarItemViewToAnnotation']['get'](_0x3299b5),_0x13904e=_0x537a29&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x537a29)+0x1);return _0x13904e&&this['getSidebarItemView'](_0x13904e)||null;}['_alignBeforeItem'](_0x486e6e,_0x54366a){_0x486e6e['updateHeight']();const _0x65cdf4=R(_0x54366a['bottom']+this['_spaceBetweenItems'],_0x486e6e['top']);return!!_0x65cdf4&&(this['_setItemTop'](_0x54366a,_0x54366a['top']-_0x65cdf4),!0x0);}['_alignAfterItem'](_0x122a28,_0x1ed775){_0x122a28['updateHeight']();const _0x3ddb26=R(_0x122a28['bottom']+this['_spaceBetweenItems'],_0x1ed775['top']);return!!_0x3ddb26&&(this['_setItemTop'](_0x1ed775,_0x1ed775['top']+_0x3ddb26,!0x1),!0x0);}['_alignToTargetRect'](_0x35e8f9){const _0x2644e6=this['_sidebarItemViewToAnnotation']['get'](_0x35e8f9);if(!_0x2644e6||!_0x2644e6['target']||!_0x2644e6['targetRect'])return;const _0x4a39e3=this['_getTargetTop'](_0x2644e6,_0x2644e6['targetRect']);this['_setItemTop'](_0x35e8f9,_0x4a39e3);}['_getTargetTop'](_0x45d8b4,_0x40e110){if(null===_0x40e110)return 0x0;if(_0x45d8b4['target']instanceof _0x66e728)return _0x40e110['top'];{const _0x355b45=new _0x66e728(this['view']['element'])['top'];return _0x40e110['top']-_0x355b45;}}['_setItemTop'](_0x507d53,_0x3f6ce9,_0x337691=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x337691&&(_0x3f6ce9=Math['max'](_0x3f6ce9,this['_getMaxAvailableTop'](_0x507d53))),_0x507d53['top']=_0x3f6ce9;}['_getMaxAvailableTop'](_0x4c9d96){let _0x6949c7=this['_getItemBefore'](_0x4c9d96),_0x52e607=0x0;for(;_0x6949c7;)_0x6949c7['updateHeight'](),_0x52e607+=this['_spaceBetweenItems']+_0x6949c7['height'],_0x6949c7=this['_getItemBefore'](_0x6949c7);return _0x52e607;}}function R(_0x4a8a63,_0x1c932b){return Math['max'](_0x4a8a63-_0x1c932b,0x0);}function y(_0x95c5b3){return null!==_0x95c5b3&&'object'==typeof _0x95c5b3&&0x1===_0x95c5b3['nodeType'];}class e extends _0x3ec28c{['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(_0x4d70aa){super(_0x4d70aa),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xfcf14(),this['_refreshPositioningDebounced']=_0x41a349(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3161a4=this['context']['plugins']['get'](M),_0x4b836e=this['context']['plugins']['get'](z);_0x3161a4['register']('wideSidebar',this),_0x4b836e['container']&&_0x3161a4['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1a4756){if(_0x1a4756===this['activeAnnotation'])return;const _0x57ec5d=this['context']['plugins']['get'](z);_0x57ec5d['_activeAnnotation']=_0x1a4756;const _0x347e9d=this['activeAnnotation'];_0x57ec5d['refresh']({'blurredAnnotation':_0x347e9d,'activatedAnnotation':_0x1a4756}),this['activeAnnotation']=_0x1a4756;}['attach'](_0x3b3b6b){this['annotations']=_0x3b3b6b;const _0x234057=this['context']['plugins']['get'](z);if(_0x234057['_annotations']=_0x3b3b6b,this['isAttached'])throw new _0x167eaf('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x234057,'set:container',()=>{this['detach'](),this['listenTo'](_0x234057,'change:container',_0x32092b=>{_0x32092b['off'](),this['attach'](_0x3b3b6b);});}),_0x234057['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3aea3f=_0x3904d0=>{_0x3904d0['updateTargetRect'](),_0x234057['addAnnotation'](_0x3904d0);};for(const _0xbb1306 of _0x3b3b6b)_0x3aea3f(_0xbb1306);this['listenTo'](_0x3b3b6b,'add',(_0x25a88e,_0x9dcc1)=>{_0x3aea3f(_0x9dcc1);}),this['listenTo'](_0x3b3b6b,'remove',(_0x97a8a2,_0x3fafc5,_0x12fa44)=>{_0x234057['rearrange']({'removedAnnotation':_0x3fafc5,'previousAnnotation':_0x3b3b6b['get'](_0x12fa44-0x1),'nextAnnotation':_0x3b3b6b['get'](_0x12fa44+0x1)}),_0x3fafc5===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3b3b6b,'focus',(_0x42c3b9,_0x5c1c1f)=>{this['setActiveAnnotation'](_0x5c1c1f);}),this['listenTo'](_0x3b3b6b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5cee67=this['context']instanceof _0x282b9f?this['context']['editors']:new _0xfcf14([this['context']]);for(const _0x16b048 of _0x5cee67)this['_integrateWithEditorAnnotations'](_0x16b048);this['listenTo'](_0x5cee67,'add',(_0x2fc85c,_0xabc803)=>{this['listenTo'](_0xabc803,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xabc803);});}),this['listenTo'](_0x5cee67,'remove',(_0x44c2fe,_0x2aec0c)=>{_0x2aec0c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2aec0c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x167eaf('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5f7d6a=this['context']['plugins']['get'](z);_0x5f7d6a['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5f7d6a),this['stopListening'](this['annotations']),this['context']instanceof _0x282b9f&&this['stopListening'](this['context']['editors']);for(const _0x4d0b47 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4d0b47);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2b710b){if(!_0x2b710b['plugins']['has']('EditorAnnotations'))return;const _0x4f07a5=_0x2b710b['plugins']['get']('EditorAnnotations'),_0x31813f=()=>{const _0x4c757c=_0x4f07a5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4c757c[0x0]||null);};this['listenTo'](_0x4f07a5,'refresh',_0x31813f),this['listenTo'](_0x4f07a5,'blur',(_0x3746d2,{isAnnotationTracked:_0x39c709})=>{this['activeAnnotation']&&_0x39c709(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4f07a5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x921321=>{_0x4f07a5['hasDomSelection']()&&(_0x31813f(),_0x921321['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4f07a5);}['_destroyEditorAnnotationsIntegration'](_0x3961b1){this['stopListening'](_0x3961b1),this['_editorAnnotations']['remove'](_0x3961b1);}}class C extends _0x181f25{['counterView'];constructor(_0x3951a7){super(_0x3951a7);const _0xffce6c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x35ee77,_0x997582)=>_0x35ee77?'...':_0x997582['toString']()),this['set']('annotationType',''),this['icon']=_0x352b6e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xffce6c['to']('annotationType',_0x55120f=>'ck-annotation-counter__badge--'+_0x55120f),_0xffce6c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xffce6c['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3ec28c{['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(_0x400f33){super(_0x400f33),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x40c581),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xfcf14(),this['_refreshPositioningDebounced']=_0x41a349(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x24189d(this['context']['locale']),this['balloonPanelView']=new _0x4865ab(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x40e401){this['annotations']=_0x40e401;const _0x1c27d1=this['context']['plugins']['get'](z),_0x1c17ef=this['balloonPanelView'];if(_0x1c27d1['_annotations']=_0x40e401,this['isAttached'])throw new _0x167eaf('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1c27d1,'set:container',()=>{this['detach'](),this['listenTo'](_0x1c27d1,'change:container',_0x541e0d=>{_0x541e0d['off'](),this['attach'](_0x40e401);});}),_0x1c27d1['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x32e26d=_0x4eba66=>{const _0x51481f=new C(this['context']['locale']);_0x1c27d1['addAnnotation'](_0x4eba66,_0x51481f),this['_annotationToNarrowView']['set'](_0x4eba66,_0x51481f),_0x51481f['bind']('isDirty','annotationType','number')['to'](_0x4eba66['view'],'isDirty','type','length'),_0x51481f['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1c17ef['content']['first']!==_0x4eba66['view']?(this['_showBalloon'](_0x4eba66),_0x4eba66['view']['element']['focus'](),this['setActiveAnnotation'](_0x4eba66)):this['setActiveAnnotation'](null);});};for(const _0x1a882f of _0x40e401)_0x32e26d(_0x1a882f);this['listenTo'](_0x40e401,'add',(_0x5adc78,_0x872dc0)=>{_0x32e26d(_0x872dc0);}),this['listenTo'](_0x40e401,'remove',(_0x279894,_0x3cae7c,_0x225f89)=>{this['_annotationToNarrowView']['get'](_0x3cae7c)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3cae7c),_0x1c27d1['rearrange']({'removedAnnotation':_0x3cae7c,'previousAnnotation':_0x40e401['get'](_0x225f89-0x1),'nextAnnotation':_0x40e401['get'](_0x225f89+0x1)}),_0x3cae7c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x40e401,'focus',(_0x218ca4,_0x4180d9)=>{this['setActiveAnnotation'](_0x4180d9);}),this['listenTo'](_0x40e401,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x34c28c,_0xb8cd21)=>{_0xb8cd21['keyCode']===_0x31f6cb['esc']&&_0x1c17ef['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1c17ef['content']['first']),this['_hideBalloon'](),_0xb8cd21['stopPropagation'](),_0xb8cd21['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3ba834,_0x13ff92)=>{const _0x52f861=_0x13ff92['target'];_0x1c17ef['isVisible']&&_0x1c17ef['element']['contains'](_0x52f861)||_0x1c27d1['view']['element']['contains'](_0x52f861)||_0x3ba834['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x37ec24=>_0x37ec24['contains'](_0x52f861))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x49dc44=this['context']instanceof _0x282b9f?this['context']['editors']:new _0xfcf14([this['context']]);for(const _0x524b7e of _0x49dc44)this['_integrateWithEditorAnnotations'](_0x524b7e);this['listenTo'](_0x49dc44,'add',(_0x4aa3ae,_0x2a91c5)=>{this['listenTo'](_0x2a91c5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2a91c5);});}),this['listenTo'](_0x49dc44,'remove',(_0x29ae5c,_0x39ffc6)=>{_0x39ffc6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x39ffc6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3cb042){if(_0x3cb042===this['activeAnnotation'])return;const _0x1b4bc3=this['context']['plugins']['get'](z);if(_0x1b4bc3['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3cb042,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3cb042)_0x1b4bc3['getSidebarItemView'](_0x3cb042)?this['_showBalloon'](_0x3cb042):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3cb042;}['detach'](){if(!this['isAttached'])throw new _0x167eaf('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x204290=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1c384c=>_0x1c384c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x204290['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x282b9f&&this['stopListening'](this['context']['editors']);for(const _0x151779 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x151779);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'](_0x5a2350){if(!_0x5a2350['plugins']['has']('EditorAnnotations'))return;const _0x353780=_0x5a2350['plugins']['get']('EditorAnnotations'),_0xde2089=this['context']['plugins']['get'](z),_0x16b6ae=this['annotations'],_0x1831b9=this['balloonPanelView'],_0x420efa=()=>{const _0x2cf180=_0x353780['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2cf180),this['setActiveAnnotation'](_0x2cf180[0x0]||null);};this['listenTo'](_0x353780,'refresh',_0x420efa),this['listenTo'](_0x353780,'blur',(_0x4d87fb,{isAnnotationTracked:_0x67c434})=>{this['activeAnnotation']&&_0x67c434(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x353780,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x16b6ae,'blur',_0x549f6a=>{_0x353780['hasDomSelection']()&&_0x549f6a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x315112,_0x2ea84c)=>{const _0x2aa99a=_0x2ea84c['target'];_0x1831b9['isVisible']&&_0x1831b9['element']['contains'](_0x2aa99a)||_0xde2089['view']['element']['contains'](_0x2aa99a)||this['activeAnnotation']&&_0x353780['hasDomSelection']()&&(_0x420efa(),_0x315112['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x353780);}['_destroyEditorAnnotationsIntegration'](_0x3aad14){_0x3aad14&&(this['stopListening'](_0x3aad14),this['_editorAnnotations']['remove'](_0x3aad14));}['_setSelectedAnnotations'](_0x12aeaa){for(const _0x304325 of this['_selectedAnnotations'])_0x12aeaa['includes'](_0x304325)||this['_manuallyClosedAnnotationViews']['delete'](_0x304325['view']);this['_selectedAnnotations']=_0x12aeaa;}['_refreshPositioning'](){const _0x2c6899=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x2c6899['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x328f37){if(this['_manuallyClosedAnnotationViews']['has'](_0x328f37['view']))return;const _0x1295d1=this['balloonPanelView']['content']['first'];_0x1295d1!==_0x328f37['view']?(_0x1295d1&&this['_detachListeners'](_0x1295d1),this['_attachListeners'](_0x328f37['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x328f37['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4d694e=this['balloonPanelView']['content']['first'],_0x48d0b7=_0x4d694e&&this['annotations']['getByView'](_0x4d694e);if(!_0x48d0b7||!this['_annotationToNarrowView']['has'](_0x48d0b7))return;const _0xe93da5=this['_annotationToNarrowView']['get'](_0x48d0b7)['element'],_0x10f5c9=(function(){const _0x5f4e8d=_0x4865ab['defaultPositions'];return[_0x5f4e8d['southArrowNorthEast'],_0x5f4e8d['northArrowSouthEast'],_0x5f4e8d['southArrowNorth'],_0x5f4e8d['northArrowSouth'],_0x5f4e8d['southArrowNorthWest'],_0x5f4e8d['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xe93da5,'positions':_0x10f5c9});}['_hideBalloon'](){const _0x4dc346=this['balloonPanelView'],_0x1ca78e=_0x4dc346['content']['first'];_0x1ca78e&&(this['_detachListeners'](_0x1ca78e),_0x4dc346['unpin'](),_0x4dc346['content']['clear']());}['_attachListeners'](_0x28edee){this['listenTo'](_0x28edee,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x28edee,'Esc',(_0x300491,_0x59b528)=>{this['_manuallyClosedAnnotationViews']['add'](_0x28edee),this['_hideBalloon'](),_0x59b528();});}['_detachListeners'](_0x31348c){this['stopListening'](_0x31348c);}}class c extends _0x599ac2{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x2f55da,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xce9ad9){super(_0xce9ad9),_0xce9ad9['editing']['view']['addObserver'](_0xbf6260),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xce9ad9['plugins']['get'](_0x2f55da),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x188bfc=this['editor']['plugins']['get'](M);_0x188bfc['context']===this['editor']&&(_0x188bfc['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2c367b,_0x16311d)=>{const _0x4f935b=this['_balloon'];if(this['isAttached']&&_0x4f935b['visibleView']){const _0x3bdf83=this['annotations']['getByView'](_0x4f935b['visibleView']);_0x3bdf83&&this['_closeAnnotation'](_0x3bdf83),_0x16311d();}}));}['afterInit'](){const _0xf9103b=this['editor']['plugins']['get'](M);_0xf9103b['context']===this['editor']&&(_0xf9103b['hasActive']()||_0xf9103b['switchTo']('inline'));}['setActiveAnnotation'](_0x4dc6fb){_0x4dc6fb!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4dc6fb&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4dc6fb)&&this['_addAnnotationToBalloon'](_0x4dc6fb,!0x0),_0x4dc6fb['isActive']=!0x0),_0x4dc6fb||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4dc6fb);}['attach'](_0x29eb2c){this['annotations']=_0x29eb2c;const _0x2c9e08=this['editor']['plugins']['get'](M),_0x333fb5=this['_balloon'];if(this['isAttached'])throw new _0x167eaf('inlineannotations-attach-already-attached',this);if(_0x2c9e08['context']!==this['editor'])throw new _0x167eaf('inlineannotations-not-allowed-with-context',this);const _0x104e30=this['editor']['plugins']['get'](P);this['listenTo'](_0x104e30,'refresh',()=>{const _0x30c95f=_0x104e30['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x58ebee,_0x43dabc;!this['_forceRefresh']&&(_0x58ebee=_0x30c95f,_0x43dabc=this['_selectedAnnotations'],_0x58ebee['length']===_0x43dabc['length']&&_0x58ebee['every'](_0x5aff5d=>_0x43dabc['includes'](_0x5aff5d)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x30c95f),this['setActiveAnnotation'](_0x30c95f[0x0]||null));}),this['listenTo'](_0x104e30,'blur',(_0xead1f2,{isAnnotationTracked:_0x4fbb48})=>{this['activeAnnotation']&&_0x4fbb48(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x546f93,_0x10930d,_0x3b9f51)=>{_0x3b9f51||this['setActiveAnnotation'](null);}),this['listenTo'](_0x29eb2c,'remove',(_0x3eb7a1,_0x194b97)=>{this['_removeAnnotationFromBalloon'](_0x194b97),_0x194b97===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x333fb5,'change:visibleView',(_0x29df6c,_0x440c6a,_0x447029,_0x498f37)=>{_0x498f37&&this['stopListening'](_0x498f37);const _0x181b5a=_0x29eb2c['getByView'](_0x447029);_0x447029&&_0x181b5a&&(this['listenTo'](_0x447029,'change:height',()=>{_0x333fb5['updatePosition']();}),this['listenTo'](_0x447029,'Esc',()=>{this['_closeAnnotation'](_0x181b5a),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x181b5a&&this['setActiveAnnotation'](_0x181b5a));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x333fb5['visibleView']&&(_0x29eb2c['getByView'](_0x333fb5['visibleView'])&&_0x333fb5['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 _0x167eaf('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x308020 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x308020);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2c5f31){for(const _0x551ea3 of this['_selectedAnnotations'])_0x2c5f31['includes'](_0x551ea3)||this['_manuallyClosed']['delete'](_0x551ea3);for(const _0x2e5921 of this['annotations'])_0x2c5f31['includes'](_0x2e5921)||this['_removeAnnotationFromBalloon'](_0x2e5921);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4932bb of _0x2c5f31)this['_addAnnotationToBalloon'](_0x4932bb);}this['_selectedAnnotations']=_0x2c5f31;}['_addAnnotationToBalloon'](_0x405f0c,_0xcdb559=!0x1){this['_manuallyClosed']['has'](_0x405f0c)||(this['_addedAnnotations']['has'](_0x405f0c)||this['_balloon']['hasView'](_0x405f0c['view'])||(this['_addedAnnotations']['add'](_0x405f0c),this['_balloon']['add']({'stackId':_0x405f0c['view']['id'],'view':_0x405f0c['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x405f0c)}})),_0xcdb559&&this['_balloon']['showStack'](_0x405f0c['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1ebcad){const _0x21998a=_0x1ebcad['target'],_0x7871f5=this['editor']['editing']['view'],_0x16b9db=_0x7871f5['document']['selection']['getFirstRange'](),_0x96fe9f=_0x7871f5['domConverter']['viewRangeToDom'](_0x16b9db);if(_0x96fe9f['collapse'](!0x0),_0x21998a){if(_0x21998a instanceof _0x66e728)return _0x21998a;let _0x586c83=[];for(const _0x418969 of _0x21998a)_0x586c83['push'](...(_0xe925b2=_0x418969['getClientRects'](),Array['from'](_0xe925b2)['map'](DOMRect['fromRect'])));_0x586c83=function(_0x55b982){const _0x407ae4=[];let _0x115e42=_0x55b982[0x0];for(let _0x67809f=0x1;_0x67809f<_0x55b982['length'];_0x67809f++)B(_0x115e42,_0x55b982[_0x67809f])?_0x115e42['width']+=_0x55b982[_0x67809f]['width']:(_0x407ae4['push'](_0x115e42),_0x115e42=_0x55b982[_0x67809f]);return _0x407ae4['push'](_0x115e42),_0x407ae4;}(_0x586c83);const _0x1b193c=_0x96fe9f['getBoundingClientRect']();return _0x586c83['find'](_0x15270b=>_0x15270b['top']<=_0x1b193c['top']&&_0x15270b['bottom']>=_0x1b193c['bottom']&&_0x15270b['left']<=_0x1b193c['left']&&_0x15270b['right']>=_0x1b193c['right'])||_0x586c83[0x0];}var _0xe925b2;return _0x1ebcad['targetRect']||_0x96fe9f;}['_removeAnnotationFromBalloon'](_0x54060b){this['_addedAnnotations']['has'](_0x54060b)&&this['_balloon']['hasView'](_0x54060b['view'])&&(this['_addedAnnotations']['delete'](_0x54060b),this['_balloon']['remove'](_0x54060b['view']));}['_closeAnnotation'](_0x391097){this['_manuallyClosed']['add'](_0x391097),this['_removeAnnotationFromBalloon'](_0x391097);}}function B(_0x50ff60,_0x3f86c7){return _0x50ff60['top']===_0x3f86c7['top']&&_0x50ff60['bottom']===_0x3f86c7['bottom']&&_0x50ff60['right']===_0x3f86c7['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x27b07a,_0x4762c1){super(_0x27b07a),this['set']('isEmpty',!_0x4762c1['length']),this['focusTracker']=new _0xb3b6d4(),this['_annotationViews']=_0x4762c1,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2db88c({'focusables':_0x4762c1,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4762c1,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4762c1,'remove',(_0x78eab9,_0x508191)=>{_0x508191['isActive']&&this['focus'](),_0x4762c1['length']||(this['isEmpty']=!0x0);});const _0xca9c45=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x27b07a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4762c1},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0xca9c45['if']('isEmpty','ck-hidden',_0x1407c9=>!_0x1407c9)]},'children':[{'text':E(_0x27b07a,'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 _0xfa1339 of this['_annotationViews'])this['focusTracker']['add'](_0xfa1339['element']);this['_annotationViews']['on']('change',(_0x42369e,{added:_0x565a15,removed:_0x2d7c3f})=>{for(const _0x321e08 of _0x565a15)this['focusTracker']['add'](_0x321e08['element']);for(const _0x250859 of _0x2d7c3f)this['focusTracker']['remove'](_0x250859['element']);});}}class f extends _0x3ec28c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x5c5492){super(_0x5c5492),this['archivedThreads']=new _0xfcf14();}['init'](){const _0x492052=this['context'],_0x1c4be6=_0x492052['plugins']['get'](o),_0x1f68b4=_0x492052['plugins']['get'](O);this['listenTo'](_0x1c4be6,'addCommentThread',(_0x1490c0,{threadId:_0x2f7953})=>{const _0x5f4a1d=_0x1c4be6['getCommentThread'](_0x2f7953);_0x5f4a1d['archivedAt']&&this['archivedThreads']['add'](_0x5f4a1d,this['_calculatePosition'](_0x5f4a1d['archivedAt'])),this['listenTo'](_0x5f4a1d,'change:archivedAt',(_0x3585bd,_0x393579,_0x5751b0)=>{_0x5751b0?this['archivedThreads']['has'](_0x5f4a1d)||this['archivedThreads']['add'](_0x5f4a1d,this['_calculatePosition'](_0x5f4a1d['archivedAt'])):this['archivedThreads']['has'](_0x5f4a1d)&&this['archivedThreads']['remove'](_0x5f4a1d);});}),this['listenTo'](_0x1c4be6,'removeCommentThread',(_0x492686,{threadId:_0x15afad})=>{const _0x166471=_0x1c4be6['getCommentThread'](_0x15afad);this['stopListening'](_0x166471),this['archivedThreads']['has'](_0x166471)&&this['archivedThreads']['remove'](_0x166471);},{'priority':'highest'}),this['listenTo'](_0x1f68b4['collection'],'focus',(_0x3151af,_0xf2f161)=>{_0xf2f161['isVisible']||(_0xf2f161['isActive']=!0x0,_0x1f68b4['activate'](_0xf2f161));});}['_calculatePosition'](_0x370b0c){const _0xa5dd6a=[...this['archivedThreads']]['findIndex'](_0x4ab005=>_0x4ab005['archivedAt']<_0x370b0c);return _0xa5dd6a>-0x1?_0xa5dd6a:this['archivedThreads']['length'];}}class a extends _0x599ac2{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x3f2689];}constructor(_0x4f7323){super(_0x4f7323),this['annotationViews']=new _0x58f26f(),this['_pendingThreads']=[];}['init'](){const _0x5e4beb=this['editor'],_0x672815=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5e4beb['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x181f25,!0x0)),_0x5e4beb['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xa89214=this['_createCommentsArchiveButton'](_0x66c319);return _0xa89214['set']({'role':'menuitemcheckbox'}),_0xa89214;});const _0x3d573a=_0x5e4beb['plugins']['get'](f),_0x1019e7=_0x5e4beb['plugins']['get']('Annotations'),_0x180609=_0x5e4beb['plugins']['get']('CommentsRepository');_0x3d573a['archivedThreads']['forEach'](_0x68c296=>{this['_handleNewThread'](_0x68c296);}),this['listenTo'](_0x3d573a['archivedThreads'],'add',(_0x384f91,_0x2fca6d)=>{this['_handleNewThread'](_0x2fca6d);}),this['listenTo'](_0x1019e7['collection'],'add',(_0x4cea26,_0xdcf3e0)=>{const _0x296528=this['_pendingThreads']['find'](_0x51f344=>{const _0x3b67d2=_0x180609['_threadToController']['get'](_0x51f344);return _0x3b67d2&&_0xdcf3e0['innerView']===_0x3b67d2['view'];});if(_0x296528){const _0x587865=this['_calculatePosition'](_0x296528['archivedAt']);this['annotationViews']['add'](_0xdcf3e0['view'],_0x587865),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x296528),0x1);}}),this['listenTo'](_0x3d573a['archivedThreads'],'remove',(_0x166933,_0x2b03cb)=>{const _0x9f07d7=_0x5e4beb['config']['get']('collaboration.channelId');if(!_0x9f07d7||_0x2b03cb['channelId']===_0x9f07d7){if(this['_pendingThreads']['includes'](_0x2b03cb))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2b03cb),0x1);else{const _0x39dc65=_0x180609['_threadToController']['get'](_0x2b03cb),_0x32da5f=_0x1019e7['getByInnerView'](_0x39dc65['view']);this['annotationViews']['remove'](_0x32da5f['view']),this['stopListening'](_0x32da5f['focusableElements']);}}}),this['listenTo'](_0x1019e7['collection'],'add',(_0x440e61,_0x4aea39)=>{this['listenTo'](_0x4aea39,'escape',_0x672815);}),this['listenTo'](_0x1019e7['collection'],'remove',(_0x7690d9,_0x1e6299)=>{this['stopListening'](_0x1e6299,'escape',_0x672815);});}['_handleNewThread'](_0xa2fc5f){const _0x320649=this['editor']['plugins']['get']('CommentsRepository'),_0xc39b33=this['editor']['plugins']['get']('Annotations'),_0x11ec1e=this['editor']['config']['get']('collaboration.channelId');if(!_0x11ec1e||_0xa2fc5f['channelId']===_0x11ec1e){const _0x589193=_0x320649['_threadToController']['get'](_0xa2fc5f);if(!_0x589193)return void this['_pendingThreads']['push'](_0xa2fc5f);const _0x52e644=this['_calculatePosition'](_0xa2fc5f['archivedAt']),_0x505bb0=_0xc39b33['getByInnerView'](_0x589193['view']);_0x505bb0['isVisible']&&_0xc39b33['_visibleAnnotations']['remove'](_0x505bb0),this['annotationViews']['add'](_0x505bb0['view'],_0x52e644);}}['_calculatePosition'](_0x574ec8){const _0x447261=this['editor']['config']['get']('collaboration.channelId'),_0x249122=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x263399=>_0x263399['channelId']===_0x447261)['findIndex'](_0x145988=>_0x145988['archivedAt']<_0x574ec8);return _0x249122<0x0||_0x249122>this['annotationViews']['length']?this['annotationViews']['length']:_0x249122-0x1;}['_toggleDialog'](){const _0x2a6133=this['editor'],_0x363c2f=_0x2a6133['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x2a6133['locale'],this['annotationViews'])),'commentsArchive'===_0x363c2f['id']?_0x363c2f['hide']():_0x363c2f['show']({'id':'commentsArchive','title':E(_0x2a6133['locale'],'COMMENTS_ARCHIVE'),'icon':_0x13e233,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xd26c9f['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x293955,_0x44cc88=!0x1){const _0x53d2cf=this['editor']['locale'],_0x128c2f=this['editor']['plugins']['get']('Dialog'),_0x3c6d34=new _0x293955(_0x53d2cf);return _0x3c6d34['bind']('isEnabled')['to'](this,'isEnabled'),_0x3c6d34['bind']('isOn')['to'](_0x128c2f,'id',_0xbd890e=>'commentsArchive'===_0xbd890e),_0x3c6d34['set']({'label':E(_0x53d2cf,'COMMENTS_ARCHIVE'),'icon':_0x13e233,'isToggleable':!0x0}),_0x44cc88&&(_0x3c6d34['tooltip']=!0x0),this['listenTo'](_0x3c6d34,'execute',()=>this['_toggleDialog']()),_0x3c6d34;}['_hideDialogOnAnnotationEscape']=_0x3f9d2d=>{const _0x3234aa=_0x3f9d2d['source'];if(!this['annotationViews']['has'](_0x3234aa['view']))return;const _0x320ee2=this['editor']['plugins']['get']('Dialog');_0x320ee2['isOpen']&&'commentsArchive'===_0x320ee2['id']&&(_0x320ee2['hide'](),_0x3f9d2d['stop']());};}class p extends _0x599ac2{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 _0x26ce07,ContextPlugin as _0x149248,PendingActions as ht,Command as _0x116639,Plugin as _0x3e8287,Context as _0x5735ba}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x2170ff,uid as _0x23944b,KeystrokeHandler as jt,FocusTracker as _0x6d2edc,diff as _0x2762d4,Collection as _0x1b6511,Rect as _0x197d1d,CKEditorError as _0x302412,first as _0x255c30,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x2c8ffe,keyCodes as _0x2cd697}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x37fa89,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1cf2e4,trimHtml as _0x962ff1,LateFocusDropdownButtonView as _0xdc3cee,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x4c3cf2}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x3058e3}from'es-toolkit/compat';import{IconUndo as _0x3cadd7,IconCheck as _0x8d7024,IconPencil as _0x52d6a3,IconRemoveComment as _0x1c9ae1,IconThreeVerticalDots as _0x375ba6,IconAddComment as _0x35c54a,IconCommentsArchive as _0x1dd5ca}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x5bcd58,ButtonView as _0x25ab89,ViewCollection as _0xea1baf,createDropdown as _0x364cb0,ListView as _0x51ac51,focusChildOnDropdownOpen as _0x2c383b,ListItemView as _0x504a2c,MenuBarMenuListItemButtonView as _0x508e0d,BodyCollection as _0x2901be,BalloonPanelView as _0x3c248a,ContextualBalloon as _0x162d8a,Dialog as _0x3727d0,DialogViewPosition as _0x1e4b9a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x165613}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 _0x9f19f6}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0xb56482}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2170ff(){['model'];['view'];constructor(_0x2a729c,_0x4857de){super(),this['model']=_0x2a729c,this['model']['_isAttached']=!0x0,this['view']=_0x4857de,this['listenTo'](_0x4857de,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4857de,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4857de,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4857de,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4857de,'addComment',(_0x9281bd,_0xe0bb57)=>this['addComment'](_0xe0bb57)),this['listenTo'](_0x4857de,'updateComment',(_0x4e823a,_0x184cea,_0x16b046)=>this['updateComment'](_0x184cea,_0x16b046)),this['listenTo'](_0x4857de,'removeComment',(_0x38f353,_0x506bd5)=>this['removeComment'](_0x506bd5));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x2d5d6b){this['model']['addComment']({'content':_0x2d5d6b,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x476d89,_0xcd37b9){this['model']['getComment'](_0x476d89)['update']({'content':_0xcd37b9});}['removeComment'](_0x3e0f1e){this['model']['getComment'](_0x3e0f1e)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x17fe80,_0x305b16,_0x496a7d){const t=_0x17fe80['t'];switch(_0x305b16){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'},_0x496a7d);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'},_0x496a7d);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'},_0x496a7d);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'},_0x496a7d);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x496a7d);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'},_0x496a7d);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'},_0x496a7d);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'},_0x496a7d);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(_0x55f0f6,_0x4d96bf){super(_0x55f0f6);const _0xb0d74a=_0x23944b();this['main']=this['createCollection'](),this['editable']=new $t(_0x55f0f6,_0x4d96bf,void 0x0,{'label':()=>E(_0x55f0f6,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x55f0f6['uiLanguageDirection'],'lang':_0x55f0f6['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xb0d74a},'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(_0x394309){super(_0x394309),this['view']=new Ut(_0x394309['locale'],_0x394309['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2c21e6=this['editor']['editing']['view'],_0x20a42d=this['view']['editable'],_0x2c8e57=_0x2c21e6['document']['getRoot']();_0x20a42d['name']=_0x2c8e57['rootName'],this['view']['render']();const _0x29cabe=_0x20a42d['element'];this['setEditableElement'](_0x20a42d['name'],_0x29cabe),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2c21e6['attachDomRoot'](_0x29cabe),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x2170ff(_0x26ce07){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x23a8da={}){function _0x36316c(_0x451eaf){return _0x451eaf['map'](_0x3c30be=>String['fromCharCode'](_0x3c30be))['join']('');}(_0x23a8da=Object['assign']({},_0x23a8da))['plugins']||(_0x23a8da['plugins']=Qt['defaultPlugins']),super(_0x23a8da),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[_0x36316c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36316c([0x76,0x69,0x65,0x77])][_0x36316c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36316c([0x61,0x75,0x74,0x6f]),this[_0x36316c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x36316c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36316c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x36316c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x36316c([0x6f,0x6b])});}['create'](){const _0x11d269=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x11d269))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4e2e54=>{const _0x20139a=this['model']['document']['getRoot'](),_0x53aca8=_0x20139a&&_0x20139a['getChild'](_0x20139a['childCount']-0x1);_0x4e2e54['setSelection'](_0x53aca8,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x185bb3=this['editing']['view'],_0x104c89=_0x185bb3['document']['getRoot'](),_0x2f8809=_0x104c89['getChild'](0x0);_0x104c89['childCount']>0x1||!_0x2f8809||'p'!=_0x2f8809['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x185bb3,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2f8809['placeholder']=this['placeholder']),Ft({'view':_0x185bb3,'element':_0x2f8809,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2f8809);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3aeb34,_0x47eb6e={}){super(_0x3aeb34),this['editor']=null,this['_editorConfig']=_0x47eb6e,this['set']('value',_0x47eb6e['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x3aeb34,'Reply...')),this['set']('submitLabel',E(_0x3aeb34,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x6d2edc(),this['focusCycler']=new _0x5bcd58({'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',(_0x177b60,_0x4dde5c)=>{this['cancelButtonView']['fire']('execute'),_0x4dde5c();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5cc041,_0x32ce72)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x32ce72());}),this['on']('submit',(_0x17f016,_0x17d762)=>{_0x17d762['length']>0xfde8?(alert(E(_0x3aeb34,'TOO_LONG_COMMENT_ALERT',[_0x17d762['length'],0xfde8])),_0x17f016['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 _0x3049ca=this['editor'];this['element']['insertBefore'](_0x3049ca['ui']['element'],this['element']['firstChild']),_0x3049ca['model']['document']['on']('change',()=>this['value']=_0x3049ca['getData']()),_0x3049ca['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3049ca['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2a4d70){-0x1===_0x2a4d70?(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:_0x12ae46}=this,_0x236c67=new _0x25ab89(_0x12ae46);return _0x236c67['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x236c67['withText']=!0x0,_0x236c67['bind']('label')['to'](this,'submitLabel'),_0x236c67['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x236c67['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x479010,_0x2ed416)=>!_0x2ed416&&!!_0x479010['trim']()),_0x236c67;}['_createCancelButton'](){const {locale:_0x1d30b1}=this,_0x1a53cf=new _0x25ab89(_0x1d30b1);return _0x1a53cf['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1a53cf['label']=E(_0x1d30b1,'Cancel'),_0x1a53cf['withText']=!0x0,_0x1a53cf['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1a53cf;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x9a8f2e=>{this['focusTracker']['add'](_0x9a8f2e['element']);}),this['focusables']['on']('change',(_0x217623,_0x2f2774)=>{for(const _0x1355c3 of Array['from'](_0x2f2774['added'])['reverse']())this['focusTracker']['add'](_0x1355c3['element']);});}}class ie extends kt{constructor(_0x293006,_0x5f3002,_0x33e64d){super(_0x293006),this['commentInputView']=new os(_0x293006,_0x33e64d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x385657,_0x22edaa)=>_0x385657||!!_0x22edaa),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 _0x37fa89(_0x293006,_0x5f3002),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'](_0xfe9a2){this['commentInputView']['focus'](_0xfe9a2);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4ac25,_0x5d9c1f)=>{const {submitButtonView:_0x403f34,cancelButtonView:_0x1a6f0b,editor:_0x2a57f8}=this['commentInputView'];[_0x403f34['element'],_0x1a6f0b['element'],_0x2a57f8?_0x2a57f8['editing']['view']['getDomRoot']():null]['filter'](_0x3a1c0b=>_0x3a1c0b)['some'](_0x2477d1=>_0x2477d1['contains'](_0x5d9c1f['target']))||(this['focus'](),_0x5d9c1f['preventDefault']());});}}class cs extends kt{constructor(_0x27d792){super(_0x27d792);const _0x2165d3=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2165d3['to']('count',_0x179e0f=>E(_0x27d792,'NUMBER_OF_COMMENTS',_0x179e0f))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x40c2df,_0x4e6ad7,_0x27f866){super(_0x40c2df);const _0x107a6e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4e6ad7['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4e6ad7,this['_config']=_0x27f866,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x6d2edc(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5bcd58({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x178a0c=>this['commentViews']['map'](_0x3fb2b7=>_0x3fb2b7['element'])['includes'](_0x178a0c['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x40c2df),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3b9a2c=>_0x3b9a2c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5b8e19 of _0x4e6ad7['comments'])this['_handleNewCommentModel'](_0x5b8e19);this['_handleInfoComment'](),this['listenTo'](_0x4e6ad7['comments'],'add',(_0x22daff,_0x5db4f1)=>{const _0x192247=this['_calculatePosition'](_0x5db4f1);this['length']++,this['_handleNewCommentModel'](_0x5db4f1,_0x192247),this['refreshVisibleViews']();}),this['listenTo'](_0x4e6ad7['comments'],'remove',(_0x4f8057,_0x180abe)=>{this['length']--,this['_handleRemoveCommentModel'](_0x180abe),this['refreshVisibleViews']();}),this['listenTo'](_0x4e6ad7,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4e6ad7,'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',_0x107a6e['if']('length','ck-hidden',_0x35825b=>!_0x35825b)],'aria-label':E(_0x40c2df,'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'](_0x4e5caf){-0x1===_0x4e5caf?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x199fe4 of this['commentViews'])_0x199fe4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2468cc,_0x27fe0c){const _0xfffcd4=new this['_config']['CommentView'](this['locale'],_0x2468cc,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xfffcd4['viewUid']=_0x2468cc['id'],_0xfffcd4['delegate']('removeComment')['to'](this),_0xfffcd4['delegate']('updateComment')['to'](this),_0xfffcd4['delegate']('resolveCommentThread')['to'](this),_0xfffcd4['delegate']('editorReady')['to'](this),_0xfffcd4['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xfffcd4,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xfffcd4,_0x27fe0c);}['_calculatePosition'](_0x31d9b4){const _0x7a4ab3=this['_model']['_findOptimalIndex'](_0x31d9b4);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x31d9b4['authoredAt']?_0x7a4ab3-0x1:_0x7a4ab3:_0x7a4ab3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x217408={'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'],_0x217408,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x217408));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x53189c){const _0x172989=this['commentViews']['remove'](_0x53189c['id']);this['stopListening'](_0x172989),_0x172989['isEditMode']&&this['_updateHasDirtyComment'](),_0x172989['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x47d6f3=>_0x47d6f3['isEditMode']);}['_rearrangeCollapse'](){const _0x3e3f4d=function(_0x5b5917){const _0x42be53=new _0x1b6511();for(const _0x51be07 of _0x5b5917)_0x42be53['add'](_0x51be07);return _0x42be53;}(this['commentViews']),_0x37d0b8=this['_collapsedCommentsView']['count'];for(let _0x2e0aaa=0x1;_0x2e0aaa<=_0x37d0b8;_0x2e0aaa++)_0x3e3f4d['remove'](0x1);for(const _0x1b7163 of _0x3e3f4d)_0x1b7163['collapse']();_0x37d0b8>0x0&&_0x3e3f4d['add'](this['_collapsedCommentsView'],0x1),ns(_0x2762d4(Array['from'](this['visibleViews']),Array['from'](_0x3e3f4d)),this['visibleViews'],_0x3e3f4d);}['_rearrangeExpand'](){ns(_0x2762d4(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x428ef9 of this['visibleViews'])_0x428ef9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x167936=>{this['focusTracker']['add'](_0x167936['element']),this['keystrokes']['listenTo'](_0x167936['element']);}),this['commentViews']['on']('change',(_0x7bc91b,_0x327fdd)=>{for(const _0x38c328 of _0x327fdd['removed'])this['focusTracker']['remove'](_0x38c328['element']),this['keystrokes']['stopListening'](_0x38c328['element']);for(const _0x20ab0f of Array['from'](_0x327fdd['added'])['reverse']())this['focusTracker']['add'](_0x20ab0f['element']),this['keystrokes']['listenTo'](_0x20ab0f['element']);});}}function ns(_0x160c56,_0x3329b9,_0x33b6aa){let _0x19f264=0x0;for(const _0x3783d7 of _0x160c56)switch(_0x3783d7){case'insert':_0x3329b9['add'](_0x33b6aa['get'](_0x19f264),_0x19f264),_0x19f264++;break;case'delete':_0x3329b9['remove'](_0x19f264);break;case'equal':_0x19f264++;}}class as extends kt{constructor(_0x2f8805){super(_0x2f8805);const _0x321db9=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x321db9['to']('contextValue',_0x2a63da=>E(_0x2f8805,'THREAD_CONTEXT_LABEL',_0x2a63da)),'tabindex':-0x1},'children':[{'text':_0x321db9['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x420925,_0x3928ef){super(_0x420925);const _0x3113a3=this['bindTemplate'];this['_model']=_0x3928ef,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x6d2edc(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5bcd58({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x56301a=>!!_0x56301a),this['bind']('contextValue')['to'](this['_model'],'context',_0x32e9f4=>_0x32e9f4&&_0x32e9f4['value']?this['_trimContextValue'](_0x32e9f4['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',_0x3113a3['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 _0x32e81c=new _0x25ab89(this['locale']);return _0x32e81c['label']=E(this['locale'],'Reopen'),_0x32e81c['tooltip']=E(this['locale'],'Reopen'),_0x32e81c['icon']=_0x3cadd7,_0x32e81c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3989ae=>!_0x3989ae),_0x32e81c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x24ceef,_0x15844e)=>_0x24ceef&&_0x15844e),_0x32e81c['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x32e81c;}['_trimContextValue'](_0x397321){if(_0x397321['length']<0x96)return _0x397321;const _0x1557d4=_0x397321['lastIndexOf']('\x20',0x93);return _0x397321['substring'](0x0,_0x1557d4>-0x1?_0x1557d4:0x93)+'...';}['_attachContextActions'](){const _0xe33a6d=this['element']['querySelector']('.ck-context'),_0x1c0dbd=_0xe33a6d['querySelector']('.ck-context__value');this['listenTo'](_0xe33a6d,'mouseenter',()=>{_0x1c0dbd['offsetWidth']<_0x1c0dbd['scrollWidth']&&_0xe33a6d['classList']['add']('overlay');}),this['listenTo'](_0xe33a6d,'mouseleave',()=>{_0xe33a6d['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xf97c99 of this['focusables'])this['focusTracker']['add'](_0xf97c99['element']),this['keystrokes']['listenTo'](_0xf97c99['element']);}['_createContextView'](){const _0x169b85=new as(this['locale']);return _0x169b85['bind']('contextValue')['to'](this),_0x169b85;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xe8fb0b,_0x339eeb,_0x207720,_0x5a3428){super(_0xe8fb0b),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x339eeb,this['_localUser']=_0x207720,this['_config']=_0x5a3428,this['commentThreadHeaderView']=new Xt(_0xe8fb0b,_0x339eeb),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0xe8fb0b,E(_0xe8fb0b,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xe8fb0b,_0x339eeb,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5a3428)),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',(_0x2520a6,_0x45402a)=>_0x2520a6||!!_0x45402a),this['bind']('isUnlinked')['to'](_0x339eeb,'unlinkedAt',_0x329108=>!!_0x329108),this['bind']('ariaLabel')['to'](this,'length',_0x20ee03=>{const _0x28d703=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x20ee03,_0x28d703]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x6d2edc(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5bcd58({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x31ee0a=>_0x31ee0a['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 _0x28f2e7=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x112b15=_0x28f2e7['commentInputView'];return _0x28f2e7['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x112b15,'value',(_0x55715c,_0x3bfffb,_0x1d7fc1,_0x5eb914,_0x5d1434)=>!!_0x5d1434||!!_0x5eb914&&_0x1d7fc1&&!_0x3bfffb||_0x55715c&&_0x1d7fc1&&!_0x3bfffb),_0x112b15['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1b5c60,_0x548a3e,_0x31bdfe)=>{let _0x5db1d1;return _0x5db1d1=_0x31bdfe&&_0x548a3e?'Reply\x20to\x20reopen\x20discussion...':_0x1b5c60?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x5db1d1);}),_0x112b15['bind']('submitLabel')['to'](this,'length',_0x4d802c=>E(this['locale'],_0x4d802c?'Reply':'Comment')),_0x112b15['on']('submit',(_0x381f10,_0x5a5b2a)=>{this['fire']('addComment',_0x5a5b2a),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x112b15['on']('cancel',()=>{this['focus']();}),_0x112b15['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x112b15['on']('cancel',_0x579dbb=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x579dbb['stop']());}),this['on']('change:isActive',(_0x844b53,_0x1f5dfc,_0x5cbe02)=>{_0x5cbe02||this['length']||_0x112b15['value']||this['fire']('removeCommentThread');}),_0x28f2e7;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x3de4ac,_0x11cf2b,_0x8ec0fc,_0x1214b8){super(_0x3de4ac,_0x11cf2b,_0x8ec0fc,_0x1214b8),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x3de4ac,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x1ad248,_0x5eb979,_0x2f462a)=>{_0x2f462a||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x30354e,_0x58671f,_0xc05e14)=>{_0xc05e14&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x178633=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x178633['if']('isActive','ck-thread--active'),_0x178633['if']('isUnlinked','ck-thread--unlinked'),_0x178633['if']('isConfirm','ck-thread--remove-confirmation'),_0x178633['to']('actionIndicator',_0x19a9d2=>_0x19a9d2?'ck-thread--'+_0x19a9d2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x178633['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 _0x27c224 of this['commentsListView']['commentViews'])_0x27c224['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3fb6b1}=this,_0x325bae=this['commentsListView']['commentViews']['get'](0x0);_0x325bae===this['_boundFirstCommentView']||_0x325bae['isSystemComment']||(this['_boundFirstCommentView']=_0x325bae,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x325bae,'actionIndicator',_0x3d99b2=>'remove'===_0x3d99b2?'remove':null),_0x325bae['placeholder']=E(_0x3fb6b1,'Write\x20a\x20comment...'),_0x325bae['removeButton']['on']('execute',_0x398a18=>{_0x398a18['stop'](),this['showConfirm'](E(_0x3fb6b1,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x325bae['focus']();}),_0x325bae['actionBar']['add'](this['resolveButton'],0x0),_0x325bae['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x225a80=new _0x1cf2e4(this['locale']);return _0x225a80['label']=E(this['locale'],'Resolve'),_0x225a80['tooltip']=E(this['locale'],'Resolve'),_0x225a80['icon']=_0x8d7024,_0x225a80['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x225a80['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3e6f8e=>!_0x3e6f8e),_0x225a80['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1b2c3f,_0x4b20ce)=>_0x1b2c3f&&!_0x4b20ce),_0x225a80['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x225a80;}['_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(_0x2f051f){super(_0x2f051f),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1f5697,_0x99a6e1,_0x2156be)=>{this['element']['innerHTML']=_0x2156be;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x41b957,_0x3f268d,_0x5d6add){super(_0x41b957),this['_model']=_0x3f268d,this['_config']=_0x5d6add,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x3f268d,'content',_0x3f268d,'authoredAt',(_0x55ce65,_0x546efd)=>E(_0x41b957,'COMMENT_ARIA_LABEL',[_0x3f268d['author']['name'],_0x5d6add['formatDateTime'](_0x546efd),new DOMParser()['parseFromString'](_0x55ce65,'text/html')['body']['textContent'],_0x3f268d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x41b957,E(_0x41b957,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xea1baf(),this['focusTracker']=new _0x6d2edc(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5bcd58({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3a7dd9=>_0x3a7dd9['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 _0xc1c76e=new es(this['locale']);return _0xc1c76e['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1bad4c,_0xdb7e68)=>_0xdb7e68?_0x962ff1(_0x1bad4c,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1bad4c),_0xc1c76e;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x306e05=new os(this['locale'],this['_config']['editorConfig']);return _0x306e05['value']=this['_model']['content'],_0x306e05['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x306e05['submitLabel']=E(this['locale'],'Save'),_0x306e05['on']('submit',(_0x1480c3,_0x26b643)=>{this['fire']('updateComment',this['_model']['id'],_0x26b643),this['switchToDisplayMode'](),this['focus']();}),_0x306e05['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x306e05['once']('editorReady',()=>{_0x306e05['focus']();}),_0x306e05['createEditor'](),_0x306e05['delegate']('editorReady')['to'](this),_0x306e05['delegate']('editorDestroyed')['to'](this),_0x306e05;}['_setupKeyboardNavigation'](){const _0x896277=this['element'];this['keystrokes']['listenTo'](_0x896277);for(const _0x1d1adc of this['focusables'])this['focusTracker']['add'](_0x1d1adc['element']),this['keystrokes']['listenTo'](_0x1d1adc['element']);this['focusables']['on']('change',(_0xf5b80d,_0x5af072)=>{for(const _0x57bf42 of _0x5af072['removed'])this['focusTracker']['remove'](_0x57bf42['element']),this['keystrokes']['stopListening'](_0x57bf42['element']);for(const _0x19a2ba of _0x5af072['added'])this['focusTracker']['add'](_0x19a2ba['element']),this['keystrokes']['listenTo'](_0x19a2ba['element']);}),this['keystrokes']['set']('enter',(_0xb876e3,_0x511580)=>{_0x896277===_0xb876e3['target']&&(this['focusCycler']['focusFirst'](),_0x511580());}),this['keystrokes']['set']('esc',(_0x11f8d3,_0x4f24a3)=>{_0x896277!==_0x11f8d3['target']&&(this['focus'](),_0x4f24a3());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x212ce1,_0x2ef120,_0x1286e9){super(_0x212ce1,_0x2ef120,_0x1286e9),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x212ce1,'Reply...')),this['bind']('authoredAt')['to'](_0x2ef120),this['bind']('resolvedAt')['to'](_0x2ef120),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 _0x37fa89(_0x212ce1,_0x2ef120['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2ef120,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x387575=this['bindTemplate'],_0x75ef08=[{'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':_0x387575['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x387575['to']('authoredAt',_0x50b68e=>this['_config']['formatDateTime'](_0x50b68e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x387575['if']('isEditMode','ck-comment__actions--hidden'),_0x387575['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']&&_0x75ef08['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x387575['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x387575['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x387575['if']('isEditMode','ck-comment--edit'),_0x387575['if']('isSystemComment','ck-comment--info'),_0x387575['to']('actionIndicator',_0xe04286=>_0xe04286?'ck-comment--'+_0xe04286:'')],'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':_0x75ef08}]}]};}['_createEditButton'](){const _0x3a8961=new _0x25ab89(this['locale']);return _0x3a8961['label']=E(this['locale'],'Edit'),_0x3a8961['icon']=_0x52d6a3,_0x3a8961['withText']=!0x0,_0x3a8961['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3a8961['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x538fd5=>!_0x538fd5),_0x3a8961['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3a8961['on']('execute',()=>this['switchToEditMode']()),_0x3a8961;}['_createRemoveButton'](){const _0x3d7923=new _0x25ab89(this['locale']);return _0x3d7923['label']=E(this['locale'],'Remove'),_0x3d7923['icon']=_0x1c9ae1,_0x3d7923['withText']=!0x0,_0x3d7923['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x3d7923['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x13dbed=>!_0x13dbed),_0x3d7923['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x3d7923['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x3d7923;}['_createDropdown'](){const _0x1c1dab=_0x364cb0(this['locale'],_0xdc3cee),_0x3341cf=_0x1c1dab['panelView']['children'],_0x347962=new _0x51ac51(this['locale']),_0x91f3de=_0x1c1dab['bindTemplate'];_0x2c383b(_0x1c1dab,()=>this['items']['find'](_0x453590=>_0x453590['isVisible'])),_0x1c1dab['extendTemplate']({'attributes':{'class':[_0x91f3de['if']('isVisible','ck-hidden',_0x1e5a86=>!_0x1e5a86)]}});const _0x2be227=(_0x2fc5e9,_0x9803c0=-0x1)=>{const _0x377ec8=new _0x504a2c(this['locale']);_0x377ec8['children']['add'](_0x2fc5e9);const _0x5990d2=_0x9803c0>-0x1?_0x9803c0:_0x347962['items']['length'];_0x347962['items']['add'](_0x377ec8,_0x5990d2);const _0x87956b=Array['from'](this['items']);_0x1c1dab['unbind']('isEnabled','isVisible'),_0x1c1dab['bind']('isEnabled')['toMany'](_0x87956b,'isEnabled',(..._0xf0a25f)=>_0xf0a25f['some'](_0x5a0837=>_0x5a0837)),_0x1c1dab['bind']('isVisible')['toMany'](_0x87956b,'isVisible',(..._0x3ca83c)=>_0x3ca83c['some'](_0x1d8aef=>_0x1d8aef));};_0x1c1dab['panelPosition']='sw',_0x1c1dab['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x375ba6});for(const _0x6f8c6d of this['items'])_0x2be227(_0x6f8c6d);return _0x3341cf['add'](_0x347962),_0x1c1dab['listenTo'](this['items'],'add',(_0x5b1dd8,_0x295074,_0x4c1232)=>{_0x2be227(_0x295074,_0x4c1232);}),_0x1c1dab['listenTo'](this['items'],'remove',(_0x26b9d2,_0xe8ba35,_0x3c8388)=>{_0x347962['items']['remove'](_0x3c8388);}),_0x1c1dab;}['_attachActions'](_0x43b56a,_0x5ae6d8){const _0x2a1617=_0x43b56a&&_0x43b56a['element'];_0x2a1617&&(this['listenTo'](_0x2a1617,'mouseenter',()=>this['actionIndicator']=_0x5ae6d8),this['listenTo'](_0x2a1617,'focus',()=>this['actionIndicator']=_0x5ae6d8),this['listenTo'](_0x2a1617,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2a1617,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1bf347=super['_createCommentInputView']();return _0x1bf347['bind']('placeholder')['to'](this),_0x1bf347;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x20d0c7){const _0x101691=Dt(_0x20d0c7,0x1e),_0x5ed8f7=new MutationObserver(_0x41a964=>{for(const _0x32c64b of _0x41a964)('attributes'==_0x32c64b['type']&&'class'==_0x32c64b['attributeName']||'childList'==_0x32c64b['type']||'characterData'==_0x32c64b['type'])&&_0x101691();});return{'attach'(_0x173232){_0x5ed8f7['observe'](_0x173232,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5ed8f7['disconnect'](),_0x101691['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3a48ae,_0x6412f2){super(_0x3a48ae),this['id']=_0x23944b(),this['focusTracker']=new _0x6d2edc(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x2cba14,_0x187ea3)=>this['fire']('Esc',_0x187ea3)),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'](_0x6412f2),this['mainView']=_0x6412f2;const _0x49f18d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x49f18d['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 _0xc3b9a4=this['element']['clientHeight'];_0xc3b9a4&&(this['height']=_0xc3b9a4);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x2170ff(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2f789d,target:_0x3a9e09,type:_0xbd747d,isVisible:_0x3e9e75=!0x0}){super(),this['view']=_0x2f789d,this['view']['element']||this['view']['render'](),this['_type']=_0xbd747d,this['_target']=_0x3a9e09,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1b6511([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x26f0a4,_0x3121b7)=>{this['view']['focusTracker']['add'](_0x3121b7);}),this['focusableElements']['on']('remove',(_0x3dc66b,_0x1c8b00)=>{this['view']['focusTracker']['remove'](_0x1c8b00);}),this['set']('isVisible',_0x3e9e75);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5b9108=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x5b9108),_0x5b9108;}get['targetRect'](){const _0x229086=this['target'];if(null===_0x229086)return null;if(_0x229086 instanceof _0x197d1d)return _0x229086;const _0x2bba5e=_0x229086['filter'](_0x37176a=>function(_0x4ecae9){const _0x1eca7a=_0x4ecae9['offsetParent'];if(_0x1eca7a)return!0x0;const _0x3b1a7d=_0x4ecae9['getClientRects']()['item'](0x0);return!!_0x3b1a7d;}(_0x37176a));return 0x0===_0x2bba5e['length']?null:new _0x197d1d(_0x2bba5e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2950c9){this['view']['isActive']=_0x2950c9,this['view']['mainView']['isActive']=_0x2950c9;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x19fb8e){if(!(null===_0x19fb8e||_0x19fb8e instanceof _0x197d1d||Array['isArray'](_0x19fb8e)&&_0x19fb8e['every'](_0x1ac292=>li(_0x1ac292))))throw new _0x302412('annotation-invalid-target',null,{'target':_0x19fb8e});}['_getNormalizedTarget'](){const _0xacbbf7='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0xacbbf7)?[_0xacbbf7]:_0xacbbf7;}}function li(_0x4480c7){return null!==_0x4480c7&&'object'==typeof _0x4480c7&&'nodeType'in _0x4480c7&&0x1===_0x4480c7['nodeType'];}class _ extends _0x1b6511{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x43d76b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x6d2edc(),this['_focusTracker']['on']('change:isFocused',(_0x46713a,_0x54c479,_0x31e004)=>{_0x31e004||this['fire']('blur');});for(const _0x17276a of _0x43d76b)this['add'](_0x17276a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x21c823){if(this['has'](_0x21c823))throw new _0x302412('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x21c823['innerView'],_0x21c823),this['_viewToAnnotation']['set'](_0x21c823['view'],_0x21c823);for(const _0x46d122 of _0x21c823['focusableElements'])this['_focusTracker']['add'](_0x46d122);this['listenTo'](_0x21c823['focusableElements'],'add',(_0x171cb8,_0x3d3d2d)=>{this['_focusTracker']['add'](_0x3d3d2d);}),this['listenTo'](_0x21c823['focusableElements'],'remove',(_0x260032,_0x31b7a4)=>{this['_focusTracker']['remove'](_0x31b7a4);}),this['listenTo'](_0x21c823['view']['focusTracker'],'change:isFocused',(_0x308093,_0x4a6aee,_0x2219e1)=>{_0x2219e1&&this['fire']('focus',_0x21c823);}),_0x21c823['updateTargetRect']();const _0x45deb8=this['_getOrderInContent'](_0x21c823['view']['targetRect']);return super['add'](_0x21c823,_0x45deb8);}['remove'](_0x282ca3){if(!this['has'](_0x282ca3))throw new _0x302412('annotationcollection-not-existing-item',null);this['stopListening'](_0x282ca3['view']['focusTracker']),this['stopListening'](_0x282ca3['focusableElements']);for(const _0x264666 of _0x282ca3['focusableElements'])this['_focusTracker']['remove'](_0x264666);return this['_viewToAnnotation']['delete'](_0x282ca3['view']),this['_innerViewToAnnotation']['delete'](_0x282ca3['innerView']),super['remove'](_0x282ca3);}['getByInnerView'](_0x3d3f10){return this['_innerViewToAnnotation']['get'](_0x3d3f10);}['getByView'](_0x2206c8){return this['_viewToAnnotation']['get'](_0x2206c8);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2d071a of this)_0x2d071a['updateTargetRect']();this['_sort']();}['_sort'](){const _0x33620f=Array['from'](this)['sort']((_0x1e81eb,_0x4a0c3e)=>v(_0x1e81eb['view']['targetRect'],_0x4a0c3e['view']['targetRect']));for(let _0x9538ad=_0x33620f['length']-0x1;_0x9538ad>0x0;_0x9538ad--){const _0x1f7b2d=_0x33620f[_0x9538ad];_0x9538ad!==this['getIndex'](_0x1f7b2d)&&(this['remove'](_0x1f7b2d),this['add'](_0x1f7b2d));}}['_getOrderInContent'](_0x20aefa){let _0x2bac11=0x0;if(!_0x20aefa)return this['length'];for(const _0xbe088d of this){const _0x120af6=_0xbe088d['view']['targetRect'];if(_0x120af6){if(v(_0x20aefa,_0x120af6)<0x0)return _0x2bac11;_0x2bac11++;}}return _0x2bac11;}}function v(_0x26b74f,_0xf8b60f){if(null===_0x26b74f&&null===_0xf8b60f)return 0x0;if(null===_0x26b74f)return-0x1;if(null===_0xf8b60f)return 0x1;const _0x164cbd=_0x26b74f['top']-_0xf8b60f['top'];return 0x0==_0x164cbd?_0x26b74f['left']-_0xf8b60f['left']:_0x164cbd;}class O extends _0x149248{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b471e){if(super(_0x5b471e),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5b471e instanceof _0x26ce07){const _0x38b8fc=_0x5b471e['locale'];_0x5b471e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x38b8fc,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x26f632){this['collection']['add'](_0x26f632);}['remove'](_0x294a21){this['collection']['remove'](_0x294a21),_0x294a21['destroy']();}['refreshVisibility'](){for(const _0x29e326 of this['collection'])_0x29e326['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5d7953){return this['collection']['getByInnerView'](_0x5d7953);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x922a3f of this['collection'])_0x922a3f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x233ad4){this['fire']('_activateAnnotation',_0x233ad4);}['createAnnotation'](_0x40e40e){return new d(_0x40e40e);}['createAnnotationView'](_0x1c7a6d,_0x1549f6){return new S(_0x1c7a6d,_0x1549f6);}['_addActiveAnnotation'](_0x45b75d){const _0x5cd8b3=new Set(this['activeAnnotations']);_0x5cd8b3['add'](_0x45b75d),this['activeAnnotations']=_0x5cd8b3;}['_removeActiveAnnotation'](_0x19fc3d){const _0x26a1eb=new Set(this['activeAnnotations']);_0x26a1eb['delete'](_0x19fc3d),this['activeAnnotations']=_0x26a1eb;}['_bindAnnotationsToVisibleAnnotations'](){const _0x518dd0=this['collection'],_0x328a33=this['_visibleAnnotations'];function _0xb3b617(_0x103234){const _0x3ceffc=_0x103234['source'];_0x3ceffc['isVisible']&&!_0x328a33['has'](_0x3ceffc)?_0x328a33['add'](_0x3ceffc):!_0x3ceffc['isVisible']&&_0x328a33['has'](_0x3ceffc)&&_0x328a33['remove'](_0x3ceffc),_0x3ceffc['view']['focusTracker']['remove'](_0x3ceffc['view']['element']),_0x3ceffc['view']['focusTracker']['add'](_0x3ceffc['view']['element']);}this['listenTo'](_0x518dd0,'add',(_0x3687ca,_0x4d7f32)=>{_0x4d7f32['isVisible']&&_0x328a33['add'](_0x4d7f32),this['listenTo'](_0x4d7f32,'change:isVisible',_0xb3b617);}),this['listenTo'](_0x518dd0,'remove',(_0x52f697,_0x5f1527)=>{_0x328a33['has'](_0x5f1527)&&_0x328a33['remove'](_0x5f1527),this['stopListening'](_0x5f1527,'change:isVisible',_0xb3b617);});}['_setupEnterAnnotationKeystroke'](){const _0x49ce71=_0x2f7e7d=>{_0x2f7e7d['on']('ready',()=>{_0x2f7e7d['keystrokes']['set'](_0x9f19f6,(_0x13b8cd,_0x1f88fb)=>{const _0x37369b=_0x255c30(this['activeAnnotations']['values']());_0x37369b&&(_0x37369b['view']['focus'](),_0x1f88fb());});});};this['context']instanceof _0x26ce07?_0x49ce71(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5784d8,_0x3054b6)=>{_0x49ce71(_0x3054b6);});}['_setupEscapeAnnotationHandling'](){const _0x4cf89b=_0x9f0a78=>{const _0x5f500e=_0x9f0a78['source'],_0x559128=[];let _0x182a69;if(Array['isArray'](_0x5f500e['target'])){_0x182a69=_0x5f500e['target'][0x0],this['context']instanceof _0x26ce07?_0x559128['push'](this['context']):this['context']['editors']&&_0x559128['push'](...this['context']['editors']);for(const _0xc53b1a of _0x559128)for(const _0x547e7d of _0xc53b1a['editing']['view']['domRoots']['values']())if(_0x547e7d['contains'](_0x182a69))return void _0xc53b1a['editing']['view']['focus']();_0x182a69['focus']();}};this['listenTo'](this['collection'],'add',(_0x30b368,_0x566cd6)=>{this['listenTo'](_0x566cd6,'escape',_0x4cf89b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xd1a06c,_0x32314f)=>{this['stopListening'](_0x32314f,'escape',_0x4cf89b);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x149248{['_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(_0x56aeb2){super(_0x56aeb2),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3f6565=this['context']['config'];_0x3f6565['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3f6565['define']('comments.maxThreadTotalWeight',0x1f4),_0x3f6565['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3f6565['define']('comments.CommentThreadView',vt),_0x3f6565['define']('comments.CommentView',gt),_0x3f6565['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4e2025=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x23ea36,_0x208415)=>this['_addCommentThread'](_0x208415)),this['on']('submitCommentThread',(_0x544d6f,_0x13fda9)=>this['_submitCommentThread'](_0x13fda9)),this['on']('resolveCommentThread',(_0x13fe59,_0x489343)=>this['_resolveCommentThread'](_0x489343)),this['on']('resolveCommentThread',(_0x3d66c8,_0x3a0760)=>this['_updateActiveAnnotation'](_0x3a0760),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3bcfdb,_0x392409)=>this['_reopenCommentThread'](_0x392409)),this['on']('reopenCommentThread',(_0x372620,_0x446ce3)=>this['_updateActiveAnnotation'](_0x446ce3),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x131bd0,_0xcee7b1)=>this['_removeCommentThread'](_0xcee7b1)),this['on']('updateCommentThread',(_0x520a0b,_0x4e8b70)=>this['_updateCommentThread'](_0x4e8b70)),this['on']('updateCommentThread',(_0x123571,_0x29f9ff)=>this['_updateActiveAnnotation'](_0x29f9ff),{'priority':'lowest'}),this['on']('addComment',(_0x7624c0,_0x14b8fb)=>this['_addComment'](_0x14b8fb)),this['on']('updateComment',(_0x8a5eb7,_0x76f72b)=>this['_updateComment'](_0x76f72b)),this['on']('removeComment',(_0xa2bbce,_0x405d4a)=>this['_removeComment'](_0x405d4a)),this['on']('addComment',(_0x8a79d0,{threadId:_0x26d01c,isFromAdapter:_0x4bad10})=>{if(_0x4bad10)return;const _0x1ae42c=this['getCommentThread'](_0x26d01c),_0xd03db4=_0x1ae42c&&this['_threadToController']['get'](_0x1ae42c);_0xd03db4&&_0xd03db4['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4e2025,'change:activeAnnotations',(_0x2ad092,_0x47a2c1,_0x3e26b3)=>{const _0x4d473d=Array['from'](_0x3e26b3)['map'](_0x51cfd0=>this['_viewToController']['get'](_0x51cfd0['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4d473d?_0x4d473d['model']:null;});}set['adapter'](_0x15090d){if(this['_adapter'])throw new _0x302412('commentsrepository-adapter-already-set');this['_adapter']=_0x15090d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2fa7d7=Tt,threadId:_0x33e37e=_0x23944b(),comments:_0x863f8f=[],unlinkedAt:_0x506518=null,resolvedAt:_0x4a4aa6=null,resolvedBy:_0xca2f6e=null,target:_0x1de044=null,context:_0xed7e4b=null,attributes:_0x47811b={},isResolvable:_0x2f490c=!0x0,isSubmitted:_0x1b2689=!0x1,isFromAdapter:_0xbcd77e=!0x1}={}){return this['fire'](bt('addCommentThread',_0x2fa7d7),{'channelId':_0x2fa7d7,'threadId':_0x33e37e,'comments':_0x863f8f,'unlinkedAt':_0x506518,'resolvedAt':_0x4a4aa6,'resolvedBy':_0xca2f6e,'target':_0x1de044,'context':_0xed7e4b,'attributes':_0x47811b,'isFromAdapter':_0xbcd77e,'isResolvable':_0x2f490c,'isSubmitted':_0x1b2689}),this['getCommentThread'](_0x33e37e);}['openNewCommentThread']({channelId:_0x405910=Tt,threadId:_0x7778d7=_0x23944b(),target:_0x3b34e6,context:_0x15b78a=null,isResolvable:_0x1ff3c8=!0x0}){if(this['_readOnlyChannels']['has'](_0x405910)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3b34e6)throw new _0x302412('commentsrepository-missing-target');const _0x42df7d=this['addCommentThread']({'channelId':_0x405910,'threadId':_0x7778d7,'target':_0x3b34e6,'context':_0x15b78a,'isResolvable':_0x1ff3c8});if(!_0x42df7d)return null;const _0xfd6f66=this['_threadToController']['get'](_0x42df7d),_0x2366ea=_0xfd6f66['view']['commentThreadInputView']['commentInputView'],_0x37a4c7=this['context']['plugins']['get'](O),_0xa2c212=_0x37a4c7['getByInnerView'](_0xfd6f66['view']);return _0x37a4c7['activate'](_0xa2c212),_0x2366ea['once']('editorReady',()=>_0x2366ea['focus']()),_0x42df7d;}['hasCommentThread'](_0x1c82d3){if('string'!=typeof _0x1c82d3)throw new _0x302412('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1c82d3);}['updateCommentThread']({channelId:_0x4e7131=Tt,threadId:_0x2e73d4,context:_0x69fd92,unlinkedAt:_0x3f24e3,attributes:_0x93d23a,isFromAdapter:_0x463c26=!0x1}){return this['fire'](bt('updateCommentThread',_0x4e7131),{'channelId':_0x4e7131,'threadId':_0x2e73d4,'context':_0x69fd92,'unlinkedAt':_0x3f24e3,'attributes':_0x93d23a,'isFromAdapter':_0x463c26}),this['getCommentThread'](_0x2e73d4);}['getCommentThread'](_0x1ba600){if('string'!=typeof _0x1ba600)throw new _0x302412('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1ba600);}['fetchCommentThread']({channelId:_0x2dd051,threadId:_0x125338}={}){const _0x13ec10=this['getCommentThread'](_0x125338);if(_0x13ec10)return Promise['resolve'](_0x13ec10);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x302412('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2dd051,'threadId':_0x125338})['then'](_0x5c277e=>this['hasCommentThread'](_0x125338)?this['getCommentThread'](_0x125338):_0x5c277e?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2dd051},_0x5c277e)):void 0x0)['catch'](_0x1ac65e=>{throw console['error'](_0x1ac65e),new _0x302412('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4dc0bc,skipNotAttached:_0x50a152=!0x1,skipEmpty:_0x21c560=!0x1,toJSON:_0x2c1278=!0x1}={}){const _0x746ac6=[];for(const _0x344767 of this['_threads']['values']())_0x4dc0bc&&_0x344767['channelId']!==_0x4dc0bc||_0x50a152&&!_0x344767['isAttached']||_0x21c560&&0x0===_0x344767['length']||_0x746ac6['push'](_0x344767);return _0x2c1278?_0x746ac6['map'](_0x53ff12=>_0x53ff12['toJSON']()):_0x746ac6;}['setActiveCommentThread'](_0x44e29c){const _0x5f3b8d=this['context']['plugins']['get'](O);if(!_0x44e29c)return void(this['activeCommentThread']&&_0x5f3b8d['deactivateAll']());const _0x213a4a=this['getCommentThread'](_0x44e29c);if(!_0x213a4a)throw new _0x302412('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x44e29c});if(!this['_threadToController']['has'](_0x213a4a))throw new _0x302412('commentsrepository-active-not-attached',null,{'threadId':_0x44e29c});const _0x47051a=_0x5f3b8d['getByInnerView'](this['_threadToController']['get'](_0x213a4a)['view']);_0x5f3b8d['activate'](_0x47051a);}['switchReadOnly'](_0x2c4f38,_0x2d8ac9){_0x2c4f38?this['_readOnlyChannels']['add'](_0x2d8ac9):this['_readOnlyChannels']['delete'](_0x2d8ac9),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5d20ac){return this['_readOnlyChannels']['has'](_0x5d20ac)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4bdf62,_0x33778d){return new Ct(_0x4bdf62,_0x33778d);}['setPermissions'](_0x36f6f0,_0x580729=Tt){this['_permissions']['set'](_0x580729,_0x36f6f0),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3bd1c6=Tt){return this['_permissions']['has'](_0x3bd1c6)?this['_permissions']['get'](_0x3bd1c6):_t;}['_addCommentThread']({channelId:_0x5b5017,threadId:_0x267632,comments:_0x339a43,unlinkedAt:_0x29c259,resolvedAt:_0x3958fc,resolvedBy:_0x1fcab5,target:_0x52168c,context:_0x23729f,attributes:_0x39e71d,isFromAdapter:_0x43241a,isResolvable:_0x1e0cdf,isSubmitted:_0x585c08}){if('string'!=typeof _0x267632)throw new _0x302412('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x267632});if(this['hasCommentThread'](_0x267632))throw new _0x302412('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x267632});const _0x32d245=new ui(this,{'channelId':_0x5b5017,'id':_0x267632,'context':_0x23729f,'attributes':_0x39e71d,'unlinkedAt':_0x29c259,'resolvedAt':_0x3958fc,'resolvedBy':_0x1fcab5?this['context']['plugins']['get'](it)['getUser'](_0x1fcab5):null,'isResolvable':_0x1e0cdf,'isSubmitted':_0x585c08||_0x43241a});this['_threads']['set'](_0x267632,_0x32d245);for(const _0x4f6391 of _0x339a43)_0x32d245['_add'](this['_createNewComment']({'threadId':_0x267632,..._0x4f6391}));return _0x52168c&&_0x32d245['attachTo'](_0x52168c),_0x43241a||!_0x32d245['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5b5017,'threadId':_0x267632});}['_submitCommentThread']({channelId:_0x4215e1,threadId:_0x1075c2}){if(!this['hasCommentThread'](_0x1075c2))throw new _0x302412('commentsrepository-missing-comment-thread',this);const _0x371838=this['getCommentThread'](_0x1075c2);if(_0x371838['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x25f259,comments:_0x27406a,resolvedAt:_0xebdfbf,resolvedBy:_0x1da5b2,context:_0x857e35,attributes:_0x385d58}=_0x371838,_0x2a897b=this['context']['plugins']['get']('PendingActions'),_0x4c7b4f=_0x2a897b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4215e1,'threadId':_0x25f259,'comments':_0x27406a['map'](_0xff69c1=>_0xff69c1['toJSON']()),'resolvedAt':_0xebdfbf,'resolvedBy':_0x1da5b2?_0x1da5b2['id']:_0x1da5b2,'context':_0x857e35,'attributes':_0x385d58})['then'](({comments:_0x349fe8})=>{_0x2a897b['remove'](_0x4c7b4f);for(const _0xca667a of _0x349fe8)this['_updateComment']({'channelId':_0x4215e1,'threadId':_0x1075c2,'commentId':_0xca667a['commentId'],'createdAt':_0xca667a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xef2d8a=>{throw console['error'](_0xef2d8a),new _0x302412('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2b75e8,target:_0x90590a}){const _0x3b48c1=this['getCommentThread'](_0x2b75e8);if(!_0x3b48c1)throw new _0x302412('commentsrepository-attach-missing-comment-thread',this);const _0x4b6a41=this['context']['plugins']['get']('PendingActions'),_0x1dee30=this['context']['plugins']['get'](O),_0xc5e4b4=this['_createCommentThreadView'](_0x3b48c1),_0x529b62=new Ct(_0x3b48c1,_0xc5e4b4);let _0x29ae82=null;_0xc5e4b4['on']('change:isDirty',(_0x325f79,_0x3559fc,_0x3173b1)=>{_0x3173b1?_0x29ae82=_0x4b6a41['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x29ae82&&(_0x4b6a41['remove'](_0x29ae82),_0x29ae82=null);}),this['_threadToController']['set'](_0x3b48c1,_0x529b62),this['_viewToController']['set'](_0xc5e4b4,_0x529b62);const _0x1b9e84=new S(this['context']['locale'],_0xc5e4b4);_0x1b9e84['bind']('length')['to'](_0xc5e4b4),_0x1b9e84['bind']('isDirty')['to'](_0xc5e4b4,'isDirty',_0xc5e4b4,'length',(_0x404d8b,_0x108050)=>_0x404d8b||!_0x108050),_0x1b9e84['bind']('isActive')['to'](_0xc5e4b4),_0x1b9e84['type']='comment';const _0x34bbb2=new d({'view':_0x1b9e84,'target':_0x90590a,'type':'comment','isVisible':!_0x3b48c1['archivedAt']});return _0xc5e4b4['on']('escape',()=>{_0x34bbb2['fire']('escape');}),this['_bindAnnotationToEditors'](_0xc5e4b4,_0x34bbb2),_0x1dee30['add'](_0x34bbb2),_0x34bbb2;}['_bindAnnotationToEditors'](_0xaca33b,_0x2e8e86){this['listenTo'](_0xaca33b,'editorReady',(_0x308bc9,_0x5a8538)=>{const _0xd6b0bb=_0x5a8538['ui']['view']['body']['bodyCollectionContainer'];_0x2e8e86['focusableElements']['add'](_0xd6b0bb),this['context']instanceof _0x26ce07&&this['context']['ui']['focusTracker']['add'](_0xd6b0bb);},{'priority':'highest'}),this['listenTo'](_0xaca33b,'editorDestroyed',(_0x345724,_0x2dcea1)=>{const _0x87ce51=_0x2dcea1['ui']['view']['body']['bodyCollectionContainer'];_0x2e8e86['focusableElements']['has'](_0x87ce51)&&_0x2e8e86['focusableElements']['remove'](_0x87ce51),this['context']instanceof _0x26ce07&&this['context']['ui']['focusTracker']['remove'](_0x87ce51);});}['_unbindEditors'](_0x94e1dd){this['stopListening'](_0x94e1dd,'editorReady'),this['stopListening'](_0x94e1dd,'editorDestroyed');}['_createCommentThreadView'](_0x1e3953){const _0x5848a7=this['context']['plugins']['get'](it),{config:_0x9c0125,locale:_0x348e8d}=this['context'],_0x24a111=lt(_0x9c0125['get']('locale'),_0x348e8d);return new(0x0,(_0x9c0125['get']('comments'))['CommentThreadView'])(_0x348e8d,_0x1e3953,_0x5848a7['me'],{'editorConfig':{..._0x9c0125['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x9c0125['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x9c0125['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x9c0125['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x9c0125['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x24a111,'CommentView':_0x9c0125['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x376378,channelId:_0x115455,resolvedAt:_0x1af0cd,resolvedBy:_0x5763d9,isFromAdapter:_0x326ea7}){if(!this['hasCommentThread'](_0x376378))throw new _0x302412('commentsrepository-missing-comment-thread',null,{'threadId':_0x376378});const _0x29adfe=this['getCommentThread'](_0x376378);if(_0x29adfe['isResolved'])throw new _0x302412('commentsrepository-resolved-comment-thread',null,{'threadId':_0x376378});const _0x38aee1=this['context']['plugins']['get'](it);if(_0x29adfe['resolvedBy']=_0x38aee1['getUser'](_0x5763d9),_0x29adfe['resolvedAt']=_0x1af0cd,_0x326ea7||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x48116f=this['context']['plugins']['get']('PendingActions'),_0x28aa23=_0x48116f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x115455,'threadId':_0x376378})['then'](({resolvedAt:_0x3b4663,resolvedBy:_0x378146})=>{_0x48116f['remove'](_0x28aa23),_0x29adfe['resolvedBy']['id']!==_0x378146&&(_0x29adfe['resolvedBy']=_0x38aee1['getUser'](_0x378146)),_0x29adfe['resolvedAt']=_0x3b4663;})['catch'](_0x193d78=>{throw console['error'](_0x193d78),new _0x302412('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1ab338,channelId:_0x1a512c,isFromAdapter:_0x2dcdc0}){if(!this['hasCommentThread'](_0x1ab338))throw new _0x302412('commentsrepository-missing-comment-thread',null,{'threadId':_0x1ab338});const _0x36e1ad=this['getCommentThread'](_0x1ab338);if(!_0x36e1ad['isResolved'])throw new _0x302412('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1ab338});if(_0x36e1ad['resolvedBy']=null,_0x36e1ad['resolvedAt']=null,_0x2dcdc0||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2ffc2a=this['context']['plugins']['get']('PendingActions'),_0x8b25dc=_0x2ffc2a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1a512c,'threadId':_0x1ab338})['then'](()=>_0x2ffc2a['remove'](_0x8b25dc))['catch'](_0x1452bf=>{throw console['error'](_0x1452bf),new _0x302412('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3da3f6,isFromAdapter:_0x3fa973}){const _0x32fde9=this['getCommentThread'](_0x3da3f6);if(!_0x32fde9)throw new _0x302412('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3da3f6),this['_threads']['delete'](_0x3da3f6),!_0x32fde9['isSubmitted']||_0x3fa973||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x18be4a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x35ce84}=_0x32fde9,_0x3db0f2=_0x18be4a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x35ce84,'threadId':_0x3da3f6})['then'](()=>_0x18be4a['remove'](_0x3db0f2))['catch'](_0x32159a=>{throw console['error'](_0x32159a),new _0x302412('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5457f0,unlinkedAt:_0x4387ae,context:_0x306947,attributes:_0x55f20e,isFromAdapter:_0x5e1793}){if('string'!=typeof _0x5457f0)throw new _0x302412('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5457f0});if(!this['hasCommentThread'](_0x5457f0))throw new _0x302412('commentsrepository-missing-comment-thread',null,{'threadId':_0x5457f0});const _0x576d19=this['getCommentThread'](_0x5457f0);let _0x4751c4=!0x1;if(void 0x0!==_0x306947&&_0x576d19['context']!==_0x306947&&(_0x576d19['context']=_0x306947,_0x4751c4=!0x0),void 0x0!==_0x4387ae&&_0x576d19['unlinkedAt']!==_0x4387ae&&(_0x576d19['unlinkedAt']=_0x4387ae,_0x4751c4=!0x0),_0x55f20e&&!wt(_0x55f20e,_0x576d19['attributes'])&&(_0x576d19['attributes']=_0x55f20e,_0x4751c4=!0x0),!_0x4751c4)return Promise['resolve']();if(!_0x576d19['isSubmitted']||_0x5e1793||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4b87a3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2650e1}=_0x576d19,_0x44c63c=_0x4b87a3['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2650e1,'threadId':_0x5457f0,'context':_0x306947,'unlinkedAt':_0x4387ae,'attributes':_0x55f20e})['then'](()=>_0x4b87a3['remove'](_0x44c63c))['catch'](_0x24101b=>{throw console['error'](_0x24101b),new _0x302412('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2c9500){const _0x560103=this['context']['plugins']['get'](O),_0x13a5e8=this['getCommentThread'](_0x2c9500);if(_0x13a5e8['_isAttached']=!0x1,this['_threadToController']['has'](_0x13a5e8)){const _0x4ae5ad=this['_threadToController']['get'](_0x13a5e8),_0x235fc6=_0x4ae5ad['view'],_0x355b84=_0x560103['getByInnerView'](_0x235fc6);this['_threadToController']['delete'](_0x13a5e8),this['_viewToController']['delete'](_0x235fc6),_0x355b84&&_0x560103['remove'](_0x355b84),_0x4ae5ad['destroy'](),_0x235fc6['destroy']()['then'](()=>{this['_unbindEditors'](_0x235fc6);});}}['_updateActiveAnnotation']({threadId:_0x238719,resolvedAt:_0x14e7bc,unlinkedAt:_0x27847d}){const _0x432df3=!!_0x14e7bc,_0x122048=this['context']['plugins']['get'](O),_0x13bdb3=this['getCommentThread'](_0x238719);if(this['_threadToController']['has'](_0x13bdb3)){const _0x26481f=this['_threadToController']['get'](_0x13bdb3)['view'],_0x1c39eb=_0x122048['getByInnerView'](_0x26481f);_0x1c39eb&&(_0x432df3&&_0x122048['_removeActiveAnnotation'](_0x1c39eb),_0x27847d?_0x1c39eb['isVisible']=!0x1:_0x1c39eb['refreshVisibility']());}}['_getExternalAuthor'](_0x5dd283){const _0xe43f2e=this['context']['plugins']['get'](it),_0x3b331a=pt('external:'+_0x5dd283),_0x34757e=_0xe43f2e['getUser'](_0x3b331a);return _0x34757e||_0xe43f2e['addUser']({'id':_0x3b331a,'name':_0x5dd283});}['_createNewComment']({threadId:_0x35bdaf,commentId:_0x270aca=_0x23944b(),content:_0x53de20,authorId:_0xec8e06,createdAt:_0x2eb52f,attributes:_0x5816dd}){if('string'!=typeof _0x270aca)throw new _0x302412('commentsrepository-invalid-commentid');if('string'!=typeof _0xec8e06)throw new _0x302412('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x53de20||!_0x53de20['trim']())throw new _0x302412('commentsrepository-invalid-comment-content');const _0x20778e=this['context']['plugins']['get'](it)['getUser'](_0xec8e06);if(!_0x20778e)throw new _0x302412('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xec8e06});let _0x29f852=null,_0x599e88=_0x2eb52f;return _0x5816dd?.['@external']&&(_0x29f852=this['_getExternalAuthor'](_0x5816dd['@external']['authorName']),_0x599e88=new Date(_0x5816dd['@external']['createdAt'])),new fi(this,{'threadId':_0x35bdaf,'id':_0x270aca,'author':_0x29f852||_0x20778e,'creator':_0x20778e,'content':_0x53de20,'createdAt':_0x2eb52f,'authoredAt':_0x599e88,'attributes':_0x5816dd});}['_addComment'](_0xea02da){let {threadId:_0x3e5ea9,content:_0x33166e,attributes:_0x5a218e,isFromAdapter:_0x1c0f88}=_0xea02da;const _0x55b1a4=this['getCommentThread'](_0xea02da['threadId']);if(!_0x55b1a4)throw new _0x302412('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x473219=this['_createNewComment'](_0xea02da),{id:_0x1612db}=_0x473219;if(_0x55b1a4['_add'](_0x473219),_0x1c0f88||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x55b1a4['isSubmitted'])return Promise['resolve']();const _0x25e1f2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x39a7cd}=_0x55b1a4,_0x1dea2c=_0x25e1f2['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5a218e||(_0x5a218e={}),this['adapter']['addComment']({'channelId':_0x39a7cd,'threadId':_0x3e5ea9,'commentId':_0x1612db,'content':_0x33166e,'attributes':_0x5a218e})['then'](_0x5f0dd1=>{_0x25e1f2['remove'](_0x1dea2c),_0x5f0dd1&&this['_updateComment']({'channelId':_0x39a7cd,'threadId':_0x3e5ea9,'commentId':_0x1612db,'createdAt':_0x5f0dd1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x67a355=>{throw console['error'](_0x67a355),new _0x302412('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5b9cc1,commentId:_0x2d46c8,content:_0x5ebf04,createdAt:_0x471478,attributes:_0x48aaf2,isFromAdapter:_0xbc320b}){if(void 0x0!==_0x5ebf04&&('string'!=typeof _0x5ebf04||!_0x5ebf04['trim']()['length']))throw new _0x302412('commentsrepository-update-comment-invalid-content');const _0x581748=this['getCommentThread'](_0x5b9cc1),_0xf2771b=_0x581748['getComment'](_0x2d46c8);if(!_0xf2771b)throw new _0x302412('commentsrepository-update-missing-comment',this);let _0x6bcf55=!0x1;if(_0x5ebf04&&_0x5ebf04!==_0xf2771b['content']&&(_0xf2771b['isEditable']||_0xbc320b)&&(_0xf2771b['content']=_0x5ebf04,_0x6bcf55=!0x0),_0x471478&&_0x471478!==_0xf2771b['createdAt']&&(_0xf2771b['createdAt']=_0x471478,_0xf2771b['attributes']&&_0xf2771b['attributes']['@external']||(_0xf2771b['authoredAt']=_0x471478),_0x6bcf55=!0x0),_0x48aaf2&&!wt(_0x48aaf2,_0xf2771b['attributes'])&&(_0xf2771b['attributes']=_0x48aaf2,_0x6bcf55=!0x0),!_0x6bcf55)return Promise['resolve']();if(_0x581748['fire']('commentUpdated'),_0xbc320b||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2b0ae4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1359a6}=this['getCommentThread'](_0xf2771b['threadId']),_0x16c798=_0x2b0ae4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1359a6,'threadId':_0x5b9cc1,'commentId':_0x2d46c8,'content':_0x5ebf04,'attributes':_0x48aaf2})['then'](()=>_0x2b0ae4['remove'](_0x16c798))['catch'](_0x4036b6=>{throw console['error'](_0x4036b6),new _0x302412('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x583abf,commentId:_0x5d7a9e,isFromAdapter:_0x2f3bd2}){const _0x48b3c0=this['getCommentThread'](_0x583abf),_0x3d0fa4=_0x48b3c0['getComment'](_0x5d7a9e);if(!_0x3d0fa4)throw new _0x302412('commentsrepository-remove-missing-comment',this);if(_0x48b3c0['_remove'](_0x3d0fa4),_0x2f3bd2||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3fcf8e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1dcdf9}=_0x48b3c0,_0x1c64c1=_0x3fcf8e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1dcdf9,'threadId':_0x583abf,'commentId':_0x5d7a9e})['then'](()=>_0x3fcf8e['remove'](_0x1c64c1))['catch'](_0x408d19=>{throw console['error'](_0x408d19),new _0x302412('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x2170ff(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x456fb4,_0x44abb7){super();const _0x4b1c=_0x44abb7['isResolvable'];this['channelId']=_0x44abb7['channelId'],this['id']=_0x44abb7['id'],this['comments']=new _0x1b6511(),this['_repository']=_0x456fb4,this['_isAttached']=!0x1,this['_isSubmitted']=_0x44abb7['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x456fb4,'_permissions',_0x456fb4,'_readOnlyChannels',()=>_0x456fb4['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x456fb4,'_permissions',()=>_0x456fb4['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x456fb4,'_permissions',()=>{const _0x17f223=_0x456fb4['getPermissions'](this['channelId']);return _0x17f223['write']||_0x17f223['admin'];}),this['bind']('isResolvable')['to'](_0x456fb4,'_permissions',()=>_0x4b1c&&_0x456fb4['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x44abb7['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5b0e38,_0x163ba5)=>_0x5b0e38?_0x163ba5?_0x5b0e38<_0x163ba5?_0x5b0e38:_0x163ba5:_0x5b0e38:_0x163ba5),this['set']('unlinkedAt',_0x44abb7['unlinkedAt']||null),this['set']('resolvedAt',_0x44abb7['resolvedAt']||null),this['set']('resolvedBy',_0x44abb7['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x32f1f1=>!!_0x32f1f1),this['set']('attributes',_0x44abb7['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x20c7a6,_0x6c08ef)=>_0x20c7a6+_0x6c08ef['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x13230e,id:_0x25997d}=this;this['_repository']['fire'](bt('submitCommentThread',_0x13230e),{'channelId':_0x13230e,'threadId':_0x25997d});}['setUnlinkedAt'](_0x347dfd){this['_update']({'unlinkedAt':_0x347dfd});}['resolve']({resolvedAt:_0x242183=new Date(),resolvedBy:_0x130787=null,isFromAdapter:_0x2ae44f=!0x1}={}){const _0x1c1a73=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x5baaa0,id:_0x5929d9}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x5baaa0),{'channelId':_0x5baaa0,'threadId':_0x5929d9,'resolvedAt':_0x242183,'resolvedBy':_0x130787||_0x1c1a73['id'],'isFromAdapter':_0x2ae44f});}['reopen']({isFromAdapter:_0x4d8191=!0x1}={}){const {channelId:_0x3e44b8,id:_0x31e285}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x3e44b8),{'channelId':_0x3e44b8,'threadId':_0x31e285,'isFromAdapter':_0x4d8191});}['setContext'](_0x35b892){this['context']||this['_update']({'context':_0x35b892});}['setAttribute'](_0x58c65a,_0x2ac6b2){const _0x1882f5=It(this['attributes']);At(_0x1882f5,_0x58c65a,_0x2ac6b2),this['_update']({'attributes':_0x1882f5});}['removeAttribute'](_0x561ff0){const _0x1b9031=It(this['attributes']);yt(_0x1b9031,_0x561ff0),this['_update']({'attributes':_0x1b9031});}['remove']({isFromAdapter:_0x10a22b=!0x1}={}){const {channelId:_0x3a032c,id:_0x1e5c19}=this;this['_repository']['fire'](bt('removeCommentThread',_0x3a032c),{'channelId':_0x3a032c,'threadId':_0x1e5c19,'isFromAdapter':_0x10a22b});}['attachTo'](_0x5667dc){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x5667dc});}['addComment'](_0xf869b1){const {channelId:_0x468c84,id:_0x5f3e8d}=this;this['_repository']['fire'](bt('addComment',_0x468c84,_0x5f3e8d),Object['assign']({'channelId':_0x468c84,'threadId':_0x5f3e8d},_0xf869b1));}['getComment'](_0x50573c){if('string'!=typeof _0x50573c)throw new _0x302412('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x50573c});return this['comments']['get'](_0x50573c);}['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'](_0x502325=>_0x502325['toJSON']()),'attributes':this['attributes']};}['_add'](_0x27a4c0){return this['listenTo'](_0x27a4c0,'change:authoredAt',()=>{const _0x1e587a=this['_findOptimalIndex'](_0x27a4c0),_0x1dbf12=this['comments'];_0x1e587a-0x1!=_0x1dbf12['getIndex'](_0x27a4c0)&&_0x1e587a+0x1!=_0x1dbf12['getIndex'](_0x27a4c0)&&(this['_remove'](_0x27a4c0),this['_add'](_0x27a4c0));}),this['comments']['add'](_0x27a4c0,this['_findOptimalIndex'](_0x27a4c0));}['_update'](_0x526a17){const {channelId:_0x138b14,id:_0x3bdb89}=this;this['_repository']['fire'](bt('updateCommentThread',_0x138b14),{..._0x526a17,'channelId':_0x138b14,'threadId':_0x3bdb89});}['_remove'](_0x336458){return this['stopListening'](_0x336458),_0x336458['destroy'](),this['comments']['remove'](_0x336458);}['_findOptimalIndex'](_0x2df112){const _0x1d42e0=this['comments']['find'](_0x2526b3=>new Date(_0x2526b3['authoredAt'])['getTime']()>new Date(_0x2df112['authoredAt'])['getTime']());return _0x1d42e0?this['comments']['getIndex'](_0x1d42e0):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x2170ff(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x49a1b5,_0x198407){super();const _0x131fde=_0x49a1b5['context']['plugins']['get'](it)['me'],_0x5093ac=_0x49a1b5['getCommentThread'](_0x198407['threadId']),_0x2e31c2=0x0===_0x5093ac['comments']['length'],_0x1ef602=_0x131fde===_0x198407['author'];this['id']=_0x198407['id'],this['threadId']=_0x198407['threadId'],this['author']=_0x198407['author'],this['creator']=_0x198407['creator'],this['isExternal']=Boolean(_0x198407['attributes']&&_0x198407['attributes']['@external']),this['set']('content',_0x198407['content']),this['createdAt']=_0x198407['createdAt']||new Date(),this['set']('authoredAt',_0x198407['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5093ac,'resolvedAt'),this['set']('attributes',_0x198407['attributes']||{}),this['bind']('isEditable')['to'](_0x49a1b5,'_permissions',()=>{const _0x584186=_0x49a1b5['getPermissions'](_0x5093ac['channelId'])['write'],_0x5cbaaf=_0x49a1b5['getPermissions'](_0x5093ac['channelId'])['modifyAll'];return _0x1ef602&&_0x584186||!_0x1ef602&&_0x5cbaaf;}),this['bind']('isRemovable')['to'](_0x5093ac,'isRemovable',_0x49a1b5,'_permissions',_0x18e01d=>{const _0x281bc8=_0x49a1b5['getPermissions'](_0x5093ac['channelId'])['write'],_0x476cfe=_0x49a1b5['getPermissions'](_0x5093ac['channelId'])['modifyAll'];return _0x1ef602&&_0x281bc8||_0x18e01d&&_0x2e31c2||!_0x1ef602&&_0x476cfe&&!_0x2e31c2;}),this['bind']('isReadOnly')['to'](_0x5093ac,'isReadOnly'),this['_repository']=_0x49a1b5;}get['weight'](){return Math['max'](function(_0x1d2a5e){const _0x4dad14=document['createElement']('div');return _0x4dad14['innerHTML']=_0x1d2a5e,_0x4dad14['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3ddd11){const {threadId:_0x4f8ee8,id:_0x5d6e01}=this;if(!this['_repository']['hasCommentThread'](_0x4f8ee8))throw new _0x302412('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x527a96}=this['_repository']['getCommentThread'](_0x4f8ee8);this['_repository']['fire'](bt('updateComment',_0x527a96,_0x4f8ee8),{'channelId':_0x527a96,'threadId':_0x4f8ee8,'commentId':_0x5d6e01,..._0x3ddd11});}['setAttribute'](_0x249340,_0x4edfe4){const _0x308afb=It(this['attributes']);At(_0x308afb,_0x249340,_0x4edfe4),this['update']({'attributes':_0x308afb});}['removeAttribute'](_0x566f03){const _0x401b1e=It(this['attributes']);yt(_0x401b1e,_0x566f03),this['update']({'attributes':_0x401b1e});}['remove'](_0x103501={}){if(!_0x103501['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1f83ba,id:_0x1fe633}=this;if(!this['_repository']['hasCommentThread'](_0x1f83ba))throw new _0x302412('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3addc3}=this['_repository']['getCommentThread'](_0x1f83ba);this['_repository']['fire'](bt('removeComment',_0x3addc3,_0x1f83ba),{'channelId':_0x3addc3,'threadId':_0x1f83ba,'commentId':_0x1fe633,..._0x103501});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x597c97,..._0x64ecf3){for(const _0x53859e of _0x64ecf3)void 0x0!==_0x53859e&&(_0x597c97+=':'+String(_0x53859e));return _0x597c97;}class J extends _0x116639{['refresh'](){const _0x17edfb=this['editor']['model']['document']['selection'];for(const _0x11c8ef of _0x17edfb['getRanges']())if(this['_hasContent'](_0x11c8ef))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x154683=_0x23944b()}={}){const _0x1db98e=this['editor']['model'],_0x5bb296=[];for(const _0x1f89ef of _0x1db98e['document']['selection']['getRanges']())this['_hasContent'](_0x1f89ef)&&_0x5bb296['push'](this['_trimToContent'](_0x1f89ef));_0x1db98e['change'](_0x1145c5=>{for(const _0x21bc0d of _0x5bb296){const _0x4a34e9=_0x23944b()['substr'](0x1,0x5),_0x2eb1ee='comment:'+_0x154683+':'+_0x4a34e9;_0x1145c5['addMarker'](_0x2eb1ee,{'range':_0x21bc0d,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5c40d1){for(const _0x8d6c6 of _0x5c40d1['getItems']())if(this['_itemIsContent'](_0x8d6c6))return!0x0;return!0x1;}['_itemIsContent'](_0x8a9031){return _0x8a9031['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x8a9031)&&!_0x8a9031['is']('element','tableCell');}['_trimToContent'](_0x111c59){const _0x4504d0=_0x329254=>!this['_itemIsContent'](_0x329254['item']),_0x57f477=_0x111c59['start']['getLastMatchingPosition'](_0x4504d0),_0x3d15c3=_0x111c59['end']['getLastMatchingPosition'](_0x4504d0,{'direction':'backward'});return this['editor']['model']['createRange'](_0x57f477,_0x3d15c3);}}class P extends _0x3e8287{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4008bb){super(_0x4008bb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x290864=this['editor'],_0x4d5ae4=_0x290864['model']['document']['selection'],_0x1276d0=_0x3058e3(()=>this['refreshSelectedViews'](),0xa);_0x4d5ae4['on']('change:range',(_0x5f0a6d,_0x30a39d)=>{_0x30a39d['directChange']&&(_0x1276d0['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x290864['editing']['view']['document'],'change:isFocused',(_0x32f59b,_0x410f60,_0x3d8ebe)=>{_0x3d8ebe&&_0x1276d0();}),this['listenTo'](_0x290864['ui']['focusTracker'],'change:isFocused',(_0x5c015c,_0x26f052,_0x15db43)=>{_0x15db43||_0x290864['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x262ca8=>this['_editorAnnotationsData']['has'](_0x262ca8['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x51e1cc){if(this['_editorAnnotations']['has'](_0x51e1cc['view']))return;this['_editorAnnotations']['add'](_0x51e1cc['view']),this['editor']['ui']['focusTracker']['add'](_0x51e1cc['view']['element']);const _0x496e9b=this['editor']['plugins']['get'](O);this['listenTo'](_0x496e9b['collection'],'remove',(_0x3a3b38,_0x5e6880)=>{this['editor']['ui']['focusTracker']['remove'](_0x5e6880['view']['element']),this['_editorAnnotations']['delete'](_0x5e6880['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x195d9d){if('function'!=typeof _0x195d9d)throw new _0x302412('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x195d9d);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2f3ad0,annotations:_0x500666}){const _0x20d1d5=[],_0x28142d=this['editor']['model']['document']['selection'],_0x56b591=Array['from'](_0x28142d['getRanges']());for(const [_0x520a0c,_0x2907d9]of this['_editorAnnotationsData']){const _0x4e521d=_0x12aaa4(_0x2907d9),_0x43d908=_0x500666['getByInnerView'](_0x520a0c);_0x4e521d&&_0x43d908&&_0x20d1d5['push']({'annotation':_0x43d908,'range':_0x4e521d});}function _0x12aaa4(_0x32900c){for(const _0x44daea of _0x32900c)for(const _0x4f9790 of _0x56b591)if(_0x44daea['containsRange'](_0x4f9790,!_0x28142d['isCollapsed']))return _0x44daea;return null;}return _0x20d1d5['sort']((_0x30d421,_0xb26ead)=>{const _0x413319=_0x30d421['range'],_0x42505e=_0xb26ead['range'];if(!_0x413319['isEqual'](_0x42505e)){if(_0x413319['containsRange'](_0x42505e,!0x0))return 0x1;if(_0x42505e['containsRange'](_0x413319,!0x0))return-0x1;}return _0x30d421['annotation']==_0x2f3ad0?-0x1:_0xb26ead['annotation']==_0x2f3ad0?0x1:0x0;})['map'](_0x22ed8e=>_0x22ed8e['annotation']);}get['_editorAnnotationsData'](){const _0x397875=new Map();for(const _0x5d8482 of Array['from'](this['_dataCollectors']))for(const [_0x24c930,_0x381a17]of _0x5d8482())_0x397875['set'](_0x24c930,_0x381a17);return _0x397875;}}class st extends _0x3e8287{['afterInit'](){const _0x25254d=this['editor'];if(!_0x25254d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x25254d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3e8287{constructor(_0xea5d9c){super(_0xea5d9c),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5ed663=this['editor'],_0x5c4abe=_0x5ed663['commands']['get']('importWord'),_0x3c99a1=_0x5ed663['plugins']['get'](it);_0x5c4abe&&(_0x5c4abe['on']('execute',(_0xdca866,[,_0x2be4ea])=>{_0x2be4ea['collaboration_features']={'comments':!0x0,'user_id':_0x3c99a1['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5c4abe,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x43c9e0,_0xa448e8){const {comment_threads:_0x8bd518}=_0xa448e8;_0x8bd518&&_0x8bd518['forEach'](({thread_id:_0x56ebda,comments:_0x148902,is_resolved:_0x448b23})=>{const _0x5224e1=new Date(),_0x35658d=_0x148902['map'](({author:_0x3e3dd6,content:_0xf22877,created_at:_0x48f81f})=>({'content':_0xf22877,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x5224e1,'attributes':{'@external':{'authorName':_0x3e3dd6,'createdAt':_0x48f81f?new Date(_0x48f81f):new Date(),'source':'importWord'}}})),_0x477b23=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x477b23,'threadId':_0x56ebda,'comments':_0x35658d,'resolvedAt':_0x448b23?_0x5224e1:null});});}}class at extends _0x3e8287{constructor(_0x266d03){super(_0x266d03),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0xfe2b30=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xfe2b30,'contentInsertion',(_0x42acdd,_0x5aab2b)=>this['_removeMarkersWithoutThreads'](_0x5aab2b['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2dda12){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2dda12;const _0x39f2a0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5906ff of _0x2dda12['keys']()){const [_0x2e1edc,_0x205149]=_0x5906ff['split'](':');'comment'!=_0x2e1edc||_0x39f2a0['hasCommentThread'](_0x205149)||_0x2dda12['delete'](_0x5906ff);}return _0x2dda12;}['_registerMarkerInClipboardPipeline'](){const _0x3e2226=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xa54dfd=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xa54dfd&&_0x3e2226['_registerMarkerToCopy']('comment',_0xa54dfd);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x5d6b3b){switch(_0x5d6b3b){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 _0x3e8287{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2ff74f,_0x3d8900)=>{if(!_0x3d8900['options']['showCommentHighlights'])return null;if(_0x3d8900['options']['ignoreResolvedComments']){const {id:_0xf19c7b}=er(_0x2ff74f['markerName']),_0x260244=this['editor']['plugins']['get'](o);if(_0x260244['getCommentThread'](_0xf19c7b)?.['isResolved']&&_0x2ff74f['item'])return _0x3d8900['consumable']['consume'](_0x2ff74f['item'],'addMarker:'+_0x2ff74f['markerName']),_0x3d8900['consumable']['consume'](_0x2ff74f['item'],'removeMarker:'+_0x2ff74f['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x22f851=>{_0x22f851['on']('addMarker:comment',(_0xd1f9ed,_0x5e8ea8,_0x55169c)=>{if(!_0x55169c['options']['showCommentHighlights'])return;const _0xb6e292=_0x5e8ea8['item'];if(!_0xb6e292)return;const _0x477eba=_0x55169c['mapper']['toViewElement'](_0xb6e292);this['editor']['model']['schema']['isObject'](_0xb6e292)&&_0x477eba&&!_0x477eba['getCustomProperty']('widget')&&_0x477eba['is']('containerElement')&&_0xb56482(_0x477eba,_0x55169c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x38f26b,{writer:_0x2359d2,options:_0xab0d9d})=>{if(!_0xab0d9d['showCommentHighlights'])return null;const _0x45e3df=_0x2359d2['createContainerElement']('div'),_0xb309ac=_0x2359d2['createEmptyElement']('hr');return _0x2359d2['addClass']('ck-horizontal-line',_0x45e3df),_0x2359d2['insert'](_0x2359d2['createPositionAt'](_0x45e3df,0x0),_0xb309ac),_0x45e3df;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x42fb65,{writer:_0x90ac91,options:_0x50ed3f})=>{if(!_0x50ed3f['showCommentHighlights'])return null;const _0x3a892f=_0x90ac91['createContainerElement']('span'),_0x4197eb=_0x90ac91['createEmptyElement']('img');return _0x90ac91['addClass']('image-inline',_0x3a892f),_0x90ac91['insert'](_0x90ac91['createPositionAt'](_0x3a892f,0x0),_0x4197eb),_0x3a892f;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x36e561,{writer:_0x549f1c,options:_0x53281a})=>{if(_0x53281a['showCommentHighlights'])return _0x549f1c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5edbdb,_0x1c1f32,_0x4c2015)=>{_0x4c2015['options']['showCommentHighlights']&&_0x5edbdb['stop']();},{'priority':'high'});}}class r extends _0x3e8287{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(_0x336115){super(_0x336115),this['set']('isThreadsLoadingPaused',!0x0),_0x336115['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5cbff3,_0x5930e7,_0x110d50,_0x162280)=>{const _0x72cafc=_0x336115['plugins']['get'](o),_0x12e98c=_0x110d50?er(_0x110d50)['id']:null;_0x336115['model']['change'](()=>{if(_0x12e98c){const _0x3aa6d2=this['getAllMarkersForId'](_0x12e98c);for(const _0x40eab9 of _0x3aa6d2)_0x336115['editing']['reconvertMarker'](_0x40eab9);}if(_0x162280){const {id:_0x42b71e}=er(_0x162280),_0x1adf7a=_0x72cafc['getCommentThread'](_0x42b71e);if(_0x1adf7a&&_0x1adf7a['unlinkedAt'])return;if(_0x1adf7a&&!_0x1adf7a['isAttached'])return;const _0x57ca8b=this['getAllMarkersForId'](_0x42b71e);for(const _0x27ce30 of _0x57ca8b)_0x336115['editing']['reconvertMarker'](_0x27ce30);}}),_0x12e98c&&this['scrollToThreadMarker'](_0x12e98c);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x42f13a=this['editor'],_0x59c335=_0x42f13a['plugins']['get'](o),_0x123154=_0x42f13a['config']['get']('collaboration.channelId'),_0x25f6af=_0x59c335['getCommentThreads']()['filter'](_0x384c6d=>_0x384c6d['channelId']!==_0x123154);_0x42f13a['commands']['add']('addCommentThread',new J(_0x42f13a)),this['listenTo'](_0x42f13a,'change:isReadOnly',(_0x2fb544,_0x3b4c64,_0x5c6f71)=>{_0x59c335['switchReadOnly'](_0x5c6f71,_0x42f13a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x59c335,ft('addCommentThread',_0x123154),(_0x3dcc2a,{threadId:_0x5341d6})=>{const _0x335eff=this['editor']['plugins']['get'](o)['getCommentThread'](_0x5341d6);_0x335eff?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5341d6);}),this['listenTo'](_0x59c335,ft('removeCommentThread',_0x123154),(_0x1b0292,{threadId:_0x4cc0da})=>{_0x42f13a['model']['enqueueChange']({'isUndoable':!0x1},_0x44b1e4=>{const _0x1cb47e=this['getAllMarkersForId'](_0x4cc0da);for(const _0x211640 of _0x1cb47e)_0x44b1e4['removeMarker'](_0x211640);});}),this['listenTo'](_0x59c335,ft('resolveCommentThread',_0x123154),(_0x5a117a,{threadId:_0x3ee658})=>{(this['_reconvertMarkers'](_0x3ee658),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x3ee658)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x59c335,ft('reopenCommentThread',_0x123154),(_0x5c090c,{threadId:_0x244238})=>{this['_reconvertMarkers'](_0x244238);},{'priority':'low'}),this['listenTo'](_0x59c335,ft('addComment',_0x123154),(_0x5bd4e5,{threadId:_0x3b4581,isFromAdapter:_0x7eb7a2})=>{const _0x1bf727=this['getAllMarkersForId'](_0x3b4581);if(_0x7eb7a2||0x0==_0x1bf727['length']||!_0x59c335['hasCommentThread'](_0x3b4581))return;0x1===_0x59c335['getCommentThread'](_0x3b4581)['length']&&_0x42f13a['model']['enqueueChange']({'isUndoable':!0x1},_0x4a749b=>{for(const _0x4df141 of _0x1bf727)_0x4a749b['updateMarker'](_0x4df141,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x25f6af);}['afterInit'](){!async function(_0x2c0163){const _0x3eaeb5=_0x26a695([0x73,0x33,0x43,0x74,0x70,0x76,0x30,0x4c,0x6d,0x6c,0x57,0x5a,0x32,0x7a,0x47,0x31,0x68,0x65,0x71,0x4d,0x41,0x53,0x59,0x38,0x55,0x37,0x61,0x51,0x45,0x6e,0x77,0x64,0x79,0x4e,0x44,0x52,0x78,0x6f,0x56,0x66,0x69,0x48,0x4a,0x46,0x75,0x72,0x35,0x67,0x39,0x54,0x4b,0x50,0x42,0x34,0x6a,0x36,0x63,0x58,0x6b,0x4f,0x62,0x49]),_0x3ec87d=0x15fe099a,_0x378e80=0x15f96e3a^_0x3ec87d,_0x2a1311=window[_0x26a695([0x44,0x61,0x74,0x65])][_0x26a695([0x6e,0x6f,0x77])](),_0x4a757f=_0x2c0163[_0x26a695([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x38b3d1=new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d8614=>{_0x4a757f[_0x26a695([0x6f,0x6e,0x63,0x65])](_0x26a695([0x72,0x65,0x61,0x64,0x79]),_0x5d8614);}),_0x264c35={[_0x26a695([0x6b,0x74,0x79])]:_0x26a695([0x45,0x43]),[_0x26a695([0x75,0x73,0x65])]:_0x26a695([0x73,0x69,0x67]),[_0x26a695([0x63,0x72,0x76])]:_0x26a695([0x50,0x2d,0x32,0x35,0x36]),[_0x26a695([0x78])]:_0x26a695([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]),[_0x26a695([0x79])]:_0x26a695([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]),[_0x26a695([0x61,0x6c,0x67])]:_0x26a695([0x45,0x53,0x32,0x35,0x36])},_0x5131a2=_0x4a757f[_0x26a695([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x26a695([0x67,0x65,0x74])](_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2f4dda(){let _0x18d1a9,_0x3d421c=null,_0x106bae=null;try{if(_0x5131a2==_0x26a695([0x47,0x50,0x4c]))return _0x26a695([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x18d1a9=_0x29342a(),!_0x18d1a9)return _0x26a695([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x18d1a9[_0x26a695([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x106bae=_0xb38a32(_0x18d1a9[_0x26a695([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x18d1a9[_0x26a695([0x6a,0x74,0x69])])),await _0x37e772()?_0x1b9ed1()?_0x56ceea()?_0x26a695([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x51138a()?(_0x18d1a9[_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26a695([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3d421c=_0x484068(_0x26a695([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x18d1a9[_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26a695([0x74,0x72,0x69,0x61,0x6c])&&(_0x3d421c=_0x484068(_0x26a695([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x16fbd6()):_0x26a695([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x26a695([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x26a695([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4435ef){return _0x26a695([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x56ceea(){const _0x315d72=[_0x26a695([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x26a695([0x74,0x72,0x69,0x61,0x6c])][_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18d1a9[_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2a1311/0x3e8:0xe10*_0x378e80;return _0x18d1a9[_0x26a695([0x65,0x78,0x70])]<_0x315d72;}function _0x1b9ed1(){const _0x5902e6=_0x18d1a9[_0x26a695([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5902e6)return!0x1;if(_0x5902e6[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26a695([0x2a])))return!0x0;if(_0x5902e6[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26a695([0x43,0x4d,0x54])))return!0x0;if(_0x5902e6[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26a695([0x52,0x43,0x4d,0x54]))){if(_0x5a4435())return!0x0;if(_0x1bb868()||_0x1de12d())return!0x0;}return!0x1;}function _0x51138a(){const _0x30dd35=_0x18d1a9[_0x26a695([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x30dd35||0x0==_0x30dd35[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x473c3a}=new URL(window[_0x26a695([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x30dd35[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x473c3a))return!0x0;const _0x169203=_0x473c3a[_0x26a695([0x73,0x70,0x6c,0x69,0x74])](_0x26a695([0x2e]));return _0x30dd35[_0x26a695([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d98e4=>_0x2d98e4[_0x26a695([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26a695([0x2a])))[_0x26a695([0x6d,0x61,0x70])](_0x436b1d=>_0x436b1d[_0x26a695([0x73,0x70,0x6c,0x69,0x74])](_0x26a695([0x2e])))[_0x26a695([0x73,0x6f,0x6d,0x65])](_0x3218fc=>_0x169203[_0x26a695([0x65,0x76,0x65,0x72,0x79])]((_0x2264fa,_0x347741)=>_0x3218fc[_0x347741]===_0x2264fa||_0x3218fc[_0x347741]===_0x26a695([0x2a])));}function _0x16fbd6(){return _0x3d421c&&_0x106bae?new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x396ab2,_0x398cbb)=>{_0x3d421c[_0x26a695([0x74,0x68,0x65,0x6e])](_0x396ab2,_0x398cbb),_0x106bae[_0x26a695([0x74,0x68,0x65,0x6e])](_0x533f94=>{_0x533f94!=_0x26a695([0x56,0x61,0x6c,0x69,0x64])&&_0x396ab2(_0x533f94);},_0x398cbb);}):_0x3d421c||_0x106bae||_0x26a695([0x56,0x61,0x6c,0x69,0x64]);}}function _0xb38a32(_0x470bcb,_0x58e39c){return new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x437f9e=>{if(_0x9b4d1e())return _0x437f9e(_0x26a695([0x56,0x61,0x6c,0x69,0x64]));_0x3d5b92(),_0x4a757f[_0x26a695([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x26a695([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2128a1=!0x1;const _0x402fa6=_0x23944b();function _0x1ff37e(_0x3bc401){return!!_0x3bc401&&(typeof _0x3bc401===_0x26a695([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3bc401===_0x26a695([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3bc401[_0x26a695([0x74,0x68,0x65,0x6e])]===_0x26a695([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3bc401[_0x26a695([0x63,0x61,0x74,0x63,0x68])]===_0x26a695([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x6afb4c(_0x27c5e5){_0x40ce43(_0x27c5e5)[_0x26a695([0x74,0x68,0x65,0x6e])](_0x3f4cc9=>{if(!_0x3f4cc9||_0x3f4cc9[_0x26a695([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x26a695([0x6f,0x6b]))return _0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x53dc81(_0x10ba43(_0x402fa6+_0x58e39c))!=_0x3f4cc9[_0x26a695([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x26a695([0x56,0x61,0x6c,0x69,0x64]);})[_0x26a695([0x74,0x68,0x65,0x6e])](_0x2c37f7=>(_0xd67601(),_0x2c37f7),()=>{const _0x5f0cc6=_0xda1bff();return null==_0x5f0cc6?(_0xd67601(),_0x26a695([0x56,0x61,0x6c,0x69,0x64])):_0x26a695(_0x2a1311-_0x5f0cc6>(0x31f28d9a^_0x3ec87d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x26a695([0x74,0x68,0x65,0x6e])](_0x437f9e)[_0x26a695([0x63,0x61,0x74,0x63,0x68])](()=>{_0x437f9e(_0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5e453f=0x15c8e71a^_0x3ec87d;function _0xd67601(){const _0x2f48df=_0x26a695([0x6c,0x6c,0x63,0x74,0x2d])+_0x53dc81(_0x10ba43(_0x470bcb)),_0x2a6631=_0x23011a(_0x53dc81(window[_0x26a695([0x4d,0x61,0x74,0x68])][_0x26a695([0x63,0x65,0x69,0x6c])](_0x2a1311/_0x5e453f)));window[_0x26a695([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26a695([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f48df,_0x2a6631);}function _0xda1bff(){const _0x3e1f29=_0x26a695([0x6c,0x6c,0x63,0x74,0x2d])+_0x53dc81(_0x10ba43(_0x470bcb)),_0x75208d=window[_0x26a695([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26a695([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3e1f29);return _0x75208d?window[_0x26a695([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23011a(_0x75208d),0x10)*_0x5e453f:null;}function _0x40ce43(_0x37e703){return new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3b8f93,_0xbd6770)=>{_0x37e703[_0x26a695([0x74,0x68,0x65,0x6e])](_0x3b8f93,_0xbd6770),window[_0x26a695([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xbd6770,0x15ffdd5a^_0x3ec87d);});}}_0x4a757f[_0x26a695([0x6f,0x6e])](_0x26a695([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x153c31,_0x59bfb4)=>{if(_0x59bfb4[0x0]!=_0x470bcb)return _0x437f9e(_0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x59bfb4[0x1]={..._0x59bfb4[0x1],[_0x26a695([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x402fa6};},{[_0x26a695([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26a695([0x68,0x69,0x67,0x68])}),_0x4a757f[_0x26a695([0x6f,0x6e])](_0x26a695([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2478ee=>{_0x1ff37e(_0x2478ee[_0x26a695([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2128a1=!0x0,_0x6afb4c(_0x2478ee[_0x26a695([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x26a695([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26a695([0x6c,0x6f,0x77])}),_0x38b3d1[_0x26a695([0x74,0x68,0x65,0x6e])](()=>{_0x2128a1||_0x437f9e(_0x26a695([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x9b4d1e(){return _0x4a757f[_0x26a695([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26a695([0x76,0x69,0x65,0x77])][_0x26a695([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x26a695([0x61,0x75,0x74,0x6f]);}function _0x3d5b92(){_0x4a757f[_0x26a695([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26a695([0x76,0x69,0x65,0x77])][_0x26a695([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x26a695([0x61,0x75,0x74,0x6f]);}}function _0x484068(_0x12f4cb){const _0x2e11fb=[new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x417d66=>setTimeout(_0x417d66,0x15f73756^_0x3ec87d)),_0x38b3d1[_0x26a695([0x74,0x68,0x65,0x6e])](()=>new window[(_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40de53=>{let _0x540308=0x0;_0x4a757f[_0x26a695([0x6d,0x6f,0x64,0x65,0x6c])][_0x26a695([0x6f,0x6e])](_0x26a695([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5b6053,_0x2bf88f)=>{_0x2bf88f[0x0][_0x26a695([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x540308++,_0x540308==(0x15fe0862^_0x3ec87d)&&(_0x40de53(),_0x5b6053[_0x26a695([0x6f,0x66,0x66])]());});}))];return window[_0x26a695([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x26a695([0x72,0x61,0x63,0x65])](_0x2e11fb)[_0x26a695([0x74,0x68,0x65,0x6e])](()=>_0x12f4cb);}async function _0x33f397(){await _0x38b3d1,_0x4a757f[_0x26a695([0x6d,0x6f,0x64,0x65,0x6c])][_0x26a695([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x9cbc13,_0x4a757f[_0x26a695([0x6d,0x6f,0x64,0x65,0x6c])][_0x26a695([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x9cbc13,_0x4a757f[_0x26a695([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x26a695([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5a4435(){return _0x4ec926(_0x26a695([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5e899(_0x26a695([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x26a695([0x73,0x74,0x61,0x74,0x65])]==_0x26a695([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1bb868(){return _0x4ec926(_0x26a695([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 _0x1de12d(){return _0x4ec926(_0x26a695([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xa8c08a(_0x935a91){const _0x29f1fe=_0x526ea3();_0x4a757f[_0x29f1fe]=_0x26a695([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x935a91,_0x935a91!=_0x26a695([0x56,0x61,0x6c,0x69,0x64])&&_0x33f397();}function _0x526ea3(){const _0x58bd75=window[_0x26a695([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x26a695([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x26a695([0x6e,0x6f,0x77])]())[_0x26a695([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x26a695([0x2e]),'');let _0x11b063=_0x26a695([0x73]);for(let _0x55d390=0x0;_0x55d390<_0x58bd75[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x55d390+=0x2){let _0x155c14=window[_0x26a695([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58bd75[_0x26a695([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x55d390,_0x55d390+0x2));_0x155c14>=_0x3eaeb5[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x155c14-=_0x3eaeb5[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x11b063+=_0x3eaeb5[_0x155c14];}return _0x11b063;}function _0x29342a(){const _0x2e6440=_0x5131a2[_0x26a695([0x73,0x70,0x6c,0x69,0x74])](_0x26a695([0x2e]));if(0x3!=_0x2e6440[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3efac7(_0x2e6440[0x1]);function _0x3efac7(_0x40ba00){const _0x121945=_0x2f00b4(_0x40ba00);return _0x121945&&_0x37d61c()?_0x121945:null;function _0x37d61c(){const _0x521237=_0x121945[_0x26a695([0x6a,0x74,0x69])],_0x355d34=window[_0x26a695([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x521237[_0x26a695([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x521237[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5dd78b={..._0x121945,[_0x26a695([0x6a,0x74,0x69])]:_0x521237[_0x26a695([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x521237[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5dd78b[_0x26a695([0x76,0x63])],_0x10ba43(_0x5dd78b)==_0x355d34;}}}async function _0x37e772(){let _0x4284cf=!0x0;try{const _0x550b4a=_0x5131a2[_0x26a695([0x73,0x70,0x6c,0x69,0x74])](_0x26a695([0x2e])),[_0x4e6c4a,_0x36a3f7,_0x7ac50b]=_0x550b4a;return _0x25a6e4(_0x4e6c4a),await _0x69a009(_0x4e6c4a,_0x36a3f7,_0x7ac50b),_0x4284cf;}catch(_0x34b693){return!0x1;}function _0x25a6e4(_0x9b97ef){const _0x4835c1=_0x2f00b4(_0x9b97ef);_0x4835c1&&_0x4835c1[_0x26a695([0x61,0x6c,0x67])]==_0x26a695([0x45,0x53,0x32,0x35,0x36])||(_0x4284cf=!0x1);}async function _0x69a009(_0x4d58ca,_0xaa4635,_0x201ec3){const _0x5d5b72=window[_0x26a695([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x26a695([0x66,0x72,0x6f,0x6d])](_0x29d48f(_0x201ec3),_0x2ac804=>_0x2ac804[_0x26a695([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3b03e3=new window[(_0x26a695([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x26a695([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4d58ca+_0x26a695([0x2e])+_0xaa4635),_0xc2c809=window[_0x26a695([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x26a695([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc2c809)return;const _0x1e7e3e=await _0xc2c809[_0x26a695([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x26a695([0x6a,0x77,0x6b]),_0x264c35,{[_0x26a695([0x6e,0x61,0x6d,0x65])]:_0x26a695([0x45,0x43,0x44,0x53,0x41]),[_0x26a695([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x26a695([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x26a695([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc2c809[_0x26a695([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x26a695([0x6e,0x61,0x6d,0x65])]:_0x26a695([0x45,0x43,0x44,0x53,0x41]),[_0x26a695([0x68,0x61,0x73,0x68])]:{[_0x26a695([0x6e,0x61,0x6d,0x65])]:_0x26a695([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1e7e3e,_0x5d5b72,_0x3b03e3)||(_0x4284cf=!0x1);}}function _0x2f00b4(_0x517911){return _0x517911[_0x26a695([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x26a695([0x65,0x79]))?JSON[_0x26a695([0x70,0x61,0x72,0x73,0x65])](_0x29d48f(_0x517911)):null;}function _0x29d48f(_0x362eef){return window[_0x26a695([0x61,0x74,0x6f,0x62])](_0x362eef[_0x26a695([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x26a695([0x2b]))[_0x26a695([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x26a695([0x2f])));}function _0x10ba43(_0x92de7c){let _0x5dc984=0x1505;function _0x54059e(_0x52568c){for(let _0x4d5ec5=0x0;_0x4d5ec5<_0x52568c[_0x26a695([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d5ec5++){const _0x4ecaf8=_0x52568c[_0x26a695([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d5ec5);_0x5dc984=(_0x5dc984<<0x5)+_0x5dc984+_0x4ecaf8,_0x5dc984&=_0x5dc984;}}function _0x23c561(_0x94f634){Array[_0x26a695([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x94f634)?_0x94f634[_0x26a695([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x23c561):_0x94f634&&typeof _0x94f634==_0x26a695([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x26a695([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x94f634)[_0x26a695([0x73,0x6f,0x72,0x74])]()[_0x26a695([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x34e9b6,_0xcd2280])=>{_0x54059e(_0x34e9b6),_0x23c561(_0xcd2280);}):_0x54059e(window[_0x26a695([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x94f634));}return _0x23c561(_0x92de7c),_0x5dc984>>>0x0;}function _0x53dc81(_0x5a4ed){return _0x5a4ed[_0x26a695([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x26a695([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x26a695([0x30]));}function _0x23011a(_0x35515a){return _0x35515a[_0x26a695([0x73,0x70,0x6c,0x69,0x74])]('')[_0x26a695([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x26a695([0x6a,0x6f,0x69,0x6e])]('');}function _0x4ec926(_0x1fe683){return _0x4a757f[_0x26a695([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x26a695([0x68,0x61,0x73])](_0x1fe683);}function _0x5e899(_0x5c7ded){return _0x4a757f[_0x26a695([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x26a695([0x67,0x65,0x74])](_0x5c7ded);}function _0x9cbc13(){}function _0x26a695(_0x4e709a){return _0x4e709a['map'](_0x117d2c=>String['fromCharCode'](_0x117d2c))['join']('');}_0xa8c08a(await _0x2f4dda());}(this);}['destroy'](){const _0xbeebe0=this['editor']['plugins']['get'](o),_0x360744=this['editor']['config']['get']('collaboration.channelId');for(const _0x254424 of _0xbeebe0['getCommentThreads']({'channelId':_0x360744}))_0xbeebe0['_detachCommentThread'](_0x254424['id']),_0xbeebe0['_threads']['delete'](_0x254424['id']);super['destroy']();}['hasMarkerForId'](_0x18d0bc){return this['getAllMarkersForId'](_0x18d0bc)['length']>0x0;}['getAllMarkersForId'](_0xf05cd0){const _0x1bb556=[];for(const _0x460a77 of this['editor']['model']['markers'])_0x460a77['name']['startsWith']('comment:'+_0xf05cd0)&&_0x1bb556['push'](_0x460a77);return _0x1bb556;}['scrollToThreadMarker'](_0x43da4e){const _0x7e7958=this['_getTargetForId'](_0x43da4e);_0x7e7958&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x43da4e&&rt({'target':_0x7e7958[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x38d5a9){this['editor']['model']['change'](()=>{for(const _0x27cbbd of this['getAllMarkersForId'](_0x38d5a9))this['editor']['editing']['reconvertMarker'](_0x27cbbd);});}['_attachArchivedThread'](_0x10d630){const _0x3fcb5a=this['editor']['plugins']['get'](o),_0x54a7a0=this['editor']['plugins']['get'](P),_0x259d7a=_0x3fcb5a['getCommentThread'](_0x10d630);if(!_0x259d7a['isAttached']){const _0x2918e2=_0x259d7a['attachTo'](()=>this['_getTargetForId'](_0x259d7a['id']));_0x54a7a0['registerAnnotation'](_0x2918e2),_0x259d7a['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x57b8ca=this['editor'],_0x9edd11=_0x57b8ca['plugins']['get'](it);_0x57b8ca['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3905c3,_0x159e6d)=>{const {id:_0x181410}=er(_0x3905c3['markerName']),_0x5752b8=_0x57b8ca['plugins']['get'](o)['getCommentThread'](_0x181410),_0x18f80c=this['activeMarker']&&er(this['activeMarker'])['id']===_0x181410;let _0x2af2b6;if(_0x5752b8&&_0x5752b8['isResolved']&&!_0x18f80c&&_0x3905c3['item'])return _0x159e6d['consumable']['consume'](_0x3905c3['item'],'addMarker:'+_0x3905c3['markerName']),_0x159e6d['consumable']['consume'](_0x3905c3['item'],'removeMarker:'+_0x3905c3['markerName']),null;const _0x275d0e=['ck-comment-marker'];return _0x18f80c&&_0x275d0e['push']('ck-comment-marker--active'),_0x2af2b6=_0x5752b8?.['length']?_0x5752b8['comments']['first']['author']['id']:_0x9edd11['me']['id'],{'classes':_0x275d0e,'attributes':{'data-comment':_0x181410,'data-author-id':_0x2af2b6}};}}),_0x57b8ca['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x196d98,{options:_0x17b185})=>{if(_0x17b185['showCommentHighlights'])return null;const _0x40df45=_0x57b8ca['plugins']['get'](o),_0x51bd8a=_0x57b8ca['model']['markers']['get'](_0x196d98),{id:_0x2bdc89,part:_0x3c4db5}=er(_0x196d98);return _0x51bd8a&&!_0x51bd8a['affectsData']||_0x17b185['ignoreResolvedComments']&&_0x40df45['getCommentThread'](_0x2bdc89)?.['isResolved']?null:{'group':'comment','name':_0x3c4db5?_0x2bdc89+':'+_0x3c4db5:_0x2bdc89};}}),_0x57b8ca['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5b8a54,{writer:_0xb3110d})=>_0xb3110d['createElement']('$marker',{'data-name':'comment:'+_0x5b8a54['getAttribute']('id')})}),_0x57b8ca['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2a3ec9=this['editor'],_0x3d3701=_0x2a3ec9['plugins']['get'](o),_0x3e594c=new Set(),_0x3998ac=new Set();_0x2a3ec9['model']['document']['registerPostFixer'](_0x2f7ac1=>{let _0x555da1=!0x1;for(const {name:_0x3036cc,data:_0x145c5b}of _0x2a3ec9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x43668c,id:_0x525e41}=er(_0x3036cc);let _0x31fd3f=_0x145c5b['newRange'];if('comment'!==_0x43668c||!_0x31fd3f)continue;const _0x52d610='$graveyard'===_0x31fd3f['root']['rootName'];_0x52d610||(_0x31fd3f=dt(_0x31fd3f,_0x2a3ec9['model']),!_0x31fd3f||_0x31fd3f['isCollapsed']||!_0x145c5b['newRange']||_0x31fd3f['isEqual'](_0x145c5b['newRange']))?_0x2a3ec9['model']['hasContent'](_0x31fd3f)&&!_0x52d610?this['isThreadsLoadingPaused']?_0x3e594c['add'](_0x3036cc):this['_handleThreadMarker'](_0x3036cc,_0x525e41):(_0x3998ac['add'](_0x3036cc),_0x3e594c['delete'](_0x3036cc),_0x2f7ac1['removeMarker'](_0x3036cc),_0x555da1=!0x0):(_0x2f7ac1['updateMarker'](_0x3036cc,{'range':_0x31fd3f}),_0x555da1=!0x0);}return _0x555da1;}),this['on']('change:isThreadsLoadingPaused',(_0xc335a8,_0xc2e55d,_0x205e4c)=>{if(!_0x205e4c&&_0x3e594c['size'])for(const _0x3d8ed4 of _0x3e594c){const {id:_0x57933d}=er(_0x3d8ed4);_0x3e594c['delete'](_0x3d8ed4),_0x2a3ec9['model']['markers']['get'](_0x3d8ed4)&&this['_handleThreadMarker'](_0x3d8ed4,_0x57933d);}}),this['listenTo'](_0x2a3ec9['model']['document'],'change',()=>{for(const {name:_0xe8c4dd,data:{newRange:_0x4100f4}}of _0x2a3ec9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d64c0,id:_0x12370d}=er(_0xe8c4dd);if('comment'!==_0x3d64c0)continue;const _0x9d0bfa=_0x3d3701['getCommentThread'](_0x12370d),_0x3d7e62=this['hasMarkerForId'](_0x12370d);_0x9d0bfa&&(!_0x9d0bfa['_hasTargetInContent']&&_0x4100f4&&_0x2a3ec9['editing']['view']['once']('render',()=>{const _0x866e09=_0x2a3ec9['plugins']['get'](O),_0x54276e=_0x3d3701['_threadToController']['get'](_0x9d0bfa)['view'];_0x866e09['getByInnerView'](_0x54276e)['refreshVisibility']();},{'priority':'low'}),_0x9d0bfa['_hasTargetInContent']=_0x3d7e62||!!_0x4100f4),_0x4100f4||(_0x3998ac['add'](_0xe8c4dd),_0x3e594c['delete'](_0xe8c4dd));}for(const _0x328d87 of _0x3998ac){const {id:_0x53b181}=er(_0x328d87),_0x195d5b=_0x3d3701['getCommentThread'](_0x53b181);if(_0x3e594c['delete'](_0x328d87),!_0x195d5b)continue;const _0xc9fdb0=this['hasMarkerForId'](_0x53b181);_0xc9fdb0||_0x195d5b['isSubmitted']?_0xc9fdb0||_0x195d5b['unlinkedAt']||_0x195d5b['setUnlinkedAt'](new Date()):_0x195d5b['remove']();}_0x3998ac['clear']();});}['_handleInitialThreads'](_0x3358f1){_0x3358f1['forEach'](_0x4f00db=>{_0x4f00db['unlinkedAt']&&this['_attachArchivedThread'](_0x4f00db['id']);});}['_getTargetForId'](_0xe05ce2){const _0x490591=this['editor'],_0x22c0a7=this['getAllMarkersForId'](_0xe05ce2);return et(_0x490591['editing'],_0x22c0a7);}['_getTextContext'](_0x44942e){const _0x29ef3d=this['getAllMarkersForId'](_0x44942e);let _0x78d7f8='',_0x50b626=!0x1;for(const _0x30619a of _0x29ef3d){const _0x334685=_0x30619a['getRange']();for(const _0x302257 of Array['from'](_0x334685['getItems']()))_0x302257['is']('$textProxy')?(_0x78d7f8&&_0x50b626&&(_0x78d7f8+='\x20',_0x50b626=!0x1),_0x78d7f8+=_0x302257['data']):_0x50b626=!0x0;_0x50b626=!0x0;}return _0x78d7f8['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x9387bf,_0x2aeeec){const _0x53d33b=this['editor'],_0x30f75b=_0x53d33b['plugins']['get'](o);let _0x293fe0=_0x30f75b['getCommentThread'](_0x2aeeec);const _0x5d151b=_0x53d33b['config']['get']('collaboration.channelId'),_0x2f2623=_0x53d33b['plugins']['get'](P);if(_0x293fe0&&(_0x293fe0['unlinkedAt']&&_0x293fe0['setUnlinkedAt'](null),_0x293fe0['isAttached']))return _0x293fe0;return!this['getAllMarkersForId'](_0x2aeeec)[0x0]['managedUsingOperations']?_0x53d33b['editing']['view']['once']('render',()=>{if(_0x30f75b['getCommentThread'](_0x2aeeec))return;const _0x2d4718=_0x53d33b['plugins']['get'](O);_0x293fe0=_0x30f75b['openNewCommentThread']({'channelId':_0x5d151b,'threadId':_0x2aeeec,'target':()=>this['_getTargetForId'](_0x2aeeec),'context':{'type':'text','value':this['_getTextContext'](_0x2aeeec)}});const _0x39f82a=_0x30f75b['_threadToController']['get'](_0x293fe0)['view'],_0x1ff068=_0x2d4718['getByInnerView'](_0x39f82a);_0x1ff068&&_0x2f2623['registerAnnotation'](_0x1ff068);},{'priority':'low'}):_0x30f75b['fetchCommentThread']({'channelId':_0x5d151b,'threadId':_0x2aeeec})['then'](_0x123798=>{if('destroyed'!==_0x53d33b['state']){if(_0x293fe0=_0x123798,_0x293fe0&&!_0x293fe0['isAttached']){const _0x1d7e14=_0x293fe0['attachTo'](()=>this['_getTargetForId'](_0x2aeeec));_0x2f2623['registerAnnotation'](_0x1d7e14),_0x293fe0['isResolved']&&this['_reconvertMarkers'](_0x2aeeec);}else{if(!_0x293fe0){const _0x22ef93=this['getAllMarkersForId'](_0x2aeeec);_0x53d33b['model']['change'](_0x23c0a7=>{for(const _0x4865a2 of _0x22ef93)_0x23c0a7['removeMarker'](_0x4865a2);});}}}}),_0x293fe0;}['_handleThreadMarker'](_0x3dbca3,_0x288b68){const _0x497193=this['_attachMarkerToThread'](_0x3dbca3,_0x288b68);_0x497193&&!_0x497193['context']&&_0x497193['setContext']({'type':'text','value':this['_getTextContext'](_0x288b68)});}['_initAriaMarkerChangeAnnouncements'](){const _0x42aeac=this['editor'];ot(_0x42aeac['model'],({left:_0x16b00d,entered:_0x47c2d0})=>{for(const _0x576950 of _0x16b00d)if(mt(_0x576950)){_0x42aeac['ui']['ariaLiveAnnouncer']['announce'](E(_0x42aeac['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1bac8f of _0x47c2d0)if(mt(_0x1bac8f)){_0x42aeac['ui']['ariaLiveAnnouncer']['announce'](E(_0x42aeac['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x4c3cf2)));break;}});}}function ft(_0x512560,_0xe3deed){return _0xe3deed?_0x512560+':'+_0xe3deed:_0x512560;}function er(_0x3b3aee){const _0x2882df=_0x3b3aee['split'](':');return{'group':_0x2882df[0x0],'id':_0x2882df[0x1],'part':_0x2882df[0x2]};}function dt(_0x5e0e9b,_0x38bde0){const _0x3b7e70=_0x38bde0['schema'],_0x514e45=_0x38bde0['createRange'](_0x5e0e9b['start']);for(const _0x1ad5ec of _0x5e0e9b['getWalker']()){const {type:_0x10449d,item:_0x2823dc,nextPosition:_0x4ba2a9}=_0x1ad5ec;if('text'===_0x10449d||_0x3b7e70['isObject'](_0x2823dc)){const _0x383bd7=_0x38bde0['createPositionBefore'](_0x2823dc);_0x514e45['isCollapsed']&&(_0x514e45['start']=_0x383bd7),_0x514e45['end']=_0x4ba2a9;}}return _0x514e45;}function mt(_0x2dd2f4){return'comment'===er(_0x2dd2f4['name'])['group'];}class i extends _0x3e8287{['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 _0x5ad7e3=this['editor'],_0x39596b=_0x5ad7e3['plugins']['get'](o),_0x4c43b6=_0x5ad7e3['plugins']['get'](r),_0x3b5d8a=_0x5ad7e3['plugins']['get'](O),_0x5be196=_0x5ad7e3['plugins']['get'](P);_0x5ad7e3['ui']['componentFactory']['add']('comment',()=>{const _0x5f3c39=this['_createUIButton'](_0x25ab89);return _0x5f3c39['tooltip']=!0x0,_0x5f3c39;}),_0x5ad7e3['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x508e0d)),_0x5be196['addSourceCollector'](()=>{const _0x402a70=[];for(const [_0xc7f6cb,_0x4e5705]of _0x39596b['_threadToController']){const _0x1fe599=_0x4c43b6['getAllMarkersForId'](_0xc7f6cb['id']),_0x4ea2e4=_0x1fe599['map'](_0x4d6455=>_0x4d6455['getRange']());_0x1fe599['length']>0x0&&_0x402a70['push']([_0x4e5705['view'],_0x4ea2e4]);}return _0x402a70;}),this['listenTo'](_0x3b5d8a,'change:activeAnnotations',(_0x540afb,_0x3f578e,_0x18bd7e)=>{const _0x4fb5bb=Array['from'](_0x18bd7e)['map'](_0x5ccb1e=>_0x5ccb1e['innerView'])['find'](_0x3e604c=>_0x39596b['_viewToController']['has'](_0x3e604c));if(!_0x4fb5bb)return void(_0x4c43b6['activeMarker']=null);const _0x5275fa=_0x39596b['_viewToController']['get'](_0x4fb5bb)['model']['id'],_0x292b1a='comment:'+_0x5275fa;_0x5275fa&&_0x4c43b6['hasMarkerForId'](_0x5275fa)?_0x4c43b6['activeMarker']=_0x292b1a:_0x4c43b6['activeMarker']&&(_0x4c43b6['activeMarker']=null);}),this['listenTo'](_0x39596b,'removeCommentThread',(_0x32481a,{threadId:_0x4345bb,isFromAdapter:_0x2661c0})=>{!_0x2661c0&&_0x5ad7e3['ui']['focusTracker']['isFocused']&&_0x4c43b6['hasMarkerForId'](_0x4345bb)&&_0x5ad7e3['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x39596b,'addComment',(_0x1b071e,{threadId:_0x34f388,isFromAdapter:_0x4f646e})=>{if(_0x4f646e||!_0x4c43b6['hasMarkerForId'](_0x34f388)||!_0x39596b['hasCommentThread'](_0x34f388))return;0x1===_0x39596b['getCommentThread'](_0x34f388)['length']&&(_0x5ad7e3['editing']['view']['focus'](),_0x1b071e['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x23488e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x354f19;for(const _0x351922 in _0x23488e){const _0x3cecef=_0x351922,_0x4f1ec3=_0x23488e[_0x3cecef];if('commentsLicenseKeyValid'==_0x4f1ec3||'commentsLicenseKeyInvalid'==_0x4f1ec3||'commentsLicenseKeyExpired'==_0x4f1ec3||'commentsLicenseKeyDomainLimit'==_0x4f1ec3||'commentsLicenseKeyNotAllowed'==_0x4f1ec3||'commentsLicenseKeyEvaluationLimit'==_0x4f1ec3||'commentsLicenseKeyTrialLimit'==_0x4f1ec3||'commentsLicenseKeyUsageLimit'==_0x4f1ec3){delete _0x23488e[_0x3cecef],_0x354f19=_0x4f1ec3,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x354f19&&_0x23488e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x354f19&&_0x23488e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x354f19&&_0x23488e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x354f19&&_0x23488e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x354f19&&_0x23488e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x354f19&&_0x23488e['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x354f19&&_0x23488e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x422a5a){const _0x43fd50=this['editor'],_0x31d996=new _0x422a5a(_0x43fd50['locale']),_0x205bcd=_0x43fd50['commands']['get']('addCommentThread');return _0x31d996['set']({'label':E(_0x43fd50['locale'],'Comment'),'icon':_0x35c54a}),_0x31d996['bind']('isEnabled')['to'](_0x205bcd),this['listenTo'](_0x31d996,'execute',()=>{_0x205bcd['execute']();}),_0x31d996;}}class s extends _0x3e8287{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x16929c){super(_0x16929c),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2ac349,_0x5702ee,_0x43aca7)=>{_0x43aca7?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x12bce5,_0x10b6ff]of this['editor']['commands'])_0x10b6ff['affectsData']&&'addCommentThread'!==_0x12bce5&&_0x10b6ff['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 _0x5641ad=this['editor']['editing']['view']['document'];this['listenTo'](_0x5641ad,'cut',_0x240659=>_0x240659['stop'](),{'priority':'highest'}),this['listenTo'](_0x5641ad,'clipboardInput',_0x3a17ad=>_0x3a17ad['stop'](),{'priority':'highest'}),this['listenTo'](_0x5641ad,'delete',_0x41bd9d=>_0x41bd9d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4442fb,_0x1f66cf]of this['editor']['commands'])_0x1f66cf['affectsData']&&'addCommentThread'!==_0x4442fb&&_0x1f66cf['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 _0x149248{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x573616){super(_0x573616),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x59c579=this['context']['plugins']['get'](O);this['listenTo'](_0x59c579,'_activateAnnotation',(_0x55ead6,_0x8a1246)=>{for(const _0x520558 of this['activeUIs']){const _0x151b19=this['_uis']['get'](_0x520558);(0x0,this['uisData']['get'](_0x520558)['filter'])(_0x8a1246)&&_0x151b19['setActiveAnnotation'](_0x8a1246);}}),this['listenTo'](_0x59c579,'_deactivateAllAnnotations',()=>{for(const _0x5035c7 of this['activeUIs']){this['_uis']['get'](_0x5035c7)['setActiveAnnotation'](null);}}),this['listenTo'](_0x59c579['_visibleAnnotations'],'add',(_0x4f987d,_0x25ce99)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x25ce99);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1c536f){return this['activeUIs']['has'](_0x1c536f);}['activate'](_0x833c33,_0x2fd706=this['defaultFilter']){const _0x1a5100=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x833c33))throw new _0x302412('annotationsuis-missing-ui',this,{'uiName':_0x833c33});this['isActive'](_0x833c33)&&this['deactivate'](_0x833c33),this['activeUIs']['add'](_0x833c33);const _0x516821=new _();!function({source:_0x36d9c5,target:_0x1c830e,filter:_0x4506ce}){for(const _0x17ddf0 of _0x36d9c5)_0x4506ce(_0x17ddf0)&&_0x1c830e['add'](_0x17ddf0);_0x1c830e['listenTo'](_0x36d9c5,'add',(_0x5a5ad3,_0x2bb261)=>{_0x4506ce(_0x2bb261)&&_0x1c830e['add'](_0x2bb261);}),_0x1c830e['listenTo'](_0x36d9c5,'remove',(_0x60c910,_0x2df722)=>{_0x1c830e['has'](_0x2df722)&&_0x1c830e['remove'](_0x2df722);});}({'source':_0x1a5100['_visibleAnnotations'],'target':_0x516821,'filter':_0x2fd706}),this['uisData']['set'](_0x833c33,{'collection':_0x516821,'filter':_0x2fd706});const _0x571bb2=this['_uis']['get'](_0x833c33);_0x571bb2['attach'](_0x516821),this['listenTo'](_0x571bb2,'change:activeAnnotation',(_0x3f42a5,_0x4912c7,_0x1d156c,_0x341a28)=>{_0x341a28&&_0x1a5100['_removeActiveAnnotation'](_0x341a28),_0x1d156c&&_0x1a5100['_addActiveAnnotation'](_0x1d156c);});}['deactivate'](_0x2f580d){if(this['activeUIs']['delete'](_0x2f580d),!this['_uis']['has'](_0x2f580d))throw new _0x302412('annotationsuis-missing-ui',this,{'uiName':_0x2f580d});const _0x24060f=this['_uis']['get'](_0x2f580d);_0x24060f['detach'](),this['stopListening'](_0x24060f),this['uisData']['get'](_0x2f580d)['collection']['destroy'](),this['uisData']['delete'](_0x2f580d);}['switchTo'](_0x59d745){if(!this['_uis']['has'](_0x59d745))throw new _0x302412('annotationsuis-missing-ui',this,{'uiName':_0x59d745});const _0x3223a6=this['context']['plugins']['get'](O),_0x47df0e=Array['from'](_0x3223a6['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x59d745);const _0x12f34a=this['_uis']['get'](_0x59d745);_0x12f34a['setActiveAnnotation'](_0x47df0e),_0x12f34a['_setSelectedAnnotations']&&_0x47df0e&&_0x12f34a['_setSelectedAnnotations']([_0x47df0e]);}['deactivateAll'](){for(const _0x24f26e of this['activeUIs'])this['deactivate'](_0x24f26e);}['register'](_0x476fdd,_0x20bb51){if(this['_uis']['has'](_0x476fdd))throw new _0x302412('annotationsuis-register-already-registered');if('function'!=typeof _0x20bb51['attach']||'function'!=typeof _0x20bb51['detach']||'function'!=typeof _0x20bb51['setActiveAnnotation'])throw new _0x302412('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x476fdd,_0x20bb51);}['refilterAnnotations'](){const _0xce10c8=this['context']['plugins']['get'](O)['collection'],_0x54389d=new Map(),_0x3b4255=Array['from'](this['activeUIs']);for(const _0x5152e1 of this['activeUIs']){const _0x4c06f4=this['uisData']['get'](_0x5152e1)['collection'];for(const _0x32c5a8 of _0x4c06f4)_0x54389d['set'](_0x32c5a8,_0x5152e1);}for(const _0x12c39f of _0xce10c8){const _0xe288c5=_0x54389d['get'](_0x12c39f);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x12c39f);const _0x5e93c7=_0x3b4255['find'](_0x6f91f7=>this['uisData']['get'](_0x6f91f7)['filter'](_0x12c39f));_0xe288c5!==_0x5e93c7&&(_0xe288c5&&this['uisData']['get'](_0xe288c5)['collection']['remove'](_0x12c39f),_0x5e93c7&&this['uisData']['get'](_0x5e93c7)['collection']['add'](_0x12c39f));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x146c97){const _0xf3c181=[];for(const _0x51caf6 of this['activeUIs']){(0x0,this['uisData']['get'](_0x51caf6)['filter'])(_0x146c97)&&_0xf3c181['push'](_0x51caf6);}if(_0xf3c181['length']>0x1)throw new _0x302412('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xf3c181,'annotationType':_0x146c97['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x510efe){super(_0x510efe);const _0x4feecc=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 _0x6d2edc(),this['focusCycler']=new _0x5bcd58({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4feecc['to']('class')],'style':{'minHeight':_0x4feecc['to']('minHeight',_0x4493b2=>'number'==typeof _0x4493b2?pi(_0x4493b2+0xa):null)},'dir':_0x510efe['uiLanguageDirection'],'role':'application','aria-label':E(_0x510efe,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x510efe,'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',_0x54bbb5=>{this['_updateItemPositionInFocusables'](_0x54bbb5['source']);}),this['list']['forEach'](_0x4451e5=>{this['focusTracker']['add'](_0x4451e5['element']),this['_updateItemPositionInFocusables'](_0x4451e5);}),this['list']['on']('change',(_0x19cce3,_0x9b161d)=>{for(const _0x2525ab of _0x9b161d['removed'])this['focusTracker']['remove'](_0x2525ab['element']),this['focusables']['remove'](_0x2525ab);for(const _0x1243e9 of _0x9b161d['added'])this['focusTracker']['add'](_0x1243e9['element']),this['_updateItemPositionInFocusables'](_0x1243e9);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4ceed4){const _0x4ecfc4=this['focusables']['getIndex'](_0x4ceed4);let _0x7d18e1,_0x1d90f7;for(const _0x17ff35 of this['focusables'])if(_0x4ceed4['top']<_0x17ff35['top']){_0x7d18e1=_0x17ff35;break;}if(_0x1d90f7=_0x7d18e1?this['focusables']['getIndex'](_0x7d18e1):this['focusables']['length'],-0x1!==_0x4ecfc4){if(_0x4ecfc4===_0x1d90f7-0x1)return;this['focusables']['remove'](_0x4ceed4),_0x1d90f7=_0x7d18e1?this['focusables']['getIndex'](_0x7d18e1):this['focusables']['length'];}this['focusables']['add'](_0x4ceed4,_0x1d90f7);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x10b94d){super(_0x10b94d),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x56b144,_0x4f3e3c)=>_0x56b144+_0x4f3e3c),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3ed338=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3ed338['to']('isAnimationDisabled',_0x5f2f1a=>_0x5f2f1a?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3ed338['to']('top',_0x322970=>Ht(_0x322970))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x36845e=this['element']['clientHeight'];_0x36845e&&(this['height']=_0x36845e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x149248{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4bf7df){super(_0x4bf7df),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 _0x157db1=this['context']['config']['get']('sidebar.container');_0x157db1&&this['setContainer'](_0x157db1);}['setContainer'](_0x4e4fd8){if(!y(_0x4e4fd8))throw new _0x302412('sidebar-setcontainer-invalid-element');this['container']=_0x4e4fd8;}['_attachToContainer']({viewClass:_0x4d2624='',spaceBetweenItems:_0x53940f=0x19}={}){if(!y(this['container']))throw new _0x302412('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4d2624,this['_spaceBetweenItems']=_0x53940f;}['rearrange']({removedAnnotation:_0x5c62cf,previousAnnotation:_0x2dee24,nextAnnotation:_0x2fea40}){const _0x164552=this['getSidebarItemView'](_0x5c62cf);this['view']['list']['remove'](_0x164552),this['_destroySidebarItemView'](_0x5c62cf),_0x2dee24&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2dee24)),_0x2fea40&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2fea40)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9f0322,activatedAnnotation:_0x54f327,disableAnimationOnActivatedAnnotation:_0x449b78}){if(this['_activeAnnotation']=_0x54f327,_0x9f0322){_0x9f0322['isActive']=!0x1;const _0xa3e40b=this['getSidebarItemView'](_0x9f0322);_0xa3e40b&&_0x449b78&&(_0xa3e40b['isAnimationDisabled']=!0x1);}if(_0x54f327){const _0x4ea387=this['getSidebarItemView'](_0x54f327);_0x4ea387&&(_0x54f327['isActive']=!0x0,_0x449b78&&(_0x4ea387['isAnimationDisabled']=!0x0,_0x4ea387['top']+=0x1),this['_alignToTargetRect'](_0x4ea387));}}['_detachFromContainer'](_0x16941d){if(this['view']['element']['remove'](),_0x16941d){for(const _0x2437ac of _0x16941d)this['_destroySidebarItemView'](_0x2437ac);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5aba46,_0x307a27){_0x307a27||(_0x307a27=_0x5aba46['view']);const _0x4684e4=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4684e4,_0x5aba46),this['_annotationToSidebarItemView']['set'](_0x5aba46,_0x4684e4),_0x4684e4['content']['add'](_0x307a27),this['listenTo'](_0x5aba46['view'],'change:targetRect',(_0x38c5f4,_0x554931,_0x31bbd4)=>{const _0x465fb0=this['_getTargetTop'](_0x5aba46,_0x31bbd4);_0x4684e4['_targetTop']!=_0x465fb0&&(_0x4684e4['_targetTop']=_0x465fb0,this['_setItemTop'](_0x4684e4,_0x465fb0));}),this['listenTo'](_0x4684e4,'change:top',()=>{this['_recalculate'](_0x4684e4,'top');}),this['listenTo'](_0x4684e4,'change:bottom',()=>{this['_recalculate'](_0x4684e4,'bottom');}),this['_alignToTargetRect'](_0x4684e4);const _0x1b7a15=this['_getItemBefore'](_0x4684e4);if(_0x1b7a15)this['_alignAfterItem'](_0x1b7a15,_0x4684e4)||this['_alignToTargetRect'](_0x4684e4);else this['_alignToTargetRect'](_0x4684e4);return this['_updateLastItem'](),this['view']['list']['add'](_0x4684e4),_0x4684e4;}['_alignForTopChange'](_0x20e4e4){if(!_0x20e4e4['content']['length'])return;const _0xaa409e=this['_getItemBefore'](_0x20e4e4);if(!_0xaa409e)return;const _0x297c53=this['_sidebarItemViewToAnnotation']['get'](_0xaa409e),_0x128411=this['_activeAnnotation'];_0x128411&&_0x128411===_0x297c53?this['_alignAfterItem'](_0xaa409e,_0x20e4e4):this['_alignBeforeItem'](_0x20e4e4,_0xaa409e);}['_alignForBottomChange'](_0x29ae6f){if(!_0x29ae6f['content']['length'])return;const _0x246ddf=this['_getItemAfter'](_0x29ae6f);if(!_0x246ddf)return;const _0x38074d=this['_sidebarItemViewToAnnotation']['get'](_0x246ddf),_0x31c048=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2cfc39=this['_activeAnnotation'];_0x2cfc39&&_0x2cfc39===_0x38074d&&_0x31c048?(this['_alignBeforeItem'](_0x246ddf,_0x29ae6f),this['_alignAfterItem'](_0x29ae6f,_0x246ddf)):_0x2cfc39&&_0x2cfc39===_0x38074d?this['_alignBeforeItem'](_0x246ddf,_0x29ae6f):this['_alignAfterItem'](_0x29ae6f,_0x246ddf);}['_recalculate'](_0x623bc4,_0x49e46a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x153a8f,changedProp:_0x4aa785}of this['_recalculateBuffer'])'top'===_0x4aa785?this['_alignForTopChange'](_0x153a8f):this['_alignForBottomChange'](_0x153a8f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x623bc4,'changedProp':_0x49e46a});}['getSidebarItemView'](_0x3e2be2){return this['_annotationToSidebarItemView']['get'](_0x3e2be2);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5350d0){const _0x9fd86=this['getSidebarItemView'](_0x5350d0);this['stopListening'](_0x9fd86),this['stopListening'](_0x5350d0['view']),_0x9fd86['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5350d0),this['_sidebarItemViewToAnnotation']['delete'](_0x9fd86);}['_createSidebarView'](){const _0x58ed28=new F(this['context']['locale']);return _0x58ed28['render'](),this['on']('change:_lastItem',(_0x35d975,_0x599413,_0x38c3a8,_0xe6e16d)=>{_0xe6e16d&&_0x58ed28['unbind']('minHeight'),_0x38c3a8?_0x58ed28['bind']('minHeight')['to'](_0x38c3a8,'bottom'):_0x58ed28['minHeight']=null;}),_0x58ed28;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2a9a4d){const _0x4014a4=this['_sidebarItemViewToAnnotation']['get'](_0x2a9a4d),_0x10b32a=_0x4014a4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4014a4)-0x1);return _0x10b32a&&this['getSidebarItemView'](_0x10b32a)||null;}['_getItemAfter'](_0x53c018){const _0x3a78af=this['_sidebarItemViewToAnnotation']['get'](_0x53c018),_0x43b17a=_0x3a78af&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3a78af)+0x1);return _0x43b17a&&this['getSidebarItemView'](_0x43b17a)||null;}['_alignBeforeItem'](_0x4376f9,_0x396757){_0x4376f9['updateHeight']();const _0x448179=R(_0x396757['bottom']+this['_spaceBetweenItems'],_0x4376f9['top']);return!!_0x448179&&(this['_setItemTop'](_0x396757,_0x396757['top']-_0x448179),!0x0);}['_alignAfterItem'](_0x549c5e,_0x10f9cc){_0x549c5e['updateHeight']();const _0x288cc7=R(_0x549c5e['bottom']+this['_spaceBetweenItems'],_0x10f9cc['top']);return!!_0x288cc7&&(this['_setItemTop'](_0x10f9cc,_0x10f9cc['top']+_0x288cc7,!0x1),!0x0);}['_alignToTargetRect'](_0x8edda0){const _0x54779f=this['_sidebarItemViewToAnnotation']['get'](_0x8edda0);if(!_0x54779f||!_0x54779f['target']||!_0x54779f['targetRect'])return;const _0x4290ba=this['_getTargetTop'](_0x54779f,_0x54779f['targetRect']);this['_setItemTop'](_0x8edda0,_0x4290ba);}['_getTargetTop'](_0x4ee171,_0x422179){if(null===_0x422179)return 0x0;if(_0x4ee171['target']instanceof _0x197d1d)return _0x422179['top'];{const _0x1006c8=new _0x197d1d(this['view']['element'])['top'];return _0x422179['top']-_0x1006c8;}}['_setItemTop'](_0xdbb244,_0x31aa27,_0x573549=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x573549&&(_0x31aa27=Math['max'](_0x31aa27,this['_getMaxAvailableTop'](_0xdbb244))),_0xdbb244['top']=_0x31aa27;}['_getMaxAvailableTop'](_0x440c84){let _0x52bd8c=this['_getItemBefore'](_0x440c84),_0x50ab10=0x0;for(;_0x52bd8c;)_0x52bd8c['updateHeight'](),_0x50ab10+=this['_spaceBetweenItems']+_0x52bd8c['height'],_0x52bd8c=this['_getItemBefore'](_0x52bd8c);return _0x50ab10;}}function R(_0x512a72,_0x41a3de){return Math['max'](_0x512a72-_0x41a3de,0x0);}function y(_0x153e95){return null!==_0x153e95&&'object'==typeof _0x153e95&&0x1===_0x153e95['nodeType'];}class e extends _0x149248{['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(_0x373d41){super(_0x373d41),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1b6511(),this['_refreshPositioningDebounced']=_0x3058e3(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4f408d=this['context']['plugins']['get'](M),_0x41da63=this['context']['plugins']['get'](z);_0x4f408d['register']('wideSidebar',this),_0x41da63['container']&&_0x4f408d['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x714bce){if(_0x714bce===this['activeAnnotation'])return;const _0x473bab=this['context']['plugins']['get'](z);_0x473bab['_activeAnnotation']=_0x714bce;const _0x4f60f3=this['activeAnnotation'];_0x473bab['refresh']({'blurredAnnotation':_0x4f60f3,'activatedAnnotation':_0x714bce}),this['activeAnnotation']=_0x714bce;}['attach'](_0x3c7dd0){this['annotations']=_0x3c7dd0;const _0x525237=this['context']['plugins']['get'](z);if(_0x525237['_annotations']=_0x3c7dd0,this['isAttached'])throw new _0x302412('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x525237,'set:container',()=>{this['detach'](),this['listenTo'](_0x525237,'change:container',_0x297118=>{_0x297118['off'](),this['attach'](_0x3c7dd0);});}),_0x525237['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x545500=_0x23fd5e=>{_0x23fd5e['updateTargetRect'](),_0x525237['addAnnotation'](_0x23fd5e);};for(const _0x4986b3 of _0x3c7dd0)_0x545500(_0x4986b3);this['listenTo'](_0x3c7dd0,'add',(_0x9c9077,_0x3d04ef)=>{_0x545500(_0x3d04ef);}),this['listenTo'](_0x3c7dd0,'remove',(_0x355ced,_0x4b05d8,_0x4c9049)=>{_0x525237['rearrange']({'removedAnnotation':_0x4b05d8,'previousAnnotation':_0x3c7dd0['get'](_0x4c9049-0x1),'nextAnnotation':_0x3c7dd0['get'](_0x4c9049+0x1)}),_0x4b05d8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3c7dd0,'focus',(_0x54a03c,_0x50b82c)=>{this['setActiveAnnotation'](_0x50b82c);}),this['listenTo'](_0x3c7dd0,'blur',()=>{this['setActiveAnnotation'](null);});const _0xdee116=this['context']instanceof _0x5735ba?this['context']['editors']:new _0x1b6511([this['context']]);for(const _0x6f5611 of _0xdee116)this['_integrateWithEditorAnnotations'](_0x6f5611);this['listenTo'](_0xdee116,'add',(_0x2669a3,_0x449708)=>{this['listenTo'](_0x449708,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x449708);});}),this['listenTo'](_0xdee116,'remove',(_0x5356cb,_0x2687a1)=>{_0x2687a1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2687a1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x302412('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x31b7ec=this['context']['plugins']['get'](z);_0x31b7ec['_detachFromContainer'](this['annotations']),this['stopListening'](_0x31b7ec),this['stopListening'](this['annotations']),this['context']instanceof _0x5735ba&&this['stopListening'](this['context']['editors']);for(const _0x566878 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x566878);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1474c2){if(!_0x1474c2['plugins']['has']('EditorAnnotations'))return;const _0x5b0eb5=_0x1474c2['plugins']['get']('EditorAnnotations'),_0x4401fe=()=>{const _0x129c22=_0x5b0eb5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x129c22[0x0]||null);};this['listenTo'](_0x5b0eb5,'refresh',_0x4401fe),this['listenTo'](_0x5b0eb5,'blur',(_0x493507,{isAnnotationTracked:_0x203901})=>{this['activeAnnotation']&&_0x203901(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5b0eb5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x595d06=>{_0x5b0eb5['hasDomSelection']()&&(_0x4401fe(),_0x595d06['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5b0eb5);}['_destroyEditorAnnotationsIntegration'](_0x5adc17){this['stopListening'](_0x5adc17),this['_editorAnnotations']['remove'](_0x5adc17);}}class C extends _0x25ab89{['counterView'];constructor(_0x58ee10){super(_0x58ee10);const _0x36e5a7=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x44579e,_0x50e383)=>_0x44579e?'...':_0x50e383['toString']()),this['set']('annotationType',''),this['icon']=_0x35c54a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x36e5a7['to']('annotationType',_0x1027c1=>'ck-annotation-counter__badge--'+_0x1027c1),_0x36e5a7['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x36e5a7['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x149248{['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(_0x53b45c){super(_0x53b45c),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x2c8ffe),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1b6511(),this['_refreshPositioningDebounced']=_0x3058e3(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2901be(this['context']['locale']),this['balloonPanelView']=new _0x3c248a(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x237609){this['annotations']=_0x237609;const _0x412053=this['context']['plugins']['get'](z),_0xa78d59=this['balloonPanelView'];if(_0x412053['_annotations']=_0x237609,this['isAttached'])throw new _0x302412('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x412053,'set:container',()=>{this['detach'](),this['listenTo'](_0x412053,'change:container',_0x25ca95=>{_0x25ca95['off'](),this['attach'](_0x237609);});}),_0x412053['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4cdf4b=_0x48153c=>{const _0x3eddb0=new C(this['context']['locale']);_0x412053['addAnnotation'](_0x48153c,_0x3eddb0),this['_annotationToNarrowView']['set'](_0x48153c,_0x3eddb0),_0x3eddb0['bind']('isDirty','annotationType','number')['to'](_0x48153c['view'],'isDirty','type','length'),_0x3eddb0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xa78d59['content']['first']!==_0x48153c['view']?(this['_showBalloon'](_0x48153c),_0x48153c['view']['element']['focus'](),this['setActiveAnnotation'](_0x48153c)):this['setActiveAnnotation'](null);});};for(const _0x48e7b8 of _0x237609)_0x4cdf4b(_0x48e7b8);this['listenTo'](_0x237609,'add',(_0x319347,_0x15bc6f)=>{_0x4cdf4b(_0x15bc6f);}),this['listenTo'](_0x237609,'remove',(_0x55069e,_0x3d4aba,_0x1c5179)=>{this['_annotationToNarrowView']['get'](_0x3d4aba)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3d4aba),_0x412053['rearrange']({'removedAnnotation':_0x3d4aba,'previousAnnotation':_0x237609['get'](_0x1c5179-0x1),'nextAnnotation':_0x237609['get'](_0x1c5179+0x1)}),_0x3d4aba===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x237609,'focus',(_0x4b4aab,_0x436344)=>{this['setActiveAnnotation'](_0x436344);}),this['listenTo'](_0x237609,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x564dd2,_0x2b9794)=>{_0x2b9794['keyCode']===_0x2cd697['esc']&&_0xa78d59['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xa78d59['content']['first']),this['_hideBalloon'](),_0x2b9794['stopPropagation'](),_0x2b9794['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x590289,_0xa3c16a)=>{const _0x2b2d80=_0xa3c16a['target'];_0xa78d59['isVisible']&&_0xa78d59['element']['contains'](_0x2b2d80)||_0x412053['view']['element']['contains'](_0x2b2d80)||_0x590289['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3cb562=>_0x3cb562['contains'](_0x2b2d80))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x45eb6d=this['context']instanceof _0x5735ba?this['context']['editors']:new _0x1b6511([this['context']]);for(const _0x1a03e0 of _0x45eb6d)this['_integrateWithEditorAnnotations'](_0x1a03e0);this['listenTo'](_0x45eb6d,'add',(_0x5f53de,_0x41140b)=>{this['listenTo'](_0x41140b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41140b);});}),this['listenTo'](_0x45eb6d,'remove',(_0x33ae08,_0xabc9d)=>{_0xabc9d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xabc9d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x433ff5){if(_0x433ff5===this['activeAnnotation'])return;const _0x40b0b1=this['context']['plugins']['get'](z);if(_0x40b0b1['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x433ff5,'disableAnimationOnActivatedAnnotation':!0x0}),_0x433ff5)_0x40b0b1['getSidebarItemView'](_0x433ff5)?this['_showBalloon'](_0x433ff5):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x433ff5;}['detach'](){if(!this['isAttached'])throw new _0x302412('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5bfa1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x30c466=>_0x30c466['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5bfa1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5735ba&&this['stopListening'](this['context']['editors']);for(const _0x292dde of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x292dde);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'](_0xd4a532){if(!_0xd4a532['plugins']['has']('EditorAnnotations'))return;const _0x1bbd44=_0xd4a532['plugins']['get']('EditorAnnotations'),_0x2300b1=this['context']['plugins']['get'](z),_0x46150b=this['annotations'],_0x498793=this['balloonPanelView'],_0x53c7fa=()=>{const _0x11f69f=_0x1bbd44['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x11f69f),this['setActiveAnnotation'](_0x11f69f[0x0]||null);};this['listenTo'](_0x1bbd44,'refresh',_0x53c7fa),this['listenTo'](_0x1bbd44,'blur',(_0x434004,{isAnnotationTracked:_0xa0a6e1})=>{this['activeAnnotation']&&_0xa0a6e1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1bbd44,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x46150b,'blur',_0x17d941=>{_0x1bbd44['hasDomSelection']()&&_0x17d941['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x18e3e2,_0x2b68bf)=>{const _0x418840=_0x2b68bf['target'];_0x498793['isVisible']&&_0x498793['element']['contains'](_0x418840)||_0x2300b1['view']['element']['contains'](_0x418840)||this['activeAnnotation']&&_0x1bbd44['hasDomSelection']()&&(_0x53c7fa(),_0x18e3e2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1bbd44);}['_destroyEditorAnnotationsIntegration'](_0x55404e){_0x55404e&&(this['stopListening'](_0x55404e),this['_editorAnnotations']['remove'](_0x55404e));}['_setSelectedAnnotations'](_0x7f39b6){for(const _0x4449c7 of this['_selectedAnnotations'])_0x7f39b6['includes'](_0x4449c7)||this['_manuallyClosedAnnotationViews']['delete'](_0x4449c7['view']);this['_selectedAnnotations']=_0x7f39b6;}['_refreshPositioning'](){const _0x365847=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x365847['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4fcd7e){if(this['_manuallyClosedAnnotationViews']['has'](_0x4fcd7e['view']))return;const _0x5d4013=this['balloonPanelView']['content']['first'];_0x5d4013!==_0x4fcd7e['view']?(_0x5d4013&&this['_detachListeners'](_0x5d4013),this['_attachListeners'](_0x4fcd7e['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4fcd7e['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x470256=this['balloonPanelView']['content']['first'],_0x375a7b=_0x470256&&this['annotations']['getByView'](_0x470256);if(!_0x375a7b||!this['_annotationToNarrowView']['has'](_0x375a7b))return;const _0x13d1ea=this['_annotationToNarrowView']['get'](_0x375a7b)['element'],_0x30f91f=(function(){const _0x2e02cc=_0x3c248a['defaultPositions'];return[_0x2e02cc['southArrowNorthEast'],_0x2e02cc['northArrowSouthEast'],_0x2e02cc['southArrowNorth'],_0x2e02cc['northArrowSouth'],_0x2e02cc['southArrowNorthWest'],_0x2e02cc['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x13d1ea,'positions':_0x30f91f});}['_hideBalloon'](){const _0x2a2aa3=this['balloonPanelView'],_0x1b4857=_0x2a2aa3['content']['first'];_0x1b4857&&(this['_detachListeners'](_0x1b4857),_0x2a2aa3['unpin'](),_0x2a2aa3['content']['clear']());}['_attachListeners'](_0x59adc6){this['listenTo'](_0x59adc6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x59adc6,'Esc',(_0x3568c0,_0x3ea6dc)=>{this['_manuallyClosedAnnotationViews']['add'](_0x59adc6),this['_hideBalloon'](),_0x3ea6dc();});}['_detachListeners'](_0x67186d){this['stopListening'](_0x67186d);}}class c extends _0x3e8287{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x162d8a,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19f525){super(_0x19f525),_0x19f525['editing']['view']['addObserver'](_0x165613),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x19f525['plugins']['get'](_0x162d8a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3440bb=this['editor']['plugins']['get'](M);_0x3440bb['context']===this['editor']&&(_0x3440bb['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3d3f2c,_0x48fd04)=>{const _0x12a2e5=this['_balloon'];if(this['isAttached']&&_0x12a2e5['visibleView']){const _0x28c4c7=this['annotations']['getByView'](_0x12a2e5['visibleView']);_0x28c4c7&&this['_closeAnnotation'](_0x28c4c7),_0x48fd04();}}));}['afterInit'](){const _0x36edd6=this['editor']['plugins']['get'](M);_0x36edd6['context']===this['editor']&&(_0x36edd6['hasActive']()||_0x36edd6['switchTo']('inline'));}['setActiveAnnotation'](_0x35af45){_0x35af45!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x35af45&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x35af45)&&this['_addAnnotationToBalloon'](_0x35af45,!0x0),_0x35af45['isActive']=!0x0),_0x35af45||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x35af45);}['attach'](_0x5be3df){this['annotations']=_0x5be3df;const _0x27977b=this['editor']['plugins']['get'](M),_0x4da14c=this['_balloon'];if(this['isAttached'])throw new _0x302412('inlineannotations-attach-already-attached',this);if(_0x27977b['context']!==this['editor'])throw new _0x302412('inlineannotations-not-allowed-with-context',this);const _0x525a04=this['editor']['plugins']['get'](P);this['listenTo'](_0x525a04,'refresh',()=>{const _0x57f7dd=_0x525a04['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x298ec4,_0x2cece5;!this['_forceRefresh']&&(_0x298ec4=_0x57f7dd,_0x2cece5=this['_selectedAnnotations'],_0x298ec4['length']===_0x2cece5['length']&&_0x298ec4['every'](_0x5e4500=>_0x2cece5['includes'](_0x5e4500)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x57f7dd),this['setActiveAnnotation'](_0x57f7dd[0x0]||null));}),this['listenTo'](_0x525a04,'blur',(_0x3ac4dc,{isAnnotationTracked:_0x586fac})=>{this['activeAnnotation']&&_0x586fac(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5047c2,_0x4fe154,_0x110627)=>{_0x110627||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5be3df,'remove',(_0x197141,_0x303d6e)=>{this['_removeAnnotationFromBalloon'](_0x303d6e),_0x303d6e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4da14c,'change:visibleView',(_0x3f4f1d,_0x169c01,_0x88f5bc,_0x25bc2d)=>{_0x25bc2d&&this['stopListening'](_0x25bc2d);const _0x229de2=_0x5be3df['getByView'](_0x88f5bc);_0x88f5bc&&_0x229de2&&(this['listenTo'](_0x88f5bc,'change:height',()=>{_0x4da14c['updatePosition']();}),this['listenTo'](_0x88f5bc,'Esc',()=>{this['_closeAnnotation'](_0x229de2),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x229de2&&this['setActiveAnnotation'](_0x229de2));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4da14c['visibleView']&&(_0x5be3df['getByView'](_0x4da14c['visibleView'])&&_0x4da14c['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 _0x302412('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x36e460 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x36e460);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x354adb){for(const _0x58c43f of this['_selectedAnnotations'])_0x354adb['includes'](_0x58c43f)||this['_manuallyClosed']['delete'](_0x58c43f);for(const _0x2171be of this['annotations'])_0x354adb['includes'](_0x2171be)||this['_removeAnnotationFromBalloon'](_0x2171be);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3079c0 of _0x354adb)this['_addAnnotationToBalloon'](_0x3079c0);}this['_selectedAnnotations']=_0x354adb;}['_addAnnotationToBalloon'](_0x51e2bb,_0x3ffc79=!0x1){this['_manuallyClosed']['has'](_0x51e2bb)||(this['_addedAnnotations']['has'](_0x51e2bb)||this['_balloon']['hasView'](_0x51e2bb['view'])||(this['_addedAnnotations']['add'](_0x51e2bb),this['_balloon']['add']({'stackId':_0x51e2bb['view']['id'],'view':_0x51e2bb['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x51e2bb)}})),_0x3ffc79&&this['_balloon']['showStack'](_0x51e2bb['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5382cb){const _0x17e2a2=_0x5382cb['target'],_0xc79ba8=this['editor']['editing']['view'],_0x1729a2=_0xc79ba8['document']['selection']['getFirstRange'](),_0x1ce03d=_0xc79ba8['domConverter']['viewRangeToDom'](_0x1729a2);if(_0x1ce03d['collapse'](!0x0),_0x17e2a2){if(_0x17e2a2 instanceof _0x197d1d)return _0x17e2a2;let _0x18f49a=[];for(const _0x9ec0a8 of _0x17e2a2)_0x18f49a['push'](...(_0x7d0ad1=_0x9ec0a8['getClientRects'](),Array['from'](_0x7d0ad1)['map'](DOMRect['fromRect'])));_0x18f49a=function(_0x5138f7){const _0x2244aa=[];let _0x2eb97b=_0x5138f7[0x0];for(let _0x16626b=0x1;_0x16626b<_0x5138f7['length'];_0x16626b++)B(_0x2eb97b,_0x5138f7[_0x16626b])?_0x2eb97b['width']+=_0x5138f7[_0x16626b]['width']:(_0x2244aa['push'](_0x2eb97b),_0x2eb97b=_0x5138f7[_0x16626b]);return _0x2244aa['push'](_0x2eb97b),_0x2244aa;}(_0x18f49a);const _0x4395aa=_0x1ce03d['getBoundingClientRect']();return _0x18f49a['find'](_0x3e52ec=>_0x3e52ec['top']<=_0x4395aa['top']&&_0x3e52ec['bottom']>=_0x4395aa['bottom']&&_0x3e52ec['left']<=_0x4395aa['left']&&_0x3e52ec['right']>=_0x4395aa['right'])||_0x18f49a[0x0];}var _0x7d0ad1;return _0x5382cb['targetRect']||_0x1ce03d;}['_removeAnnotationFromBalloon'](_0x24a3ed){this['_addedAnnotations']['has'](_0x24a3ed)&&this['_balloon']['hasView'](_0x24a3ed['view'])&&(this['_addedAnnotations']['delete'](_0x24a3ed),this['_balloon']['remove'](_0x24a3ed['view']));}['_closeAnnotation'](_0x59d73d){this['_manuallyClosed']['add'](_0x59d73d),this['_removeAnnotationFromBalloon'](_0x59d73d);}}function B(_0x339d6e,_0x5b8447){return _0x339d6e['top']===_0x5b8447['top']&&_0x339d6e['bottom']===_0x5b8447['bottom']&&_0x339d6e['right']===_0x5b8447['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x43d615,_0x2472ce){super(_0x43d615),this['set']('isEmpty',!_0x2472ce['length']),this['focusTracker']=new _0x6d2edc(),this['_annotationViews']=_0x2472ce,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5bcd58({'focusables':_0x2472ce,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2472ce,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2472ce,'remove',(_0x13172f,_0x570cf7)=>{_0x570cf7['isActive']&&this['focus'](),_0x2472ce['length']||(this['isEmpty']=!0x0);});const _0x359f06=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x43d615,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2472ce},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x359f06['if']('isEmpty','ck-hidden',_0x596718=>!_0x596718)]},'children':[{'text':E(_0x43d615,'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 _0x4c7293 of this['_annotationViews'])this['focusTracker']['add'](_0x4c7293['element']);this['_annotationViews']['on']('change',(_0xd67466,{added:_0xb625c4,removed:_0x222eb})=>{for(const _0x10f913 of _0xb625c4)this['focusTracker']['add'](_0x10f913['element']);for(const _0x5002d6 of _0x222eb)this['focusTracker']['remove'](_0x5002d6['element']);});}}class f extends _0x149248{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x178cbc){super(_0x178cbc),this['archivedThreads']=new _0x1b6511();}['init'](){const _0x1ecd4b=this['context'],_0x3738bf=_0x1ecd4b['plugins']['get'](o),_0x49c0d3=_0x1ecd4b['plugins']['get'](O);this['listenTo'](_0x3738bf,'addCommentThread',(_0x3d6206,{threadId:_0x469256})=>{const _0x45f9f6=_0x3738bf['getCommentThread'](_0x469256);_0x45f9f6['archivedAt']&&this['archivedThreads']['add'](_0x45f9f6,this['_calculatePosition'](_0x45f9f6['archivedAt'])),this['listenTo'](_0x45f9f6,'change:archivedAt',(_0xe33347,_0x2f263d,_0x53792b)=>{_0x53792b?this['archivedThreads']['has'](_0x45f9f6)||this['archivedThreads']['add'](_0x45f9f6,this['_calculatePosition'](_0x45f9f6['archivedAt'])):this['archivedThreads']['has'](_0x45f9f6)&&this['archivedThreads']['remove'](_0x45f9f6);});}),this['listenTo'](_0x3738bf,'removeCommentThread',(_0x35ea30,{threadId:_0x49f08e})=>{const _0xd0972=_0x3738bf['getCommentThread'](_0x49f08e);this['stopListening'](_0xd0972),this['archivedThreads']['has'](_0xd0972)&&this['archivedThreads']['remove'](_0xd0972);},{'priority':'highest'}),this['listenTo'](_0x49c0d3['collection'],'focus',(_0x43e5a4,_0x272f60)=>{_0x272f60['isVisible']||(_0x272f60['isActive']=!0x0,_0x49c0d3['activate'](_0x272f60));});}['_calculatePosition'](_0x426fa7){const _0x5f4975=[...this['archivedThreads']]['findIndex'](_0x3853e2=>_0x3853e2['archivedAt']<_0x426fa7);return _0x5f4975>-0x1?_0x5f4975:this['archivedThreads']['length'];}}class a extends _0x3e8287{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x3727d0];}constructor(_0x54ccfb){super(_0x54ccfb),this['annotationViews']=new _0xea1baf(),this['_pendingThreads']=[];}['init'](){const _0x2dc741=this['editor'],_0x47655a=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2dc741['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x25ab89,!0x0)),_0x2dc741['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x543ee3=this['_createCommentsArchiveButton'](_0x508e0d);return _0x543ee3['set']({'role':'menuitemcheckbox'}),_0x543ee3;});const _0x3d7cab=_0x2dc741['plugins']['get'](f),_0x45fa05=_0x2dc741['plugins']['get']('Annotations'),_0x214720=_0x2dc741['plugins']['get']('CommentsRepository');_0x3d7cab['archivedThreads']['forEach'](_0x24c090=>{this['_handleNewThread'](_0x24c090);}),this['listenTo'](_0x3d7cab['archivedThreads'],'add',(_0xcb3f1c,_0x122e02)=>{this['_handleNewThread'](_0x122e02);}),this['listenTo'](_0x45fa05['collection'],'add',(_0x28fce4,_0x427f1b)=>{const _0x4e7ad4=this['_pendingThreads']['find'](_0x2746a9=>{const _0x3c0928=_0x214720['_threadToController']['get'](_0x2746a9);return _0x3c0928&&_0x427f1b['innerView']===_0x3c0928['view'];});if(_0x4e7ad4){const _0x17cf53=this['_calculatePosition'](_0x4e7ad4['archivedAt']);this['annotationViews']['add'](_0x427f1b['view'],_0x17cf53),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4e7ad4),0x1);}}),this['listenTo'](_0x3d7cab['archivedThreads'],'remove',(_0x4ba0f3,_0x176683)=>{const _0x1619a2=_0x2dc741['config']['get']('collaboration.channelId');if(!_0x1619a2||_0x176683['channelId']===_0x1619a2){if(this['_pendingThreads']['includes'](_0x176683))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x176683),0x1);else{const _0x431d90=_0x214720['_threadToController']['get'](_0x176683),_0x5ea73d=_0x45fa05['getByInnerView'](_0x431d90['view']);this['annotationViews']['remove'](_0x5ea73d['view']),this['stopListening'](_0x5ea73d['focusableElements']);}}}),this['listenTo'](_0x45fa05['collection'],'add',(_0x94c398,_0x3952ed)=>{this['listenTo'](_0x3952ed,'escape',_0x47655a);}),this['listenTo'](_0x45fa05['collection'],'remove',(_0x3ac90d,_0x108646)=>{this['stopListening'](_0x108646,'escape',_0x47655a);});}['_handleNewThread'](_0x543a01){const _0x43a6b4=this['editor']['plugins']['get']('CommentsRepository'),_0x248efc=this['editor']['plugins']['get']('Annotations'),_0xb8eae9=this['editor']['config']['get']('collaboration.channelId');if(!_0xb8eae9||_0x543a01['channelId']===_0xb8eae9){const _0x1d6880=_0x43a6b4['_threadToController']['get'](_0x543a01);if(!_0x1d6880)return void this['_pendingThreads']['push'](_0x543a01);const _0xb1783b=this['_calculatePosition'](_0x543a01['archivedAt']),_0x39b1e9=_0x248efc['getByInnerView'](_0x1d6880['view']);_0x39b1e9['isVisible']&&_0x248efc['_visibleAnnotations']['remove'](_0x39b1e9),this['annotationViews']['add'](_0x39b1e9['view'],_0xb1783b);}}['_calculatePosition'](_0xbe3bbd){const _0x44e32b=this['editor']['config']['get']('collaboration.channelId'),_0x21e4dc=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x16cc25=>_0x16cc25['channelId']===_0x44e32b)['findIndex'](_0x5a30ec=>_0x5a30ec['archivedAt']<_0xbe3bbd);return _0x21e4dc<0x0||_0x21e4dc>this['annotationViews']['length']?this['annotationViews']['length']:_0x21e4dc-0x1;}['_toggleDialog'](){const _0x7eb216=this['editor'],_0xa9ca06=_0x7eb216['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x7eb216['locale'],this['annotationViews'])),'commentsArchive'===_0xa9ca06['id']?_0xa9ca06['hide']():_0xa9ca06['show']({'id':'commentsArchive','title':E(_0x7eb216['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1dd5ca,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1e4b9a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4ae750,_0x50ab35=!0x1){const _0x31b21e=this['editor']['locale'],_0x5ec5c3=this['editor']['plugins']['get']('Dialog'),_0x56585d=new _0x4ae750(_0x31b21e);return _0x56585d['bind']('isEnabled')['to'](this,'isEnabled'),_0x56585d['bind']('isOn')['to'](_0x5ec5c3,'id',_0x1c2930=>'commentsArchive'===_0x1c2930),_0x56585d['set']({'label':E(_0x31b21e,'COMMENTS_ARCHIVE'),'icon':_0x1dd5ca,'isToggleable':!0x0}),_0x50ab35&&(_0x56585d['tooltip']=!0x0),this['listenTo'](_0x56585d,'execute',()=>this['_toggleDialog']()),_0x56585d;}['_hideDialogOnAnnotationEscape']=_0x43cd19=>{const _0x1c8946=_0x43cd19['source'];if(!this['annotationViews']['has'](_0x1c8946['view']))return;const _0x3c773c=this['editor']['plugins']['get']('Dialog');_0x3c773c['isOpen']&&'commentsArchive'===_0x3c773c['id']&&(_0x3c773c['hide'](),_0x43cd19['stop']());};}class p extends _0x3e8287{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};
|